macOS VSCode cannot launch terminal: "The terminal process failed to launch (exit code: 1). "

I've installed nRF Connect and VSCode on a MacBook Air M1.  Whenever I try to build my existing firmware that builds fine under Windows, I get the following error: 

The terminal process failed to launch (exit code: 1). 

I tried reinstalling VSCode, but this did not help. I've used this MacBook Air previously for builds, but had to switch to Windows because of some tool problems with MCUBOOT builds. I'm trying to switch back to the MacBook Air now to try to use SDK v2.0.0. 

My support information is below.  I suspect this issue occurs because of the line "shell": null.  

How do I set the shell to be used for builds? 

Thanks,

Steve

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.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101",
    "osKernel": "21.4.0",
    "vscode": "1.70.1",
    "electron": "18.3.5",
    "node": "v16.13.2"
  },
  "system": {
    "date": "2022-08-11T12:08:15.848Z",
    "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:16:15",
    "osUptime": "14:26:18",
    "cpu": {
      "model": "Apple M1",
      "speed": "24 MHz",
      "count": 4
    },
    "memory": {
      "total": "16.00 GB",
      "free": "0.24 GB"
    }
  },
  "workspace": {
    "name": "display-firmware",
    "workspaceFile": null,
    "folders": [
      "/Users/Steve/Projects/display-firmware"
    ]
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2022.7.242",
        "path": "/Users/Steve/.vscode/extensions/nordic-semiconductor.nrf-connect-2022.7.242-darwin-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2022.7.21",
        "path": "/Users/Steve/.vscode/extensions/nordic-semiconductor.nrf-terminal-2022.7.21",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2022.7.36",
        "path": "/Users/Steve/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2022.7.36",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2022.7.24",
        "path": "/Users/Steve/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2022.7.24",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": "1.4.4",
      "ms-vscode.cpptools": "1.11.5",
      "ms-vscode.js-debug": "1.70.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.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.14.1",
    "/Applications/SEGGER/JLink/JLinkExe": "7.64c",
    "/usr/local/bin/nrfjprog": "10.15.4",
    "nrfutil": "Not found",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/cmake": "3.20.5",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/west": "0.13.1",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/python3": "3.9.6",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/ninja": "1.10.2",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/gperf": "3.1",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/dtc": "1.6.1",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/gn": "2039",
    "/opt/nordic/ncs/toolchains/v2.0.0/bin/git": "2.32.0"
  },
  "sdks": [
    {
      "version": "2.0.0",
      "path": "/opt/nordic/ncs/v2.0.0"
    },
    {
      "version": "1.9.1",
      "path": "/opt/nordic/ncs/v1.9.1"
    }
  ],
  "toolchains": [
    {
      "version": "1.9.1",
      "path": {
        "$mid": 1,
        "fsPath": "/opt/nordic/ncs/v1.9.1/toolchain",
        "path": "/opt/nordic/ncs/v1.9.1/toolchain",
        "scheme": "file"
      }
    },
    {
      "version": "2.0.0",
      "path": {
        "$mid": 1,
        "fsPath": "/opt/nordic/ncs/toolchains/v2.0.0",
        "path": "/opt/nordic/ncs/toolchains/v2.0.0",
        "scheme": "file"
      }
    }
  ],
  "connectedDevices": [],
  "deviceProviders": [
    "nrfjprog"
  ],
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "${nrf-connect.sdk:2.0.0}",
      "toolchain": {
        "path": "${nrf-connect.toolchain:2.0.0}"
      },
      "ozonePath": "",
      "applications": [
        "${workspaceFolder}"
      ],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "welcome": {
        "showOnStartup": true
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [
        "${workspaceFolder}"
      ],
      "enableTelemetry": true,
      "taskBindings": {},
      "debugging": {
        "backend": "Cortex-Debug"
      },
      "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,
      "flattenAnonymous": false,
      "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.0.0/Cellar/git/2.32.0_1/libexec/git-core",
      "HOME": "/Users/Steve",
      "PATH": "/opt/nordic/ncs/toolchains/v2.0.0/bin:/opt/nordic/ncs/toolchains/v2.0.0/opt/bin:/opt/nordic/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/v2.0.0/arm-zephyr-eabi/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
      "ZEPHYR_BASE": "/opt/nordic/ncs/v2.0.0/zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/v2.0.0/opt/zephyr-sdk",
      "USER": "Steve"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "/Users/Steve",
      "PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
      "ZEPHYR_BASE": "/opt/nordic/ncs/v2.0.0/zephyr",
      "USER": "Steve"
    },
    "toolchainPath": "/opt/nordic/ncs/toolchains/v2.0.0",
    "toolchainBinPath": "/opt/nordic/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin",
    "toolchainVersion": "2.0.0"
  },
  "terminal": {
    "shell": null,
    "defaultProfile": null
  }
}

  • Hi,

    The line with "shell": null, is not problematic (also I have the same on my Mac where things build as expected). And I do not see anything else sticking out in the support information.

    It looks like you are seeing something similar to what is described in this post. Can you try to delete your build folder so that you build from scratch? If that does not help, perhaps try to install the toolchain from the toolchain manager again.

Related