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
embedded-hal-bus no longer builds with target thumbv6m-none-eabi #598
Comments
I guess the most straight forward solution to fix this regression would be to add a feature-flag for Another solution would be to allow using |
Also, maybe a lesson learned from this regression could be that we need to set up CI infrastructure in |
I have stumbled upon this issue right now. Is there any workaround for the time being? |
Because AtomicDevice uses the portable-atomic crate, you can enable support for CAS on targets that don't normally have it with either the critical-section or unsafe-assume-single-core features: https://crates.io/crates/portable-atomic#optional-features-critical-section Having to add an explicit dependency on portable-atomic and enable the feature just to get this crate to build isn't great, but it should work as a workaround now. |
We discussed this in today's meeting and the plan is:
|
Added
embedded-hal-bus = "0.2.0"
to my project and it failed to build.Using target
thumbv7m-none-eabi
works, using targetthumbv6m-none-eabi
fails. Version 0.1.0 works.Trying to build the latest
master
branch:Seems to be caused by #593
embedded-hal/embedded-hal-bus/src/spi/atomic.rs
Lines 125 to 133 in a0ccb65
embedded-hal/embedded-hal-bus/src/i2c/atomic.rs
Lines 120 to 128 in a0ccb65
ARMv6-M does not have atomic CAS, so
portable_atomic
does not implementAtomicBool::compare_exchange
on this target.The text was updated successfully, but these errors were encountered: