run_gdb.sh 548 B

123456789101112131415
  1. #!/bin/bash
  2. # This script runs GDB with openocd and stlink to
  3. # allow debugging and seeing the SWO log output in realtime.
  4. killall orbuculum
  5. killall orbcat
  6. arm-none-eabi-gdb \
  7. -iex 'target extended | openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "gdb_port pipe"' \
  8. -iex 'mon halt' \
  9. -iex 'mon tpiu config internal swo.log uart false 38400000 2000000' \
  10. -iex 'shell bash -m -c "orbuculum -f swo.log &"' \
  11. -iex 'shell bash -m -c "orbcat -c 0,%c &"' \
  12. .pio/build/genericGD32F205VC/firmware.elf