Commit Graph

13 Commits

Author SHA1 Message Date
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
Ayke van Laethem 62d74d8329 all: compile and link using clang, where possible 2018-11-22 16:20:10 +01:00
Ayke van Laethem 9392ef900d avr: add support for the digispark
Blinking the on-board LED works. Nothing else has been tested yet.
2018-11-20 18:50:24 +01:00
Ayke van Laethem a96e2879b2 avr: make stack size configurable 2018-11-20 18:20:24 +01:00
Ayke van Laethem b09f7a5e6c avr: make linker script generic 2018-09-23 20:50:12 +02:00
Ayke van Laethem b9638315d2 avr: automatically generate interrupt vectors 2018-09-23 20:37:22 +02:00
Ayke van Laethem 2c21925f4c targets: put board name in build tags 2018-09-22 15:37:46 +02:00
Ayke van Laethem 0d8a7e1666 avr: link with the GCC runtime library
This allows the use of some compiler-generated builtins that are
hopefully compatible with LLVM. Example: println(uint8(foo))

Code size is unchanged normally but of course compiler builtins will
increase code size when actually used (for example with division).
2018-09-16 14:54:10 +02:00
Ayke van Laethem 112f6dc01a all: implement tinygo flash command
This will now just work:

    tinygo flash -target=arduino examples/blinky1
2018-09-14 20:59:28 +02:00
Ayke van Laethem c763e9f1a6 compiler: produce .hex files directly 2018-09-14 20:27:04 +02:00
Ayke van Laethem 76e77917d8 targets: move target-specific files to this directory 2018-09-13 00:59:39 +02:00
Ayke van Laethem 914cd56ca5 all: support Arduino in the compiler driver
This makes sure the compiler itself can build/link an ELF file that
works on an Arduino.
2018-09-12 20:55:50 +02:00
Ayke van Laethem 9bec479041 all: make targets configurable with a JSON file
This is intentionally similar to the target specifications in Rust:
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.TargetOptions.html
2018-09-12 18:28:39 +02:00