Hi Nordic Support!
I'm working on a custom board using the nRF54L15. I'm utilizing both mcuboot and the flpr core, so in total I have three domains to flash. This works fine when I run west flash. All three images get flashed. But sometimes I need to run west flash --recover (performing a DFU seems to lock the RRAM). In these cases I get the following log in my shell:
(ncs) user@computer% west flash --recover -- west flash: rebuilding [0/11] Performing build step for 'app' ninja: no work to do. [1/11] Performing build step for 'flpr' ninja: no work to do. [4/11] Performing build step for 'mcuboot' ninja: no work to do. [10/10] Completed 'mcuboot' WARNING: Specifying runner options for multiple domains is experimental. If problems are experienced, please specify a single domain using '--domain <domain>' -- west flash: using runner nrfutil -- runners.nrfutil: reset after flashing requested There are multiple boards connected. 1. 000821009665 2. 000960098736 3. 001057757641 Please select one with desired serial number (1-3): 3 -- runners.nrfutil: Recovering and erasing all flash memory. -- runners.nrfutil: Flashing file: <project-dir>/build/mcuboot/zephyr/zephyr.hex -- runners.nrfutil: Recover -- runners.nrfutil: Programming image -- runners.nrfutil: Verifying image -- runners.nrfutil: Reset -- runners.nrfutil: Board(s) with serial number(s) 1057757641 flashed successfully. -- west flash: using runner nrfutil -- runners.nrfutil: reset after flashing requested -- runners.nrfutil: Recovering and erasing all flash memory. -- runners.nrfutil: Flashing file: <project-dir>/build/flpr/zephyr/zephyr.hex -- runners.nrfutil: Recover -- runners.nrfutil: Programming image -- runners.nrfutil: Verifying image -- runners.nrfutil: Reset -- runners.nrfutil: Board(s) with serial number(s) 1057757641 flashed successfully. -- west flash: using runner nrfutil -- runners.nrfutil: reset after flashing requested -- runners.nrfutil: Recovering and erasing all flash memory. -- runners.nrfutil: Flashing file: <project-dir>/build/app/zephyr/zephyr.signed.hex -- runners.nrfutil: Recover -- runners.nrfutil: Programming image -- runners.nrfutil: Verifying image -- runners.nrfutil: Reset -- runners.nrfutil: Board(s) with serial number(s) 1057757641 flashed successfully.
When the mcuboot image is done flashing, the device immediately starts running, and mcuboot prints E: unable to find bootable image. This is understandable, since the cpuapp image hasn't been flashed yet (although it would be nice if the device only booted after it was completely flashed).
After this, the device does nothing. Resetting with nrfutil does nothing, reset button does nothing etc. I think this is due to west flash --recover performing the --recover routine for each domain/image. So after being flashed, the mcuboot image is erased when cpuapp is flashed, which is again erased when cpuflpr is flashed. You can see this happening in the log.
The best workaround I have right now is to run west flash --recover && west flash, or alternatively nrfutil device recover && west flash (but then I have to write the debugger serial number). I think I didn't use to have problems with running west flash --recover. The issue started showing up when I began working on different revisions of my custom board.
Is there any way to tell west flash to only recover once?
Best Regards,
Fridtjof