mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2026-04-19 02:28:43 +00:00
Drease memory requirement of sample littlevgl wasm app by 64KB(a page)
This commit is contained in:
parent
ad4e453a74
commit
44ad52eb79
|
|
@ -75,7 +75,7 @@ https://docs.zephyrproject.org/latest/getting_started/index.html</br>
|
||||||
However, nucleo_f767zi is almost the same as nucleo_f746zg, except FLASH and SRAM size.
|
However, nucleo_f767zi is almost the same as nucleo_f746zg, except FLASH and SRAM size.
|
||||||
So we changed the DTS setting of nucleo_f746zg boards for a workaround.</br>
|
So we changed the DTS setting of nucleo_f746zg boards for a workaround.</br>
|
||||||
|
|
||||||
`Modify zephyr/dts/arm/st/f7/stm32f746xg.dtsi, change DT_SIZE_K(320) to DT_SIZE_K(512)`</br>
|
`Modify zephyr/dts/arm/st/f7/stm32f746Xg.dtsi, change DT_SIZE_K(320) to DT_SIZE_K(512)`</br>
|
||||||
`mkdir build && cd build`</br>
|
`mkdir build && cd build`</br>
|
||||||
`source ../../../../zephyr-env.sh`</br>
|
`source ../../../../zephyr-env.sh`</br>
|
||||||
`cmake -GNinja -DBOARD=nucleo_f746zg ..`</br>
|
`cmake -GNinja -DBOARD=nucleo_f746zg ..`</br>
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ static host_interface interface = { .send = uart_send, .destroy = uart_destroy }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char global_heap_buf[1024 * 1024] = { 0 };
|
static char global_heap_buf[390 * 1024] = { 0 };
|
||||||
|
|
||||||
static void showUsage()
|
static void showUsage()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ void host_destroy()
|
||||||
host_interface interface = { .init = host_init, .send =
|
host_interface interface = { .init = host_init, .send =
|
||||||
host_send, .destroy = host_destroy };
|
host_send, .destroy = host_destroy };
|
||||||
timer_ctx_t timer_ctx;
|
timer_ctx_t timer_ctx;
|
||||||
static char global_heap_buf[ 498*1024] = { 0 };
|
static char global_heap_buf[434 * 1024] = { 0 };
|
||||||
extern void display_init(void);
|
extern void display_init(void);
|
||||||
int iwasm_main()
|
int iwasm_main()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,6 @@ SRCS += ../../../core/iwasm/lib/app-libs/base/timer.c
|
||||||
all:
|
all:
|
||||||
@$(CC) $(CFLAGS) $(SRCS) \
|
@$(CC) $(CFLAGS) $(SRCS) \
|
||||||
-s WASM=1 -s SIDE_MODULE=1 -s ASSERTIONS=1 -s STACK_OVERFLOW_CHECK=2 \
|
-s WASM=1 -s SIDE_MODULE=1 -s ASSERTIONS=1 -s STACK_OVERFLOW_CHECK=2 \
|
||||||
-s TOTAL_MEMORY=131072 -s TOTAL_STACK=8096 \
|
-s TOTAL_MEMORY=65536 -s TOTAL_STACK=8096 \
|
||||||
-s "EXPORTED_FUNCTIONS=['_on_init', '_on_request', '_on_sensor_event', '_on_timer_callback']" \
|
-s "EXPORTED_FUNCTIONS=['_on_init', '_on_request', '_on_sensor_event', '_on_timer_callback']" \
|
||||||
-o ui_app.wasm
|
-o ui_app.wasm
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user