This project demonstrates how to integrate modular FreeRTOS kernel and libraries with hardware enforced security to build more secure updatable cloud connected applications. The project is pre-configured to run on the STM32U585 IoT Discovery Kit which includes an kit which includes an STM32U5 microcontroller.
The Projects directory consists of a Non-TrustZone and a Trusted-Firmware-M-Enabled project which both demonstrate connecting to AWS IoT Core and utilizing many of the services available via the MQTT protocol.
Refer to the Getting Started Guide for step by step instructions on setting up your development environment.
This includes demonstration tasks for the following AWS services:
The demo projects both connect to AWS IoT core via the included Wi-Fi module and use the CoreMQTT-Agent library to share a single MQTT connection among multiple tasks. These tasks publish environemnt and motion sensor data from a subset of the sensor available on the development board, and demonstrate use of the AWS IoT Device Shadow and Device Defender services. For more details on the feature, see the ST Featured IoT Reference Integration page on FreeRTOS.org.
- MQTT Agent
- IoT Defender
- OTA Update
- Environment Sensor Publishing
- Motion Sensor Publishing
See lwIP for details.
See MbedTLS for details.
The CLI interface located in the Common/cli directory is used to provision the device. It also provides other Unix-like utilities. See Common/cli for details.
The key-value store located in the Common/kvstore directory is used to store runtime configuration values in non-volatile flash memory. See Common/kvstore for details.
The PkiObject API takes care of some of the mundane tasks in converting between different representations of cryptographic objects such as public keys, private keys, and certificates. See Common/crypto for details.
The Common/net/mbedtls_transport.c file contains a transport layer implementation for coreMQTT and coreHTTP which uses mbedtls to encrypt the connection in a way supported by AWS IoT Core.
Optionally, client key / certificate authentication may be used with the mbedtls transport or this parameter may be set to NULL if not needed.
To clone using HTTPS:
git clone https://github.com/FreeRTOS/iot-reference-stm32u5.git --recurse-submodules
Using SSH:
git clone git@github.com:FreeRTOS/iot-reference-stm32u5 --recurse-submodules
If you have downloaded the repo without using the --recurse-submodules
argument, you should run:
git submodule update --init --recursive
To get started running demos, see the Getting Started Guide.
See CONTRIBUTING for more information.
Source code located in the Projects, Common, Middleware/AWS, and Middleware/FreeRTOS directories are available under the terms of the MIT License. See the LICENSE file for more details.
Other libraries located in the Drivers and Middleware directories are available under the terms specified in each source file.