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

How do I create a firmware + software hex file?

Hey everyone!  My team and I are working on making a hex file that contains the soft device and software, as found in the 15.3.0 SDK, in the secure dfu test images folder.

These hex files can be directly programmed to the device (in our case, nrf52832), and they enable full functionality of the soft device and the code.  We would like to do the same thing to the secure dfu example projects found in the same SDK.  We would like to build the project in Segger Embedded Studio, then output the .hex file that we need.

Our setup is as follows:

-Windows 10

-SDK version 15.3.0

-nRF52832

-Segger Embedded Studio IDE

Is there a process on how to merge the .hex and .elf files?  If so, I haven't been able to find it.

We would like the same end result as is found in the secure dfu test images folder (i.e. program the "soft device" with the .hex that contains the software and soft device).

Any help would be appreciated!

Thanks,

David

Parents Reply Children
  • Hi awneil, thank you for the hyper-fast reply!

    I've looked into mergehex a bit, but it appears that it only merges hex files.  We need to merge the .hex (soft device) with the .elf (software).  Is this possible with mergehex?

    David

  • So convert the ELF to hex first.

    SES does that by default.

  • Hi awneil,

    I have now been able to merge the two files!  You were right- SES does output a .hex version of the executable in the same folder as the .elf.  My mistake was that I thought that it was somehow the softdevice.

    I was able to run the mergehex command and generated the merged hex file with the executable and the softdevice.  I chose to do this to the dfu ble project.  I uploaded the merged hex file to the device (SES Target>Download File>Intel Hex) and when complete, it appears on the list of bluetooth devices.  I can then connect to it, but I cannot perform the dfu OTA, as it simply rejects the zipped, certified package (connects, tries to send, then disconnects).

    My question is: how can I program this merged hex file to the board with the SES tool (SES Target>Download File>Intel Hex)?  I see the SES project does have a memory map file, and am unsure as to how the IDE could possibly know how to program the hardware without this file incorporated into the merged hex.  I also looked at the size of the hex file, in comparison to the available flash size, and found that the hex file (400KB) should be overflowing both the SoftDevice partition and the Application partition...

    Essentially, is there a way to program the merged hex file?

    Thanks,

    David

  • is there a way to program the merged hex file

    Yes - you just tell the tool the file, and program it!

    The Intel Hex format includes all the necessary address information - that is the point of it!

  • Dear awneil,

    I really appreciate your help, but I just said that programming it did not work.

    I used the (SES Target>Download File>Intel Hex) command.  I used the hex file created as documented.  It still does not work.

Related