-
Notifications
You must be signed in to change notification settings - Fork 8
Application Flashing
Charles R. Portwood II edited this page Jun 26, 2019
·
1 revision
The nRF52 Secure Bootloader requires that apps be digitally signed and flashed over the USB/BLE interface, meaning that you can't flash your application hex file via nrfjprog and expect things to work.
The flashing procedure is as follows:
- Generate a
.hex
for your application.
If you're using Arduino, generate a hex by using the 'Export Compiled Binary' on your sketch.
- Generate a signed package:
nrfutil pkg generate --hw-version 52 --application-version 1 --application /path/to/compiled/program.hex --sd-req 0xB6 --key-file /path/to/kaidyth_nrf52_bootloader/default_private.pem app_dfu_package.zip
Note that you'll need to download the default private key bundled with the bootloader to sign your application. If you're using a custom key with your bootloader use that key instead.
- Flash over USB
nrfutil dfu usb-serial --package app_dfu_package.zip -p /dev/ttyACM0
You can also use the nRF Connect mobile/desktop app to flash the program over Bluetooth DFU.