diff options
author | Ayke van Laethem <[email protected]> | 2020-01-21 12:00:37 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-01-26 23:24:45 +0100 |
commit | aeb2e6f70a39d66fb297f6424d35cd19b6215de0 (patch) | |
tree | 246ff354933084b2cc92801eadf330148a085824 /targets | |
parent | e830acadf3c9700446667ea8d229ba2f988ebc96 (diff) | |
download | tinygo-aeb2e6f70a39d66fb297f6424d35cd19b6215de0.tar.gz tinygo-aeb2e6f70a39d66fb297f6424d35cd19b6215de0.zip |
all: add Arduino Nano support
Diffstat (limited to 'targets')
-rw-r--r-- | targets/arduino-nano.json | 9 | ||||
-rw-r--r-- | targets/arduino.json | 14 | ||||
-rw-r--r-- | targets/atmega328p.json | 14 |
3 files changed, 25 insertions, 12 deletions
diff --git a/targets/arduino-nano.json b/targets/arduino-nano.json new file mode 100644 index 000000000..b1f278094 --- /dev/null +++ b/targets/arduino-nano.json @@ -0,0 +1,9 @@ +{ + "inherits": ["atmega328p"], + "build-tags": ["arduino_nano"], + "ldflags": [ + "-Wl,--defsym=_bootloader_size=512", + "-Wl,--defsym=_stack_size=512" + ], + "flash-command": "avrdude -c arduino -p atmega328p -b 57600 -P {port} -U flash:w:{hex}:i" +} diff --git a/targets/arduino.json b/targets/arduino.json index 4c847e0a7..fbbca7a8f 100644 --- a/targets/arduino.json +++ b/targets/arduino.json @@ -1,19 +1,9 @@ { - "inherits": ["avr"], - "llvm-target": "avr-atmel-none", - "cpu": "atmega328p", - "build-tags": ["arduino", "atmega328p", "atmega", "avr5"], - "cflags": [ - "-mmcu=atmega328p" - ], + "inherits": ["atmega328p"], + "build-tags": ["arduino"], "ldflags": [ "-Wl,--defsym=_bootloader_size=512", "-Wl,--defsym=_stack_size=512" ], - "linkerscript": "src/device/avr/atmega328p.ld", - "extra-files": [ - "targets/avr.S", - "src/device/avr/atmega328p.s" - ], "flash-command": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}:i" } diff --git a/targets/atmega328p.json b/targets/atmega328p.json new file mode 100644 index 000000000..84fd29157 --- /dev/null +++ b/targets/atmega328p.json @@ -0,0 +1,14 @@ +{ + "inherits": ["avr"], + "llvm-target": "avr-atmel-none", + "cpu": "atmega328p", + "build-tags": ["atmega328p", "atmega", "avr5"], + "cflags": [ + "-mmcu=atmega328p" + ], + "linkerscript": "src/device/avr/atmega328p.ld", + "extra-files": [ + "targets/avr.S", + "src/device/avr/atmega328p.s" + ] +} |