tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

WIP: for feedback from tinygo folks

Open iansmith opened this issue 4 years ago • 4 comments

@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

iansmith avatar Apr 06 '20 00:04 iansmith

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).

aykevl avatar Apr 06 '20 12:04 aykevl

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 avatar Apr 12 '20 17:04 aykevl

@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

iansmith avatar Apr 13 '20 13:04 iansmith

@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.

iansmith avatar May 25 '20 16:05 iansmith