nRF Connect for VS Code Generate Support not working properly on Linux

Hi,

This ticket is related to ticket #294825, but I wanted to separate out one definite issue into a separate ticket so it can be more carefully addressed.

The issue is related to these variable definitions in settings.json shown below. In this particular case I am using code from SDK v2.0.2 and a v2.0.0 toolchain, but you can prove to yourself that the same problem will occur if the SDK and the toolchain match. Now, the strange toolchain.path below is the correct path but with some TYPOES inserted. With the typos (or typoes), there is no problem generating support information. HOWEVER, if I remove the TYPOES and spell the toolchain path correctly, then the support information is not printed in the nRF Connect OUTPUT terminal window. If I create a phony toolchain directory (mkdir /home/burt/phony/toolchain) and set the toolchain path to that, the support information is printed. Only with a real toolchain path is the problem seen.

Also please note that up until a short while back, when I tried "the trick" and closed out VS Code, when I restarted it the path would get rewritten to the actual correct path--the one that stops the console output of support information. It's a bit of a mystery what I changed but now that weirdness is not happening. I thought adding the topdir made a difference, but that does not seem to matter.

Please investigate this thoroughly--it won't disappear by my wasting time creating virtual machines, and so forth. Even if there was something weird in my workspace, the system needs to be robust enough to help the user find any fault. But I doubt there are any faults in my downloaded SDK.

Ubuntu 22.04.1 LTS is the operating system.

"nrf-connect.toolchain.path": "T/homeY/burtP/ncsO/v2.0.0E/toolchainS",
"nrf-connect.topdir": "/home/burt/ncs/v2.0.2"
  • Hi Priyanka,

    Yes, the exception message answered the most important part of the mystery.

    [6349:1002/093404.425760:INFO:CONSOLE(603)] "%c ERR color: #f33 unable to find JLink version in output: Command failed: "/opt/SEGGER/JLink/JLinkExe" -NoGui 1 -USB 0
    : Error: unable to find JLink version in output: Command failed: "/opt/SEGGER/JLink/JLinkExe" -NoGui 1 -USB 0

    at c._executeContributedCommand (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:63956)

    My JLinkExe was too old; it was V6.62b from February 2020. That version did not support the -NoGui 1 option. I updated to V7.80c, and the Generate support information has no problem now. The weird thing is that earlier, as I mentioned in the ticket, I could generate the support information by using the phony toolchain directory. Anyway, the old version of JLinkExe produced the version information despite the error message, so it would seem that nRF Connect for VS Code should ignore the error message from JLinkExe as long as it can get the version AND if they want to put up a message telling the user that JLinkExe should be upgraded that would be much better than crashing out. Here is the output from the old JLinkExe:

    $ /opt/SEGGER/JLink/JLinkExe -NoGui 1 -USB 0
    SEGGER J-Link Commander V6.62b (Compiled Feb 17 2020 18:43:08)
    DLL version V6.62b, compiled Feb 17 2020 18:42:57

    Unknown command line option -NoGui.

    I will wait to hear back from you about what the devs think of my idea, before closing the ticket.

    I was now trying to figure out why my JLinkExe had never been updated automatically--I know that on Windows from time to time something I did caused JLink to update. I know it is unrelated to the nrf command line tools. And I just used toolchain manager to install a fresh v2.1.0 and I did not see anything obvious about JLink. Maybe because I had just updated JLinkExe from the SEGGER web site. Oh, well.

    Thanks Priyanka,

    Burt

  • Hi Burt,

    Thank you for the update and help. I have passed on the message to the experts. Slight smile

    We think this is a great idea and we will work on improving how the extension reacts to older J-Link versions!

    -Priyanka

  • Thanks again for your help, Pryanka. I can't find the Reply button at the bottom of the thread, so hopefully this shows up. I will close the ticket.

    Burt

  • I can't find that Verify button to close the ticket. I will let you close it, Priyanka.

Related