See terminal output below showing that J-Link cannot flash MCXW71, but MCULink works.
Is J-Link not supported yet on MCXW71?
I'm using latest versions of all software.
The hardware is the same except for the debug probe used.
% cat jlink_flash_cmd.txt
RSetType 2
connect
Loadfile build/zephyr/zephyr.hex
reset
exit
% JLinkExe -if SWD -device MCXW716 -speed 1000 -AutoConnect 1 -CommandFile jlink_flash_cmd.txt -ExitOnError 1 -NoGui 1
SEGGER J-Link Commander V8.12e (Compiled Feb 5 2025 12:23:00)
DLL version V8.12e, compiled Feb 5 2025 12:22:17
J-Link Commander will now exit on Error
J-Link Command File read successfully.
Processing script file...
J-Link>RSetType 2
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link V10 compiled Jan 30 2023 11:28:07
Hardware version: V10.10
J-Link uptime (since boot): N/A (Not supported by this model)
S/N: 600108597
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref=3.348V
Target connection not established yet but required for command.
Device "MCXW716" selected.
Connecting to target via SWD
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 4us
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
ERROR: Wrong DM-AP IDCODE detected: 0xFFFFFFFF
InitTarget() end - Took 298ms
Connect failed. Resetting via Reset pin and trying again.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 6us
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
ERROR: Wrong DM-AP IDCODE detected: 0xFFFFFFFF
InitTarget() end - Took 298ms
Error occurred: Could not connect to the target device.
For troubleshooting steps visit: https://wiki.segger.com/J-Link_Troubleshooting
Script processing completed.
% LinkServer flash MCXW716CxxxA:FRDM-MCXW71 load build/zephyr/zephyr.bin:0
INFO: Exact match for MCXW716CxxxA:FRDM-MCXW71 found
INFO: Selected device MCXW716CxxxA:FRDM-MCXW71
INFO: Getting available probes
INFO: Selected probe #1 D5DJDRCVZF3PD (MCU-LINK r0FF CMSIS-DAP V0.078)
INFO: MCU-Link firmware update `check`: local firmware [3.148] can be programmed on the selected probe ([D5DJDRCVZF3PD] [MCU-LINK r0FF CMSIS-DAP V0.078])
Firmware update `check`: - the update can be performed using `auto` mode
Ns: MCUXpresso IDE RedlinkMulti Driver v24.9 (Sep 19 2024 20:35:47 - crt_emu_cm_redlink build 802)
Pc: ( 0) Reading remote configuration
Wc(03). No cache support.
Nc: Found generic directory XML file in /var/folders/xr/mxsl4rqj69ngcxj8zn23705h0000gn/T/tmpco9bpz9s/crt_directory.xml
Pc: ( 5) Remote configuration complete
Nc: Reconnected to existing LinkServer process.
Wc: ============= SCRIPT: MCXW71X_connect.scp =============
Wc: MCXW71X connect script
Wc: Connecting to Probe Index = 1
Wc: DpID = 6BA02477
Wc: APID = 0x84770001
Wc: ============= END SCRIPT ==============================
Nc: Probe Firmware: MCU-LINK r0FF CMSIS-DAP V0.078 (NXP Semiconductors)
Nc: Serial Number: D5DJDRCVZF3PD
Nc: VID:PID: 1FC9:0143
Nc: USB Path: USB_1fc9_0143_2130000_ff00
Nc: Using memory from core 0 after searching for a good core
Pc: ( 30) Emulator Connected
Nc: processor is in secure mode
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-M33 (CPU ID 00000D21) 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: 00000D21. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Ns: Content of CoreSight Debug ROM(s):
Nc: RBASE E00FF000: CID B105100D PID 04000BB4C9 ROM (type 0x1)
Nc: ROM 1 E000E000: CID B105900D PID 04000BBD21 CSt ARM ARMv8-M type 0x0 Misc - Undefined
Nc: ROM 1 E0001000: CID B105900D PID 04000BBD21 CSt ARM DWTv2 type 0x0 Misc - Undefined
Nc: ROM 1 E0002000: CID B105900D PID 04000BBD21 CSt ARM FPBv2 type 0x0 Misc - Undefined
Nc: ROM 1 E0000000: CID B105900D PID 04000BBD21 CSt ARM ITMv2 type 0x43 Trace Source - Bus
Nc: ROM 1 E0042000: CID B105900D PID 04000BBD21 CSt ARM CTIv2 type 0x14 Debug Control - Trigger, e.g. ECT
Nc: NXP: MCXW716CxxxA
Nc: DAP stride is 1024 bytes (256 words)
Nc: Inspected v.2 On-chip Flash Memory MCXW71X.cfx
Nc: Image 'FMU Sep 19 2024 18:36:38'
Nc: Opening flash driver MCXW71X.cfx
Nc: VECTRESET requested, but not supported on ARMv8-M CPUs. Using SOFTRESET instead.
Nc: Using SOFT reset to run the flash driver
Nc: Flash variant 'FMU 1MB' detected (1MB = 128*8K at 0x0)
Nc: Closing flash driver MCXW71X.cfx
Nc: Inspected v.2 On-chip Flash Memory MCXW71X_S.cfx
Nc: Image 'FMU (Secure) Sep 19 2024 18:36:33'
Nc: Opening flash driver MCXW71X_S.cfx
Nc: VECTRESET requested, but not supported on ARMv8-M CPUs. Using SOFTRESET instead.
Nc: Using SOFT reset to run the flash driver
Nc: Flash variant 'FMU 1MB (Secure)' detected (1MB = 128*8K at 0x10000000)
Nc: Closing flash driver MCXW71X_S.cfx
Pc: ( 65) Chip Setup Complete
Pc: ( 70) License Check Complete
Nt: Loading 'zephyr.bin' Binary 0x00000000 len 0x3C08C
Nc: Opening flash driver MCXW71X.cfx
Nc: VECTRESET requested, but not supported on ARMv8-M CPUs. Using SOFTRESET instead.
Nc: Using SOFT reset to run the flash driver
Nc: Flash variant 'FMU 1MB' detected (1MB = 128*8K at 0x0)
Pb: 1 of 1 ( 0) Writing sectors 0-30 at 0x00000000 with 245900 bytes
Ps: ( 0) at 00000000: 0 bytes - 0/245900
Ps: ( 6) at 00000000: 16384 bytes - 16384/245900
Nc: 00004000 done 6% (16384 out of 245900)
Ps: ( 13) at 00004000: 16384 bytes - 32768/245900
Nc: 00008000 done 13% (32768 out of 245900)
Ps: ( 19) at 00008000: 16384 bytes - 49152/245900
Nc: 0000C000 done 19% (49152 out of 245900)
Ps: ( 26) at 0000C000: 16384 bytes - 65536/245900
Nc: 00010000 done 26% (65536 out of 245900)
Ps: ( 33) at 00010000: 16384 bytes - 81920/245900
Nc: 00014000 done 33% (81920 out of 245900)
Ps: ( 39) at 00014000: 16384 bytes - 98304/245900
Nc: 00018000 done 39% (98304 out of 245900)
Ps: ( 46) at 00018000: 16384 bytes - 114688/245900
Nc: 0001C000 done 46% (114688 out of 245900)
Ps: ( 53) at 0001C000: 16384 bytes - 131072/245900
Nc: 00020000 done 53% (131072 out of 245900)
Ps: ( 59) at 00020000: 16384 bytes - 147456/245900
Nc: 00024000 done 59% (147456 out of 245900)
Ps: ( 66) at 00024000: 16384 bytes - 163840/245900
Nc: 00028000 done 66% (163840 out of 245900)
Ps: ( 73) at 00028000: 16384 bytes - 180224/245900
Nc: 0002C000 done 73% (180224 out of 245900)
Ps: ( 79) at 0002C000: 16384 bytes - 196608/245900
Nc: 00030000 done 79% (196608 out of 245900)
Ps: ( 86) at 00030000: 16384 bytes - 212992/245900
Nc: 00034000 done 86% (212992 out of 245900)
Ps: ( 93) at 00034000: 16384 bytes - 229376/245900
Nc: 00038000 done 93% (229376 out of 245900)
Ps: ( 99) at 00038000: 16384 bytes - 245760/245900
Nc: 0003C000 done 99% (245760 out of 245900)
Ps: (100) at 0003C000: 8192 bytes - 253952/245900
Nc: 0003E000 done 100% (253952 out of 245900)
Nc: Sectors written: 31, unchanged: 0, total: 31
Nc: Closing flash driver MCXW71X.cfx
Pb: (100) Finished writing Flash successfully.
Nt: Loaded 0x3C08C bytes in 1541ms (about 159kB/s)
Nt: Reset target (system)
Nc: Starting execution using system reset with a stall address
Nc: Retask read watchpoint 1 at 0xE000ED08 to use for boot ROM stall
Nc: Boot ROM stalled accessing address 0xE000ED08 (restoring watchpoint 1)
Ns: Stopped (Was Reset) [Reset from Unknown]: Watchpoint (Temp) #1 - read watchpoint at 0xE000ED08 Data watch for bootloader stall
Ns: restart on reset
Hello @trulykk ,
Thanks for your support. The J-Link does support the MCXW71. I did the test with the SDK demo. Please see the figure below.
-
I've pasted the log below for your comparison.
Executing flash operation 'Program' (Program executable into flash frdmmcxw71_hello_world.axf) - Mon Feb 17 12:04:29 CST 2025
Checking MCU info...
Scanning for targets...
Executing flash action...
SEGGER J-Link Commander V8.10 (Compiled Sep 26 2024 08:38:41)
DLL version V8.10, compiled Sep 26 2024 08:37:48
J-Link Command File read successfully.
Processing script file...
J-Link>ExitOnError 1
J-Link Commander will now exit on Error
J-Link>r
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled May 7 2021 16:26:12
Hardware version: V9.30
J-Link uptime (since boot): N/A (Not supported by this model)
S/N: 609300711
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref=3.308V
Target connection not established yet but required for command.
Device "MCXW716" selected.
Connecting to target via SWD
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 6us
InitTarget() start
SWD selected. Executing JTAG -> SWD switching sequence.
InitTarget() end - Took 2.03ms
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped ROMBASE read. CoreBaseAddr manually set by user
AP[0]: Core found
CPUID register: 0x410FD214. Implementer code: 0x41 (ARM)
Feature set: Mainline
Cache: No cache
Found Cortex-M33 r0p4, Little endian.
Cortex-M (ARMv8-M and later): The connected J-Link (S/N 609300711) uses an old firmware module that does not handle I/D-cache correctly. Proper debugging functionality cannot be guaranteed if cache is enabled
FPUnit: 8 code (BP) slots and 0 literal slots
Security extension: implemented
Secure debug: enabled
ROM table scan skipped. CoreBaseAddr manually set by user: 0x80030000
SetupTarget() start
SetupTarget() end - Took 7.45ms
Memory zones:
"Default" Description: Default access mode
Cortex-M33 identified.
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
ResetTarget() start
Valid boot image detected. Application entry point : 0x000258CC
Reset via SYSRESETREQ + halt at application entry point.
ResetTarget() end - Took 148ms
J-Link>h
PC = 000258CC, CycleCnt = 00000000
R0 = 000258CD, R1 = 20000A00, R2 = 0000FFFF, R3 = 00000407
R4 = E000ED08, R5 = 05FA0004, R6 = C33CC33C, R7 = 50003000
R8 = 0C00F301, R9 = 5AC3C35A, R10= 20000A00, R11= 30003100
R12= 50024004
SP(R13)= 20000A00, MSP= 20000A00, PSP= 00000000, R14(LR) = 14812EDF
XPSR = 69000000: APSR = nZCvQ, EPSR = 01000000, IPSR = 000 (NoException)
CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
MSPLIM = 00000000
PSPLIM = 00000000
Security extension regs:
MSP_S = 20000A00, MSP_NS = 00000000
MSPLIM_S = 00000000, MSPLIM_NS = 00000000
PSP_S = 00000000, PSP_NS = FFFFFFFC
PSPLIM_S = 00000000, PSPLIM_NS = 00000000
CONTROL_S = 00, FAULTMASK_S = 00, BASEPRI_S = 00, PRIMASK_S = 00
CONTROL_NS = 00, FAULTMASK_NS = 00, BASEPRI_NS = 00, PRIMASK_NS = 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= 00000000, FPS15= 00000000
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>loadfile "C:\MCU_IDE24.9\frdmmcxw71_hello_world\Debug\frdmmcxw71_hello_world.hex"
'loadfile': Performing implicit reset & halt of MCU.
ResetTarget() start
Valid boot image detected. Application entry point : 0x000258CC
Reset via SYSRESETREQ + halt at application entry point.
ResetTarget() end - Took 147ms
Downloading file [C:\MCU_IDE24.9\frdmmcxw71_hello_world\Debug\frdmmcxw71_hello_world.hex]...
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (16384 bytes)
J-Link: Flash download: Total: 0.262s (Prepare: 0.051s, Compare: 0.076s, Erase: 0.009s, Program & Verify: 0.109s, Restore: 0.016s)
J-Link: Flash download: Program & Verify speed: 146 KB/s
O.K.
J-Link>qc
Script processing completed.
Based on the log, it's a connection issue. I suggest you try the following methods:
1. First, check whether the connections are loose.
2. Perform a mass erase and then try again.
3. Use the J-Link on other development boards to see if the problem still occurs.
Hope it can help you.
BRs,
Celeste
---------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
---------------------------------------------------------------------------------------------------------------------