nrfjprog error for merged_domains.hex on nRF5340

nRF5340
NCS 2.6.1
nrfjprog 10.18.1

My project is based on coap_client and also uses MCUBOOT.

I can program both cores using VS Code, and I notice it splits merged_domains.hex into separate files for the application cpu and network core cpu.  It programs each separately.

-- west flash: using runner nrfjprog
-- runners.nrfjprog: Flashing file: d:\FloLogic\VS_Code_Projects\FloLogic_NCS_2_6\fl_digitalio\build_5340\zephyr\merged_domains.hex
-- runners.nrfjprog: d:\VS_Code_Projects\NCS_2_6\myproject\build_5340\zephyr\merged_domains.hex targets both nRF53 coprocessors; splitting it into: d:\VS_Code_Projects\NCS_2_6\myproject\build_5340\zephyr\GENERATED_CP_NETWORK_merged_domains.hex and d:\VS_Code_Projects\NCS_2_6\myproject\build_5340\zephyr\GENERATED_CP_APPLICATION_merged_domains.hex
[ #################### ]   8.655s | Erase file - Done erasing                                                          
[ #################### ]   0.929s | Program file - Done programming                                                    
[ #################### ]   0.943s | Verify file - Done verifying                                                       
[ #################### ]  27.379s | Erase file - Done erasing                                                          
[ #################### ]   3.764s | Program file - Done programming                                                    
[ #################### ]   3.816s | Verify file - Done verifying                                                       
-- runners.nrfjprog: Board with serial number 1050012637 flashed successfully.

For production I need to use a command line in a script.  This seems to be the recommended way in the documentation, and in DevZone answers. 

But I get an error:
.

>nrfjprog --program merged_domains.hex --recover --verify --reset
Recovering device. This operation might take 30s.
[error] [ Worker] - Address 0x01000000 does not map to a known memory.7
ERROR: The file specified is not a valid hex file, has data outside valid areas
ERROR: or does not have data in valid areas.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

How do you split the file?

What is the right way to use merged_domains.hex?

Thanks,

Mary

Related