diff options
author | Ron Evans <[email protected]> | 2018-11-08 16:46:22 +0100 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2018-11-15 12:53:10 +0100 |
commit | ae3535945c0afdedbdcd28a831a4902020b1c6d0 (patch) | |
tree | db9391bf7521baf8ee0a4817922d70b80c6afc70 /docs | |
parent | 668c1741c3d290ed63ff8270acde62f5ac4004ab (diff) | |
download | tinygo-ae3535945c0afdedbdcd28a831a4902020b1c6d0.tar.gz tinygo-ae3535945c0afdedbdcd28a831a4902020b1c6d0.zip |
all: add support to Dockerfile for AVR and ARM targets
Signed-off-by: Ron Evans <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docker.rst | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/docs/docker.rst b/docs/docker.rst index 609f02f88..5cdeb23f8 100644 --- a/docs/docker.rst +++ b/docs/docker.rst @@ -11,5 +11,19 @@ repository:: docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/wasm.wasm -target wasm examples/wasm -Note that you cannot run ``tinygo flash`` from inside the docker container, -so it is less useful for microcontroller development. +To compile ``blinky1.hex`` targeting an ARM microcontroller, such as the PCA10040:: + + docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/blinky1.hex -size=short -target=pca10040 examples/blinky1 + +To compile ``blinky1.hex`` targeting an AVR microcontroller such as the Arduino:: + + docker run --rm -v $(pwd):/src tinygo/tinygo build -o /src/blinky1.hex -size=short -target=arduino examples/blinky1 + +Note that for microcontroller development you must flash your hardware devices +from your host environment, since you cannot run ``tinygo flash`` from inside +the docker container. + +So your workflow could be: + +- Compile TinyGo code using the Docker container into a HEX file. +- Flash the HEX file from your host environment to the target microcontroller. |