nrf: Add more math sources to Makefile, and enable log2 implementation.

This commit adds a few math functions to the source list in the Makefile,
and implements the log2f function, so that ulab can be compiled on the nrf
boards.  It also addresses part of #5162.
This commit is contained in:
Zoltán Vörös 2021-06-05 19:53:46 +02:00 committed by Damien George
parent de2e081260
commit 8c02b94946
2 changed files with 22 additions and 1 deletions

View File

@ -160,8 +160,16 @@ SRC_LIB += $(addprefix lib/,\
libm/sf_modf.c \ libm/sf_modf.c \
libm/sf_ldexp.c \ libm/sf_ldexp.c \
libm/asinfacosf.c \ libm/asinfacosf.c \
libm/acoshf.c \
libm/asinhf.c \
libm/atanf.c \ libm/atanf.c \
libm/atan2f.c \ libm/atan2f.c \
libm/atanhf.c \
libm/log1pf.c \
libm/sf_erf.c \
libm/erf_lgamma.c \
libm/wf_lgamma.c \
libm/wf_tgamma.c \
libm/roundf.c \ libm/roundf.c \
) )
@ -186,8 +194,17 @@ SRC_LIB += $(addprefix lib/,\
libm/sf_modf.c \ libm/sf_modf.c \
libm/sf_ldexp.c \ libm/sf_ldexp.c \
libm/asinfacosf.c \ libm/asinfacosf.c \
libm/acoshf.c \
libm/asinhf.c \
libm/atanf.c \ libm/atanf.c \
libm/atan2f.c \ libm/atan2f.c \
libm/atanhf.c \
libm/log1pf.c \
libm/sf_erf.c \
libm/erf_lgamma.c \
libm/wf_lgamma.c \
libm/wf_tgamma.c \
libm/roundf.c \
) )
SRC_NRFX += $(addprefix lib/nrfx/drivers/src/,\ SRC_NRFX += $(addprefix lib/nrfx/drivers/src/,\

View File

@ -330,3 +330,7 @@ extern const struct _mp_obj_module_t ble_module;
#include <alloca.h> #include <alloca.h>
#define MICROPY_PIN_DEFS_PORT_H "pin_defs_nrf5.h" #define MICROPY_PIN_DEFS_PORT_H "pin_defs_nrf5.h"
#ifndef MP_NEED_LOG2
#define MP_NEED_LOG2 (1)
#endif