SWO Tracing with MCUXpresso and Zephyr

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

SWO Tracing with MCUXpresso and Zephyr

728 Views
Oskar1
Contributor I

Hi,

I want to trace our Zephyr based firmware with the SWO port of the RT1061 through a J-Trace interface, In the first step I try to get the logs through this interface. I setup the appropriate registers on the MCU and see the logs with JLinkSWOViewer.

After that I imported the Zephyr project into MCUXpresso by following this guide: https://www.nxp.com/docs/en/training-reference-material/BUILD-YOUR-FIRST-ZEPHYR-APPLICATION-ON-I.MX-....

Everything worked as expected and I can start debugging. But I can't use the trace functions. When trying to setup the Trace Config there are no options I can use, everything seems to be disabled, at least the views are looking completely different for me than in all the documents I've read so far.

I setup the speed in the debug configuration and activated all related SWO settings but to no avail.

Does anyone have some hints?

Regards
Oliver

0 Kudos
Reply
3 Replies

677 Views
Oskar1
Contributor I

May I ask if you could use CONFIG_ITM=y
and CONFIG_ARM_SWO=y in prj.conf?

Both options are not recognized by Kconfig:

prj.conf:6: warning: attempt to assign the value 'y' to the undefined symbol ITM

prj.conf:7: warning: attempt to assign the value 'y' to the undefined symbol ARM_SWO

 

I tend to your first point that MCUXpresso might not be configured right. Maybe there is something missing that must be manual configured because I use Zephyr and not a native MCUXpresso project?

0 Kudos
Reply

624 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @Oskar1 

You can try to Check MCUXpresso Trace Views
MCUXpresso should provide an SWO Console and other trace-related views:
1. Go to Window > Show View > Other.
2. Look for:
• SWO Console
• SWO Data

Harry_Zhang_0-1739412607892.png

 


3. If these are missing or empty, MCUXpresso may not be properly reading the trace data.

 

BR

Harry

0 Kudos
Reply

696 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @Oskar1 

If logs appear in JLinkSWOViewer but not in MCUXpresso, MCUXpresso might not be configured correctly to capture SWO.

May I ask if you could use CONFIG_ITM=y
and CONFIG_ARM_SWO=y  in prj.conf?

BR

Harry

0 Kudos
Reply