This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new fc4493b7f1 esp32-devkitc/wamr_wasi_debug: enable native-lib stuff
fc4493b7f1 is described below

commit fc4493b7f1ddf4b5c35e24adf22d34b14db7d90d
Author: YAMAMOTO Takashi <yamam...@midokura.com>
AuthorDate: Fri Dec 2 02:30:17 2022 +0900

    esp32-devkitc/wamr_wasi_debug: enable native-lib stuff
    
    * enable DLFCN.
    
    * bump WAMR to a version which i happened to test.
    
    * enable bulk-memory because it's required by recent versions of
      wasi-sdk, which i happened to use to build a test module.
      (test.wasm in the log below.)
    
    Lightly tested with a stripped down version of WAMR native-lib example. [1]
    
    ```
    nsh> mount -t littlefs /dev/esp32flash /mnt
    nsh> iwasm --native-lib=/mnt/test_add.o /mnt/test.wasm
    Hello World!
    10 + 20 = 30
    nsh> iwasm /mnt/test.wasm
    [00:00:23:000 - 6]: warning: failed to link import function (env, test_add)
    Hello World!
    Exception: failed to call unlinked import function (env, test_add)
    nsh>
    ```
    
    [1] 
https://github.com/bytecodealliance/wasm-micro-runtime/tree/main/samples/native-lib
---
 boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig 
b/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig
index 78420c1b99..10e87e33ac 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig
@@ -60,14 +60,16 @@ CONFIG_INTELHEX_BINARY=y
 CONFIG_INTERPRETERS_TOYWASM=y
 CONFIG_INTERPRETERS_WAMR=y
 CONFIG_INTERPRETERS_WAMR_AOT=y
+CONFIG_INTERPRETERS_WAMR_BULK_MEMORY=y
 CONFIG_INTERPRETERS_WAMR_CLASSIC=y
 CONFIG_INTERPRETERS_WAMR_DEBUG_INTERP=y
 CONFIG_INTERPRETERS_WAMR_LIBC_WASI=y
 CONFIG_INTERPRETERS_WAMR_LOG=y
 CONFIG_INTERPRETERS_WAMR_THREAD_MGR=y
-CONFIG_INTERPRETERS_WAMR_VERSION="30ee992762972e3dbf8c8440b9f352b33b79f38f"
+CONFIG_INTERPRETERS_WAMR_VERSION="822a8a5e663da43de81bdfdbfff8424d1ce009aa"
 CONFIG_IOB_NBUFFERS=24
 CONFIG_IOB_THROTTLE=0
+CONFIG_LIBC_DLFCN=y
 CONFIG_LIBC_FLOATINGPOINT=y
 CONFIG_LIBM=y
 CONFIG_MM_DUMP_ON_FAILURE=y

Reply via email to