Instruction Trace on the LPC551X family

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

Instruction Trace on the LPC551X family

Jump to solution
235 Views
lilly1337
Contributor II

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.  

Labels (1)
0 Kudos
Reply
1 Solution
182 Views
lilly1337
Contributor II

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

View solution in original post

0 Kudos
Reply
5 Replies
205 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi @lilly1337 

John is right.
Additionally, if you use MCUXpresso IDE, there is a SWO Trace Guide in the IDE installation path. You can refer to it.
You can use the SWO Trace functionality of MCUXpresso IDE with all supported debug solutions. However,
SWO requires connection to the target MCU using a compatible debug probe such as:
• LinkServer LPC-Link2 (standalone or built into many LPCXpresso development boards and some iMX RT
EVK boards)
• LinkServer MCU-Link / MCU-Link Pro (standalone or built into development boards)
• SEGGER J-Link
– All standalone versions but refer to SEGGER's website for details
 
Thank you.
 
BR
Alice
0 Kudos
Reply
207 Views
John217Ross
Contributor I

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. 

0 Kudos
Reply
198 Views
lilly1337
Contributor II

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.

0 Kudos
Reply
187 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @lilly1337 

The LPC551x supports the Instrumentation Trace Macrocell (ITM), which is implemented via Serial Wire Output (SWO). The ITM block provides a mechanism for transmitting data from your target to the debugger through the SWO stream.
This communication is achieved via a memory-mapped register interface. Data written to any of the 32 stimulus registers is forwarded to the SWO stream.
Detail usage please refer to the User Guide I attached last time.
 
BR
Alice
0 Kudos
Reply
183 Views
lilly1337
Contributor II

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

0 Kudos
Reply