-
Notifications
You must be signed in to change notification settings - Fork 171
Add forwards-compatible v0.6.5 #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @therealprof (rust-highfive has picked a reviewer for you, use r? to override) |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Adam! Everything seems to be in order, should we merge this and do a pre-release ?
We are planning to have RTIC 0.6 be based on I gave it a look, and it seems that one needs to detect which version is being compiled to select the proper names in the library. E.g. in RTIC we had issues with |
cortex-m 0.7 implements InterruptNumber for Nr, so if you just use InterruptNumber and someone passes you Nr, I think it should work OK. Once this PR is released as cortex-m 0.6.5, it should be fine for you to use cortex-m in RTIC and projects still using 0.6.x should be able to interoperate. If you have time I'd be grateful if you could try it out with this 0.6.5 (hopefully we'll do a pre-release soon) and check my expectation is correct... |
I've updated this PR to be a prerelease version, so I think we could merge this and I'll publish it as 0.6.5-alpha, then if it seems OK we can do a new PR making it 0.6.5 and releasing it. |
Cool, I can surely give it a try with RTIC! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
bors r+
315: Add forwards-compatible v0.6.5 r=thalesfragoso a=adamgreig This PR creates a new v0.6.5 on the v0.6.x branch, which depends on v0.7 and re-exports many of its types. Notable changes: * The `links` field is removed from Cargo.toml to permit linking to v0.7 series * The `#[no_mangle] CORE_PERIPHERALS` static is removed to permit linking to v0.7 series * The `TAKEN` static is removed: sadly we can't access the 0.7 static because it's not pub, so instead this version calls `take()` and `steal()` from v0.7 to ensure only one version of `PERIPHERALS` (from either 0.6 or 0.7) can exist at once. * As in v0.5.10, we transmute a unit tuple into `PERIPHERALS` as we can no longer construct many of its types. * I've removed the old Travis config and copied the GHA CI/clippy runs back into this branch so hopefully they run (and pass!) here. Types that are *not* exported from 0.7: * ITM, MPU, NVIC, SCB all have breaking changes, though some smaller types within those modules are re-exported. * in `register`, we keep `basepri`, `basepri_max`, `lr`, `pc`, `apsr` only for the targets which 0.7 no longer exports them for. I've tested that using this version builds on several projects that currently use 0.6.4, including using RTIC, various STM32 PACs, etc, and including changing those projects to use c-m 0.7 at the top level but continue to depend on other crates (PACs, RTIC, etc) that use 0.6.4. They all build. Nevertheless I'd definitely appreciate more testing on this. We could even do a prerelease on crates.io? Co-authored-by: Adam Greig <[email protected]>
Timed out. |
Right, I backported the GHA scripts but didn't update bors to require those instead of Travis (which was removed). Hopefully bors will like this... bors retry |
Build succeeded: |
Ok, this is published as 0.6.5-alpha, and I've managed to test it. Annoyingly, crates (such as the stm32f4 PAC) that support "cortex-m >=0.5.8, <0.7" would normally use 0.6.4 and would soon use 0.6.5, but when my top-level crate specifies 0.6.5-alpha which uses 0.7.0 which has As far as I can tell, once 0.6.5 is released properly, this should all Just Work (Cargo will choose 0.6.5 for stm32f4 when resolving ">=0.5.8,<0.7") but so far I've only been able to test it by patching my dependencies to also specify 0.6.5-alpha directly. Any other testing appreciated, I'll open PRs soon to do 0.6.5 actual release and to back-port the CHANGELOG changes to master. |
315: Use volatile read for ICSR register r=adamgreig a=lulf This prevents the compiler from optimizing the read. Edit: I also added a change to include the 9th bit in the IRQ. I can leave that out if it would break anything. #314 Co-authored-by: Ulf Lilleengen <[email protected]>
This PR creates a new v0.6.5 on the v0.6.x branch, which depends on v0.7 and re-exports many of its types.
Notable changes:
links
field is removed from Cargo.toml to permit linking to v0.7 series#[no_mangle] CORE_PERIPHERALS
static is removed to permit linking to v0.7 seriesTAKEN
static is removed: sadly we can't access the 0.7 static because it's not pub, so instead this version callstake()
andsteal()
from v0.7 to ensure only one version ofPERIPHERALS
(from either 0.6 or 0.7) can exist at once.PERIPHERALS
as we can no longer construct many of its types.Types that are not exported from 0.7:
register
, we keepbasepri
,basepri_max
,lr
,pc
,apsr
only for the targets which 0.7 no longer exports them for.I've tested that using this version builds on several projects that currently use 0.6.4, including using RTIC, various STM32 PACs, etc, and including changing those projects to use c-m 0.7 at the top level but continue to depend on other crates (PACs, RTIC, etc) that use 0.6.4. They all build. Nevertheless I'd definitely appreciate more testing on this. We could even do a prerelease on crates.io?