Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rahix/atdf2svd
Converter from Atmel's atdf format to CMSIS SVD
https://github.com/rahix/atdf2svd
atdf avr avr-rust cmsis-svd microcontroller rust
Last synced: 3 days ago
JSON representation
Converter from Atmel's atdf format to CMSIS SVD
- Host: GitHub
- URL: https://github.com/rahix/atdf2svd
- Owner: Rahix
- License: gpl-3.0
- Created: 2019-05-07T18:37:26.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-04T17:25:24.000Z (16 days ago)
- Last Synced: 2024-11-04T18:29:31.428Z (16 days ago)
- Topics: atdf, avr, avr-rust, cmsis-svd, microcontroller, rust
- Language: Rust
- Size: 420 KB
- Stars: 17
- Watchers: 6
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
atdf2svd [![crates.io page](https://img.shields.io/crates/v/atdf2svd.svg)](https://crates.io/crates/atdf2svd) [![CI](https://github.com/Rahix/atdf2svd/actions/workflows/ci.yml/badge.svg)](https://github.com/Rahix/atdf2svd/actions/workflows/ci.yml)
========
A converter tool that converts Atmel's *atdf* files into *svd*. The primary usecase for this is to then use the *svd* files with `svd2rust` to create safe abstractions for register access.## Usage
```
USAGE:
atdf2svd [svd_path]
```## Installation
Install *atdf2svd* using```shell-session
$ cargo install -f atdf2svd
```## Notes
### Automatic Changes
There are two "post-processors" running after the conversion ([`patch.rs`](src/atdf/patch.rs)):
- `signals_to_port_fields`: Patches the registers for all `PORTx` peripherals to contain fields for each existing pin. Pin IDs are taken from the `` tag of the port instance.
- `remove_unsafe_cpu_regs`: Removes the `SREG`(Status Register) and `SP`(Stack Pointer) registers as they should not be safely accessible.### Manual Changes
Unfortunately, the provided *atdf* files are often not completely correct or contain undescriptive names. One big issue is that enumerated values are often just named `VAL_0xXX`. I recommend patching the generated *svd* files using the patch tool written by the [stm32-rs](https://github.com/stm32-rs/stm32-rs#device-and-peripheral-yaml-format) project.## License
`atdf2svd` is licensed under the `GPL v3` license. See [LICENSE](LICENSE) or for more info.