{"id":19775038,"url":"https://github.com/freertos/iot-reference-arm-corstone3xx","last_synced_at":"2025-04-30T19:30:26.657Z","repository":{"id":184586577,"uuid":"670246463","full_name":"FreeRTOS/iot-reference-arm-corstone3xx","owner":"FreeRTOS","description":"Featured FreeRTOS IoT Integration targeting an Arm Corstone-3xx platform based on Arm Cortex-M MCU.","archived":false,"fork":false,"pushed_at":"2025-04-03T11:54:03.000Z","size":2221,"stargazers_count":18,"open_issues_count":0,"forks_count":19,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-03T12:35:59.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FreeRTOS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-24T16:00:13.000Z","updated_at":"2025-04-03T11:54:08.000Z","dependencies_parsed_at":"2023-07-29T06:38:54.666Z","dependency_job_id":"a2b699e5-c5a2-406b-a293-0d3ef77b5343","html_url":"https://github.com/FreeRTOS/iot-reference-arm-corstone3xx","commit_stats":null,"previous_names":["freertos/iot-reference-arm-corstone3xx"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeRTOS%2Fiot-reference-arm-corstone3xx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeRTOS%2Fiot-reference-arm-corstone3xx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeRTOS%2Fiot-reference-arm-corstone3xx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeRTOS%2Fiot-reference-arm-corstone3xx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FreeRTOS","download_url":"https://codeload.github.com/FreeRTOS/iot-reference-arm-corstone3xx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769157,"owners_count":21640847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T05:14:36.613Z","updated_at":"2025-04-30T19:30:26.651Z","avatar_url":"https://github.com/FreeRTOS.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoT Reference Integration for Arm Corstone-3xx\n\n## Introduction\n\nThis reference integration demonstrates how to develop cloud connected\napplications and update them securely by integrating modular\n[FreeRTOS kernel](https://www.freertos.org/RTOS.html) and [libraries](https://www.freertos.org/libraries/categories.html)\nand utilizing hardware enforced security based on [Arm TrustZone (Armv8-M)](https://www.arm.com/architecture/learn-the-architecture/m-profile).\n\nTo utilize the hardware enforced security, this integration uses PSA Certified\nreference implementation [Trusted Firmware-M](https://www.trustedfirmware.org/projects/tf-m/).\nTrusted Firmware-M provides various Secure services such as Secure boot, Crypto, Secure Storage,\nAttestation and Update services meeting [PSA Certified requirements](https://www.psacertified.org/blog/psa-certified-10-security-goals-explained/).\n\nDevelopers and partners can use this integration as a starting point to build\nFreeRTOS kernel and libraries based software stack on top of Arm Cortex-M based\nplatforms. All the components are put together in a modular manner to make\nporting of this integration across platforms easy.\n\n## ML model update\n\nFor details about the ML model update, see [the feature-specific readme file](docs/applications/ml_model_update/ml-model-update.md)\n\n## Supported Targets\n\nArm Corstone-3xx targets includes an example subsystem based on the Cortex-M\nCPU and Ethos NPU, alongside a range of other components in a scalable and\nflexible reference package. This enables designers to build secure,\nAI-capable SoCs faster.\n\nArm's [Fixed Virtual Platform](https://www.arm.com/products/development-tools/simulation/fixed-virtual-platforms)\nis used to run the application artefacts.\nThe [currently released version \u003c11.24.22\u003e](https://developer.arm.com/downloads/-/arm-ecosystem-fvps)\nof FVP is supported by the FRI.\n\n* [Corstone-320](https://developer.arm.com/Processors/Corstone-320)\n  * Arm Cortex-M85 CPU, Ethos-U85 NPU and Mali-C55 ISP\n* [Corstone-315](https://developer.arm.com/Processors/Corstone-315)\n  * Arm Cortex-M85 CPU, Ethos-U65 NPU and Mali-C55 ISP\n* [Corstone-310](https://developer.arm.com/Processors/Corstone-310)\n  * Arm Cortex-M85 CPU and Ethos-U55 NPU\n* [Corstone-300](https://developer.arm.com/Processors/Corstone-300)\n  * Arm Cortex-M55 CPU and Ethos-U55 NPU\n\n## Supported Toolchains\n\n* Arm Compiler for Embedded (armclang)\n* Arm GNU Toolchain (arm-none-eabi-gcc)\n\n\u003e Note:\n  The build script `./tools/scripts/build.sh` assumes\n  `Arm GNU Toolchain (arm-none-eabi-gcc)` by default, append the extra option\n  `--toolchain ARMCLANG` to build using Arm Compiler for Embedded Toolchain.\n\n## Project organisation\n\nThe [document](docs/project_organisation.md) describes the organistation of the project in detail.\n\n## Examples\n\nThis reference integration contains following two examples:\n\n* [Blinky example](docs/applications/blinky.md)\n    * Demonstrates FreeRTOS kernel and TF-M integration\n* [Keyword Detection](docs/applications/keyword_detection.md)\n    * Demonstrates detecting keywords from an audio source using Machine Learning.\n* [Speech Recognition](docs/applications/speech_recognition.md)\n    * Demonstrates detecting sentences from an audio source using Machine Learning.\n* [Object Detection](docs/applications/object_detection.md)\n    * Demonstrates detection of faces from image source using Machine Learning.\n\nThe Keyword-Detection and Speech-Recognition applications demonstrate [secure connectivity](#secure-tls-connection)\nto AWS IoT core using [Mbed TLS](#mbed-tls), [PKCS#11 PSA Shim](#pkcs11-psa-shim) and\n[coreMQTT-agent](https://docs.aws.amazon.com/freertos/latest/userguide/coremqtt-agent.html) libraries.\nIn addition, [secure OTA](#secure-ota-updates) using [OTA agent](https://freertos.org/ota/index.html)\nand [AWS OTA PAL PSA implementation](#aws-ota-pal-psa-implementation) can be performed to update the binary running on the device.\n\n### Secure TLS Connection\n\nCorstone platform communicates with the AWS IoT Core over a secure TLS\nconnection. Mbed TLS running on the NSPE is used to establish the TLS\nconnection. For crypto operations, Mbed TLS supports PSA Crypto APIs provided by either\nthe Mbed TLS itself or the Trusted Firmware-M and the default is\nPSA Crypto API from Trusted Firmware-M. For more information about the PSA Crypto APIs\nimplementation, please refer to [Mbed TLS document](docs/components/security/mbedtls/mbedtls.md#psa-crypto-apis-implementation).\n\n[PKCS#11](https://www.freertos.org/pkcs11/index.html) APIs to perform TLS\nclient authentication and import TLS client certificate and private key into\nthe device. PKCS#11 has been integrated with TF-M using a thin shim. In the\nintegration, the PKCS#11 APIs invoke the appropriate PSA Secure Storage API or\nCryptographic API via the shim. This ensures the keys and certificates are\nprotected and the cryptographic operations are performed securely within the\nSPE of TF-M and is isolated from the kernel, libraries and applications in the\nNon-secure Processing Environment. Keys and certificates are securely stored.\nThis is enabled by TF-M’s Internal Trusted Storage (ITS) and Protected Storage\n(PS) services. Signing during TLS client authentication is performed by TF-M’s\nCrypto service.\n\n### Secure OTA Updates\n\nFreeRTOS OTA Agent provides an OTA PAL layer for platforms to integrate and\nenable OTA updates. The demo integrates and OTA PAL implementation that makes\nuse of the PSA Certified Firmware Update API implemented in TF-M. This allows\nCorstone device to receive new images from AWS IoT Core, authenticate using\nTF-M before deploying the image as the active image. The secure (TF-M) and the\nnon-secure (FreeRTOS kernel and the application) images can be updated\nseparately.\n\nEvery time the device boots, MCUBoot (bootloader) verifies that the image\nsignature is valid before booting the image. Since the secure (TF-M) and the\nnon-secure (FreeRTOS kernel and the application) images are singed separately,\nMCUBoot verifies that both image signatures are valid before booting. If either\nof the verification fails, then MCUBoot stops the booting process.\n\n## Software Components\n\n### Fetching\n\nGenerally all the components used within the 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).\n\n### Trusted Firmware M\n\nTrusted Firmware-M (TF-M) implements the Secure Processing Environment (SPE)\nfor Armv8-M, Armv8.1-M architectures (e.g. the Cortex-M33, Cortex-M23,\nCortex-M55, Cortex-M85 processors) and dual-core platforms. It is the platform\nsecurity architecture reference implementation aligning with PSA Certified\nguidelines, enabling chips, Real Time Operating Systems and devices to become\nPSA Certified. Follow the [link](https://tf-m-user-guide.trustedfirmware.org/introduction/readme.html)\nfor more information on Trusted Firmware M. To have a better overview of how Trusted Firmware M is integrated with the FRI project, you're kindly asked to check [Trusted Firmware M component document](docs/components/security/trusted_firmware-m/trusted_firmware-m.md)\n\n### Mbed TLS\n\nProject implements cryptographic primitives, X.509 certificate manipulation and\nthe SSL/TLS and DTLS protocols. The project provides reference implementation\nof [PSA Cryptography API Specification](https://developer.arm.com/documentation/ihi0086/b)\nby supporting the cryptographic operations via. PSA Crypto APIs. Follow the\n[link](https://www.trustedfirmware.org/projects/mbed-tls/) for more information\non Mbed TLS. To have a better overview of how Mbed TLS is integrated with the FRI project, you're kindly asked to check [Mbed TLS component document](docs/components/security/mbedtls/mbedtls.md)\n\n### PKCS11 PSA Shim\n\n[PKCS#11 PSA shim layer](https://github.com/Linaro/freertos-pkcs11-psa.git)\nprovides a reference implementation of PKCS#11 API based on\n[Platform Security Architecture](https://www.arm.com/architecture/psa-certified)\nAPI.\n\nThis shim layer maps the PKCS#11 APIs to PSA Cryptography and Storage APIs\nV1.0. It follows the same PSA Cryptography API version supported in\n[Mbed TLS 3.4.0](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.4.0).\nCertificate objects and key objects are protected by PSA secure service.\nBy default, the device private/public keys are persistent while the code verify\nkey is volatile.\n\n### AWS OTA PAL PSA implementation\n\nImplementation of [AWS OTA PAL](https://github.com/Linaro/freertos-ota-pal-psa.git)\nbased on [Platform Security Architecture](https://www.arm.com/architecture/psa-certified)\nAPI.\n\nThis implementation maps the AWS OTA PAL APIs to the PSA Firmware Update and\nPSA Cryptography APIs. The writing, verification and activation of the update\nimage are protected by the PSA secure services.\n\n### Mali-C55 Versatile Image Signal Processor for Computer Vision and Smart Display Systems\n\nImplementation of [Arm® Mali™-C55 bare-metal driver](https://gitlab.arm.com/iot/m-class/drivers/isp_mali-c55),\nthat demonstrates the usage of the Mali-C55 ISP with the Corstone M85 processor.\n\n## Tools\n\n### Python script for automating AWS interactions\n\nA python script that automates creation, deletion, and listing of AWS Things, Policies, Jobs, Roles, and Buckets is documented [here](docs/components/aws_iot/aws_tool.md).\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for more information.\n\n## License\n\nSource code located in the *applications* directory is\navailable under the terms of the MIT License. See the [LICENSE](./LICENSE) file\nfor more details.\n\nOther files in the repository are available under the terms specified in each\nsource file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreertos%2Fiot-reference-arm-corstone3xx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreertos%2Fiot-reference-arm-corstone3xx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreertos%2Fiot-reference-arm-corstone3xx/lists"}