Unable to build Hello World sample Application as a freestanding application in VSCode

Hello,

I have a workspace project that currently builds fine, however I am starting some new smaller projects and wish to build them as Freestanding so that I can have them reference the SDK installed by the Toolchain Manager.

I have done a fresh install of the Connect SDK, tools, toolchain, and VSCode. 

I have created a new application, based on the hello world sample using the 2.1.1 SDK and toolchain.

When I attempt to build the application I get the error:

west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')

When I "echo $ZEPHYR_BASE" within the VSCode terminal I get: "/opt/nordic/ncs/v2.1.1/zephyr", but I am also unable to run west build from that terminal.

I'd really prefer to not have to create multiple Workspaces for the small projects I am about to start.

Below is my generated support information:

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 https://devzone.nordicsemi.com/.

{
  "platform": {
    "os": "darwin",
    "osVersion": "Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000",
    "osKernel": "21.6.0",
    "vscode": "1.73.0",
    "electron": "19.0.17",
    "node": "v16.14.2"
  },
  "system": {
    "date": "2022-11-03T19:51:46.347Z",
    "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:00:29",
    "osUptime": "01:58:42",
    "cpu": {
      "model": "Apple M1 Max",
      "speed": "24 MHz",
      "count": 5
    },
    "memory": {
      "total": "64.00 GB",
      "free": "36.33 GB"
    }
  },
  "workspace": {
    "name": "hello_world",
    "workspaceFile": null,
    "folders": [
      "/Users/griffinmeyer/JBC/test/hello_world"
    ]
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2022.10.30",
        "path": "/Users/griffinmeyer/.vscode/extensions/nordic-semiconductor.nrf-connect-2022.10.30-darwin-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2022.10.7",
        "path": "/Users/griffinmeyer/.vscode/extensions/nordic-semiconductor.nrf-terminal-2022.10.7",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2022.9.11",
        "path": "/Users/griffinmeyer/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2022.9.11",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2022.10.7",
        "path": "/Users/griffinmeyer/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2022.10.7",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": null,
      "ms-vscode.cpptools": "1.13.3",
      "ms-vscode.js-debug": "1.72.0",
      "ms-vscode.js-debug-companion": "1.0.18",
      "ms-vscode.vscode-js-profile-table": "1.0.3",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17"
    }
  },
  "tools": {
    "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.14.1",
    "/Applications/SEGGER/JLink/JLinkExe": "7.80c",
    "/usr/local/bin/nrfjprog": "10.18.1",
    "nrfutil": "Not found",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/cmake": "3.20.5",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/west": "0.14.0",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/python3": "3.9.6",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/ninja": "1.10.2",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/gperf": "3.1",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/dtc": "1.6.1",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/gn": "2067",
    "/opt/nordic/ncs/toolchains/v2.1.1/bin/git": "2.32.0"
  },
  "sdks": [
    {
      "version": "2.1.0",
      "path": "/opt/nordic/ncs/v2.1.0"
    },
    {
      "version": "2.0.0",
      "path": "/opt/nordic/ncs/v2.0.0"
    },
    {
      "version": "2.1.1",
      "path": "/opt/nordic/ncs/v2.1.1"
    }
  ],
  "toolchains": [
    {
      "version": "2.0.0",
      "path": "/opt/nordic/ncs/toolchains/v2.0.0"
    },
    {
      "version": "2.1.0",
      "path": "/opt/nordic/ncs/toolchains/v2.1.0"
    },
    {
      "version": "2.1.1",
      "path": "/opt/nordic/ncs/toolchains/v2.1.1"
    }
  ],
  "connectedDevices": [],
  "deviceProviders": [
    "nrfjprog"
  ],
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "/opt/nordic/ncs/v2.1.1",
      "toolchain": {
        "path": "${nrf-connect.toolchain:2.1.1}"
      },
      "ozonePath": "",
      "applications": [
        "/Users/griffinmeyer/JBC/test/hello_world"
      ],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "welcome": {
        "showOnStartup": true
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "enableTelemetry": true,
      "taskBindings": {},
      "debugging": {
        "backend": "nRF Debug",
        "flash": true
      },
      "activeAppFollowActiveEditor": true
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    }
  },
  "environment": {
    "westExe": "west",
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/v2.1.1/Cellar/git/2.32.0_1/libexec/git-core",
      "HOME": "/Users/griffinmeyer",
      "PATH": "/opt/nordic/ncs/toolchains/v2.1.1/bin:/opt/nordic/ncs/toolchains/v2.1.1/opt/bin:/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/v2.1.1/arm-zephyr-eabi/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
      "ZEPHYR_BASE": "/opt/nordic/ncs/v2.1.1/zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk",
      "USER": "griffinmeyer"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "/Users/griffinmeyer",
      "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
      "USER": "griffinmeyer"
    },
    "toolchainPath": "/opt/nordic/ncs/toolchains/v2.1.1",
    "toolchainBinPath": "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin",
    "toolchainVersion": "2.1.1"
  },
  "terminal": {
    "shell": null,
    "defaultProfile": null
  }
}

Parents
  • Hello, 

    I'm not able to reproduce the issue on my side. Here is my support information for compirason.

    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 https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:52 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8112",
        "osKernel": "22.1.0",
        "vscode": "1.72.2",
        "electron": "19.0.17",
        "node": "v16.14.2"
      },
      "system": {
        "date": "2022-11-04T10:26:38.213Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:02:30",
        "osUptime": "42:31:19",
        "cpu": {
          "model": "Apple M2",
          "speed": "24 MHz",
          "count": 4
        },
        "memory": {
          "total": "8.00 GB",
          "free": "0.05 GB"
        }
      },
      "workspace": {
        "name": "hello_world",
        "workspaceFile": null,
        "folders": [
          "/Users/oysa/NCS/hello_world"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2022.10.30",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-connect-2022.10.30-darwin-arm64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2022.10.7",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-terminal-2022.10.7",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2022.9.11",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2022.9.11",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2022.10.7",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2022.10.7",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": "1.6.7",
          "ms-vscode.cpptools": "1.12.4",
          "ms-vscode.js-debug": "1.72.1",
          "ms-vscode.js-debug-companion": "1.0.18",
          "ms-vscode.vscode-js-profile-table": "1.0.3",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      },
      "tools": {
        "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.14.1",
        "/Applications/SEGGER/JLink/JLinkExe": "7.66a",
        "/usr/local/bin/nrfjprog": "10.16.0",
        "nrfutil": "Not found",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/cmake": "3.20.5",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/west": "0.14.0",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/python3": "3.9.6",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/gperf": "3.1",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/gn": "2067",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/git": "2.32.0"
      },
      "sdks": [
        {
          "version": "2.1.0",
          "path": "/opt/nordic/ncs/v2.1.0"
        },
        {
          "version": "2.1.1",
          "path": "/opt/nordic/ncs/v2.1.1"
        },
        {
          "version": "2.0.2",
          "path": "/opt/nordic/ncs/v2.0.2"
        }
      ],
      "toolchains": [
        {
          "version": "2.0.2",
          "path": "/opt/nordic/ncs/toolchains/v2.0.2"
        },
        {
          "version": "2.1.0",
          "path": "/opt/nordic/ncs/toolchains/v2.1.0"
        },
        {
          "version": "2.1.1",
          "path": "/opt/nordic/ncs/toolchains/v2.1.1"
        }
      ],
      "connectedDevices": [],
      "deviceProviders": [
        "nrfjprog"
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "/opt/nordic/ncs/v2.1.1",
          "toolchain": {
            "path": "${nrf-connect.toolchain:2.1.1}"
          },
          "ozonePath": "",
          "applications": [
            "/Users/oysa/NCS/hello_world"
          ],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig"
          },
          "welcome": {
            "showOnStartup": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": true,
          "taskBindings": {},
          "debugging": {
            "backend": "nRF Debug",
            "flash": true
          },
          "activeAppFollowActiveEditor": true
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "objdumpPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null,
          "showRTOS": false,
          "showDevDebugOutput": "none"
        }
      },
      "environment": {
        "westExe": "west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/v2.1.1/Cellar/git/2.32.0_1/libexec/git-core",
          "HOME": "/Users/oysa",
          "PATH": "/opt/nordic/ncs/toolchains/v2.1.1/bin:/opt/nordic/ncs/toolchains/v2.1.1/opt/bin:/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/v2.1.1/arm-zephyr-eabi/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v2.1.1/zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk",
          "USER": "oysa"
        },
        "inherited": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "/Users/oysa",
          "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
          "USER": "oysa"
        },
        "toolchainPath": "/opt/nordic/ncs/toolchains/v2.1.1",
        "toolchainBinPath": "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin",
        "toolchainVersion": "2.1.1"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    
    

    I installed the nRF Connect SDK v2.1.1 yesterday. 

    Could you please provide any more steps for me to reproduce? Are you opening VS Code from the Toolchain Manager? 

    Kind regards,
    Øyvind

Reply
  • Hello, 

    I'm not able to reproduce the issue on my side. Here is my support information for compirason.

    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 https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 22.1.0: Sun Oct  9 20:15:52 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8112",
        "osKernel": "22.1.0",
        "vscode": "1.72.2",
        "electron": "19.0.17",
        "node": "v16.14.2"
      },
      "system": {
        "date": "2022-11-04T10:26:38.213Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:02:30",
        "osUptime": "42:31:19",
        "cpu": {
          "model": "Apple M2",
          "speed": "24 MHz",
          "count": 4
        },
        "memory": {
          "total": "8.00 GB",
          "free": "0.05 GB"
        }
      },
      "workspace": {
        "name": "hello_world",
        "workspaceFile": null,
        "folders": [
          "/Users/oysa/NCS/hello_world"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2022.10.30",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-connect-2022.10.30-darwin-arm64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2022.10.7",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-terminal-2022.10.7",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2022.9.11",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2022.9.11",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2022.10.7",
            "path": "/Users/oysa/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2022.10.7",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": "1.6.7",
          "ms-vscode.cpptools": "1.12.4",
          "ms-vscode.js-debug": "1.72.1",
          "ms-vscode.js-debug-companion": "1.0.18",
          "ms-vscode.vscode-js-profile-table": "1.0.3",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      },
      "tools": {
        "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.14.1",
        "/Applications/SEGGER/JLink/JLinkExe": "7.66a",
        "/usr/local/bin/nrfjprog": "10.16.0",
        "nrfutil": "Not found",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/cmake": "3.20.5",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/west": "0.14.0",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/python3": "3.9.6",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/gperf": "3.1",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/gn": "2067",
        "/opt/nordic/ncs/toolchains/v2.1.1/bin/git": "2.32.0"
      },
      "sdks": [
        {
          "version": "2.1.0",
          "path": "/opt/nordic/ncs/v2.1.0"
        },
        {
          "version": "2.1.1",
          "path": "/opt/nordic/ncs/v2.1.1"
        },
        {
          "version": "2.0.2",
          "path": "/opt/nordic/ncs/v2.0.2"
        }
      ],
      "toolchains": [
        {
          "version": "2.0.2",
          "path": "/opt/nordic/ncs/toolchains/v2.0.2"
        },
        {
          "version": "2.1.0",
          "path": "/opt/nordic/ncs/toolchains/v2.1.0"
        },
        {
          "version": "2.1.1",
          "path": "/opt/nordic/ncs/toolchains/v2.1.1"
        }
      ],
      "connectedDevices": [],
      "deviceProviders": [
        "nrfjprog"
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "/opt/nordic/ncs/v2.1.1",
          "toolchain": {
            "path": "${nrf-connect.toolchain:2.1.1}"
          },
          "ozonePath": "",
          "applications": [
            "/Users/oysa/NCS/hello_world"
          ],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig"
          },
          "welcome": {
            "showOnStartup": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": true,
          "taskBindings": {},
          "debugging": {
            "backend": "nRF Debug",
            "flash": true
          },
          "activeAppFollowActiveEditor": true
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "objdumpPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null,
          "showRTOS": false,
          "showDevDebugOutput": "none"
        }
      },
      "environment": {
        "westExe": "west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/v2.1.1/Cellar/git/2.32.0_1/libexec/git-core",
          "HOME": "/Users/oysa",
          "PATH": "/opt/nordic/ncs/toolchains/v2.1.1/bin:/opt/nordic/ncs/toolchains/v2.1.1/opt/bin:/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/v2.1.1/arm-zephyr-eabi/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v2.1.1/zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk",
          "USER": "oysa"
        },
        "inherited": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "/Users/oysa",
          "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
          "USER": "oysa"
        },
        "toolchainPath": "/opt/nordic/ncs/toolchains/v2.1.1",
        "toolchainBinPath": "/opt/nordic/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/bin",
        "toolchainVersion": "2.1.1"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    
    

    I installed the nRF Connect SDK v2.1.1 yesterday. 

    Could you please provide any more steps for me to reproduce? Are you opening VS Code from the Toolchain Manager? 

    Kind regards,
    Øyvind

Children
No Data
Related