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
No Data
Reply
  • 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.  

Children