-
Notifications
You must be signed in to change notification settings - Fork 18
Demonstrate how to get the target JSON file #10
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
I came here to file this same bug. https://book.avr-rust.com/003-building-a-crate-for-avr.html#compiling-a-crate says
But I couldn’t find how to make or obtain such a file. The shepmaster shows how to generate a file, but what customizations are typically needed? |
I can't directly answer your question, but I can point at two real-world examples: |
Note: Make sure to document the |
More information on this subject can be found in the Embedonomicon chapter on custom targets, which in turn points to the docs on the two It's also worth looking through the target spec JSON files for chips supported by Rahix/avr-hal: https://github.com/Rahix/avr-hal/tree/c9a724f7367772b4d836b0f49ec1237911254b2b/chips |
Thanks to @couchand for the link in #10 (comment)
Once rust-lang/rust#74941 lands the preferred way to do this will be |
Regarding the replacement of I want to make a clearer distinction that this target is for the "GNU pathway". I can imagine that some downstream users might not AVR GCC for linking at all - for example, when the build target is a static library for use via FFI in C code which does not need to be linked for distribution. There has been some work on AVR support in the LLD linker and compiler-rt, at some point in the future it should be possible to use the compiler without the GNU tools. Note: the |
…ook.avr-rust.com](avr-rust/book.avr-rust.com#10); rustup override set nightly; rustc --print target-spec-json -Z unstable-options --target avr-unknown-gnu-atmega328p > my-custom-avr-unknown-gnu-atmega328.json
e.g.
The text was updated successfully, but these errors were encountered: