aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2020-01-25 23:50:57 +0100
committerRon Evans <[email protected]>2020-01-27 19:01:55 +0100
commit15c7d93ea9d36f63260cce74fcd3b695b0b06724 (patch)
tree0f02d1c487208a4f2bef37b5349453721fe18541 /Makefile
parent6e26728391a7cc73f8c7a4a1587898bbf6887529 (diff)
downloadtinygo-15c7d93ea9d36f63260cce74fcd3b695b0b06724.tar.gz
tinygo-15c7d93ea9d36f63260cce74fcd3b695b0b06724.zip
avr: use a garbage collector
This might sound crazy, but I think it's better to enable the GC by default to avoid surprises. It costs 1130 bytes of flash and 16 bytes of RAM (plus heap overhead) so it's not exactly free, but if needed it can easily be disabled with `-gc=leaking`. On the Uno (32kB flash, 2kB RAM) that's not massive, on the DigiSpark (8kB flash, 0.5kB RAM) that may be too much depending on the application.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 22cf6b2cb..c7bc22038 100644
--- a/Makefile
+++ b/Makefile
@@ -269,6 +269,8 @@ ifneq ($(AVR), 0)
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=digispark examples/blinky1
@$(MD5SUM) test.hex
+ $(TINYGO) build -size short -o test.hex -target=digispark -gc=leaking examples/blinky1
+ @$(MD5SUM) test.hex
endif
$(TINYGO) build -size short -o test.hex -target=hifive1b examples/blinky1
@$(MD5SUM) test.hex