Hi All,
I appear to have this working now, and wanted to post the solution, although I am still a bit confused about it.
In my imx6ull.cfg file I based it on the original imx6.cfg file in the openocd tree but had to change the DAP address as it was incorrect for the imx6ULL part:
# core 0 - 0x82150000
# core 0 - 0x02130000
set _TARGETNAME $_CHIPNAME.cpu.0
target create $_TARGETNAME cortex_a -chain-position $_CHIPNAME.dap \
-coreid 0 -dbgbase 0x02130000
Originally the DAP was setup to be 0x82150000 but looking through the im6ULL Reference Manual it shows the DAP to be at 0x02130000, and I could get DAP information at this address, but seems my write to clear the OSLock bit was failing (although the write said it worked OK, but did not change the value).
Looking through other imx configurations in the examples, I noticed that on the imx53.cfg file there was no DAP address loaded, so I thought maybe on a single core it was not needed, so I removed it:
set _TARGETNAME $_CHIPNAME.cpu.0
target create $_TARGETNAME cortex_a -chain-position $_CHIPNAME.dap
And the JTAG then tried to discover the DAP address from the ROM table:
Detected core 0 dbgbase: 80030000
Not anwhere near what the memory map in the reference manual indicates (in fact this address is somewhere int he DDR space). Anyway, it is now working and I can halt the chip so I can start developing and debugging. I have enclosed the imx6ull.cfg and openocd.cfg files I am currently using for reference, on the imx6ULL EVK.
imx6ull.cfg:
# Freescale i.MX6ULL processor
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME imx6
}
# CoreSight Debug Access Port
if { [info exists DAP_TAPID] } {
set _DAP_TAPID $DAP_TAPID
} else {
set _DAP_TAPID 0x5ba00477
}
jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x01 -irmask 0x0f \
-expected-id $_DAP_TAPID
# SDMA / no IDCODE
jtag newtap $_CHIPNAME sdma -irlen 4 -ircapture 0x00 -irmask 0x0f
# System JTAG Controller
if { [info exists SJC_TAPID] } {
set _SJC_TAPID $SJC_TAPID
} else {
set _SJC_TAPID 0x088c101d
}
jtag newtap $_CHIPNAME sjc -irlen 5 -ircapture 0x01 -irmask 0x1f \
-expected-id $_SJC_TAPID
# GDB target: Cortex-A7, using DAP, configuring only one core
set _TARGETNAME $_CHIPNAME.cpu.0
target create $_TARGETNAME cortex_a -chain-position $_CHIPNAME.dap
# some TCK cycles are required to activate the DEBUG power domain
jtag configure $_CHIPNAME.sjc -event post-reset "runtest 100"
proc imx6_dbginit {target} {
# General Cortex-A8/A9 debug initialisation
cortex_a dbginit
}
# Slow speed to be sure it will work
adapter_khz 1000
$_TARGETNAME configure -event reset-start { adapter_khz 1000 }
$_TARGETNAME configure -event reset-assert-post "imx6_dbginit $_TARGETNAME"
$_TARGETNAME configure -event gdb-attach { halt }
openocd.cfg file:
source ../openocd-0.10.0/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg
# Setup information for our busblaster and imx6 solo
set DAP_TAPID 0x5ba00477
set SJC_TAPID 0x088c101d
# imx config
source imx6ull.cfg
# SRST connects to POR_B
#reset_config srst_only
#reset_config trst_and_srst srst_pulls_trst
#reset_config trst_and_srst separate trst_open_drain srst_open_drain
reset_config trst_and_srst trst_open_drain srst_open_drain
# No RTCK
adapter_khz 1000
#$_TARGETNAME configure -event reset-start { adapter_khz 1000 }
# Can't get watchdog to reset correctly yet.. for now, just don't reset here.
# We already did a reset back in init_reset anyway.
#$_TARGETNAME configure -event reset-assert {}
# This delay affects how soon after SRST we try to halt, so make it as
# small as possible. However, if it is too small we will fail the JTAG scan.
# Delay determined by experimentation
jtag_ntrst_delay 1000
gdb_port 3333
telnet_port 3000
Now to add in the DDR init and see if we can start debugging real code.
regards,
Ian Caddy