Skip to content

Commit b3457d7

Browse files
bors[bot]cr1901
andauthored
Merge #653
653: Improve MSP430 documentation. r=burrbull a=cr1901 The improvements are twofold: 1. Preemptively state that `msp430` and `msp430-rt` 0.4.x are required. Neither are released as of this writing, but will be soon; they will use the `critical_section` crate. 2. Improve describing how to generate an MSP430 SVD in the first place. Co-authored-by: William D. Jones <[email protected]>
2 parents 7daa9ed + 85a39f6 commit b3457d7

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
## [Unreleased]
99

1010
- Use `critical_section::with` instead of `interrupt::free` for `Peripherals::take`.
11+
- Bring documentation on how to generate MSP430 PACs up to date (in line with
12+
[msp430_svd](https://github.com/pftbest/msp430_svd)).
1113

1214
## [v0.25.1] - 2022-08-22
1315

src/lib.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@
8181
//!
8282
//! MSP430 does not natively use the SVD format. However, SVD files can be generated using the
8383
//! [`msp430_svd` application](https://github.com/pftbest/msp430_svd). Most header and DSLite
84-
//! files provided by TI are mirrored in the repository of `msp430_svd`.
84+
//! files provided by TI are mirrored in the repository of `msp430_svd`. The application does
85+
//! not need to be installed; the `msp430gen` command below can be substituted by
86+
//! `cargo run -- msp430g2553 > msp430g2553.svd` from the `msp430_svd` crate root.
8587
//!
8688
//! When targeting the MSP430 architecture `svd2rust` will _also_ generate three files in the
8789
//! current directory:
@@ -98,9 +100,9 @@
98100
//! [`form`]: https://crates.io/crates/form
99101
//!
100102
//! ``` text
101-
//! $ msp430gen msp430g2553 > out.svd
103+
//! $ msp430gen msp430g2553 > msp430g2553.svd
102104
//!
103-
//! $ xmllint -format out.svd > msp430g2553.svd
105+
//! $ xmllint -format msp430g2553.svd --output msp430g2553.svd
104106
//!
105107
//! $ svd2rust -g --target=msp430 -i msp430g2553.svd
106108
//!
@@ -116,8 +118,8 @@
116118
//! The resulting crate must provide opt-in `rt` feature and depend on these crates:
117119
//!
118120
//! - [`critical-section`](https://crates.io/crates/critical-section) v1.x
119-
//! - [`msp430`](https://crates.io/crates/msp430) v0.3.x
120-
//! - [`msp430-rt`](https://crates.io/crates/msp430-rt) v0.3.x
121+
//! - [`msp430`](https://crates.io/crates/msp430) v0.4.x
122+
//! - [`msp430-rt`](https://crates.io/crates/msp430-rt) v0.4.x
121123
//! - [`vcell`](https://crates.io/crates/vcell) v0.1.x
122124
//!
123125
//! If the `--nightly` flag is provided to `svd2rust`, then `msp430-atomic` v0.1.4 is also needed.
@@ -127,9 +129,9 @@
127129
//! ``` toml
128130
//! [dependencies]
129131
//! critical-section = { version = "1.0", optional = true }
130-
//! msp430 = "0.3.0"
132+
//! msp430 = "0.4.0"
131133
//! msp430-atomic = "0.1.4" # Only when using the --nightly flag
132-
//! msp430-rt = { version = "0.3.0", optional = true }
134+
//! msp430-rt = { version = "0.4.0", optional = true }
133135
//! vcell = "0.1.0"
134136
//!
135137
//! [features]

0 commit comments

Comments
 (0)