Need confirmation on what is going wrong in hex file created using mergehex

Hi,

Please note that I am using below setup

NRF SDK17.0.2

Softdevice 7.2.0

For one of my application, I am trying to generate combined hex file with DFU, Softdevice, Bootloader settings and application file using mergehex command as below

mergehex --merge bl_settings.hex secure_bootloader_ble_s132_pca10040.hex s132_nrf52_7.2.0_softdevice.hex ble_app_pca10040_s132.hex --output \HEX_FILES\NRF\APP\app_combined.hex

Here hex file is generated correctly however when I flash this generated hex file using "nrfutil device program --firmware " command and reads flash using programmer from nrf Connect for Desktop, I find that there is difference in softdevice start address.

Please find attached screenshot for ready reference.

Also please note that in programmers view "File memory layout" it shows desired start address 0x00001000 and device's memory layout it shows 0x00000FF8.

Hex File ViewDevice View

Can anyone help me to understand what should be going wrong here.

Thanks in advance.

Regards,

Dinesh

  • Hi Dinesh,

    When you load the hex file(s), the Programmer has full context of the different regions, so it can visualize the different flash region as described in the files.

    When you read back from the flash memory, the app doesn't have any context, so it just split the regions if there is several blank region in between.

    Meanwhile, the MBR writes some data to FF8-FFF, so the Programmer app thinks that FF8-FFF and the bootloader is a continuous daya region, and visualize it as such.

    In short, there is nothing wrong.

    Hieu

Related