Skip to content

Commit d5fb6c3

Browse files
committed
We are in a mess. This commit attempts to fix it.
The cortex-m crate in the master branch is 0.7.4 plus a bunch of fixes that have never been released. Some of them are breaking changes and so will never be released. We cannot 'just' release a cortex-m 0.8 with them in because that is ecosystem shattering - the crate contains a 'links=' attribute, and a bunch of no_mangle functions, so you cannot have two versions in the same dependency tree. Instead, there is a 0.7.x branch. This was taken before the cortex-m-rt crate move. It has cortex-m 0.7.7, which has been published. This commit just deletes the cortex-m folder and replaces it with the contents of the cortex-m crate as found on the the 0.7.x branch. If you want to pick up the changes that have just been deleted, cherry- pick them into a new branch and open a PR to merge them into here. Breaking changes for cortex-m into master will no longer be accepted. Sorry.
1 parent 6d566b2 commit d5fb6c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1281
-1225
lines changed

cortex-m/CHANGELOG.md

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,29 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
### Breaking changes
10+
## [v0.7.7] - 2023-01-03
1111

12-
- `NVIC::request()` no longer requires `&mut self`.
13-
- `embedded-hal` version 0.2 delay implementations now required the `eh0` feature.
12+
- Add missing documentation for `critical-section-single-core` feature added
13+
in v0.7.6.
1414

15-
### Added
16-
- Updated `SCB.ICSR.VECTACTIVE`/`SCB::vect_active()` to be 9 bits instead of 8.
17-
Also fixes `VectActive::from` to take a `u16` and subtract `16` for
18-
`VectActive::Interrupt`s to match `SBC::vect_active()` (#373).
19-
- DWT: add `configure` API for address, cycle count comparison (#342, #367).
20-
- ITM: add `configure` API (#342).
21-
- TPIU: add API for *Formatter and Flush Control* (FFCR) and *Selected Pin Control* (SPPR) registers (#342).
22-
- TPIU: add `swo_supports` for checking what SWO configurations the target supports. (#381)
23-
- Add `std` and `serde` crate features for improved host-side ITM decode functionality when working with the downstream `itm`, `cargo-rtic-scope` crates (#363, #366).
24-
- Added the ability to name the statics generated by `singleton!()` for better debuggability (#364, #380).
25-
- Added `critical-section-single-core` feature which provides an implementation for the `critical_section` crate for single-core systems, based on disabling all interrupts. (#447)
26-
- Added support for `embedded-hal` version 1 delay traits, requiring rust 1.60.
27-
- `singleton!()` now forwards attributes (#522).
28-
- Added `set_sevonpend` and `clear_sevonpend` (#539).
15+
## [v0.7.6] - 2022-08-12
2916

30-
### Fixed
31-
- Fixed `singleton!()` statics sometimes ending up in `.data` instead of `.bss` (#364, #380).
32-
- `interrupt::free` no longer hands out a `CriticalSection` token because it is unsound on multi-core. Use `critical_section::with` instead. (#447)
17+
- Added `critical-section-single-core` feature which provides an implementation for the `critical-section` crate for single-core systems, based on disabling all interrupts. (#448)
18+
19+
## [v0.7.5] - 2022-05-15
20+
21+
### Deprecated
22+
- the `ptr()` function on all peripherals register blocks in favor of
23+
the associated constant `PTR` (#386).
3324

3425
### Changed
35-
- Inline assembly is now always used, requiring Rust 1.59.
36-
- Bumped MSRV to 1.61 for compatibility with syn versions >=2.0.68.
3726

38-
### Removed
39-
- removed all peripherals `ptr()` functions in favor of the associated constant `PTR` (#385).
40-
- removed `inline-asm` feature which is now always enabled
27+
- The `inline-asm` feature no longer requires a nightly Rust compiler, but
28+
does require Rust 1.59 or above.
29+
30+
### Fixed
31+
- Fixed `singleton!()` statics sometimes ending up in `.data` instead of `.bss` (#364, #380).
32+
(Backported from upcoming 0.8 release).
4133

4234
## [v0.7.4] - 2021-12-31
4335

@@ -70,7 +62,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7062

7163
[C-GETTER]: https://rust-lang.github.io/api-guidelines/naming.html#c-getter
7264

73-
7465
## [v0.7.3] - 2021-07-03
7566

7667
### Fixed
@@ -764,7 +755,10 @@ fn main() {
764755
- Functions to get the vector table
765756
- Wrappers over miscellaneous instructions like `bkpt`
766757

767-
[Unreleased]: https://github.com/rust-embedded/cortex-m/compare/v0.7.4...HEAD
758+
[Unreleased]: https://github.com/rust-embedded/cortex-m/compare/v0.7.7...HEAD
759+
[v0.7.7]: https://github.com/rust-embedded/cortex-m/compare/v0.7.6...v0.7.7
760+
[v0.7.6]: https://github.com/rust-embedded/cortex-m/compare/v0.7.5...v0.7.6
761+
[v0.7.5]: https://github.com/rust-embedded/cortex-m/compare/v0.7.4...v0.7.5
768762
[v0.7.4]: https://github.com/rust-embedded/cortex-m/compare/v0.7.3...v0.7.4
769763
[v0.7.3]: https://github.com/rust-embedded/cortex-m/compare/v0.7.2...v0.7.3
770764
[v0.7.2]: https://github.com/rust-embedded/cortex-m/compare/v0.7.1...v0.7.2

cortex-m/Cargo.toml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,33 @@ license = "MIT OR Apache-2.0"
1111
name = "cortex-m"
1212
readme = "README.md"
1313
repository = "https://github.com/rust-embedded/cortex-m"
14-
version = "0.7.4"
15-
edition = "2021"
16-
rust-version = "1.61"
14+
version = "0.7.7"
15+
edition = "2018"
1716
links = "cortex-m" # prevent multiple versions of this crate to be linked together
1817

1918
[dependencies]
20-
critical-section = "1.0.0"
21-
volatile-register = "0.2.2"
22-
bitfield = "0.15.0"
23-
eh0 = { package = "embedded-hal", version = "0.2.4", optional = true }
24-
eh1 = { package = "embedded-hal", version = "1.0.0" }
19+
bare-metal = { version = "0.2.4", features = ["const-fn"] }
20+
critical-section = { version = "1.0.0", optional = true }
21+
volatile-register = "0.2.0"
22+
bitfield = "0.13.2"
23+
embedded-hal = "0.2.4"
2524

2625
[dependencies.serde]
2726
version = "1"
2827
features = [ "derive" ]
2928
optional = true
3029

30+
[dependencies.serde_json]
31+
version = "1"
32+
optional = true
33+
3134
[features]
3235
cm7 = []
3336
cm7-r0p1 = ["cm7"]
37+
inline-asm = []
3438
linker-plugin-lto = []
3539
std = []
36-
critical-section-single-core = ["critical-section/restore-state-u32"]
40+
critical-section-single-core = ["critical-section/restore-state-bool"]
3741

3842
[package.metadata.docs.rs]
3943
targets = [

cortex-m/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This project is developed and maintained by the [Cortex-M team][team].
1111

1212
## Minimum Supported Rust Version (MSRV)
1313

14-
This crate is guaranteed to compile on stable Rust 1.61.0 and up. It might compile with older versions but that may change in any new patch release.
14+
This crate is guaranteed to compile on stable Rust 1.59 and up. It might compile with older versions but that may change in any new patch release.
1515

1616
## License
1717

cortex-m/asm-toolchain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nightly-2021-12-16

0 commit comments

Comments
 (0)