2017-11-07 1 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에 지정해야합니다. 이제

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 원격 보드를 디버깅하는 데 사용할 수 있습니다 이렇게하려면

, 나는 다음과 같이 내 .vimrc 파일을 (내가 VIM 플러그인을 관리 할 수 ​​Vundle을 사용하고 있습니다) 수정했습니다. VIM 명령 줄에서 실행하십시오 GDB가 명령 파일에서이 명령에 두 개의 서로 다른 파일을 지정하지 않기 위해

: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.

관련 문제