Comments (3)
For cortex-m devices, the ITM can be used to do this if your microcontroller can support it. probe-rs supports this functionality via the CLI or via your own custom code.
Probe-rs's CLI has a trace
command that will use the ITM to capture the cycle counts of all ISRs in your system, but it doesn't support bench marking arbitrary functions or sections (although I've been looking at adding such functionality).
Take a look at rtic-scope if you're using RTIC
from wg.
An approach has been mentioned in https://blog.japaric.io/rtfm-overhead/. I've been also using the external method using a GPIO quite successfully to do A/B comparisons of code and optimize it, though it won't yield exact measurements.
There have been some experiments with https://github.com/orbcode/orbuculum a long time ago but I can't find any reference. Using that software with ITM/ETM has the potential of yielding professional level results and details at the expense of a non-trivial setup and potentially research work.
from wg.
Closing this as part of the 2024 triage. I'd definitely recommend following up with probe-rs trace
, and the other options mentioned above.
If anyone discovers this in the future or has a better solution - please feel free to submit it to the https://github.com/rust-embedded/awesome-embedded-rust list!
from wg.
Related Issues (20)
- Tracking Issue: Rust Embedded on Mastodon HOT 9
- Display showcase on rust-embedded.org landing page HOT 1
- How can I contribute to the embedded wg? HOT 1
- bors-ng is being retired HOT 11
- [Question] Experience with cadence chips HOT 2
- Propose transferring svdtools to tools team HOT 1
- Maintenance of meta-rust-bin HOT 2
- Maintainers for embedded targets HOT 32
- Transfer heapless and volatile-register to libs team HOT 13
- Tracking Issue: Call for blog posts, EoY 2023 HOT 12
- Raw string runtime error with target riscv32i-unknown-none-elf HOT 9
- embedded-can appears to be in limbo HOT 3
- Actions-rs is deprecated HOT 7
- Figure out automation of the "all" team on GH HOT 3
- Soundly initializing custom memory sections HOT 2
- Improve DX for unit & integration testing of `no_std` and `std` targets HOT 5
- Consider collecting proposals for 2024H2 Rust Project Goals HOT 6
- Run 2024 Embedded WG Micro-Survey HOT 20
- Tracking/discussion issue for MMIO references HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wg.