Skip to content
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

update toolchain to 2025-02-22 #634

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

tones111
Copy link
Contributor

This change bumps the toolchain to a recent nightly that incorporates LLVM codegen improvements and avr-none target.

Much thanks to @Patryk27 for all your hard work

closes #537

@tones111 tones111 force-pushed the toolchain branch 5 times, most recently from 1a0f125 to d4538ec Compare February 23, 2025 00:10
@tones111
Copy link
Contributor Author

I'd like to phone a friend (@Patryk27)

When I build locally I get an error like
/usr/bin/avr-ld: avr architecture of input file `/tmp/rustcyPlIoS/symbols.o' is incompatible with avr:51 output
which led me here and suggests a -mavr51 flag needs to be passed to the linker.

I'm not sure where symbols.o comes from. Maybe we need to (somehow) pass extra flags when building the core library?

It appears the avr-gcc on the CI system doesn't understand that flag

my versions

$ avr-gcc --version
avr-gcc (GCC) 14.2.0
$ avr-ld --version
GNU ld (GNU Binutils) 2.43

@Patryk27
Copy link
Contributor

[...] suggests a -mavr51 flag needs to be passed to the linker.

Yes, this is supposed to be done automatically by rustc:

https://github.com/rust-lang/rust/blob/bb2cc59a2172d6e35c89b409a4e6b5058d9039d7/compiler/rustc_codegen_ssa/src/back/linker.rs#L580

I'll take a look later at what's going on here!

- name: Test-compile HAL crate for an MCU
if: "${{ matrix.m.type == 'mcu' }}"
run: cd "mcu/${{ matrix.m.crate }}" && cargo build --features "${{ matrix.m.name }}" -Z build-std=core --target "../../avr-specs/avr-${{ matrix.m.spec }}.json"
run: cd "mcu/${{ matrix.m.crate }}" && cargo build --release --features "${{ matrix.m.name }}" -Z build-std=core
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we have something like --target=avr-none -C target-cpu={{matrix.something}} in here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo build - error[E0658] - proc_macro::Literal::byte_character(byte)
2 participants