Skip to content

Request a compile flag for board family #2976

Closed

Description

@pmunts

I am trying to write test programs that are as portable as possible across hardware platforms. It would be really helpful to add a compile flag for the board name (which is really a board family), like -DARDUINO_NUCLEO_32.

As a concrete example, Nucleo-32 boards do not have a user button, Nucleo-64 boards have an active low user button, and Nucleo-144 boards have an active high user button. I have no way to figure out which family e.g. NUCLEO_F767ZI is in.

Activity

  1. added
    enhancement
    on May 22, 2026
  2. fpistm commented on May 22, 2026

    @fpistm
    Member

    Hi @pmunts
    Feel free to provide a PR.

  3. changed the title [-]Request a compile flag for board name[/-] [+]Request a compile flag for board family[/+] on May 22, 2026
  4. added this to the 3.0.0 milestone on May 22, 2026
  5. fpistm commented on May 22, 2026

    @fpistm
    Member

    Hi @pmunts

    I've made a PR, let me know if it is OK for you?

  6. pmunts commented on May 23, 2026

    @pmunts
    Author

    Looks great. I downloaded boards.txt and platform.txt and tried it out for Nucleo_32, Nucleo_64, and Nucleo_144.

  7. added a commit that references this issue on May 25, 2026
    27aac38
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

    enhancement

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions