Hi!
Since we cannot DFU a resized bootloader, is there a way to use the DFU service / characteristic to get the current bootloader size/boundaries?
Hi!
Since we cannot DFU a resized bootloader, is there a way to use the DFU service / characteristic to get the current bootloader size/boundaries?
Hi,
It is not difficult to determine the size of the bootloader region from the app. The bootloader start address can be read from the UICR at 0x10001014. Unfortunately, the DFU protocol or buttonless service does not implement anything to exchange this information. This is information that should generally be transparent to the DFU controller.
Do you have devices of the same type deployed in the field with different bootloader sizes? In that case, it will be important to ensure that a device with the bigger bootloader does not accept an update request to the smaller bootloader (https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/lib_bootloader_dfu_validation.html) as that could "brick" the device
Best regards,
Vidar
yes , that's exactly what I'm trying to prevent.
Maybe I can add a custom GATT call to read UICR at 0x10001014
yes , that's exactly what I'm trying to prevent.
Maybe I can add a custom GATT call to read UICR at 0x10001014
Yes, you can exchange this via another GATT service. If possible, I would recommend programming a different hw_version, etc to make it impossible to program the wrong version.