我正在尝试通过Make启动openocd + gdb:
debug:
(openocd interface/stlink-v2.cfg -f target/stm32f4x.cfg &); \
arm-none-eabi-gdb $(BUILD_DIR)/$(TARGET).elf -ex "target remote localhost:3333" -ex "load"; \
killall openocd; \
此方法直到,我按ctrl + c即可中断:
(gdb) c
Continuing.
^CError detected on fd 9
Remote communication error. Target disconnected.: Resource temporarily unavailable.
我猜测Make正在截获ctrl + c信号,因为如果我复制debug
命令的输出并将其粘贴到我的终端机(bash)中,我可以毫无问题地使用ctrl + c。 >
有一个聪明的方法吗?我试过将debug命令包装在shell脚本/ python脚本中,但是没有成功