Nordic Thingy:52 v2.2.0
|
The following procedures assume that you are working with your own custom firmware. You will need to do the following to generate your own packages:
To run these tasks, you will require nrfutil.
Before you can generate DFU packages, you must first generate new keys. Cryptographic keys are required to sign and validate a Device Firmware Update package. Before running your own custom DFU, you must generate your own private-public key pair.
To generate a new private key, run the following command with nrfutil installed:
Make sure you keep this key secret. The command generates the new key file in the folder where you ran the command.
Now, generate a public key from the private one:
Copy the public_key.c from where you generated it to <InstallFolder>\project\bootloader_secure\dfu_public_key.c
.
To generate a new bootloader, compile the Bootloader
project using either Keil μVision or GCC. Flash the compiled bootloader onto Thingy. Remember to flash the SoftDevice as well for the OTA-DFU to function properly.
Run nrfutil pkg generate
to generate a ZIP file that you can later use with a mobile or desktop application to update the Thingy firmware, as described in nrfutil documentation. For example:
This command contains essential information about the versions of the application and of the hardware. These versions determine whether it will be possible to perform a valid DFU process. DFU is only possible if:
A firmware package which supports OTA-DFU must consist of the following four elements:
Bootloader settings is a special area in the bootloader that contains information about the DFU process, as well as information about the versions of the application and the bootloader. You must generate your own bootloader settings file for your custom application. See nrfutil documentation for information on how to generate the bootloader settings file. Refer to Version requirements and make sure that you set correct versions when generating the bootloader settings file.
When your custom package is ready, follow the procedure in OTA-DFU with nRF Connect to run an OTA-DFU.