I don't know about VSCode. Can you debug from the command line? This is one of those situations where typically your IDE won't work until you've figured it out.
Your mileage may vary. I have this function in a project script....which is far more reliable than my IDE because I can use a pipe as opposed to TCP..The problem with using TCP is 'openocd' might get left running. Unless you notice and take steps to manually kill it, doesn't matter what you do from that point, it ain't gonna work. Using a pipe guarantees openocd get terminated.
The pipe/TCP thing might be down to my IDE: qtcreator "device" support" is beta and only works with TCP. Works most of the time and having got debugging working from the command line I can tell when the IDE has lost the debugger (and thus I kill openocd).
I don't know the VSCode TCP/pipe situation? It would be handy if someone else could chip in on this.
Your mileage may vary. I have this function in a project script..
Code:
fcp_dbg (){ #-tui <ctrl-x>a gdb-multiarch -n -x /usr/local/qt/etc/gdbinit.go "$OBJ"/"$PKG".elf}
Code:
foo@sdu:~/usr/src/rpi/pico/emon$ cat /usr/local/qt/etc/gdbinit.goset pagination offtarget extended-remote | \openocd \-f interface/picoprobe.cfg \-f target/rp2040.cfg \-c "gdb_port pipe; log_output /tmp/openocd.log"monitor reset haltloadinfo threadsb main
The pipe/TCP thing might be down to my IDE: qtcreator "device" support" is beta and only works with TCP. Works most of the time and having got debugging working from the command line I can tell when the IDE has lost the debugger (and thus I kill openocd).
I don't know the VSCode TCP/pipe situation? It would be handy if someone else could chip in on this.
Statistics: Posted by swampdog — Wed Aug 14, 2024 10:28 pm