Hiya,
I have a uLink pro and can successfully see the instruction trace (derived from the ETM data) of a target in uVision in the Trace Data window. However, I'm interested in seeing the raw ETM data extracted from the target chip (i.e., A-sync and I-sync packets as defined in chapter 7 of infocenter.arm.com/.../IHI0014Q_etm_architecture_spec.pdf).
Is there any way to expose this information or infer it without error? If so, how?
Thanks so much!
I don't think there is any way to expose it or infer it...
https://alltechbest.com/
https://tobefrankmagazine.com/
There probably is a way to get to it. There seem to be a number of academic types who seem to be interested in it in recent months. You might need to find some more practically minded types.
Segger has a test board which allows access to the trace pins. You could likely access with a competent logic analyzer or FPGA FIFO Buffer arrangement.
You'd probably need a model of the core to do a reconstruction of the data stream into something usable.
PDQ Logic also has hardware https://www.pdqlogic.com/
Googling "cmsis dap etm trace" found this:
https://github.com/TheShed/OpenOCD-CMSIS-DAP/blob/master/src/target/etm.c
/* * ARM "Embedded Trace Macrocell" (ETM) support -- direct JTAG access. * * ETM modules collect instruction and/or data trace information, compress * it, and transfer it to a debugging host through either a (buffered) trace * port (often a 38-pin Mictor connector) or an Embedded Trace Buffer (ETB). * * There are several generations of these modules. Original versions have * JTAG access through a dedicated scan chain. Recent versions have added * access via coprocessor instructions, memory addressing, and the ARM Debug * Interface v5 (ADIv5); and phased out direct JTAG access. * * This code supports up to the ETMv1.3 architecture, as seen in ETM9 and * most common ARM9 systems. Note: "CoreSight ETM9" implements ETMv3.2, * implying non-JTAG connectivity options. * * Relevant documentation includes: * ARM DDI 0157G ... ETM9 (r2p2) Technical Reference Manual * ARM DDI 0315B ... CoreSight ETM9 (r0p1) Technical Reference Manual * ARM IHI 0014O ... Embedded Trace Macrocell, Architecture Specification */
So maybe that's worth a look ... ?
Out of curiosity, (since I love people that tinker with things). If you can get access to the ETM, stream, what are you going to do with it? Do you have a visualizer or python script waiting in the wings?
=================
Looking at the doc you sent, I would try to find out more about what section 1.1.2 "The debug environment" is talking about. Sounds like the ETM data is compressed, and expects software on the host PC to decompress it.