i.mx6 Dual lite JTAG bare metal app

Showing results for 
Search instead for 
Did you mean: 

i.mx6 Dual lite JTAG bare metal app

Contributor I

I have a board which is running a MCIMX6U5EVM10AC - NXP i.MX 6 series 32-bit MPU, Dual ARM Cortex-A9 core, 1GHz CPU with 8GB DDR3 ram.

I currently have it connected via JTAG using an Olimex ARM-USB-OCD-H and openocd using the following command

openocd -f /interface/ftdi/olimex-arm-usb-ocd-h.cfg -f /target/imx6.cfg

This shows the following

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Warn : imx6.sdma: nonstandard IR value
adapter speed: 1000 kHz
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter speed: 1000 kHz
jtag_ntrst_delay: 1000
Info : clock speed 1000 kHz
Info : JTAG tap: imx6.dap tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : TAP imx6.sdma does not have IDCODE
Info : JTAG tap: imx6.sjc tap/device found: 0x1891a01d (mfg: 0x00e (Freescale (Motorola)), part: 0x891a, ver: 0x1)
Info : imx6.cpu.0: hardware has 6 breakpoints, 4 watchpoints

Almost everything seems to work fine, I can read memory, write to registers etc... 

However, I'm attempting to load and run a bare metal app which no matter what I do fails.

Using the bare metal SDK found here https://github.com/flit/imx6_platform_sdk I attempt to load one of the apps. for example

> halt
DSCR_DTR_RX_FULL, dscr 0x4b08e003
imx6.cpu.0 rev a, partnum c09, arch f, variant 2, implementor 41
imx6.cpu.0 cluster 0 core 0 multi core
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0xa00f0193 pc: 0x803dc30c
MMU: enabled, D-Cache: enabled, I-Cache: enabled
> load_image /home/imx6_sdk/imx6_platform_sdk/output/mx6sdl/ping/evb_rev_a/ping.elf

And I simply get the error "data abort at 0x10000000, dfsr = 0x00000805"

I'm able to load it by specifying the memory offset 0x80000000

> load_image /home/imx6_sdk/imx6_platform_sdk/output/mx6sdl/ping/evb_rev_a/ping.elf 0x80000000
306408 bytes written at address 0x90000000
downloaded 306408 bytes in 24.571947s (12.178 KiB/s)

However the code never seems to run, I've tried both resume 0x90000000 and step 0x90000000

Resume just continues and doesn't appear to do anything? (I've inserted an infinite while loop into the code just to make sure and it never gets reached)

> resume 0x90000000
> halt
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x800e0113 pc: 0x8033afc8
MMU: enabled, D-Cache: enabled, I-Cache: enabled

and step throws an abort error (setting breakpoints seems to be completely broken.

> step 0x90000000
target halted in ARM state due to breakpoint, current mode: Abort
cpsr: 0x800e0197 pc: 0xffff000c
MMU: enabled, D-Cache: enabled, I-Cache: enabled
Data fault registers DFSR: 00000817, DFAR: 0088f880
Instruction fault registers IFSR: 0000000d, IFAR: 90000000

I've tried multiple reset configs as well but they appear even more broken than the ones openocd ships with. Any help on this would be greatly appreciated.

Labels (3)
0 Kudos
2 Replies

NXP TechSupport
NXP TechSupport

Hi Emantec

seems sdk by default does not use mmu, one can try below patch

Enabling MMU and Caches on i.MX6 Series Platform SDK 

Best regards
Note: If this post answers your question, please click the Correct Answer button. Thank you!

0 Kudos

Contributor I

Thanks but that's just a performance patch, I don't see how this will resolve my issues? Also, the patch has since been deleted. 

0 Kudos