S&B Volcano vaporizer remote control with Pi Pico W
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

debug_swd.sh 720B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. set -euo pipefail
  3. echo Starting OpenOCD in background
  4. ./openocd/src/openocd -s openocd/tcl -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000" -c "cmsis_dap_vid_pid 0x2e8a 0x000c" &
  5. OPENOCD_PID=$!
  6. # give OpenOCD some time to output stuff
  7. sleep 1
  8. echo -n Waiting for debugger to appear
  9. while ! netstat -tna | grep 'LISTEN\>' | grep -q ':3333\>'; do
  10. echo -n .
  11. sleep 1
  12. done
  13. echo Starting GDB
  14. arm-none-eabi-gdb \
  15. -ex "set history save" \
  16. -ex "show print pretty" \
  17. -ex "target extended-remote localhost:3333" \
  18. -ex "tui new-layout default asm 1 src 2 status 0 cmd 1" \
  19. -ex "tui layout default" \
  20. -ex "tui enable" \
  21. $1
  22. echo Killing OpenOCD instance in background
  23. kill $OPENOCD_PID