GithubHelp home page GithubHelp logo

etf-trace's People

Contributors

jordens avatar ryan-summers avatar

Stargazers

 avatar

Watchers

 avatar

etf-trace's Issues

Migrate ETF driver to probe-rs

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.

Integrate this repository as a "data source" for rtic-scope

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:

  1. Perform the capture into ETB, parse data, demultiplex, and dump to binary file
  2. Ingest binary file in rtic-scope for display

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.

Determine robust funnel detection mechanism

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.

ITM decoding occassionally fails

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.