Hi,
We use a custom board with IMX6Q6 to deploy u-boot or Yocto OS via USB and all works fine so far. However, when we try to debug the u-boot from Ubuntu 22.04 host, we cannot convince our J-Link Ultra+ (with 10-pin JTag connected via the J-Link Adapter CortexM intermediate board) to flash it to the external DDR3 although we use the same clock and DDR3 initialization configuration which we used when flashing the u-boot by USB.
To check simpler things we ran command line GDB server and supplied the GDB initialization commands and could see that although the "monitor memU32 Addx = Value" command is executed by GDB without error (maybe because there is no feedback supposed for this command), it returns a failure when we try to read the same memory with "monitor memU32 Addr" command.
When using JLinkExe to talk to IMX6Q6 we can halt and read the CPU registers, but J-Link fails when reading/writing to or from peripheral memory. The following is a snippet of J-Link output:
Display All
As the log shows both the read and write operations for e.g. address 0x020bc000 (which is used to disable the watchdog in IMX6) fails.
According to other posts in the Internet the JLink Ultra+ should work with IMX6.
Could this problem be related to J-Link or its incompatibility with IMX6? Or this should be a problem with IMX6 itself?
We use a custom board with IMX6Q6 to deploy u-boot or Yocto OS via USB and all works fine so far. However, when we try to debug the u-boot from Ubuntu 22.04 host, we cannot convince our J-Link Ultra+ (with 10-pin JTag connected via the J-Link Adapter CortexM intermediate board) to flash it to the external DDR3 although we use the same clock and DDR3 initialization configuration which we used when flashing the u-boot by USB.
To check simpler things we ran command line GDB server and supplied the GDB initialization commands and could see that although the "monitor memU32 Addx = Value" command is executed by GDB without error (maybe because there is no feedback supposed for this command), it returns a failure when we try to read the same memory with "monitor memU32 Addr" command.
When using JLinkExe to talk to IMX6Q6 we can halt and read the CPU registers, but J-Link fails when reading/writing to or from peripheral memory. The following is a snippet of J-Link output:
Source Code
- SEGGER J-Link Commander V7.88d (Compiled May 24 2023 15:23:29)
- DLL version V7.88d, compiled May 24 2023 15:23:09
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link Ultra V4 compiled Sep 22 2022 15:00:10
- Hardware version: V4.00
- J-Link uptime (since boot): N/A (Not supported by this model)
- S/N: 504402110
- License(s): RDI, FlashBP, FlashDL, JFlash, GDB
- VTref=3.285V
- Type "connect" to establish a target connection, '?' for help
- J-Link>connect
- Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
- JTAGConf>
- Device "MCIMX6Q6" selected.
- Connecting to target via JTAG
- TotalIRLen = 13, IRPrint = 0x0101
- At least one of the connected devices is not JTAG compliant (IEEE Std 1149.1, 7.1.1.d, IR-cells). (NumDevices = 3, NumBitsSet = 2)
- JTAG chain detection found 3 devices:
- #0 Id: 0x4BA00477, IRLen: 04, CoreSight JTAG-DP
- #1 Id: 0x00000001, IRLen: ?, Unknown device
- #2 Id: 0x2191C01D, IRLen: ?, Unknown device
- DPv0 detected
- Scanning AP map to find all available APs
- AP[3]: Stopped AP scan as end of AP map has been reached
- AP[0]: AHB-AP (IDR: 0x44770001)
- AP[1]: APB-AP (IDR: 0x24770002)
- AP[2]: JTAG-AP (IDR: 0x14760010)
- Iterating through AP map to find APB-AP to use
- AP[0]: Skipped. Not an APB-AP
- AP[1]: APB-AP found
- ROMTbl[0][0]: CompAddr: 82141000 CID: B105900D, PID: 003BB907 ETB
- ROMTbl[0][1]: CompAddr: 82142000 CID: B105900D, PID: 002BB906 CTI (?)
- ROMTbl[0][2]: CompAddr: 82143000 CID: B105900D, PID: 004BB912 TPIU
- ROMTbl[0][3]: CompAddr: 82144000 CID: B105900D, PID: 001BB908 CSTF
- ROMTbl[0][4]: CompAddr: 8214F000 CID: B105100D, PID: 000BB4A9 ROM Table
- ROMTbl[1][0]: CompAddr: 82150000 CID: B105900D, PID: 000BBC09 Cortex-A9
- Found Cortex-A9 r2p10
- 6 code breakpoints, 4 data breakpoints
- Debug architecture ARMv7.0
- Data endian: little
- Main ID register: 0x412FC09A
- I-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way
- D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way
- System control register:
- Instruction endian: little
- Level-1 instruction cache enabled
- Level-1 data cache disabled
- MMU disabled
- Branch prediction disabled
- Memory zones:
- Zone: "Default" Description: Default access mode
- Zone: "AHB-AP (AP0)" Description: DMA like acc. in AP0 addr. space
- Zone: "APB-AP (AP1)" Description: DMA like acc. in AP1 addr. space
- Cortex-A9 identified.
- J-Link>h
- ...
- J-Link>ih
- CPU is halted (PC = 0x000027FA).
- J-Link>Regs
- PC: (R15) = 000027FA, CPSR = 800001F3 (SVC mode, THUMB FIQ dis. IRQ dis.)
- Current:
- R0 =00000000, R1 =00000000, R2 =00900000, R3 =00000800
- R4 =00000002, R5 =00000000, R6 =00000098, R7 =020D8000
- R8 =009024B4, R9 =000B0000, R10=00000000, R11=00000000, R12=00000001
- R13=0093FF8C, R14=00000DE9, SPSR=00000000
- USR: R8 =009024B4, R9 =000B0000, R10=00000000, R11=00000000, R12=00000001
- R13=00000000, R14=00000000
- FIQ: R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
- R13=00000000, R14=00000000, SPSR=000215B0
- IRQ: R13=00000000, R14=00000000, SPSR=24002050
- SVC: R13=0093FF8C, R14=00000DE9, SPSR=B9000878
- ABT: R13=00000000, R14=00000000, SPSR=08000475
- UND: R13=00000000, R14=00000000, SPSR=20041911
- J-Link>mem32 0x020bc000 1 <-- Reading the register to disable watchdog returns nothing
- J-Link>w4 0x020bc000 0x30 <-- Disabling the watchdog
- Writing 00000030 -> 020BC000 <-- Write fails
- Failed to write memory
- J-Link>ih
- CPU is halted (PC = 0x000027FA).
- J-Link>
According to other posts in the Internet the JLink Ultra+ should work with IMX6.
Could this problem be related to J-Link or its incompatibility with IMX6? Or this should be a problem with IMX6 itself?