2016-12-30 3 views
1

Olimex STM32-E407 보드와 함께 제공되는 이전 Eclipse 설치에서 마이그레이션 할 때 OpenOCD 설치에 약간의 어려움이있었습니다.OpenOCD 및 Eclipse가 잘못 설정 되었습니까?

이전 Eclipse 설정이 정상적으로 작동했습니다. 다음 init 스크립트와 Zylin 내장 디버거 :

target remote localhost:3333 
monitor reset halt 
monitor wait_halt 
monitor sleep 100 
monitor poll 
monitor flash write_image erase main.bin 0x08000000 
monitor sleep 200 

그리고이 실행 스크립트 : 나는 Zylin 같은 다른 디버거를 선택할 수있는 새로운 이클립스로 전환하기 때문에

monitor soft_reset_halt 
monitor wait_halt 
monitor poll 
thbreak main 
continue 

가 오래된 것 같다 (최신 Google 결과는 ~ 2010 이전). Eclipse Neon에서는 GDB OpenOCD Debug를 선택했습니다.이 Debug는 이전 Eclipse와 동일한 OpenOCD 인스턴스에서 시작할 것입니다. Eclipse 자체에서 실행 파일을 시작하지 않습니다.

OpenOCD 스크립트는 다음과 같습니다 : 시작 프로그램 탭에서

-f ../scripts/interface/ftdi/olimex-arm-usb-tiny-h.cfg 
-f ../scripts/board/olimex_stm32_e407.cfg 

내가, 위의 당 initalization 실행 명령을 복사 Dev.elf에 main.bin을 변경하고 설정을 저장.

Eclipse에서 디버그를 시작하면 아래 출력이 생성됩니다. 이전 일식에서 원래 main.bin을 사용할 때도 - 이전에 작동했습니다! -이 문제를 해결할 수없는 것 같습니다.

Open On-Chip Debugger 0.10.0-rc1 
Licensed under GNU GPL v2 
For bug reports, read 
    http://openocd.org/doc/doxygen/bugs.html 
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'. 
adapter speed: 2000 kHz 
adapter_nsrst_delay: 100 
jtag_ntrst_delay: 100 
none separate 
cortex_m reset_config sysresetreq 
Info : clock speed 2000 kHz 
Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) 
Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020 (STMicroelectronics), part: 0x6413, ver: 0x0) 
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints 
Info : accepting 'gdb' connection on tcp/3333 
Info : device id = 0x10076413 
Info : flash size = 1024kbytes 
undefined debug reason 7 - target needs reset 
adapter speed: 2000 kHz 
Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) 
Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020 (STMicroelectronics), part: 0x6413, ver: 0x0) 
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080002b8 msp: 0x20020000 
adapter speed: 8000 kHz 
Info : dropped 'gdb' connection 
Info : accepting 'gdb' connection on tcp/3333 
adapter speed: 2000 kHz 
Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) 
Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020 (STMicroelectronics), part: 0x6413, ver: 0x0) 
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080002b8 msp: 0x20020000 
background polling: on 
TAP: stm32f4x.cpu (enabled) 
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080002b8 msp: 0x20020000 
auto erase enabled 
Error: couldn't open Dev.elf 

adapter speed: 2000 kHz 
Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) 
Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020 (STMicroelectronics), part: 0x6413, ver: 0x0) 
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080002b8 msp: 0x20020000 
adapter speed: 8000 kHz 
Info : Padding image section 0 with 1 bytes 
adapter speed: 2000 kHz 
Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4) 
Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020 (STMicroelectronics), part: 0x6413, ver: 0x0) 
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x080002b8 msp: 0x20020000 
Info : dropped 'gdb' connection 

GDB를 다시 연결하는 방법과 어댑터 속도가 전환되고 있다는 사실이 놀랍습니다. 내가 도대체 ​​뭘 잘못하고있는 겁니까?

답변

0

나는 당분간 해결책을 찾았습니다.

  1. 은 GDB 하드웨어 디버깅에 디버그 옵션을 추가
  2. 사용 GDB 명령 '팔 - 없음 - - EABI GDB'- 당신이 당신의 PATH 환경에서 실행이 필요합니다.
  3. localhost의 JTAG 장치로 원격 대상 '일반 TCP/IP'사용 : 3333
  4. 시작 프로그램 탭으로 이동하여 기본 설정을 선택하십시오. Initalization 명령 :

    monitor reset halt 
    monitor flash write_image erase main.bin 0x08000000 
    monitor sleep 200 
    
  5. 사용 된 실행 명령은 다음과 같습니다

    monitor soft_reset_halt 
    monitor wait_halt 
    monitor poll 
    thbreak main 
    continue 
    

이 내 초기 이클립스 예제 프로젝트에서 '오래된'main.bin를 사용합니다. 당신이 .elf 파일을 사용하는 경우 대신 이것을 사용한다 : 이것은 .elf 필요한 모든 헤더를 포함 때문이다

monitor flash write_image erase main.elf 

.

관련 문제