This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I combine Hex files?

Hi. I'm using nRF51822, SDK10.0.0, S130. Hex files : Soft device, Application, bootloader. I want to download at once. How can I combine Hex files to make them 1 file?

And could you let me know BASE ADDRESS of Soft device, Application, bootloader? I need your help.

Parents
  • You can use mergehex included in the nRF5x-Command-Line-Tools package (you can download it from here: www.nordicsemi.com/.../nRF52832

    You can use it like this:

    mergehex --merge sd.hex app.hex bl.hex --output out.hex
    

    Hexfiles already have the offest address information included, so you don't need to specify this in the command line, assuming that the files have been compiled using the correct offset address.

    • Softdevice starts at address 0x0
    • Application starts where the softdevice ends. You need to look in the softdevice spec to find this address. For S130 v2.0.0 this is 0x1B000
    • Bootloader starts at address 0x3C000, or whatever you specify in BOOTLOADER_REGION_START

    You can also check the base address of the hex file by opening it up in a text editor and look at the first two lines:

    :02000004 0001 F9
    :10 B000 0088330020F5B001000FB1010011B101003B

    This means that the offset address is 0x1B000 (read more here)

Reply
  • You can use mergehex included in the nRF5x-Command-Line-Tools package (you can download it from here: www.nordicsemi.com/.../nRF52832

    You can use it like this:

    mergehex --merge sd.hex app.hex bl.hex --output out.hex
    

    Hexfiles already have the offest address information included, so you don't need to specify this in the command line, assuming that the files have been compiled using the correct offset address.

    • Softdevice starts at address 0x0
    • Application starts where the softdevice ends. You need to look in the softdevice spec to find this address. For S130 v2.0.0 this is 0x1B000
    • Bootloader starts at address 0x3C000, or whatever you specify in BOOTLOADER_REGION_START

    You can also check the base address of the hex file by opening it up in a text editor and look at the first two lines:

    :02000004 0001 F9
    :10 B000 0088330020F5B001000FB1010011B101003B

    This means that the offset address is 0x1B000 (read more here)

Children
Related