How to change DFU/Bootloader start address via OTA?

We are running out of space for DFU, thus changed start address from 0x77000 to 0x6E000

After reading related documents, it seems I had a problem

 SD_MBR_COMMAND_COPY_BL is used for update the DFU, however, it requires BOOTLOADER_ADDR already set (to new/correct address)

Then BOOTLOADER_ADDR is stored IN the MBR at 0xFF8, which is PROTECTED by DFU on power up

It seems to me this is a dead loop, the only way I could think of is to create an intermediate DFU that do not protect MBR, then modify address slot in APP before calling SD_MBR_COMMAND_COPY_BL to upgrade to the final DFU

Is there a better/proper way of doing it?

Parents
  • Hi Adam,

    We are running out of space for DFU, thus changed start address from 0x77000 to 0x6E000

    The bootloader resides at the end of the memory region. Therefore, moving the bootloader start address down actually makes the bootloader consume more space.

    But in any cases, I am afraid that changing the bootloader start address is just not possible. It is as you have found, the bootloader start address is stored in the MBR region and isn't supposed to be changed anymore. Notice this note in the Memory Layout section of the DFU solution documentation:

    Note
    The size of the bootloader is fixed for the lifetime of the device. This is because the location (MBR_BOOTLOADER_ADDR) that stores the start address of the bootloader is not (safely) updateable. See the SoftDevice Specification for more information.

    Hieu

Reply
  • Hi Adam,

    We are running out of space for DFU, thus changed start address from 0x77000 to 0x6E000

    The bootloader resides at the end of the memory region. Therefore, moving the bootloader start address down actually makes the bootloader consume more space.

    But in any cases, I am afraid that changing the bootloader start address is just not possible. It is as you have found, the bootloader start address is stored in the MBR region and isn't supposed to be changed anymore. Notice this note in the Memory Layout section of the DFU solution documentation:

    Note
    The size of the bootloader is fixed for the lifetime of the device. This is because the location (MBR_BOOTLOADER_ADDR) that stores the start address of the bootloader is not (safely) updateable. See the SoftDevice Specification for more information.

    Hieu

Children
No Data
Related