<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://elinux.org/index.php?title=Am335x.cfg&amp;feed=atom&amp;action=history</id>
		<title>Am335x.cfg - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://elinux.org/index.php?title=Am335x.cfg&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=Am335x.cfg&amp;action=history"/>
		<updated>2013-05-24T20:13:49Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.22alpha</generator>

	<entry>
		<id>http://elinux.org/index.php?title=Am335x.cfg&amp;diff=127706&amp;oldid=prev</id>
		<title>Wmat: target config</title>
		<link rel="alternate" type="text/html" href="http://elinux.org/index.php?title=Am335x.cfg&amp;diff=127706&amp;oldid=prev"/>
				<updated>2012-05-08T18:19:10Z</updated>
		
		<summary type="html">&lt;p&gt;target config&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight code=&amp;quot;tcl&amp;quot;&amp;gt;&lt;br /&gt;
if { [info exists CHIPNAME] } {&lt;br /&gt;
   set _CHIPNAME $CHIPNAME&lt;br /&gt;
} else {&lt;br /&gt;
   set _CHIPNAME am335x&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# This chip contains an IcePick-D JTAG router.  The IcePick-C configuration is almost&lt;br /&gt;
# compatible, but it doesn't work.  For now, we will just embed the IcePick-D&lt;br /&gt;
# routines here.&lt;br /&gt;
proc icepick_d_tapenable {jrc port} {&lt;br /&gt;
	# select router&lt;br /&gt;
	irscan $jrc 7 -endstate IRPAUSE&lt;br /&gt;
	drscan $jrc 8 0x89 -endstate DRPAUSE&lt;br /&gt;
&lt;br /&gt;
	# set ip control&lt;br /&gt;
	irscan $jrc 2 -endstate IRPAUSE&lt;br /&gt;
	drscan $jrc 32 [expr 0xa0002108 + ($port &amp;lt;&amp;lt; 24)] -endstate DRPAUSE&lt;br /&gt;
&lt;br /&gt;
	# for icepick_D&lt;br /&gt;
	irscan $jrc 2 -endstate IRPAUSE&lt;br /&gt;
	drscan $jrc 32 0xe0002008 -endstate DRPAUSE&lt;br /&gt;
&lt;br /&gt;
	irscan $jrc 0x3F -endstate RUN/IDLE&lt;br /&gt;
	runtest 10&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# M3 DAP&lt;br /&gt;
#&lt;br /&gt;
if { [info exists M3_DAP_TAPID] } {&lt;br /&gt;
	set _M3_DAP_TAPID $M3_DAP_TAPID&lt;br /&gt;
} else {&lt;br /&gt;
	set _M3_DAP_TAPID 0x4b6b902f&lt;br /&gt;
}&lt;br /&gt;
jtag newtap $_CHIPNAME m3_dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_M3_DAP_TAPID -disable&lt;br /&gt;
jtag configure $_CHIPNAME.m3_dap -event tap-enable &amp;quot;icepick_d_tapenable $_CHIPNAME.jrc 11&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Main DAP&lt;br /&gt;
#&lt;br /&gt;
if { [info exists DAP_TAPID ] } {&lt;br /&gt;
   set _DAP_TAPID $DAP_TAPID&lt;br /&gt;
} else {&lt;br /&gt;
   set _DAP_TAPID 0x4b6b902f&lt;br /&gt;
}&lt;br /&gt;
jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -disable&lt;br /&gt;
jtag configure $_CHIPNAME.dap -event tap-enable &amp;quot;icepick_d_tapenable $_CHIPNAME.jrc 12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# ICEpick-D (JTAG route controller)&lt;br /&gt;
#&lt;br /&gt;
if { [info exists JRC_TAPID ] } {&lt;br /&gt;
   set _JRC_TAPID $JRC_TAPID&lt;br /&gt;
} else {&lt;br /&gt;
   set _JRC_TAPID 0x0b94402f&lt;br /&gt;
}&lt;br /&gt;
jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f -expected-id $_JRC_TAPID&lt;br /&gt;
jtag configure $_CHIPNAME.jrc -event setup &amp;quot;jtag tapenable $_CHIPNAME.dap&amp;quot;&lt;br /&gt;
# some TCK tycles are required to activate the DEBUG power domain&lt;br /&gt;
jtag configure $_CHIPNAME.jrc -event post-reset &amp;quot;runtest 100&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Cortex A8 target&lt;br /&gt;
#&lt;br /&gt;
set _TARGETNAME $_CHIPNAME.cpu&lt;br /&gt;
target create $_TARGETNAME cortex_a8 -chain-position $_CHIPNAME.dap -dbgbase 0x80001000&lt;br /&gt;
&lt;br /&gt;
# SRAM: 64K at 0x4030.0000; use the first 16K&lt;br /&gt;
$_TARGETNAME configure -work-area-phys 0x40300000 -work-area-size 0x4000&lt;br /&gt;
&lt;br /&gt;
$_TARGETNAME configure -event gdb-attach {&lt;br /&gt;
   cortex_a8 dbginit&lt;br /&gt;
   halt&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:OpenOCD]]&lt;br /&gt;
[[Category:Debugging]]&lt;/div&gt;</summary>
		<author><name>Wmat</name></author>	</entry>

	</feed>