diff --git a/core/iwasm/aot/debug/elf_parser.c b/core/iwasm/aot/debug/elf_parser.c index 657f9530c..7b0c57b81 100644 --- a/core/iwasm/aot/debug/elf_parser.c +++ b/core/iwasm/aot/debug/elf_parser.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/core/iwasm/aot/debug/jit_debug.c b/core/iwasm/aot/debug/jit_debug.c index 4b0e46f1d..261c20546 100644 --- a/core/iwasm/aot/debug/jit_debug.c +++ b/core/iwasm/aot/debug/jit_debug.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -56,6 +55,12 @@ typedef struct JITDescriptor { JITCodeEntry *first_entry_; } JITDescriptor; +#if defined(_WIN32) || defined(_WIN32_) +#define attribute_noinline __declspec(noinline) +#else +#define attribute_noinline __attribute__((noinline)) +#endif + /* LLVM has already define this */ #if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0) /** @@ -63,9 +68,11 @@ typedef struct JITDescriptor { * To prevent GCC from inlining or removing it we place noinline attribute * and inline assembler statement inside. */ -void __attribute__((noinline)) __jit_debug_register_code(); +void attribute_noinline +__jit_debug_register_code(); -void __attribute__((noinline)) __jit_debug_register_code() +void attribute_noinline +__jit_debug_register_code() { int x; *(char *)&x = '\0'; diff --git a/core/iwasm/interpreter/wasm_runtime.c b/core/iwasm/interpreter/wasm_runtime.c index 7495e2a17..a17d07327 100644 --- a/core/iwasm/interpreter/wasm_runtime.c +++ b/core/iwasm/interpreter/wasm_runtime.c @@ -1420,7 +1420,7 @@ execute_malloc_function(WASMModuleInstance *module_inst, WASMExecEnv *exec_env, #endif { argc = 1; - argv[0] = size; + argv[0] = (uint32)size; } /* if __retain is exported, then this module is compiled by diff --git a/product-mini/platforms/zephyr/simple/prj.conf b/product-mini/platforms/zephyr/simple/prj.conf index 7f4a32832..c269b8ab4 100644 --- a/product-mini/platforms/zephyr/simple/prj.conf +++ b/product-mini/platforms/zephyr/simple/prj.conf @@ -4,3 +4,4 @@ CONFIG_STACK_SENTINEL=y CONFIG_PRINTK=y CONFIG_LOG=y +CONFIG_LOG_BUFFER_SIZE=4096 diff --git a/product-mini/platforms/zephyr/simple/src/main.c b/product-mini/platforms/zephyr/simple/src/main.c index 3b389826f..f6941d7f0 100644 --- a/product-mini/platforms/zephyr/simple/src/main.c +++ b/product-mini/platforms/zephyr/simple/src/main.c @@ -16,30 +16,17 @@ #endif /* end of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */ #if defined(BUILD_TARGET_RISCV64_LP64) || defined(BUILD_TARGET_RISCV32_ILP32) -#if defined(BUILD_TARGET_RISCV64_LP64) -#define CONFIG_GLOBAL_HEAP_BUF_SIZE 4360 -#define CONFIG_APP_STACK_SIZE 288 -#define CONFIG_MAIN_THREAD_STACK_SIZE 2400 -#else #define CONFIG_GLOBAL_HEAP_BUF_SIZE 5120 #define CONFIG_APP_STACK_SIZE 512 -#define CONFIG_MAIN_THREAD_STACK_SIZE 4096 -#endif -#define CONFIG_APP_HEAP_SIZE 256 +#define CONFIG_APP_HEAP_SIZE 512 #else /* else of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */ - #define CONFIG_GLOBAL_HEAP_BUF_SIZE WASM_GLOBAL_HEAP_SIZE #define CONFIG_APP_STACK_SIZE 8192 #define CONFIG_APP_HEAP_SIZE 8192 - -#ifdef CONFIG_NO_OPTIMIZATIONS -#define CONFIG_MAIN_THREAD_STACK_SIZE 8192 -#else -#define CONFIG_MAIN_THREAD_STACK_SIZE 4096 -#endif - #endif /* end of BUILD_TARGET_RISCV64_LP64 || BUILD_TARGET_RISCV32_ILP32 */ +#define CONFIG_MAIN_THREAD_STACK_SIZE 8192 + static int app_argc; static char **app_argv;