I am just updated to svn 1881 to use with my STM32 and jlink(yellow v6.0). I had been using 1183, which worked every time, but was unbearably slow. Revision 1881 is lightning fast compared with the old revision. I am however seeing a few issues.
It takes 5 or six tries to get my program to download into flash. I either get a segmentation fault at startup or an error while writing the code to flash. I have attached examples of both problems below along with my configuration file. I am away this weekend but would be able to get a debug build running to try some things out next week. Great work on the speed up! $ sudo /usr/local/gnu-arm/bin/openocd -f ../GNUTools/openOCD/newLPM.cfg -c init -c "sleep 200" -f flashAll.script -c "reset run" -c "shutdown" Open On-Chip Debugger 0.2.0-in-development (2009-05-22-09:47) svn:1881 BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $ 500 kHz Error: J-Link command EMU_CMD_VERSION failed (-110) Info : J-Link ARM V6 compiled Aug 28 2007 19:22:02 Info : JLink caps 0x77fbf Info : JLink max mem block 9992 Info : Vref = 3.306 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 1 TRST = 1 Info : J-Link JTAG Interface ready Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (3041). Workaround: increase "set remotetimeout" in GDB Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3) Info : JTAG Tap/device matched Info : JTAG tap: stm32.bs tap/device found: 0x06414041 (Manufacturer: 0x020, Part: 0x6414, Version: 0x0) Info : JTAG Tap/device matched Warn : no telnet port specified, using default port 4444 Warn : no gdb port specified, using default port 3333 Warn : no tcl port specified, using default port 6666 Info : device id = 0x10016414 Info : flash size = 256kbytes stm32x mass erase complete Info : Padding image section 0 with 0 bytes wrote 6844 byte from file ../BootLoader/source/bl.elf in 0.670785s (9.963839 kb/s) Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1025). Workaround: increase "set remotetimeout" in GDB Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (9037). Workaround: increase "set remotetimeout" in GDB Error: timed out while waiting for target halted Error: error executing stm32x flash write algorithm Error: flash writing failed with error code: 0xfffffc7a Error: error writing to flash at address 0x08000000 at offset 0x00002000 (-902) $ sudo /usr/local/gnu-arm/bin/openocd -f ../GNUTools/openOCD/newLPM.cfg -c init -c "sleep 200" -f flashAll.script -c "reset run" -c "shutdown" Open On-Chip Debugger 0.2.0-in-development (2009-05-22-09:47) svn:1881 BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $ 500 kHz Error: J-Link command EMU_CMD_VERSION failed (-110) Error: J-Link command EMU_CMD_VERSION failed (-110) Segmentation fault $ cat ../GNUTools/openOCD/newLPM.cfg # script for stm32 if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME } else { set _CHIPNAME stm32 } if { [info exists ENDIAN] } { set _ENDIAN $ENDIAN } else { set _ENDIAN little } interface jlink # jtag speed jtag_khz 500 jtag_nsrst_delay 100 jtag_ntrst_delay 100 #use combined on interfaces or targets that can't set TRST/SRST separately reset_config trst_and_srst #jtag scan chain if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { # See STM Document RM0008 # Section 26.6.3 set _CPUTAPID 0x3ba00477 } jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID if { [info exists BSTAPID ] } { set _BSTAPID $BSTAPID } else { # See STM Document RM0008 # Section 26.6.2 # Low density devices, Rev A set _BSTAPID1 0x06412041 # Medium density devices, Rev A set _BSTAPID2 0x06410041 # Medium density devices, Rev B and Rev Z set _BSTAPID3 0x16410041 # High density devices, Rev A set _BSTAPID4 0x06414041 } jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BSTAPID1 -expected-id $_BSTAPID2 -expected-id $_BSTAPID3 -expected-id $_BSTAPID4 set _TARGETNAME [format "%s.cpu" $_CHIPNAME] target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 49152 -work-area-backup 0 flash bank stm32x 0 0 0 0 0 gdb_memory_map enable gdb_flash_program enable # For more information about the configuration files, take a look at: # openocd.texi $ _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development