VSC debugging stops working with GDB major version error

I have been debugging all morning my nRF52840 board V2.0.2 toolkit with vsc and it suddenly stops connecting.

I now get this error.

Cortex-Debug: VSCode debugger extension version 1.6.1 git(95d3d3e). Usage info: https://github.com/Marus/cortex-debug#usage
Warn: c:/ncs/VaporBT/VaporBT/build/zephyr/merged.hex is not an ELF file format. Some features won't work -- Globals, Locals, disassembly, etc.Launching GDB: "c:\\ncs\\toolchains\\v2.0.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb-no-py.exe" -q --interpreter=mi2
    IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems
Launching gdb-server: "C:\\Program Files\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50004 -swoport 50005 -telnetport 50006 -device nRF52840_xxAA -select usb=960005601 -rtos "C:\\Program Files\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll"
    Please check TERMINAL tab (gdb-server) for output from C:\Program Files\SEGGER\JLink\JLinkGDBServerCL.exe
GNU gdb (Zephyr SDK 0.14.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=arm-zephyr-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://github.com/zephyrproject-rtos/sdk-ng/issues>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
ERROR: GDB major version should be >= 9, yours is Unknown
GDB could not start as expected. Bad installation or version mismatch. See if you can start gdb from a shell prompt and check its version (Must be >= 9)

I have no problem flashing the board using the Nordic programing.

I have a Silabs chip as our host on this board and its debugger was also connected.

It may be that somehow the Silabs debug messaged things up so I disconnected it but I still get the error.

I reinstalled the Nordic vcs extentions and downloaded the latest JLink files.

Nothing helped me to understand what went wrong.

Here is my 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": "win32",
    "osVersion": "Windows 10 Home",
    "osKernel": "10.0.19044",
    "vscode": "1.70.2",
    "electron": "18.3.5",
    "node": "v16.13.2"
  },
  "system": {
    "date": "2022-08-29T10:02:53.794Z",
    "vscodeRoot": "e:\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:09:01",
    "osUptime": "00:26:37",
    "cpu": {
      "model": "Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz",
      "speed": "2808 MHz",
      "count": 4
    },
    "memory": {
      "total": "15.86 GB",
      "free": "9.01 GB"
    }
  },
  "workspace": {
    "name": "VaporBT (Workspace)",
    "workspaceFile": "c:\\ncs\\VaporBT\\VaporBT.code-workspace",
    "folders": [
      "c:\\ncs\\VaporBT\\VaporBT"
    ]
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2022.7.242",
        "path": "c:\\Users\\David Kaplan\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2022.7.242-win32-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2022.7.21",
        "path": "c:\\Users\\David Kaplan\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.7.21",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2022.7.36",
        "path": "c:\\Users\\David Kaplan\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2022.7.36",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2022.7.24",
        "path": "c:\\Users\\David Kaplan\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2022.7.24",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": "1.6.1",
      "ms-vscode.cpptools": "1.11.5",
      "ms-vscode-remote.remote-wsl-recommender": "0.0.15",
      "ms-vscode.js-debug": "1.70.0",
      "ms-vscode.js-debug-companion": "1.0.18",
      "ms-vscode.vscode-js-profile-table": "1.0.3",
      "cschlosser.doxdocgen": "1.4.0",
      "jeff-hykin.better-cpp-syntax": "1.15.19",
      "ms-vscode.cpptools-extension-pack": "1.2.0",
      "ms-vscode.cpptools-themes": "1.0.0",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17"
    }
  },
  "tools": {
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.14.1",
    "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.70c",
    "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.13.0",
    "C:\\Python39\\Scripts\\nrfutil.exe": null,
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\cmake.exe": "3.20.5",
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\Scripts\\west.exe": "0.13.1",
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\python.exe": "3.8.2",
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\ninja.exe": "1.9.0",
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\gperf.exe": "3.1",
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\dtc.exe": "1.4.7",
    "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\gn.exe": "2039",
    "c:\\ncs\\toolchains\\v2.0.0\\mingw64\\bin\\git.exe": "2.26.2.windows.1"
  },
  "sdks": [
    {
      "version": "2.0.2",
      "path": "c:\\ncs\\v2.0.2"
    }
  ],
  "toolchains": [
    {
      "version": "1.6.1",
      "path": {
        "$mid": 1,
        "fsPath": "c:\\ncs\\v1.6.1\\toolchain",
        "_sep": 1,
        "path": "/C:/ncs/v1.6.1/toolchain",
        "scheme": "file"
      }
    },
    {
      "version": "1.7.0",
      "path": {
        "$mid": 1,
        "fsPath": "c:\\ncs\\v1.7.0\\toolchain",
        "_sep": 1,
        "path": "/C:/ncs/v1.7.0/toolchain",
        "scheme": "file"
      }
    },
    {
      "version": "1.7.1",
      "path": {
        "$mid": 1,
        "fsPath": "c:\\ncs\\v1.7.1\\toolchain",
        "_sep": 1,
        "path": "/C:/ncs/v1.7.1/toolchain",
        "scheme": "file"
      }
    },
    {
      "version": "1.8.0",
      "path": {
        "$mid": 1,
        "fsPath": "c:\\ncs\\v1.8.0\\toolchain",
        "_sep": 1,
        "path": "/C:/ncs/v1.8.0/toolchain",
        "scheme": "file"
      }
    },
    {
      "version": "1.9.0",
      "path": {
        "$mid": 1,
        "fsPath": "c:\\ncs\\v1.9.0\\toolchain",
        "_sep": 1,
        "path": "/C:/ncs/v1.9.0/toolchain",
        "scheme": "file"
      }
    },
    {
      "version": "2.0.0",
      "path": {
        "$mid": 1,
        "fsPath": "c:\\ncs\\toolchains\\v2.0.0",
        "_sep": 1,
        "path": "/C:/ncs/toolchains/v2.0.0",
        "scheme": "file"
      }
    },
    {
      "version": "2.0.2",
      "path": {
        "$mid": 1,
        "fsPath": "c:\\ncs\\toolchains\\v2.0.2",
        "_sep": 1,
        "path": "/C:/ncs/toolchains/v2.0.2",
        "scheme": "file"
      }
    }
  ],
  "connectedDevices": [
    {
      "serialNumber": "960005601"
    }
  ],
  "deviceProviders": [
    "nrfjprog"
  ],
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "c:\\ncs\\v2.0.0",
      "toolchain": {
        "path": "${nrf-connect.toolchain:2.0.0}"
      },
      "ozonePath": "",
      "applications": [
        "c:\\ncs\\VaporBT\\VaporBT"
      ],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig"
      },
      "welcome": {
        "showOnStartup": false
      },
      "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,
      "registerUseNaturalFormat": true,
      "variableUseNaturalFormat": true,
      "dbgServerLogfile": null,
      "showRTOS": false,
      "showDevDebugOutput": "none"
    }
  },
  "environment": {
    "westExe": "west",
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\David Kaplan",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\David Kaplan",
      "Path": "c:\\ncs\\toolchains\\v2.0.0\\mingw64\\bin;c:\\ncs\\toolchains\\v2.0.0\\mingw64\\libexec\\git-core;c:\\ncs\\toolchains\\v2.0.0\\opt\\bin;c:\\ncs\\toolchains\\v2.0.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;c:\\ncs\\toolchains\\v2.0.0\\arm-zephyr-eabi\\bin;c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\Scripts;C:\\Program Files\\Microsoft MPI\\Bin\\;C:\\Python39\\Scripts\\;C:\\Python39\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;e:\\UltraEdit-32;C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;c:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;c:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;c:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;c:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;E:\\PowerShell\\7\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;e:\\Git\\cmd;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files\\Azure Data Studio\\bin;C:\\Program Files\\Git LFS;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\PuTTY\\;;C:\\Program Files\\Azure Data Studio\\bin;e:\\Microsoft VS Code\\bin",
      "ZEPHYR_BASE": "c:\\ncs\\v2.0.0\\zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "c:\\ncs\\toolchains\\v2.0.0\\opt\\zephyr-sdk",
      "PYTHONPATH": "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin;c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\Lib;c:\\ncs\\toolchains\\v2.0.0\\opt\\bin\\Lib\\site-packages",
      "Python3_ROOT": "c:\\ncs\\toolchains\\v2.0.0\\opt\\bin"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\David Kaplan",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\David Kaplan",
      "Path": "C:\\Program Files\\Microsoft MPI\\Bin\\;C:\\Python39\\Scripts\\;C:\\Python39\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;e:\\UltraEdit-32;C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;c:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;c:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;c:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;c:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;E:\\PowerShell\\7\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;e:\\Git\\cmd;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files\\Azure Data Studio\\bin;C:\\Program Files\\Git LFS;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\PuTTY\\;;C:\\Program Files\\Azure Data Studio\\bin;e:\\Microsoft VS Code\\bin",
      "PATH": "C:\\Program Files\\Microsoft MPI\\Bin\\;C:\\Python39\\Scripts\\;C:\\Python39\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;e:\\UltraEdit-32;C:\\Program Files (x86)\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;c:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;c:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;c:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;c:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;E:\\PowerShell\\7\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;e:\\Git\\cmd;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files\\Azure Data Studio\\bin;C:\\Program Files\\Git LFS;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Microsoft SQL Server\\140\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\PuTTY\\;;C:\\Program Files\\Azure Data Studio\\bin;e:\\Microsoft VS Code\\bin"
    },
    "toolchainPath": "c:\\ncs\\toolchains\\v2.0.0",
    "toolchainBinPath": "c:\\ncs\\toolchains\\v2.0.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
    "toolchainVersion": "2.0.0"
  },
  "terminal": {
    "shell": null,
    "defaultProfile": null
  }
}

Parents
  • Hi Nordic:

                    I have the same problem. I don't know how to resolve the problem. Please give me a hand. thanks.

    ncs version: v2.2.0

    Cortex-Debug: VSCode debugger extension version 1.6.10 git(0458417). Usage info: https://github.com/Marus/cortex-debug#usage Warn: d:/ncs_2_2_0/V7RC/build_1/zephyr/zephyr.hex is not an ELF file format. Some features won't work -- Globals, Locals, disassembly, etc.Launching GDB: "d:\\ncs_vs_code\\toolchains\\v2.2.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb-no-py.exe" -q --interpreter=mi2 IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems Could not start GDB process, does the program exist in filesystem? Error: spawn d:\ncs_vs_code\toolchains\v2.2.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gdb-no-py.exe ENOENT

Reply
  • Hi Nordic:

                    I have the same problem. I don't know how to resolve the problem. Please give me a hand. thanks.

    ncs version: v2.2.0

    Cortex-Debug: VSCode debugger extension version 1.6.10 git(0458417). Usage info: https://github.com/Marus/cortex-debug#usage Warn: d:/ncs_2_2_0/V7RC/build_1/zephyr/zephyr.hex is not an ELF file format. Some features won't work -- Globals, Locals, disassembly, etc.Launching GDB: "d:\\ncs_vs_code\\toolchains\\v2.2.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb-no-py.exe" -q --interpreter=mi2 IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems Could not start GDB process, does the program exist in filesystem? Error: spawn d:\ncs_vs_code\toolchains\v2.2.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gdb-no-py.exe ENOENT

Children
No Data
Related