Projects‎ > ‎

nrf52_secure_bootloader

using the nrf52 secure bootloader is a bit tricky. here is a set of directions to using the secure dfu bootloader.

git clone, or unzip this to nRF_SDK  external folder

run make in nRF5_SDK\external\micro-ecc\nrf52_armgcc\armgcc



following these directions for linux
install python
run 
pip install nrfutil

build the bootloader

cd
nRF5_SDK\examples\dfu\bootloader_secure
nrfutil keys generate private.pem
nrfutil keys display --key pk --format code private.pem --out_file dfu_public_key.c
cd to nRF5_SDK\examples\dfu\bootloader_secure\pca10040\armgcc
make 
make flash

bootloader should be flashed in the device


now to flash your application you need to make a signed zip of your application firmware, 

nrfutil pkg generate --hw-version 52 --sd-req 0x8C --application-version 4 --application ./_build/nrf52832_xxaa.hex --key-file private.pem app_dfu_package.zip


then this can be flashed using nRF connect DFU android app. 

or you can flash using nrfutil via 
nrfutil dfu ble -f -pkg package.zip


Comments