nrfjprog and jlink not found on linux (ubuntu 22 lts)

i had a up to date segger install before setting up nordic tools.

i have stored the nordic command line tools profile local.

both are in path ~ reachable from command line.

the nordic vs code plugin seems to not use the path.

how to fix the vs code error message?

there is a 2 year old thread "nrfjprog on Linux: support for LD_LIBRARY_PATH broken from 10.5.0 onwards and `/opt/SEGGER/JLink` hardcoded instead" . the mentioned problem might com up also ?

Parents Reply Children
  • yes ,i made that the profile is updated (relogin).

    now i doublechecked: boot & login & start vscode : problem persists

  • Hi _rm,

    Maria is out of office and I will try to support you in her absence.

    Could you please help try to add nrjprog and jlink to path manually from .bashrc (by export PATH=<PATH_TO_EXE>:$PATH).

    If that doesn't work, please help try the following:

    • Run echo $PATH on a regular terminal, and a terminal launched from the Toolchain Manager and compare.
    • Run nrfjprog -v on a regular terminal, and a terminal launched in VS Code

    If nothing obvious stands out, please run "nRF Connect: Generate Support Information" in VS Code and share with us the information.

    Please note that due to the Easter holiday, our responses on DevZone might be delayed. Our apologies for the inconveniences.

    Hieu

  • running  "nRF Connect: Generate Support Information" in vscode does not yield an (error) report, just a toast message "generating support information"

  • Looks like it's jlink that is not working correctly, causing nrfjprog to malfunction, and the VS Code Extension to complain about both of them.

    Here are a few previous DevZone cases regarding this. All of them share a recommendation to reinstall J-Link tools in some way, so I think it should be the fix for you. Please go over them and see if following the exact steps described there helped you.
    RE: JLinkARM DLL load failed on Ubuntu 
    VS Code & nrfjprog (nRF Connect SDK) problem on Linux 
    Ubuntu 20.04 "Installing automatically" broken - nrfjprog not found 

    _rm said:
    running  "nRF Connect: Generate Support Information" in vscode does not yield an (error) report, just a toast message "generating support information"

    If none of the solutions above work, please try this again. It should print the information to the Output tab, and there should also be another toast that have a button for quick copy of the info, like my screenshot below:

  • point is: jlink is working.

    i use that laptop with a segger jlink succesfu and can show that  eg with teamviewer if needed.

    i showed already that jlink is found in the path. first post -> image -> which

    point is: the nordic vscode extension does say that it does not find jlink - despite i being in the path.

    as a first step i'd suggest to fix the wrong/misleading error message.

    from the links you gave

    "Yes, you need to install the JLink too. You must add the folder containing JLink.exe to your path. This should help you." : that is done.

    "sudo apt remove jlink
    sudo dpkg -i JLink_Linux_<version>.deb"
    well, segger software works, then the vscode extension should be able to use it.

    "VS Code may HAVE FOUND nrfjprog, but it tried running --version flag in order to determine the version number, and it caused the following to appear in its input buffer: ...

    This causes it to return an error that assumed that nrfjprog wasn't installed in $PATH, which is the default assumption. Actually it was missing a shared object library that needed to be installed, which made it malfunction.

    ...

    My solution was to download and install Segger's JLink package, and then I ran:
    "sudo dpkg -i JLink_Linux_*Version*_*platform*.deb""



    a) there seems to be a flaw in the vscode extension. wrong handling of input. that should be fixed.
    b) as  the segger software is installed and not found maybe enabling to explicitly configure the path in the extension should help.

Related