Add AVR support

This requires support in LLVM, as AVR support is still experimental. For
example, in bindings/go/build.sh, add
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR to cmake_flags.
This commit is contained in:
Ayke van Laethem
2018-06-07 18:35:54 +02:00
parent 802302a1aa
commit 90fb0ee4eb
264 changed files with 105721 additions and 3 deletions
+3
View File
@@ -1588,6 +1588,9 @@ func Compile(pkgName, runtimePath, outpath, target string, printIR bool) error {
if target == "pca10040" {
buildTags = append(buildTags, "nrf", "nrf52", "nrf52832")
target = "armv7m-none-eabi"
} else if target == "arduino" {
buildTags = append(buildTags, "avr", "avr8", "atmega", "atmega328p")
target = "avr--"
}
c, err := NewCompiler(pkgName, target)