Skip to content

Commit

Permalink
docs: more info about what exactly this is
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Feb 20, 2024
1 parent 2cbb97e commit 42ea820
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,37 @@ func pongFunc() {
}
```

You can compile and flash the WASM runtime engine and the WASM program onto an Adafruit PyBadge (an ARM 32-bit microcontroller with 192k of RAM) with this command:

```
$ tinygo flash -size short -target pybadge -monitor ./examples/simple
code data bss | flash ram
101012 1736 72216 | 102748 73952
Connected to /dev/ttyACM0. Press Ctrl-C to exit.
TinyWASM engine starting...
Using interpreter...
Initializing engine...
Initializing interpreter...
Initializing devices...
Defining func...
Loading module...
Running module...
building index space
initializing memory
initializing functions
initializing globals
running start func
Calling ping...
pong
Calling ping...
pong
Calling ping...
pong
Calling ping...
pong
```

See the `examples` for more information.

## Architecture

Expand Down
4 changes: 3 additions & 1 deletion examples/simple/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Simple

Simple example that loads the `ping.wasm` program that has is embedded into the runtime.

```
tinygo build -o simple.uf2 -size short -target pybadge -opt=2 ./examples/simple
tinygo flash -size short -target pybadge -monitor ./examples/simple
```

0 comments on commit 42ea820

Please sign in to comment.