test: add _embdemo print test

This commit is contained in:
Haolan
2025-09-02 18:27:59 +08:00
parent 82bb6e84d0
commit 5a4c83ef85
3 changed files with 143 additions and 0 deletions

11
_embdemo/hello/main.go Normal file
View File

@@ -0,0 +1,11 @@
package main
func myprint(s string) {
for i := 0; i < len(s); i++ {
WriteByte(s[i])
}
}
func main() {
myprint("hello world")
}

4
_embdemo/hello/uart.go Normal file
View File

@@ -0,0 +1,4 @@
package main
//go:linkname WriteByte C.board_uart_write_char
func WriteByte(b byte)