Skip to content

AVR: runtime font/table lookups fail (works with inline for / compile-time unroll) #679

@jlucaso1

Description

@jlucaso1

Platform: AVR atmega328p
Zig version: 0.15.1
Microzig version / commit: 039d2da (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 lpm vs ld usage or pointer/addressing mismatch)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions