Add runtime support for the nRF52

This commit is contained in:
Ayke van Laethem
2018-04-25 20:06:08 +02:00
parent e80f06bc5e
commit 04fef19753
13 changed files with 113 additions and 22 deletions
+2 -5
View File
@@ -1,16 +1,13 @@
package runtime
// #include <stdlib.h>
import "C"
const Compiler = "tgo"
func _panic(message interface{}) {
printstring("panic: ")
printitf(message)
printnl()
C.exit(1)
abort()
}
func boundsCheck(outOfRange bool) {
@@ -18,6 +15,6 @@ func boundsCheck(outOfRange bool) {
// printstring() here is safe as this function is excluded from bounds
// checking.
printstring("panic: runtime error: index out of range\n")
C.exit(1)
abort()
}
}