1989036_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1989036_en-US

1989036_en-US

Debug the Cortex-M33 on iMX93EVK

I am trying to get a debug connection to the Cortex-M33 on the iMX93EVK board, using a SEGGER J-Link. I want to be able to debug while Linux is running on the A55. 

I tried debugging the hello_world demo app on the M33 while the A55 is in U-Boot, following the instructions in AN14120. The U-Boot commands:

fatload mmc 1:1 80000000 sdk20-app.bin

cp.b 0x80000000 0x201e0000 0x10000

bootaux 0x1ffe0000

start the firmware and the output shows up on the serial port. But when I try to connect using the SEGGER JLinkGDBServerExe it fails to find the device. The log shows this:

02-00000000-00-00000041-004D: TB9DF640 005:451.096 ******************************************************
02-00000000-00-00000041-004A: TB9DF640 005:451.097 J-Link script: i.MX93 Cortex-M33 core J-Link script
02-00000000-00-00000041-004D: TB9DF640 005:451.098 ******************************************************
02-00000000-00-00000042-0034: TB9DF640 005:451.523 InitTarget() end - Took 426us
02-00000000-00-00000042-004D: TB9DF640 005:452.146 TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
02-00000000-00-00000044-005B: TB9DF640 005:453.793 Failed to identify target. Resetting via Reset pin and trying again.

It uses the iMX93 J-Link script but fails to connect to the target. Attach from VS Code (with MCUXpresso extension) also does not work.

I get the same result when I try to debug while the A55 is in Linux (after changing the kernel DTS to disable lpuart5).

Only when I put the BOOT_MODE to Cortex-M33 (Infinite Loop) can the J-Link find the device, and I can debug the demo app using VS Code.

Why doesn't the J-Link detect the target with the A55 in U-Boot or Linux?


Regards,

Sander

Re: Debug the Cortex-M33 on iMX93EVK

The solution to this problem was to switch off the UART5 from JTAG on the board with the DIP switches SW101.

Re: Debug the Cortex-M33 on iMX93EVK

The kernel version we build is imx-6.6.36-2.1.0.

I do not know which pre-build image, it came pre-installed when we bought the EVK. It prints "NXP i.MX Release Distro 6.6-scarthgap imx93evk ttyLP0" on startup, and "Linux version 6.6.36-lts-next-gd23d64eea511" on /proc/version

Under which name would the UART5 show up in /dev? There is a /dev/ttyLP0, would the UART5 show up as /dev/ttyLP5 or some other number? 


Re: Debug the Cortex-M33 on iMX93EVK

HI @Sander-ET!


What kernel version are you compiling in Yocto and what pre-build image are you using?


You can corroborate if the UART5 is not working if the UART is not listed in the folder /dev/ of the iMX



Re: Debug the Cortex-M33 on iMX93EVK

For the Cortex-M33 we are using the MCUXpresso SDK from git (MCUX_2.16.100). We try to start the debugger from Visual Studio Code, using the MCUXpresso extension. We tried the right-click Attach and Debug, both fail to connect but reset the board.

For the Cortex-A we build an image using imx-docker (MACHINE="imx93-11x11-lpddr4x-evk", DISTRO="fsl-imx-xwayland", IMAGES="imx-image-core"). We boot this from SD card. The device tree has been modified to disable lpuart5. Is there a way to verify from Linux that lpuart5 really is disabled?

We also tried to debug booting the original (demo) image in eMMC with the A55 in U-Boot. We get no JTAG connection with this image either.

The suggested change of the u-boot environment did not help.


Regards,

Sander

Re: Debug the Cortex-M33 on iMX93EVK

HI @Sander-ET!

What BSP are you using?

Do you tried to right-click the project in the MCUXpresso for VS Code and choose "Attach to debug the project"?


Also you can update the environment of u-boot like we recommend in this post. 


Best Regards!

Chavira

Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 03:20 PM
Updated by: