Ayke van Laethem
9df04a2170
compiler: fix panic on import errors
I think this is a problem in the loader package - it doesn't seem to
return errors for missing packages.
6 years ago
Ayke van Laethem
8a468786df
compiler: use config struct for options
6 years ago
Ayke van Laethem
ddd4a39cb8
avr: fix default handler in interrupt vector
Apparently the target of a weak symbol must be defined in the same file
as where it is used as a weak symbol.
https://www.avrfreaks.net/forum/using-weak-custom-vector-table#comment-745922
6 years ago
Ayke van Laethem
fd6dda5e4f
main: run the compiler from any path
6 years ago
Ayke van Laethem
453450f40d
ir: sort function pragmas
6 years ago
Ayke van Laethem
3076ad470e
tools/gen-device-svd: fix script filename in output
6 years ago
Ayke van Laethem
b09f7a5e6c
avr: make linker script generic
6 years ago
Ayke van Laethem
b9638315d2
avr: automatically generate interrupt vectors
6 years ago
Ayke van Laethem
3850530c88
docs/installation: fix LLVM hyperlink
6 years ago
Ayke van Laethem
3e1a60351d
docs/internals: fix hyperlink
6 years ago
Ayke van Laethem
7c597c910f
README: move installation instructions to docs
6 years ago
Ayke van Laethem
4868823dad
README: add docs badge
6 years ago
Ayke van Laethem
c9a2b3f417
docs: remove "Indices and tables"
6 years ago
Ayke van Laethem
f7f33a1163
docs: add initial documentation
6 years ago
Ayke van Laethem
2938437efc
compiler: make string data unnamed addresses
This ensures LLVM can merge identical strings, and thus reduces code
size in some cases.
6 years ago
Ayke van Laethem
7cea40bcb5
compiler: small cleanup in call handling code
6 years ago
Ayke van Laethem
fdfa810060
compiler: expand small structs
Use fields of small structs (3 or less fields when flattened
recursively) directly as parameter values.
Advantages:
* Code size is slightly reduced, both on unix and nrf.
* AVR can finally deal with struct parameters - at least the small
ones. examples/test now compiles. A real fix for struct parameters
should go into upstream LLVM, but this is a nice win.
fixes #20
6 years ago
Ayke van Laethem
a86739d235
Makefile: add new packages to tgo dependencies
6 years ago
Ayke van Laethem
b2cbfa78ca
compiler: refactor compiler into separate package
6 years ago
Ayke van Laethem
b75a02e66d
compiler: refactor IR parts into separate package
6 years ago
Ayke van Laethem
473e71b573
compiler: implement range over a string
6 years ago
Ayke van Laethem
18b5ab290c
compiler: recognize untyped strings as strings
6 years ago
Ayke van Laethem
c8587c7d1e
Makefile: go fmt more packages
6 years ago
Ayke van Laethem
4d5b5241ec
all: avoid _Msk fields when not necessary
6 years ago
Ayke van Laethem
eadec6f766
tools/gen-device-svd: avoid _Msk for single-bit fields
6 years ago
Ayke van Laethem
3bba26ce5b
machine/bluepill: create definitions for all pins
6 years ago
Ayke van Laethem
8f5bd81bf5
machine: split board definitions in separate files
6 years ago
Ayke van Laethem
2c21925f4c
targets: put board name in build tags
6 years ago
Ron Evans
9df7d6e8e8
examples: add nrf example for all 4 built-in buttons and LEDs
Signed-off-by: Ron Evans <ron@hybridgroup.com>
6 years ago
Ayke van Laethem
a577bc2a1b
tools/gen-device-svd: show better error messages
Show an error message when input .svd files cannot be found.
6 years ago
Ayke van Laethem
dd5b5a381c
stm32: initial support
6 years ago
Ayke van Laethem
12298d23a7
all: move generic ARM bits into separate files
6 years ago
Ayke van Laethem
895d109fc4
compiler: run flash command in a shell
6 years ago
Ayke van Laethem
7517ac86e4
runtime: merge common sleep() functions
6 years ago
Ayke van Laethem
7c16f6c904
tools/gen-device-svd: make source URL configurable
6 years ago
Ayke van Laethem
b705b332a7
tools/gen-device-svd: indentation in .s file
6 years ago
Ayke van Laethem
e0d13f489f
tools/gen-device/svd: auto-generate output directory
6 years ago
Ayke van Laethem
d841daa32b
tools/gen-device-svd: emit correct Go code for stm32
Groups were not recognized because the parser only looked at the
derivedFrom attribute and not at <groupName> tags for matching
peripherals.
6 years ago
Ayke van Laethem
9fa08bf51d
all: use groupName in peripherals
This is needed for support for multiple instances of a peripheral type.
6 years ago
Ayke van Laethem
110230a50d
tools/gen-device-svd: make svd files deal with stm32
First concrete preparation for stm32 support at some point.
6 years ago
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.
6 years ago
Ayke van Laethem
2122780309
compiler: implement *ssa.ChangeType
6 years ago
Ayke van Laethem
505b1f750d
all: generate interrupt vector from .svd file
6 years ago
Ayke van Laethem
3c22f5731c
all: replace _extern_* workaround with //go:extern pragma
6 years ago
Ayke van Laethem
2ca2220e44
compiler: move SSA construction to ir.go
6 years ago
Ayke van Laethem
2496ae9967
compiler: emit non-PIE executables
This fixes a problem on baremetal targets, where PIE doesn't make any
sense. Specifically, on ARM, the compiler sometimes inserted GOT
pointers for linker-defined globals.
6 years ago
Ayke van Laethem
3e6750ae23
examples/test: make unicode example more interesting
6 years ago
Ayke van Laethem
486ea1b8ea
examples: re-add hello world serial communication
I accidentally removed the serial example from 45348bfc3e
while merging
commit 40f834d58f
(PR: https://github.com/aykevl/tinygo/pull/12 ).
Force-pushing seemed like a bad idea so here it is.
6 years ago
Ayke van Laethem
de694b5857
avr: set ADLAR bit in ADC to get a value scaled to 16-bit
6 years ago
Ron Evans
40f834d58f
avr: ADC with 0-1023 range
6 years ago