Skip to content
README.md 5.86 KiB
Newer Older
# IoT Reference Integration for Arm Corstone-3xx with CMSIS-RTOS2

## Introduction

This reference integration is based on the [Arm Featured Reference Integration](https://github.com/FreeRTOS/iot-reference-arm-corstone3xx),
also known as FRI. FRI demonstrates how to develop cloud connected applications
and update them securely by integrating modular [FreeRTOS kernel](https://www.freertos.org/RTOS.html)
and [libraries](https://www.freertos.org/libraries/categories.html) and
utilizing hardware enforced security based on [Arm TrustZone (Armv8-M)](https://www.arm.com/architecture/learn-the-architecture/m-profile).

The intention of this reference integration, CMSIS-RTOS2 FRI, is to demonstrate
how a CMSIS-RTOS2 compatibility layer can be added on top of the FreeRTOS kernel
in FRI. This is done by integrating [CMSIS-FreeRTOS](https://arm-software.github.io/CMSIS-FreeRTOS/main/index.html)
([FreeRTOS kernel](https://www.freertos.org/RTOS.html) with a
[CMSIS-RTOSv2](https://arm-software.github.io/CMSIS_5/RTOS2/html/index.html)
compatibility layer) into FRI. CMSIS-RTOS2 is an abstraction layer for RTOSes,
and allows the underlying RTOS to be changed with minimal changes to the
application code.
The CMSIS-RTOS2 FRI project provides a CMSIS-RTOS2 Blinky example to demonstrate
an application running on this software stack.

## Architecture

The following diagram illustrates the architecture of the CMSIS-RTOS2 FRI project.

![diagram](./docs/images/diagram.png "Diagram")

The Secure services provided by Trusted Firmware-M can be seen on the
right-hand side of the image. These include Crypto, Attestation and Secure
Storage. It also provides secure boot via a bootloader (MCUboot). The Secure
Partition Manager (SPM) in Trusted Firmware-M provides the runtime for Secure
services.

On the left-hand side, the Non-secure software
stack is shown. This includes the FreeRTOS kernel with a CMSIS-RTOS2
compatibility layer. These two layers are packaged together as one component
called CMSIS-FreeRTOS. The CMSIS-RTOS2 Blinky example, which uses CMSIS-RTOS2
APIs, can be seen above these two layers. FreeRTOS tasks can utilise Trusted
Firmware-M secure services via the PSA functional APIs.
The components indicated by the orange region are copied from FRI.
CMSIS-RTOS2 FRI has a much more minimal set of components compared to FRI. It
omits many components which are present in FRI, such as networking and machine
learning components, as they are not required for the CMSIS-RTOS2 Blinky
example.

## Supported Targets

Arm Corstone-3xx targets include an example subsystem based on the Cortex-M
CPU and Ethos NPU, alongside a range of other components in a scalable and
flexible reference package. This enables designers to build secure,
AI-capable SoCs faster.

Arm's [Fixed Virtual Platform](https://www.arm.com/products/development-tools/simulation/fixed-virtual-platforms)
is used to run the application artefacts.
The [currently released version <11.24.22>](https://developer.arm.com/downloads/-/arm-ecosystem-fvps)
of FVP is supported by the CMSIS-RTOS2 FRI project.

* [Corstone-315](https://developer.arm.com/Processors/Corstone-315)
  * Arm Cortex-M85 CPU, Ethos-U65 NPU and Mali-C55 ISP
* [Corstone-310](https://developer.arm.com/Processors/Corstone-310)
  * Arm Cortex-M85 CPU and Ethos-U55 NPU
* [Corstone-300](https://developer.arm.com/Processors/Corstone-300)
  * Arm Cortex-M55 CPU and Ethos-U55 NPU

## Supported Toolchains

* Arm GNU Toolchain (arm-none-eabi-gcc)
* Arm Compiler for Embedded (armclang)

> Note:
  The build script `./tools/scripts/build.sh` assumes
  `Arm GNU Toolchain (arm-none-eabi-gcc)` by default, append the extra option
  `--toolchain ARMCLANG` to build using Arm Compiler for Embedded Toolchain.

## Project organisation

The [document](docs/project_organisation.md) describes the organistation of the project in detail.

## Examples

This reference integration contains the following example:

* [CMSIS-RTOS2 Blinky example](docs/applications/cmsis-rtos2-blinky.md)
    * Demonstrates CMSIS-FreeRTOS and TF-M integration

For guidance on adding further examples from the FRI project, please check [this
document](docs/applications/add_example.md).

## Software Components

### Fetching

Generally all the components used within the CMSIS-RTOS2 FRI project are fetched using `git submodules` from their official repositories into `components/` directory. Exact location and the version are recorded in the [manifest.yml](manifest.yml).

### Trusted Firmware-M

Trusted Firmware-M (TF-M) implements the Secure Processing Environment (SPE)
for Armv8-M, Armv8.1-M architectures (e.g. the Cortex-M33, Cortex-M23,
Cortex-M55, Cortex-M85 processors) and dual-core platforms. It is the platform
security architecture reference implementation aligning with PSA Certified
guidelines, enabling chips, Real Time Operating Systems and devices to become
PSA Certified. Follow the [link](https://tf-m-user-guide.trustedfirmware.org/introduction/readme.html)
for more information on Trusted Firmware-M. To have a better overview of how Trusted Firmware-M is integrated with the CMSIS-RTOS2 FRI project, you're kindly asked to check [Trusted Firmware-M component document](docs/components/trusted_firmware-m/trusted_firmware-m.md)

## Contributions

We are not currently accepting contributions.

## Security issue notifications

If you find any security vulnerabilities, please do not report it in the GitLab
issue tracker. Instead, send an email to the security team at psirt@arm.com
stating that you may have found a security vulnerability in the CMSIS-RTOS2 FRI.

More details can be found at [Arm Developer website](https://developer.arm.com/support/arm-security-updates/report-security-vulnerabilities).

## License

Source code located in the *applications* directory is
available under the terms of the MIT License. See the [LICENSE](./LICENSE) file
for more details.

Other files in the repository are available under the terms specified in each
source file.