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

Issues with mergehex nRF52811

Having a bizarre issue with mergehex and DFU.  I hadn't had a problem with this previously with this code base.  When I try and merge the App, Bootloader, Bootloader Settings and SD I get the following when I program the chip:

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

As a secondary test I just program the SD and Bootloader and DFU the application code with the package I generated.  Using the same scripts I've used previously:

Bootloader DFU Settings:
* File: C:\nRF_Programming\FW_Programming\FW_Files\Validation\bootloader_settings_SDK15_3.hex
* Family: nRF52
* Start Address: 0x0007F000
* CRC: 0xAB67A024
* Settings Version: 0x00000002 (2)
* App Version: 0x00000001 (1)
* Bootloader Version: 0x00000001 (1)
* Bank Layout: 0x00000000
* Current Bank: 0x00000000
* Application Size: 0x000062F8 (25336 bytes)
* Application CRC: 0xB8D4433F
* Bank0 Bank Code: 0x00000001
* Softdevice Size: 0x00000000 (0 bytes)
* Boot Validation CRC: 0x25B033AB
* SD Boot Validation Type: 0x00000000 (0)
* App Boot Validation Type: 0x00000001 (1)

However at the completion of the DFU upload the Application won't start-up?  This suggests that there may be an issue with the Bootloader DFU Settings Generation, however I cannot see any issues.  I've created DFU packages with this code base before and testing the DFU of earlier packages is fine.  I just can't seem to track down what could be causing the issue.

This is the script I use to generate the Settings:

nrfutil settings generate --family NRF52 --application C:\nRF_Programming\FW_Programming\FW_Files\Application\nrf52811_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 C:\nRF_Programming\FW_Programming\FW_Files\Validation\bootloader_settings_SDK15_3.hex

Script for DFU package generation

nrfutil pkg generate --hw-version 52 --application-version 1 --application DFU_Package_Generation\Images\nrf52811_xxaa.hex --sd-req 0x00 --key-file DFU_Package_Generation\Private_Keys\dfu_private.key DFU_Package_Generation\DFU_Packages\DFU_Package_FW3_0_2.zip

Related