기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.

OpenOCD 0.2.0

조회 수 44507 추천 수 0 2009.10.24 20:43:04

며칠전에 OpenOCD 0.2.0이 나온것을 새로 확인하였습니다.

이제는 Coretex-A8까지 지원하려는것 같더군요.

AVR(ATmega128)도 지원합니다. ^^;

거의 9개월만에 보드를 꺼내서 JTAG을 붙여보았습니다.


빌드방법도 바뀌고 사용법도 조금 바뀌어서 소개하고자 합니다.


빌드방법

  인터넷검색을 하니 중국사람들이 이미 방법을 소개하고 있었습니다.

    (How to build OpenOCD for windows - jordon的?? - CSDN博客)

  설명대로 빌드(Windows XP용, FT2232)하니 쉽게 빌드되었습니다.


사용예:

  첨부한 화일을 적절한 디렉토리에 풀어놓습니다.

  Target에 JTAG(FT2232)을 연결하고  부팅합니다.

  cmd창을 열어서 openocd.exe를 실행합니다.

  다른 cmd창을 열어서 telnet localhost 4444로 연결을 합니다.


-------------------------------------------------------------------------------------------

서버쪽 메시지(openocd.exe)

-------------------------------------------------------------------------------------------

T:cygwinhomeOpenOCDtest>openocd

Open On-Chip Debugger 0.2.0 (2009-10-23-19:11) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
500 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
Info : device: 4
Info : deviceID: 67330064
Info : SerialNumber: ESSHO85NA
Info : Description: USB JTAG A
Info : JTAG tap: mp2530.cpu1 tap/device found: 0x05946f0f (mfg: 0x787, part: 0x5946, ver: 0x0)
Info : JTAG Tap/device matched
Info : JTAG tap: mp2530.cpu2 tap/device found: 0x07926f0f (mfg: 0x787, part: 0x7926, ver: 0x0)
Info : JTAG Tap/device matched
Info : accepting 'telnet' connection from 0     <=========================== telnet접속을하면 메시지가 나옵니다.

     TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* mp2530.cpu2        arm926ejs  little mp2530.cpu2        running     <====== targets 명령 결과
Warn : target not halted
Runtime error, file "command.c", line 469:
    target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0xc002fc24
MMU: enabled, D-Cache: enabled, I-Cache: disabled
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x600000d3 pc: 0xc002fc28
MMU: enabled, D-Cache: enabled, I-Cache: enabled
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc002fc2c
MMU: enabled, D-Cache: enabled, I-Cache: enabled
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc0028c60
MMU: enabled, D-Cache: enabled, I-Cache: enabled
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc0028c64
MMU: enabled, D-Cache: enabled, I-Cache: enabled


-------------------------------------------------------------------------------------------

telnet쪽 메시지(telnet localhost 4444)

-------------------------------------------------------------------------------------------

Open On-Chip Debugger
> targets
    TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* mp2530.cpu2        arm926ejs  little mp2530.cpu2        running
> step
target not halted
Runtime error, file "command.c", line 469:

> halt
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0xc002fc24
MMU: enabled, D-Cache: enabled, I-Cache: disabled
> step
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x600000d3 pc: 0xc002fc28
MMU: enabled, D-Cache: enabled, I-Cache: enabled
> step
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc002fc2c
MMU: enabled, D-Cache: enabled, I-Cache: enabled
> step
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc0028c60
MMU: enabled, D-Cache: enabled, I-Cache: enabled
> step
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x60000093 pc: 0xc0028c64
MMU: enabled, D-Cache: enabled, I-Cache: enabled
>


이제현

2009.10.24 21:48:13
*.40.239.206

좋은 정보 감사합니다.

Cortex-A8에서 테스트한 결과를 보니 아직 MMU/CACHE가 활성화 되어 있는 경우는 디버깅이 안되는것 같습니다.

그래도 u-boot 정도는 디버깅이 가능해 보이네요.

 

처음나온 보드를 살릴때 매우 유용하고,  무엇보다도 천만원이 훌쩍 넘어가는 Trace32 없이 몇만원으로 Cortex-A8을

디버깅할 수 있다는  것은 매우 의미깊은 일인것 같습니다.

List of Articles
번호 제목 글쓴이 날짜 조회 수sort

사용자 로그인