Skip to content

Code gated on defined(AMYBOARD) is silently excluded from AMYBOARD_ARDUINO builds #841

Description

@bwhitman

Thanks to @DVA-4 for spotting this while building the Eltro MK3 on AMYboard. Source write-up: AMYBOARD_PROGRAMMING_GUIDE.md §1.

The Arduino board target defines AMYBOARD_ARDUINO only — not AMYBOARD. Most of the tree guards with both, but several places gate on defined(TULIP) || defined(AMYBOARD) alone, so those paths silently vanish from Arduino builds:

  • src/amy_midi.c lines ~5, ~215, ~262, ~661
  • src/amy_midi.h line ~37
  • src/parse.c lines ~7, ~315

Meanwhile e.g. src/api.c:54, src/i2s.c:67, and src/amy_midi.c:420 correctly check both. From a user's perspective this is a trap: code that "should be there" isn't compiled in, and nothing tells you.

Suggested fix: collapse to one truth — e.g. have amy.h define AMYBOARD whenever AMYBOARD_ARDUINO is defined (or introduce a single umbrella macro like AMY_IS_AMYBOARD), then audit every defined(AMYBOARD) site. A grep-able convention would prevent recurrence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions