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
  • Hi,

    Have you had a look at the DFU bootloader examples, and went through the DFU process manually and gotten a solid understanding of the steps involved? It is not 100 % clear to me what you are trying to set up, but you should be able to do almost anything using "User Build Step" options in SES.

    There are two types of files in the secure_dfu_test_images folder. The .zip files are DFU packages, while the .hex files are various combinations of SoftDevices, setting pages, DFU bootloaders and applications. Note that in the DFU packages, SoftDevice, bootloader and application are separate parts (not merged into one hex file). Generating a DFU package for updating both bootloader and SoftDevice is done by providing two hex files to nrfutil.

    The example packages contains only one type of update, either bootloader, SoftDevice, or application. Combinations are possible, but then the package contains multiple images.

    Regards,
    Terje

  • Hi tesc,

    Thank you very much for your reply.  We're trying to make hex files that can be flashed to the nrf board, just like the hex file (test images) you provide in the SDK.  Since it is a secure dfu, we cannot use the example images because they would not contain our public key that corresponds to the private key that we will be inserting in the software packages that will be pushed out for the OTA DFU.

    Alternatively, if you could provide instructions on modifying your example images to use our key, that would be great!

    As for my understanding of the examples, I have successfully flashed the board with not only the test images (and verified that they are able to perform DFUs),  but I have also built and programmed the dfu/secure_bootloader project in SES (and verified that it is able to perform DFUs).  The problem is that we are unable to:

    -Adapt the project in SES to the Arduino IDE

    -Modify the prebuilt DFU images to use our key

    -Make a DFU image like the prebuilt BUT containing our key

    All we need to do is get one of the above three items working.

    Thank you for your help!

    David

  • Hi,

    I am sorry for the delay!

    So in that case you should have a look at Getting started with Nordic's Secure DFU bootloader, a step by step guide. This guide goes through all the steps required for performing DFU with your own set of keys and with an example you build yourself.

    You should find the application hex file in a build directory from the same folder as the project file (or somewhere very close in the file hierarchy.)

    Regards,
    Terje

Reply Children
No Data
Related