2010-10-29 00:57:32 +00:00
|
|
|
# Freescale i.MX51
|
|
|
|
|
|
|
|
if { [info exists CHIPNAME] } {
|
2011-10-29 21:32:17 +00:00
|
|
|
set _CHIPNAME $CHIPNAME
|
2010-10-29 00:57:32 +00:00
|
|
|
} else {
|
2011-10-29 21:32:17 +00:00
|
|
|
set _CHIPNAME imx51
|
2010-10-29 00:57:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# CoreSight Debug Access Port
|
2011-10-29 21:32:17 +00:00
|
|
|
if { [info exists DAP_TAPID] } {
|
2010-10-29 00:57:32 +00:00
|
|
|
set _DAP_TAPID $DAP_TAPID
|
|
|
|
} else {
|
|
|
|
set _DAP_TAPID 0x1ba00477
|
|
|
|
}
|
|
|
|
|
2018-03-23 20:17:29 +00:00
|
|
|
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf \
|
2010-10-29 00:57:32 +00:00
|
|
|
-expected-id $_DAP_TAPID
|
|
|
|
|
|
|
|
# SDMA / no IDCODE
|
2018-03-23 20:17:29 +00:00
|
|
|
jtag newtap $_CHIPNAME sdma -irlen 4 -ircapture 0x0 -irmask 0xf
|
2010-10-29 00:57:32 +00:00
|
|
|
|
|
|
|
# SJC
|
2011-10-29 21:32:17 +00:00
|
|
|
if { [info exists SJC_TAPID] } {
|
2010-10-29 00:57:32 +00:00
|
|
|
set _SJC_TAPID SJC_TAPID
|
|
|
|
} else {
|
|
|
|
set _SJC_TAPID 0x0190c01d
|
|
|
|
}
|
|
|
|
|
2018-03-23 20:17:29 +00:00
|
|
|
jtag newtap $_CHIPNAME sjc -irlen 5 -ircapture 0x1 -irmask 0x1f \
|
2010-10-29 00:57:32 +00:00
|
|
|
-expected-id $_SJC_TAPID -ignore-version
|
|
|
|
|
2011-10-29 21:32:17 +00:00
|
|
|
# GDB target: Cortex-A8, using DAP
|
2010-10-29 00:57:32 +00:00
|
|
|
set _TARGETNAME $_CHIPNAME.cpu
|
2018-03-23 20:17:29 +00:00
|
|
|
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
|
|
|
|
target create $_TARGETNAME cortex_a -dap $_CHIPNAME.dap
|
2010-10-29 00:57:32 +00:00
|
|
|
|
|
|
|
# some TCK tycles are required to activate the DEBUG power domain
|
2018-03-23 20:17:29 +00:00
|
|
|
jtag configure $_CHIPNAME.sjc -event post-reset "runtest 100"
|
2010-10-29 00:57:32 +00:00
|
|
|
|
|
|
|
proc imx51_dbginit {target} {
|
2016-05-14 18:21:49 +00:00
|
|
|
# General Cortex-A8 debug initialisation
|
2013-02-01 15:43:21 +00:00
|
|
|
cortex_a dbginit
|
2010-10-29 00:57:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$_TARGETNAME configure -event reset-assert-post "imx51_dbginit $_TARGETNAME"
|