Hello Nino - sorry to start another thread, the last thread was marked as closed before I had a chance to respond to your last inquiry. I am currently running J-LINK v6.34h family of tools. I am using Elipse as my IDE and have had success with RAM-based applications, but still no luck on QUAD SPI based applications running on the M4 core of the iMX7D.
For my current debugging I am stopping the A-core in UBOOT and running the "sf probe" command with essentially sets up the QUAD-SPI interface allowing access. When I go to debug a QUAD-SPI application I see the console report that it is downloading the code and verifying it (all OK with one exception at one particular address), but I am not convinced that this 'downloading' is actually doing anything. I also still get "WARNING: No more breakpoint resources left". There is a dump of the console upon starting the debug session below.
I did try using J-FLASH but the memory part is not in the supported list (Maybe it's not supported at all?). Our Sabre SD board has a Macronix MX25L51245GXDI-10G, 64M-byte part on it. I tried using some similar parts and manually setting up a part but have had no luck; I can connect to the board just fine, but the memory part is not recognized. The base address of the SPI bus is 0x60000000.
Display All
For my current debugging I am stopping the A-core in UBOOT and running the "sf probe" command with essentially sets up the QUAD-SPI interface allowing access. When I go to debug a QUAD-SPI application I see the console report that it is downloading the code and verifying it (all OK with one exception at one particular address), but I am not convinced that this 'downloading' is actually doing anything. I also still get "WARNING: No more breakpoint resources left". There is a dump of the console upon starting the debug session below.
I did try using J-FLASH but the memory part is not in the supported list (Maybe it's not supported at all?). Our Sabre SD board has a Macronix MX25L51245GXDI-10G, 64M-byte part on it. I tried using some similar parts and manually setting up a part but have had no luck; I can connect to the board just fine, but the memory part is not recognized. The base address of the SPI bus is 0x60000000.
Source Code
- SEGGER J-Link GDB Server V6.34h Command Line Version
- JLinkARM.dll V6.34h (DLL compiled Oct 9 2018 15:48:11)
- Command line: -if jtag -device CORTEX-M4 -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 19021 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui -scriptfile C:\Program Files (x86)\SEGGER\JLINK_Scripts\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: 19021
- Accept remote connection: localhost only
- Generate logfile: off
- Verify download: on
- Init regs on start: on
- Silent mode: off
- Single run mode: on
- Target connection timeout: 0 ms
- ------J-Link related settings------
- J-Link Host interface: USB
- J-Link script: C:\Program Files (x86)\SEGGER\JLINK_Scripts\NXP_iMX7D_Connect_CortexM4.JLinkScript
- J-Link settings file: none
- ------Target related settings------
- Target device: CORTEX-M4
- Target interface: JTAG
- Target interface speed: 1000kHz
- Target endian: little
- Connecting to J-Link...
- J-Link is connected.
- Firmware: J-Link V10 compiled Sep 4 2018 11:24:21
- Hardware: V10.10
- S/N: 50101423
- Feature(s): GDB
- 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)
- WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
- Connected to target
- Waiting for GDB connection...Connected to 127.0.0.1
- Reading all registers
- Read 4 bytes @ address 0x00000000 (Data = 0x1FFFFEFF)
- Read 2 bytes @ address 0x00000000 (Data = 0xFEFF)
- Received monitor command: speed 1000
- Target interface speed set to 1000 kHz
- Received monitor command: clrbp
- Received monitor command: reset 1
- WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
- Resets the core only, not peripherals.
- Received monitor command: halt
- Halting target CPU...
- ...Target halted (PC = 0x6010AC9C)
- Received monitor command: regs
- R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
- R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
- R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
- R12= 00000000, R13= 1FFFFEFC, MSP= 1FFFFEFC, PSP= 00000000
- R14(LR) = FFFFFFFF, R15(PC) = 6010AC9C
- XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
- CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
- Reading all registers
- Read 4 bytes @ address 0x6010AC9C (Data = 0x49144813)
- Read 2 bytes @ address 0x6010AC9C (Data = 0x4813)
- Received monitor command: speed auto
- Select auto target interface speed (4000 kHz)
- Received monitor command: flash breakpoints 1
- Flash breakpoints enabled
- Received monitor command: semihosting enable
- Semi-hosting enabled (Handle on BKPT)
- Received monitor command: semihosting IOClient 2
- Semihosting I/O set to GDB Client
- Read 4 bytes @ address 0x6010AC9C (Data = 0x49144813)
- Read 2 bytes @ address 0x6010AC9C (Data = 0x4813)
- Downloading 1024 bytes @ address 0x60100000 - Verified OK
- Downloading 16128 bytes @ address 0x60100400 - Verified OK
- Downloading 16048 bytes @ address 0x60104300 - Verified OK
- Downloading 16000 bytes @ address 0x601081B0 - Verified OK
- Downloading 16000 bytes @ address 0x6010C030 - Verified OK
- Downloading 16016 bytes @ address 0x6010FEB0 - Verified OK
- Downloading 15984 bytes @ address 0x60113D40 - Verified OK
- Downloading 16032 bytes @ address 0x60117BB0 - Verified OK
- Downloading 16016 bytes @ address 0x6011BA50 - Verified OK
- Downloading 16048 bytes @ address 0x6011F8E0 - Verify failed
- Downloading 16320 bytes @ address 0x60123790 - Verified OK
- Downloading 16240 bytes @ address 0x60127750 - Verified OK
- Downloading 4544 bytes @ address 0x6012B6C0 - Verified OK
- Downloading 8 bytes @ address 0x6012C880 - Verified OK
- Downloading 4064 bytes @ address 0x6012C888 - Verified OK
- Read 4 bytes @ address 0x6010AC9C (Data = 0x49144813)
- Read 2 bytes @ address 0x6010AC9C (Data = 0x4813)
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Read 4 bytes @ address 0x60104684 (Data = 0x60127208)
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Read 4 bytes @ address 0x60104684 (Data = 0x60127208)
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Read 2 bytes @ address 0x60104C90 (Data = 0x4B12)
- Read 4 bytes @ address 0x60104CDC (Data = 0x009204B8)
- Read 2 bytes @ address 0x60104CDA (Data = 0x4770)
- Read 2 bytes @ address 0x6010284C (Data = 0x4D8A)
- Read 4 bytes @ address 0x60102A78 (Data = 0x00920418)
- Read 2 bytes @ address 0x6010284E (Data = 0x4F8B)
- Read 2 bytes @ address 0x6010D9D0 (Data = 0x4B11)
- Read 4 bytes @ address 0x6010DA18 (Data = 0x009204B8)
- Read 2 bytes @ address 0x6010D9D8 (Data = 0x9A01)
- Read 2 bytes @ address 0x6010F8B0 (Data = 0x6803)
- Read 2 bytes @ address 0x6010F966 (Data = 0x4648)
- Read 2 bytes @ address 0x60104C42 (Data = 0xAA08)
- Read 2 bytes @ address 0x60104C4C (Data = 0x9205)
- Read 2 bytes @ address 0x60102342 (Data = 0x4829)
- Read 4 bytes @ address 0x601023E8 (Data = 0x60123434)
- Read 2 bytes @ address 0x60102348 (Data = 0x4A28)
- Read 2 bytes @ address 0x601031DE (Data = 0x2803)
- Read 2 bytes @ address 0x601032BE (Data = 0xF7FF)
- Read 2 bytes @ address 0x601049C8 (Data = 0x4B22)
- Read 4 bytes @ address 0x60104A54 (Data = 0x009204B8)
- Read 2 bytes @ address 0x60104A22 (Data = 0x602C)
- Read 2 bytes @ address 0x6010693A (Data = 0x4B22)
- Read 4 bytes @ address 0x601069C4 (Data = 0x009204B8)
- Read 2 bytes @ address 0x60106974 (Data = 0x4630)
- Read 2 bytes @ address 0x6010D8B2 (Data = 0x4604)
- Read 2 bytes @ address 0x6010D8B4 (Data = 0x4608)
- Read 2 bytes @ address 0x6010F8B0 (Data = 0x6803)
- Read 2 bytes @ address 0x6010F8D0 (Data = 0x2F00)
- Read 2 bytes @ address 0x60106F50 (Data = 0x4B68)
- Read 4 bytes @ address 0x601070F4 (Data = 0x009204B8)
- Read 2 bytes @ address 0x60106F4C (Data = 0xE92D)
- Read 2 bytes @ address 0x60100878 (Data = 0x2204)
- Read 2 bytes @ address 0x60100884 (Data = 0x4B04)
- Read 2 bytes @ address 0x6010F8B0 (Data = 0x6803)
- Read 2 bytes @ address 0x6010F8B2 (Data = 0xF8D0)
- Read 2 bytes @ address 0x60106D34 (Data = 0x29BF)
- Read 2 bytes @ address 0x60106DE8 (Data = 0x2002)
- Read 2 bytes @ address 0x6010955A (Data = 0x4605)
- Read 2 bytes @ address 0x6010955C (Data = 0xF7FB)
- Read 2 bytes @ address 0x60106F50 (Data = 0x4B68)
- Read 4 bytes @ address 0x601070F4 (Data = 0x009204B8)
- Read 2 bytes @ address 0x60106F4C (Data = 0xE92D)
- Received monitor command: clrbp
- Received monitor command: halt
- Halting target CPU...
- ...Target halted (PC = 0x6010AC9C)
- Received monitor command: memU32 0x3039000C 0xAC
- Writing 0x000000AC @ address 0x3039000C
- Received monitor command: memU32 0x00180000 0x1ffffeff
- Writing 0x1FFFFEFF @ address 0x00180000
- Received monitor command: memU32 0x00180004 0x6010ac9c
- Writing 0x6010AC9C @ address 0x00180004
- Received monitor command: memU32 0xE000EDFC 0x01000001
- Writing 0x01000001 @ address 0xE000EDFC
- Received monitor command: memU32 0x3039000C 0xAA
- Writing 0x000000AA @ address 0x3039000C
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Read 4 bytes @ address 0x60104684 (Data = 0x60127208)
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Read 4 bytes @ address 0x60104684 (Data = 0x60127208)
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Received monitor command: regs
- R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
- R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
- R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
- R12= 00000000, R13= 1FFFFEFC, MSP= 1FFFFEFC, PSP= 00000000
- R14(LR) = FFFFFFFF, R15(PC) = 6010AC9C
- XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000
- CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
- Reading all registers
- Read 4 bytes @ address 0x6010AC9C (Data = 0x49144813)
- Read 2 bytes @ address 0x6010AC9C (Data = 0x4813)
- Setting breakpoint @ address 0x60102348, Size = 2, BPHandle = 0x0000
- WARNING: No more breakpoint resources left
- ERROR: Failed to set breakpoint at 0x60102348
- Setting breakpoint @ address 0x6010467A, Size = 2, BPHandle = 0x0000
- WARNING: No more breakpoint resources left
- ERROR: Failed to set breakpoint at 0x6010467A
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Read 4 bytes @ address 0x60104684 (Data = 0x60127208)
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- Read 4 bytes @ address 0x60104684 (Data = 0x60127208)
- Read 2 bytes @ address 0x6010467A (Data = 0x4802)
- GDB closed TCP/IP connection