Closed misterzirillo closed 2 years ago
Hm, the error is unclear to me. It stems from this line in the riscv
build-script:
https://github.com/rust-embedded/riscv/blob/498924d063b25f46c69d2888743a2f720528c927/build.rs#L22
This does not seem to be related to shared-bus
at first glance?
Btw, you do not need any special support for single-threaded bus-sharing. This means can use shared-bus
just fine without activating any special features as long as you do not need to access the bus from multiple threads/tasks/execution contexts.
I can't see how it relates either. When I add shared-bus
to my dependencies I get the error, even when no features are enabled. When removed the build succeeds. Something about this crate doesn't agree with that script or vice-versa.
Perhaps this issue belongs in the rust-embedded
repo instead? Feel free to close and I'll bring it over there.
Yeah, I'd ask over in rust-embedded/riscv, maybe someone over there has an idea... Are you sure it works without shared-bus
? I'm really confused how the addition of a crate would make a file in another crate vanish. Maybe try adding the dependencies of shared-bus instead, to see if any of them are to blame? I.e.
embedded-hal = "0.2.3"
nb = "0.1.3"
atomic-polyfill = "0.1.6"
It seems the problem is with atomic-polyfill. Adding it rather than shared-bus results in the same error. Bumping to newer versions doesn't solve it.
Okay, that makes a bit more sense I guess... So maybe try asking over there if they have any idea. In the meantime: We plan to make atomic-polyfill
optional in shared-bus
anyway (#31) which would then mean you can at least use the crate in some way.
I pushed commit e8731935fdbf ("For now, only pull in atomic-polyfill
for cortex-m
feature") which should help in your case. I will publish a new release shortly.
Thanks for the update. I'm confident that should do it, at least it did in my fork.
Hello!
I've recently taken a dive into the embedded rust world and have run across a problem. I have cloned this repo https://github.com/ivmarkov/rust-esp32-std-demo and gotten it running on my ESP32-C3-M1 using
nightly
. However, when I add this dependency I get a compilation error.I realize this library doesn't support riscv yet, however I thought since
std
is available that it would work anyway.Is this possible with a config change? My rust knowledge is very limited at this point.