Hi,
I'm currently stuck on a problem where I would love to get instruction tracing up and running on the LPC5516 that we're using.
The user manual for the chipset states that it is supported (page 1074):
> Trace port provides Cortex-M33 CPU instruction trace capability. Output is via a serial
wire viewer.
But that is about everything I've been able to find out so far. As the ETM component - that I would have expected used for this - isn't listed in the CoreSight ROM table, I'm a bit stumbled on how to get this up and running.
For reference: I'm using a SEGGER J-Link BASE compact with PyOCD and JLink currently.
Solved! Go to Solution.
Okay thank you. Than it is as I already assumed to be, that the LPC551X does not support instruction tracing. But I would recommend NXP to change their wording here, as the ITM has absolutely nothing to do with instruction tracing - which is a specific thing in ARM - and as such the Datasheets or User Manual of the MCUs feel like false advertisement to me.
With best regards
Lilly
Hi @lilly1337
Hello!
The LPC5516 supports instruction tracing via its Serial Wire Output (SWO), which is a different mechanism from the ETM, explaining why you don't see the ETM in the CoreSight ROM table. To get this working with your J-Link and PyOCD setup, you must first ensure the physical SWO pin is connected. Then, configure your tools (either J-Link Commander or PyOCD) to enable SWO tracing and set the correct clock frequency, which will allow you to capture the trace output.
Can you give me more details to specifically instruction tracing? As far as I can find (I've also taken a look at the MCUExpresso SWO Tracing Guide), you support all kinds of tracing, but not instruction tracing. And as far as ARM CoreSight goes for instruction tracing at least a ETM or MTP is required. What happens with the output and how it is further processed is decided by the TPIU - which can include SWO.
Hello @lilly1337
Okay thank you. Than it is as I already assumed to be, that the LPC551X does not support instruction tracing. But I would recommend NXP to change their wording here, as the ITM has absolutely nothing to do with instruction tracing - which is a specific thing in ARM - and as such the Datasheets or User Manual of the MCUs feel like false advertisement to me.
With best regards
Lilly