rust-embedded / rust-embedded/svd2rust
Add support for atomic operations in microcontrollers that support it
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 857
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
svd2rust should generate an additional (set, clear, toggle or and, or, xor) operations when atomic's are supported. While ARM MCU's provide stateless registers, the E310-G000 does not. Instead it provides AMOAND, AMOOR, AMOXOR instructions to be used instead.
This currently makes hard to implement embedded-hal traits without violating safety, since turning an OutputPin high requires a modify operation, which is not atomic.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the register-generation entry point in svd2rust and examining how SVD input describes atomic capabilities. Compare generated APIs for ARM-style stateless registers with the E310-G000 AMOAND/AMOOR/AMOXOR requirement; done means safe atomic operations are generated for supported microcontrollers and the generated output is validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100