10.3.6.3 Project Properties Configuration for Current/Running Firmware
By following the previous steps, the BLE OTA capability is added into application project. Referring to Memory management, this belongs to "Firmware" in Slot0 section. Metatdata header and "Bootloader" has to be added into this project to make as working project with OTA capability to receive new upgradable image over BLE link.
MPLABX Tools environment allows to configure and append the Metadata header into application image. The needed script and sample private key .pem files are added into project folder (.X) when the OTA code was generated from MCC.
Right click on the project and select Properties.
- SignFirmware - Adds Metadata header into
application image. Refer to Meta-data Header
Configuration for more details on header format. There are configurable
parameters like Firmware Rev (version), authentication method and manufacturer ID.
Configure as per requirement.
-
Step1: "Firmware Rev" - Firmware version of current running firmware. This must be same as version in DIS service.
- Step2:"Auth Method" - There are 3 Supported authenticated methods
-
Signature validation (ECDSA256-SHA256) – most secure, and data integrity check. Signature is encrypted using ECDSA private key. 256-bit ECDSA Public key to be programmed in device to do signature decryption. openssl (example commands: https://techdocs.akamai.com/iot-token-access-control/docs/generate-jwt-ecdsa-keys) is one of the open tools to generate ECDSA public/private key pair. Sample private key is available in project folder .X. Public key is input in Bootloader project.
-
Hash validation (SHA-256) – less security, and data integrity check.
-
No validation (None) – no security, no integrity check.
-
Warning:Ensure to keep "Sequence number" as non-zero value and not 0xFFFFFFFF.
-
Bootloader - Standalone Bootloader project is available in \bootloader folder of application GIT repo. The bootloader code stays in Boot Flash section. The bootloader project can be added as loadable project into OTA project. When the OTA project is build, unified image with Bootloader+Metadata Header+Firmware will be generated. Add the loadable project/loadable file (bootloader.hex) into OTA project as shown below.
After completing the above steps, click Apply, then OK to take the changes into effect.