Overview.txt 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. /** \mainpage Overview
  2. CMSIS-Core (Cortex-M) implements the basic run-time system for a Cortex-M device and gives the user access to the processor core and the device peripherals.
  3. In detail it defines:
  4. - <b>Hardware Abstraction Layer (HAL)</b> for Cortex-M processor registers with standardized definitions for the SysTick, NVIC, System Control Block registers, MPU registers, FPU registers, and core access functions.
  5. - <b>System exception names</b> to interface to system exceptions without having compatibility issues.
  6. - <b>Methods to organize header files</b> that makes it easy to learn new Cortex-M microcontroller products and improve software portability. This includes naming conventions for device-specific interrupts.
  7. - <b>Methods for system initialization</b> to be used by each MCU vendor. For example, the standardized SystemInit() function is essential for configuring the clock system of the device.
  8. - <b>Intrinsic functions</b> used to generate CPU instructions that are not supported by standard C functions.
  9. - A variable to determine the <b>system clock frequency</b> which simplifies the setup the SysTick timer.
  10. The following sections provide details about the CMSIS-Core (Cortex-M):
  11. - \ref using_pg describes the project setup and shows a simple program example.
  12. \if ARMv8M
  13. - \ref using_TrustZone_pg "Using TrustZone&reg; for Armv8-M" describes how to use the security extensions available in the Armv8-M architecture.
  14. \endif
  15. - \ref templates_pg describes the files of the CMSIS-Core (Cortex-M) in detail and explains how to adapt template files provided by Arm to silicon vendor devices.
  16. - \ref coreMISRA_Exceptions_pg describes the violations to the MISRA standard.
  17. - <a href="Modules.html">\b Reference </a> describe the features and functions of the \ref device_h_pg in detail.
  18. - <a href="Annotated.html">\b Data \b Structures </a> describe the data structures of the \ref device_h_pg in detail.
  19. <hr>
  20. CMSIS-Core (Cortex-M) in ARM::CMSIS Pack
  21. -----------------------------
  22. Files relevant to CMSIS-Core (Cortex-M) are present in the following <b>ARM::CMSIS</b> directories:
  23. |File/Folder |Content |
  24. |------------------------------|------------------------------------------------------------------------|
  25. |\b CMSIS\\Documentation\\Core | This documentation |
  26. |\b CMSIS\\Core\\Include | CMSIS-Core (Cortex-M) header files (for example core_cm3.h, core_cmInstr.h, etc.) |
  27. |\b Device | \ref using_ARM_pg "Arm reference implementations" of Cortex-M devices |
  28. |\b Device\\\_Template_Vendor | \ref templates_pg for extension by silicon vendors |
  29. <hr>
  30. \section ref_v6-v8M Processor Support
  31. CMSIS supports the complete range of <a href="https://developer.arm.com/products/processors/cortex-m" target="_blank"><b>Cortex-M processors</b></a> and
  32. the <a href="http://www.arm.com/products/processors/instruction-set-architectures/armv8-m-architecture.php" target="_blank"><b>Armv8-M/v8.1-M architecture</b></a> including security extensions.
  33. \subsection ref_man_sec Cortex-M Reference Manuals
  34. The Cortex-M Device Generic User Guides contain the programmers model and detailed information about the core peripherals and are available for:
  35. - <a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0497a/DUI0497A_cortex_m0_r0p0_generic_ug.pdf" target="_blank"><b>Cortex-M0 Devices Generic User Guide</b></a> (Armv6-M architecture)
  36. - <a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0662b/DUI0662B_cortex_m0p_r0p1_dgug.pdf" target="_blank"><b>Cortex-M0+ Devices Generic User Guide</b></a> (Armv6-M architecture)
  37. - <a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/DUI0552A_cortex_m3_dgug.pdf" target="_blank"><b>Cortex-M3 Devices Generic User Guide</b></a> (Armv7-M architecture)
  38. - <a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0553a/DUI0553A_cortex_m4_dgug.pdf" target="_blank"><b>Cortex-M4 Devices Generic User Guide</b></a> (ARMv7-M architecture)
  39. - <a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0646a/DUI0646A_cortex_m7_dgug.pdf" target="_blank"><b>Cortex-M7 Devices Generic User Guide</b></a> (Armv7-M architecture)
  40. \if ARMv8M
  41. The \b Cortex-M23 and \b Cortex-M33 are described with Technical Reference Manuals that are available here:
  42. - <a href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0550c/cortex_m23_r1p0_technical_reference_manual_DDI0550C_en.pdf" target="_blank"><b>Cortex-M23 Technical Reference Manual</b></a> (Armv8-M baseline architecture)
  43. - <a href="http://infocenter.arm.com/help/topic/com.arm.doc.100230_0002_00_en/cortex_m33_trm_100230_0002_00_en.pdf" target="_blank"><b>Cortex-M33 Technical Reference Manual</b></a> (Armv8-M mainline architecture)
  44. CMSIS also supports the following Cortex-M processor variants:
  45. - <a href="https://developer.arm.com/products/processors/cortex-m/cortex-m1" target="_blank"><b>Cortex-M1</b></a> is a processor designed specifically for implementation in FPGAs (Armv6-M architecture).
  46. - <a href="https://developer.arm.com/products/processors/cortex-m/sc000-processor" target="_blank"><b>SecurCore SC000</b></a> is designed specifically for smartcard and security applications (Armv6-M architecture).
  47. - <a href="https://developer.arm.com/products/processors/cortex-m/sc300-processor" target="_blank"><b>SecurCore SC300</b></a> is designed specifically for smartcard and security applications (Armv7-M architecture).
  48. - <a href="https://developer.arm.com/products/processors/cortex-m/sc300-processor" target="_blank"><b>Cortex-M35P</b></a> is a temper resistant Cortex-M processor with optional software isolation using TrustZone for Armv8-M.
  49. \subsection ARMv8M Armv8-M and Armv8.1-M Architecture
  50. Armv8-M introduces two profiles \b baseline (for power and area constrained applications) and \b mainline (full-featured with optional SIMD, floating-point, and co-processor extensions).
  51. Both Armv8-M profiles and Armv8.1M are supported by CMSIS.
  52. The Armv8-M Architecture is described in the <a href="http://developer.arm.com/products/architecture/m-profile/docs/ddi0553/latest/armv8-m-architecture-reference-manual" target="_blank"><b>Armv8-M Architecture Reference Manual</b></a>.
  53. The Armv8.1-M Architecture further extends Armv8-M with Helium, an Microcontroller Vector Extension (MVE) and further instruction set and debug extensions.
  54. More information about Armv8.1-M Architecture is available under <a href="https://developer.arm.com/technologies/helium" target="_blank"><b>Arm Helium technology</b></a>.
  55. \endif
  56. <hr>
  57. \section tested_tools_sec Tested and Verified Toolchains
  58. The \ref templates_pg supplied by Arm have been tested and verified with the following toolchains:
  59. - Arm: Arm Compiler 5.06 update 6 (not for Cortex-M23/33/35P/55, Armv8-M, Armv8.1-M)
  60. - Arm: Arm Compiler 6.14
  61. - Arm: Arm Compiler 6.6.2 (not for Cortex-M0/23/33/35P/55, Armv8-M, Armv8.1-M)
  62. - GNU: GNU Tools for Arm Embedded 9.2.1 2019q4
  63. - IAR: IAR ANSI C/C++ Compiler for Arm 8.20.1.14183
  64. <hr>
  65. */
  66. /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
  67. /**
  68. \page core_revisionHistory Revision History of CMSIS-Core (Cortex-M)
  69. <table class="cmtable" summary="Revision History">
  70. <tr>
  71. <th>Version</th>
  72. <th>Description</th>
  73. </tr>
  74. <tr>
  75. <td>V5.4.0</td>
  76. <td>
  77. \if ARMv8M
  78. Added: Cortex-M55 cpu support
  79. Enhanced: MVE support for Armv8.1-MML
  80. \endif
  81. Fixed: Device config define checks
  82. Added: L1 Cache functions for Armv7-M and later
  83. </td>
  84. </tr>
  85. <tr>
  86. <td>V5.3.0</td>
  87. <td>
  88. Added: Provisions for compiler-independent C startup code.
  89. </td>
  90. </tr>
  91. <tr>
  92. <td>V5.2.1</td>
  93. <td>
  94. Fixed: Compilation issue in cmsis_armclang_ltm.h introduced in 5.2.0
  95. </td>
  96. </tr>
  97. <tr>
  98. <td>V5.2.0</td>
  99. <td>
  100. Added: Cortex-M35P support.\n
  101. Added: Cortex-M1 support.\n
  102. Added: Armv8.1 architecture support.\n
  103. Added: \ref __RESTRICT and \ref __STATIC_FORCEINLINE compiler control macros.
  104. </td>
  105. </tr>
  106. <tr>
  107. <td>V5.1.2</td>
  108. <td>
  109. Removed using get/set built-ins FPSCR in GCC >= 7.2 due to shortcomings.\n
  110. Added __NO_RETURN to __NVIC_SystemReset() to silence compiler warnings.\n
  111. Added support for Cortex-M1 (beta). \n
  112. Removed usage of register keyword. \n
  113. Added defines for EXC_RETURN, FNC_RETURN and integrity signature values. \n
  114. Enhanced MPUv7 API with defines for memory access attributes.
  115. </td>
  116. </tr>
  117. <tr>
  118. <td>V5.1.1</td>
  119. <td>
  120. Aligned MSPLIM and PSPLIM access functions along supported compilers.
  121. </td>
  122. </tr>
  123. <tr>
  124. <td>V5.1.0</td>
  125. <td>
  126. Added MPU Functions for ARMv8-M for Cortex-M23/M33.\n
  127. Moved __SSAT and __USAT intrinsics to CMSIS-Core.\n
  128. Aligned __REV, __REV16 and __REVSH intrinsics along supported compilers.
  129. </td>
  130. </tr>
  131. <tr>
  132. <td>V5.0.2</td>
  133. <td>
  134. Added macros \ref \__UNALIGNED_UINT16_READ, \ref \__UNALIGNED_UINT16_WRITE.\n
  135. Added macros \ref \__UNALIGNED_UINT32_READ, \ref \__UNALIGNED_UINT32_WRITE.\n
  136. Deprecated macro \ref \__UNALIGNED_UINT32.\n
  137. Changed \ref version_control_gr macros to be core agnostic. \n
  138. Added \ref mpu_functions for Cortex-M0+/M3/M4/M7.
  139. </td>
  140. </tr>
  141. <tr>
  142. <td>V5.0.1</td>
  143. <td>
  144. Added: macro \ref \__PACKED_STRUCT. \n
  145. Added: uVisor support. \n
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>V5.00</td>
  150. <td>
  151. Added: Cortex-M23, Cortex-M33 support.\n
  152. Added: macro __SAU_PRESENT with __SAU_REGION_PRESENT. \n
  153. Replaced: macro __SAU_PRESENT with __SAU_REGION_PRESENT. \n
  154. Reworked: SAU register and functions. \n
  155. Added: macro \ref \__ALIGNED. \n
  156. Updated: function \ref SCB_EnableICache. \n
  157. Added: cmsis_compiler.h with compiler specific CMSIS macros, functions, instructions. \n
  158. Added: macro \ref \__PACKED. \n
  159. Updated: compiler specific include files. \n
  160. Updated: core dependant include files. \n
  161. Removed: deprecated files core_cmfunc.h, core_cminstr.h, core_cmsimd.h.
  162. </td>
  163. </tr>
  164. <tr>
  165. <td>V5.00<br>Beta 6</td>
  166. <td>
  167. Added: SCB_CFSR register bit definitions. \n
  168. Added: function \ref NVIC_GetEnableIRQ. \n
  169. Updated: core instruction macros \ref \__NOP, \ref \__WFI, \ref \__WFE, \ref \__SEV for toolchain GCC.
  170. </td>
  171. </tr>
  172. <tr>
  173. <td>V5.00<br>Beta 5</td>
  174. <td>
  175. Moved: DSP libraries from CMSIS/DSP/Lib to CMSIS/Lib. \n
  176. Added: DSP libraries build projects to CMSIS pack.
  177. </td>
  178. </tr>
  179. <tr>
  180. <td>V5.00<br>Beta 4</td>
  181. <td>
  182. Updated: ARMv8M device files. \n
  183. Corrected: ARMv8MBL interrupts. \n
  184. Reworked: NVIC functions.
  185. </td>
  186. </tr>
  187. <tr>
  188. <td>V5.00<br>Beta 2</td>
  189. <td>
  190. Changed: ARMv8M SAU regions to 8. \n
  191. \if ARMv8M
  192. Changed: moved function \ref TZ_SAU_Setup to file partition_&lt;device&gt;.h. \n
  193. \endif
  194. Changed: license under Apache-2.0. \n
  195. Added: check if macro is defined before use. \n
  196. Corrected: function \ref SCB_DisableDCache. \n
  197. Corrected: macros \ref \_VAL2FLD, \ref \_FLD2VAL. \n
  198. Added: NVIC function virtualization with macros \ref CMSIS_NVIC_VIRTUAL and \ref CMSIS_VECTAB_VIRTUAL.
  199. </td>
  200. </tr>
  201. <tr>
  202. <td>V5.00<br>Beta 1</td>
  203. <td>
  204. Renamed: cmsis_armcc_V6.h to cmsis_armclang.h.\n
  205. Renamed: core\_*.h to lower case.\n
  206. Added: function \ref SCB_GetFPUType to all CMSIS cores.\n
  207. Added: ARMv8-M support.
  208. </td>
  209. </tr>
  210. <tr>
  211. <td>V4.30</td>
  212. <td>
  213. Corrected: DoxyGen function parameter comments.\n
  214. Corrected: IAR toolchain: removed for \ref NVIC_SystemReset the attribute(noreturn).\n
  215. Corrected: GCC toolchain: suppressed irrelevant compiler warnings.\n
  216. Added: Support files for Arm Compiler v6 (cmsis_armcc_v6.h).
  217. </td>
  218. </tr>
  219. <tr>
  220. <td>V4.20</td>
  221. <td>
  222. Corrected: MISRA-C:2004 violations. \n
  223. Corrected: predefined macro for TI CCS Compiler. \n
  224. Corrected: function \ref __SHADD16 in arm_math.h. \n
  225. Updated: cache functions for Cortex-M7. \n
  226. Added: macros \ref _VAL2FLD, \ref _FLD2VAL to core\_*.h. \n
  227. Updated: functions \ref __QASX, \ref __QSAX, \ref __SHASX, \ref __SHSAX. \n
  228. Corrected: potential bug in function \ref __SHADD16.
  229. </td>
  230. </tr>
  231. <tr>
  232. <td>V4.10</td>
  233. <td>
  234. Corrected: MISRA-C:2004 violations. \n
  235. Corrected: intrinsic functions \ref __DSB, \ref __DMB, \ref __ISB. \n
  236. Corrected: register definitions for ITCMCR register. \n
  237. Corrected: register definitions for \ref CONTROL_Type register. \n
  238. Added: functions \ref SCB_GetFPUType, \ref SCB_InvalidateDCache_by_Addr to core_cm7.h. \n
  239. Added: register definitions for \ref APSR_Type, \ref IPSR_Type, \ref xPSR_Type register. \n
  240. Added: \ref __set_BASEPRI_MAX function to core_cmFunc.h. \n
  241. Added: intrinsic functions \ref __RBIT, \ref __CLZ for Cortex-M0/CortexM0+. \n
  242. </td>
  243. </tr>
  244. <tr>
  245. <td>V4.00</td>
  246. <td>
  247. Added: Cortex-M7 support.\n
  248. Added: intrinsic functions for \ref __RRX, \ref __LDRBT, \ref __LDRHT, \ref __LDRT, \ref __STRBT, \ref __STRHT, and \ref __STRT \n
  249. </td>
  250. </tr>
  251. <tr>
  252. <td>V3.40</td>
  253. <td>Corrected: C++ include guard settings.\n</td>
  254. </tr>
  255. <tr>
  256. <td>V3.30</td>
  257. <td>
  258. Added: COSMIC tool chain support.\n
  259. Corrected: GCC __SMLALDX instruction intrinsic for Cortex-M4.\n
  260. Corrected: GCC __SMLALD instruction intrinsic for Cortex-M4.\n
  261. Corrected: GCC/CLang warnings.\n
  262. </td>
  263. </tr>
  264. <tr>
  265. <td>V3.20</td>
  266. <td>
  267. Added: \ref __BKPT instruction intrinsic.\n
  268. Added: \ref __SMMLA instruction intrinsic for Cortex-M4.\n
  269. Corrected: \ref ITM_SendChar.\n
  270. Corrected: \ref __enable_irq, \ref __disable_irq and inline assembly for GCC Compiler.\n
  271. Corrected: \ref NVIC_GetPriority and VTOR_TBLOFF for Cortex-M0/M0+, SC000. \n
  272. Corrected: rework of in-line assembly functions to remove potential compiler warnings.\n
  273. </td>
  274. </tr>
  275. <tr>
  276. <td>V3.01</td>
  277. <td>Added support for Cortex-M0+ processor.\n</td>
  278. </tr>
  279. <tr>
  280. <td>V3.00</td>
  281. <td>
  282. Added support for GNU GCC ARM Embedded Compiler. \n
  283. Added function \ref __ROR.\n
  284. Added \ref regMap_pg for TPIU, DWT. \n
  285. Added support for \ref core_config_sect "SC000 and SC300 processors".\n
  286. Corrected \ref ITM_SendChar function. \n
  287. Corrected the functions \ref __STREXB, \ref __STREXH, \ref __STREXW for the GNU GCC compiler section. \n
  288. Documentation restructured.
  289. </td>
  290. </tr>
  291. <tr>
  292. <td>V2.10</td>
  293. <td>
  294. Updated documentation.\n
  295. Updated CMSIS core include files.\n
  296. Changed CMSIS/Device folder structure.\n
  297. Added support for Cortex-M0, Cortex-M4 w/o FPU to CMSIS DSP library.\n
  298. Reworked CMSIS DSP library examples.
  299. </td>
  300. </tr>
  301. <tr>
  302. <td>V2.00</td>
  303. <td>Added support for Cortex-M4 processor.</td>
  304. </tr>
  305. <tr>
  306. <td>V1.30</td>
  307. <td>
  308. Reworked Startup Concept.\n
  309. Added additional Debug Functionality.\n
  310. Changed folder structure.\n
  311. Added doxygen comments.\n
  312. Added definitions for bit.
  313. </td>
  314. </tr>
  315. <tr>
  316. <td>V1.01</td>
  317. <td>Added support for Cortex-M0 processor.</td>
  318. </tr>
  319. <tr>
  320. <td>V1.01</td>
  321. <td>Added intrinsic functions for \ref __LDREXB, \ref __LDREXH, \ref __LDREXW, \ref __STREXB, \ref __STREXH, \ref __STREXW, and \ref __CLREX</td>
  322. </tr>
  323. <tr>
  324. <td>V1.00</td>
  325. <td>Initial Release for Cortex-M3 processor.</td>
  326. </tr>
  327. </table>
  328. */