OpenOCD常用命令
时间: 2023-11-23 22:58:24 浏览: 204
Eclipse,OpenOCD,OpenJTAG嵌入式开发教程
5星 · 资源好评率100%
以下是OpenOCD常用命令的示例:
```shell
# 连接OpenOCD
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg
# 连接GDB
arm-none-eabi-gdb -q -ex "target remote localhost:3333" -ex "monitor reset halt"
# 查看芯片状态
reset halt
reg
arm disassemble
# 读写寄存器
reg r0
reg r0 0x12345678
# 读写内存
mdw 0x20000000 4
mww 0x20000000 0x12345678
# 烧录程序
flash write_image erase /path/to/image.bin 0x08000000
# 调试程序
load
monitor reset halt
monitor reset init
monitor reset run
```
阅读全文