5. Amazon FreeRTOS Page 5
The Amazon FreeRTOS Over-the-Air Update service enables you to:
•Digitally sign and encrypt firmware before deployment.
•Securely deploy new firmware images to a single device or a group
•Deploy firmware to devices, reset, or reprovisioned.
•Verify the authenticity and integrity of the new firmware after it's deployed to
devices.
•Monitor the progress of a deployment.
•Debug a failed deployment.
Amazon FreeRTOS Over-the-Air Updates
8. Amazon FreeRTOS Page 8
• Ultra-low-power STM32L4 Series MCUs based on ARM® Cortex® -M4 core with 1
Mbyte of Flash memory and 128 Kbytes of SRAM, in LQFP100 package
• 64-Mbit Quad-SPI (Macronix) Flash memory
• Bluetooth® V4.1 module (SPBTLE-RF)
• Wi-Fi® module Inventek ISM43362-M3G-L44 (802.11 b/g/n compliant)
• High-performance 3-axis magnetometer (LIS3MDL)
• 3D accelerometer and 3D gyroscope (LSM6DSL)
• USB OTG FS with Micro-AB connector
• Arduino™ Uno V3
Important Key Features STM32L4 model B-L475E-IOT01A
10. Amazon FreeRTOS Page 10
• Log to the Amazon Console.
• Under Amazon FreeRTOS Device Software, choose Configure
download.
• Choose Download FreeRTOS Software.
• Under Software Configurations, find Connect to AWS IoT- ST, and
then choose Download.
Alternative source : https://github.com/aws/amazon-freertos
My source: https://github.com/theanto/amazon-freertos
Download the software
11. Amazon FreeRTOS Page 11
In the console, create your user and choose Add permissions.
Choose Attach existing policies directly.
In the search box, type:
1.AmazonFreeRTOSFullAccess
2.AWSIoTFullAccess
User and permissions
13. Amazon FreeRTOS Page 13
This policy grants the following permissions:
•iot:Connect
Grants your device the permission to connect to the AWS IoT message broker.
•iot:Publish
Grants your device the permission to publish an MQTT message on the
freertos/demos/echo MQTT topic.
•iot:Subscribe
Grants your device the permission to subscribe to the freertos/demos/echo MQTT topic.
•iot:Receive
Grants your device the permission to receive messages from the AWS IoT message
broker.
Detail on policy
14. Amazon FreeRTOS Page 14
In the AWS IoT console go to Manage and then create a single Things in this way:
1.Type a name for your thing.
2.Add a certificate for your thing page (choose Create certificate).
3.Download your private key and certificate.
4.Choose Activate, because Certificates must be activated prior to use.
5.Choose Attach a policy to attach.
6.Choose the policy you just created and choose Register thing.
Things
15. Amazon FreeRTOS Page 15
1. Import the Amazon FreeRTOS Sample Code into the STM32 System Workbench
2. Copy your AWS IoT endpoint from the Endpoint text box. It should look like
<1234567890123>.iot.<us-east-1>.amazonaws.com.
3. In aws_clientcredential.h set clientcredentialMQTT_BROKER_ENDPOINT to your AWS
IoT endpoint.
The aws_clientcredential.h file have this constant:
• clientcredentialMQTT_BROKER_ENDPOINT: Your AWS IoT endpoint.
• clientcredentialIOT_THING_NAME: The AWS IoT thing for your board.
• clientcredentialWIFI_SSID: The SSID for your Wi-Fi network.
• clientcredentialWIFI_PASSWORD: The password for your Wi-Fi network.
• clientcredentialWIFI_SECURITY: The security type for your Wi-Fi network.
Software configuration
16. Amazon FreeRTOS Page 16
1. Go to :
<BASE_FOLDER>demoscommondevmode_key_provisioningCertificateConfigurationTool
CertificateConfigurator.html.
2. Under Certificate PEM file, choose the <ID>-certificate.pem.crt you downloaded from the AWS
IoT console.
3. Under Private Key PEM file, choose the <ID>-private.pem.key you downloaded from the AWS
IoT console.
4. Choose Generate and save aws_clientcredential_keys.h, and then save the file in
<BASE_FOLDER>demoscommoninclude. This overwrites the stub file in the directory.
Configure Your AWS IoT Credentials
17. Amazon FreeRTOS Page 17
In the AWS IoT console go to Test
In the Subscription topic text box, type freertos/demos/echo and then choose Subscribe to topic.
Running an example