wenyongh 6 лет назад
Родитель
Сommit
36741a7392

+ 0 - 75
core/iwasm/readme.txt

@@ -1,75 +0,0 @@
-
-1. How to build iwasm in Linux
-
-  cd products/linux/
-  mkdir build && cd build
-  cmake .. && make
-
-2. How to build iwasm in Zephyr system
-  (1) clone zephyr source code
-
-    git clone https://github.com/zephyrproject-rtos/zephyr.git
-
-  (2) copy <iwasm_root_dir>/products/zephyr/simple directory to zephry/samples/
-
-    cd zephyr/samples/
-    cp -a <iwasm_root_dir>/products/zephyr/simple simple
-    cd simple
-
-  (3) create a link to <iwasm_root_dir> and rename it to iwasm
-
-    ln -s <iwasm_root_dir> iwasm
-
-  (4) create a link to <shared-lib_root_dir> and rename it to shared-lib
-
-    ln -s <shared-lib_root_dir> shared-lib
-
-  (5) build source code
-
-    mkdir build && cd build
-    source ../../../zephyr-env.sh
-    cmake -GNinja -DBOARD=qemu_x86 ..
-    ninja
-
-  (6) run simple
-
-    ninja run
-
-3. How to build iwasm in AliOS-Things platform
-  (1) clone AliOS-Things source code
-
-    git clone https://github.com/alibaba/AliOS-Things.git
-
-  (2) copy <iwasm_root_dir>/products/alios-things directory to AliOS-Things/middleware,
-      and rename it as iwasm
-
-    cp -a <iwasm_root_dir>/products/alios-things middleware/iwasm
-
-  (3) create a link to <iwasm_root_dir> in middleware/iwasm/ and rename it to iwasm
-
-    ln -s <iwasm_root_dir> middleware/iwasm/iwasm
-
-  (4) create a link to <shared-lib_root_dir> in middleware/iwasm/ and rename it to shared-lib
-
-    ln -s <shared-lib_root_dir> middle/iwasm/shared-lib
-
-  (5) modify sample source code of AliOS-Things to call iwasm_init() function
-
-    modify file app/example/helloworld/helloworld.c, in the beginning of
-    function application_start(), add:
-
-      bool iwasm_init(void);
-      iwasm_init();
-
-    modify file app/example/helloworld/helloworld.mk, change
-      $(NAME)_COMPONENTS := yloop cli
-    to
-      $(NAME)_COMPONENTS := yloop cli iwasm
-
-  (6) build source code
-
-    aos make helloworld@linuxhost
-
-  (7) run source code
-    ./out/helloworld@linuxhost/binary/helloworld@linuxhost.elf
-

+ 13 - 13
samples/littlevgl/README.md

@@ -60,10 +60,10 @@ WASM VM and native extension method can be built into Zephyr, Then we can instal
 `git clone https://github.com/zephyrproject-rtos/zephyr.git`</br>
  b. copy samples</br>
     `cd zephyr/samples/`</br>
-    `cp -a <iwasm_root_dir>samples/littlevgl/vgl-wasm-runtime vgl-wasm-runtime`</br>
+    `cp -a <wamr_root>samples/littlevgl/vgl-wasm-runtime vgl-wasm-runtime`</br>
     `cd vgl-wasm-runtime/zephyr_build`</br>
  c. create a link to wamr core</br>
-   ` ln -s <iwasm_root_dir>/core core`</br>
+   ` ln -s <wamr_root>/core core`</br>
  d. build source code</br>
     Since ui_app incorporated LittlevGL source code, so it needs more RAM on the device to install the application.
     It is recommended that RAM SIZE greater than 512KB.
@@ -82,27 +82,27 @@ Hardware Connections
 
 ```
 +-------------------+-+------------------+
-|NUCLEO-F767ZI || ILI9341  Display |
+|NUCLEO-F767ZI       | ILI9341  Display  |
 +-------------------+-+------------------+
-| CN7.10               |         CLK     |
+| CN7.10             |         CLK       |
 +-------------------+-+------------------+
-| CN7.12               |         MISO    |
+| CN7.12             |         MISO      |
 +-------------------+-+------------------+
-| CN7.14               |         MOSI    |
+| CN7.14             |         MOSI      |
 +-------------------+-+------------------+
-| CN11.1               | CS1 for ILI9341 |
+| CN11.1             | CS1 for ILI9341   |
 +-------------------+-+------------------+
-| CN11.2               |         D/C     |
+| CN11.2             |         D/C       |
 +-------------------+-+------------------+
-| CN11.3               |         RESET   |
+| CN11.3             |         RESET     |
 +-------------------+-+------------------+
-| CN9.25               |    PEN interrupt|
+| CN9.25             |    PEN interrupt  |
 +-------------------+-+------------------+
-| CN9.27               | CS2 for XPT2046 |
+| CN9.27             |  CS2 for XPT2046  |
 +-------------------+-+------------------+
-| CN10.14             | PC UART RX       |
+| CN10.14            |    PC UART RX     |
 +-------------------+-+------------------+
-| CN11.16             | PC UART RX       |
+| CN11.16            |    PC UART RX     |
 +-------------------+-+------------------+
 ```
 

+ 3 - 3
samples/littlevgl/build.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 PROJECT_DIR=$PWD
-ROOT_DIR=${PWD}/../../..
+WAMR_DIR=${PWD}/../..
 OUT_DIR=${PWD}/out
 BUILD_DIR=${PWD}/build
 
@@ -13,7 +13,7 @@ rm -rf ${OUT_DIR}
 mkdir ${OUT_DIR}
 
 
-cd ${ROOT_DIR}/wamr/core/shared-lib/mem-alloc
+cd ${WAMR_DIR}/core/shared-lib/mem-alloc
 if [ ! -d "tlsf" ]; then
     git clone https://github.com/mattconte/tlsf
 fi
@@ -36,7 +36,7 @@ echo "#####################build host-tool"
 cd $BUILD_DIR
 mkdir -p host-tool
 cd host-tool
-cmake ${ROOT_DIR}/wamr/test-tools/host-tool
+cmake ${WAMR_DIR}/test-tools/host-tool
 make
 if [ $? != 0 ];then
         echo "BUILD_FAIL host tool exit as $?\n"

+ 2 - 2
samples/littlevgl/vgl-wasm-runtime/src/platform/zephyr/iwasm_main.c

@@ -16,14 +16,14 @@
 #include "bh_platform.h"
 #include "runtime_lib.h"
 #include "native_interface.h"
-#include "app-manager-export.h"
+#include "app_manager_export.h"
 #include "board_config.h"
 #include "bh_common.h"
 #include "bh_queue.h"
 #include "bh_thread.h"
 #include "bh_memory.h"
 #include "runtime_sensor.h"
-#include "attr-container.h"
+#include "attr_container.h"
 #include "module_wasm_app.h"
 #include "wasm_export.h"
 

+ 1 - 1
samples/littlevgl/vgl-wasm-runtime/zephyr-build/CMakeLists.txt

@@ -34,7 +34,7 @@ target_include_directories(app PRIVATE ${IWASM_ROOT}/runtime/include
     ${IWASM_ROOT}/runtime/platform/zephyr
     ${IWASM_ROOT}/runtime/platform/include
     ${IWASM_ROOT}/runtime/utils
-    ${IWASM_ROOT}/runtime/vmcore_wasm
+    ${IWASM_ROOT}/runtime/vmcore-wasm
     ${IWASM_ROOT}/lib/native/base
     ${IWASM_ROOT}/lib/native/libc
     ${IWASM_ROOT}/lib/native/extension/sensor

+ 4 - 4
samples/simple/CMakeLists.txt

@@ -43,10 +43,10 @@ message ("PLATFORM = " ${PLATFORM})
 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -Wno-pedantic")
 
-set(REPO_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../../..)
-set(WASM_DIR  ${REPO_ROOT_DIR}/wamr/core/iwasm)
-set(APP_MGR_DIR ${REPO_ROOT_DIR}/wamr/core/app-mgr)
-set(SHARED_DIR ${REPO_ROOT_DIR}/wamr/core/shared-lib)
+set(WAMR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
+set(WASM_DIR  ${WAMR_ROOT_DIR}/core/iwasm)
+set(APP_MGR_DIR ${WAMR_ROOT_DIR}/core/app-mgr)
+set(SHARED_DIR ${WAMR_ROOT_DIR}/core/shared-lib)
 
 
 enable_language (ASM)

+ 3 - 3
samples/simple/build.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 CURR_DIR=$PWD
-ROOT_DIR=${PWD}/../../..
+WAMR_DIR=${PWD}/../..
 OUT_DIR=${PWD}/out
 BUILD_DIR=${PWD}/build
 
@@ -15,7 +15,7 @@ rm -rf ${OUT_DIR}
 mkdir ${OUT_DIR}
 mkdir ${OUT_DIR}/wasm-apps
 
-cd ${ROOT_DIR}/wamr/core/shared-lib/mem-alloc
+cd ${WAMR_DIR}/core/shared-lib/mem-alloc
 if [ ! -d "tlsf" ]; then
     git clone https://github.com/mattconte/tlsf
 fi
@@ -34,7 +34,7 @@ cp -a simple ${OUT_DIR}
 echo "#####################build simple project success"
 
 echo "#####################build host-tool"
-cd ${ROOT_DIR}/wamr/test-tools/host-tool
+cd ${WAMR_DIR}/test-tools/host-tool
 mkdir -p bin
 cd bin
 cmake ..

+ 0 - 1
test-tools/host-tool/CMakeLists.txt

@@ -41,7 +41,6 @@ include (${SHARED_DIR}/utils/shared_utils.cmake)
 include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
 include (${CJSON_DIR}/cjson.cmake)
 include (${SHARED_DIR}/coap/lib_coap.cmake)
-include (${SSG_LIB_DIR}/host_agent_lib.cmake)
 
 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")

+ 0 - 1
test-tools/host-tool/src/main.c

@@ -29,7 +29,6 @@
 #include "app_manager_export.h" /* for Module_WASM_App */
 #include "host_link.h" /* for REQUEST_PACKET */
 #include "transport.h"
-#include "iagent_bsp.h" /* for bh_get_elpased_ms */
 
 #define BUF_SIZE 1024
 #define TIMEOUT_EXIT_CODE 2