pyocd gdbserver exit 1

102 views Asked by At

I am attempting to launch a debug session in vs code in wpl2 on a nrf52 platform. I get the pyocd-gdbserver exited with code 1. Normally I just use segger jlink gdb server in windows. I am new to pyocd and wsl2. Here is my launch.json:

    "configurations": [
            {
                "name": "C++ Launch",
                "type": "cppdbg",
                "request": "launch",
                "program": "${workspaceRoot}/build/zephyr/zephyr.elf",
                "args": [],
                "stopAtEntry": true,
                "cwd": "${workspaceRoot}",
                "environment": [],
                "externalConsole": false,
                "debugServerArgs": "",
                "serverLaunchTimeout": 20000,
                "filterStderr": true,
                "filterStdout": false,
                "serverStarted": "GDB\\ server\\ started",
                "setupCommands": [
                    { "text": "-target-select remote localhost:3333", "description": "connect to target", "ignoreFailures": false },
                    { "text": "-file-exec-and-symbols ${workspaceRoot}/build/zephyr/zephyr.elf", "description": "load file", "ignoreFailures": false},
                    { "text": "-interpreter-exec console \"monitor endian little\"", "ignoreFailures": false },
                    { "text": "-interpreter-exec console \"monitor reset\"", "ignoreFailures": false },
                    { "text": "-interpreter-exec console \"monitor halt\"", "ignoreFailures": false },
                    { "text": "-interpreter-exec console \"monitor arm semihosting enable\"", "ignoreFailures": false },
                    { "text": "-target-download", "description": "flash target", "ignoreFailures": false }
                ],
                "logging": {
                    "moduleLoad": true,
                    "trace": true,
                    "engineLogging": true,
                    "programOutput": true,
                    "exceptions": true
                },
                "linux": {
                    "MIMode": "gdb",
                    "MIDebuggerPath": "/usr/bin/gdb",
                    "debugServerPath": "pyocd-gdbserver"
                }
            }
        ]
    }

Pressing launch showed the somewhat cryptic message: 1: (132) Starting: "pyocd-gdbserver" 1: (1798) "pyocd-gdbserver" exited with code 1 (0x1). 1: (1803) <-logout 1: (20150) <-logout 1: (20153) Send Event AD7MessageEvent

I'm not sure if I can use pyocd in place of gdb server.

0

There are 0 answers