nRF Connect SDK v2.1.1 "Invalid toolchain installation." Error

I installed nRF Connect SDK v2.1.1 on a Ubuntu 22.04 system according to the instructions at "https://academy.nordicsemi.com/topic/exercise-1-1/".

Upon launching VSCode via the Toolchain Manager, I get the following error when I do a "Quick Setup" in the "Welcome to nRF Connect" tab:

The prompt indicates that nrfjprog needs to be executable in PATH. The problem is, IT IS EXECUTABLE IN PATH:

I searched and found Case ID: 293092, which seems to report a similar problem, but the referenced /var/lib/dpkg/info/nrf-command-line-tools.postist file does not look like the one in my system:

After wasting many hours on this, turns out the solution is to download and install the latest Jlink from Segger's website ("https://www.segger.com/downloads/jlink/JLink_Linux_V782_x86_64.deb"). I offer this soltuiotn as a small but I fear fruitless consolation to everyone who has wasted countless hours over this nRF  Connect installer bug, and the infuriatingly stupid and uninformative error message in nRF Connect.

P.S. Attention Nordic, this king of BS is why I hate IDE's. Please offer the nRF BLE stack in a form that can be used in a bare metal project. I do not need/want your HAL, I do not need/want your RTOS, I do not need/want your horrible MS IDE thing. I could care less about demos to impress managers about how easy and fast it is to develop in the Nordic ecosystem. I DO want to avoid the typical proprietary IDE hassles by using professional fool-proof embedded development tools that just work, i.e. vim, grep, gdb, openocd, make, etc. Thank you for your consideration.

  • I can second this problem. The error message does it not make very clear where the problem is. And if I remember correctly the documentation is also not so clear on this topic (some tools/versions package the JLink support libs?). And worse of all, I think I do not need `nrfjprog` for the nrf52840 Dongle as this is not supported, but as this is also not so clear in the beginning when following the documentation, trying to configure the IDE "correctly" is even more frustrating.

    I also prefer to work with the typical vim setup, so having some easy to use guides/examples for non IDE would be great. Followed the VS Code path because this seemed a lot easier to bring up the device compared to the non recommended manual tool installation.

  • Hi,

    After wasting many hours on this, turns out the solution is to download and install the latest Jlink from Segger's website

    I am happy to hear that you found the solution to the issue. I have reported the misleading error message to the VS Code extension team.

    After some checking, it turns out installing nRF Command Line Tools triggers install of J-Link Software and Documentation Pack on the other platforms, but not on Ubuntu where it must be installed manually (although the package should be included in the nRF Command Line Tools download.) I have reported this lack of automatic J-Link install to the DevAcademy team. It is definitely our fault for not giving the proper install instructions, and I am sorry for that.

    Regarding toolchain, while we do have a main recommendation you are free to use the tools that you want. For instance, I sometimes use grep (and vim) myself, for quickly figuring something out. If you don't want to use an IDE at all, you can use the west command line utility for managing the SDK and your project, together with your favorite text editor, debugger, etc. We have many developers in-house doing exactly that, and I expect that a number of customers do the same as well. While we do not have guides explicitly targeting that demographic, you will get help and pointers here on DevZone should you have any questions.

    You are also free to use only part of the SDK together with your own solutions. Please note however, that doing so means you are to some extent "left on your own for figuring things out." In practice you will often get pointers and suggestions here on DevZone, but the closer to bare metal you go the more heavy lifting you should be prepared to do yourself. Please note also that wireless protocols such as Bluetooth LE often requires qualification or certification of the stack - which we provide for the stacks delivered with the SDK. I highly recommend  giving the full SDK a chance, be it using VS Code or using west with your set of preferred development tools.

    Regards,
    Terje

  • Hi,

    teeuu said:
    The error message does it not make very clear where the problem is. And if I remember correctly the documentation is also not so clear on this topic

    Yes, this is clearly an error message bug, as in this situation it points in the wrong direction. This is also a documentation bug in DevAcademy and for nRF Command Line Tools, for the Ubuntu target platform, as neither states the requirement of installing the J-Link Software and Documentation Pack.

    teeuu said:
    I think I do not need `nrfjprog` for the nrf52840 Dongle as this is not supported

    The main way to program the nRF52840 Dongle is Device Firmware Upgrade (DFU), since it does not have an on-board debugger, unlike the DKs. It is also possible to use a DK (with on-board debugger,) or a J-Link debugger, and connect to the Dongle, if you have the proper J-Tag cable or solder onto the right pads of the Dongle. See nRF52840 Dongle Programming Tutorial for details. Please note that the DFU solution on the nRF52840 Dongle is based on nRF5 SDK, which is our previous SDK, now in maintenance mode. For new projects, we recommend using a DK not the Dongle, and the nRF Connect SDK. See nRF Connect SDK and nRF5 SDK statement for more on the current state of SDKs.

    Regards,
    Terje

Related