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
Implement compiler_rt for AVR #42
Comments
gcc reference code: |
Still failing on zig 0.11.0, but with another error apparently:
|
@oliverpool That is a bug in the LLVM 16, updating to LLVM 17 should solve that, Zig has llvm17 branch if someone wants to check. |
@kanashimia good to know, thank you! According to https://llvm.org/ version 17.0.0-final should be released next week (rc4 was published last week) ⌛ |
Just documenting my failures until now, maybe someone can make sense of it I am trying to build the following program for Aduino Uno using https://github.com/ZigEmbeddedGroup/microchip-atmega const micro = @import("microzig");
pub fn main() void {
const led = micro.core.experimental.gpio.Gpio(micro.core.experimental.Pin("PB5"), .{
.mode = .output,
.initial_state = .low,
});
led.init();
while (true) {
busyloop();
led.toggle();
}
}
fn busyloop() void {
const limit = 100_000;
var i: u24 = 0;
while (i < limit) : (i += 1) {
@import("std").mem.doNotOptimizeAway(i);
}
} I have compiled the
Let's run
I worked around by removing Next error:
I replaced Cc @MasterQ32 : it seems that #103 changed some names. Shall I make a PR against microchip-atmega to attempt fixing some of them? Next error:
I replaced Next error:
I have no idea what to tweak to get past this error... So I will leave it there for now 😄 |
Seems to be fixable with 0.12.0-dev, according to FireFox317/avr-arduino-zig#8 |
This work requires upstreaming to https://github.com/ziglang/zig
As a repro compile this program with the following build command:
and you'll see the following output:
note: doing this in a basic program that is being built by the microzig build function, it does not bundle compiler_rt, so you'll see a missing definition:
The text was updated successfully, but these errors were encountered: