How to use emIDE


Debugging with emIDE and J-Link - The ETM Trace Window

The J-Link Plugin provides a debugging window to display instruction backtrace data.
If your target device has an Embedded Trace Macrocell (ETM) or an Embedded Trace Buffer (ETB), J-Link is able to get the last recently called adresses.

When the debugger halts, the ETM Trace Window can show the last recently executed instructions.
This can be helpful to see what the application did in detail, espacially if this cannot be directly seen in the source code.
A typical scenario is, when the application jumps to the hard fault handler, it might be hard to find where the hardfault came from. The last recently executed instructions might give a hint what went wrong.


The ETM Trace window can be toggled in the Debug Menu -> Toggle ETM Trace Window
or with the button in the J-Link Toolbar, which, if not already shown, can be activated via View -> Toolbars -> J-Link.

With the button on the left, tracing can be started and stopped. The button on the right requests more trace data.
If started, the trace data automatically updates with every halt of the debugger after an (instruction) step, manually halting or hitting a breakpoint.