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

Mergehex: Overlapping segments detected at address 4096

Hi! Thanks for reading this post. I'm having an issue creating a firmware package for our manufacturer. I'm using a nRF52832 with SDK version 15.3.0_59ac345. Whenever I merge try to merge everything together I am getting an error indicating that segments are overlapping. I can however not figure out how this happened and why.

This is how I merge everything together:

mergehex --merge ./Bootloader/Bootloader.hex _build/App.hex ./Bootloader/Settings.hex --output _build/App_BL_Merge.hex
Parsing input files.
Merging file "Bootloader.hex" into output.
Merging file "App.hex" into output.
Merging file "Settings.hex" into output.
Storing merged file.
mergehex --merge _build/App_BL_Merge.hex Libraries/nRF5_SDK_15.3.0_59ac345/components/softdevice/s132/hex/s132_nrf52_6.1.1_softdevice.hex --output _build/Full_firmware.hex
Parsing input files.
Merging file "App_BL_Merge.hex" into output.
Merging file "s132_nrf52_6.1.1_softdevice.hex" into output.
Overlapping segments detected at address 4096.ERROR: The hex files cannot be merged since there are conflicts.


This is what the memory segment of my linker script looks like:
MEMORY
{
  FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0x52000
  RAM (rwx) :  ORIGIN = 0x20002AA8, LENGTH = 0xD558
}

I looked at the "App_BL_Merge.hex" to see if I could find the issue. Only the Softdevice is missing in this file, and if I understand correctly it will be placed between the application and the MBR, it looks like there should be enough space there:
memory_layout
Just in case I tried to increase the FLASH start location to up to 0x30000 to ensure there is enough space for the softdevice, this doesn't make a difference though.
Could anyone tell me what is overlapping, why, and how to fix it? Thanks a lot Slight smile

Parents Reply Children
Related