Hello,
I’m trying to debug the i.MX7D cores on an Aster carrier board with a Colibri i.MX7D SOM using Segger J-Link debugger (the EDU Mini version).
The debugger is unable to connect to the target and I get the following error:
JLinkExe -device Cortex-M4 -autoconnect 1 -if JTAG -speed auto -JTAGConf -1,-1
SEGGER J-Link Commander V6.22e (Compiled Jan 8 2018 11:45:49)
DLL version V6.22e, compiled Jan 8 2018 11:45:44
Connecting to J-Link via USB...O.K.
Firmware: J-Link EDU Mini V1 compiled Dec 12 2017 16:56:36
Hardware version: V1.00
S/N: 801002622
License(s): GDB, FlashBP
VTref = 3.299V
Device "CORTEX-M4" selected.
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Connecting to target via JTAG
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Could not measure total IR len. TDO is constant high.
Cannot connect to target.
J-Link>
I tested the same J-Link debugger with another board and it is working correctly. I also checked the correct orientation of the cable.
Is the J-Link Edu mini debugger compatible with the Aster board?Has anyone else had the same problem with the aster board?
Hello, thanks for your answer!I’m using BSP 2.8.1, with the latest kernel v.4.9.67 built from sources. Both cores are working properly and I’m able to successfully load and run both Linux and FreeRTOS on the respective cores.
I saw the video and I did the same steps to setup Eclipse and J-Link plugin, except for the J-Link script (Toradex_iMX7D_Connect_CortexM4.JlinkScript) which I wasn’t able to find. I used the i.MX7 specific scripts provided by Segger instead, which I tested on a different i.MX7 board and are working correctly (I assumed that they were the same as the ones shown in the video). Is the J-Link script used in the video for M4 debugging available for download?
I think the problem comes before loading the scripts, since I’m not even able to open a the GDB server session.
I’m on a Linux host.
You’re right, I tested the Cortex-M4 flag before but forgot to change it back! I set the flag back to MCIMX7D7_M4 but the Could not measure total IR len. TDO is constant high. error is still there.
On the board TDO pin is actually low: by measuring with a DMM multimeter between pin 3 GND and pin 6 TDO I get 0V. I also measured between pin 3 and pin 1 to check, I get 3.3V as expected.
Some SODIMM springs do not hold the module nicely in place. Since the pogo pins push back on the module, sometimes it happens that not all JTAG signals make contact.
Can you try to push the module a bit down while starting JTAG?
Hello again!
It’s been a while but I recently got the chance to try the same Colibri i.MX7 SoM on a different Aster board, all JTAG signals make contact on this one and I have a working setup. So, as you said the problem was on the connector between the pogo pins on the carrier and the SoM. Thanks again for the help!
I do have a follow-up question on debugging with J-Link and GDB. J-Link is now able to connect successfully and open a GDB server session. On GDB I’m able to halt and reset the target, but I cannot load any .elf file. When loading a simple freertos hello world demo .elf, communication timeout expires and J-Link disconnects from the target. The error is the following:
ERROR: Communication timed out: Requested 4 bytes, received 0 bytes !
Full log is below:
GDB Server log:
JLinkGDBServer -device MCIMX7D7_M4 -if JTAG -speed auto -JTAGConf -1,-1 -scriptfile NXP_iMX7D_Connect_CortexM4.JLinkScript
SEGGER J-Link GDB Server V6.32b Command Line Version
JLinkARM.dll V6.32b (DLL compiled May 8 2018 18:28:22)
Command line: -device MCIMX7D7_M4 -if JTAG -speed auto -JTAGConf -1,-1 -scriptfile NXP_iMX7D_Connect_CortexM4.JLinkScript
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: NXP_iMX7D_Connect_CortexM4.JLinkScript
J-Link settings file: none
------Target related settings------
Target device: MCIMX7D7_M4
Target interface: JTAG
Target interface speed: auto
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link EDU Mini V1 compiled Mar 29 2018 17:48:40
Hardware: V1.00
S/N: 801002622
Feature(s): GDB, FlashBP
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...
J-Link found 1 JTAG device, Total IRLen = 4
JTAG ID: 0x5BA00477 (Cortex-M4)
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00912724 (Data = 0xF04FE7FE)
Read 2 bytes @ address 0x00912724 (Data = 0xE7FE)
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x00912724)
Downloading 576 bytes @ address 0x00000000
Downloading 14796 bytes @ address 0x1FFF8000
ERROR: Communication timed out: Requested 4 bytes, received 0 bytes !
Downloading 8 bytes @ address 0x1FFFB9CC
Downloading 4 bytes @ address 0x1FFFB9D4
Downloading 4 bytes @ address 0x1FFFB9D8
Downloading 108 bytes @ address 0x1FFFB9DC
Writing register (PC = 0x1FFF80B4)
WARNING: Target connection lost.
GDB log:
arm-none-eabi-gdb armgcc/debug/hello_world.elf
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from armgcc/debug/hello_world.elf...done.
(gdb) target remote localhost:2331
Remote debugging using localhost:2331
0x00912724 in ?? ()
(gdb) monitor halt
(gdb) load
Loading section .interrupts, size 0x240 lma 0x0
Loading section .text, size 0x39cc lma 0x1fff8000
Loading section .ARM, size 0x8 lma 0x1fffb9cc
Loading section .init_array, size 0x4 lma 0x1fffb9d4
Loading section .fini_array, size 0x4 lma 0x1fffb9d8
Loading section .data, size 0x6c lma 0x1fffb9dc
Start address 0x1fff80b4, load size 15496
Transfer rate: 27 KB/sec, 2582 bytes/write.
(gdb)
Do you have any suggestion on this?is there any particular gdbinit file I need to use with the colibri i.MX7?