unable to flash using Jlink

Hi Everyone,

I'm using nrf52833 controller, nrfconnect sdk v1.7.0 and Vs code to develope.

I'm trying to flash our custom board with Jlink, which I did for over a long time.

Suddenly I'm not able to flash, and I get this following error. 

the error says "The --family option given with the command (or the default from
ERROR: nrfjprog.ini) does not match the device connected."

I haven't edited any file or settings, I just used normal build and flash buttons available in Vscode.

Does any flash related file is corrupted here?

> Executing task: nRF Connect: Flash: tmnordic/build (active) <

Flashing build to undefined
west flash -d c:\Nordic_App\Project\test\tmnordic\build --skip-rebuild -r nrfjprog --snr 269302463

-- west flash: using runner nrfjprog
-- runners.nrfjprog: Flashing file: c:\Nordic_App\Project\test\tmnordic\build\zephyr\zephyr.hex
ERROR: The --family option given with the command (or the default from
ERROR: nrfjprog.ini) does not match the device connected.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
FATAL ERROR: command exited with status 18: nrfjprog --program 'c:\Nordic_App\Project\test\tmnordic\build\zephyr\zephyr.hex' --sectoranduicrerase -f NRF52 --snr 269302463
The terminal process terminated with exit code: 18.

Terminal will be reused by tasks, press any key to close it.

Here I have checked voltage at reset pin and I got 3.3 v.

what might went wrong, can anybody help me?

Parents
  • Hi,

    Did this happen after updating to version 2022.4.219 of the nRF Connect for VS Code extension, or did it happen without anything being updated?

    Can you generate support information from VS Code while the device is connected and turned on? To generate this open command palette and write nRF Connect: generate support information. Copy the information generated in the output terminal and upload it here using Insert > Code.

    Best regards,

    Marte

Reply
  • Hi,

    Did this happen after updating to version 2022.4.219 of the nRF Connect for VS Code extension, or did it happen without anything being updated?

    Can you generate support information from VS Code while the device is connected and turned on? To generate this open command palette and write nRF Connect: generate support information. Copy the information generated in the output terminal and upload it here using Insert > Code.

    Best regards,

    Marte

Children
  • Hi Marte

    I've not updated any software related to nrfconnect recently, the entire setup is working fine till yesterday. 

    I've created supported log as you asked for... please check it once.

    Edit:

    After I've got flash error, then I've uninstalled VS Code and reinstalled it again, today.

    Edit2:

    I'm sorry for troubling you. It's just my cable issue, once I've changed it everything worked fine.

    Thank you for your support.

  • Hi,

    VS Code often updates extensions automatically and the new version will be in effect after a reload, so the nRF Connect for VS Code extension might have been updated without you knowing. The reason I asked is because this version was released on Tuesday, so if you have not made any other changes and it suddenly stopped working it might be caused by the some changes in the new version. I do not know if the support information is from before or after you reinstalled VS Code, but in that you have the latest version of the extension at least. 

    I am not able to see anything wrong just from looking at the support information, but there are a couple of things you can try that might give me more information. The first is to run the following command and tell me what the output is:

    nrfjprog --deviceversion --snr 269302463

    The other thing you can try is to program the device using nrfjprog on command line with logging enabled. Go to the build folder of your application (c:\Nordic_App\Project\test\tmnordic\build), and run the following command:

    nrfjprog -f nrf52 --snr 269302463 --program zephyr\zephyr.hex --sectoranduicrerase --verify --log

    Copy the log you get from running the command and upload it here.

    Best regards,

    Marte

Related