Skip to content

Commit

Permalink
Add Teensy40
Browse files Browse the repository at this point in the history
  • Loading branch information
vshymanskyy committed Jan 23, 2020
1 parent cfa2b28 commit 5557852
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples_pio/Wasm_Advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ To run the example:
pio run -e <device> -t upload && pio device monitor
```
Where `<device>` is one of:
`ESP32`, `ESP8266`, `Arduino101`, `MKR1000`, `NucleoWB55RG`, `BluePill`, `TinyBLE`, `Teensy31`, `WildFireV3`
`ESP32`, `ESP8266`, `Arduino101`, `MKR1000`, `NucleoWB55RG`, `BluePill`, `TinyBLE`, `Teensy31`, `Teensy40`, `WildFireV3`

**Note:** This example uses Wasm Linear Memory. You should be able to run it on any device that can afford to allocate 1-2 pages of Wasm Linear Memory (i.e. have >= 128KiB RAM).

10 changes: 10 additions & 0 deletions examples_pio/Wasm_Advanced/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ platform = teensy
board = teensy31
upload_protocol = teensy-cli

src_build_flags =
${env.src_build_flags}
-DLED_PIN=13
-O3 -flto

[env:Teensy40]
platform = teensy
board = teensy40
upload_protocol = teensy-cli

src_build_flags =
${env.src_build_flags}
-DLED_PIN=13
Expand Down
7 changes: 5 additions & 2 deletions examples_pio/Wasm_Advanced/wasm_vm/wasm_vm.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
#define NATIVE_STACK_SIZE (32*1024)

// For (most) devices that cannot allocate a 64KiB wasm page
//#define WASM_MEMORY_LIMIT 4096
#define WASM_MEMORY_LIMIT 4096

/*
* WebAssembly app
*/

#include "../wasm_apps/assemblyscript/app.wasm.h"
#include "../wasm_apps/cpp/app.wasm.h"
//#include "../wasm_apps/assemblyscript/app.wasm.h"
//#include "../wasm_apps/rust/app.wasm.h"
//#include "../wasm_apps/tinygo/app.wasm.h"

/*
* API bindings
Expand Down

0 comments on commit 5557852

Please sign in to comment.