2019-10-07 02:25 AM
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.
2019-10-17 03:27 PM
Hello
If you have a ULINKpro (or Segger J-Trace or IAR iJetTrace) you can observe a working ETM system to save time. You can examine various registers to see what works.
ULINKpro can also access ETB - although I have not tried it on your processor.
Bob Boys
Arm
2019-10-18 03:18 AM
I don't have a trace capable device (yet). It sounds surprising that it is the only solution to understand how this is working...
2019-10-19 07:28 PM
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
2020-04-19 03:33 AM
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
2020-04-19 04:26 AM
Hi,
One more note,
Seems that with I-jest it works( while with j-link it doesn't !)
j-link prints on start debug:
I-jet prints on start debug:
Any idea why these debuggers behave different ?
Thanks