openocdネタ

今回もひどい殴り書きですが、アップします。

OpenOCDでJtagkey2経由でCQ_FRK_FM3に実行ファイルを書きこみした時
以下のメッセージが出力された。どうやら、Jtagのクロック速度が早いというErrorみたいです。
$ openocd -s C:\\ocd\\tcl -f interface\\jtagkey2.cfg -f target/mb9bf618t_flash.cfg -c "mt_flash ssp.exe"
Open On-Chip Debugger 0.6.0-dev-00617-g07251ab-dirty (2012-07-11-17:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
trst_only separate trst_push_pull
500 kHz
cortex_m3 reset_config sysresetreq
verify Capture-IR is disabled
Info : device: 6 "2232H"
Info : deviceID: 67358712
Info : SerialNumber: 22222222A
Info : Description: Amontec JTAGkey-2 A
Info : max TCK change to: 30000 kHz
Info : clock speed 500 kHz
Info : JTAG tap: mb9bfxx8.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : mb9bfxx8.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : JTAG tap: mb9bfxx8.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000104 msp: 0x1fff2460
Rize up to Internal PLLed Clock!
15000 kHz
auto erase enabled
Info : Fujitsu MB9Bxxx: Sector Erase ... (0 to 0)
Info : Fujitsu MB9B500: FLASH Write ...
wrote 16384 bytes from file ssp.exe in 0.545001s (29.358 KiB/s)
verified 10512 bytes in 0.300000s (34.219 KiB/s)
Info : JTAG tap: mb9bfxx8.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: MEM_AP_CSW 0x23000042, MEM_AP_TAR 0xe000ed00


Runtime Error: C:\ocd\tcl/target/mb9bf618t_flash.cfg:57:
in procedure 'mt_flash'
in procedure 'reset' called at file "C:\ocd\tcl/target/mb9bf618t_flash.cfg", line 57


target用のCFGファイル(target/mb9bf618t_flash.cfg)はあるところから、ありがたく頂いたものですが、それを修正します。
具体的には、mt_interna_rc をコメントアウトします。
proc mt_flash {IMGFILE} {
# mt_internal_rc
flash write_image erase $IMGFILE
verify_image $IMGFILE
reset run
shutdown
}

そうすると、表示されていたErrorは消えます。