An attempt at mostly complete avr support#947
Conversation
|
@mattnite Let me know if this is a good direction! Built on your work. |
|
Eek! I did not check the linting configuration. One second |
| if (limit <= 0) @compileError("limit must be non-negative!"); | ||
|
|
||
| comptime var bits = 0; | ||
| inline while ((1 << bits) <= limit) { |
There was a problem hiding this comment.
won't this put 20'000 increment instructions rather than a loop?
|
@philocalyst I am back on MicroZig. I will get to reviewing this once we're on 0.16 because it has fixes for AVR in compiler_rt. Thank you for the patience! |
|
No problem! Thanks for your future review!
▰▰▰▰▰
Miles Wirth 🙃
… From: Matt Knight ***@***.***>
Sent: 18 May 2026 09:21
To: ZigEmbeddedGroup/microzig ***@***.***>
Cc: Miles Wirht ***@***.***>, Mention ***@***.***>
Subject: Re: [ZigEmbeddedGroup/microzig] An attempt at mostly complete avr support (PR #947)
mattnite left a comment (ZigEmbeddedGroup/microzig#947)
@philocalyst I am back on MicroZig. I will get to reviewing this once we're on 0.16 because it has fixes for AVR in compiler_rt.
Thank you for the patience!
--
Reply to this email directly or view it on GitHub:
#947 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
|
@mattnite Is the migration complete? I can resolve the conflicts... |
|
@philocalyst it's stabilizing, I'm on 0.17/master, but now there are LLVM miscompilations :/ |
|
Oh brother :( |
|
Hey @philocalyst I'm letting you know that I see there's an issuewith the zig import check. It's very late for me now, but I'll check it out tomorrow. |
mattnite
left a comment
There was a problem hiding this comment.
Please revert all your changes outside the port, examples, and build.zig change. That should get rid of a lot of the CI failures. We seem to have a linter check that is failing because it's pulling the wrong Zig version in.
Even if CI fails once you're done that, don't sweat it, it will likely be in a good position for merging.
Also, I think I fould the root cause for AVR not compiling on latest Zig and I'll be working with the compiler team to fix it. It's quite minor!
|
|
||
| const ext = std.fs.path.extension(entry.basename); | ||
| const action: FileAction = inline for (@typeInfo(@TypeOf(extension_to_action)).@"struct".field_names) |field_name| { | ||
| const action: FileAction = inline for (@typeInfo(@TypeOf(extension_to_action)).@"struct".fields) |field| { |
There was a problem hiding this comment.
Please revert this change, it is using the old API
| b.installArtifact(exe); | ||
|
|
||
| const run_cmd = b.addRunArtifact(exe); | ||
| run_cmd.addPassthruArgs(); |
|
|
||
| const run_cmd = b.addRunArtifact(aviron_exe); | ||
| run_cmd.step.dependOn(b.getInstallStep()); | ||
| run_cmd.addPassthruArgs(); |
|
Okay, going through and fixing now. How does you feel pub const porta_dir = 0x0400;
pub const porta_out = 0x0404;as pub const porta = struct {
pub const dir = 0x0400;
pub const out = 0x0404;
};I find it pleasant because you can handle the qualification, but not pressing |
No description provided.