Skip to content

Commit

Permalink
esp8266/Makefile: Add more libm files to build.
Browse files Browse the repository at this point in the history
Allows MICROPY_PY_MATH_SPECIAL_FUNCTIONS to be enabled, and for ulab to be
built as a user C module.
  • Loading branch information
rcolistete authored and dpgeorge committed Jul 22, 2021
1 parent 2515912 commit b099db4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ports/esp8266/Makefile
Expand Up @@ -123,21 +123,29 @@ LIB_SRC_C = $(addprefix lib/,\
libm/fmodf.c \
libm/nearbyintf.c \
libm/ef_sqrt.c \
libm/erf_lgamma.c \
libm/kf_rem_pio2.c \
libm/kf_sin.c \
libm/kf_cos.c \
libm/kf_tan.c \
libm/ef_rem_pio2.c \
libm/sf_erf.c \
libm/sf_sin.c \
libm/sf_cos.c \
libm/sf_tan.c \
libm/sf_frexp.c \
libm/sf_modf.c \
libm/sf_ldexp.c \
libm/acoshf.c \
libm/asinfacosf.c \
libm/asinhf.c \
libm/atanf.c \
libm/atanhf.c \
libm/atan2f.c \
libm/log1pf.c \
libm/roundf.c \
libm/wf_lgamma.c \
libm/wf_tgamma.c \
)

SHARED_SRC_C = $(addprefix shared/,\
Expand Down
3 changes: 3 additions & 0 deletions ports/esp8266/mpconfigport.h
Expand Up @@ -186,6 +186,9 @@ extern const struct _mp_obj_module_t mp_module_onewire;
mp_obj_t pin_irq_handler[16]; \
byte *uart0_rxbuf; \

// We need an implementation of the log2 function which is not a macro
#define MP_NEED_LOG2 (1)

// We need to provide a declaration/definition of alloca()
#include <alloca.h>

Expand Down

0 comments on commit b099db4

Please sign in to comment.