tinygo/targets/arduino.json
Ayke 873c1c3b4d Reduce code size for AVR (#116)
* all: add support for specifying target CPU in target config
* avr: specify the chip name in the target CPU

This reduces code size by a large margin. For examples/blinky, it
reduces code size from 1360 to 1266 when compiling for the Arduino Uno
(94 bytes, or ~7%).
2019-01-04 14:58:35 +01:00

19 строки
455 Б
JSON

{
"inherits": ["avr"],
"llvm-target": "avr-atmel-none",
"cpu": "atmega328p",
"build-tags": ["arduino", "atmega328p", "atmega", "avr5"],
"cflags": [
"-mmcu=atmega328p"
],
"ldflags": [
"-Wl,--defsym=_bootloader_size=512",
"-Wl,--defsym=_stack_size=512",
"-T", "src/device/avr/atmega328p.ld"
],
"extra-files": [
"targets/avr.S",
"src/device/avr/atmega328p.s"
],
"flash": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}"
}