SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By ertonicus
#180626
Openocd on i.MX6 quad seems to disconnect from the target when the linux kernel loads.
I get a lot of "cortex_a_mmu: target not halted" errors.
I have tried other jtag speeds (500 - 25000), on all of them I get the same error.

To reproduce I am doing the following:
- start openocd
- start target
- target is halted by openocd script
- connect gdb on localhost:3333
- run "cont" command on gdb
- uboot loads kernel
- while kernel boots connection with the target is lost


Does anyone have an ideea of how to debug this ?


openocd configuration: http://pastebin.com/Hsu74SA3
debug output log: http://pastebin.com/YJgqJU5A

Target is an i.MX6 quad, linux Kernel command line has "maxcpus=1".

# openocd --version
Open On-Chip Debugger 0.9.0-dev-00346-g3e1dfdc (2015-03-16-09:37)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html


# openocd -f paste-bin-cfg.txt
Open On-Chip Debugger 0.9.0-dev-00346-g3e1dfdc (2015-03-16-09:37)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
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 : TAP imx6.sdma does not have IDCODE
Info : JTAG tap: imx6.sjc tap/device found: 0x2191c01d (mfg: 0x00e, part: 0x191c, ver: 0x2)
Info : imx6.cpu.0: hardware has 6 breakpoints, 4 watchpoints
Info : ttbcr 0ttbr0 8fff0000ttbr1 b2300001
Info : imx6.cpu.0 rev a, partnum c09, arch f, variant 2, implementor 41
Info : number of cache level 1
Info : imx6.cpu.0 cluster 0 core 0 multi core
examine-end event caught: halting target...
Info : accepting 'gdb' connection on tcp/3333
Polling target imx6.cpu.0 failed, GDB will be halted. Polling again in 100ms
Warn : target imx6.cpu.0 is not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: cortex_a_mmu: target not halted
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: MEM_AP_CSW 0x0, MEM_AP_TAR 0x80000042
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x82150080
Polling target imx6.cpu.0 failed, GDB will be halted. Polling again in 300ms
Polling target imx6.cpu.0 succeeded again, trying to reexamine
Info : imx6.cpu.0: hardware has 6 breakpoints, 4 watchpoints
examine-end event caught: halting target...
By motopic
#180635
I assume you are using the Freescale dev board because the imx6q is an EXTREMELY COMPLEX cpu. We had a team of hw engineers with years of experience layout our boards and they still messed it up twice.
And I have random boards that require active cooling, these chips overheat FAST.

What are you trying to debug exactly, if it gets past uboot, does it not boot the kernel?

You might look and see if jlink has a script, we used jlink early on, about 2 years ago, but once the kernel boots we stopped debugging at that level.

Finally have you tried this question over onthe freescale imx6 forum?
By ertonicus
#180702
I am trying to put a breakpoint at sync_filesystem, run the command on the console and expect the target to stop at breakpoint.
It boots the kernel, but while booting i get these "target not halted errors" and then the it tries to poll the target again and it reconnects.
After reexamine the target is halted by this "imx6.cpu.0 configure -event examine-end { echo "examine-end event caught: halting target..." ; halt }".
No, i did not ask the freescale forum. I started here.