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

SDK 15.3 cannot program default bootloader

I built the secure bootloader UART project without changing anything and I cannot program it using nRFgo Studio.  It says:

This hex file has data in SoftDevice region. Try programming using "Program SoftDevice", or erase all before programming.

The project has these items that I think overlap with SoftDevice:

.ARM.__AT_0x00000FF8 0x00000ff8 Section 4 nrf_bootloader_info.o(.ARM.__AT_0x00000FF8)
.ARM.__AT_0x00000FFC 0x00000ffc Section 4 nrf_dfu_settings.o(.ARM.__AT_0x00000FFC)

I can program the precompiled file bootloader_secure_uart_debug_without_bonds_mbr.hex fine.  How do I fix this problem?

Parents
  • Hi, 

    Just want to give some more context about this issue. 


    In SDK v15.3 we changed the bootloader start address register (NRF_UICR_BOOTLOADER_START_ADDRESS) from NRF_UICR_BASE + 0x14 in the UICR to MBR_BOOTLOADER_ADDR (at 0xFF8) in the MBR. 

    So to write the start address of the bootloader, you need to write into the MBR (This is to help improving security for the bootloader)


    This causes the issue that you experienced. nrfjprog will have trouble writing to the MBR/Softdevice area. And if you use --sectorerase with nrjfprog it will erase the MBR make the chip firmware stops working. 

    The workaround is to do an erase all, write the MBR/Softdevice and then flash the bootloader without sector erase.

    If you don't want to do an erase all every time you write the bootloader, you can comment out what inside nrf_bootloader_info.c on the second time you write the bootloader so that the programmer would not write to the MBR. 

    Or you can merge the MBR/softdevice to your application and then flash with sectorerase.  

  • Which SD versions have this new MBR which uses MBR_BOOTLOADER_ADDR  instead of NRF_UICR_BOOTLOADER_START_ADDRESS?

Reply Children
  • Hi Tom, 

    It's started from S132 v6.1.1 same with  S140 v6.1.1 . The change happens between MBR v2.2 and v2.4.x. You can check the release note of the softdevice to find the version of the MBR.

    However, the MBR v2.4.x is backward compatible with earlier version, meaning if it couldn't find the bootloader address in flash, it will check the bootloader address in UICR. 

Related