tinygo/src/runtime/runtime_cortexm_abort.go
Ayke van Laethem b713001313 test: support non-host tests
For example, for running tests with -target=wasm or
-target=cortex-m-qemu. It looks at the output to determine whether tests
were successful in the absence of a status code.
2020-09-24 21:17:26 +02:00

17 строки
190 Б
Go

// +build cortexm,!nxp,!qemu
package runtime
import (
"device/arm"
)
func abort() {
// disable all interrupts
arm.DisableInterrupts()
// lock up forever
for {
arm.Asm("wfi")
}
}