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

Add configuration via additional hex

Hi

I would like to prepare a provisioning hex file for my firmware. Can somebody supply an example how this could be made?

I'm using gcc toolchain, Eclipse and SDK 12.3 for development.

Example: I would like to add specific data like e.g. DeviceType, HW-Revision , Manufacturing Date to be accessible from the firmware.

Same procedure would also be interesting for dfu bootloader configuration.

Thanks in advance

Martin

Parents
  • Hi Martin,

    Do you plan to update these data after the device is deployed ? If the data is unchange, you can store it in UICR. If it can be updated at some point, you should use a normal flash page.

    There are many way to get the hex file with the data, but easiest from my point of view is to use nrfjprog -memwr to write directly to the flash. After you have it, you can read the flash out to a hex file. Then you can edit the hex file to reduce it to only the data you need. You would need to understand intel hex syntax.

    Another option is to convert the data to binary and use Jlink loadbin to flash it, please have a look here.

Reply
  • Hi Martin,

    Do you plan to update these data after the device is deployed ? If the data is unchange, you can store it in UICR. If it can be updated at some point, you should use a normal flash page.

    There are many way to get the hex file with the data, but easiest from my point of view is to use nrfjprog -memwr to write directly to the flash. After you have it, you can read the flash out to a hex file. Then you can edit the hex file to reduce it to only the data you need. You would need to understand intel hex syntax.

    Another option is to convert the data to binary and use Jlink loadbin to flash it, please have a look here.

Children
Related