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

DFU bootloader non-debug not working

Hi,

currently I am adding DFU support to our application, I got everything working now, but only with the debug version of the bootloader (SDK15).

If I compile the normal bootloader (non-debug) it wont work (bootloader doesnt even start), also I noticed, that the size of the compile dhex file is significantly smaller than the one of the debug version...?

thanks,

Jonas

Parents
  • Jonas,

    Try to program softdevice first, than program the bootloader. Softdevice contains master boot record that makes jump to the bootloader. It should be working after doing that.

  • Mm, not exactly. What he needs to do is to fully erase the flash. Naturally, you have to flash the softdevice and the bootloader afterwards, but that is not what solves the issue.

    The issue is that the MBR reads the UICR looking for the address where the bootloader is located, so that the program can jump there. The debug version of the bootloader starts at a different address than the non-debug version, and since the MBR is still reading the old address from UICR, it jumps there and there's nothing to execute.

    About the size of the hex file, how much of a difference is there?

Reply
  • Mm, not exactly. What he needs to do is to fully erase the flash. Naturally, you have to flash the softdevice and the bootloader afterwards, but that is not what solves the issue.

    The issue is that the MBR reads the UICR looking for the address where the bootloader is located, so that the program can jump there. The debug version of the bootloader starts at a different address than the non-debug version, and since the MBR is still reading the old address from UICR, it jumps there and there's nothing to execute.

    About the size of the hex file, how much of a difference is there?

Children
Related