I've been using JLink to debug a custom 1176 board with no problems.
Now I'm trying the same with MCU-Link and LinkServer and I'm facing problems related to flash driver configuration:
$ /usr/local/LinkServer/LinkServer flash MIMXRT1176xxxxx:MIMXRT1170-EVK verify build.elf
INFO: Exact match for MIMXRT1176xxxxx:MIMXRT1170-EVK found
INFO: Selected device MIMXRT1176xxxxx:MIMXRT1170-EVK
INFO: Getting available probes
INFO: Selected probe #1 RCBNN1BAEWWXT (MCU-LINK (r0FF) CMSIS-DAP V3.148)
INFO: MCU-Link firmware update `check`: local firmware [3.148] is the same as the version running on the selected probe ([RCBNN1BAEWWXT] [MCU-LINK (r0FF) CMSIS-DAP V3.148])
Firmware update `check`: not required - the update can be performed using `forced` mode
Ns: MCUXpresso IDE RedlinkMulti Driver v24.9 (Sep 19 2024 19:39:44 - crt_emu_cm_redlink build 802)
Pc: ( 0) Reading remote configuration
Wc(03). No cache support.
Nc: Found generic directory XML file in /tmp/tmp99jx1dxz/crt_directory.xml
Pc: ( 5) Remote configuration complete
Nc: Reconnected to existing LinkServer process.
Wc: ============= SCRIPT: RT1170_connect_M7_wake_M4.scp =============
Wc: RT1170 Connect M7 and Wake M4 Script
Wc: DpID = 6BA02477
Wc: APID = 0x84770001
Wc: Setting M4 spin code
Wc: Setting M4 clock
Wc: Resetting M4 core
Wc: View cores on the DAP AP
Wc: DpID = 6BA02477
Wc: TAP 0: 6BA02477 Core 0: M7 APID: 84770001 ROM Table: E00FD003*
Wc: TAP 0: 6BA02477 Core 1: M4 APID: 24770011 ROM Table: E00FF003
Wc: ============= END SCRIPT ========================================
Nc: Probe Firmware: MCU-LINK (r0FF) CMSIS-DAP V3.148 (NXP Semiconductors)
Nc: Serial Number: RCBNN1BAEWWXT
Nc: VID:PID: 1FC9:0143
Nc: USB Path: 0001:0012:00
Nc: Using memory from core 0 after searching for a good core
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: debug interface type = CoreSight DP (DAP DP ID 6BA02477) over SWD TAP 0
Nc: processor type = Cortex-M7 (CPU ID 00000C27) on DAP AP 0
Nc: number of h/w breakpoints = 8
Nc: number of flash patches = 0
Nc: number of h/w watchpoints = 4
Nc: Probe(0): Connected&Reset. DpID: 6BA02477. CpuID: 00000C27. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Ns: Content of CoreSight Debug ROM(s):
Nc: RBASE E00FD000: CID B105100D PID 000008E88C ROM (type 0x1)
Nc: ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM (type 0x1)
Nc: ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM (type 0x1)
Nc: ROM 3 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
Nc: ROM 3 E0001000: CID B105E00D PID 04000BB002 Gen DWT (type 0x0)
Nc: ROM 3 E0002000: CID B105E00D PID 04000BB00E Gen (type 0x0)
Nc: ROM 3 E0000000: CID B105E00D PID 04000BB001 Gen ITM (type 0x0)
Nc: ROM 2 E0041000: CID B105900D PID 04001BB975 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
Nc: ROM 2 E0042000: CID B105900D PID 04004BB906 CSt type 0x14 Debug Control - Trigger, e.g. ECT
Nc: ROM 1 E0043000: CID B105900D PID 04001BB908 CSt CSTF type 0x12 Trace Link - Trace funnel/router
Nc: NXP: MIMXRT1176xxxxx
Nc: DAP stride is 1024 bytes (256 words)
Nc: Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Nc: Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Sep 19 2024 18:31:37'
Nc: Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
Nc: Sending VECTRESET to run flash driver
Ec: Flash Driver V.2 dynamic startup failed - driver Init provided no flash parameters
Nc: Flash Driver V.2 startup failed - rc Ef(55): Dynamic flash driver startup failed to provide flash parameters.
Ec: op Terminate (0x0, 0x0, 0x0) status 0x40 - driver reports init failure - EXTSPIJ driver rc 20107 (0x4E8B)
Ec: vendor chip initialization failed - Ef(55): Dynamic flash driver startup failed to provide flash parameters.
Wc: failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
Pc: ( 65) Chip Setup Complete
Pc: (100) Target Operation Failed
CRITICAL: Critical error
ERRMSG: Exception: Flash operation exited with code 1
Hello, I recommend use a logic analyzer to see if the driver is working well, this seems could be a hardware issue, let me know about your test.
Best regards,
Pavel
Hello, I'm afraid that the configuration on the MCU-Link is not the problem this has support for your EVK. I reviewed again your LOG and seems there is a problem with the driver SFDP QSPI.
Would you let me know more about your board...
What kind of memory QSPI do you have?
What kind of version of Jlink driver have?
Is the Jlink version "plus", "edu" or "normal"?
What was the difference when you change the debugger? did you modify the code or the board?
Could you install SPT to confirm there is a communication with the QSPI?
MCUXpresso Secure Provisioning Tool | NXP Semiconductors
In some cases, doing a mass erase the board come back to normally check the 2.2 SPT Mass Erase.
RT board recovery for debugger connect issues - NXP Community
Best regards,
Pavel
> What kind of memory QSPI do you have?
NOR Flash W25Q128FWPIG
> What kind of version of Jlink driver have?
> Is the Jlink version "plus", "edu" or "normal"?
The problem is about MCU Link, standard version.
> What was the difference when you change the debugger? did you modify the code or the board?
No, it's the same configuration
> Could you install SPT to confirm there is a communication with the QSPI?
I have installed it and run a flash test there, output is:
### Check presence of FlashLoader ###
### Select FlexSPI NOR memory instance #1 using option on address 0x2000 ###
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- fill-memory 0x2000 4 0xCF900001 word
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "fill-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- configure-memory 9 0x2000
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "configure-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
### Configure FlexSPI NOR memory using options on address 0x2000 ###
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- fill-memory 0x2000 4 0xC0000007 word
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "fill-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- configure-memory 9 0x2000
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "configure-memory",
"response": [],
"status": {
"description": "20107 (0x4e8b) FlexSPINOR: SFDP Not Found.",
"value": 20107
}
}
blhost failed
Hello, thanks for the information, I recommend open the example, modify the LUT for your memory and check the Quad mode to activate this register.
Best regards,
Pavel
I don't see this example in SPT.
Also not sure what you mean regarding LUT and Quad mode.
I have tried with supplied binary bootable_images/evkmimxrt1170_iled_blinky_cm7_QSPI_FLASH.bin but with the same result:
### Parse input arguments ###
### Check presence of FlashLoader ###
### Select FlexSPI NOR memory instance #1 using option on address 0x2000 ###
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- fill-memory 0x2000 4 0xCF900001 word
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "fill-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- configure-memory 9 0x2000
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "configure-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
### Configure FlexSPI NOR memory using options on address 0x2000 ###
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- fill-memory 0x2000 4 0xC0000007 word
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "fill-memory",
"response": [],
"status": {
"description": "0 (0x0) Success.",
"value": 0
}
}
blhost succeeded
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk /opt/nxp/MCUX_Provi_v10/bin
/opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost -t 5000 -u 0x15A2,0x0073 -j -- configure-memory 9 0x2000
/opt/nxp/MCUX_Provi_v10/bin
{
"command": "configure-memory",
"response": [],
"status": {
"description": "20107 (0x4e8b) FlexSPINOR: SFDP Not Found.",
"value": 20107
}
}
blhost failed
Mass erase in SPT is not possible because it can't pass memory configuration with the same output as above.
Hello, what kind of distro of ubuntu you have?
Maybe will could try as same that the IDE support.
Could you try to flash using blhost?
Best regards,
Pavel
My Ubuntu is 22.04.5 LTS
Is there anything else that could be done? Or MCU Link just does not support iMX RT1176?
Hello, thanks for your information, could you test a simple blinking led to test if the flash could be done.
Best regards,
Pavel
I neither can verify nor flash any image.
Hello, my name is Pavel, and I will be supporting your case, I need more information about the hardware, did you use the same interface as the J-Link?
Nc: Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Sep 19 2024 18:31:37'
Do you have the QSPI on a FlexSPI 1 port?
could you try to use blhost?
blhost -p COMxx get-property 1
Best regards,
Pavel
Ok, I figured I need to enable recovery mode to force-load rom bootloader. I was able to connect with blhost (using usb connection) and got:
$ sudo ./blhost -u /dev/hidraw5 get-property 1
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 1258487809 (0x4b030001)
Current Version = K3.0.1
Also:
$ sudo ./blhost -u /dev/hidraw5 get-property 18
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 2190645060 (0x82929744)
Response word 2 = 421359630 (0x191d700e)
Unique Device ID = 44 97 92 82 0E 70 1D 19
> Hello, my name is Pavel, and I will be supporting your case, I need more information about the > hardware, did you use the same interface as the J-Link?
Yes, SWD.
> Do you have the QSPI on a FlexSPI 1 port?
Yes
> could you try to use blhost?
> blhost -p COMxx get-property 1
What serial port should I connect to? the one opened by MCU-Link (ttyACM0)?
I'm getting "Error: Initial ping failure: No response received for ping command."
My board does not open any tty ports over USB (other than the two handling shell/console in our application but there are not relevant, obviously) and it's not connected via serial.