This outputs another error
that's actually not an error but rather the actual command being sent to openocd - they print it out in RED to... i don't know, keep us on our toes or something? ![]()
![]()
OpenOCD GDB timeout
this can happen for a couple of reasons: the compile & flash step (aka the preLaunchTask defined in your .vscode/launch.json file) failed, your device is in a funky state (busy or crashing), openocd failed to close cleanly or something is using the :6666 port.
for port usage, easiest thing to do is manually find and terminate the process - assuming macOS / Linux:
lsof -i :6666 # if the port is taken, you'll get a PID (and other info) back
kill <pid> # terminate the process using :6666
another place to check for error info is in VSCode's "Output" panel where you'll see logs like the following - if the target port is busy, you'll see a note to that effect here:
Open On-Chip Debugger 0.10.0+dev-00920-g6ea43726 (2019-07-09-20:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 1.10
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : stm32f2x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f2x.cpu: external reset detected
Info : Listening on port 50000 for gdb connections
Info : accepting 'gdb' connection on tcp/50000
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x08025d6c psp: 0x2000cf08
Info : device id = 0x200f6411
Info : flash size = 1024 kbytes
Info : flash size = 512 bytes
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08003768 msp: 0x20020000
For the red SoS, debugging mesh on Gen3 can be problematic
yep, this. have you previously configured this device to use mesh networking? it's a bit of a pain, but you could also try doing a factory reset and clearing mesh credentials:
https://docs.particle.io/tutorials/device-os/led/argon/#factory-reset
also, if you haven't seen it already, we have a workshop dedicated to debugging over here:
https://docs.particle.io/workshops/particle-101-workshop/debugging/
couldn't hurt to walk through that step by step and note where you run into issues.
finally, i see you were having problems compiling - were you able to resolve that? if so, can you share the fix and mark it resolved?