Skip to content

Conversation

sirhcel
Copy link
Member

@sirhcel sirhcel commented Jun 21, 2021

This is an alternate version of #267 which fixes the panic by bumping dependencies. It also addresses the previously unsafe access to the USARTs transmit and receive data registers (TDR and RDR, stm32-rs/stm32-rs#558) by bumping the BSP to the brand spanking new release 0.7.0 which comes with a fixed PAC and HAL. Thank you very much @adamgreig, @Sh3Rm4n, and @rubberduck203 for your patience and support along this journey!

This PR also bumps non-critical dependencies to their actual releases. For example heapless, which makes use of const generics nowadays.

I did not succeed in getting mdbook test to actually check the example code. I moved it over to the examples directory and included it in the Markdown files so that it can be checked with cargo build --target thumbv7em-none-eabihf --examples.

sirhcel added 11 commits June 21, 2021 22:38
This issue got fixed with stm32f3 0.13.1 and writing to TDR is safe
again. This prepares updating the dependencies to actually use this
release.
MonoTimer is used by 11-usart's aux11 module and the buffer-overrun
solution. It got deprecated after stm32f3xx-hal release 0.6.1. This is a
copy of
https://github.com/stm32-rs/stm32f3xx-hal/blob/c68c36c03e0e33699b3b0c9acc3f8d80f5a25cd4/src/time.rs#L91
minus the time units which can be used from embedded-time.
When running 'mdbook test' on the book the example code checking fails
to handle for example macros like '#[entry]' and the local auxiliary
crates. Having most code examples included from 'examples/' allows to
check them at least with 'cargo build --target thumbv7em-none-eabihf
--examples'.
Updating stm32f3xx-hal makes accessing these registers safe as it should
be.
@sirhcel sirhcel requested a review from a team as a code owner June 21, 2021 22:26
@rust-highfive
Copy link

r? @adamgreig

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources labels Jun 21, 2021
@adamgreig
Copy link
Member

Amazing, thank you for pushing this through all the various crates!

I'll add CI testing of the examples in a separate PR.

bors merge

@bors
Copy link
Contributor

bors bot commented Jun 21, 2021

👎 Rejected by too few approved reviews

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@bors bors bot merged commit 2b73ce6 into rust-embedded:master Jun 21, 2021
@adamgreig adamgreig mentioned this pull request Jun 22, 2021
@sirhcel sirhcel deleted the fix-stm32f3-tdr branch June 22, 2021 09:52
@sirhcel
Copy link
Member Author

sirhcel commented Jun 22, 2021

Amazing, thank you for pushing this through all the various crates!

It was a pleasure and a very interesting journey. :)

I'll add CI testing of the examples in a separate PR.

Awesome! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants