9 replies
October 2020

Karlz

Thanks, Amund of Interrupt. This came in the most appropriate time. Hope you wouldn’t mind me sharing this in Nordic DevZone.

Kind regards

1 reply
October 2020 ▶ Karlz

francois

Thanks for sharing @Karlz! Note that another option for embedded a binary is to translate it into a header file. This is super easy with xxd -i . Check it out: https://unix.stackexchange.com/a/176112.

October 2020

Rajah

Hi Amund, this could not have come at a better time. I am trying to solve the exact same problem on my LoRaWAN devices as we are getting ready to scale. Lots of good input that I can put to use. We deploy our own private LoRaWAN network.

1 reply
October 2020 ▶ Rajah

amundas

I’m happy to hear that you found this post useful!

October 2020

stevenlin

hi all ,
could be merger(mergehex.exe tool )

Unique Parameter(A.hex) and App (B.hex)

i try to merger (A and B, mergehex -m A.hex B.hex -o C.hex)
ERROR: The hex files cannot be merged since there are conflicts

it seem write other program(python) to rebuild .like " Secure firmware updates with code signing"
or other ?

October 2020

francois

@stevenlin - Welcome to Interrupt! It sounds like your two files (A.hex and B.hex) have some overlapping regions. Make sure the addresses are distinct and they should merge fine.

1 reply
October 2020 ▶ francois

stevenlin

hi francois
in platform (nordic nrf52840,sdk 15.3)
i add the section(image_hdr) ,so it will be overlapping.
to use mergerhex to merger,not use nrfjprog (loadfile to change the [Unique Parameters)

nrf_common.ld
ENTRY(Reset_Handler)

SECTIONS
{
.text :
{
KEEP((.isr_vector))
KEEP (
(.image_hdr))
(.text)

}
}

1 reply
October 2020 ▶ stevenlin

francois

@stevenlin upon digging some more, sounds like mergehex does not support this kid of operation. Instead, you might want to use this very good Python tool: https://python-intelhex.readthedocs.io/en/latest/part2-6.html

1 reply
November 2020 ▶ francois

stevenlin

hi francols,
very thank you for your tool.
i will try it .