Skip to main content
Gpeti
Senior
October 7, 2019
Question

Use STM32H7 ETM without debugging tool

  • October 7, 2019
  • 24 replies
  • 7199 views

I need to use the ETM on a STM32H753 but without debugging tool. The idea is to record the execution trace all the time, and when the firmware encounter a critiical issue, output the trace to an external tool or program it to flash for later analysis. It is designed to work in operational mode, not through a debugging tool.

The documentation of ARM is very confusing on the topic. Some documents mentions the ETB (Embedded Trace Buffer) other documents mentions the ETF (Embedded Trace FIFO) but I couldn't really understand which is doing what.

I don't really understand what functionality of the STM32 to use to implement what I need, and also how to do it. Strangely enough, I didn't find any code example of discussion about this online. it's surprising because recording execution trace sounds like a very interesting functionality in safety critical environments in particular.

This topic has been closed for replies.

24 replies

Bob Boys
Visitor II
October 20, 2019

Hi

It isn't the only method - all the necessary documents are on the Arm website.

ETM can be challenging - if a way can be found to not have to reinvent the wheel it should save you time.

Bob

ranran
Senior
April 19, 2020

Hello,

Did anyone managed to trace stm32 ?

We want to use IAR with j-trace, and we get trouble with it.

Yet using Segger's demo for stm343 it work (https://wiki.segger.com/STM32H7#Tracing_on_ST_STM32H743)

It seems that demo uses pex file which is a MUST, otherwise the function trace is disabled.

Yet, I am not sure what's inside that pex. (If I open a new project swd+ trace buffer configuration, I get no trace, unless I will the .pex file into that project).

Using IAR I get an empty function trace window, and no errors or complaints, but just an empty window.

Another thing, the project setting (Ozone) uses ETB ( and not ETM), and I am not sure what's the difference between ETB and ETM ? Doesn't ETB uses trace pins ?

Thanks

ranran
Senior
April 19, 2020

Hi,

One more note,

Seems that with I-jest it works( while with j-link it doesn't !)

j-link prints on start debug: 

https://pastebin.com/4xcGWKLx

I-jet prints on start debug: 

https://pastebin.com/SjY7i2mh

Any idea why these debuggers behave different ?

Thanks