Thanks for the guide Captlgmu!
I tried running it on Windows but I'm experiencing some problems.
I use the following workspace settings:
{
"settings": {
"extensions.ignoreRecommendations": true,
"C_Cpp.default.configurationProvider": "particle.particle-vscode-core",
"files.associations": {
"*.ino": "cpp",
},
"particle.firmwareVersion": "0.8.0-rc.27",
"particle.targetPlatform": "xenon",
"particle.targetDevice": "Xen1Mesh",
"cortex-debug.armToolchainPath":
"C:/Users/Sebastien/.particle/toolchains/gcc-arm/5.3.1/bin/",
"cortex-debug.openocdPath": "C:/openocd/bin-x64/openocd.exe"
},
"folders": [
{
"path": "."
}
]
}
And launch.json:
{
"version": "0.1.0",
"configurations": [
{
"name": "Debug (OpenOCD)",
"cwd": "${workspaceRoot}",
"executable": "./target/inose-iot-photon.elf",
"interface": "swd",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"configFiles": [
"scripts/interface/cmsis-dap.cfg",
"scripts/target/nrf52-var.cfg"
]
}
]
}
But whenever I start the debug I get the following error after a few seconds:
Failed to launch OpenOCD GDB Server: Timeout.
If I run the following command from a prompt:
openocd.exe -f interface/cmsis-dap.cfg -f C:/openocd/bin-x64/scripts/target/nrf52-var.cfg
It seems to run fine:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : auto-selecting first available session transport "swd". To override use 'transport select '.
adapter speed: 10000 kHz
cortex_m reset_config sysresetreq
bld_addr
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.10
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : reduce speed request: 10000kHz to 5000kHz maximum
Info : clock speed 10000 kHz
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
The Particle Debugger starts blinking like it should, but it's obviously not linked with the debugging session in my Visual Studio Code so not useful.
Any ideas?
Thanks!
Kind regards,
Sebastien