I'm using an lm3s6965-ek as a JTAG interface and a custom board with a
lm3s8962 as a debug target. I'm running fedora linux 9 with libftdi.

When I attempt to write my program to flash, the first attempt seems to
consistently result in only an erased flash (all ff's.) A second attempt
always seems to works.  I'm running from openocd HEAD, but this problem
has been happening (at least intermittently) since revision 500 or so.
You'll also note BUG() firing periodically, though I'm not sure its
relevant to what's happening here.

Here's a GDB transcript showing what's happening:

(gdb) make
make: Nothing to be done for `all'.
(gdb) monitor stellaris mass_erase 0
stellaris mass erase complete
(gdb) monitor flash write_image main.out
Padding image section 0 with 0 bytes
Algorithm flash write 2048 words to 0x0, 6622 remaining
Algorithm flash write 2048 words to 0x2000, 4574 remaining
Algorithm flash write 2048 words to 0x4000, 2526 remaining
Algorithm flash write 478 words to 0x6000, 478 remaining
wrote 26488 byte from file main.out in 3.694368s (7.001790 kb/s)
BUG: keep_alive() was not invoked in the 1000ms timelimit. GDB alive
packet not sent! (3703)
(gdb) x/32 0
0x0 <_vects>:    0xffffffff    0xffffffff    0xffffffff    0xffffffff
0x10 <interrupts_disable+8>:    0xffffffff    0xffffffff
0xffffffff    0xffffffff
0x20 <interrupts_restore+4>:    0xffffffff    0xffffffff
0xffffffff    0xffffffff
0x30 <delay+12>:    0xffffffff    0xffffffff    0xffffffff    0xffffffff
0x40 <nkern_utime+8>:    0xffffffff    0xffffffff    0xffffffff
0xffffffff
0x50 <nkern_utime+24>:    0xffffffff    0xffffffff    0xffffffff
0xffffffff
0x60 <nkern_utime+40>:    0xffffffff    0xffffffff    0xffffffff
0xffffffff
0x70 <nkern_utime+56>:    0xffffffff    0xffffffff    0xffffffff
0xffffffff
(gdb) monitor stellaris mass_erase 0
stellaris mass erase complete
(gdb) monitor flash write_image main.out
Padding image section 0 with 0 bytes
Algorithm flash write 2048 words to 0x0, 6622 remaining
Algorithm flash write 2048 words to 0x2000, 4574 remaining
Algorithm flash write 2048 words to 0x4000, 2526 remaining
Algorithm flash write 478 words to 0x6000, 478 remaining
wrote 26488 byte from file main.out in 4.116927s (6.283130 kb/s)
BUG: keep_alive() was not invoked in the 1000ms timelimit. GDB alive
packet not sent! (4119)
(gdb) x/32 0
0x0 <_vects>:    0x20010000    0x00000f09    0x8c11f3ef    0xc000f8c0
0x10 <interrupts_disable+8>:    0x0cc0f04f    0x8811f38c
0x46c04770    0xf3836803
0x20 <interrupts_restore+4>:    0x47708811    0xbf002200
0x32014b02    0xd1fa429a
0x30 <delay+12>:    0x46c04770    0x0007a120    0x4b0c480b    0x68196802
0x40 <nkern_utime+8>:    0x1a892332    0xf1f3fbb1    0x2303fb01
0x4c08b5d0
0x50 <nkern_utime+24>:    0xe9d46003    0x18562300    0x0700f143
0x46394630
0x60 <nkern_utime+40>:    0x0100e9c4    0x46c0bdd0    0x20002d90
0xe0001004
0x70 <nkern_utime+56>:    0x20002d88    0x46684a40    0xf0206813
0xf0230107

My openocd conf is below:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232

ft2232_vid_pid 0x0403 0xbcd9
ft2232_layout evb_lm3s811

# 6 seems to be slow enough for unprogrammed part
jtag_khz 200
jtag_nsrst_delay 100
jtag_ntrst_delay 100

#LM3S811 Evaluation Board has only srst
#reset_config srst_only

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE
opcode)
jtag_device 4 0x1 0xf 0xe

target cortex_m3 little 0 lm3s

# 4k working area at base of ram
working_area 0 0x20000000 0x4000 nobackup

flash bank stellaris 0 0 0 0 0
#flash auto_erase on

Thanks in advance for any pointers!

-Ed


_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to