OpenOCD JTAG Solution for Colibri iMX7

Hi,

I want to use JTAG for M4 core on Colibri iMX7 board but recommended debugger from KEIL is too expensive. Cheap OpenOCD Olimex debuggers should be supported according to information on http://developer.toradex.com/knowledge-base/jtag. So, I bought olimex-arm-usb-tiny-h but now I see there is not suitable imx7.cfg file in installation folder. I already contact Olimex support but they did not help me. Can you guys create this config file for debugging M4 core on Colibri iMX7? I think I am not the only one who needs this.

Also a step by step manual for how to setup pure Eclipse environment for Colibri iMX7 (M4 core) with OpenOCD will be very helpful for me.

Regards,

Peter.

You can find initial version of the imx7.cfg below. It requires you to enable and clock m4 from u-boot/linux before connecting.

# Freescale i.MX7 series dual/quad core processor

if { [info exists CHIPNAME] } {
   set  _CHIPNAME $CHIPNAME
} else {
   set  _CHIPNAME imx7
}

# CoreSight Debug Access Port
if { [info exists JTAG_DAP_TAPID] } {
        set _JTAG_DAP_TAPID $JTAG_DAP_TAPID
} else {
        set _JTAG_DAP_TAPID 0x5ba00477
}

if { [info exists SWD_DAP_TAPID] } {
        set _SWD_DAP_TAPID $SWD_DAP_TAPID
} else {
        set _SWD_DAP_TAPID 0x5ba00477
}

if { [using_jtag] } {
        set DAP_TAPID $_JTAG_DAP_TAPID
} else {
        set DAP_TAPID $_SWD_DAP_TAPID
}

source [find target/swj-dp.tcl]

swj_newdap $_CHIPNAME dap -irlen 4 -ircapture 0x01 -irmask 0x0f \
        -expected-id $DAP_TAPID

# GDB target: Cortex-A7, using DAP, configuring only one core
# Base addresses of cores:
# core 0  -  0x80070000
# core 1  -  0x80072000
set _TARGETNAME0 $_CHIPNAME.cpu0
target create $_TARGETNAME0 cortex_a -chain-position $_CHIPNAME.dap \
        -coreid 0 -dbgbase 0x80070000
$_TARGETNAME0 configure -rtos linux

set _TARGETNAME2 $_CHIPNAME.mcu
target create $_TARGETNAME2 cortex_m -chain-position $_CHIPNAME.dap \
        -ap-num 4
$_TARGETNAME2 configure -rtos FreeRTOS
        
adapter_khz 1000