Open
Description
Is it possible to compile TinyGo to a RV32IM (RISC-V 32 bit) backend? I tried running
tinygo build -o main.elf -target=riscv32 main.go
But got the following error on this very simple program:
package main
func main() {
a := 1
b := 1
c := a + b
_ = c
}
$ tinygo build -o main.elf -target=riscv32 main.go
# runtime
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:30:21: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:84:42: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/time.go:11:33: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/baremetal.go:59:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/baremetal.go:64:2: undefined: exit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/panic.go:52:2: undefined: abort
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/panic.go:71:2: undefined: abort
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:14:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:26:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:35:4: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:69:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:90:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:96:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:184:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:264:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:269:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:276:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:283:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:288:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:290:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:336:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:338:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:340:3: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:351:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:359:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:360:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:364:4: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:366:4: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:381:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:383:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/print.go:385:2: undefined: putchar
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/runtime.go:70:9: undefined: ticksToNanoseconds
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/runtime.go:70:28: undefined: ticks
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:92:9: undefined: ticks
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:162:10: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:167:10: undefined: ticks
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:172:53: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:175:26: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:203:17: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:205:16: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:217:39: undefined: timeUnit
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler.go:223:4: undefined: sleepTicks
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/scheduler_any.go:15:31: undefined: nanosecondsToTicks
/opt/homebrew/Cellar/tinygo/0.31.2/src/runtime/time.go:12:9: undefined: nanosecondsToTicks