Repository navigation
Conversation
Contributor
|
Did you try enabling compiler_rt? |
Contributor
Author
|
Yes. With .bundle_compiler_rt = true on the ATmega328P, compiler_rt itself fails to build with Zig 0.17.0 (address space 'flash' cannot cast into address space 'generic', ziglang/zig#37090, still open), which is why the AVR ports turn it off. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ClockDevice.sleep_mscomputedtime_ms * 1000inu32, which overflows from 4,294,968 ms (about 71.6 minutes): a panic in Debug/ReleaseSafe and illegal behavior in ReleaseFast/ReleaseSmall. This converts inu64instead, still with a singlesleep_uscall.The conversion uses shifts (
1000 = 1024 - 16 - 8) rather than a multiply: on AVR, which doesn't link compiler_rt, a runtimeu32multiply needs__mulsi3and au64one__muldi3, sosleep_mswith a runtime argument (e.g.TLV493D) didn't link there. Checked with Zig 0.17.0, ReleaseSmall, on the ATmega328P: the shift version links and has no multiply calls.Adds a test for 0, 1, the last value that fit, the first that overflowed, and
maxInt(u32); it fails on the current code withinteger overflow.