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

DFU not jumping to Application

Hi,

I have a DFU issue. Using Visual GDB IDE and gcc tool chain.

I Can get my signed application generated into zip then DFU it into the device which all works. Once I get that far I expect it to jump to the application. It passes CRC etc then goes to jump but the application will not start. The address it uses is MAIN_APPLICATION_START_ADDR is = 0x1F000 nrf_bootloader_app_start(MAIN_APPLICATION_START_ADDR);

Without the DFU I know that my application starts so it is compatible with the softdevice. Is there something I need to add to my make file? In my application It has placed the ISR_Vector at 0x1f000 which I think should be correct for the DFU.

Thank you

  • It seems like when I create the package it takes the hex input file and creates 3 files in the zip. 1 file is Binary (seems to be encrypted, I thought it was just going to be signed.) This is done by nrfutil. However after bootloading when I readback the device I see the encrypted data not decrypted. Is the problem nrfutil call or the bootloader?

  • I don't think the binary would be encrypted. Have you double check ? You can use a hextobin.exe or fromelf.exe

    I would suggest you to test with the blinky example. If you can reproduce the issue, you can send me your .hex, .zip and the bootloader to analyse.

  • Stuff.zip Hi, I put the blinky project in here also the package and the hex for the bootloader. The bootloader does a whole lot of LED flashing which is to help me debug it but otherwise is pretty straight and standard. It runs on the PCA10040 board. The Blinky project works but it does the same as my project when I bootload it in. I used this command line to generate the package. nrfutil pkg generate --hw-version 52 --sd-req 0x8C --application-version 4 --application Blinky.hex --key-file Key2.pem BlinkyDFU.zip The bootloader is compiled with the same key. As you can easily see the binary in the package is encrypted or corrupted. Really appreciate any help on this.

  • @mcau1: What do you have in the blinky.hex ? Seems that you merge the softdevice with the application ?

    "Application" means application, not application + softdevice.

    The blinky.bin is not encrypted, it simply binary file, generated from the .hex file, since it's binary you can't "read" it using text editor.

  • Ok I did not know this detail. On the Visual GDB the default is to generate the output with the softdevice in the one hex file. After removing the softdevice from the hex file it all worked well. If I want to update the softdevice to generate the package do I use this command? nrfutil pkg generate --hw-version 52 --sd-req 0x8C --softdevice SD.hex --key-file Key2.pem DetBlueSD.zip (It did not seem to work, It generated a package but after uploading it my device was stuck in bootloader mode which makes me think that I corrupted the application.) Also can I update the application and the softdevice all at once?

Related