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

merge hex - area overlap

I having issues when merging softdevice and application hex files together. If I use nrfConnect and I add the two hex files not merged (ble_app.hex and s132_nrf52_7.2.0_softdevice.hex) or if I use SES, everything works fine. The target device is nRF52832 and I am using nrf52DK board.

For merging, at first I tried to use the command
mergehex -m ble_app.hex s132_nrf52_7.2.0_softdevice.hex -o full.hex
which generates full.hex correctly, but when I load this file into nrfConnect it says:
Overlapping data around address 0x32c28

I searched on this website for a solution and I figured out I need to add "bootloader/setting" hex file, so I tried to merge all the files in this way:
nrfutil settings generate --family NRF52 --application ble_app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex
mergehex -m ble_app.hex settings.hex -o merged-app-settings.hex
mergehex -m merged-app-settings.hex s132_nrf52_7.2.0_softdevice.hex -o full.hex
This time nrfConnect does not complain about area overlap but I get this log and the app fails app: fds_init failed

nrfutil version 6.1.0
I am not sure about  flags for nrfutil command, from my understanding I can arbitrarily choose --application-version and --bootloader-version for --bl-settings-version I set it to 2 as I am using sdk17

What is the correct procedure to make it work?

Thank you!

7331.ble_app.hex8802.s132_nrf52_7.2.0_softdevice.hex

Parents
  • Hi,

    This is odd. The size of S1322 7.2.0 is 0x26000, so you should not get an overlap around 0x32c28 when merging the application hex and SoftDevice hex. I do not have any problem merging the two hex files you have attached:

    mergehex.exe -m s132_nrf52_7.2.0_softdevice.hex ble_app.hex -o merged_app_sd.hex
    Parsing input files.
    Merging file "s132_nrf52_7.2.0_softdevice.hex" into output.
    Merging file "ble_app.hex" into output.
    Storing merged file.

    Result: 4478.merged_app_sd.hex

    It is also strange that you suddenly do not get complaints about overlap when also merging with settings.hex, in addition to the app and softdevice.

    Which version of nrf command line tools are you using? What is the output of "mergehex --version"?

Reply
  • Hi,

    This is odd. The size of S1322 7.2.0 is 0x26000, so you should not get an overlap around 0x32c28 when merging the application hex and SoftDevice hex. I do not have any problem merging the two hex files you have attached:

    mergehex.exe -m s132_nrf52_7.2.0_softdevice.hex ble_app.hex -o merged_app_sd.hex
    Parsing input files.
    Merging file "s132_nrf52_7.2.0_softdevice.hex" into output.
    Merging file "ble_app.hex" into output.
    Storing merged file.

    Result: 4478.merged_app_sd.hex

    It is also strange that you suddenly do not get complaints about overlap when also merging with settings.hex, in addition to the app and softdevice.

    Which version of nrf command line tools are you using? What is the output of "mergehex --version"?

Children
Related