-
Notifications
You must be signed in to change notification settings - Fork 99
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
Cargo doesn't work out of the box for Cortex-M micros #9
Comments
Update: The target definitions have landed upstream in rust-lang/rust#36874. |
This upstream change is excellent. I'll go and delete the custom targets from primer immediately. Is it possible to set a default target for a crate? If we have a one-board-per-crate model then specifying the crate seems redundant. |
Not using a crate, no. You can use .cargo/config but that's "local" to the current project and doesn't get passed up to the top crate if set in one of the dependencies. This "feature" has been mentioned before in the issue tracker before though (can't find the comment right now). |
In the short term I hope to make binary releases of the core, compiler-builtins, etc. crates for the thumb targets available and installable via rustup; that should let us drop the dependency on Xargo for those targets. |
One blocker to do this is landing the compiler-builtins crate into rust-lang/rust as we require a libcompiler_builtins crate that contains weak memcpy et al symbols in the sysroot to make all this work. |
I believe now that some embedded targets have landed, we can close this issue. Marking this for a cleanup sweep. If we would like this to stay open, please provide an update to what this issue should be focused on. |
I am closing this issue, please feel free to open another issue if you would like this discussed further. |
The Rust compiler supports the Cortex-M architecture but this doesn't work out of the box:
for two reasons:
thumbv6m-none-eabi
is not a "built-in" target so you have to supply your own target definition.cargo build
doesn't compile the standard crates and there's no binary release of the standardcrates for this target.
The upstream solution is to either:
for them. Or,
This is being worked on. Seems like the Rust team is leaning towards the second solution. You can
track the upstream status in:
core
rust-lang/rfcs#1645 Add the thumb targetsThe text was updated successfully, but these errors were encountered: