Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compiler support for AVR architecture (Arduino) #14393

Merged

Commits on Apr 21, 2024

  1. Experimental support for AVR architectures (Arduino)

    Add support for the `avr-unknown-unknown` target to the compiler, which
    enables the LLVM AVR target when available (should be compiled in by
    default).
    
    Implement the ABI, following the AVR GCC call convention, hence extern C
    libraries must be compiled with AVR GCC (clang is buggy when passing of
    returning some structs).
    
    The ABI is experimental, and only basic calls have been verified against
    the same calls made by AVR GCC so far. Both regular and "reduced tiny"
    cores (with less registers) are supported.
    ysbaddaden committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    1eeaddf View commit details
    Browse the repository at this point in the history
  2. AVR: declare CPU as compiler flag

    This allows to know actual support for some features, for example which
    pins are available.
    ysbaddaden committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    249d1a8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8d1b6d3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f5720d7 View commit details
    Browse the repository at this point in the history
  5. Add Program#alignment_byte_width

    Don't hardcode the alignment to 4 or 8 when the actual value depends on
    the actual target (e.g. it's always 1 for AVR targets).
    ysbaddaden committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    2ed514a View commit details
    Browse the repository at this point in the history
  6. Revert "Add Program#alignment_byte_width"

    This reverts commit f1b5feb.
    ysbaddaden committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    295bd57 View commit details
    Browse the repository at this point in the history
  7. AVR: improve build integration

    - Automatically link the executable program;
    - Set file extension to ".elf" instead of none;
    - Require CPU model (--mcpu) that impacts the ABI, codegen & linker
    ysbaddaden committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    56f453b View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Configuration menu
    Copy the full SHA
    1a69b7b View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. mcpu.in?(AVRTINY)

    Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
    ysbaddaden and Sija authored Apr 30, 2024
    Configuration menu
    Copy the full SHA
    9a8f8fb View commit details
    Browse the repository at this point in the history