No gdb at mac book pro

Hi there,

I have just tried to migrate to a new M2-based mac book pro and everything went OK (i am able to build and run my sw on the target) except that I don't have any access to my debugger anymore Disappointed When I try to debug a project, it rebuilds it and reflashes as well (for some reason) and then says that "Spawn. Unknown system error -86". Nothing about debugger start can be found in any of terminal windows. I suspect there is something wrong with the toolchain installation, so I attached the support information from NRF Connect extension.

I am quite sure that this is some strange mistake that I made during the installation, but could not find a way to fix it...

Many thanks in advance!

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 23.0.0: Fri Sep 15 14:43:05 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6020",
    "osKernel": "23.0.0",
    "vscode": "1.89.1",
    "electron": "28.2.8",
    "node": "v18.18.2"
  },
  "system": {
    "date": "2024-05-28T08:34:26.314Z",
    "vscodeRoot": "/private/var/folders/nr/jwdhk0c54kx52256fw8cbpdc0000gn/T/AppTranslocation/92A7A4B2-06E3-4284-8541-13DF3C220CB5/d/Visual Studio Code.app/Contents/Resources/app",
    "nrfConnectForDesktopInstalled": false,
    "vscodeUptime": "01:01:09",
    "osUptime": "01:06:38",
    "cpu": "Apple M2 Max"
  },
  "workspace": {
    "name": "T502534-FIRMWARE-Nordic-nRF528xx",
    "workspaceFile": null,
    "folders": [
      "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx/T502534-FIRMWARE-Nordic-nRF528xx"
    ]
  },
  "sdks": [
    {
      "version": "v2.6.1",
      "path": "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx"
    }
  ],
  "activeBuild": "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx/T502534-FIRMWARE-Nordic-nRF528xx/build",
  "apps": [
    {
      "workspace": "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx/T502534-FIRMWARE-Nordic-nRF528xx",
      "uri": "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx/T502534-FIRMWARE-Nordic-nRF528xx",
      "buildConfigurations": [
        {
          "id": "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx/T502534-FIRMWARE-Nordic-nRF528xx/build",
          "name": "build",
          "boardId": "t449344",
          "type": "Zephyr",
          "isChild": false,
          "isStale": false,
          "taskBindings": {
            "build": [],
            "pristineBuild": [],
            "flash": [],
            "eraseAndFlash": []
          }
        }
      ]
    }
  ],
  "topdir": "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx",
  "workspaceState": "workspace-ready",
  "toolchains": [
    {
      "version": "2.6.1",
      "path": "/opt/nordic/ncs/toolchains/580e4ef81c"
    }
  ],
  "connectedDevices": [
    {
      "serialNumber": "001050019361",
      "boardVersion": "PCA10095",
      "deviceFamily": "NRF52_FAMILY",
      "deviceVersion": "NRF52840_xxAA_REV2",
      "jlinkObFirmwareVersion": "J-Link OB-nRF5340-NordicSemi compiled Oct 30 2023 12:13:06"
    }
  ],
  "deviceProvider": "nrfutil",
  "tools": {
    "/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.16.5",
    "/Applications/SEGGER/JLink/JLinkExe": "7.94e",
    "/usr/local/bin/nrfjprog": "10.24.2",
    "nrfutil": "Not found",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/cmake": "3.21.0",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/west": "1.2.0",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/python3": "3.9.6",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/ninja": "1.10.2",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/gperf": "3.1",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/dtc": "1.6.1",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/gn": "2154",
    "/opt/nordic/ncs/toolchains/580e4ef81c/bin/git": "2.37.3",
    "gdbPath": "/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb"
  },
  "nrfutil": {
    "nrfutil-device": {
      "version": "2.0.0",
      "binPath": "/Users/rdim/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.3.25-darwin-arm64/platform/nrfutil/bin/nrfutil-device"
    },
    "nrfutil-toolchain-manager": {
      "version": "0.14.1",
      "binPath": "/Users/rdim/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.3.25-darwin-arm64/platform/nrfutil/bin/nrfutil-toolchain-manager"
    }
  },
  "environment": {
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "GIT_EXEC_PATH": "/opt/nordic/ncs/toolchains/580e4ef81c/Cellar/git/2.37.3/libexec/git-core",
      "HOME": "/Users/rdim",
      "PATH": "/opt/nordic/ncs/toolchains/580e4ef81c/bin:/opt/nordic/ncs/toolchains/580e4ef81c/usr/bin:/opt/nordic/ncs/toolchains/580e4ef81c/usr/local/bin:/opt/nordic/ncs/toolchains/580e4ef81c/opt/bin:/opt/nordic/ncs/toolchains/580e4ef81c/opt/nanopb/generator-bin:/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/aarch64-zephyr-elf/bin:/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/x86_64-zephyr-elf/bin:/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin:/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/riscv64-zephyr-elf/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin",
      "ZEPHYR_BASE": "/Users/rdim/Desktop/Vogels/T502534-FIRMWARE-Nordic-nRF528xx/zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk",
      "USER": "rdim"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "/Users/rdim",
      "PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin",
      "USER": "rdim"
    },
    "toolchainPath": "/opt/nordic/ncs/toolchains/580e4ef81c",
    "toolchainBinPath": "/opt/nordic/ncs/toolchains/580e4ef81c/opt/zephyr-sdk/arm-zephyr-eabi/bin",
    "toolchainVersion": "2.6.1"
  },
  "terminal": {
    "defaultProfile": null
  },
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "",
      "toolchain": {
        "path": ""
      },
      "ozonePath": "",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "taskBindings": {},
      "buildTerminal": {
        "condensedProgress": true
      },
      "debugging": {
        "flash": true,
        "bindings": {
          "${workspaceFolder}/build": "Launch build"
        },
        "justMyCode": true
      },
      "activeAppFollowActiveEditor": true,
      "deviceProvider": "",
      "flash": {
        "softreset": false,
        "erase": false,
        "recover": false
      },
      "enableTelemetry": true,
      "thirdpartyIntegration": {},
      "toolchainManager": {
        "indexURL": null,
        "installDirectory": null
      },
      "nrfutil": {
        "home": null
      },
      "defaultOpenAction": "ask"
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    }
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2024.3.25",
        "path": "/Users/rdim/.vscode/extensions/nordic-semiconductor.nrf-connect-2024.3.25-darwin-arm64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2024.3.15",
        "path": "/Users/rdim/.vscode/extensions/nordic-semiconductor.nrf-terminal-2024.3.15",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2024.3.78",
        "path": "/Users/rdim/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2024.3.78",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2024.3.21",
        "path": "/Users/rdim/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2024.3.21",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": null,
      "ms-vscode.cpptools": null,
      "ms-vscode.js-debug": "1.89.0",
      "ms-vscode.js-debug-companion": "1.1.2",
      "ms-vscode.vscode-js-profile-table": "1.0.9",
      "trond-snekvik.gnu-mapfiles": "1.1.0"
    }
  }
}

  • Hi 

    I have asked internally if they have any idea. But just to make sure some other things are in order. Have you downloaded the newest command line tool?

    Regards

    Runar

  • Hi Runar,

    Yes, rosetta imidiately makes it running!

    But it is still interesting what goes wrong with native (not intel) CPU? I tried to run the installed gdb and perfectly get this:

    ---------

    GNU gdb (Zephyr SDK 0.16.5) 12.1

    Copyright (C) 2022 Free Software Foundation, Inc.

    License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>

    This is free software: you are free to change and redistribute it.

    There is NO WARRANTY, to the extent permitted by law.

    ------------

    And the fact that VSCode does not print me anything makes me thinking that there is something with NRF Connect for VS configuration that it simply can not find gdb at my M2 mac or so? Again, gdb starts OK manually but could not be startted from the IDE. Also, what I see is that at IDE the gdb _server_ is starting (with rosetta) but not only gdb, maybe I have to configure a server somehow?

    Sure, it is also possible to run it in intel emulation environment (Rosetta) but would also be great to have it running natively as this seems to be also possible in general! Slight smile

    Thanks for your help!

  • You should be able to use the arm toolchain but for some reason it seems like your install uses intel execution chain. I have seen something similar before regarding the toolchain and we know it was working before VScode 1.87 so something happened after that created some issues with Apple Silicon, but we don't know what the issue is. We have tried to replicate it on our end to no luck

    Regards

    Runar

  • thanks very much for your answer. did you try it with VSC 1.87 and mac book with M2 cpu? In general, the option of rosetta is helping, but if you'd find a native way to run gdb I'd very interested to be aware :)

Related