mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 15:32:05 +00:00
78414b627c
Various fixes and beautifications coordinated with @1c3t3a, fixes 2 of the 3 all remaining issues from #892: - enable to os_mmap executable memory - fix os_malloc/os_realloc/os_free issues - implement os_thread_get_stack_boundary - add build scripts to include with esp-idf to use wamr as an ESP-IDF component - update sample and document
1021 B
1021 B
wasm-micro-runtime as ESP-IDF component
You can build an ESP-IDF project with wasm-micro-runtime as a component:
-
Make sure you have the ESP-IDF properly installed and setup
-
In particular have the following paths set:
WAMR_PATH
to point to your wasm-micro-runtime repositoryIDF_PATH
to point to your ESP-IDFsource $IDF_PATH/export.sh
-
Create a new project, e.g.:
idf.py create-project wamr-hello
-
In the newly created project folder edit the
CMakeList.txt
:cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set (COMPONENTS ${IDF_TARGET} main freertos esptool_py wamr) list(APPEND EXTRA_COMPONENT_DIRS "$ENV{WAMR_PATH}/build-scripts/esp-idf") project(wamr-hello)
-
Develop your project in it's
main
component folder.
You can find an example here.
- Set target platform:
idf.py set-target esp32c3
- Build:
idf.py build
- Flash:
idf.py flash
- Check the output:
idf.py monitor