nRF Connect for VS Code settings failure and consequences

Hello, this ticket addresses three issues:

1. After installing nrfutil with subcommands device and toolchain-manager and sdk-manager, into %USERPROFILE%\.nrfutil, everything works fine when I set Nrf-connect › Nrfutil: Home in VS Code to that value. However, when I only install subcommands device and toolchain-manager, like the help information paragraph for that variable states, things do not work. So, this ticket I am opening to ask you to update the help information. I realize that sdk-manager is a newer command than toolchain-manager.

2. After setting the Nrf-connect › Nrfutil: Home variable, it is ignored when I attempt to flash a device. Instead, nRF Connect for VS Code insists on using the nrtutil in the toolchain.

3. As you are hopefully aware by now from various tickets that I and others have opened, C:\ncs\toolchains\66cdf9b75e\nrfutil\home\bin\nrfutil-device.exe has a bug and does not work if there are any CH340 or CP2102 devices on the USB bus. I was forced to replace that file in the toolchain with C:\Users\test\.nrfutil\bin\nrfutil-device.exe in order to flash my nRF9160DK when I have a CP2102 device on the USB bus.

The three issues are of course closely interrelated. Please let me know the schedule and plans for fixing these issues.

Regards,

Burt Silverman

  • Sorry, when I say "everything works fine" in my 1. above, I mean that I things don't hang when I select nRF Connect for VS Code in my vertical list of icons to the left of VS Code. I was not referring to the subsequent flashing problems.

    Burt

  • Hello,

    I will forward your feedback internally.

    Kenneth

  • Thank you, Kenneth. Please note that the item 3 I listed is something that I would like to be addressed in a shorter time frame than items 1 and 2. I want to be able to tell my colleague, "Nordic says 'do this' to either update the nrfutil-device.exe in v3.2.1 toolchain or something 'equivalent' so he can flash his board from VS Code. He always trusts what comes from DevZone more than he trusts what comes from me--even if I have a good workaround. Thanks.

    Burt S

  • Hi Burt,

    The nrfutil is bundled with the toolchains (in addition to possible local version), so if there are issues that are fixed in later releases then nrfutil needs to be updated. This can for instance be done by opening a nrf connect terminal in VS code and type 'nrfutil upgrade device' for the specific sdk/toolchain. Usually you will get an error message that the file is locked, so you need to follow a description on how to update it.

    Please be aware toolchain-manager is not used for quite some time, sdk-manager replaced it. So please only use sdk-manager when possible.

    The extension bundles both binaries and there's no point configuring nrfutil home, best to clear that setting, so the bundled binaries will be used and not the local version. This setting is only to be used when the user has good reason to use other versions (e.g. to fix issues). Also the value for the setting when referring to an environment variable should be ${env:USERPROFILE}/.nrfutil.

    Regarding 3. As far as I can find, version 2.15.3 of nrfutil device has been released with a fix for this.

    Best regards,
    Kenneth

  • Hi Kenneth,

    Regarding your second paragraph, the issue is not whether or not I use the toolchain-manager or the sdk-manager; the issue is that the built in help information in nRF Connect for VSCode for Nrf-connect › Nrfutil: Home references toolchain-manager rather than sdk-manager. So, it is the nRF Connect for VSCode developers that you need to be informing about the deprecation of toolchain-manager!! Hopefully that has been accomplished as you say you have forwarded the feedback internally.

    Thank you for correcting my syntax ${env:USERPROFILE}/.nrfutil. I may have mistyped when I opened this ticket--regardless, I have set that up correctly now under User Settings. And my original item 2 remains valid and contradicts your suggestion that this can be used to correct errors. You can see this by setting your nRF Connect for VS Code to use the v3.2.1 toolchain for your favorite application. Then do "Open Terminal" from the WELCOME menu. In the terminal, use the PS Get-Command command. You will see something like:

    Working directory: c:\Users\Burt\hci_uart_1
    SDK: nRF Connect SDK v3.2.1
    Toolchain: nRF Connect SDK Toolchain v3.2.1

    PS C:\Users\Burt\hci_uart_1> Get-Command nrfutil

    CommandType Name Version Source
    ----------- ---- ------- ------
    Application nrfutil.exe 0.0.0.0 C:\ncs\toolchains\v3.2.1\nrfutil\bin\nrfutil.exe

    PS C:\Users\Burt\hci_uart_1>

    I think it is safe to conclude that Nrfutil:Home is being IGNORED!

    Please make sure that the developers are aware of this, too.

    Thanks, Kenneth.

    Burt S.

    ps, I exited and restarted VS Code after making the settings change just to be certain that a restart was not necessary. I also tried it before restarting.

Related