nrfutil failing - ERASE_CTRL_AP not supported

I am setting up our production facility in India. Brought out our test jig software that flashes the nRF53 modules. 

I use nrfutil to program the boards via "nrfutil device program --firmware C:\\firmware\\merged_domains_1128.hex --options chip_erase_mode=ERASE_CTRL_AP,reset=RESET_SYSTEM,verify=VERIFY_READ --json"

I can not get JLlink to accept the ERASE_CTRL_AP parameter. Its working fine in the UK production facility using the exact same command and the exact same test jig software. The only differences where is the nrfutil device version (see  nrfutil device list command fails ) and the JLink version. I cannot access the UK machine so I cannot list the working versions there - hence this ticket.

C:\Users\isans\OneDrive\Desktop\Debug>nrfutil device list
668CB0C12A8A1D0B
Product         Nano 33 BLE
Ports           COM4
Traits          serialPorts, usb

601003266
Product         J-Link
Traits          jlink, usb, seggerUsb

id:6
Product         USB Hub
Ports           COM5
Traits          serialPorts, usb

Supported devices found: 3




C:\Users\isans\OneDrive\Desktop\Debug>nrfutil device program --serial-number 601003266 --firmware c:\\firmware\\merged_domains_1128.hex --options chip_erase_mode=ERASE_CTRL_AP,reset=RESET_SYSTEM,verify=VERIFY_READ --json
{"type":"task_begin","data":{"task":{"id":"b9555529feb84ead9bd3fe24e5e1260c","description":"601003266","name":"program","data":null}}}
{"type":"task_progress","data":{"task":{"id":"b9555529feb84ead9bd3fe24e5e1260c","description":"601003266","name":"program","data":null},"progress":{"progressPercentage":0,"name":"program","description":"Connecting to probe","step":1,"amountOfSteps":5,"state":"progress","duration":0,"error_code":null,"message":null,"result":"success"}}}
{"type":"task_progress","data":{"task":{"id":"b9555529feb84ead9bd3fe24e5e1260c","description":"601003266","name":"program","data":null},"progress":{"progressPercentage":100,"name":"program","description":"Connecting to probe","step":1,"amountOfSteps":5,"state":"progress","duration":51,"error_code":null,"message":null,"result":"success"}}}
{"type":"task_end","data":{"task":{"id":"b9555529feb84ead9bd3fe24e5e1260c","description":"601003266","name":"program","data":null},"message":"Failed, chip_erase_mode=ERASE_CTRL_AP is not yet supported in the probe-plugin","result":"fail","error":{"code":1,"description":"Generic"}}}
Error: One or more program tasks failed:
 * 601003266: chip_erase_mode=ERASE_CTRL_AP is not yet supported in the probe-plugin (Generic)


Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: hid_write
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: hid_write
  15: BaseThreadInitThunk
  16: RtlUserThreadStart

ChatGPT (yes I have had to use that) is suggesting that I should be seeing a line with "probe-plugin JLink" in the device list output. Apparently as thats not there, the nrfutil isnt using the JLink debugger - its using "generic. 

Is that right? And how can I get it to show up here......

All the hardware connections are fine as I can use the nRF Programmer v4.6.2 to program the hex file. Its just nrfutil thats giving me the issue

Parents
  • Hi,

    I reproduce this on my end as well and we are looking into it. If you need something working in the mean time, could it be an option to run "nruftil device recover" first, then program without the erase option?

  • The recover works to erase it, but if I remove the ERASE_CTRL part then I still get an error

    nrfutil device program --serial-number 601003266 --firmware c:\\firmware\\merged_domains_1128.hex --options reset=RESET_SYSTEM,verify=VERIFY_READ --json
    {"type":"task_begin","data":{"task":{"id":"90baf971db3047958eac570749819c60","description":"601003266","name":"program","data":null}}}
    {"type":"task_progress","data":{"task":{"id":"90baf971db3047958eac570749819c60","description":"601003266","name":"program","data":null},"progress":{"progressPercentage":0,"name":"program","description":"Connecting to probe","step":1,"amountOfSteps":5,"state":"progress","duration":0,"error_code":null,"message":null,"result":"success"}}}
    {"type":"task_progress","data":{"task":{"id":"90baf971db3047958eac570749819c60","description":"601003266","name":"program","data":null},"progress":{"progressPercentage":100,"name":"program","description":"Connecting to probe","step":1,"amountOfSteps":5,"state":"progress","duration":58,"error_code":null,"message":null,"result":"success"}}}
    {"type":"task_progress","data":{"task":{"id":"90baf971db3047958eac570749819c60","description":"601003266","name":"program","data":null},"progress":{"progressPercentage":0,"name":"program","description":"Erasing non-volatile memory (ERASEALL)","step":1,"amountOfSteps":5,"state":"progress","duration":130,"error_code":null,"message":"Erasing non-volatile memory (ERASEALL)","result":"success"}}}
    {"type":"task_progress","data":{"task":{"id":"90baf971db3047958eac570749819c60","description":"601003266","name":"program","data":null},"progress":{"progressPercentage":100,"name":"program","description":"Erasing non-volatile memory (ERASEALL)","step":1,"amountOfSteps":5,"state":"progress","duration":493,"error_code":null,"message":"Erasing non-volatile memory (ERASEALL)","result":"success"}}}
    {"type":"task_end","data":{"task":{"id":"90baf971db3047958eac570749819c60","description":"601003266","name":"program","data":null},"message":"Failed, Device error: Address range 0x01000000..0x010059dc is outside the memory ranges defined for programming through the Application core","result":"fail","error":{"code":1,"description":"Generic"}}}
    Error: One or more program tasks failed:
     * 601003266: Device error: Address range 0x01000000..0x010059dc is outside the memory ranges defined for programming through the Application core (Generic)

    The hex file is known good. If I use the Nordic Programmer via nRF Connect then I can program using that. This is my fall back solution for now. Not great having to tell our production folks to use a workaround, but its a fallback position.

  • Hi,

    I understand. It looks like this issue was introduced in device v2.7.16, so if you use a version older than that it should work. We plan to fix it, but I cannot say when it will be done.

Reply Children
Related