Skip to content

Commit

Permalink
CMSIS Documentation: Updated CMSIS-Core(M) documentation and device t…
Browse files Browse the repository at this point in the history
…emplate files.
  • Loading branch information
GuentherMartin authored and JonatanAntoni committed Feb 10, 2021
1 parent a391d77 commit 3922e94
Show file tree
Hide file tree
Showing 21 changed files with 2,305 additions and 555 deletions.
2 changes: 1 addition & 1 deletion CMSIS/DoxyGen/Core/src/Overview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The \ref templates_pg supplied by Arm have been tested and verified with the fol
- Arm: Arm Compiler 5.06 update 6 (not for Cortex-M23/33/35P/55, Armv8-M, Armv8.1-M)
- Arm: Arm Compiler 6.14
- Arm: Arm Compiler 6.6.2 (not for Cortex-M0/23/33/35P/55, Armv8-M, Armv8.1-M)
- GNU: GNU Tools for Arm Embedded 9.2.1 2019q4
- GNU: GNU Arm Embedded Toolchain 10-2020-q4-major (10.2.1 20201103)
- IAR: IAR ANSI C/C++ Compiler for Arm 8.20.1.14183
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
Expand Down
87 changes: 58 additions & 29 deletions CMSIS/DoxyGen/Core/src/Template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ The detailed file structure of the CMSIS-Core device templates is shown in the f
The CMSIS-Core processor files provided by Arm are in the directory .\\CMSIS\\Core\\Include. These header files define all processor specific attributes do not need any modifications.
The <b>core_&lt;cpu&gt;.h</b> defines the core peripherals and provides helper functions that access the core registers. One file is available for each supported Cortex-M processor:

Header File | Processor
:----------------|:------------------------------
core_cm0.h | for the Cortex-M0 processor
core_cm0plus.h | for the Cortex-M0+ processor
core_cm3.h | for the Cortex-M3 processor
core_cm4.h | for the Cortex-M4 processor
core_cm7.h | for the Cortex-M7 processor
Header File | Processor
:----------- |:---------
core_cm0.h | for the Cortex-M0 processor
core_cm0plus.h | for the Cortex-M0+ processor
core_cm3.h | for the Cortex-M3 processor
core_cm4.h | for the Cortex-M4 processor
core_cm7.h | for the Cortex-M7 processor
\if ARMv8M
core_cm23.h | for the Cortex-M23 processor
core_cm33.h | for the Cortex-M33 processor
core_cm35p.h | for the Cortex-M35P processor
core_cm55.h | for the Cortex-M55 processor
core_cm23.h | for the Cortex-M23 processor
core_cm33.h | for the Cortex-M33 processor
core_cm35p.h | for the Cortex-M35P processor
core_cm55.h | for the Cortex-M55 processor
\endif
\if ARMSC
core_sc000.h | for the SecurCore SC000 processor
core_sc300.h | for the SecurCore SC300 processor
core_sc000.h | for the SecurCore SC000 processor
core_sc300.h | for the SecurCore SC300 processor
\endif
\if ARMv8M
core_armv8mbl.h | for the Armv8-M Baseline processor
core_armv8mml.h | for the Armv8-M Mainline processor
core_armv81mml.h | for the Armv8.1-M Mainline processor
core_armv8mbl.h | for the Armv8-M Baseline processor
core_armv8mml.h | for the Armv8-M Mainline processor
core_armv81mml.h | for the Armv8.1-M Mainline processor
\endif
\section device_examples Device Examples

The CMSIS Software Pack defines several devices that are based on the various processors. The device related CMSIS-Core files are in the directory .\\Device\\ARM
and include CMSIS-Core processor file explained before. The following sample devices are defined in the CMSIS-Pack description file <b>ARM.CMSIS.pdsc</b>:

Family | Device | Description
:------------------|:------------------------|:---------------------------------
Family | Device | Description
:------ |:------ |:-----------
ARM Cortex-M0 | ARMCM0 | Cortex-M0 based device
ARM Cortex-M0 plus | ARMCM0P | Cortex-M0+ based device
ARM Cortex-M3 | ARMCM3 | Cortex-M3 based device
Expand Down Expand Up @@ -101,17 +101,46 @@ Silicon vendors add to these template files the following information:
<th>Description</th>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device.s</td>
<td>Startup file template for Arm C/C++ Compiler.</td>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device_ac5_noSct.s</td>
<td>Startup file template for Arm Compiler V5. No linker description file necessary.<br>
<b>Deprecated</b></td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\GCC\\startup_Device.s</td>
<td>Startup file template for GNU GCC Arm Embedded Compiler.</td>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device_ac5.s</td>
<td>Startup file template for Arm Compiler V5. Use of linker description file is <b>necessary</b>.<br>
<b>Deprecated</b></td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\startup_Device_ac6.S</td>
<td>Preprocessed startup file template for Arm Compiler V6. Use of linker description file is <b>necessary</b>.<br>
<b>Deprecated</b></td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\Device_ac5.sct</td>
<td>Linker description file for Arm Compiler V5.<br>
<b>Deprecated</b></td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\ARM\\Device_ac6.sct</td>
<td>Linker description file for Arm Compiler V6.</td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\GCC\\startup_Device.S</td>
<td>Preprocessed startup file template for GNU GCC Arm Embedded Compiler. Use of linker description file is <b>necessary</b>.<.<br>
<b>Deprecated</b></td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\GCC\\gcc_arm.ld</td>
<td>Linker description file for GNU GCC Arm Embedded Compiler.</td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\IAR\\startup_Device.s</td>
<td>Startup file template for IAR C/C++ Compiler.</td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\startup_Device.c</td>
<td>Generic startup_Device.c file for device startup implemented in C. Use of linker description file is necessary.</td>
</tr>
<tr>
<td>.\\Device\\\_Template_Vendor\\Vendor\\Device\\Source\\system_Device.c</td>
<td>Generic system_Device.c file for system configuration (i.e. processor clock and memory bus system).</td>
Expand Down Expand Up @@ -257,7 +286,7 @@ The C startup file relys on certain compiler specific preprocessor defines speci
\verbinclude "Source\startup_Device.c"
\section startup_c_sec_v8 startup_Device.c Template File (Armv8-M/v8.1-M)

The C-startup file for an Armv8-M/v8.1-M processor is similar to the one for an Armv7-M processor
The C-startup file for an Armv8-M/v8.1-M processor is similar to the one for an Armv7-M processor
except that it offers the possibility of stack sealing for the Main Stack Pointer (MSP).
The following preprocessor defines and CMSIS functions are used:
- \ref __STACK_SEAL
Expand Down Expand Up @@ -340,12 +369,12 @@ EINT0_IRQHandler

\endcode

\section startup_s_sec startup_Device.s Template File
\section startup_s_sec startup_Device.S Template File

An Arm Compiler \ref startup_s_sec for an Armv7-M processor like Cortex-M3 is shown below.
An Arm Compiler V6 assembler \ref startup_s_sec for an Armv8-M processor like Cortex-M33 is shown below.
The files for other compiler vendors differ slightly in the syntax, but not in the overall structure.

\verbinclude "Source\ARM\startup_Device.s"
\verbinclude "Source\ARM\startup_Device_ac6.S"
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
Expand Down Expand Up @@ -877,7 +906,7 @@ If these <i>\#defines</i> are missing default values are used.
<td>0 .. 1</td>
<td>0</td>
<td>
The combination of the defines \ref __FPU_PRESENT and \ref __FPU_DP determine
The combination of the defines \ref __FPU_PRESENT and \ref __FPU_DP determine
whether the FPU is with single or double precision.
</td>
</tr>
Expand Down Expand Up @@ -1531,7 +1560,7 @@ functionality provided by CMSIS-Core(M) dependent on the device capabilities.
</tr>
</table>
*/
#define __FPU_DP
#define __FPU_DP

#define __DSP_PRESENT /*!< \brief DSP extension present or not */
#define __SAUREGION_PRESENT /*!< \brief SAU regions present or not */
Expand All @@ -1540,4 +1569,4 @@ functionality provided by CMSIS-Core(M) dependent on the device capabilities.
#define __ICACHE_PRESENT /*!< \brief Instruction Cache present or not */
#define __DCACHE_PRESENT /*!< \brief Data Cache present or not */
#define __DTCM_PRESENT /*!< \brief Data Tightly Coupled Memory is present or not */
/** @} */
/** @} */
39 changes: 37 additions & 2 deletions CMSIS/DoxyGen/Core/src/Using.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,50 @@ The table below lists the folder and device names of the Arm processors.
<td>Cortex-M4</td>
<td>Contains \b Include and \b Source template files configured for the Cortex-M4 processor.
The device name is ARMCM4 and the name of the \ref device_h_pg is <ARMCM4.h>.
</td>
</td>
</tr>
<tr>
<td>".\Device\ARM\ARMCM7"</td>
<td>Cortex-M7</td>
<td>Contains \b Include and \b Source template files configured for the Cortex-M7 processor.
The device name is ARMCM7 and the name of the \ref device_h_pg is <ARMCM7.h>.
</td>
</td>
</tr>
\if ARMv8M
</tr>
<tr>
<td>".\Device\ARM\ARMCM23"</td>
<td>Cortex-M23</td>
<td>Contains \b Include and \b Source template files configured for the Cortex-M23 processor.
The device name is ARMCM23 and the name of the \ref device_h_pg is <ARMCM23.h>.
This device is available with and without TrustZone.
</td>
</tr>
<tr>
<td>".\Device\ARM\ARMCM33"</td>
<td>Cortex-M33</td>
<td>Contains \b Include and \b Source template files configured for the Cortex-M33 processor.
The device name is ARMCM33 and the name of the \ref device_h_pg is <ARMCM33.h>.
This device is available with and without TrustZone.
</td>
</tr>
<tr>
<td>".\Device\ARM\ARMCM35P"</td>
<td>Cortex-M35P</td>
<td>Contains \b Include and \b Source template files configured for the Cortex-M35P processor.
The device name is ARMCM35P and the name of the \ref device_h_pg is <ARMCM35P.h>.
This device is available with and without TrustZone.
</td>
</tr>
<tr>
<td>".\Device\ARM\ARMCM55"</td>
<td>Cortex-M55</td>
<td>Contains \b Include and \b Source template files configured for the Cortex-M55 processor.
The device name is ARMCM55 and the name of the \ref device_h_pg is <ARMCM55.h>.
This device is only available with TrustZone.
</td>
</tr>
\endif
\if ARMSC
<tr>
<td>".\Device\ARM\ARMSC000"</td>
Expand Down
Binary file modified CMSIS/DoxyGen/Core/src/images/ARMv8-M_images.pptx
Binary file not shown.
Binary file modified CMSIS/DoxyGen/Core/src/images/CMSIS_CORE_Files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified CMSIS/DoxyGen/Core/src/images/CMSIS_CORE_Files_USER.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified CMSIS/DoxyGen/Core/src/images/CMSIS_TZ_files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified CMSIS/DoxyGen/Core/src/images/CMSIS_V3_V5.pptx
Binary file not shown.
18 changes: 13 additions & 5 deletions Device/_Template_Vendor/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*****************************************************************************
* @file ReadMe.txt
* @brief Explanation how to use the Device folder and template files
* @version V3.0.3
* @date 10. January 2018
* @version V3.0.4
* @date 20. January 2021
*****************************************************************************/

Following directory structure and template files are given:
Expand All @@ -12,18 +12,26 @@ Following directory structure and template files are given:
+-- <Device>
|
+-- Include
| +-- Template only Armv8-M/v8.1-M TrustZone
| | +- partition_<Device>.h Secure/Non-Secure configuration
| +- <Device>.h header file
| +- system_Device.h system include file
| +- system_<Device>.h system include file
+-- Source
|
+- startup_<Device>.c C startup file file
+- system_<Device>.c system source file
|
+-- ARM Arm RVCT toolchain
| +- startup_<Device>.s ASM startup file for ARMCC
+-- ARM Arm ARMCLang toolchain
| +- startup_<Device>.s ASM startup file for ARMCC (deprecated)
| +- startup_<Device>.S ASM startup file for ARMCLang (deprecated)
| +- <Device>.sct Scatter file
|
+-- GCC Arm GNU toolchain
| +- startup_<Device>.S ASM startup file (deprecated)
| +- <Device>.ld Linker description file
|
+-- IAR IAR toolchain
+- startup_<Device>.s ASM startup file


Copy the complete folder including files and replace:
Expand Down
Loading

0 comments on commit 3922e94

Please sign in to comment.