Closed hathach closed 1 year ago
I am trying it out, but unclear of the best way to force the M4 to use the 0.11.0 openOCD. I do have that version installed but it is not finding the config file.
Waiting for gdb server to start...[2023-06-22T20:01:45.295Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\openocd\\0.10.0-arduino7/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\\Users\\kurte\\Documents\\Arduino\\Blink_hello" -f "C:/arduino-ide_nightly/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.7.12/scripts/openocd/daplink_samd51.cfg"
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
CDRTOSConfigure
C:\Users\kurte\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.12/scripts/openocd/daplink_samd51.cfg:27: Error: Can't find target/atsame5x.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 60
at file "C:\Users\kurte\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.12/scripts/openocd/daplink_samd51.cfg", line 27
[2023-06-22T20:01:45.333Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
Will debug more tomorrow
Quick update.
@mjs513 - tested on the M0, and showed his changes to platform.txt to force using OpenOCD 0.11, which I did and it now work on my Feather M4 express.
For what it is worth, I am using an Raspberry Pi Pico as the CMIS-DAP using a free-dap image. https://github.com/ataradov/free-dap
@KurtE thank you for testing, another daplink can be used with pico is https://github.com/raspberrypi/picoprobe , which is the firmware running on pi debug probe. It has an advantage that implement multidrop and can also be use to debug another pico.
debug_custom.json
in the sketch folder https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-debugger#j-link and 2 template json are also include for user convenience at https://github.com/adafruit/ArduinoCore-samd/tree/ide2-debug/scripts/jlink/samd21 & samd52itsybitsy M4
Note: Metro M4 mux swd pin with neopixel or so, and is difficult to test with