Hello,
I have been investing a couple days now in order to get the DFU procedure working properly, but it seems I am stuck...
This the setup that I am currently using:
nRF52832 DK
Nordic SdK v12.2.0
Eclipse Neon 2
GCC-Toolchain (GNU-Arm-Tools v5.4_2016q3)
nRF Toolbox App v2.4.0
nRF Connect App v4.11.0
Here is what I did so far:
***(1.)***
DFU-test with zip-files from examples/dfu/ble_dfu_send_hex/test_images_update_nrf52 works as expected!
--> normal upload-procedure to DfuTarg, no error messages, startup of HRM-example after button-reset
Files: dfu_test_softdevice_bootloader_s132.hex / dfu_test_app_hrm_s132.zip
***(2.)***
Prepared the buttonless_dfu-example found in examples/ble_peripheral by using this tutorial
(2.1)
compiling and flashing worked right away without further modifications, but it got stuck right after startup
while constantly repeating this messages
:INFO:running nrf_dfu_settings_init
:INFO:!!!!!!!!!!!!!!! Resetting bootloader settings !!!!!!!!!!!
:INFO:Erasing old settings at: 0x20002320
:INFO:Erasing: 0x20002320, num: 1
:INFO:Erase failed: 6
:ERROR:Erasing from flash memory failed.
APP_ERROR:ERROR:Fatal
(2.2)
I am assuming this issue is caused by not having a correct bootloader setup, so I moved on to the next step...
Files: s132_nrf52_3.0.0_softdevice.hex / buttonless_dfu.hex (fixed)
***(3.)***
Followed the procedure of this tutorial for using the bootloader_secure-example found in examples/dfu
(3.1)
application-upload (from (2)) is done successfully, but nRF52832 DK stays in bootloader-mode
even after multiple resets (also happens for different apps that are flashed directly over cmd-line)
(3.2)
uploading the zip-package for bootloader and softdevice always results in the error-message REMOTE DFU DATA SIZE EXCEEDS LIMIT even though my self-created package is only 146 KB compared to the example-package from (1) with 153 KB
(3.3)
I already wanted to debug the bootloader but I cant seem to get those hints working for my gcc-toolchain and SDK v12.2.0
pem-Files: dfu_private.zip
hex-Files: secure_dfu_settings.hex / secure_dfu.hex](/attachment/0aa826c0d535148f03394aea60f7a738) / secure_dfu_merged.hex
pkg-Files: dfu_softdevice_bootloader_s132_1.zip / dfu_app_buttonless_s132_2.zip
In order to prepare the dfu-procedure and to create the necessary files I using the following commands:
a) Generated private key -> dfu_private.pem
b) Created public-key in code-format -> dfu_public_key.c
c) Compiled buttonless_dfu-example -> buttonless_dfu.hex
d) Compiled bootloader_secure-example -> secure_dfu.hex
e) Created bootloader-settings -> secure_dfu_settings.hex with
'nrfutil settings generate --family NRF52 --application buttonless_dfu.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 secure_dfu_settings.hex'
f) Merged hex-files for bootloader- and bootloader-settings with
'mergehex -m secure_dfu.hex secure_dfu_settings.hex -o secure_dfu_merged.hex'
g) Created zip-package for the bootloader and the softdevice with
'nrfutil pkg generate --bootloader secure_dfu_merged.hex --bootloader-version 2 --softdevice s132_nrf52_3.0.0_softdevice.hex --key-file dfu_private.pem --hw-version 52 --sd-req 0x8C dfu_softdevice_bootloader_s132_1.zip'
h) Created zip-package for the application with
'nrfutil pkg generate --application buttonless_dfu.hex --application-version 3 --key-file dfu_private.pem --hw-version 52 --sd-req 0x8C dfu_app_buttonless_s132_2.zip'
Does anyone have an idea what I might be missing in order to solve the problems in (2) and (3)?