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

nrfjprog program .hex ERROR(nrf52820 OTA test)

Excuse me:

                  When I was testing the OTA of nrf52820 chip, there was a download error in the command line tool。Here are my steps in nrfjprog tool:

1、nrfutil settings generate --family NRF52 --application ble_app_hids_keyboard_pca10100_s112.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex
pause

2、mergehex --merge secure_bootloader_ble_s112_pca10100e.hex settings.hex --output bl_temp.hex
pause
mergehex --merge bl_temp.hex ble_app_hids_keyboard_pca10100_s112.hex s112_nrf52_7.2.0_softdevice.hex --output whole.hex
pause
nrfjprog --eraseall -f NRF52
nrfjprog --program whole.hex --verify -f NRF52
nrfjprog --reset -f NRF52
pause

Finally, the following error occurred:

ERROR: The file specified is not a valid hex file, has data outside valid areas
ERROR: or does not have data in valid areas.

Attachment is my test file, please help me solve it,thank you very much.

                  nRF52820OTAbat.7z

                  

                   

Parents
  • Hi,

    I am not entirely sure what happened here, but the hex file seems to have data outside of the valid address range for the device you are programming. This could be caused by several reasons:

    • Corrupt output from mergehex (updgrade to nRF Comman-line tools 10.12.2 to if that is the case.
    • hex file does not fit in the nRF52820
    • nrfjprog is too old. Again, upgrade nRF Command-line Tools
  • Does the nrf52820 support OTA?I've upgraded to nRF Comman-line tools 10.12.2,The program has been downloaded successfully,But there was no broadcast of "DfuTarg".I use the following protocol stack and bootloader:

    nRF5SDK1702d674dde\nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_bootloader\pca10100e_s112_ble,

    nRF5SDK1702d674dde\nRF5_SDK_17.0.2_d674dde\components\softdevice\s112。

    Do you have any notes on OTA of 52820?

    I use the ble_app_uart routine to test. :

    nRF5SDK1702d674dde\nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_uart\pca10100e\s112\ses。

  • Hi,

    helen said:
    Does the nrf52820 support OTA?

    Yes, all the nRF52 devices support OTA in the same way. However, there is a practical limitation on devices with small flash, as you need to fit the bootloader and depending on the SoftDevice you may not be able to do SoftDevice updates.

    helen said:
    Do you have any notes on OTA of 52820?

    There are no specific considerations. Are you testing on a nRF52833 DK? If so, the 10100e projects should work out of the box. If not, and you are testing on an actual nRF52820 device, you should adapt the bootloader project as described under Transferring emulated project.

    If that is in place and you still have issues with the bootloader, it could be a good idea to test the \examples\dfu\secure_bootloader\pca10100e_s112_ble_debug project instead, as the debug project give sensible RTT logging that will tell you about the state of the bootloader.

    Einar

Reply
  • Hi,

    helen said:
    Does the nrf52820 support OTA?

    Yes, all the nRF52 devices support OTA in the same way. However, there is a practical limitation on devices with small flash, as you need to fit the bootloader and depending on the SoftDevice you may not be able to do SoftDevice updates.

    helen said:
    Do you have any notes on OTA of 52820?

    There are no specific considerations. Are you testing on a nRF52833 DK? If so, the 10100e projects should work out of the box. If not, and you are testing on an actual nRF52820 device, you should adapt the bootloader project as described under Transferring emulated project.

    If that is in place and you still have issues with the bootloader, it could be a good idea to test the \examples\dfu\secure_bootloader\pca10100e_s112_ble_debug project instead, as the debug project give sensible RTT logging that will tell you about the state of the bootloader.

    Einar

Children
No Data
Related