This section provides information about preparing firmware packages used for the OTA-DFU process. When preparing firmware packages, you must install nrfutil.
Smart Remote uses cryptographic keys to sign and validate a firmware package used during a DFU procedure. The public key is located in Source\Configuration\bootloader_key.c
and it must match the private key that is used during the generation of a firmware package.
To generate a new private key, run the following command with nrfutil installed. This generates a new key file in the folder where you have run the command.
Replace the existing public key (Source\Configuration\bootloader_key.c
) with the new one that is generated from the new private key:
To allow evaluation of the DFU process, precompiled firmware images and matching DFU packages are provided in the installation package.
In Smart Remote, the OTA-DFU process is performed by the bootloader. The bootloader must be present on the device and the application must boot through it.
To generate a new bootloader, compile the SR3_Bootloader
project. Use the project and target that matches your SoC version and board. Flash the compiled bootloader onto the board. When the bootloader is flashed to memory, the UICR register is also modified with the address of where the bootloader resides. This address is part of the generated HEX file.
To prepare a firmware package used for the OTA-DFU procedure, use the nrfutil pkg generate
command. The tool can prepare a package containing one or more firmware components. For more information, refer to nrfutil documentation.
Example:
When generating a new firmware package, version of the components and of the hardware are provided. These versions determine whether it will be possible to perform a DFU process. DFU is only possible if:
The provided precompiled firmware has the following version information:
sr3_config_nrf*.h
). Refer to CONFIG_DFU_HW_VERSION.A firmware package which supports OTA-DFU and which can be uploaded to your device through a cable connection, for example during manufacturing, must consist of the following four elements:
Bootloader settings is a special area in the bootloader that contains information about the DFU process, versions of the application and of the bootloader, and the application checksum. You must generate your own bootloader settings file for your custom firmware. See nrfutil documentation for information on how to generate the bootloader settings file. Refer to Version requirements and make sure that you set the correct versions when generating the bootloader settings file.
When your custom package is ready, follow the procedure in Running a DFU.