起動コマンドは以下になる
openocd -f scripts/interface/flyswatter2.cfg -f scripts/board/ti_beagleboard.cfg
だが、これはうまく起動できない場合が多い。
実行すると以下のようなエラーメッセージが表示される。
Open On-Chip Debugger 0.6.1 (2012-10-07-10:34)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
RCLK - adaptive
Warn : omap3530.dsp: huge IR length 38
RCLK - adaptive
trst_only separate trst_push_pull
Info : max TCK change to: 30000 kHz
Info : RCLK (adaptive clock speed)
Error: couldn't read enough bytes from FT2232 device (0 < 81)
Error: couldn't read from FT2232
in procedure 'runtest'
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: couldn't read enough bytes from FT2232 device (0 < 2)
Error: couldn't read from FT2232
Warn : Bypassing JTAG setup events due to errors
RCLK - adaptive
Error: couldn't read enough bytes from FT2232 device (0 < 81)
Error: couldn't read from FT2232
これはJTAG adaptive clockという仕組みがうまくbeagleboardとかみ合わない場合に発生するらしい。
詳しくはTincanToolsの説明を参照
エラーが発生してしまう場合はTincanToolsが公開しているadaptive clockを無効にした設定ファイルomap3530_norclk.cfgを用いる。
ダウンロードした設定ファイルは OpenOCDフォルダ/scripts/target/omap3530_norclk.cfgに保存
この設定ファイルを使って以下のコマンドで起動する
openocd -f scripts/interface/flyswatter2.cfg -f scripts/target/omap3530_norclk.cfg -c "init" -c "reset init"
以下のようなメッセージが表示されたら無事に起動
Open On-Chip Debugger 0.6.1 (2012-10-07-10:34)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
adapter speed: 1000 kHz
Warn : omap3530.dsp: huge IR length 38
trst_only separate trst_push_pull
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: omap3530.jrc tap/device found: 0x0b7ae02f (mfg: 0x017, part: 0xb7ae, ver: 0x0)
Info : JTAG tap: omap3530.dap enabled
Info : omap3530.cpu: hardware has 6 breakpoints, 2 watchpoints
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x540111c0
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x540111c0
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
adapter speed: 1000 kHz
Info : JTAG tap: omap3530.jrc tap/device found: 0x0b7ae02f (mfg: 0x017, part: 0xb7ae, ver: 0x0)
Info : JTAG tap: omap3530.dap enabled
Error: cortex_a8_mmu: target not halted
Runtime Error: embedded:startup.tcl:20:
in procedure 'omap3530.cpu'
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 20
Warn : omap3530.cpu: ran after reset and before halt ...
Info : number of cache level 2
Error: cache l2 present :not supported
Error: mpdir not in multiprocessor format
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0xa00001d3 pc: 0x80e88508
MMU: disabled, D-Cache: disabled, I-Cache: enabled
Thank you for sharing with us, I too always learn something new from your post.
返信削除JTAG