1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-16 23:55:42 +02:00

Mention svd2rust.

This commit is contained in:
Andrew Walbran 2023-02-02 18:21:08 +00:00
parent f8f6922b0c
commit d507096d31

View File

@ -1,4 +1,8 @@
# PACs
# Peripheral Access Crates
[`svd2rust`](https://crates.io/crates/svd2rust) generates mostly-safe Rust wrappers for
memory-mapped peripherals from [CMSIS-SVD](https://www.keil.com/pack/doc/CMSIS/SVD/html/index.html)
files.
```rust,editable,compile_fail
{{#include examples/src/bin/pac.rs:Example}}
@ -6,6 +10,12 @@
<details>
* SVD (System View Description) files are XML files typically provided by silicon vendors which
describe the memory map of the device.
* They are organised by peripheral, register, field and value, with names, descriptions, addresses
and so on.
* SVD files are often buggy and incomplete, so there are various projects which patch the
mistakes, add missing details, and publish the generated crates.
* `cortex-m-rt` provides the vector table, among other things.
* If you `cargo install cargo-binutils` then you can run
`cargo objdump --bin pac -- -d --no-show-raw-insn` to see the resulting binary.