S&B Volcano vaporizer remote control with Pi Pico W
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

debug_swd.sh 827B

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