-
Notifications
You must be signed in to change notification settings - Fork 35
Compile errors platforms without critical-section
support (was: Support Arduino?)
#31
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
Comments
Note: I'm compiling against the |
Hi, before diving into the actual issue here, just a quick question:
I am curious what template you're referring to here? The template I know of is https://github.com/Rahix/avr-hal-template which specifies nightly Okay, now regarding the real problem: The compiler error you are encountering is an unfortunate side-effect of the usage of the There are three solutions to this:
I am personally favoring version 3 as it will prevent any headaches with other architectures in the future... That said, there is a 4th solution just for you if you need it working quickly: If you pin your dependency to an older version with [dependencies]
shared-bus = "=0.2.2" it should hopefully also just work for the time being... |
Wow, thanks for the detailed response! I've played about with I agree with the preference for 1 or 3 - as regards 2, what is the current stability of AVR in |
If you are still curious, you can take a look at the relevant code in
Hard to tell for me as well... The The biggest issue is probably rust-lang/compiler-builtins#400 which is still being worked on in LLVM: https://reviews.llvm.org/D114611 Everyone is waiting on that to land as this is what is preventing newer nightly compilers from working... With the
There might be more which I have forgotten about... Bottom line is this, I guess: If you need things to work, are on a schedule, and/or your application is rather complex, AVR microcontrollers are not the best choice with Rust right now. For just playing around with an Arduino a bit it is fine, but I wouldn't attempt any large and complex projects with it yet... |
Again, thanks for the detailed reply. It's a shame about the compatibility issues; I guess I'll just have to keep an eye on it. |
critical-section
support (was: Support Arduino?)
It turns out the `AtomicCheckMutex` which was the reason for adding `atomic-polyfill` is currently gated behing the `cortex-m` feature. Thus we can gate the dependency behind this feature-flag to resolve issues on other platforms in the meantime. In the long run, `AtomicCheckMutex` should get its own feature-flag but for now this is the easiest solution and a non-breaking change. Ref: #31, #33
With release 0.2.4 this should at least be fixed to the point where |
I'm using
arduino-hal
andshared-bus
to manage two devices on the same i2c bus. Is this supported? Am I doing something wrong? When compiling I get:The text was updated successfully, but these errors were encountered: