Fix zephyr sample build errors (#1757)

This commit is contained in:
Wenyong Huang
2022-11-28 11:23:51 +08:00
committed by GitHub
parent 9c5e1cb600
commit ec5ab8274d
5 changed files with 41 additions and 8 deletions

View File

@ -42,12 +42,12 @@ endif ()
# Override the global heap usage
if (NOT DEFINED WAMR_BUILD_GLOBAL_HEAP_POOL)
add_definitions (-DWASM_ENABLE_GLOBAL_HEAP_POOL=1)
set (WAMR_BUILD_GLOBAL_HEAP_POOL 1)
endif ()
# Override the global heap size for small devices
if (NOT DEFINED WAMR_BUILD_GLOBAL_HEAP_SIZE)
add_definitions (-DWASM_GLOBAL_HEAP_SIZE=131072) # 128 kB
set (WAMR_BUILD_GLOBAL_HEAP_SIZE 131072) # 128 KB
endif ()
set (WAMR_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)

View File

@ -15,9 +15,6 @@
#include "test_wasm.h"
#endif /* end of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */
#include <zephyr.h>
#include <sys/printk.h>
#if defined(BUILD_TARGET_RISCV64_LP64) || defined(BUILD_TARGET_RISCV32_ILP32)
#if defined(BUILD_TARGET_RISCV64_LP64)
#define CONFIG_GLOBAL_HEAP_BUF_SIZE 4360