JTAG
This guide will show you how to use the JTAG interface on the phyCORE-i.MX8X development kit.
Requirement
Download and Install the J-link software
Note
You can find more documentation about the J-link software here: https://wiki.segger.com/J-Link_Commander
Hardware Setup
Device Connection Setup
Open the J-link software and make sure your debugger is recognized.
SEGGER J-Link Commander V6.98a (Compiled Mar 5 2021 17:02:18) DLL version V6.98a, compiled Mar 5 2021 17:01:02 Connecting to J-Link via USB...O.K. Firmware: J-Link V11 compiled Jul 17 2020 16:24:07 Hardware version: V11.00 S/N: 51009799 License(s): GDB VTref=0.000V Type "connect" to establish a target connection, '?' for help J-Link>
Initiate the connection sequence.
connect Please specify device / core. <Default>: MK64FN1M0XXX12 Type '?' for selection dialog Device>MK64FN1M0XXX12 Please specify target interface: J) JTAG (Default) S) SWD T) cJTAG TIF>J
Please specify device / core. <Default>: MK64FN1M0XXX12 Type '?' for selection dialog Device>
Specify the device you are connecting to (MK64FN1M0XXX12)
MK64FN1M0XXX12
Please specify target interface: J) JTAG (Default) S) SWD T) cJTAG TIF>
Choose the target interface
J
Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect JTAGConf>
Use the default “Device position” from above by hitting “Enter” to move to the next step.
Specify target interface speed [kHz]. <Default>: 4000 kHz Speed>
Type in a device speed and hit “Enter”.
4000
Device "MK64FN1M0XXX12" selected. Connecting to target via JTAG InitTarget() Timeout while halting CPU. TotalIRLen = 4, IRPrint = 0x01 JTAG chain detection found 1 devices: #0 Id: 0x2890201D, IRLen: 04, JTAG-DP DPv0 detected Scanning AP map to find all available APs AP[7]: Stopped AP scan as end of AP map has been reached AP[0]: AXI-AP (IDR: 0x44770004) AP[1]: AHB-AP (IDR: 0x24770011) AP[2]: AHB-AP (IDR: 0x24770011) AP[3]: AHB-AP (IDR: 0x84770001) AP[4]: APB-AP (IDR: 0x54770002) AP[5]: AHB-AP (IDR: 0x84770001) AP[6]: AHB-AP (IDR: 0x84770001) Iterating through AP map to find AHB-AP to use AP[0]: Skipped. Not an AHB-AP AP[1]: Core found AP[1]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. FPUnit: 6 code (BP) slots and 2 literal slots CoreSight components: ROMTbl[0] @ E00FF000 ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7 ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM ROMTbl[0][7]: E0043000, CID: B105900D, PID: 001BB908 CSTF Cortex-M4 identified. J-Link>
Connection Test
Type in “h” and hit “Enter” to halt the CPU core.
h
PC = 1FFEBE76, CycleCnt = 00916A51 R0 = 00000000, R1 = 000C0000, R2 = 00300000, R3 = 00180000 R4 = 2001F76F, R5 = 41220000, R6 = 00C000C0, R7 = 2001F76F R8 = 2001F770, R9 = 0000051A, R10= 00008C01, R11= 001FC231 R12= 20009419 SP(R13)= 2001F730, MSP= 2001F730, PSP= 00000000, R14(LR) = 1FFEBE07 XPSR = 61000000: APSR = nZCvq, EPSR = 01000000, IPSR = 000 (NoException) CFBP = 04000000, CONTROL = 04, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00 FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000 FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000 FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000 FPS12= 00000000, FPS13= 00000000, FPS14= 5C0100C4, FPS15= 00000004 FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000 FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000 FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000 FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000 FPSCR= 00000000 J-Link>
Type in “g” and hit “Enter” to start the CPU core. No output expected.
g
Type in “mem 0,0” and hit “Enter” to test memory read functionality. No output expected.
mem 0,0
Type in “mem 0,1” and hit “Enter” to test memory read functionality.
mem 0,1
00000000 = 00
Type in “mem 0,10” and hit “Enter” to test memory read functionality.
mem 0,10
00000000 = 00 FC 01 20 D1 06 00 00 7D 06 00 00 7D 06 00 00 ... ....}...}...
Exit the Software
exit