ARM Cortex-M33 Instruction Tracing Without a Debugger | Interrupt

In a previous post, we talked about debugging memory corruption issues by making use of watchpoints. You may recall in that post we had to reproduce the failure so we could halt the core with a watchpoint installed in order to debug what happened.


This is a companion discussion topic for the original entry at https://interrupt.memfault.com/blog/instruction-tracing-mtb-m33

Thanks for the article. it seems like this feature is also available on cortex m0+ but not on cortex m4 ? am i correct? is there a similar feature in cortex m4?

Cortex-M4 has the ETB (Embedded Trace Buffer), which is similar albeit a little more complicated. Note that both MTB and ETB are optional features, so not every microcontroller will implement them.

I’ve found some discussion regarding use of the ETM in STM32H7 processors. Maybe it sheds some light on this subject!

1 Like

Are there any dev kits available in which ETB is implemented? (With R5 or M4)

@ojasvi I believe the Microchip SAMD family implements MTB (on M0s) and ETB (on M4). Any of those dev kits should work (e.g. the metro boards from Adafruit).

@froncis Thank You for the recommendation,
I have found 2 boards

and Overview | Adafruit Metro M4 Express featuring ATSAMD51 | Adafruit Learning System
but they don’t specifically mention if ETB is there and if the base address is provided or not(the aim is to access ETB directly from the code just as in this blog), Is there any way to confirm it? Perhaps you could help me out here, I’d be grateful.
They do use the Microchip ATSAMD51 chipset, and in the chip documentation, it’s mentioned ETB is there. But I wanna be sure that it’s accessible from Adafruit Boards.
So please help me with this

Is this the development kit with USB that is used in the above blog ?