ckormanyos/avr-gcc-build provides shell and YAML scripts to build a modern avr-gcc.
Design goals:
- Use shell and YAML scripts to build modern
avr-gccon-the-fly. - Build
avr-gccfrom up-to-date gcc-releases. - Provide a non-trivial test of the newly-built toolchain(s) based on a real-world project.
- Publish the build artifacts directly from the GHA Workflow-Run(s). But this is not yet implemented.
- Occasionally create and publish versioned releases.
Using released or CI-built artifacts can be convenient when you
do not actually want to nor need to manually build the
avr-gcc toolchain.
Releases and build artifacts consisting of the
fully-built avr-gcc toolchain are occasionally created
and published for x86_64-linux-gnu (Linux) and
x86_64-w64-mingw32 (Windows). These can be readily found
on the repo front page and in CI workflow-run download-areas
for immediate client use. The releases are permanent, whereby
the built artifacts are limited to three days after the
Workflow-Run(s).
Workflow:
- Use the shell script avr-gcc-100.sh consistently in each of the Workflow-Run(s).
- The Workflow-Run build-ubuntu.yml builds
avr-gccfor the hostx86_64-linux-gnu. The script is executed on a GHAubuntu-latestrunner. - The Workflow-Run build-msys64.yml builds
avr-gccfor the hostx86_64-w64-mingw32. The script is executed on a GHAwindows-latestrunner usingmsys64. - When building for
x86_64-w64-mingw32onmsys64, use a pre-built, dependency-free, statically linkedmingwand host-compiler (see notes below). This separatemingwpackage is unpacked in a directory parallel to the runner workspace and itsbindirectory is added to thePATHvariable. - GCC prerequisites including GMP, MPFR, MPC, etc. are built on-the-fly in the Workflow-Run.
- Build
binutilsand partially verify the build artifacts. - Then build
avr-gccand partially verify the build artifacts. - Get the main branch of
avr-libcfromavrdudes/avr-libcand build it with its--prefixmatching that of the above-mentionedavr-gcc-build. - Test the complete, newly built
avr-gcctoolchain with a non-trivial compiler test. In the compiler test, we buildref_app(the reference application) fromckormanyos/real-time-cpp. Verify the creation of key build results fromref_appincluding ELF-file, HEX-file, map files, etc.
Notes:
- This project is distributed under The Unlicense.
- This work has been inspired by (the similar) project
ZakKemble/avr-gcc-build. - The pre-built, dependency-free, statically linked
mingwand host-compiler system originate from Steven T. Lavavej'sMinGW Distro.