This commit is contained in:
Ayke van Laethem
2018-08-17 23:21:47 +02:00
parent 574c7ec047
commit 62c4c5e90b
19 changed files with 28 additions and 45 deletions
-2
View File
@@ -1,9 +1,7 @@
package main
import (
"go/types"
"golang.org/x/tools/go/ssa"
)
+1
View File
@@ -33,6 +33,7 @@ type __reg uint32
type RegValue = __reg
type __asm string
func Asm(s __asm)
const (
-1
View File
@@ -1,4 +1,3 @@
package main
import (
-1
View File
@@ -1,4 +1,3 @@
package main
type Thing struct {
-1
View File
@@ -1,4 +1,3 @@
package machine
type GPIOConfig struct {
-1
View File
@@ -1,4 +1,3 @@
// +build avr
package machine
-1
View File
@@ -1,4 +1,3 @@
// +build !avr,!nrf
package machine
-1
View File
@@ -1,4 +1,3 @@
// +build nrf
package machine
-1
View File
@@ -1,4 +1,3 @@
// +build !linux
package runtime
-1
View File
@@ -1,4 +1,3 @@
package runtime
import (
-1
View File
@@ -1,4 +1,3 @@
package runtime
const Compiler = "tgo"
-1
View File
@@ -1,4 +1,3 @@
// +build avr
package runtime
+4 -3
View File
@@ -1,4 +1,3 @@
// +build nrf
package runtime
@@ -29,7 +28,8 @@ func initUART() {
func initLFCLK() {
nrf.CLOCK.LFCLKSRC = nrf.CLOCK_LFCLKSTAT_SRC_Xtal
nrf.CLOCK.TASKS_LFCLKSTART = 1
for nrf.CLOCK.EVENTS_LFCLKSTARTED == 0 {}
for nrf.CLOCK.EVENTS_LFCLKSTARTED == 0 {
}
nrf.CLOCK.EVENTS_LFCLKSTARTED = 0
}
@@ -41,7 +41,8 @@ func initRTC() {
func putchar(c byte) {
nrf.UART0.TXD = nrf.RegValue(c)
for nrf.UART0.EVENTS_TXDRDY == 0 {}
for nrf.UART0.EVENTS_TXDRDY == 0 {
}
nrf.UART0.EVENTS_TXDRDY = 0
}
-1
View File
@@ -1,4 +1,3 @@
// +build linux
package runtime
-1
View File
@@ -1,4 +1,3 @@
package runtime
// This file implements the Go scheduler using coroutines.
-1
View File
@@ -1,4 +1,3 @@
package runtime
// TODO: use the time package for this.
-1
View File
@@ -1,4 +1,3 @@
package syscall
// dummy
-1
View File
@@ -1,4 +1,3 @@
package unsafe
// dummy
-2
View File
@@ -1,4 +1,3 @@
package main
import (
@@ -1718,7 +1717,6 @@ func Compile(pkgName, runtimePath, outpath, target string, printIR, dumpSSA bool
return nil
}
func main() {
outpath := flag.String("o", "", "output filename")
printIR := flag.Bool("printir", false, "print LLVM IR")