gkenji / beagleboard

Automatically exported from code.google.com/p/beagleboard
0 stars 0 forks source link

OMAP3 Beagle OpenOCD JTAG (Flyswatter) support #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
OpenOCD JTAG (Flyswatter) support would be nice.

http://elinux.org/BeagleBoard#JTAG

Steps necessary for this:

*  OpenOCD compatible JTAG hardware interface with FTDI's FT2232 chip, e.g.
Flyswatter. The JTAG interface has to support 1.8V and 14 pin JTAG
connector. For JTAG pin out see section 8.17 of BeagleBoard HW Reference
Manual (rev. A5)
* Get latest OpenOCD source
* Add Cortex-A8 CPU ID. Currently only Cortex-M3 is supported. Take this as
example. Once you connect to target you should get error message expect
cpuid of xxxxxx but got yyyyyy which should contain Cortex-A8 CPU ID.
* Take CPU scan lengths from OMAP3530 CCS config.
* Pull-down the EMU0/EMU1 pins on BeagleBoard. Jumper P3 can be used to
pull-down EMU0. There is no jumper for EMU1, though. Unsure if EMU1 has to
be pulled-down, too. If so, modify HW to pull down EMU1 using pin 14 of
JTAG connector P2 or via R15. 

Original issue reported on code.google.com by dirk.be...@gmail.com on 1 May 2008 at 6:33

GoogleCodeExporter commented 8 years ago
Kees Jongenburger did some work on this. He uses a Flyswatter

http://tincantools.com/product.php?productid=16134

together with a Lauterbach 20-14 adapter:

http://www.flickr.com/photos/51025379@N00/2647457188/in/photostream/

http://www.flickr.com/photos/51025379@N00/2647457198/

This results in

-- cut --
keesj@ijssijs:~/projects/beagle/openocd$ ls
Makefile  openocd.cfg
keesj@ijssijs:~/projects/beagle/openocd$ make
sudo openocd
Open On-Chip Debugger 1.0 (2008-07-04-09:01) svn:738M
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info:    options.c:50 configuration_output_handler(): jtag_speed: 1, 1
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x0b7ae02f
(Manufacturer: 0x017, Part: 0xb7ae, Version: 0x0)
Error:   jtag.c:1399 jtag_examine_chain(): number of discovered devices in JTAG 
chain
(1) doesn't match configuration (0)
Error:   jtag.c:1400 jtag_examine_chain(): check the config file and ensure 
proper
JTAG communication (connections, speed, ...)
Error:   jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain
anyway...
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x0b7ae02f
(Manufacturer: 0x017, Part: 0xb7ae, Version: 0x0)
Error:   jtag.c:1399 jtag_examine_chain(): number of discovered devices in JTAG 
chain
(1) doesn't match configuration (0)
Error:   jtag.c:1400 jtag_examine_chain(): check the config file and ensure 
proper
JTAG communication (connections, speed, ...)
Error:   jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain
anyway...
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1456 jtag_validate_chain(): Error validating JTAG scan chain, IR
mismatch, scan returned 0x01
Error:   jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit
Warning: gdb_server.c:2015 gdb_init(): no gdb ports allocated as no target has 
been
specified
make: *** [test] Interrupt
-- cut --

Original comment by dirk.be...@gmail.com on 8 Jul 2008 at 4:27

GoogleCodeExporter commented 8 years ago
Update from Kees:

http://groups.google.com/group/beagleboard/msg/cc16e7f6b8a6aa77

Original comment by dirk.be...@gmail.com on 8 Jul 2008 at 5:38

GoogleCodeExporter commented 8 years ago
There is a new wiki page for this:

http://elinux.org/BeagleBoardJTAG

Original comment by dirk.be...@gmail.com on 11 Jul 2008 at 3:44

GoogleCodeExporter commented 8 years ago
Spend a lot of time trying to make it work with Flyswatter and openOCD. I 
compared 
to CCStudio's 3.3 configuration, and even tried to find the JTAG scan-chain at 
TI's 
web site. 

It seems like the Omap3530 chip has a differenet JTAG debugger architecture 
front 
end; it is not the same as in standard Arm chips, and neigher it is chained 
with the 
c64x+ DSP core. It seems like there is another layer in between, and to the 
outside 
world these two cores look like a SINGLE 6-bit IR chain (instead of 4 bit for 
arm + 
38 bit for C64x+ DSP). The existing dm355.cfg file out there, sets openOCD with 
three cores inside the chip, which is not what we have with the Omap.

To solve that there is a need to modify openOCD. But to do that, TI need to 
disclose 
the internal's of this added JTAG layer. 

It is probably a week of work (If there is money in that, I can do that ;) )

Yuli
yk -at- magniel -dot- com

Original comment by patish4...@gmail.com on 27 Aug 2008 at 2:37

GoogleCodeExporter commented 8 years ago
I think to remember there was a comment somewhere at IRC that most probably 
OMAP3
scan chain is quite similar to DaVinci one.

Anyway, if you are interested in OMAP3 scan chain details, contact Jason in 
private mail:

http://www.beagleboard.org/irclogs/index.php?date=2008-08-01#T21:02:11

"<jkridner|work> if someone is really working on OpenOCD, they should contact 
me for
an early version of the scan chain setup."

Original comment by dirk.be...@gmail.com on 27 Aug 2008 at 4:09

GoogleCodeExporter commented 8 years ago
The BDI config files

ftp://78.31.64.234/bdigdb/config/arm/cortex-a8/

might help getting OpenOCD to work with BeagleBoard.

Original comment by dirk.be...@gmail.com on 29 Aug 2008 at 3:54

GoogleCodeExporter commented 8 years ago
See http://beagleboard.org/project/OpenOCD+OMAP3+JTAG+support/

Original comment by jdk%ieee...@gtempaccount.com on 13 Jan 2009 at 3:35