Skip to content

Commit

Permalink
Update WASM port, enable some more flags for memory debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Aug 23, 2023
1 parent 418b5d0 commit f77644e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 2 additions & 1 deletion ports/webassembly/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CFLAGS += -std=gnu99 -Wall -Wno-error -Wdouble-promotion -Wfloat-conversion
CFLAGS += -DNDEBUG
ifneq ($(EM_DEBUG),)
CFLAGS += -g3 -O0
LDFLAGS += -g3 -O0
LDFLAGS += -g3 -O0 -sSAFE_HEAP=1 -sASSERTIONS=2
else
CFLAGS += -Os
endif
Expand Down Expand Up @@ -94,6 +94,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o))

JSFLAGS += -s ASYNCIFY
JSFLAGS += -s ASYNCIFY_STACK_SIZE=81920
JSFLAGS += -s 'ASYNCIFY_IMPORTS=["mp_js_sleep_with_intr"]' -s WASM=1 -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1
JSFLAGS += -s EXPORTED_FUNCTIONS="['_mp_js_init', '_mp_js_init_repl', '_mp_js_do_str', '_mp_js_process_char', '_mp_hal_get_interrupt_char', '_mp_sched_keyboard_interrupt', '_mp_handle_pending']"
JSFLAGS += -s EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap']"
Expand Down
10 changes: 0 additions & 10 deletions ports/webassembly/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,6 @@

#define MP_SSIZE_MAX (0x7fffffff)

#if MICROPY_PY_LVGL
#ifndef MICROPY_INCLUDED_PY_MPSTATE_H
#define MICROPY_INCLUDED_PY_MPSTATE_H
#include "lib/lv_bindings/lvgl/src/misc/lv_gc.h"
#undef MICROPY_INCLUDED_PY_MPSTATE_H
#else
#include "lib/lv_bindings/lvgl/src/misc/lv_gc.h"
#endif
#endif

// #define MICROPY_EVENT_POLL_HOOK {ets_event_poll();}
#if MICROPY_PY_THREAD
#define MICROPY_EVENT_POLL_HOOK \
Expand Down

0 comments on commit f77644e

Please sign in to comment.