Hi @ptillisch
Thank for fast response
I now changed the debug_custom.json
to
[
{
"servertype": "jlink",
"device": "ATSAMD21G18",
"configId": "arduino:samd:mkrwan1310:programmer=jlink",
"server": "jlink",
"serverpath": "C:/Program Files/SEGGER/JLink_V794g/JLinkGDBServerCL.exe",
"interface": "swd",
"serverpath": "C:/Program Files/SEGGER/JLink_V794g/JLinkGDBServerCL.exe"
}
]
The server path is pointing to the last update of JLink GBDB server and if I use it I see the CL server statement is working. Without parameters it fails. OK, that like it is.
The configId I checked as described. It is correct.
But if I start the debugging session I get the following result in "gbd-server" tab:
[2024-03-03T15:07:26.266Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions. "C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\openocd\\0.10.0-arduino7/bin/openocd" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device ATSAMD21G18 Open On-Chip Debugger 0.10.0+dev-gf0767a31 (2018-06-11-13:36) Licensed under GNU GPL v2 For bug reports, read [http://openocd.org/doc/doxygen/bugs.html](http://openocd.org/doc/doxygen/bugs.html) C:\Users\haral\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7/bin/openocd: unknown option -- n [2024-03-03T15:07:26.333Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed GDB server session ended. This terminal will be reused, waiting for next session to start...
and in the "Debug Console" tab I receive:
Cortex-Debug: VSCode debugger extension version 1.5.1 git(be7d3c8+dirty). Usaage info: [https://github.com/Marus/cortex-debug#usage](https://github.com/Marus/cortex-debug#usage)
Reading symbols from C:\Users\haral\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\bin\arm-none-eabi-objdump.exe --syms -C -h -w C:/Users\haral\AppData\Local\Temp\arduino\sketches\4121EFF1B69A8E40675BE333D4C5723A\Blink.ino.elf
Reading symbols from c:/users\haral\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\bin\arm-none-eabi-nm.exe --defined-only -S -l -C -p C:/Users\haral\AppData\Local\Temp\arduino\sketches\4121EFF1B69A8E40675BE333D4C5723A\Blink.ino.elf
Launching GDB: "C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4\\bin\\arm-none-eabi-gdb.exe" -q --interpreter=mi2 "C:/Users\\haral\\AppData\\Local\\Temp\\arduino\\sketches\\4121EFF1B69A8E40675BE333D4C5723A\\Blink.ino.elf"
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:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\openocd\\0.10.0-arduino7/bin/openocd" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device ATSAMD21G18
Please check TERMINAL tab (gdb-server) for output from C:\Users\haral\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7/bin/openocd
Finished reading symbols from objdump: Time: 74 ms
Finished reading symbols from nm: Time: 76 ms
WARNING: Cortex-Debug will deprecate use of GDB version 8 after July 2022. Please upgrade to version 9+
Reading symbols from C:/Users\haral\AppData\Local\Temp\arduino\sketches\4121EFF1B69A8E40675BE333D4C5723A\Blink.ino.elf...done.
undefined: GDB Server Quit Unexpectedly. See gdb-server output for more details.
GDB never responded to an interrupt request. Trying to end session anyways
There seems something missing. do I have to add the parameters in the serverpath
entry? How to get JLinkCL started instead of OpenGBD? That seems to be significant. As far to my understanding I eventually should see also the GUI if I use the server GUI edition.
Is it possible to edit the launch.json
file to get these entries and parameters right?
The launch.json
is:
{
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceRoot}",
"name": "Arduino",
"request": "launch",
"type": "cortex-debug",
"executable": "C:\\Users\\haral\\AppData\\Local\\Temp\\arduino\\sketches\\4121EFF1B69A8E40675BE333D4C5723A/Blink.ino.elf",
"servertype": "jlink",
"serverpath": "C:\\Program Files\\SEGGER\\JLink-V94g\\JLinkGDBServerCL.exe",
"armToolchainPath": "C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/",
"configFiles": [
"C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.13/variants/mkrwan1300/openocd_scripts/arduino_zero.cfg"
],
"device": "ATSAMD21G18",
"interface": "SWD"
},
{
"configId": "arduino:samd:mkrwan1310:programmer=jlink",
"cwd": "${workspaceRoot}",
"request": "launch",
"type": "cortex-debug",
"executable": "C:\\Users\\haral\\AppData\\Local\\Temp\\arduino\\sketches\\4121EFF1B69A8E40675BE333D4C5723A/Blink.ino.elf",
"toolchainPrefix": "arm-none-eabi",
"servertype": "jlink",
"device": "ATSAMD21G18",
"serverpath": "C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\openocd\\0.10.0-arduino7/bin/openocd",
"interface": "swd",
"name": "Arduino MKR WAN 1310 (jlink)",
"armToolchainPath": "C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/",
"configFiles": [
"C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14/variants/mkrwan1300/openocd_scripts/arduino_zero.cfg"
]
},
{
"configId": "arduino:samd:arduino_zero_edbg:programmer=sam_ice",
"cwd": "${workspaceRoot}",
"request": "launch",
"type": "cortex-debug",
"executable": "C:\\Users\\haral\\AppData\\Local\\Temp\\arduino\\sketches\\4121EFF1B69A8E40675BE333D4C5723A/Blink.ino.elf",
"toolchainPrefix": "arm-none-eabi",
"name": "Arduino Zero (Programming Port) (sam_ice)",
"serverpath": "C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\openocd\\0.10.0-arduino7/bin/openocd",
"servertype": "openocd",
"armToolchainPath": "C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/",
"configFiles": [
"C:\\Users\\haral\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.14/variants/arduino_zero/openocd_scripts/arduino_zero.cfg"
]
}
]
}
Where I see some tags I do not understand. Is it possible for me to change the contents? It seems it is not.
Thank you so far.
Have a nice day
@HarrySatt