mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 13:01:10 +02:00
examples/natmod/deflate: Fix build for Xtensa.
This commit provides the appropriate external symbol addresses to let the "deflate" example natmod build for the Xtensa platform. Unlike other natmods that require an external symbol list to build without bringing in the whole runtime libraries set, this natmod is referencing the `__modsi3` symbol which was removed from the ESP8266's SDK but not present in ROM. The latter only has a `__umodsi3` implementation that only operates on unsigned values, and thus unable to handle this natmod. Thus, the extended library resolution process is enabled for this natmod as a `__modsi3` implementation is made available that way (still using ROM symbols whenever possible). This also means that symbols that appear in both ROM and external libraries sort of co-exist in the final MPY file, with ROM symbols being used by natmod code but the implementation from the library still exists in the final MPY file, unused. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
committed by
Damien George
parent
462ee12d3c
commit
887125fc58
@@ -8,6 +8,12 @@ MOD = deflate_$(ARCH)
|
||||
SRC = deflate.c
|
||||
|
||||
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
|
||||
ARCH = x64
|
||||
ARCH ?= x64
|
||||
|
||||
ifeq ($(ARCH),xtensa)
|
||||
# Link with libm.a and libgcc.a from the toolchain
|
||||
LINK_RUNTIME = 1
|
||||
MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld
|
||||
endif
|
||||
|
||||
include $(MPY_DIR)/py/dynruntime.mk
|
||||
|
Reference in New Issue
Block a user