cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable Tracex for B-L4S5I-IOT01A?

SLimi.1
Associate III

I have the B-L4S5I-IOT01A STM32L4S5 Discovery Kit. I followed the article and an online video to enable Tracex, but these are calling out a different platform. The RAM starting address for my kit is 0x20000000, but running the program I see in memory starts at 0x20000E20 and there is no data in memory only ????. Is there some sort of offset needed iof hte _FLASH.ld file for .trace?

4 REPLIES 4
Amel NASRI
ST Employee

Hi @SLimi.1​ ,

In this wiki article, I found the following:

  • Q: Is TraceX supported ?
  • A: TraceX is not included in the STM32 Azure® RTOS package. But users can download it from Microsoft GitHub repository and integrate it in their projects.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

The Tracex application is separate, which I download and installed. The application is different than the set up.

The tracex setup called out in the post: How can I add TraceX support in STM32CubeIDE? doesn't mention anything about adding something from GitHub. All the is required is to check a box to enable tracex. What am I missing?

I missed the step to pause the debug to export the data. Now, I see the data, but get an error "Invalid Tracex File ID" when I try to open the .trx file. Any ideas?

GirishKumar
Associate II

Hi,

Even I was facing the same error "Invalid Trace File ID" , I had scanned through many documents finally I had figured out how to solve it.

  1. First you need to put a break point and pause the debug process, so that you can export the contents of trace buffer variable to a .trx file
  2. The starting and ending address of the trace buffer. This is where I made the mistake.

As per the instructions, you are expected to modify the linker file STM32L4S5xxx.id file with the details of where exactly in the ram the linker need to place the trace buffer.

What I did was, ignored this step and removed all attribute values for tracex buffer value. Just keep it as a normal array of 64000.

Compile and debug the program.

Now you pause the debugger and you are ready to export, the trace buffer, At this point, you need to know the exact starting address of the tracex buffer variable. You can get this from the .map file in the Debug Folder. (Just search for the variable name in .map file it is a text file that can be opened in notepad)

Once you get the starting address of trace buffer variable, specify this address as the start address and specify the length of the buffer (64000) . System will automatically compute the end address of the tracex buffer based on the length you had specified. Now press OK, and it should create a .trx file.

These are the two steps which has solved my issued "Invalid file ID" Issue