microzig
microzig copied to clipboard
AVR: runtime font/table lookups fail (works with inline for / compile-time unroll)
Platform: AVR atmega328p
Zig version: 0.15.1
Microzig version / commit: 039d2da63bf507c42a669e2233c52afa89ab1dcb (current main)
Repo: https://github.com/jlucaso1/zig-duino/blob/eu-te-amo/src/firmware.zig#L60
Observed: Building with inline for produces a larger hex (e.g. 2304 bytes) and the firmware drives the LEDs correctly. The runtime-loop variant produces a smaller hex (e.g. 965 bytes) and LEDs remain off. Copy-to-RAM workaround did not fix it.
Notes / suspected root cause:
- Likely interaction between microzig data placement / AVR program-memory access and generated loads (possible wrong
lpmvsldusage or pointer/addressing mismatch)