2016-12-30 25 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など、さまざまなデバッガを選ぶことができる新しいEclipseに切り替えているので

monitor soft_reset_halt 
monitor wait_halt 
monitor poll 
thbreak main 
continue 

が古くなっているようだ(最新Googleの結果は〜2010年以前)。 Eclipse Neonでは、古いEclipseと同じOpenOCDインスタンスから開始するGDB OpenOCD Debugを選択しました。 Eclipse自体から実行可能ファイルを起動することはありません。

OpenOCDスクリプトは次のようになります。私はinitalizationをコピーしたスタートアップ]タブで

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

と上記あたりのコマンドを実行し、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デバイスとしてリモートターゲット 'Generic 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 
    

これが私の最初のEclipseプロジェクト例から '古い' main.binを使用しています。あなたがで.elfファイルを使用する場合は、代わりにこれを使用する必要があります。これはで.elfは、すべての必要なヘッダーが含まれているという事実によるものである

monitor flash write_image erase main.elf 

関連する問題