Open stappersg opened 3 months ago
BTW, I'm still a bit newbie when it comes to rust-avr, but I found that core will build debug mode if you add to Cargo.toml
:
[profile.dev]
opt-level = 1
Reviewing https://github.com/rust-lang/rust/issues/126349 it seems like we might have a few ways to go here, maybe from easiest to hardest:
rustc
guts so raise opt-level 0 to 1 in all cases ?I'm happy to pitch in here but I would probably need a bit of guidance on which approach to take...
Slightly off-topic for this issue, but @adicarlo, you should be setting even more compiler tunes to get AVR programs to build properly:
https://github.com/Rahix/avr-hal/blob/65b304ec974a13f27ebc2ced21aa462c4b81ce82/Cargo.toml#L1-L11
@Rahix i see that, from over at https://github.com/Rahix/avr-hal-template/blob/main/Cargo.toml#L55
You say "needed to build" but I'm able to build without all that -- I assume you're saying it wouldn't work (or work well) on actual hardware w/o those settings from the template?
On Thu, Aug 15, 2024 at 04:08:14PM -0700, Adam Di Carlo wrote:
you're saying it wouldn't work (or work well) on actual hardware
Yes.
Experiment for those who don't want to get their feet wet on true hardware:
I suspect this is the same register allocation bug: https://github.com/llvm/llvm-project/issues/104032
@aykevl that's very promising! You boiled out a simple/general test case. Looks like its getting some action too...
This issue is for creating awareness for https://github.com/rust-lang/rust/issues/126349
avr-unknown-gnu-atmega328 (ran out of registers during register allocation)
That rust lang request got my attention, but have no resources available for any follow-up. Hence this issue.
I hope some one accepts the challenge.
Any way: Happy Hacking