SERVER CONSOLE DEBUG: GDBServerConsole: onBackendConnect: gdb-server program client error Error: read ECONNRESET

Hi!

I'm developing a project on visual studio with ncs sdk V1.8.0. For a while, I was able to debug my project with no problem. But out of the blue, I'm no longer able to debug my project. I get the following error:

[2022-08-23T15:57:09.597Z] SERVER CONSOLE DEBUG: GDBServerConsole: onBackendConnect: gdb-server program client error Error: read ECONNRESET

There is the complete log: 

[2022-08-23T15:57:09.458Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF52832_xxAA -select usb=483066063 -rtos "C:\\Program Files (x86)\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll"
SEGGER J-Link GDB Server V7.58b Command Line Version

JLinkARM.dll V7.58b (DLL compiled Nov 16 2021 15:00:10)

Command line: -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF52832_xxAA -select usb=483066063 -rtos C:\Program Files (x86)\SEGGER\JLink\GDBServer\RTOSPlugin_Zephyr.dll
-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     50000
SWO raw output listening port: 50001
Terminal I/O port:             50002
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               off
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 nRF52832_xxAA
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128 V3 compiled Feb  2 2021 16:48:08
Hardware: V3.00
S/N: 483066063
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 50000
Connecting to target...
[2022-08-23T15:57:09.597Z] SERVER CONSOLE DEBUG: GDBServerConsole: onBackendConnect: gdb-server program client error Error: read ECONNRESET
[2022-08-23T15:57:09.598Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

What is the problem? 

Thank you!

  • Hi Emile,

    I have got the same error using the sample code for nrf9160 AWS IoT.

    The build function and flash function work flawlessly though, but just not debug.

    I hope to get support for solving this issue too.

  • Same thing here with an nRF9160 and NCS 2.0.2

    Debugging with Ozone seems to works fine, but debugging with VSCode doesn't.

  • Hi,

    We have been encountering this issue with some customers now. Could you attach the Support Information here?

    -Priyanka

  • Same here with NCS 1.7.0 on nRF52.

    Here's the support information (sensitive information is blanked with _____):

    {
    "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Enterprise",
    "osKernel": "10.0.19044",
    "vscode": "1.70.2",
    "electron": "18.3.5",
    "node": "v16.13.2"
    },
    "system": {
    "date": "2022-08-24T10:21:01.844Z",
    "vscodeRoot": "c:\\work\\tools\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "01:02:17",
    "osUptime": "01:02:57",
    "cpu": {
    "model": "Intel(R) Core(TM) i7-10810U CPU @ 1.10GHz",
    "speed": "1608 MHz",
    "count": 6
    },
    "memory": {
    "total": "63.78 GB",
    "free": "54.79 GB"
    }
    },
    "workspace": {
    "name": "_____",
    "workspaceFile": null,
    "folders": [
    "c:\\WORK\\_____"
    ]
    },
    "extensions": {
    "internal": {
    "nordic-semiconductor.nrf-connect": {
    "version": "2022.7.242",
    "path": "c:\\Users\\_____\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2022.7.242-win32-x64",
    "isActive": true
    },
    "nordic-semiconductor.nrf-terminal": {
    "version": "2022.7.21",
    "path": "c:\\Users\\_____\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.7.21",
    "isActive": true
    },
    "nordic-semiconductor.nrf-devicetree": {
    "version": "2022.7.36",
    "path": "c:\\Users\\_____\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2022.7.36",
    "isActive": true
    },
    "nordic-semiconductor.nrf-kconfig": {
    "version": "2022.7.24",
    "path": "c:\\Users\\_____\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2022.7.24",
    "isActive": true
    }
    },
    "external": {
    "marus25.cortex-debug": "1.6.0",
    "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",
    "alefragnani.numbered-bookmarks": "8.3.1",
    "cschlosser.doxdocgen": "1.4.0",
    "jeff-hykin.better-cpp-syntax": "1.15.19",
    "jgclark.vscode-todo-highlight": "2.0.4",
    "mhutchie.git-graph": "1.30.0",
    "ms-vscode.cmake-tools": "1.11.26",
    "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:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\arm-none-eabi-gcc.exe": "9-2019-q4-major",
    "C:\\work\\tools\\SEGGER\\JLink\\JLink.exe": "7.58b",
    "c:\\work\\tools\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.15.0",
    "nrfutil": "Not found",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\cmake.exe": "3.20.5",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\Scripts\\west.exe": "0.11.1",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\python.exe": "3.8.2",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\ninja.exe": "1.9.0",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\gperf.exe": "3.1",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\dtc.exe": "1.4.7",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\gn.exe": "1937",
    "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\mingw64\\bin\\git.exe": "2.26.2.windows.1"
    },
    "sdks": [
    {
    "version": "1.7.0",
    "path": "c:\\work\\tools\\ncs\\v1.7.0"
    }
    ],
    "toolchains": [
    {
    "version": "1.7.0",
    "path": {
    "$mid": 1,
    "fsPath": "c:\\work\\tools\\ncs\\v1.7.0\\toolchain",
    "_sep": 1,
    "path": "/C:/work/tools/ncs/v1.7.0/toolchain",
    "scheme": "file"
    }
    }
    ],
    "connectedDevices": [
    {
    "serialNumber": "682895873"
    }
    ],
    "deviceProviders": [
    "nrfjprog"
    ],
    "config": {
    "nordic-semiconductor.nrf-connect": {
    "topdir": "${nrf-connect.sdk:1.7.0}",
    "toolchain": {
    "path": "${nrf-connect.toolchain:1.7.0}"
    },
    "ozonePath": "",
    "applications": [
    "${workspaceFolder}"
    ],
    "applicationOptions": {},
    "kconfig": {
    "interface": "kconfig"
    },
    "welcome": {
    "showOnStartup": false
    },
    "west": {
    "env": {
    "$base": "terminal"
    }
    },
    "boardRoots": [],
    "enableTelemetry": false,
    "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\\_____",
    "HOMEDRIVE": "C:",
    "HOMEPATH": "\\Users\\_____",
    "Path": "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\mingw64\\bin;c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\mingw64\\libexec\\git-core;c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin;c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\Scripts;_____;c:\\work\\tools\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin;C:\\work\\tools\\SEGGER\\JLink;C:\\Program Files (x86)\\ZBar\\bin;C:\\Users\\_____\\AppData\\Local\\Microsoft\\WindowsApps;;C:\\work\\tools\\Microsoft VS Code\\bin",
    "ZEPHYR_BASE": "c:\\work\\tools\\ncs\\v1.7.0\\zephyr",
    "GNUARMEMB_TOOLCHAIN_PATH": "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt",
    "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
    "PYTHONPATH": "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin;c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\Lib;c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin\\Lib\\site-packages",
    "Python3_ROOT": "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin"
    },
    "inherited": {
    "ELECTRON_RUN_AS_NODE": "1",
    "HOME": "C:\\Users\\_____",
    "HOMEDRIVE": "C:",
    "HOMEPATH": "\\Users\\_____",
    "Path": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\System32\\OpenSSH\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C_____;c:\\work\\tools\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin;C:\\work\\tools\\SEGGER\\JLink;_____;C:\\work\\tools\\Microsoft VS Code\\bin",
    "PATH": "_____c:\\work\\tools\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin;C:\\work\\tools\\SEGGER\\JLink;C:\\Program Files (x86)\\ZBar\\bin;C:\\Users\\_____\\AppData\\Local\\Microsoft\\WindowsApps;;C:\\work\\tools\\Microsoft VS Code\\bin"
    },
    "toolchainPath": "c:\\work\\tools\\ncs\\v1.7.0\\toolchain",
    "toolchainBinPath": "c:\\work\\tools\\ncs\\v1.7.0\\toolchain\\opt\\bin",
    "toolchainVersion": "1.7.0"
    },
    "terminal": {
    "shell": null,
    "defaultProfile": null
    }
    }

    I guess the problem might be induced by an extension which was recently updated...

  • As expected, it seems as an updated extension caused the Problem in my case: The issue could be solved by downgrading the extension "Cortex-Debug" from 1.6.0 (which was deployed yesterday) to the last version 1.4.4:

Related