Can't debug u-boot nor linux via JTAG

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't debug u-boot nor linux via JTAG

Jump to solution
1,531 Views
jeroenvanderlaa
Contributor III

I can't seem to debug my bootloader nor the linux kernel via JTAG. Both on my custom board as on the MXSabreSD. I'm using a j-link Base from Segger.

I have started the J-Link GDB Server with the the following command:

JLinkGDBServer -device MCIMX6S4 -scriptfile IMX6SoloX_Connect_CortexA9.JLinkScript -speed auto -ir

The output of the GDB server is as follows:

SEGGER J-Link GDB Server V6.10i Command Line Version

JLinkARM.dll V6.10i (DLL compiled Oct 25 2016 19:26:37)

-----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: on
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: IMX6SoloX_Connect_CortexA9.JLinkScript
J-Link settings file: none
------Target related settings------
Target device: MCIMX6S4
Target interface: JTAG
Target interface speed: auto
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V10 compiled Sep 1 2016 18:29:58
Hardware: V10.10
S/N: 50102046
Feature(s): GDB
Checking target voltage...
Target voltage: 3.32 V
Listening on TCP/IP port 2331
Connecting to target...WARNING: At least one of the connected devices is not JTAG compliant (IEEE Std 1149.1, 7.1.1.d, IR-cells). (NumDevices = 4, NumBitsSet = 3)

WARNING: At least one of the connected devices is not JTAG compliant (IEEE Std 1149.1, 7.1.1.d, IR-cells). (NumDevices = 4, NumBitsSet = 3)

WARNING: At least one of the connected devices is not JTAG compliant (IEEE Std 1149.1, 7.1.1.d, IR-cells). (NumDevices = 4, NumBitsSet = 3)

WARNING: At least one of the connected devices is not JTAG compliant (IEEE Std 1149.1, 7.1.1.d, IR-cells). (NumDevices = 4, NumBitsSet = 3)


J-Link found 4 JTAG devices, Total IRLen = 17
JTAG ID: 0x4BA00477 (Cortex-A9)
Connected to target

Whenever I try to connect with a remote session I get the following warnings:

Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xE59FF01C)
WARNING: Failed to read memory @ address 0xFFFFFFFC
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0xFFFFFFFC
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0xFFFFFFFE
WARNING: Failed to read memory @ address 0xFFFFFFFC
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0xFFFFFFFE
WARNING: Failed to read memory @ address 0xFFFFFFFC
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0xFFFFFFFC
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0xFFFFFFFC
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0x00000000
WARNING: Failed to read memory @ address 0x00000000

The downloading goes well when I perform a load from the local gdb session. But I get the same warnings at the end.

When I try to run the executable I get the following on the server:

Starting target CPU...
ERROR: Could not start CPU core. (ErrorCode: -1)

I can't seem to find what I'm doing wrong. Can anybody help me with this problem?

An openocd solution is also ok as long as I can use GDB for debugging.

Best regards,

Jeroen van der Laan

Labels (3)
Tags (2)
0 Kudos
1 Solution
960 Views
jeroenvanderlaa
Contributor III

It seemed that the problem was with the GDB init script. A good tutorial can be found here:

Debugging using Segger J-Link JTAG - Boundary Devices 

View solution in original post

0 Kudos
2 Replies
961 Views
jeroenvanderlaa
Contributor III

It seemed that the problem was with the GDB init script. A good tutorial can be found here:

Debugging using Segger J-Link JTAG - Boundary Devices 

0 Kudos
960 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jeroen

for connection to i.MX6SX please try segger suggestions on

[SOLVED] Freescale IMX6SoloX support - J-Link/Flasher related - SEGGER Forum 

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

0 Kudos