Hey all,
I'm trying to roll our "own version" of the bootloader for the Thing52. I have followed the instructions to create the PEM file and the public key. I'm able to compile both the application code and the bootloader code. I've been merging the files with the following lines in my Makefile.
settings: nrf52832_xxaa_s132
@echo Generating settings...
nrfutil settings generate --family NRF52 --application $(OUTPUT_BINARY_DIRECTORY)/$<.hex --application-version 0 --bootloader-version 0 --bl-settings-version 1 settings.hex
mergehex -m settings.hex ../../bootloader_secure/pca20020/armgcc/_build/$<.hex -o bootloader.hex
image: nrf52832_xxaa_s132 settings
@echo Creating combo Bootloader + App + Softdevice package
mergehex -m ../../../sdk_components/softdevice/s132/hex/s132_nrf52_4.0.2_softdevice.hex bootloader.hex -o softdevice.hex
mergehex -m softdevice.hex nrf52832_xxaa_s132.hex -o ts.hex
Once the unified hex file is created and programmed I can connect to the newly programmed Thingy. I create a DFU package with the following:
package: nrf52832_xxaa_s132
@echo Creating DFU package:
nrfutil pkg generate --application $(OUTPUT_BINARY_DIRECTORY)/$<.bin --application-version 0 --hw-version 52 --sd-req 0x98 --key-file ../../bootloader_secure/private-key.pem dfu-app.zip
I then have tried uploading to my phone and using NRF connect on my computer to initiate a DFU. According to the logs I get this far and it never returns:
:INFO:Received indication state 1, notification state 0
m_ble :INFO:Indication for BLE_DFU is enabled
:INFO:on_ctrlpt_write: execute enter
:DEBUG:on_ctrlpt_write: execuing!!
m_ble :INFO:Device is entering bootloader mode!
Is there anything glaring that I'm missing here?
Thanks!