You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nuttx_ws/nuttx [master●] » make -j
error[E0463]: can't find crate for `core` | = note: the `armv7a-none-eabihf` target may not be installed = help: consider downloading the target with `rustup target add armv7a-none-eabihf`error: aborting due to 1 previous errorFor more information about this error, try `rustc --explain E0463`.make[2]: *** [/home/ludovic/Code/nuttx_ws/apps/Application.mk:330: leds_rust_main.rs.home.ludovic.Code.nuttx_ws.apps.examples.leds_rust.o] Error 1make[1]: *** [Makefile:52: /home/ludovic/Code/nuttx_ws/apps/examples/leds_rust_all] Error 2make: *** [tools/LibTargets.mk:248: /home/ludovic/Code/nuttx_ws/apps/libapps.a] Error 2make: *** Waiting for unfinished jobs....nuttx_ws/nuttx [master●] »
And when I try to download the target here's the message I get:
nuttx_ws/nuttx [master●] » rustup target add armv7a-none-eabihf
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not support target 'armv7a-none-eabihf'; did you mean 'armv7r-none-eabihf'?
note: you can see a list of supported targets with `rustc --print=target-list`
note: if you are adding support for a new target to rustc itself, see https://rustc-dev-guide.rust-lang.org/building/new-target.html
Activity
lvanasse commentedon Nov 10, 2024
I've asked on the Discord server and as always @lupyuen was very useful and giving me ideas to test :), here's the transcript of his response:
lvanasse commentedon Nov 10, 2024
Here's the
make -j -traceoutput:https://gist.github.com/lvanasse/f62e9fa59f8382dd9881178fc1904211
lvanasse commentedon Nov 10, 2024
When trying for the
qemu-armv7a:nshAnd when I try to download the target here's the message I get:
I also did try with nightly but same result.
lupyuen commentedon Nov 10, 2024
@lvanasse I was able to reproduce the problem with Docker: https://gist.github.com/nuttxpr/a881eea7923c9471d026ac2bfcbdac82
It seems the problem is caused by the incompatibility between Rust Compiler and GCC Linker used by NuttX:
So it seems we have to wait for NuttX support to become official in Rust:
lvanasse commentedon Nov 10, 2024
You're awesome @lupyuen ! I'm a bit ashamed I was not to be able to figure this out on my own, thank you very much for helping and teaching me :).
Is there a way I could be useful in the process of making this possible to use on ARM? Could @no1wudi use some help?
Maybe we could do our own call in the Rust code for the
__aeabi_memclrcall? Like they do in the Rust for STM32 article?lupyuen commentedon Nov 10, 2024
@lvanasse No worries :-) Yep we could code it ourselves. Actually it could have been simpler if we used Rust Libraries (Crates), but NuttX doesn't support them sigh: https://lupyuen.github.io/articles/rust6#no-crates-in-nuttx
The best we can do right now: Put the code into a Rust Source File (like nuttx.rs) and share it across our Rust Projects. Like this: https://github.com/apache/nuttx-apps/blob/master/examples/leds_rust/nuttx.rs
lvanasse commentedon Nov 10, 2024
Awesome! Thank you for the guidance, I'll try to give it a go when I have the energy/time for it :).