Граф коммитов

18 коммитов

Автор SHA1 Сообщение Дата
Ayke van Laethem
2c21925f4c
targets: put board name in build tags 2018-09-22 15:37:46 +02:00
Ayke van Laethem
dd5b5a381c
stm32: initial support 2018-09-22 01:51:44 +02:00
Ayke van Laethem
12298d23a7
all: move generic ARM bits into separate files 2018-09-22 01:44:47 +02:00
Ayke van Laethem
5b0aaf0d39
targets: clean up and unify linker scripts
Especially arm.ld needed some cleaning up. Other than that, I've made
sure the two linker scripts look similar where possible.
2018-09-21 15:38:55 +02:00
Ayke van Laethem
505b1f750d
all: generate interrupt vector from .svd file 2018-09-21 15:38:28 +02:00
Ayke van Laethem
7c9a3d70bc
nrf: use correct ISA type for pca10040
No change to code size.
2018-09-18 20:16:55 +02:00
Ayke van Laethem
c554c7c009
nrf: use assembly for nrf52, not nrf51
Slightly increase code size, but this is the more correct thing to do.
2018-09-18 20:15:18 +02:00
Ayke van Laethem
8b94fe9205
avr: fix assembly comment regarding data/stack 2018-09-17 20:51:41 +02:00
Ayke van Laethem
77934f364f
avr: fix corrupted .data byte
The stack and the .data section shared the first byte, leading to
corruption of the first byte of .data.
2018-09-17 15:10:52 +02:00
Ayke van Laethem
a02426948b
avr: implement .data section
This doesn't completely work for some reason as the first character of
.data is corrupted, but otherwise it works.
2018-09-16 16:26:04 +02:00
Ayke van Laethem
39e3fe28db
avr: convert initialization from asm to Go
This increases code size by 1 instruction (2 bytes) because LLVM isn't
yet smart enough to recognize that it doesn't need to clear a register
to use 0: it can just use r1 which is always 0 according to the
convention. It makes initialization a lot easier to read, however.
2018-09-16 15:03:48 +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
76a513802f
targets/pca10040: support linking from within the compiler
This is kind of dirty with that huge list of linker params, but it works
and it produces smaller object files (probably because GCC is better
optimized for size).
2018-09-12 23:40:21 +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