Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions doc/build_wamr.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,8 @@ Zephyr
You need to download the Zephyr source code first and embed WAMR into it.
``` Bash
git clone https://github.com/zephyrproject-rtos/zephyr.git
cd zephyr/samples/
cp -a <wamr_root_dir>/product-mini/platforms/zephyr/simple .
cd simple
ln -s <wamr_root_dir> wamr
source ../../zephyr-env.sh
source ../zephyr-env.sh
cd <wamr_root_dir>/product-mini/platforms/zephyr/simple
# Execute the ./build_and_run.sh script with board name as parameter. Here take x86 as example:
./build_and_run.sh x86

Expand Down
6 changes: 3 additions & 3 deletions product-mini/platforms/zephyr/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

cmake_minimum_required(VERSION 3.8.2)

include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(wamr)

enable_language (ASM)

Expand Down Expand Up @@ -40,7 +40,7 @@ if (WAMR_BUILD_TARGET STREQUAL "RISCV64_LP64" OR WAMR_BUILD_TARGET STREQUAL "RIS
set (WAMR_BUILD_FAST_INTERP 1)
endif ()

set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/wamr)
set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)

include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)

Expand Down
8 changes: 0 additions & 8 deletions product-mini/platforms/zephyr/simple/build_and_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ case $TARGET in
$X86_TARGET)
west build -b qemu_x86_nommu \
. -p always -- \
-DCONF_FILE=prj_qemu_x86_nommu.conf \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will auto read the config file under boards folder according to the board name, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

-DWAMR_BUILD_TARGET=X86_32
west build -t run
;;
$STM32_TARGET)
west build -b nucleo_f767zi \
. -p always -- \
-DCONF_FILE=prj_nucleo767zi.conf \
-DWAMR_BUILD_TARGET=THUMBV7
west flash
;;
Expand All @@ -53,7 +51,6 @@ case $TARGET in
west build -b esp32 \
. -p always -- \
-DESP_IDF_PATH=$ESP_IDF_PATH \
-DCONF_FILE=prj_esp32.conf \
-DWAMR_BUILD_TARGET=XTENSA
# suppose the serial port is /dev/ttyUSB1 and you should change to
# the real name accordingly
Expand All @@ -62,37 +59,32 @@ case $TARGET in
$QEMU_XTENSA_TARGET)
west build -b qemu_xtensa \
. -p always -- \
-DCONF_FILE=prj_qemu_xtensa.conf \
-DWAMR_BUILD_TARGET=XTENSA
west build -t run
;;
$QEMU_CORTEX_A53)
west build -b qemu_cortex_a53 \
. -p always -- \
-DCONF_FILE=prj_qemu_cortex_a53.conf \
-DWAMR_BUILD_TARGET=AARCH64
west build -t run
;;
$QEMU_RISCV64_TARGET)
west build -b qemu_riscv64 \
. -p always -- \
-DCONF_FILE=prj_qemu_riscv64.conf \
-DWAMR_BUILD_TARGET=RISCV64_LP64 \
-DWAMR_BUILD_AOT=0
west build -t run
;;
$QEMU_RISCV32_TARGET)
west build -b qemu_riscv32 \
. -p always -- \
-DCONF_FILE=prj_qemu_riscv32.conf \
-DWAMR_BUILD_TARGET=RISCV32_ILP32 \
-DWAMR_BUILD_AOT=0
west build -t run
;;
$QEMU_ARC_TARGET)
west build -b qemu_arc_em \
. -p always -- \
-DCONF_FILE=prj_qemu_arc.conf \
-DWAMR_BUILD_TARGET=ARC \
-DWAMR_BUILD_AOT=0
west build -t run
Expand Down