Kconfig PROBLEMS and errors on MacOS Visual Studio Code not seen on Windows or Linux

Hi,

I get the following Kconfig OUTPUT messages after starting VS Code on MacOS:

Info - 4:48:18 PM] Server starting
[Info - 4:48:18 PM] workspaceFolders: [{'uri': 'file:///opt/nordic/ncs/v2.5.0', 'name': 'v2.5.0'}]
[Info - 4:48:18 PM] Creating context file:///opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2/build
[Info - 4:48:18 PM] Main build: /opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2/build
[Info - 4:48:18 PM] file:///opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2/prj.conf
file:///opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2/boards/nrf9160dk_nrf9160_ns.conf
file:///opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2/boards/nrf9160dk_nrf9160_ns_0_14_0.conf
[Info - 4:48:18 PM] Parsing...
[Info - 4:48:18 PM] Reloading Zephyr python modules...
[Info - 4:48:18 PM] boards/arm/nrf9160dk_nrf9160/Kconfig.defconfig:40: error: couldn't parse 'default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))': macro expanded to blank string
[Info - 4:48:18 PM] Encountered a parsing error, closing 2 files
[Info - 4:48:18 PM] Status: False
And this shows up as a PROBLEM in that terminal tab. It is really ugly. Also, at the bottom right of VS Code, just left of the notification bell, there is a red "errors" field. I have never seen this on Windows or Linux. My MacOS version is Sequoia 15.0.1. I think I found a Devzone ticket from years ago about the same problem, but I don't recall seeing a solution.
Thanks,
Burt Silverman
ps, if I run python3 --version in a terminal window, it shows as 3.9.6.
  • Hi, 

    Never seen this on my Macbook Air, also running Sequoia 15.0.1. Could you provide the support information from VS code?

    Will the build system fail to build your application, i.e. asset tracker v2?

    Kind regards,

    Øyvind

  • I haven't seen any problems with building the application, but I am baffled by this error that doesn't show up on your similar system. I don't see my MacOS version in the Generate Support Information but here it is copied from my Mac System Settings:   Version 15.0.1 (24A348)

    Thanks Oyvind, Burt

    IMPORTANT: The data below could contain sensitive or confidential information about your environment.
    If you do not wish this to be seen by others, please make sure to remove it before sharing.

    For help and support, visit the Nordic DevZone at devzone.nordicsemi.com/.

    {
    "platform": {
    "os": "darwin",
    "osVersion": "Darwin Kernel Version 24.0.0: Tue Sep 24 23:36:30 PDT 2024; root:xnu-11215.1.12~1/RELEASE_X86_64",
    "osKernel": "24.0.0",
    "vscode": "1.94.2",
    "electron": "30.5.1",
    "node": "v20.16.0"
    },
    "system": {
    "date": "2024-10-19T03:25:28.391Z",
    "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:03:21",
    "osUptime": "00:29:38",
    "cpu": "Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz"
    },
    "workspace": {
    "name": "v2.5.0",
    "workspaceFile": null,
    "folders": [
    "/opt/nordic/ncs/v2.5.0"
    ]
    },
    "sdks": [
    {
    "version": "v2.7.0",
    "path": "/opt/nordic/ncs/v2.7.0"
    },
    {
    "version": "v2.5.0",
    "path": "/opt/nordic/ncs/v2.5.0"
    },
    {
    "version": "v2.0.2",
    "path": "/opt/nordic/ncs/v2.0.2"
    },
    {
    "version": "v2.0.0",
    "path": "/opt/nordic/ncs/v2.0.0"
    },
    {
    "version": "v1.4.0",
    "path": "/opt/nordic/ncs/v1.4.0"
    }
    ],
    "activeBuild": "/opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2/build",
    "apps": [
    {
    "workspace": "/opt/nordic/ncs/v2.5.0",
    "uri": "/opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2",
    "buildConfigurations": [
    {
    "id": "/opt/nordic/ncs/v2.5.0/nrf/applications/asset_tracker_v2/build",
    "name": "build",
    "boardId": "nrf9160dk_nrf9160_ns",
    "type": "Zephyr",
    "isChild": false,
    "isStale": false,
    "taskBindings": {
    "build": [],
    "pristineBuild": [],
    "flash": [],
    "eraseAndFlash": []
    }
    }
    ]
    }
    ],
    "topdir": "/opt/nordic/ncs/v2.5.0",
    "workspaceState": "workspace-ready",
    "toolchains": [
    {
    "version": "2.7.0",
    "path": "/opt/nordic/ncs/toolchains/f8037e9b83"
    },
    {
    "version": "2.5.0",
    "path": "/opt/nordic/ncs/toolchains/20d68df7e5"
    },
    {
    "version": "2.0.2",
    "path": "/opt/nordic/ncs/toolchains/v2.0.2"
    },
    {
    "version": "2.0.0",
    "path": "/opt/nordic/ncs/toolchains/v2.0.0"
    },
    {
    "version": "1.4.0",
    "path": "/opt/nordic/ncs/v1.4.0/toolchain"
    }
    ],
    "activeToolchain": {
    "type": "installation",
    "path": "/opt/nordic/ncs/toolchains/20d68df7e5",
    "version": "2.5.0",
    "displayName": "nRF Connect SDK Toolchain v2.5.0"
    },
    "connectedDevices": [],
    "deviceProvider": "nrfutil",
    "tools": {
    "/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.16.1",
    "/Applications/SEGGER/JLink/JLinkExe": "7.88j",
    "/usr/local/bin/nrfjprog": "10.23.2",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/cmake": "3.20.5",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/west": "1.1.0",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/python3": "3.9.6",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/ninja": "1.10.2",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/gperf": "3.1",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/dtc": "1.6.1",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/gn": "2122",
    "/opt/nordic/ncs/toolchains/20d68df7e5/bin/git": "2.37.3",
    "arm-gdbPath": "/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
    "riscv-gdbPath": "not found"
    },
    "nrfutil": {
    "nrfutil-device": {
    "version": "2.5.0",
    "binPath": "/Users/burt/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.9.87-darwin-x64/platform/nrfutil/bin/nrfutil-device"
    },
    "nrfutil-toolchain-manager": {
    "version": "0.14.4",
    "binPath": "/Users/burt/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.9.87-darwin-x64/platform/nrfutil/bin/nrfutil-toolchain-manager"
    }
    },
    "environment": {
    "westEnv": {
    "GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/20d68df7e5/Cellar/git/2.37.3/libexec/git-core",
    "HOME": "/Users/burt",
    "PATH": "/opt/nordic/ncs/toolchains/20d68df7e5/bin:/opt/nordic/ncs/toolchains/20d68df7e5/usr/bin:/opt/nordic/ncs/toolchains/20d68df7e5/usr/local/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/nanopb/generator-bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/aarch64-zephyr-elf/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/x86_64-zephyr-elf/bin:/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Users/burt/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/gnuarmemb/bin:/opt/metasploit-framework/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Users/burt/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/gnuarmemb/bin:/opt/metasploit-framework/bin",
    "ZEPHYR_BASE": "/opt/nordic/ncs/v2.5.0/zephyr",
    "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
    "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk",
    "USER": "burt"
    },
    "inherited": {
    "ELECTRON_RUN_AS_NODE": "1",
    "HOME": "/Users/burt",
    "PATH": "/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Users/burt/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/gnuarmemb/bin:/opt/metasploit-framework/bin",
    "USER": "burt"
    }
    },
    "terminal": {
    "defaultProfile": null
    },
    "config": {
    "nordic-semiconductor.nrf-connect": {
    "topdir": "${nrf-connect.sdk:2.5.0}",
    "toolchain": {
    "path": "${nrf-connect.toolchain:2.5.0}"
    },
    "ozonePath": "",
    "applications": [
    "${workspaceFolder}/nrf/applications/asset_tracker_v2"
    ],
    "applicationOptions": {},
    "kconfig": {
    "interface": "kconfig"
    },
    "west": {
    "env": {
    "$base": "terminal"
    }
    },
    "boardRoots": [],
    "taskBindings": {},
    "buildTerminal": {
    "condensedProgress": true
    },
    "debugging": {
    "flash": true,
    "bindings": {},
    "justMyCode": true
    },
    "activeAppFollowActiveEditor": true,
    "deviceProvider": "nrfutil",
    "flash": {
    "softreset": false,
    "erase": false,
    "recover": false
    },
    "enableTelemetry": false,
    "thirdpartyIntegration": {},
    "toolchainManager": {
    "indexURL": null,
    "installDirectory": null
    },
    "nrfutil": {
    "home": null
    },
    "defaultOpenAction": "ask",
    "welcome": {
    "showOnStartup": true
    }
    },
    "nordic-semiconductor.nrf-terminal": {
    "terminalMode": "character"
    },
    "marus25.cortex-debug": {
    "armToolchainPrefix": "arm-zephyr-eabi",
    "armToolchainPath": "/opt/nordic/ncs/toolchains/v2.0.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/"
    }
    },
    "extensions": {
    "internal": {
    "nordic-semiconductor.nrf-connect": {
    "version": "2024.9.87",
    "path": "/Users/burt/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.9.87-darwin-x64",
    "isActive": true
    },
    "nordic-semiconductor.nrf-terminal": {
    "version": "2024.9.14",
    "path": "/Users/burt/.vscode/extensions/nordic-semiconductor.nrf-terminal-2024.9.14",
    "isActive": true
    },
    "nordic-semiconductor.nrf-devicetree": {
    "version": "2024.9.26",
    "path": "/Users/burt/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2024.9.26",
    "isActive": true
    },
    "nordic-semiconductor.nrf-kconfig": {
    "version": "2024.9.20",
    "path": "/Users/burt/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2024.9.20",
    "isActive": true
    }
    },
    "external": {
    "marus25.cortex-debug": null,
    "ms-vscode.cpptools": "1.22.9",
    "ms-vscode.js-debug": "1.94.0",
    "ms-vscode.js-debug-companion": "1.1.3",
    "ms-vscode.vscode-js-profile-table": "1.0.10",
    "mcu-debug.peripheral-viewer": "1.4.6",
    "trond-snekvik.gnu-mapfiles": "1.1.0",
    "twxs.cmake": "0.0.17"
    }
    }
    }

  • Burt said:
    I haven't seen any problems with building the application, but I am baffled by this error that doesn't show up on your similar system

    I've tried everything I could think of to reproduce, but to no awail. The settings are mostly the same, only the difference between m2 vs intel. 


    And this shows up as a PROBLEM in that terminal tab. It is really ugly. Also, at the bottom right of VS Code, just left of the notification bell, there is a red "errors" field.

    Nothing similar showing here. 


    Burt said:
    I haven't seen any problems with building the application

    The only answer I have at the moment is that if it builds and works on your device, then it might not be severe.

  • Thanks, Oyvind. Have you tried with v2.5.0? I do not see the problem either when I use v2.7.0, but it appears with v2.5.0. One way to make it disappear with v2.5.0 is to go to the settings for the nrf-kconfig extension and change the python PATH to somewhere where there is no python executable. But I think that kills the nrf-kconfig extension completely.

    Another problem I have with v2.5.0 is trying to use Guiconfig. It cannot find a usable init.tcl. Looks like a bug related to the fact that tcl-tk is now at version 8.6.15 and not 8.6.11_1? Can this be fixed?

    Burt

  • Hi Burt, 

    Burt said:
    Another problem I have with v2.5.0 is trying to use Guiconfig. It cannot find a usable init.tcl. Looks like a bug related to the fact that tcl-tk is now at version 8.6.15 and not 8.6.11_1? Can this be fixed?

    can you please register a new ticket for this issue?

    Burt said:
    Have you tried with v2.5.0? I do not see the problem either when I use v2.7.0, but it appears with v2.5.0.

    I tried with NCS v2.5.2, as this was the closest I had installed on my mac. Could not reproduce. Do you get the same if you build in terminal using west build -b nrf9160dk_nrf9160_ns -d build ?

Related