Started by pacman, February 27, 2013, 01:32:24 PM
openocd -c "telnet_port 4444" -f interface/olimex-arm-usb-tiny-h.cfg -f target/lpc1768.cfg
$ telnet localhost 4444> adapter_khz 500adapter speed: 500 kHz> reset haltJTAG tap: lpc1768.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)Only resetting the Cortex-M3 core, use a reset-init event handler to reset any peripherals or configure hardware srst support.target state: haltedtarget halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x1fff0080 msp: 0x10001ffc> flash banks#0 : lpc1768.flash (lpc2000) at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0> dump_image old_image.bin 0x0 0x80000dumped 524288 bytes in 18.999392s (26.948 KiB/s)> pollbackground polling: onTAP: lpc1768.cpu (enabled)target state: haltedtarget halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x1fff0080 msp: 0x10001ffc
$ hexdump -C old_image.bin 00000000 fc 1f 00 10 81 00 ff 1f 00 00 00 00 00 00 00 00 |?.....?.........|00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|*00000080 df f8 18 40 df f8 10 50 26 68 05 ea 06 06 26 60 |??.@??.P&h.?..&`|00000090 df f8 00 f0 01 02 ff 1f ff bf ff ff c0 c3 0f 40 |??.?..?.??????.@|000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|*00000200 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |????????????????|*00080000
> flash write_image erase LED-Blinker.bin 0x0 binauto erase enabledlpc1768.cpu -- clearing lockup after double faultlpc2000 prepare sectors returned 50331840failed erasing sectors 0 to 0in procedure 'flash'
$ cat bare_1768.cfg adapter_khz 1source [find interface/olimex-arm-usb-tiny-h.cfg]source [find target/lpc1768.cfg]adapter_nsrst_assert_width 10adapter_nsrst_delay 2reset_config srst_onlyadapter_khz 500initsleep 200reset haltwait_haltmww 0x400FC040 0x01sleep 200flash write_image LED-Blinker.binverify_image LED-Blinker.binreset run
$ openocd -f bare_1768.cfg Open On-Chip Debugger 0.6.1 (2012-11-30-00:04)Licensed under GNU GPL v2For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.htmladapter speed: 1 kHzInfo : only one transport option; autoselect 'jtag'adapter_nsrst_delay: 200jtag_ntrst_delay: 200adapter speed: 10 kHzcortex_m3 reset_config vectresetadapter_nsrst_assert_width: 10adapter_nsrst_delay: 2srst_only separate srst_gates_jtag srst_open_drainadapter speed: 500 kHzInfo : max TCK change to: 30000 kHzInfo : clock speed 500 kHzInfo : JTAG tap: lpc1768.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)Info : lpc1768.cpu: hardware has 6 breakpoints, 4 watchpointsInfo : JTAG tap: lpc1768.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)target state: haltedtarget halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x1fff0080 msp: 0x10001ffcWarn : Verification will fail since checksum in image (0x00000000) to be written to flash is different from calculated vector checksum (0xefff78c8).Warn : To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.Error: lpc1768.cpu -- clearing lockup after double faultWarn : lpc2000 prepare sectors returned 50331840Error: error writing to flash at address 0x00000000 at offset 0x00000000Runtime Error: bare_1768.cfg:21: in procedure 'script' at file "embedded:startup.tcl", line 58in procedure 'flash' called at file "bare_1768.cfg", line 21
Quote from: maria_olimex on February 28, 2013, 04:05:02 PMHave you triedflash write_image erase unlock (...)
QuoteAlso for some reason it sayslpc2000 prepare (...)
QuoteAlso, OpenOCD had problems with lpc2000 drivers in version 0.6.0 - they fixed them in 0.6.1, but you can still take a look at the blog post:http://openocd.sourceforge.net/2012/10/openocd-0-6-1-bugfix-release/
QuoteTake a look at the scripts/board/ dir, there are .cfg files for several lpc1768 boards, you could see which one is closest to your setup and see if there is something missing from your .cfg files.
Quote from: maria_olimex on March 01, 2013, 01:38:37 PMIn my experince, the LPC + OpenOCD combination has its quirks and is not always by the book.
QuoteThose are the commands I've used to flash the L2294:target remote localhost:3333jtag arp_init-resetarm7_9 fast_memory_access disablehaltwait_haltflash write_image erase unlock main.bin 0sleep 100jtag arp_initNote that I'm using jtag arp_init-reset rather that reset halt; You can read on it in the OpenOCD manual.
QuoteAlso, you may want to take a look at this thread:https://www.olimex.com/forum/index.php?topic=164.0