fix based on https://gist.github.com/timbrom/1942280
[DSO138] / Libraries / CMSIS / CMSIS_changes.htm
1 <html>\r
2 \r
3 <head>\r
4 <title>CMSIS Changes</title>\r
5 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">\r
6 <meta name="GENERATOR" content="Microsoft FrontPage 6.0">\r
7 <meta name="ProgId" content="FrontPage.Editor.Document">\r
8 <style>\r
9 <!--\r
10 /*-----------------------------------------------------------\r
11 Keil Software CHM Style Sheet\r
12 -----------------------------------------------------------*/\r
13 body         { color: #000000; background-color: #FFFFFF; font-size: 75%; font-family: \r
14                Verdana, Arial, 'Sans Serif' }\r
15 a:link       { color: #0000FF; text-decoration: underline }\r
16 a:visited    { color: #0000FF; text-decoration: underline }\r
17 a:active     { color: #FF0000; text-decoration: underline }\r
18 a:hover      { color: #FF0000; text-decoration: underline }\r
19 h1           { font-family: Verdana; font-size: 18pt; color: #000080; font-weight: bold; \r
20                text-align: Center; margin-right: 3 }\r
21 h2           { font-family: Verdana; font-size: 14pt; color: #000080; font-weight: bold; \r
22                background-color: #CCCCCC; margin-top: 24; margin-bottom: 3; \r
23                padding: 6 }\r
24 h3           { font-family: Verdana; font-size: 10pt; font-weight: bold; background-color: \r
25                #CCCCCC; margin-top: 24; margin-bottom: 3; padding: 6 }\r
26 pre          { font-family: Courier New; font-size: 10pt; background-color: #CCFFCC; \r
27                margin-left: 24; margin-right: 24 }\r
28 ul           { list-style-type: square; margin-top: 6pt; margin-bottom: 0 }\r
29 ol           { margin-top: 6pt; margin-bottom: 0 }\r
30 li           { clear: both; margin-bottom: 6pt }\r
31 table        { font-size: 100%; border-width: 0; padding: 0 }\r
32 th           { color: #FFFFFF; background-color: #000080; text-align: left; vertical-align: \r
33                bottom; padding-right: 6pt }\r
34 tr           { text-align: left; vertical-align: top }\r
35 td           { text-align: left; vertical-align: top; padding-right: 6pt }\r
36 .ToolT       { font-size: 8pt; color: #808080 }\r
37 .TinyT       { font-size: 8pt; text-align: Center }\r
38 code         { color: #000000; background-color: #E0E0E0; font-family: 'Courier New', Courier; \r
39                line-height: 120%; font-style: normal }\r
40 /*-----------------------------------------------------------\r
41 Notes\r
42 -----------------------------------------------------------*/\r
43 p.note       { font-weight: bold; clear: both; margin-bottom: 3pt; padding-top: 6pt }\r
44 /*-----------------------------------------------------------\r
45 Expanding/Contracting Divisions\r
46 -----------------------------------------------------------*/\r
47 #expand      { text-decoration: none; margin-bottom: 3pt }\r
48 img.expand   { border-style: none; border-width: medium }\r
49 div.expand   { display: none; margin-left: 9pt; margin-top: 0 }\r
50 /*-----------------------------------------------------------\r
51 Where List Tags\r
52 -----------------------------------------------------------*/\r
53 p.wh         { font-weight: bold; clear: both; margin-top: 6pt; margin-bottom: 3pt }\r
54 table.wh     { width: 100% }\r
55 td.whItem    { white-space: nowrap; font-style: italic; padding-right: 6pt; padding-bottom: \r
56                6pt }\r
57 td.whDesc    { padding-bottom: 6pt }\r
58 /*-----------------------------------------------------------\r
59 Keil Table Tags\r
60 -----------------------------------------------------------*/\r
61 table.kt     { border: 1pt solid #000000 }\r
62 th.kt        { white-space: nowrap; border-bottom: 1pt solid #000000; padding-left: 6pt; \r
63                padding-right: 6pt; padding-top: 4pt; padding-bottom: 4pt }\r
64 tr.kt        {  }\r
65 td.kt        { color: #000000; background-color: #E0E0E0; border-top: 1pt solid #A0A0A0; \r
66                padding-left: 6pt; padding-right: 6pt; padding-top: 2pt; \r
67                padding-bottom: 2pt }\r
68 /*-----------------------------------------------------------\r
69 -----------------------------------------------------------*/\r
70 -->\r
71 \r
72 </style>\r
73 </head>\r
74 \r
75 <body>\r
76 \r
77 <h1>Changes to CMSIS version V1.20</h1>\r
78 \r
79 <hr>\r
80 \r
81 <h2>1. Removed CMSIS Middelware packages</h2>\r
82 <p>\r
83   CMSIS Middleware is on hold from ARM side until a agreement between all CMSIS partners is found.\r
84 </p>\r
85 \r
86 <h2>2. SystemFrequency renamed to SystemCoreClock</h2>\r
87 <p>\r
88   The variable name <strong>SystemCoreClock</strong> is more precise than <strong>SystemFrequency</strong>\r
89   because the variable holds the clock value at which the core is running.\r
90 </p>\r
91 \r
92 <h2>3. Changed startup concept</h2>\r
93 <p>\r
94   The old startup concept (calling SystemInit_ExtMemCtl from startup file and calling SystemInit \r
95   from main) has the weakness that it does not work for controllers which need a already \r
96   configuerd clock system to configure the external memory controller.\r
97 </p>\r
98 \r
99 <h3>Changed startup concept</h3>\r
100 <ul>\r
101   <li>\r
102     SystemInit() is called from startup file before <strong>premain</strong>.\r
103   </li>\r
104   <li>\r
105     <strong>SystemInit()</strong> configures the clock system and also configures\r
106     an existing external memory controller.\r
107   </li>\r
108   <li>\r
109     <strong>SystemInit()</strong> must not use global variables.\r
110   </li>\r
111   <li>\r
112     <strong>SystemCoreClock</strong> is initialized with a correct predefined value.\r
113   </li>\r
114   <li>\r
115     Additional function <strong>void SystemCoreClockUpdate (void)</strong> is provided.<br>\r
116    <strong>SystemCoreClockUpdate()</strong> updates the variable <strong>SystemCoreClock</strong>\r
117    and must be called whenever the core clock is changed.<br>\r
118    <strong>SystemCoreClockUpdate()</strong> evaluates the clock register settings and calculates\r
119    the current core clock.\r
120   </li>\r
121 </ul>\r
122       \r
123 \r
124 <h2>4. Advanced Debug Functions</h2>\r
125 <p>\r
126   ITM communication channel is only capable for OUT direction. To allow also communication for\r
127   IN direction a simple concept is provided.\r
128 </p>\r
129 <ul>\r
130   <li>\r
131     Global variable <strong>volatile int ITM_RxBuffer</strong> used for IN data.\r
132   </li>\r
133   <li>\r
134     Function <strong>int ITM_CheckChar (void)</strong> checks if a new character is available.\r
135   </li>\r
136   <li>\r
137     Function <strong>int ITM_ReceiveChar (void)</strong> retrieves the new character.\r
138   </li>\r
139 </ul>\r
140 \r
141 <p>\r
142   For detailed explanation see file <strong>CMSIS debug support.htm</strong>. \r
143 </p>\r
144 \r
145 \r
146 <h2>5. Core Register Bit Definitions</h2>\r
147 <p>\r
148   Files core_cm3.h and core_cm0.h contain now bit definitions for Core Registers. The name for the\r
149   defines correspond with the Cortex-M Technical Reference Manual.  \r
150 </p>\r
151 <p>\r
152   e.g. SysTick structure with bit definitions\r
153 </p>\r
154 <pre>\r
155 /** @addtogroup CMSIS_CM3_SysTick CMSIS CM3 SysTick\r
156   memory mapped structure for SysTick\r
157   @{\r
158  */\r
159 typedef struct\r
160 {\r
161   __IO uint32_t CTRL;                         /*!< Offset: 0x00  SysTick Control and Status Register */\r
162   __IO uint32_t LOAD;                         /*!< Offset: 0x04  SysTick Reload Value Register       */\r
163   __IO uint32_t VAL;                          /*!< Offset: 0x08  SysTick Current Value Register      */\r
164   __I  uint32_t CALIB;                        /*!< Offset: 0x0C  SysTick Calibration Register        */\r
165 } SysTick_Type;\r
166 \r
167 /* SysTick Control / Status Register Definitions */\r
168 #define SysTick_CTRL_COUNTFLAG_Pos         16                                             /*!< SysTick CTRL: COUNTFLAG Position */\r
169 #define SysTick_CTRL_COUNTFLAG_Msk         (1ul << SysTick_CTRL_COUNTFLAG_Pos)            /*!< SysTick CTRL: COUNTFLAG Mask */\r
170 \r
171 #define SysTick_CTRL_CLKSOURCE_Pos          2                                             /*!< SysTick CTRL: CLKSOURCE Position */\r
172 #define SysTick_CTRL_CLKSOURCE_Msk         (1ul << SysTick_CTRL_CLKSOURCE_Pos)            /*!< SysTick CTRL: CLKSOURCE Mask */\r
173 \r
174 #define SysTick_CTRL_TICKINT_Pos            1                                             /*!< SysTick CTRL: TICKINT Position */\r
175 #define SysTick_CTRL_TICKINT_Msk           (1ul << SysTick_CTRL_TICKINT_Pos)              /*!< SysTick CTRL: TICKINT Mask */\r
176 \r
177 #define SysTick_CTRL_ENABLE_Pos             0                                             /*!< SysTick CTRL: ENABLE Position */\r
178 #define SysTick_CTRL_ENABLE_Msk            (1ul << SysTick_CTRL_ENABLE_Pos)               /*!< SysTick CTRL: ENABLE Mask */\r
179 \r
180 /* SysTick Reload Register Definitions */\r
181 #define SysTick_LOAD_RELOAD_Pos             0                                             /*!< SysTick LOAD: RELOAD Position */\r
182 #define SysTick_LOAD_RELOAD_Msk            (0xFFFFFFul << SysTick_LOAD_RELOAD_Pos)        /*!< SysTick LOAD: RELOAD Mask */\r
183 \r
184 /* SysTick Current Register Definitions */\r
185 #define SysTick_VAL_CURRENT_Pos             0                                             /*!< SysTick VAL: CURRENT Position */\r
186 #define SysTick_VAL_CURRENT_Msk            (0xFFFFFFul << SysTick_VAL_CURRENT_Pos)        /*!< SysTick VAL: CURRENT Mask */\r
187 \r
188 /* SysTick Calibration Register Definitions */\r
189 #define SysTick_CALIB_NOREF_Pos            31                                             /*!< SysTick CALIB: NOREF Position */\r
190 #define SysTick_CALIB_NOREF_Msk            (1ul << SysTick_CALIB_NOREF_Pos)               /*!< SysTick CALIB: NOREF Mask */\r
191 \r
192 #define SysTick_CALIB_SKEW_Pos             30                                             /*!< SysTick CALIB: SKEW Position */\r
193 #define SysTick_CALIB_SKEW_Msk             (1ul << SysTick_CALIB_SKEW_Pos)                /*!< SysTick CALIB: SKEW Mask */\r
194 \r
195 #define SysTick_CALIB_TENMS_Pos             0                                             /*!< SysTick CALIB: TENMS Position */\r
196 #define SysTick_CALIB_TENMS_Msk            (0xFFFFFFul << SysTick_VAL_CURRENT_Pos)        /*!< SysTick CALIB: TENMS Mask */\r
197 /*@}*/ /* end of group CMSIS_CM3_SysTick */</pre>\r
198 \r
199 <h2>7. DoxyGen Tags</h2>\r
200 <p>\r
201   DoxyGen tags in files core_cm3.[c,h] and core_cm0.[c,h] are reworked to create proper documentation\r
202   using DoxyGen.\r
203 </p>\r
204 \r
205 <h2>8. Folder Structure</h2>\r
206 <p>\r
207   The folder structure is changed to differentiate the single support packages.\r
208 </p>\r
209 \r
210   <ul>\r
211     <li>CM0</li>\r
212     <li>CM3\r
213        <ul>\r
214          <li>CoreSupport</li>\r
215          <li>DeviceSupport</li>\r
216            <ul>\r
217              <li>Vendor \r
218                <ul>\r
219                  <li>Device\r
220                    <ul>\r
221                       <li>Startup\r
222                         <ul>\r
223                           <li>Toolchain</li>\r
224                           <li>Toolchain</li>\r
225                           <li>...</li>\r
226                         </ul>\r
227                       </li>\r
228                    </ul>\r
229                  </li>\r
230                  <li>Device</li>\r
231                  <li>...</li>\r
232                </ul>\r
233              </li>\r
234              <li>Vendor</li>\r
235              <li>...</li>\r
236            </ul>\r
237          </li>\r
238          <li>Example\r
239            <ul>\r
240              <li>Toolchain \r
241                <ul>\r
242                  <li>Device</li>\r
243                  <li>Device</li>\r
244                  <li>...</li>\r
245                </ul>\r
246              </li>\r
247              <li>Toolchain</li>\r
248              <li>...</li>\r
249            </ul>\r
250          </li>\r
251        </ul>\r
252     </li>\r
253      \r
254     <li>Documentation</li>\r
255   </ul>\r
256 \r
257 <h2>9. Open Points</h2>\r
258 <p>\r
259   Following points need to be clarified and solved:\r
260 </p>\r
261 <ul>\r
262   <li>\r
263     <p>\r
264       Equivalent C and Assembler startup files.\r
265     </p>\r
266     <p>\r
267       Is there a need for having C startup files although assembler startup files are\r
268       very efficient and do not need to be changed?\r
269     <p/>\r
270   </li>\r
271   <li>\r
272     <p>\r
273       Placing of HEAP in external RAM.\r
274     </p>\r
275     <p>\r
276       It must be possible to place HEAP in external RAM if the device supports an \r
277       external memory controller.\r
278     </p>\r
279   </li>\r
280   <li>\r
281     <p>\r
282       Placing of STACK /HEAP.\r
283     </p>\r
284     <p>\r
285       STACK should always be placed at the end of internal RAM.\r
286     </p>\r
287     <p>\r
288       If HEAP is placed in internal RAM than it should be placed after RW ZI section.\r
289     </p>\r
290   </li>\r
291   <li>\r
292     <p>\r
293       Removing core_cm3.c and core_cm0.c.\r
294     </p>\r
295     <p>\r
296       On a long term the functions in core_cm3.c and core_cm0.c must be replaced with \r
297       appropriate compiler intrinsics.\r
298     </p>\r
299   </li>\r
300 </ul>\r
301 \r
302 \r
303 <h2>10. Limitations</h2>\r
304 <p>\r
305   The following limitations are not covered with the current CMSIS version:\r
306 </p>\r
307 <ul>\r
308  <li>\r
309   No <strong>C startup files</strong> for ARM toolchain are provided. \r
310  </li>\r
311  <li>\r
312   No <strong>C startup files</strong> for GNU toolchain are provided. \r
313  </li>\r
314  <li>\r
315   No <strong>C startup files</strong> for IAR toolchain are provided. \r
316  </li>\r
317  <li>\r
318   No <strong>Tasking</strong> projects are provided yet. \r
319  </li>\r
320 </ul>\r