Here are my openOCD configuration files:
Continued call for help !
It still seems that these are hard to read on the other
posting, I will just inline them here
####Eagle100_jtag_tiny-setup.cfg===========================================
From Source file: “olimex-jtag-tiny-a.cfg”------------------------
interface ft2232
ft2232_device_desc “Olimex OpenOCD JTAG TINY A”
ft2232_layout olimex-jtag
#------------------------------------------------------------------
From Source file: “joes_Eagle100BoardTrial1.cfg”------------------
My test board has a “Rev1” tap id.
set BSTAPID 0x16410041
source [find target/jmk_lm3s6918.cfg] (will just include into this…)
#------------------------------------------------------------------
From Source file: jmk_lm3s6918.cfg (in target directory)
script for luminary lm3s6918
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lm3s6918
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
this defaults to a little endian
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
force an error till we get a good number
set _CPUTAPID 0x3ba00477
}
jtag speed
jtag_khz 500
jtag_nsrst_delay 100
jtag_ntrst_delay 100
#LM3S6918 Evaluation Board has only srst
reset_config srst_only
#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0xf -expected-id $_CPUTAPID
THIS WAS IN THE “makeController-debug.cfg” but is deprecated in openOCD0.10
#daemon startup reset
#this config option has been removed, simply adding init' and
reset halt’ to the end
#of your config script will give the same behaviour as using `daemon_startup reset’
#and `target cortex_m3 little reset_halt 0’.
the luminary variant causes a software reset rather than asserting SRST
this stops the debug registers from being cleared
this will be fixed in later revisions of silicon
set _TARGETNAME [format “%s.cpu” $_CHIPNAME]
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -variant lm3s
4k working area at base of ram
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 0x4000 -work-area-backup 0
#flash configuration
flash bank stellaris 0 0 0 0 0
#recommded by Duane Ellis of openOCD
#This tells openocd to inform GDB where ‘flash lives’ - thus GDB will attempt to#use hardware breakpoints.
#----
gdb_memory_map enable
#----
####Eagle100_jtag_tiny-setup.cfg===========================================
Then the following of these is sent next to openOCD:
- DebugPgm.cfg:
telnet_port 4444
gdb_port 3333
init
reset
Or
- ErasePgm.cfg
#define our ports
telnet_port 4444
gdb_port 3333
tcl_port 6666
echo “before init”
init
halt
sleep 200
wait_halt
flash probe 0
flash erase_check 0
This cmd below seems not to work (but it did not really matter):
“Error: failed setting protection for areas 8 to 255 (-901)”
#flash protect 0 8 255 off
But this did work:
flash erase_sector 0 0 255
sleep 200
flash erase_check 0
reset run
shutdown
If the chip was already programmed:
openocd -d 3 -f Eagle100_jtag_tiny-setup.cfg -f DebugPgm.cfg -l openocdLogj26.txt
To see if gdb could directly program a blank chip - this did work.
openocd -d 3 -f Eagle100_jtag_tiny-setup.cfg -f ErasePgm.cfg -l openocdLogErase.txt
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Next
I executed the following gdb commands from dos window
=====
Specify the ELF file…
=====
(gdb) file blinky.out.
=====
Specify the target
=====
(gdb) target remote localhost:3333
=====
Tell openocd to HALT the target
=====
(gdb) mon halt
=====
Tell openocd to RESET the target.
=====
(gdb) mon reset
=====
And i tell it to halt again…
=====
(gdb) mon halt
=====
Load my program - this actually programs the flash
=====
(gdb) load
=====
Set a breakpoint at “blinky.c line24”
=====
(gdb) break blinky.c:24
=====
Tell GDB to continue - see the NOTE from GDB…
=====
(gdb) cont
=====
I did not hit my breakpoint…
=====
It required using contorl C to stop running.
=====
Does not work yet, please help…
=====
… and got stuck with no
working breakpoints as described.
Joe