This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SDK12.3. Secure Bootloader : UART and ld config

Hi all

I'm working on a custom board using gcc and eclipse.

My primary problem is I'm fighting with the ld settings for the secure bootloader. I activated the RTT which led to a slightly larger HEX debug built.

   text	   data	    bss	    dec	    hex	filename
  30344	    144	   4824	  35312	   89f0	bootloader_nrf51_qaac_S130.out

according to this I changed the settings as follows:

MEMORY
{
  FLASH (rx) : ORIGIN = 0x37000, LENGTH = 0x8C00 // rounded to full page

  RAM (rwx) :  ORIGIN = 0x20003C00, LENGTH = 0x4380 // SD Mem - 32kb -NoINIT

  NOINIT (rwx) :  ORIGIN = 0x20007F80, LENGTH = 0x80 // NoInit

  /** Location of bootloader setting in at the last flash page. */
  BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 0x0400

  /** Location in UICR where bootloader start address is stored. */
  UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04
}

Is my calculation correct? Further I'm using BSP_DEFINES_ONLY and custom_board.h which holds the LFCLKSRC definition...

What is also puzzling me is the hint in the comment above the FLASH(rx) definition: "BOOTLOADER_REGION_START found in dfu_types.h" there is neither the file nor the definition, I found it in nrf_bootloader_info.h and it is resolved as &__isr_vector. So there seems to be no need to set it via define as I understand this...

Something of the settings above is wrong, as the debugger is not stoping in the bootloader main...

The second question: Is it possible to backport the serial secure dfu from SDK v13? Anybody did or tried that yet?

Parents
  • Okay, I found the root cause of all my problems:

    Inside the Makefile the CFLAG+= -flto was set, which caused the debug symbols to be discarded and caused the debugger to not find the symbols...

    Maybe this helps somebody too

Reply
  • Okay, I found the root cause of all my problems:

    Inside the Makefile the CFLAG+= -flto was set, which caused the debug symbols to be discarded and caused the debugger to not find the symbols...

    Maybe this helps somebody too

Children
No Data
Related