2017-11-07 17 views
1

Redwire Econotag r3(ARMマイクロコントローラに基づいています)で動作するプログラムをデバッグするには、次のコマンドを使用しています。 debugOCD.gdbが含まConqueGDBを使用してOpenOCDでARMマイクロコントローラをデバッグする

xterm -e "openocd -f interface/ftdi/redbee-econotag.cfg -f board /redbee.cfg" & 
sleep 1 

echo -e "soft_reset_halt\n set *0x80020010 = 0\n" | nc -i 1 localho st 4444 > /dev/null & 
arm-none-eabi-gdb hello.elf -x debugOCD.gdb 

target remote localhost:3333 

monitor soft_reset_halt 
load hello.elf 0x00400000 
b _start 
IはConqueGDB(またはVIM内の任意の他のデバッグ・インタフェース)を使用して、VIM内部デバッガを開きたい

手がかりはありますか?ありがとうございました!!

答えて

0

いくつかの調査の後、私は私の質問に対する答えを見つけることができました。

ConqueGDBで目的のデバッガを使用するには、プラグインがロードされる前に変数g:ConqueGdb_GdbExeに指定する必要があります。そうするには

は、私はこの(私はVIMプラグインを管理するためにVundleを使っていることに注意してください)のように見えるように私の.vimrcファイルを変更:

set rtp+=~/.vim/bundle/Vundle.vim 
call vundle#begin() 

"Specify the debugger to be used 
let g:ConqueGdb_GdbExe = 'arm-none-eabi-gdb' 

Plugin 'VundleVim/Vundle.vim' 

"Load ConqueGDB 
Plugin 'vim-scripts/Conque-GDB' 


call vundle#end() 
filetype plugin indent on 

、ConqueGDBは、リモートボードをデバッグするために使用することができます。 VIMのコマンドラインから、次のコマンドを実行しますGDBファイルをコマンドから、このコマンドで2つの異なるファイルを指定しないようにするためには

:ConqueGdb -q -x debugOCD.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 

、このコマンドのエイリアスを設定するには罰金だろうので、暗記する方が簡単ですが、私は、これは簡単ですね。 Here you can see a screenshot of VIM with ConqueGDB working.

関連する問題