mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-17 16:12:39 +02:00
Mention svd2rust.
This commit is contained in:
parent
f8f6922b0c
commit
d507096d31
@ -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
|
```rust,editable,compile_fail
|
||||||
{{#include examples/src/bin/pac.rs:Example}}
|
{{#include examples/src/bin/pac.rs:Example}}
|
||||||
@ -6,6 +10,12 @@
|
|||||||
|
|
||||||
<details>
|
<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.
|
* `cortex-m-rt` provides the vector table, among other things.
|
||||||
* If you `cargo install cargo-binutils` then you can run
|
* If you `cargo install cargo-binutils` then you can run
|
||||||
`cargo objdump --bin pac -- -d --no-show-raw-insn` to see the resulting binary.
|
`cargo objdump --bin pac -- -d --no-show-raw-insn` to see the resulting binary.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user