This is a experiment for running wasm (webassembly) on esp32c6.
- wasm-micro-runtime has supported ESP32 ,ESP32C3 ,ESP32S3 ,ESP32C6
- wasm3 has supported ESP32 ,ESP32C3 ,ESP32S3 ,ESP32C6
I am using ESP32C6 :)
ESP32 ,ESP32C3 ,ESP32S3 also works.
- Setup
esp-idf
toolchain using the instructions here. Make sure that you addIDF_PATH
to your user profile as mentioned here. - Clone
wasm-micro-runtime
from here. SetWAMR_PATH
to this path in your user profile. - Install
wasi-sdk
as mentioned here.- Its okay to use release downloads but it didn't work for me on Linux. I had to compile it.
- Set
WASI_SDK_PATH
in your profile correctly to the folder where the artifacts are untar'ed.### Software setup
- Setup
esp-idf
toolchain using the instructions here. Make sure that you addIDF_PATH
to your user profile as mentioned here. - Clone Wasm3 engine
git clone --depth=1 https://github.com/wasm3/wasm3.git ./wasm3
SetWASM3_PATH
to this path in your user profile. - Install
wasi-sdk
as mentioned here.- Its okay to use release downloads but it didn't work for me on Linux. I had to compile it.
- Set
WASI_SDK_PATH
in your profile correctly to the folder where the artifacts are untar'ed.### Software setup
Remember to bring esp-idf into path,
$ export $IDF_PATH/export.sh
Clone this repo,
$ git clone https://github.com/TAOFOR4/webassembly-esp32c6.git
$ cd wamr
$ cd esp32c6-wasm-c
$ ./build.sh; cd ..
$ cd esp32c6-wasm-rs
$ ./build.sh; cd ..
$ ./build_and_run.sh
$ idf.py monitor
Remember to bring esp-idf into path,
$ export $IDF_PATH/export.sh
Clone this repo,
$ git clone https://github.com/TAOFOR4/webassembly-esp32c6.git
$ cd wasm3
$ cd esp32c6-wasm-c
$ ./build.sh; cd ..
$ cd esp32c6-wasm-rs
$ ./build.sh; cd ..
$ ./build_and_run.sh
$ idf.py monitor
$ python capture_execution_time.py
Then check the output file 'capture_execution_time.txt'
$ python capture_memory_storage.py
Then check the output file 'capture_memory_storage.txt'
Still ongoing. Two methods:
- The easiest approach would be to let the device run and monitor your battery voltage, something similar to here
- The more advanced way would be to invest in a device which can measure the current so that the user can do the calculation and estimate the power consumption. An example of using Power Profiler Kit II from Nordic