Switch to built-in targets #400
matteocarnelos
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm wondering why this HAL still relies on custom targets for the AVR devices instead of using the compiler's built-in ones.
The problem with custom targets is that a lot of tools don't support them.
In particular, the following are some tools that I'm using that don't support them:
cargo-binutils
'objdump
command throws the error:Could not find specification for target "avr-atmega328p"
cargo-call-stack
throws the error:error: couldn't open ELF file 'avr-hal/target/../../avr-specs/avr-atmega328p.json/release/uno-blink': No such file or directory (os error 2)
As of now, it's possible to use the built-in
avr-unknown-gnu-atmega328
target, together with thedefault-linker-libraries
flag, to successfully runavr-hal
applications on ATmega328-based boards (e.g. Arduino Uno), without all the errors listed above.So the question is: why don't we add all the targets in the
avr-specs
directory to the compiler and use them?This would not only solve all the issues above, but it would also make the development of
avr-hal
applications more seamless.By doing a quick search into the Rust repo, I was only able to find this comment, saying that, as of July 2020:
But I couldn't find any reason for this decision.
Beta Was this translation helpful? Give feedback.
All reactions