imx6sx accessing M4

I’m trying to figure out how to create a new imx6.cfg file for a imx6sx The imx6sx has a M4 and A9.

I have jtag connected and get the following when using the imx6.cfg

openocd -f interface/ftdi/jtagkey.cfg -f ./tcl/target/imx6.cfg

nfo : auto-selecting first available session transport “jtag”. To override use ‘transport select ’.

Warn : imx6.sdma: nonstandard IR value

adapter speed: 1000 kHz

adapter speed: 1000 kHz

Info : clock speed 1000 kHz

Info : JTAG tap: imx6.dap tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)

Info : JTAG tap: imx6.sdma tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)

Info : TAP imx6.sjc does not have IDCODE

Info : JTAG tap: auto0.tap tap/device found: 0x0891c01d (mfg: 0x00e, part: 0x891c, ver: 0x0)

Error: imx6.sdma: IR capture error; saw 0x01 not 0x00

Warn : Bypassing JTAG setup events due to errors

Warn : Invalid ACK 0x4 in JTAG-DP transaction

Warn : Invalid ACK 0x4 in JTAG-DP transaction

There are 4 taps:

SJC_0

SDMA_0

ARMCS-DP_0

Cortex-A9_0

ARMCS-DP_1

Cortex-M4_0

Here is what I have so far:

Freescale i.MX6SX series single/dual/quad core processor

if { [info exists CHIPNAME] } {

set _CHIPNAME $CHIPNAME

} else {

set _CHIPNAME imx6sx

}

CoreSight Debug Access Port A9…

if { [info exists DAP_TAPID] } {

set _DAP_TAPID $DAP_TAPID

} else {

set _DAP_TAPID 0x4ba00477

}

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 0x0891c01d

}

#SDMA

set _SJC_TAPID2 0x2191c01d

#DAP for ARM Cortex A9

set _SJC_TAPID3 0x2191e01d

#ARM Cortex A9

set _SJC_TAPID4 0x1191c01d

#DAP for ARM M4

#???

#ARM Cortex M4

#???

#below needs to change to only use the M4 not A9

jtag newtap $_CHIPNAME sjc -irlen 5 -ircapture 0x01 -irmask 0x1f \

-expected-id $_SJC_TAPID -expected-id $_SJC_TAPID2 \

-expected-id $_SJC_TAPID3 -expected-id $_SJC_TAPID4

GDB target: Cortex-A9, using DAP, configuring only one core

Base addresses of cores:

ARM Cortex -A9 - 0x82150000

core 0 - 0x82152000

set _TARGETNAME $_CHIPNAME.cpu.0

#need to change this for M4…

target create $_TARGETNAME cortex_a -chain-position $_CHIPNAME.dap \

-coreid 0 -dbgbase 0x82150000

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 }

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 }

OK did an auto probe and got the following:

Open On-Chip Debugger 0.10.0-dev-00023-g8590315 (2016-01-02-19:34)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

adapter speed: 1000 kHz

Info : auto-selecting first available session transport “jtag”. To override use ‘transport select ’.

RCLK - adaptive

Info : RCLK (adaptive clock speed) not supported - fallback to 8 kHz

Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!

Info : JTAG tap: auto0.tap tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)

Info : JTAG tap: auto1.tap tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)

Info : TAP auto2.tap does not have IDCODE

Info : JTAG tap: auto3.tap tap/device found: 0x0891c01d (mfg: 0x00e, part: 0x891c, ver: 0x0)

Warn : AUTO auto0.tap - use “jtag newtap auto0 tap -irlen 4 -expected-id 0x4ba00477”

Warn : AUTO auto1.tap - use “jtag newtap auto1 tap -irlen 8 -expected-id 0x4ba00477”

Warn : AUTO auto2.tap - use “jtag newtap auto2 tap -irlen 5 -expected-id 0x00000000”

Warn : AUTO auto3.tap - use “jtag newtap auto3 tap -irlen 2 -expected-id 0x0891c01d”

Error: auto3.tap: IR capture error; saw 0x0003 not 0x0001

Warn : Bypassing JTAG setup events due to errors

Warn : gdb services need one or more targets defined