This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

secure bootloader switch to application

Hi,

I'm trying to program the bootloader together with an application+SD132 3.0 on the nrf52, but my device gets stuck with the bootloader when I finish programming it.

The steps I've done are those:

1-Program the SD132 3.0. 2-Prepare the settings file for the bootloader with my app.hex and merge it (app+settings+bootloader). 3-Program the secure_bootloader_debug: it starts correctly and I can connect to it without problems. 4- Program the app+settings+bootloader file. 5- The DFU advertising is working, but when timeout is reached it stops emitting...

I checked the 0x7f020 flag and is set to '1'... I don't know if the bootloader size is wrong (starts 0x78000, size: 0x6000), the timeout doesn't work properly or maybe I'm doing anything else wrong. If I understand correctly the bootloader_debug accepts the "debug" firmware packages bypassing the key checking, no?

Thank you!

Parents
  • image description

    This is the error. The steps I followed in more detail:

    1. Erase chip and Program SD 132 3.0.
    2. Create a pair of keys with nrfutil: the public key is on the bootloader_secure project folder "dfu_public_key.c", and I recompile the bootloader with this key (bootloader_debug start: 0x73000, size 0x0B000).
    3. With the private key I create a dfu package using nrfutil and this command: "nrfutil pkg generate --debug-mode --application my_app.hex --key-fileprivate.pem app_kiasu.zip"
    4. Now I create the bootloader settings with nrfutil : "nrfutil settings generate --family NRF52 --application my_ app.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings.hex"
    5. Use mergehex to merge the bootloader and settings.hex and then I program the merged bootloader with nrfGo.
    6. I load the app_kiasu.zip file to my iphone and using the app I try to perform the DFU.
    7. The iPhone app detects my board in DFU and connects to it... The transmission starts but fails at 10% aprox.

    Note: my bootloader have some changes:uses the internal lowfreq RC oscilator, the "buttons_init" function is commented and the bluetooth advertising timeout is 30 sec.

  • I know but your server was returning an error when I was trying to edit it... Your bootloader (the precompiled one) with my app doesn't work. I'm going to send you both files.

Reply Children
No Data
Related