# AVR-Simulator-Toolchain: Where the Source Is

The AVR Simulator (carpentersoftware.com, Tools) compiles sketches in
the browser with GCC and GNU binutils built to WebAssembly. These tools
are licensed under the GNU General Public License version 3 (COPYING).
Their Corresponding Source is this repository at the release tag the
site names on its source page (for example v1.0.0), together with that
release's file avr-toolchain-<version>-source.tar, which holds:

| Part | Version | License | Where it comes from |
|---|---|---|---|
| GCC (cc1plus) | 7.3.0 | GPL v3; libgcc with the GCC Runtime Library Exception (COPYING.RUNTIME) | ftp.gnu.org/gnu/gcc |
| GNU binutils (as, ld, objcopy) | 2.42 | GPL v3 | ftp.gnu.org/gnu/binutils |
| GMP, MPFR, MPC (linked into cc1plus) | 6.1.0, 3.1.4, 1.0.3 | LGPL v3 | gcc.gnu.org/pub/gcc/infrastructure |
| avr-libc | 2.1.0 | BSD style | download.savannah.gnu.org/releases/avr-libc |
| Arduino AVR core, Wire, SPI | 1.8.6 | LGPL 2.1 (COPYING.LIB) | github.com/arduino/ArduinoCore-avr |
| Servo | 1.2.2 | LGPL 2.1 | github.com/arduino-libraries/Servo |
| The build scripts (build/), the self test (tests/), the workflow, the patches (patches/) | this repo | MIT (LICENSE) | this repository |

Every archive is the unmodified upstream release, checked by SHA256SUMS.
Changes, if any, are the files in patches/, applied by the build
scripts. The exact Emscripten version is in versions.env.

To rebuild: on Ubuntu 22.04 with the packages in
.github/workflows/build.yml and Emscripten at the pinned version, run
build/00-fetch.sh to build/60-package.sh in order.
