1 # CMSIS-FreeRTOS Examples
3 CMSIS-FreeRTOS provides csolution based examples that can be built for multiple Cortex-M targets.
5 The solution file [Examples.csolution.yml](Examples.csolution.yml) defines projects and supported targets.
10 | Project-Name | Purpose | Description |
11 |:-----------------------------------------------------------------|:-------------------------------------------------|:----------------------------------------------|
12 | [Hello](App/Hello/Hello.cproject.yml) | Simple Hello World application | [README.md](App/Hello/README.md) |
13 | [TZ_Secure](App/TrustZone/Secure/TZ_Secure.cproject.yml) | TrustZone application running on Secure side | [README.md](App/TrustZone/Secure/README.md) |
14 | [TZ_NonSecure](App/TrustZone/NonSecure/TZ_NonSecure.cproject.yml)| TrustZone application running on Non-secure side | [README.md](App/TrustZone/NonSecure/README.md)|
18 The below table lists supported target processors together with the corresponding context target-types
19 and model executable that shall be used for running the application image.
21 | Target processor | Target-Type | Model Executable |
22 |:-----------------|:------------|:-----------------------|
23 | Cortex-M0 | CM0 | FVP_MPS2_Cortex-M0 |
24 | Cortex-M0+ | CM0plus | FVP_MPS2_Cortex-M0plus |
25 | Cortex-M3 | CM3 | FVP_MPS2_Cortex-M3 |
26 | Cortex-M4 | CM4 | FVP_MPS2_Cortex-M4 |
27 | Cortex-M7 | CM7 | FVP_MPS2_Cortex-M7 |
28 | Cortex-M23 | CM23 | FVP_MPS2_Cortex-M23 |
29 | Cortex-M23 | CM23_noTZ | FVP_MPS2_Cortex-M23 |
30 | Cortex-M33 | CM33 | FVP_MPS2_Cortex-M33 |
31 | Cortex-M33 | CM33_noTZ | FVP_MPS2_Cortex-M33 |
32 | Cortex-M55 | CM55 | FVP_Corstone_SSE-300 |
33 | Cortex-M55 | CM55_noTZ | FVP_Corstone_SSE-300 |
34 | Cortex-M85 | CM85 | FVP_Corstone_SSE-310 |
35 | Cortex-M85 | CM85_noTZ | FVP_Corstone_SSE-310 |
39 The Examples solution supports only "Debug" Build-Type which is optimized for debugging. It disables
40 compiler optimization and retains all debug related information. By default, Arm Compiler 6 is used to
43 ## Build in VS Code using Arm Keil Studio Pack extensions
45 > - See [Arm Keil Studio Visual Studio Code Extensions User Guide](https://developer.arm.com/documentation/108029/0000/?lang=en)
46 > for more information about using the Keil Studio extensions.
47 > - Search for [Arm Keil Studio Pack](https://marketplace.visualstudio.com/items?itemName=Arm.keil-studio-pack)
48 > in the Visual Studio Marketplace to download the extensions.
50 To build a project using Keil Studio extensions open CMSIS view, open "Manage CMSIS Solution" view and select
51 "Active Context" and "Active Projects". Build Type is automatically selected since there is only
54 Once the context and projects are selected one can build them by selecting "Build" in CMSIS view.
56 ## Build via command line
58 > - See [CMSIS-Toolbox documentation](https://open-cmsis-pack.github.io/cmsis-toolbox/)
59 > to learn more about CMSIS Solution project build and management tools.
61 To build the project via command line one can use the following command syntax:
63 `cbuild Examples.csolution.yml --context <project-name>.<build-type>+<target-type>`
65 To list the available context execute the following command:
68 cbuild list contexts Examples.csolution.yml
71 ### Hello World example
73 - Build example project for Cortex-M3
75 cbuild Examples.csolution.yml --context Hello.Debug+CM3 --update-rte
78 ### TrustZone example (for ArmV8-M with TrustZone)
80 TrustZone example must always be build in two steps:
82 1. Build secure side project for Cortex-M55
84 cbuild Examples.csolution.yml --context TZ_Secure.Debug+CM55 --update-rte
86 2. Build non-secure side project for Cortex-M55
88 cbuild Examples.csolution.yml --context TZ_NonSecure.Debug+CM55 --update-rte
91 ## Run Example Project on Virtual Hardware Target model
95 `<model-executable> -f ./Target/<target_type>/fvp_config.txt ./out/<project>/<project>.axf`
99 - Run Hello World project executable on Cortex-M3 model
101 FVP_MPS2_Cortex-M3 -f ./Target/CM3/fvp_config.txt ./out/Hello/Hello.axf
104 - Run TrustZone executable on model for Cortex-M55
106 FVP_Corstone_SSE-300 -f ./Target/CM55/fvp_config.txt -a ./out/TZ_NonSecure/TZ_NonSecure.axf -a ./out/TZ_Secure/TZ_Secure.axf