aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets
diff options
context:
space:
mode:
authorJesús Espino <[email protected]>2022-12-20 16:57:55 +0100
committerGitHub <[email protected]>2022-12-20 16:57:55 +0100
commite71e289e8b6d0a09b14043b9842d11c57fc9bb60 (patch)
treed321406fdd1dc8446dcd283a70b1e930bd389f67 /targets
parent6cdc718bfb03cc30dab0d5e698bacb046d0ac5aa (diff)
downloadtinygo-e71e289e8b6d0a09b14043b9842d11c57fc9bb60.tar.gz
tinygo-e71e289e8b6d0a09b14043b9842d11c57fc9bb60.zip
Add basic atmega32u support (#3337)
machine/atmega32u: add support for arduino leonardo
Diffstat (limited to 'targets')
-rw-r--r--targets/arduino-leonardo.json10
-rw-r--r--targets/atmega32u4.json11
2 files changed, 21 insertions, 0 deletions
diff --git a/targets/arduino-leonardo.json b/targets/arduino-leonardo.json
new file mode 100644
index 000000000..17652d854
--- /dev/null
+++ b/targets/arduino-leonardo.json
@@ -0,0 +1,10 @@
+{
+ "inherits": ["atmega32u4"],
+ "build-tags": ["arduino_leonardo"],
+ "ldflags": [
+ "--defsym=_bootloader_size=512",
+ "--defsym=_stack_size=512"
+ ],
+ "flash-command": "avrdude -c avr109 -p atmega32u4 -b 57600 -P {port} -U flash:w:{hex}:i",
+ "emulator": "simavr -m atmega32u4 -f 16000000 {}"
+}
diff --git a/targets/atmega32u4.json b/targets/atmega32u4.json
new file mode 100644
index 000000000..7aa2c08bd
--- /dev/null
+++ b/targets/atmega32u4.json
@@ -0,0 +1,11 @@
+{
+ "inherits": ["avr"],
+ "cpu": "atmega32u4",
+ "build-tags": ["atmega32u4", "avr5"],
+ "serial": "none",
+ "linkerscript": "src/device/avr/atmega32u4.ld",
+ "extra-files": [
+ "targets/avr.S",
+ "src/device/avr/atmega32u4.s"
+ ]
+}