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

How debug Secure DFU Bootloader for nRF52832 in SDK 14 ?

Hi,

Follow answers from here and have many try, not success yet.

Development with GCC and Eclipse, can not reach main() but return "Programe file does not exist" when start debug.

Could you give me some hint?

secure_dfu_ble_gcc_nrf52.ld:

    MEMORY
    {
      /*FLASH (rx) : ORIGIN = 0x73000, LENGTH = 0xb000*/
      FLASH (rx) : ORIGIN = 0x53000, LENGTH = 0x2b000
      RAM (rwx) :  ORIGIN = 0x20002180, LENGTH = 0xde80
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
      bootloader_settings_page (r) : ORIGIN = 0x0007F000, LENGTH = 0x1000
      mbr_params_page (r) : ORIGIN = 0x0007E000, LENGTH = 0x1000
      uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
    }

--memrd 0x10001000:

    0x10001000: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
    0x10001010: FFFFFFFF 00053000 0007E000 FFFFFFFF   |.....0..........|
    0x10001020: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
    0x10001030: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|
    0x10001040: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF   |................|

Best regards.

Parents
  • You must first flash it using either nrjprog with JLink or IDAPnRFProg with IDAP-Link CMSIS-DAP. You only need to do this once. This is due to the fact that the DFU address must be written to the UICR register. You can also manually write UICR too. After that you can debug using Eclipse GCC until UICR got erased. Without UICR address, the softdevice would not jump to DFU, hence you cannot debug.

    You need to create a debug configuration base on the jtag you are using to debug.

    image description

Reply
  • You must first flash it using either nrjprog with JLink or IDAPnRFProg with IDAP-Link CMSIS-DAP. You only need to do this once. This is due to the fact that the DFU address must be written to the UICR register. You can also manually write UICR too. After that you can debug using Eclipse GCC until UICR got erased. Without UICR address, the softdevice would not jump to DFU, hence you cannot debug.

    You need to create a debug configuration base on the jtag you are using to debug.

    image description

Children
Related