On Thu, Mar 19, 2009 at 10:29:23PM -0000, Spencer Oliver wrote:
> > What you generally want is to start OpenOCD like this (for example):
> > 
> > $ openocd -f /usr/lib/openocd/interface/str9-comstick.cfg -f 
> > /usr/lib/openocd/target/str9comstick.cfg
> > Open On-Chip Debugger 1.0 (2009-03-12-01:10) svn:r1409
> > 
> > BUGS? Read /usr/share/doc/openocd/BUGS
> > 
> > $URL: 
> > http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.
> > c $ 3000 kHz Runtime error, file 
> > "/usr/lib/openocd/target/str9comstick.cfg", line 19:
> >     can't read "_CHIPNAME": no such variable
> > 
> > 
> > However, as you can see this currently results in an error 
> > (as of r1409), I guess this needs to be fixed in svn. I 
> > didn't have the time to investigate the issue further, yet.
> > 
> 
> Found a couple of typo's in the cfg - should be fixed in svn now.

Thanks, works a bit better now. However, I needed the following patch to
make the device detectable:

Index: src/target/interface/str9-comstick.cfg
===================================================================
--- src/target/interface/str9-comstick.cfg      (revision 1424)
+++ src/target/interface/str9-comstick.cfg      (working copy)
@@ -1,3 +1,4 @@
 interface ft2232
 ft2232_device_desc "STR9-comStick A"
 ft2232_layout comstick
+ft2232_vid_pid 0x0640 0x002c


After that here's the output as of r1424:

$ ./src/openocd -f src/target/interface/str9-comstick.cfg -f 
src/target/target/str9comstick.cfg 
Open On-Chip Debugger 1.0 (2009-03-20-14:45) svn:1421M
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
3000 kHz
Warn : Tap/Device does not have IDCODE
Error: JTAG tap: str912.flash             got: 0x00000000 (mfg: 0x000, part: 
0x0000, ver: 0x0)
Error: JTAG tap: str912.flash expected 1 of 1: 0x04570041 (mfg: 0x020, part: 
0x4570, ver: 0x0)
Error: trying to validate configured JTAG chain anyway...
Error: Could not validate JTAG scan chain, IR mismatch, scan returned 0x07FFFF. 
tap=str912.flash pos=0 expected 0x1 got 3
Warn : Could not validate JTAG chain, continuing anyway...
Warn : TAP str912.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 : TAP str912.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 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


$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> init
> halt
Target not examined yet
Runtime error, file "command.c", line 456:
> reset
JTAG communication failure, check connection, JTAG interface, target power etc.
trying to validate configured JTAG chain anyway...
Could not validate JTAG scan chain, IR mismatch, scan returned 0x07FFFF. 
tap=str912.flash pos=0 expected 0x1 got 3
Could not validate JTAG chain, continuing anyway...
TAP str912.cpu:
value captured during scan didn't pass the requested check:
captured: 0x0F check_value: 0x01 check_mask: 0x0F
in_handler: w/o "in_value", mismatch in SIR
TAP str912.cpu:
value captured during scan didn't pass the requested check:
captured: 0x0F check_value: 0x01 check_mask: 0x0F
in_handler: w/o "in_value", mismatch in SIR
Runtime error, file "embedded:startup.tcl", line 176:
    examine-fails: -4
in procedure 'ocd_process_reset' 
called at file "embedded:startup.tcl", line 175
Runtime error, file "command.c", line 456:
> halt
Target not examined yet
Runtime error, file "command.c", line 456:
> flash banks
#0: str9x at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0
#1: str9x at 0x00080000, size 0x00008000, buswidth 0, chipwidth 0
> flash probe 0
flash 'str9x' found at 0x00000000
> flash probe 1 
flash 'str9x' found at 0x00080000
> flash protect_check 0
Target not halted
unknown error when checking protection state of flash bank '#0' at 0x00000000
> flash protect_check 1
Target not halted
unknown error when checking protection state of flash bank '#1' at 0x00080000
> flash info 0
#0: str9x at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0
        #  0: 0x00000000 (0x10000 64kB) protected
        #  1: 0x00010000 (0x10000 64kB) protected
        #  2: 0x00020000 (0x10000 64kB) protected
        #  3: 0x00030000 (0x10000 64kB) protected
        #  4: 0x00040000 (0x10000 64kB) protected
        #  5: 0x00050000 (0x10000 64kB) protected
        #  6: 0x00060000 (0x10000 64kB) protected
        #  7: 0x00070000 (0x10000 64kB) protected
str9x flash driver info
> flash info 1
#1: str9x at 0x00080000, size 0x00008000, buswidth 0, chipwidth 0
        #  0: 0x00000000 (0x2000 8kB) protected
        #  1: 0x00002000 (0x2000 8kB) protected
        #  2: 0x00004000 (0x2000 8kB) protected
        #  3: 0x00006000 (0x2000 8kB) protected
str9x flash driver info
> flash protect 0 0 7 off                        
Target not halted
failed setting protection for areas 0 to 7 (-304)
> flash write_image /home/uwe/main.elf 
No flash at address 0x08000000
wrote 0 byte from file /home/uwe/main.elf in 0.000225s (0.000000 kb/s)
> halt
Target not examined yet
Runtime error, file "command.c", line 456:


Any idea what might be wrong?

Thanks, Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to