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: Add BBC micro:bit board #38

Closed
wants to merge 4 commits into from
Closed

WIP: Add BBC micro:bit board #38

wants to merge 4 commits into from

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Oct 5, 2018

Not yet finished: the stm32 target breaks with the changes to .svd file parsing. But the micro:bit works! I've tested examples/serial.

closes #27

@aykevl aykevl mentioned this pull request Oct 5, 2018
@deadprogram
Copy link
Member

So some things not yet working on Microbit. Specifically, the IRQ handler for the UART is not getting triggered.

https://github.com/aykevl/tinygo/blob/1dfe3600938b1b5bbfa536c25003a87a5692aa94/src/machine/machine_nrf.go#L95

I would have expected to change this to then work //go:export UART0_IRQHandler but it does not get triggered.

@aykevl
Copy link
Member Author

aykevl commented Oct 5, 2018

You can take a look at src/device/nrf/nrf51.s for the proper interrupt name.

@aykevl aykevl mentioned this pull request Oct 5, 2018
@aykevl
Copy link
Member Author

aykevl commented Oct 5, 2018

@deadprogram can you maybe test whether I2C works, on the nrf52 and the nrf51?

This PR is of course not finished but I wanted to share what I have so far.

@deadprogram
Copy link
Member

src/device/nrf/nrf51.s has an entry IRQ UART0_IRQHandler which is where I came up with //go:export UART0_IRQHandler.

@aykevl
Copy link
Member Author

aykevl commented Oct 5, 2018

I fixed a few things in the last commits and I think it is ready now.
@deadprogram what do you think? Does it work for you?
I changed some I2C code so would like to make sure I didn't break anything (for the nrf52).

@deadprogram
Copy link
Member

OK just tested UART on both pca10040 and on Microbit. Both worked as expected.

Then tested I2C on pca10040 and worked as previous. I do not currently have the correct adaptor for the Microbit edge connector to test i2c on that with my BlinkM.

Seems like ready to merge. I will submit a PR with some code for the correct button mappings and also some basic code for the LED matrix once it lands.

@aykevl
Copy link
Member Author

aykevl commented Oct 6, 2018

Thank you for testing!

Merged in bc9210b.

@aykevl aykevl closed this Oct 6, 2018
@aykevl aykevl deleted the microbit branch October 6, 2018 11:22
ZauberNerd pushed a commit to ZauberNerd/tinygo that referenced this pull request Mar 4, 2022
fix(pre-commit): rename .pre-commit-hook.yaml to .pre-commit-hooks.yaml
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.

BBC:Microbit support
2 participants