tinygo
tinygo copied to clipboard
WIP: for feedback from tinygo folks
@aykevl @jaddr2line
This PR is to confirm that I have the files setup "right" to be a good citizen in tinygo.
The test program (note this does UART synchronously, not yet to the point of interrupts):
package main
import "machine"
var testMyBSS int
func main() {
// set up serial console
machine.UARTInit()
// say hello
machine.UARTPuts("Hello World!\n")
// echo everything back
for {
machine.UARTPutc(machine.UARTGetc())
}
}
If you want to test locally:
$ tinygo build -target rpi3 -o uart main.go
$ llvm-objcopy -O binary uart kernel8.img
Assuming you have Qemu 4.2 you can run with:
$ qemu-system-aarch64 -M raspi3 -kernel kernel8.img -serial null -serial stdio
Note: I have changed the PR from master to dev, as that's what we're working on (and dev has many changes now not included in master).
There are a number of conflicts, which you can fix by rebasing on top of the dev branch (although it appears like you already did some of that in #1048?)
@aykevl It appears that the problem with picolib is affecting circle-ci as well. Check the errors in this build. This is the same trouble I had on my mac.
https://app.circleci.com/pipelines/github/iansmith/tinygo/10/workflows/2e5badf7-1a2e-4297-a333-62dc856cd707/jobs/61
@aykevl @jaddr2line
I implemented all the suggestions from Ayke on overriding and machine generation of the hardware MMIO registers.
Close the other PRs that were confusing the issue.