working with etm/swo on high performance cortex-m7 devices · 2018-03-08 · etm embedded trace...
TRANSCRIPT
![Page 1: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/1.jpg)
Working with ETM/SWO on high performance Cortex-M7 devices
David Källberg, Field Application Engineer
![Page 2: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/2.jpg)
Agenda • Arm Cortex-M7
– Architecture – Debug features
• Achieve max SWO/ETM performance • Demo SWO/ETM on STM32H7
![Page 3: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/3.jpg)
Arm Cortex-M7
![Page 4: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/4.jpg)
Arm Cortex-M7
![Page 5: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/5.jpg)
Arm Cortex-M7 • High performance core
• More power efficient then Arm Cortex-M4
• 6-stage pipeline
• Optional SP/DP FPU
• Complete hardware debug solution – Coresight with ETMv4, ITM and SWO
![Page 6: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/6.jpg)
DWT
CPU statistics
FPB 8 breakpoints
DAP
JTAG
Live core access
I-jet
Interrupt trace SWD/SWO
ITM Instrumentation Trace
ETM trigger
ETB instruction trace
ETB Embedded Trace Buffer
ETM Embedded Trace Macrocell
ETMv4
instruction trace
Trace port
4 watchpoints
PC sampler ITM Software trace 32 channels
Time stamping
Cortex-M7 Coresight overview
6 SWD
![Page 7: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/7.jpg)
Achieve max SWO/ETM performance
![Page 8: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/8.jpg)
Performance – the challenge • Cortex-M7 devices runs very fast
– i.MX RT runs @ 600 MHz • Performance limited by:
– CPU I/O performance – PCB, connectors and cables – Debug probe
![Page 9: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/9.jpg)
SWO - features • Sampled instruction trace • Data access log
– DWT has 4 watchpoints • Interrupt log • ITM events
– Non-intrusive printf style messages • And more...
![Page 10: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/10.jpg)
SWO - performance
Example – STM32H7 – CPU clk 400 MHz – PLL1VCO = 800 MHz – DIRR = 3 – SWO clocked by 800/3 – SWO prescaler – Manchester mode (/2)
Setup – Manchester mode – 266.66 MHz clock – With I-jet:
266/4/2 = 33 MHz – With I-jet Trace
266/2/2 = 66 MHz
![Page 11: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/11.jpg)
ETM - features • Complete instruction trace • Travel back in time
– Millions of instructions • Profiling • Code coverage • And more...
![Page 12: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/12.jpg)
ETM - performance Example – STM32H7
– CPU clk 400 MHz – PLL1VCO = 800 MHz – Board spec
TRACECLK = 50 MHz
Setup – I-jet Trace – MIPI 20 connector – CLK = 800/3/2 = 133M – ETM capture success
![Page 13: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/13.jpg)
Demo ETM/SWO on STM32H7
![Page 14: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/14.jpg)
• SuperSpeed USB 3.0 interface (5 Gbps) • Fully compatible with USB 2.0 (480 Mbps) • No power supply required, powered entirely by the USB port • Target power of up to 600mA can be supplied from I-jet Trace
with overload protection • Automatic core recognition • JTAG, SWD, target power consumption measuring
I-jet Trace for ARM Cortex-A/R/M
Trace features • Trace memory size up to 256 Mbyte • Up to 16-bit wide trace data collection • Up to 350MHz ETM trace clock • 64-bit timestamp with CPU cycle accuracy for timing analysis • Automatic alignment of parallel trace data skew on individual bits to compensate for PCB layout
and signal integrity problems • Automatic trace data and clock voltage threshold adjustments to get the most reliable capture with
noisy or un-terminated target boards • Support for trace logic levels from 1.2 V to 5V
![Page 15: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/15.jpg)
Summary • Cortex-M7 brings high performance
• SWO and ETM gives possibilities
• Requires good debug performance
• I-jet and I-jet Trace enables high performance debugging of Cortex-M7
![Page 16: Working with ETM/SWO on high performance Cortex-M7 devices · 2018-03-08 · ETM Embedded Trace Macrocell . ETMv4. instruction trace . Trace port . 4 watchpoints PC sampler ITM](https://reader034.vdocuments.us/reader034/viewer/2022042518/5f8dee172f512e440c771d75/html5/thumbnails/16.jpg)
• Get scanned to have this presentation emailed to you.
• Visit IAR Demo Space to get a demo of our technology.
Want to learn more?
Thank you for your attention!