Adding runtime support for new processors
How to add runtime support to a new processor.
Thank you for your interest in improving TinyGo.
We would like your help to make this project better, so we appreciate any contributions. See if one of the following descriptions matches your situation:
We’d love to get your feedback on getting started with TinyGo. Run into any difficulty, confusion, or anything else? You are not alone. We want to know about your experience, so we can help the next people. Please open a Github issue with your questions, or you can also get in touch directly with us on our Slack channel at https://gophers.slack.com/messages/CDJD3SUP6.
Please open a Github issue with your problem, and we will be happy to assist.
We probably have not implemented it yet. Please take a look at our Roadmap. Your pull request adding the functionality to TinyGo would be greatly appreciated.
Please open a Github issue. We want to help, and also make sure that there is no duplications of efforts. Sometimes what you need is already being worked on by someone else.
A long tail of small (and large) language features haven’t been implemented yet. In almost all cases, the compiler will show a todo:
error from compiler/compiler.go
when you try to use it. You can try implementing it, or open a bug report with a small code sample that fails to compile.
As above, we probably have not implemented it yet. Your contribution adding the hardware support to TinyGo would be greatly appreciated.
Please start by opening a Github issue. We want to help you to help us to help you.
Lots of targets/boards are still unsupported. Adding an architecture often requires a few compiler changes, but if the architecture is supported you can try implementing support for a new chip or board in src/runtime
. For details, see this wiki entry on adding archs/chips/boards.
Microcontrollers have lots of peripherals (I2C, SPI, ADC, etc.) and many don’t have an implementation yet in the machine
package. Adding support for new peripherals is very useful.
The release
branch of this repo will always have the latest released version of TinyGo. All of the active development work for the next release will take place in the dev
branch. TinyGo will use semantic versioning and will create a tag/release for each release.
Here is how to contribute back some code or documentation:
dev
branchmake fmt
dev
branch.Please rebase (not merge) from the dev branch if your PR needs to incorporate changes that occured after your feature branch was created. You can accomplish that via the git command line:
git checkout dev
git pull --rebase origin dev
git checkout my-feature-branch
git rebase dev
git push myfork my-feature-branch -f
To run the tests:
make test
How to add runtime support to a new processor.
How code is organized in TinyGo.