Nordic Thingy:52
|
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 a new private key. Cryptographic keys are required to sign and validate a Device Firmware Update package. The Thingy comes with a public key. Before running DFU, you must generate your own private key and replace the public one in the above-mentioned file.
To generate a new private key, run the following command with nrfutil installed:
This generates the new key file in the folder where you have run the command. Now, replace the existing public key with the new one.
To generate a new bootloader, compile the Bootloader
project. Flash the compiled bootloader onto the board.
Run nrfutil pkg generate
to generate a ZIP file that you can later use with a mobile or desktop application to update the firmware of your Thingy, 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:
The provided precompiled firmware has the following version information:
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, as well as information about the versions of the application and of 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.