cortex-m icon indicating copy to clipboard operation
cortex-m copied to clipboard

Ship a 1.0 release

Open thejpster opened this issue 5 years ago • 10 comments

Part of https://github.com/rust-embedded/wg/issues/383

Might also involve https://github.com/rust-lang/rust/issues/27731 so we can get rid of (some) of the inline asm / pre-compiled objects.

  • [X] Consider getting rid of aligned dependency subtree (https://github.com/rust-embedded/cortex-m/issues/184)
  • [x] Remove the const-fn feature
  • [x] Remove all currently #[deprecated] APIs
  • [x] Land #181
    • [ ] Audit the crate for other things that should be #[cfg]d out depending on the target
  • [ ] Make all types #[non_exhaustive] where it makes sense
  • [ ] Use an svd2rust PAC instead of doing register access by hand
  • [ ] Improve documentation of the Peripherals::steal() API, or redesign that API (https://github.com/rust-embedded/cortex-m/issues/186)
  • [ ] Make usage from multi-core chips sound
  • [ ] Document that the inline-asm feature is completely unstable and semver-exempt
  • [ ] Document availability of target-specific APIs (using #[doc(cfg(X))] where possible)
  • [x] Fix soundness bug in cache maintenance API https://github.com/rust-embedded/cortex-m/issues/188
  • [ ] Fix soundness bugs around MMIO in general (https://github.com/rust-embedded/wg/pull/387)
  • [ ] Review against API guidelines
  • [ ] Update to bare-metal 1.0 (one released)
  • [ ] ...

thejpster avatar Jan 07 '20 20:01 thejpster

Might also involve rust-lang/rust#27731 so we can get rid of (some) of the inline asm / pre-compiled objects.

This is not needed for 1.0 since it doesn't change the public API

jonas-schievink avatar Jan 07 '20 20:01 jonas-schievink

Easy (breaking) improvements to do before 1.0:

  • Remove the const-fn feature
  • Get https://github.com/rust-embedded/cortex-m/pull/181 landed and audit the crate for other things that should be #[cfg]d out depending on the target

Other 1.0-quality things that I'd like to see:

  • Improve overall documentation, especially around the take/steal API (and maybe improve that API)
  • Document that the inline-asm feature is unstable (semver-exempt) and nightly-only

This is also blocked on sound MMIO. Currently we use volatile-register here. As #184 mentions, there's also a public dependency on aligned that we should get rid of (or also bring to 1.0).

jonas-schievink avatar Jan 09 '20 21:01 jonas-schievink

I'd really want to see cortex-m move to using svd2rust-generated API for accessing the Cortex-M peripherals, i.e. a cortex-m-pac crate that cortex-m depends on and adds the HAL API. I've made some progress towards generating a suitable set of SVD files already and plan to finish it fairly soon.

adamgreig avatar Jan 09 '20 21:01 adamgreig

I'd really want to see cortex-m move to using svd2rust-generated API for accessing the Cortex-M peripherals, i.e. a cortex-m-pac crate that cortex-m depends on and adds the HAL API. I've made some progress towards generating a suitable set of SVD files already and plan to finish it fairly soon.

Yeah, this would likely fundamentally change our public API so if we are ever going to do it, pre 1.0 is best.

thejpster avatar Jan 09 '20 21:01 thejpster

Also:

  • Remove currently #[deprecated] unsound APIs (I expect we'll publish 0.7 before 1.0, so it would be good to do all breaking changes there)

jonas-schievink avatar Jan 10 '20 10:01 jonas-schievink

I'd add:

  • Check all peripheral methods that could be static are, i.e. don't unnecessarily require a reference to the peripheral for safe/atomic operations. We've had a number of breaking changes moving things from methods to associated functions and the latter are easier to use, so we should proactively see if we can do any more.

adamgreig avatar Jan 28 '20 20:01 adamgreig

With the new CriticalSection type interrupt::free() should pass CriticalSection by value instead of by reference.

Disasm avatar Feb 08 '20 12:02 Disasm

@adamgreig any updates on the svd2rust generation? Is there a tracking issue for it?

tmplt avatar Jan 04 '22 11:01 tmplt