
- 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.
24 строки
455 Б
JSON
24 строки
455 Б
JSON
{
|
|
"llvm-target": "avr",
|
|
"build-tags": ["avr", "baremetal", "linux", "arm"],
|
|
"goos": "linux",
|
|
"goarch": "arm",
|
|
"gc": "conservative",
|
|
"linker": "ld.lld",
|
|
"scheduler": "none",
|
|
"rtlib": "compiler-rt",
|
|
"libc": "picolibc",
|
|
"default-stack-size": 256,
|
|
"cflags": [
|
|
"-Werror"
|
|
],
|
|
"ldflags": [
|
|
"-T", "targets/avr.ld",
|
|
"--gc-sections"
|
|
],
|
|
"extra-files": [
|
|
"src/internal/task/task_stack_avr.S",
|
|
"src/runtime/asm_avr.S"
|
|
],
|
|
"gdb": ["avr-gdb"]
|
|
}
|