We are about to port our starter kits to the latest SDK (25.03.00). As the very first step we try to get simple hello world demo running. We are facing two problems:
```
Device "MIMX9351_M33" selected.
Connecting to target via JTAG
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 30us
InitTarget() start
InitTarget() end - Took 7.74ms
TotalIRLen = 4, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x0892801D, IRLen: 04, JTAG-DP
Failed to power up DAP
Connect failed. Resetting via Reset pin and trying again.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 26us
InitTarget() start
DAP: Could not power-up system power domain.
InitTarget() end - Took 13.2ms
TotalIRLen = 4, IRPrint = 0x01
JTAG chain detection found 1 devices:
#0 Id: 0x0892801D, IRLen: 04, JTAG-DP
Failed to power up DAP
Error occurred: Could not connect to the target device.
```
(The JTAG works, when setting the board to LP Boot via Serial Downloader we are able to start the GDB server and debug the hello world demo)
U-Boot: v2024.04 from uboot-imx
TF-A: lf-2.10 without optee
HI @Niebel-TQ!
Thank you for contacting NXP Support!
I tried by my side and is working good.
What BSP version do you have?
Are you using the EVK board?
I recommend to check our AN14120 to download the required patch to debug the processor.
Best Regards!
Chavira
HI @Niebel-TQ!
I tried by my side with the BSP scarthgap 6.6.36 with the iMX93-EVK and is working without problems.
Can you double check your board?
That kind of cases it is very difficult for us to support since we don't have your board to try by our side.
Do you Customize the device tree according to your hardware?
Hi and thanks for the reply.
It seems like having two problems:
1) Booting Cortex M33 from Linux / U-Boot: works with older Versions but not with current versions. Seems to be Software related. We investigate this. Devicetree is adjusted to our board (Can start and use RPMSG demo and NPU firmware)
2) Debugging with JLink: Seems to be an Issue for i.MX93 (the JLink works for sure, starting downloaded software does not work stable.) You mentioned a Patch that contains special crafted init / reset sequences. This patch does not work with newer JLink releases. There is a hint in SEGGER knowledge base regarding special reset sequence but no detail. Any help how to get a working debugging environment for Cortex M33?
HI @Niebel-TQ!
Try Append "clk_ignore_unused" in u-boot "mmcargs" env, before booting linux.
The patch was included in the MCUXPRESSO INSTALLER V25.
I tried several times debug the iMX93-EVK and is working fine.
1) The "clk_ignore_unused" is in the kernel command line if we activated the M33 im U-Boot. (Works with U-Boot 2023.04 and older TF-A + older Edgelock firmware). Try to find the cause, wy M33 does not start with newer versions of said components - neither with bootaux nor with remote_proc. As I said, we debug this. Also in this case the M33 cannot be seen from JTAG
2) Regarding JLINK: What version is known to work for debugging? As i wrote the i.MX93 patch from NXP does not apply to newer JLink Software versions from SEGGER but contains special handling for Reset / Initialisation. The SEGGER knowledge base writes about problems with Reset for M33: https://kb.segger.com/NXP_i.MX_93
Hi,
so we found the issue for M33 not booting with newer versions. Wenn extending the board support for i.MX91 we lost M33 initialisation in SPL. Thank you for supporting
Second issue remains: JLink / Debugging. Any update to this topic?
Hi @Niebel-TQ!
Try updating the firmware of your J-link.
At the moment I am using the MCU-LINK PRO with Segger firmware and is working without problems in iMX93-EVK board with the latest pre-compiled image.
I will try using Segger JLink Pro but I am waiting for the same result.
Best Regards!
Chavira
JLink Firmware is up to date. Debugging under Linux not possible.
OS: Ubuntu 2024.04
SEGGER: V8.32
SDK: 25.03 from github
Expectation: programm can be loaded / started / debugged with gdb / jlink gdbserver
Issue: gdb connects and loads to target, running / debugging not stable.
With Ubuntu 2022.04 / SEGGER J-Link V7.62c with NXP Patch debugging is possible
Hi @Niebel-TQ!
I am tried again by my side in the evk board and the problem is not happening.
I am using ubuntu 22.04 and SDK 25 with the latest BSP version (6.12)
Best Regards!
Chavira
HI @Niebel-TQ!
Unfortunately at the moment I don't have J-LINK to test by my side I have mentioned that I am using MCU-LINK PRO with Segger firmware.