-
Notifications
You must be signed in to change notification settings - Fork 14
Look into finding a way to not require target specification files #70
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'm not sure that I fully agree with that, as I'm pretty sure mine are different from what most other people use (as I avoid the AVR-GCC standard lib). That being said, it certainly makes sense to have some easier way to deal with this. |
rust-arduino-blink-led-no-core-with-cargo/blink/arduino.json Interesting, that makes sense. |
For what it's worth, I also use a custom target file in The reasons for that are:
The first should be done for all projects unconditionally until the linked issue is fixed. But I don't know how to do the second correctly. Is there a way to tell Cargo to compile and link in a C source? There must be a solution for this for FFI-using packages, I'd hope. Alternatively, I could replace those C sources with Rust if we had a way of explicitly marking something (a global |
Yes. In a build script, you can invoke GCC, generate an object file, and then print a formatted string (something like The gcc crate will do this all for you though, which makes it easy.
Do you mean marking something as living in program memory? If so, we should be able to add a new attribute pretty easily I think. I can't think of any more idiomatic ways of doing it without drastically changing the syntax. |
Currently, all binaries that use avr-rust need to create a target specification file to instruction Rust to compile for a specific microcontroller.
The specification itself is always identical across devices, with the only difference being the CPU name. This means that if you want to support microcontroller in your executable, you need to create a target specifcation for it.
It might be easier for everyone if there is another method like a command line argument for it. I am not sure of any solutions yet, it needs some investigation.
The text was updated successfully, but these errors were encountered: