On Wed, May 9, 2012 at 8:24 PM, Andreas Fritiofson
<[email protected]> wrote:
> On Wed, May 9, 2012 at 1:36 PM, Xiaofan Chen <[email protected]> wrote:
>> I just tested with TI/Luminary EK-LM3S1968 and here
>> are the results.
>>
>> There are actually no differences at all.
>>
>> mymacmini:build_mpsse xiaofanc$ cat myconfig_git.sh
>> LDFLAGS="-L/usr/local/lib -lusb-1.0" ../configure
>> --enable-maintainer-mode --prefix=/Users/xiaofanc/bin --enable-jlink
>> --enable-ftdi --enable-ft2232_libftdi --enable-stlink --disable-werror
>>
>> mymacmini:board xiaofanc$ cp ek-lm3s1968.cfg ek-lm3s1968_mpsse.cfg
>> mymacmini:board xiaofanc$ nano ek-lm3s1968.cfg
>> mymacmini:board xiaofanc$ pwd
>> /Users/xiaofanc/bin/share/openocd/scripts/board
>> mymacmini:board xiaofanc$ diff ek-lm3s1968.cfg ek-lm3s1968_mpsse.cfg
>> 13c13
>> < source [find interface/ftdi/luminary.cfg]
>> ---
>>> source [find interface/luminary.cfg]

This is the problem. I edited the wrong file. :-(
ek-lm3s1968.cfg is wronly edited for the
mpsse version and ek_lm3s1968_mpsse
is actually for the original version.

mymacmini:lm3s1968 xiaofanc$ cat
~/bin/share/openocd/scripts/board/ek-lm3s1968.cfg
#
# TI/Luminary Stellaris LM3S1968 Evaluation Kits
#
# http://www.luminarymicro.com/products/lm3s1968_evaluation_kits.html

# NOTE:  to use J-Link instead of the on-board interface,
# you may also need to reduce adapter_khz to be about 1200.
# source [find interface/jlink.cfg]

# include the FT2232 interface config for on-board JTAG interface
# NOTE:  using the on-board FT2232 JTAG/SWD/SWO interface is optional!
# so is using in JTAG mode, as done here.
source [find interface/ftdi/luminary.cfg]

# include the target config
set WORKAREASIZE 0x2000
set CHIPNAME lm3s1968
source [find target/stellaris.cfg]

mymacmini:lm3s1968 xiaofanc$ cat
~/bin/share/openocd/scripts/board/ek-lm3s1968_mpsse.cfg
#
# TI/Luminary Stellaris LM3S1968 Evaluation Kits
#
# http://www.luminarymicro.com/products/lm3s1968_evaluation_kits.html

# NOTE:  to use J-Link instead of the on-board interface,
# you may also need to reduce adapter_khz to be about 1200.
# source [find interface/jlink.cfg]

# include the FT2232 interface config for on-board JTAG interface
# NOTE:  using the on-board FT2232 JTAG/SWD/SWO interface is optional!
# so is using in JTAG mode, as done here.
source [find interface/luminary.cfg]

# include the target config
set WORKAREASIZE 0x2000
set CHIPNAME lm3s1968
source [find target/stellaris.cfg]

> Impossible. My driver doesn't print that message,
> it's only in ft2232.c.
>
> andreas@naven:~/develop/openocd$ grep -r "read enough bytes" .
> ../src/jtag/drivers/ft2232.c:           LOG_ERROR("couldn't read enough bytes 
> from "
>
> I'm not sure what's happening, but you're still using the old driver.
>

You are absolutely right.

But the mpsse version does not work at all.

It either hangs or give the errors.

1) Giving errors

mymacmini:lm3s1968 xiaofanc$ ~/bin/bin/openocd -f board/ek-lm3s1968.cfg
Open On-Chip Debugger 0.6.0-dev-00448-gac053a2 (2012-05-09-19:01)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
500 kHz
Info : clock speed 500 kHz
Info : JTAG tap: lm3s1968.cpu tap/device found: 0xffffffff (mfg:
0x7ff, part: 0xffff, ver: 0xf)
Warn : JTAG tap: lm3s1968.cpu       UNEXPECTED: 0xffffffff (mfg:
0x7ff, part: 0xffff, ver: 0xf)
Error: JTAG tap: lm3s1968.cpu  expected 1 of 1: 0x0ba00477 (mfg:
0x23b, part: 0xba00, ver: 0x0)
Warn : Unexpected idcode after end of chain: 608 0x7fffffff
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: lm3s1968.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
Polling target failed, GDB will be halted. Polling again in 700ms
Polling target failed, GDB will be halted. Polling again in 1500ms
^C

2) Hangs
mymacmini:lm3s1968 xiaofanc$ ~/bin/bin/openocd -f board/ek-lm3s1968.cfg
Open On-Chip Debugger 0.6.0-dev-00448-gac053a2 (2012-05-09-19:01)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
500 kHz
Info : clock speed 500 kHz
^C

BTW, the non-mpsse version sometime works without
the warning.

mymacmini:lm3s1968 xiaofanc$ ~/bin/bin/openocd -f board/ek-lm3s1968_mpsse.cfg
Open On-Chip Debugger 0.6.0-dev-00448-gac053a2 (2012-05-09-19:01)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
500 kHz
Info : clock speed 500 kHz
Info : JTAG tap: lm3s1968.cpu tap/device found: 0x3ba00477 (mfg:
0x23b, part: 0xba00, ver: 0x3)
Info : lm3s1968.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'telnet' connection from 4444
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x000011a8 msp: 0x200000f0



-- 
Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to