Instruction trace not working on LPCXpresso54628

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

Instruction trace not working on LPCXpresso54628

Jump to solution
2,278 Views
primate
Contributor III

Hi,

I am using a LPCXpresso54628 (OM13098) board and since I am getting some hard faults I would like to trace the code since the Fault does not report the exact problem where to look for the fault.

However, I am unable to set up the instruction trace for the board. When I click on the Record button the IDE says that the instruction trace is not supported for the target. Sreenshoot below.

pastedImage_1.png

I have deleted the launch configuration but I get back the same message. Am I doing something wrong? Using MCUXpresso IDE v11.1.1 [Build 3241].

Thanks for any help.

LPCXpresso54628 

LPCXpresso54628 

Labels (1)
0 Kudos
Reply
1 Solution
2,072 Views
converse
Senior Contributor V

1. You don't need to set anything up in the code - the IDE will do this when you start trace

2. 'conflicting types' means that it is already defined - probably in a header file.

View solution in original post

7 Replies
2,072 Views
primate
Contributor III

Hi guys,

thanks for the info. I must say that the instructions found in MCUXpresso IDE Instruction Trace Guide misslead me since it says ETB is supported on a range of Cortex-M3, M4.... maybe that part of the text is not accurate enough, especially for somebody not familiar with tracing, or maybe it is just me :smileyhappy:

Nevertheless, I will look into it although I just found some info How To Use SWO Trace on MCUXpresso IDE for the LPCXpresso54114. I presume it can be scaled to fit the LPCXpresso54628 (edit: SWO pin is PIO0_10).

0 Kudos
Reply
2,072 Views
primate
Contributor III

Stuck at Enable SWO Trace clock since the startup_lpc54628.c does not contain any code so I added (from the SWO trace help file):

volatile unsigned int *TRACECLKDIV = (unsigned int *) 0x40000304;

volatile unsigned int *SYSAHBCLKCTRLSET = (unsigned int *) 0x40000220;

// Write 0x00000000 to TRACECLKDIV / Trace divider

*TRACECLKDIV = 0;

// Enable IOCON peripheral clock // by setting bit13 via SYSAHBCLKCTRLSET[0]

*SYSAHBCLKCTRLSET = 1 << 13; // 0x2000

But I get the following error:

 error: conflicting types for 'TRACECLKDIV'
error: conflicting types for 'SYSAHBCLKCTRLSET'
0 Kudos
Reply
2,072 Views
primate
Contributor III

OK, thanks for the hint, I have managed to set it up however....

I am not getting the info needed to pinpoint the fault.

edit:

More in detali I am using FreeRTOS with 2 tasks (one xTaskCreate for USART and one for lwIP)  and when I leave out eather one of those two everything is OK but when I use both the app gets a fault within a minute. Sometimes the fault is not presented but I can see that everything stopped and its driving me crazy.

Figured out that the USART STACKSIZE was to small, sometimes you cannot see a tree from the forest :smileyhappy:

0 Kudos
Reply
2,073 Views
converse
Senior Contributor V

1. You don't need to set anything up in the code - the IDE will do this when you start trace

2. 'conflicting types' means that it is already defined - probably in a header file.

2,072 Views
converse
Senior Contributor V

Note that the other SWO trace modes are supported by MCUXpresso on these devices. Details in the Trace Guide supplied with the product.

2,072 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Primate,

Pls refer to the community doc, it focuses on the SWO trace function based on LPCXpresso54628.

https://community.nxp.com/thread/530102 

Regard

XiangJun Rong

2,071 Views
converse
Senior Contributor V

That’s correct. MCUXpresso supports devices with ETB or MTB for instruction trace. The LPC54 devices use ETM for instruction tracing and thus are not supported.

The essential difference is that with ETB/MTB the traces instructions are captured in RAM on the device and then read out by the debug probe and decoded with the debugged. With ETM the trace is streamed directly through the trace port - at very high data rates. You need special hardware to capture the trace data.

0 Kudos
Reply