This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3137: Doubts about TRACE and code coverage

Expert 1995 points
Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Hello all,

I read the document 

Hercules™ TMS570LC/RM57Lx Safety Microcontrollers
Development Insights Using Debug and Trace Tools (SPNA202)

but I did not get properly the real difference between Core (or PC) Trace and System Trace. Can anybody explain me that might be with some example?

Is any of the two kinds of Trace able to measure coverage of assembly code ?

Thanks ahead for a reply.

Regards,

-Marco

  • Hi Marco,

    The ARM coresight enabled the debug & trace using real-time trace macrocells architecture (ETM, STM, or PTM).

    ETM (Embedded Trace Macrocell) is a hardware macrocell that, when connected to a processor, outputs trace information on a trace port. An ETM always supports instruction trace, and support data trace. TMS570LS3137 supports 32-channel ETM. The XDS560v2 Pro Trace supports TMS570 ETM trace. I think the race using ETM is core or CPU trace.

    STM (System Trace Macrocell) is a coresight component facilitating software events in the trace collection memory. TMS570 devices don't support STM.
  • Hi QJ,

    Thank you very much for the explanation.

    QJ Wang said:
    An ETM always supports instruction trace, and support data trace.

    Since that, can an ETM support also code coverage? If yes, are assembly code instructions included?

    Regards,

    -Marco

  • Hi Marco,

    The ETM provides instruction trace and data trace. Cortex-R4 supports parallel instruction execution, so the ETM is capable of tracing 2 instructions per cycle. The Cortex-R processor includes a PMU that enables events, such as instructions executed, to be counted over a period of time. The ETM can use these events to count the cycles between executed instructions as performance analyzer. Yes, the ETM supports code coverage.
  • QJ Wang said:
    ETM supports code coverage

    1) with Code Composer ?

    2) also for assembly code (e.g. the startup routines generated by Halcogen) ?

    Thanks,

    Regards,

    -Marco

  • Hi QJ,

    Can you please provide an answer to _MM_ questions?

    1) with Code Composer ?

    2) also for assembly code (e.g. the startup routines generated by Halcogen) ?

    Best regards,

    Tadeo

  • Hello,

    The ETM on Cortex-R4 has this capability.

    I tried ETM trace with XDS560 Trace Pro using CCS HW trace analyzer before, but I don't know if CCS supports the feature of code coverage. You can check with CCS and emulation team:

    e2e.ti.com/.../81