Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: for feedback from tinygo folks #1027

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

iansmith
Copy link

@iansmith iansmith commented Apr 6, 2020

@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

@aykevl aykevl changed the base branch from master to dev April 6, 2020 12:57
@aykevl
Copy link
Member

aykevl commented Apr 6, 2020

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

iansmith added a commit to iansmith/tinygo that referenced this pull request Apr 6, 2020
@iansmith iansmith force-pushed the raspi3-setup-files branch from ee8de80 to 781dc40 Compare April 6, 2020 16:10
iansmith added a commit to iansmith/tinygo that referenced this pull request Apr 6, 2020
@aykevl
Copy link
Member

aykevl commented Apr 12, 2020

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

iansmith added a commit to iansmith/tinygo that referenced this pull request Apr 12, 2020
iansmith added a commit to iansmith/tinygo that referenced this pull request Apr 12, 2020
@iansmith iansmith force-pushed the raspi3-setup-files branch from 24f4ad6 to 345c90a Compare April 12, 2020 21:49
@iansmith
Copy link
Author

@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 added a commit to iansmith/tinygo that referenced this pull request Apr 13, 2020
iansmith added a commit to iansmith/tinygo that referenced this pull request Apr 13, 2020
@iansmith iansmith force-pushed the raspi3-setup-files branch from 345c90a to ef5548e Compare April 13, 2020 21:22
This commit changes several files related to the raspberry pi.
It assumes that if you want to change the configuration of the
linkerscript or other parameters, you will override the one
provided with your own local .json file. (Thanks ayke.)

There is a sample program to use with these changes that can
added to tinygo-zoo once these changes are merged and
deployed.
@iansmith iansmith force-pushed the raspi3-setup-files branch from ef5548e to db25b40 Compare May 25, 2020 16:42
@iansmith
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants