How to debug M33 multicore example on iMX93 Evaluation Kit

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

How to debug M33 multicore example on iMX93 Evaluation Kit

1,518 Views
thierry37
Contributor I

Hello

  • I am trying to debug the mcimx93evk_rpmsg_lite_str_echo_rtos_imxcm33 example on Cortex M33.
  • I am using mcuXpressoSDK_MCIMX93-EVK
  • Since this SDK is not supported in MCUXPRESSO, I have installed the SDK in Visual Studio Code.
  • I am booting from the A55, stopping u-boot, then loading the Cortex M33 image from uboot as explained in documentation.
  • Until now everything is working and I can see the traces in M33 console
  • then I start linux on A55

But, when I "attach" the JILNK debugger to the target (from Visual Studio, right click on the project name and click "attach") for debugging the Cortex-M software, the A55 is reset, and then the M33 is also reset.

I am using LPC-Link2 Debug Probe with JLink firmware.

@note : I can properly debug "M33 only" applications with this probe, or also "attach to running target".

Is there a tutorial, or explanation ... somewhere about how to debug Freertos Application in multicore iMx93 (@note : iMx8 examples are not relevant since MCUXPresso does not support iMx93 Evaluation Kit)

Many thanks,

Thierry

 

0 Kudos
Reply
2 Replies

1,409 Views
thierry37
Contributor I

Thanks Aldo for your reply,

It's too bad that there is no explanation anywhere about how to debug multicore solutions ...

Anyway, from your knowledge, is there any reason why attaching a JLink debugger to the M33 CPU in imx93 EVK would trigger a reset the A55 Cores ? (I was thinking this might be due to what you explain about linux Device Tree, but before trying to update the linux device tree, I would be glad to know if connecting a Jlink probe to the M33 would still reset the A55 because of some internal SOC wiring) ?

Many thanks

Thierry

0 Kudos
Reply

1,451 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Unfortunately we do not have documentation or guides to do this with a Jlink debugger.

Also, please note that multicore debugging isn't as straightforward as normal debugging, so you'll need to connect to the Cortex-A and then turn on the Cortex-M through it.

You may refer to the following:
https://wiki.segger.com/Multi-Core_Debugging
https://forum.segger.com/index.php/Thread/6130-SOLVED-Multi-core-debugging/

Also, please note that the default i.MX 93 EVK Linux kernel device trees MUX the JTAG pins to LPUART5 for Bluetooth, FlexCAN2 and SAI3 when it starts. So you'll need to create a custom device tree for this i.e.
 
&lpuart5 {
        status = "disabled";
};

&flexcan2 {
        status = "disabled";
};

&sai3 {
        status = "disabled";
};

&iomuxc {
        pinctl_jtag: jtaggrp {
                fsl,pins = <
                        MX93_PAD_DAP_TDI__JTAG_MUX_TDI          0x31e
                        MX93_PAD_DAP_TMS_SWDIO__JTAG_MUX_TMS    0x31e
                        MX93_PAD_DAP_TCLK_SWCLK__JTAG_MUX_TCK   0x31e
                        MX93_PAD_DAP_TDO_TRACESWO__JTAG_MUX_TDO 0x31e
                        MX93_PAD_GPIO_IO24__JTAG_MUX_TDO        0x31e
                        MX93_PAD_GPIO_IO25__JTAG_MUX_TCK        0x31e
                        MX93_PAD_GPIO_IO26__JTAG_MUX_TDI        0x31e
                        MX93_PAD_GPIO_IO27__JTAG_MUX_TMS        0x31e
                >;
        };
};

Best regards,
Aldo.

0 Kudos
Reply