Wednesday, May 23rd 2018, 10:45am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: Jul 8th 2017

Posts: 1


Wednesday, July 26th 2017, 1:45pm

[SOLVED] Some issues with ETM on j-Trace device

I'm using a j-Trace with IAR EWARM 7.80, connecting to a Kinetis MK24FN1M0VLL12 custom board.

I've edited IAR's Kxxx_Trace.dmac file to enable the trace clock (bit 13 of 0x40048038) and pinmux we're using (PTE0..PTE3, so 0x4004D0xx=0x540) and all appears well... the debug session starts, the "Trace" LED on the j-Trace lights orange. And when I hit "Break" in EWARM, I (uually) receive the error "Warning: ERROR: Failed to stop trace" -- and then trace data appears in any enabled trace windows. This is reliable about 90% of the time... sometimes I just get no trace data at all which can be a bummer.

ETB mode works fine, reliable, no errors, but is obviously very short trace and not good enough for me -- that's why we bought a j-Trace after all :D

I've also tried to use Segger Ozone, and ETM mode does nothing there at all (But not sure where I would set up the pins for Ozone - currently doing this via EWARM first)

What am I missing to be able to successfully use ETM in Ozone? And any ideas why I see the "failed to stop trace" error in EWARM?


This post has been edited 1 times, last edit by "IJeffray" (Jul 26th 2017, 1:48pm)


Super Moderator

Date of registration: Jan 2nd 2017

Posts: 1,051


Wednesday, July 26th 2017, 2:39pm

Hello Ian,

Thank you for your inquiry.


And any ideas why I see the "failed to stop trace" error in EWARM?

This is mostly caused by a incorrect trace implementation by IAR when using J-Trace debug probes as they do trace handling differently than we do.
We will investigate this further, but this could take a while as EWARM is not our software.

For the best trace debug experience we recommend using Ozone.
Some devices (e.g. Kinetis K60 series) work out of the box with our J-Link software and don't need further trace pin initialization by the user.
For the K24 device family however you will need to implement a pin init yourself.

An example project based around the MK21 series that you can use for orientation can be found here:
Unfortunately we do not have a trace example project for the mk24 series currently as there is no evaluation board on the market with ETM connected to the debug port.

For more information about setting trace up please visit:…tting-up-trace/

Are you using a J-Trace PRO or a regular J-Trace?
If you got the PRO version you should also have a SEGGER Cortex-M Trace Reference board with it that you could use to get more familiar with Ozone and SEGGER software.
Here is an example for that particular board:…eference_Board)

Best regards,
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support contact us per e-mail.
The following contact form can be used for this: