avr: drop GNU toolchain dependency

- Use compiler-rt and picolibc instead of avr-libc.
  - Use ld.lld instead of avr-ld (or avr-gcc).

This makes it much easier to get started with TinyGo on AVR because
installing these extra tools (gcc-avr, avr-libc) can be a hassle.
It also opens the door for future improvements such as ThinLTO.

There is a code size increase but I think it's worth it in the long run.
The code size increase can hopefully be reduced with improvements to the
LLVM AVR backend and to compiler-rt.
This commit is contained in:
Ayke van Laethem
2022-11-04 14:50:26 +01:00
committed by Ron Evans
parent b9bb605257
commit df888acd5e
22 changed files with 74 additions and 41 deletions
+2 -2
View File
@@ -2,8 +2,8 @@
"inherits": ["atmega328p"],
"build-tags": ["arduino"],
"ldflags": [
"-Wl,--defsym=_bootloader_size=512",
"-Wl,--defsym=_stack_size=512"
"--defsym=_bootloader_size=512",
"--defsym=_stack_size=512"
],
"flash-command": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}:i",
"serial-port": ["2341:0043", "2341:0001", "2a03:0043", "2341:0243"],