Clean install of VSCode toolchain fails on MacOSX (Apple Silicon)

Hi,

I have been performing a fresh install of the toolchain following the nordic's "nRF Connect for VS Code" page, as well as the YouTube video "Introducing nRF Connect for VS Code".

Given previous problems (which lead me to re-install the whole thing), I brew-installed the latest python version 3.13.0, which the VSCode terminal recognizes as the version in use (i.e. python3 --version shows this version). Despite this, the nRF Connect output shows that the Toolchain validation report claims that my python version is outdated. Specifically, the nRF Connect window shows:

Fullscreen
1
2
3
4
[04:50:19] =========== Toolchain validation report for nRF Connect SDK Toolchain v2.7.0 ===========
📦 Using the nRF Connect SDK v2.7.99-cs2 at /opt/nordic/ncs/v2.7.99-cs2
đź•’ zephyr-sdk is outdated. Found 0.16.5-1, but 0.16.8 is required by the SDK.
đź•’ python is outdated. Found 3.9.6, but 3.12.4 is required by the SDK.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I am adding the detailed install log (written as a markdown .md file but attached as a .txt file because of filetype restrictions).

Any input is highly appreciated.

Thanks.

Armand

PS: the solution for this issue is described below in the post starting with: "The solution of this issue has two parts summarized below". Thanks  .

7563.20241020_nrfconnect_install_log.txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Install log: nRF Connect on VSCode redo
Re-installing the whole thing to try out the solution proposed by nordic devzone.
## changed git global setting:
```
git config --global http.postBuffer 104857600
```
## Removed previous configs:
- removed directory `~/.vscode`
- removed directory `~/Library/Application Support/Code`
- sudo-removed directory `~/opt/nordic/ncs`
## Back to nrf Connect for VS Code documentation
- Going back to https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-VS-Code > Downloads
- nRF Command Line Tools: https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools > Downloads > MacOS v10.24.2
- https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/desktop-software/nrf-command-line-tools/sw/versions-10-x-x/10-24-2/nrf-command-line-tools-10.24.2-darwin.dmg
- opening nrf-command-line-tools-10.24.2-darwin.dmg
- Install nRF Tools: all except pynrfjprog. Successful.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parents
  • PS: I am able to flash my nRF52-DK (PCA10040) despite the Toolchain validation report indicating the issues reported above.

  • Hi,

    In your log, I can see "error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400" and "fatal: unable to write request to remote: Broken pipe". The error is mentioned in this ticket. Can you try out suggested solution and check if it works in your case?

    Best regards,
    Dejan

Reply
  • Hi,

    In your log, I can see "error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400" and "fatal: unable to write request to remote: Broken pipe". The error is mentioned in this ticket. Can you try out suggested solution and check if it works in your case?

    Best regards,
    Dejan

Children
  • Hi Dejan,
    Thanks a lot for your reply. Your suggestion definitely helped, but it unfortunately didn't solve the problem:

    • The git errors are now gone
    • Installation of the SDK went from hours to minutes
    • but the SDK complaints about outdated zephyr and python persist. Yes, python3 is still the new version I installed with home-brew.

    Since I seem to be unable to add my log file here, I am pasting the VSCode support information below (masking only my username)

    One thing I have noticed: my (new) logs show that the initial toolchain validation report (before installing v2.7.99-cs2; lines 36-37 in the log) comes back clean. Only after installing v2.7.99-cs2 do I see the complaints about outdated python and zephyr. Coincidence?

    Best regards,

    Armand
    PS: I found a way to attach the file: It's now added to the main post under 20241021_nrfconnect_install_log_redo.txt .

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    {
    "platform": {
    "os": "darwin",
    "osVersion": "Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000",
    "osKernel": "23.6.0",
    "vscode": "1.94.2",
    "electron": "30.5.1",
    "node": "v20.16.0"
    },
    "system": {
    "date": "2024-10-21T23:51:25.351Z",
    "vscodeRoot": "/private/var/folders/d3/1g3tcb2s3p13xyvgz3y8cln80000gn/T/AppTranslocation/81A5E17D-3375-44A3-9F7F-E5CDA75C7221/d/Visual Studio Code.app/Contents/Resources/app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:09:12",
    "osUptime": "814:04:17",
    "cpu": "Apple M1 Max"
    },
    "workspace": {
    "name": null,
    "workspaceFile": null,
    "folders": []
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

    aniederberger said:
    but the SDK complaints about outdated zephyr and python persist.

    Can you elaborate on this? Could you provide the steps you took before you got python and zephyr-sdk "outdated" messages? In which nRF Connect window do you see these "outdated" messages?

    aniederberger said:
    Only after installing v2.7.99-cs2 do I see the complaints about outdated python and zephyr. Coincidence?

    I assume this is NCS v2.7.99-cs2. Is this correct? If yes, how did you install it? Is everything working fine (no "outdated" messages) with previous NCS versions?

    Best regards,
    Dejan

  • Hi Dejan,

    TLDR: after setting git config --global http.postBuffer 104857600, as suggested in the post you referenced, and then installing the slightly older (NCS) SDK v2.7.0, the Toolchain validation does not throw any errors. Thank you.

    In response to your questions:

    1. what I mean is that the original reason for this post persists: the claim that zephyrs-dk is outdated, and the claim that python is outdated (even though python 3.13 is clearly the default version now, as shown when writing python3 --version in the vscode terminal). These errors are seen when I click on "Manage toolchains", then "Validate Toolchain". The output is in the "OUTPUT" window, "nRF Connect".

    2. I added the log created after your suggestion of changing the global git setting to the original post for reference: 20241021_nrfconnect_install_log_redo.txt. Lines 36-37 show that after installing the toolchain, the validation seems to indicate that everything is ok. Right after this (line 39), I am installing the SDK at the end of which the validation report shows the outdated messages.

    3. Great catch: I have just installed (NCS) SDK v2.6.1 and v2.7.0 and the Toolchain validation now (using these versions) does not detect any issues with the toolchain. This didn't seem to work before implementing your git config change, but now it does. Note that the Toolchain validation with SDK v2.7.99-cs1 complains about zephyr-sdk being outdated, but it does not complain about python. Finally, I uninstalled and reinstalled v2.7.99-cs2 and the original error messages (outdated zephyr-sdk and python) are back. Therefore, I will use (NCS) SDK v2.7.0 and keep an eye out for new versions unless you advise otherwise.

    Thanks for your help. Please let me know if there is anything else I can clarify or describe more accurately to help you locate the issue. Also, please let me know if you don't want me to use (NCS) SDK v2.7.0 for some reason. Otherwise, I will mark this issue as resolved.

    Best,

    Armand

  • Hi Armand,

    In your initial output log, I see this message <Now run "west update" inside /opt/nordic/ncs/v2.7.99-cs2">. Can you confirm that you have done this step?

    Are all your NCS versions (v2.6.1, v2.7.0 and v2.7.99-cs2) located in the same /opt/nordic/ncs folder?

    Best regards,
    Dejan

  • Hi Dejan,

    I see 'Now run "west update" inside /opt/nordic/ncs/v2.7.99-c2' in the log (redo-log line 55), followed by 'exited with code 0' (line 57), and '[west]: updating /opt/nordic/ncs/v2.7.99-cs2...' (line 60) and '[west]: === updating zephyr (zephyr):' (line 62). Same in the initial log file starting from line 145. I did not run any update command manually.

    Yes, all NCS versions are in the folder /opt/nordic/ncs/

    Fullscreen
    1
    2
    3
    % ls /opt/nordic/ncs/
    downloads toolchains v2.7.0
    tmp v2.6.1 v2.7.99-cs2
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best,

    Armand