-
Notifications
You must be signed in to change notification settings - Fork 61
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
failed to resolve: use of undeclared crate or module microbit
#110
Comments
Have you tried running |
@curt-wise does the thumbs-up mean that it worked for you? If so I think we should close this issue 🙂 |
Yes i know that the docs state that. But i want to make it work using only: Any idea how i might do that ? |
@curt-wise you can read up on cargo features but as I understand it you would have to create your own version of the crate with all conditional compilation for "v2" removed. This would then break compilation for v1. I am not sure if it is possible to enable a default set of features for cargo otherwise. However, see here on how to set a default target. |
I wanted to create my own project from scratch but could not do that. Like doing |
possibly have to remove the optional: remove from Cargo.toml: try to compile. if compilation doesn't work, check errors, may have to add this to your .cargo/config if you get linker errors: [target.'cfg(all(target_arch = "arm", target_os = "none"))'] should be able to create a new project with cargo new and flash with cargo embed --target thumbv7em-none-eabihf |
I have a micro:bit v2.21 and using Linux Kubuntu, i created a new rust project using cargo and modified the files like this:
Cargo.toml
main.rs
When i run
cargo embed --target thumbv7em-none-eabihf
, i get that error:The text was updated successfully, but these errors were encountered: