This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debug session fails to run Zephyr blinky sample in VSCode with nRF Connect

Hello,

I'm trying out nRF Connect running inside VS Code and I'm running into issues debuggin my code.  I followed the Nordic setup tutorial and installed the latest nRF Connect SDK, then nRF Command Line Tools with Segger Tools, Visual Studio Code and finally added the nRF Connect extension package (Cortex-Debug,  NRF Connect, nRF Kconfig etc.).  I then created an application as directed, and then a build configuration with debug options enabled.  I then built the application and flashed my board (Thingy:52) and saw the LED blink on my development board.  Up till this point everything worked great, then I tried hitting the debug button under the action menu and received the following error below:

I also tried building, downloading code and debugging in the Segger nRF Connect IDE and everything worked great!  So I assumed my base toolchain is good.  I'm not very experienced with setting up IDEs and based on the tutorial this step should just work without me editing any .jason files etc.  Any obvious things I'm missing?  

Hardware/Software Setup:

OS:  Windows 10

VS Code Version:  1.60.2

nRF Connect SDK Version:  v1.7.0

J-Link Version:  7.54c

Debugger:  j-link segger EDU edtion

Development Board:  Thingy:52

Thanks!

Parker

Parents
  • I was able to fix the same problem on Windows 10 by adding the directory of the .exe (C:\Program Files\SEGGER\JLink for my system) to the system path and restarting VsCode.

    Maybe it will help others.

    Best regards,
    Mark

  • Hi Mark,

    Thank you for sharing your solution so others can find it!

    It was found that this is a bug in the current version of the VS Code extension, where the extension is only looking for the JLink executable in the "Program Files (x85)" directory, and is therefore unable to find the executable when it is installed in "Program Files". This will be fixed in the next release of the extension.

    Another solution in the meantime is to create a symlink between the two directories:

    mklink /d "C:\Program Files (x86)\SEGGER\JLink" "C:\Program Files\SEGGER\JLink"

    Best regards,

    Marte

  • Awesome thank you for the help!  I will test this out shortly.

Reply Children
Related