This pack contains two example projects:
The first example shows how to configure a simple application using FreeRTOS with CMSIS-RTOS2, whereas the second example shows how to use the FreeRTOS with CMSIS-RTOS2 in an application that utilizes TrustZone secure/non-secure execution.
Provided examples use the CMSIS Solution Project File Format and can be build for multiple Cortex-M targets
The Examples solution defines projects and build information for each project.
The Examples solution supports only "Debug" Build-Type which is optimized for debugging. It disables compiler optimization and retains all debug related information. By default, Arm Compiler 6 is used to build the projects.
Each example can be built for multiple target processors. The below table lists supported target processors together with the corresponding context target-types and model executable that shall be used for running the application image.
Target processor | Target-Type | Model Executable |
---|---|---|
Cortex-M0 | CM0 | FVP_MPS2_Cortex-M0 |
Cortex-M0+ | CM0plus | FVP_MPS2_Cortex-M0plus |
Cortex-M3 | CM3 | FVP_MPS2_Cortex-M3 |
Cortex-M4 | CM4 | FVP_MPS2_Cortex-M4 |
Cortex-M7 | CM7 | FVP_MPS2_Cortex-M7 |
Cortex-M23 | CM23 | FVP_MPS2_Cortex-M23 |
Cortex-M23 | CM23_noTZ | FVP_MPS2_Cortex-M23 |
Cortex-M33 | CM33 | FVP_MPS2_Cortex-M33 |
Cortex-M33 | CM33_noTZ | FVP_MPS2_Cortex-M33 |
Cortex-M55 | CM55 | FVP_Corstone_SSE-300 |
Cortex-M55 | CM55_noTZ | FVP_Corstone_SSE-300 |
Cortex-M85 | CM85 | FVP_Corstone_SSE-310 |
Cortex-M85 | CM85_noTZ | FVP_Corstone_SSE-310 |
To build a project using Keil Studio extensions open CMSIS view, open "Manage CMSIS Solution" view and select "Active Context" and "Active Projects". Build Type is automatically selected since there is only one option.
Once the context and projects are selected one can build them by selecting "Build" in CMSIS view.
To build the project via command line one can use the following command syntax:
To list the available contexts execute the following command:
Arm Virtual Hardware Target simulation models are used to execute the example application images.
To execute application image (axf or elf) on an simulation model use the following command syntax:
The Hello World application can be used as a starting point when developing new application. Using it, one can verify initial system setup and configuration.
The application is simple and shows how to use CMSIS-RTOS2:
Build via command line
The following cbuild command may be used to build Hello World example project for Cortex-M3:
Execute via command line
To execute simulation model and run Hello World project executable for Cortex-M3 use the following command:
When executed, application outputs the following to the serial terminal:
(Press Ctrl + C to stop the simulation model.)
The TrustZone application explains how to setup projects for booting and execution from TrustZone secure to non-secure domain and vice versa.
The application shows:
Build via command line
TrustZone example must always be build in two steps:
Execute via command line
To execute simulation model and run TrustZone project executable for Cortex-M55 use the following command:
When executed, application outputs the following to the serial terminal:
(Press Ctrl + C to stop the simulation model.)