quartiq / etf-trace Goto Github PK
View Code? Open in Web Editor NEWCapture STM32H7 trace data using the internal embedded trace FIFO
License: MIT License
Capture STM32H7 trace data using the internal embedded trace FIFO
License: MIT License
Those would also be nice and versatile to trace programs. PC sampling and DWT memory watching don't need application modifications either.
The ETF device driver should be moved into probe-rs as another Coresight component driver.
Nominally, the ETF frame parser should also live over there to handle demultiplexing trace packets, as probe-rs assigns IDs for demultiplexing.
This crate currently dumps the extracted trace packets into a binary file which can be ingested into rtic-scope for further analysis.
That currently involves a two-step process:
It would be beneficial if an argument could be provided on rtic-scope to do the capture + analysis as a single operation. Alternatively, we could directly call rtic-scope after collecting the trace data or provide a wrapper utility that did this.
Currently, the codebase filters the ETFs to find the correct trace funnel for the STM32H7 by looking at the component address. However, in other architectures, the ETFs may exist at different addresses.
We need to robustly identify the correct ETF in the data path of interest for configuration.
Add CI for compiling, linting, and clippy-checking the source code on PR.
Sporadically, running the utility will properly collect and demultiplex data from the ETB, but ITM decoding of the received data then fails with a Malformed packet
error indicating a Hardware source packet with an invalid descriminator ID is encountered:
$ cargo run -- --output test.dump
warning: variant is never constructed: `Circular`
--> src\etf.rs:19:5
|
19 | Circular = 0b00,
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: variant is never constructed: `Hardware`
--> src\etf.rs:28:5
|
28 | Hardware = 0b10,
| ^^^^^^^^^^^^^^^
warning: associated function is never used: `triggered`
--> src\etf.rs:110:12
|
110 | pub fn triggered(&mut self) -> Result<bool, Error> {
| ^^^^^^^^^
warning: `etf-trace` (bin "etf-trace") generated 3 warnings
Finished dev [unoptimized + debuginfo] target(s) in 0.16s
Running `target\debug\etf-trace.exe --output test.dump`
[2022-07-12T14:46:12Z INFO etf_trace] ETB level: 728 of 4096 bytes
[2022-07-12T14:46:12Z INFO etf_trace] ETB level: 1704 of 4096 bytes
[2022-07-12T14:46:12Z INFO etf_trace] ETB level: 2632 of 4096 bytes
[2022-07-12T14:46:12Z INFO etf_trace] ETB level: 3504 of 4096 bytes
[2022-07-12T14:46:12Z INFO etf_trace] ETB full
Error: Decoder error
Caused by:
0: A malformed packet was encountered: Hardware source packet discriminator ID is invalid: 3
1: Hardware source packet discriminator ID is invalid: 3
error: process didn't exit successfully: `target\debug\etf-trace.exe --output test.dump` (exit code: 1)
It is unknown if this is a defect in the demultiplexing process or with ITM decoding.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.