Hi list, I'm relatively new to OpenOCD and encounter a strange behaviour when trying to flash a LUMINARY MICRO LM3S6950 Cortex M3. I'm using OpenOCD 0.1.0 on Windows XP and do not intend to debug the target, I only want to flash firmware files for now.
I've been checking the uC manual and have set all possible and seemingly logical OpenOCD configuration options to no avail. Until yesterday, I have not been able to flash the device with USBprog (driver contained in OpenOCD, see also http://www.embedded-projects.net/index.php?page_id=165). A bit despaired, I started trying to alter random options in the config file. After changing -expected-id to a bogus value instead the one mentioned in the datasheet (page 55, http://www.arm-cpu.ru/Luminary/pdf/Datasheet_LM3S6950.pdf), it started to work at least, though in a somehow unsatisfying way (transfer rate roughly 24 Byte/s). To narrow the issue down, I'd be happy if someone could provide me with an explanation of this behaviour. I'd be interested if you deem it possible that this is a bug in OpenOCD. Since it also might be a USBprog issue, I'd like to rule this out, if possible. Don't hesitate to ask if I forgot to provide some important information. Thanks in advance, /Markus ----------------------------------------------------------------- This is the config file I'm currently using: #--- daemon configuration --- telnet_port 4444 gdb_port 3333 #--- interface --- #USBProg interface usbprog jtag_speed 10 jtag_nsrst_delay 100 jtag_ntrst_delay 100 reset_config trst_and_srst srst_pulls_trst #--- jtag scan chain --- jtag newtap lm3s6950 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0xe #3ba00477 #--- target --- #target create cortex_m3 little run_and_init 0 target create lm3s6950.cpu cortex_m3 -endian little -chain-position lm3s6950.cpu -variant lm3s #--- flash configuration --- flash bank stellaris 0 0 0 0 0 #--- flash file --- init reset reset halt flash write_image erase webradio_ls020.bin 0 bin #verify_image webradio_ls020.bin reset run shutdown ----------------------------------------------------------------- Output with -expected-id 0x3ba00477 C:\Programme\OpenOCD\0.1.0\ARMwebradio\openocd_cfg>openocd -d2 -f usbprog.cfg Open On-Chip Debugger 0.1.0 (2009-01-21-21:15) Release BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: https://[email protected]/svnroot/repos/openocd/tags/openocd-0.1.0/src /openocd.c $ jtag_speed: 10 LIBUSB_DLL: info: usb_os_init: dll version: 0.1.12.1 LIBUSB_DLL: info: usb_os_init: driver version: 0.1.12.1 LIBUSB_DLL: info: usb_os_find_busses: found bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0001--0x1781-0x0c63 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0002--0x05e3-0x0606 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0003--0x04b4-0x6830 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0004--0x046d-0xc043 on bus-0 Info : USB JTAG Interface ready! Error: JTAG communication failure, check connection, JTAG interface, target power etc. Error: trying to validate configured JTAG chain anyway... Error: Could not validate JTAG scan chain, IR mismatch, scan returned 0x3f. tap=lm3s6950.cpu pos=0 expected 0x1 got 3 Warn : Could not validate JTAG chain, continuing anyway... Warn : TAP lm3s6950.cpu: Warn : value captured during scan didn't pass the requested check: Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f Warn : in_handler: w/o "in_value", mismatch in SIR Warn : no tcl port specified, using default port 6666 Error: JTAG communication failure, check connection, JTAG interface, target power etc. Error: trying to validate configured JTAG chain anyway... Error: Could not validate JTAG scan chain, IR mismatch, scan returned 0x3f. tap=lm3s6950.cpu pos=0 expected 0x1 got 3 Warn : Could not validate JTAG chain, continuing anyway... Warn : TAP lm3s6950.cpu: Warn : value captured during scan didn't pass the requested check: Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f Warn : in_handler: w/o "in_value", mismatch in SIR Runtime error, file "embedded:startup.tcl", line 176: examine-fails: -104 Runtime error, file "usbprog.cfg", line 39: ----------------------------------------------------------------- Output with -expected-id changed to 0xe: C:\Programme\OpenOCD\openocd_cfg>openocd -f usbprog.cfg Open On-Chip Debugger 0.1.0 (2009-01-21-21:15) Release BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: https://[email protected]/svnroot/repos/openocd/tags/openocd-0.1.0/src /openocd.c $ jtag_speed: 10 LIBUSB_DLL: info: usb_os_init: dll version: 0.1.12.1 LIBUSB_DLL: info: usb_os_init: driver version: 0.1.12.1 LIBUSB_DLL: info: usb_os_find_busses: found bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0001--0x05e3-0x0606 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0002--0x046d-0xc043 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0003--0x0781-0x5406 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0004--0x1781-0x0c63 on bus-0 Info : USB JTAG Interface ready! Info : JTAG tap: lm3s6950.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3) Error: JTAG tap: lm3s6950.cpu got: 0x3ba00477 (mfg: 0x23b, part: 0xb a00, ver: 0x3) Error: JTAG tap: lm3s6950.cpu expected 1 of 1: 0x0000000e (mfg: 0x007, part: 0x0 000, ver: 0x0) Error: trying to validate configured JTAG chain anyway... Warn : no tcl port specified, using default port 6666 Info : JTAG tap: lm3s6950.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3) Error: JTAG tap: lm3s6950.cpu got: 0x3ba00477 (mfg: 0x23b, part: 0xb a00, ver: 0x3) Error: JTAG tap: lm3s6950.cpu expected 1 of 1: 0x0000000e (mfg: 0x007, part: 0x0 000, ver: 0x0) Error: trying to validate configured JTAG chain anyway... target state: halted target halted due to undefined, current mode: Thread xPSR: 0x21000000 pc: 0x0001063a Info : JTAG tap: lm3s6950.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3) Error: JTAG tap: lm3s6950.cpu got: 0x3ba00477 (mfg: 0x23b, part: 0xb a00, ver: 0x3) Error: JTAG tap: lm3s6950.cpu expected 1 of 1: 0x0000000e (mfg: 0x007, part: 0x0 000, ver: 0x0) Error: trying to validate configured JTAG chain anyway... target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000020c auto erase enabled Warn : not enough working area available(requested 40, free 0) Warn : no working area available, can't do block memory writes Warn : couldn't use block writes, falling back to single memory accesses wrote 114992 byte from file webradio.bin in 4792.484375s (0.023432 kb/s) Info : JTAG tap: lm3s6950.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3) Error: JTAG tap: lm3s6950.cpu got: 0x3ba00477 (mfg: 0x23b, part: 0xb a00, ver: 0x3) Error: JTAG tap: lm3s6950.cpu expected 1 of 1: 0x0000000e (mfg: 0x007, part: 0x0 000, ver: 0x0) Error: trying to validate configured JTAG chain anyway... target state: halted target halted due to debug-request, current mode: Thread xPSR: 0x21000000 pc: 0x00010fda _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
