Commit Graph

25 Commits

Author SHA1 Message Date
Wenyong Huang
ec5ab8274d
Fix zephyr sample build errors (#1757) 2022-11-28 11:23:51 +08:00
Wenyong Huang
c70e1ebc3d
Avoid generating some unused LLVM IRs (#1696)
Refine the generated LLVM IRs at the beginning of each LLVM AOT/JIT function
to fasten the LLVM IR optimization:
- Only create argv_buf if there are func calls in this function
- Only create native stack bound if stack bound check is enabled
- Only create aux stack info if there is opcode set_global_aux_stack
- Only create native symbol if indirect_mode is enabled
- Only create memory info if there are memory operations
- Only create func_type_indexes if there is opcode call_indirect
2022-11-14 14:32:35 +08:00
Jämes Ménétrey
6adf9194d4
Normalize how the global heap pool is configured across iwasm apps (#1628)
Use the cmake variable `WAMR_BUILD_GLOBAL_HEAP_POOL` and
`WAMR_BUILD_GLOBAL_HEAP_SIZE` to enable/disable the global heap pool
and set its size. And set the default global heap size in core/config.h and
the cmake files.

As a result, the developers who build iwasm can easily enable/disable the
global heap pool and change its size regardless of the iwasm implementation,
without manually finding and patching the right location for that value.
2022-10-25 21:36:24 +08:00
TianlongLiang
ee210d019f
Dockerfile lint errors fix (#1493)
Fix the Dockerfile linter errors and most warnings
2022-09-22 13:06:11 +08:00
Wenyong Huang
d7a2888b18
Fix Windows compilation warnings (#1171)
And update the Zephyr platform sample help, add arc target into usage list.
2022-05-16 09:12:58 +08:00
Wenyong Huang
90cccda68e
Refine some error msg, comment and document (#921) 2021-12-29 12:13:30 +08:00
Stefan Wallentowitz
936206f97b
Update Zephyr document, add esp32c3 and particle_argon support(#920)
Update the Zephyr document to provide more detailed instructions, and add info
about espressif toolchain too.

Add ESP32C3 (RISC-V) and Particle Argon boards support to the zephyr platform
sample. More boards are possible, but the script doesn't scale well and is to be
improved in future.

Add Dockerfile to kickstart a Zephyr development environment as it can be rather
confusing for new users.
2021-12-29 10:05:27 +08:00
Huang Qi
a121e45a1e
Simplify build setup for zephyr (#789)
Zephyr can apply board specific .conf and .overlay automatically,
move .conf to boards to make it easy to support different board without
addition command parameters.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-10-15 20:15:17 +08:00
Wenyong Huang
17f62ad472
Apply clang-format for core/shared and product-mini files (#785)
Apply clang-format for core/shared and product-mini files
2021-10-14 09:12:07 +08:00
Wenyong Huang
db695fada4
Implement XIP feature and enable ARC target support (#694)
Implement XIP (Execution In Place) feature for AOT mode to enable running the AOT code inside AOT file directly, without memory mapping the executable memory for AOT code and applying relocations for text section. Developer can use wamrc with "--enable-indirect-mode --disable-llvm-intrinsics" flags to generate the AOT file and run iwasm with "--xip" flag. Known issues: there might still be some relocations in the text section which access the ".rodata" like sections.

And also enable ARC target support for both interpreter mode and AOT mode.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-08-12 17:44:39 +08:00
Wenyong Huang
be54b4c7cc
Fix sample littlevgl/gui build issues on zephyr platform (#588)
Fix sample littlevgl/guil build issues on zephyr platform, modify code of zephyr platform by adding some macros to control some apis to fit different zephyr version, and align to zephyr-v2.3.0 for sample littlevgl/gui as the latest zephyr version (>=v2.4.0) requires that the thread stack for the thread to create must be defined by macro but not allocating stack memory dynamically.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-23 14:20:50 +08:00
Wang Ning
da8c879953
Implement riscv support for interpreter (#505) 2021-01-25 18:41:48 +08:00
Wenyong Huang
e501a6963b
Fix some coding style issues, fix doc typo and refine some codes (#392) 2020-09-20 08:20:45 +08:00
liurenju
0529815f34
change the alignment, which might potentially casue problem. (#258) 2020-05-21 16:05:02 +08:00
wenyongh
b40e79c160
Make heap and linear memory contiguous to refine compilation time and footprint (#233)
Use FastISel for JIT mode
Use united aot version in aot file and aot runtime
Disable check signature failed warning for wamrc
Fix fast interpreter x86_32 float issue
Remove unused empty lvgl folder
2020-04-13 10:49:40 +08:00
Xu Jun
5e196253f6
Fix function type not set issue of aot_call_indirect (#229)
Add registration of libc-wasi to 'wasi_snapshot_preview1' to support cargo-wasi
change zephyr build method from cmake to west
fix problem when preserve space for local vars
fix wasi authority problem
2020-04-07 11:04:46 +08:00
Weining
c6fc12b7b6
Add xtensa AOT support and fix build issue of alios (#223)
* Clean compiling warnings of zephyr samples

* Support xtensa AOT and fix build issue of alios
2020-04-01 18:38:42 +08:00
wenyongh
01e85144f4
Enable aarch64 support, add component test framework and test suite (#211)
and refine aot call indirect op
2020-03-24 19:04:29 +08:00
Xu Jun
f1a0e75ab7
re-org platform APIs, simplify porting process (#201)
Co-authored-by: Xu Jun <jun1.xu@intel.com>
2020-03-16 16:43:57 +08:00
Weining
aa42335a4e
minor changes (#195) 2020-03-11 13:49:52 +08:00
wenyongh
0fdd49ea31
Re-org memory allocation interfaces, add --stack-size and --heap-size option (#193) 2020-03-10 19:54:44 +08:00
wenyongh
cfcaca3d35
Refine build script of zephyr product-mini, enable aot soft-float support (#188) 2020-03-05 21:46:24 +08:00
wenyongh
0d3f304191
Implement native function pointer check, addr conversion and register, update documents (#185)
Modified WASM runtime API:
- wasm_runtime_module_malloc()
- wasm_runtime_lookup_function()
Introduced runtime API
- wasm_runtime_register_natives()
2020-03-04 20:12:38 +08:00
wenyongh
9a961c4843
Enable ARM and THUMB AOT support, enable Android platform support (#182)
* Sync with internal/feature: enable arm aot and android platform
2020-02-27 16:38:44 +08:00
wenyongh
46b93b9d22 Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent

* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default

* Add a new extension library: connection

* Fix bug of reading magic number and version in big endian platform

* Re-org platform APIs: move most platform APIs from iwasm to shared-lib

* Enhance wasm loader to fix some security issues

* Fix issue about illegal load of EXC_RETURN into PC on stm32 board

* Updates that let a restricted version of the interpreter run in SGX

* Enable native/app address validation and conversion for wasm app

* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused

* Refine binary size and fix several minor issues

Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c

* Add more strict security checks for libc wrapper API's

* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files

* Enhance security of libc strcpy/sprintf wrapper function

* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions

* Remove get_module_inst() and fix issue of call native

* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate

* Refine interpreter call native process, refine memory boudary check

* Fix issues of invokeNative function of arm/mips/general version

* Add a switch to build simple sample without gui support

* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code

* Re-org shared lib header files, remove unused info; fix compile issues of vxworks

* Add build target general

* Remove unused files

* Update license header

* test push

* Restore file

* Sync up with internal/feature

* Sync up with internal/feature

* Rename build_wamr_app to build_wasm_app

* Fix small issues of README

* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc

* Sync up with internal/feature

* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue

* Sync up with internal/feature

* Fix bug of config.h and rename wasi config.h to ssp_config.h

* Sync up with internal/feature

* Import wamr aot

* update document

* update document

* Update document, disable WASI in 32bit

* update document

* remove files

* update document

* Update document

* update document

* update document

* update samples

* Sync up with internal repo
2020-01-21 13:26:14 +08:00