Vim 用ConqueGDB用OpenOCD调试ARM微控制器
我使用以下命令调试在上运行的程序(基于ARM微控制器) 其中Vim 用ConqueGDB用OpenOCD调试ARM微控制器,vim,arm,gdb,conque,Vim,Arm,Gdb,Conque,我使用以下命令调试在上运行的程序(基于ARM微控制器) 其中debugOCD.gdb包含: target remote localhost:3333 monitor soft_reset_halt load hello.elf 0x00400000 b _start 我想使用ConqueGDB(或VIM内的任何其他调试接口)打开VIM内的调试器 有什么线索吗?谢谢 经过一些研究,我终于找到了我问题的答案 要在ConqueGDB中使用所需的调试器,必须在加载插件之前在g:ConqueGDB_G
debugOCD.gdb
包含:
target remote localhost:3333
monitor soft_reset_halt
load hello.elf 0x00400000
b _start
我想使用ConqueGDB(或VIM内的任何其他调试接口)打开VIM内的调试器
有什么线索吗?谢谢 经过一些研究,我终于找到了我问题的答案 要在ConqueGDB中使用所需的调试器,必须在加载插件之前在
g:ConqueGDB_GdbExe
变量中指定它
为此,我修改了我的.vimrc
文件,使其看起来像这样(请注意,我正在使用Vundle管理VIM插件):
现在,ConqueGDB可以用来调试远程板。从VIM命令行执行:
:ConqueGdb -q -x debugOCD.gdb
为了不在此命令中指定两个不同的文件,可以从GDB命令文件加载符号。OpenOCD执行和目标连接可以以相同的方式处理。下面是我的debugOCD.gdb
的样子
#Load the debug symbols
file hello.elf
#Make sure that openOCD is running, otherwise load it
shell if [ ! `pgrep openocd` ]; then xterm -e "openocd -f interface/ftdi/redbee-econotag.cfg -f board/redbee.cfg" & sleep 1; fi
#Connect GDB to OpenOCD and reset the microcontroller
target remote localhost:3333
monitor soft_reset_halt
shell sleep 1
#Upload the image and wait for 1 second
monitor load_image hello.elf
shell sleep 1
#Set a breakpoint at SRAM start address and run from there
b *0x400000
monitor step 0x3ffffc
c
就是这样,为这个命令设置一个别名就可以了,这样更容易记忆,但我想这是微不足道的
:ConqueGdb -q -x debugOCD.gdb
#Load the debug symbols
file hello.elf
#Make sure that openOCD is running, otherwise load it
shell if [ ! `pgrep openocd` ]; then xterm -e "openocd -f interface/ftdi/redbee-econotag.cfg -f board/redbee.cfg" & sleep 1; fi
#Connect GDB to OpenOCD and reset the microcontroller
target remote localhost:3333
monitor soft_reset_halt
shell sleep 1
#Upload the image and wait for 1 second
monitor load_image hello.elf
shell sleep 1
#Set a breakpoint at SRAM start address and run from there
b *0x400000
monitor step 0x3ffffc
c