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

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [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?

    Regards,
    Ian

    The post was edited 1 time, last by IJeffray ().

  • 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: wiki.segger.com/Tracing_on_NXP_Kinetis_MK21FN1M0
    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: segger.com/products/debug-prob…hnology/setting-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: wiki.segger.com/Tracing_on_ST_…-M_Trace_Reference_Board)

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.