Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
e1a7aa23
Commit
e1a7aa23
authored
Dec 08, 2023
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ports: Switch build to use common lib/libm list of source files.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
241dbac9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
352 deletions
+33
-352
ports/esp8266/Makefile
ports/esp8266/Makefile
+2
-29
ports/mimxrt/Makefile
ports/mimxrt/Makefile
+7
-20
ports/nrf/Makefile
ports/nrf/Makefile
+4
-58
ports/qemu-arm/Makefile
ports/qemu-arm/Makefile
+2
-21
ports/renesas-ra/Makefile
ports/renesas-ra/Makefile
+7
-84
ports/rp2/CMakeLists.txt
ports/rp2/CMakeLists.txt
+2
-27
ports/samd/Makefile
ports/samd/Makefile
+2
-29
ports/stm32/Makefile
ports/stm32/Makefile
+7
-84
No files found.
ports/esp8266/Makefile
View file @
e1a7aa23
...
...
@@ -127,35 +127,8 @@ SRC_C += \
modespnow.c
endif
LIB_SRC_C
=
$(
addprefix
lib/,
\
libm/math.c
\
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
\
)
LIB_SRC_C
+=
$(SRC_LIB_LIBM_C)
LIB_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
SHARED_SRC_C
=
$(
addprefix
shared/,
\
libc/__errno.c
\
...
...
ports/mimxrt/Makefile
View file @
e1a7aa23
...
...
@@ -269,26 +269,19 @@ endif
# Math library source files
ifeq
($(MICROPY_FLOAT_IMPL),double)
LIBM_SRC_C
+=
$(
addprefix
lib/libm_dbl/,
\
__cos.c __expo2.c __fpclassify.c __rem_pio2.c __rem_pio2_large.c __signbit.c __sin.c __tan.c acos.c acosh.c
\
asin.c asinh.c atan.c atan2.c atanh.c ceil.c copysign.c cos.c cosh.c erf.c exp.c expm1.c floor.c fmod.c
\
frexp.c ldexp.c lgamma.c log.c log10.c log1p.c modf.c nearbyint.c pow.c rint.c round.c scalbn.c sin.c
\
sinh.c tan.c tanh.c tgamma.c trunc.c
)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_C)
#
ifeq
($(SUPPORTS_HARDWARE_FP_DOUBLE),1)
LIBM_SRC_C
+=
lib/libm_dbl/thumb_vfp_sqrt.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_SQRT_HW_C)
else
LIBM_SRC_C
+=
lib/libm_dbl/sqrt.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_SQRT_SW_C)
endif
else
LIBM_SRC_C
+=
$(
addprefix
lib/libm/,
\
acoshf.c asinfacosf.c asinhf.c atan2f.c atanf.c atanhf.c ef_rem_pio2.c erf_lgamma.c fmodf.c kf_cos.c
\
kf_rem_pio2.c kf_sin.c kf_tan.c log1pf.c math.c nearbyintf.c roundf.c sf_cos.c sf_erf.c sf_frexp.c sf_ldexp.c
\
sf_modf.c sf_sin.c sf_tan.c wf_lgamma.c wf_tgamma.c
)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_C)
ifeq
($(SUPPORTS_HARDWARE_FP_SINGLE),1)
LIBM_SRC_C
+=
lib/libm/thumb_vfp_sqrtf.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_HW_C)
else
LIBM_SRC_C
+=
lib/libm/ef_sqrt.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
endif
endif
...
...
@@ -439,15 +432,9 @@ endif
# =============================================================================
LIBS
=
$(
shell
$(CC)
$(CFLAGS)
-print-libgcc-file-name
)
LIBM_O
=
$(
addprefix
$(BUILD)
/,
$(LIBM_SRC_C:.c=.o)
)
# Too many warnings in libm_dbl, disable for now.
ifeq
($(MICROPY_FLOAT_IMPL),double)
$(LIBM_O)
:
CFLAGS := $(filter-out -Wdouble-promotion -Wfloat-conversion
,
$(CFLAGS))
endif
OBJ
+=
$(PY_O)
OBJ
+=
$(
LIBM_O
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(LIBM_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(SHARED_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(DRIVERS_SRC_C:.c=.o)
)
...
...
ports/nrf/Makefile
View file @
e1a7aa23
...
...
@@ -167,69 +167,15 @@ LIBS = \
ifeq
($(MCU_VARIANT), nrf52)
SRC_LIB_C
+=
$(
addprefix
lib/,
\
libm/math.c
\
libm/fmodf.c
\
libm/nearbyintf.c
\
libm/ef_sqrt.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_sin.c
\
libm/sf_cos.c
\
libm/sf_tan.c
\
libm/sf_frexp.c
\
libm/sf_modf.c
\
libm/sf_ldexp.c
\
libm/asinfacosf.c
\
libm/acoshf.c
\
libm/asinhf.c
\
libm/atanf.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_LIB_C
+=
$(SRC_LIB_LIBM_C)
SRC_LIB_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
endif
ifeq
($(MCU_VARIANT), nrf91)
SRC_LIB_C
+=
$(
addprefix
lib/,
\
libm/math.c
\
libm/fmodf.c
\
libm/nearbyintf.c
\
libm/ef_sqrt.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_sin.c
\
libm/sf_cos.c
\
libm/sf_tan.c
\
libm/sf_frexp.c
\
libm/sf_modf.c
\
libm/sf_ldexp.c
\
libm/asinfacosf.c
\
libm/acoshf.c
\
libm/asinhf.c
\
libm/atanf.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_LIB_C
+=
$(SRC_LIB_LIBM_C)
SRC_LIB_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
include
drivers/secureboot/secureboot.mk
...
...
ports/qemu-arm/Makefile
View file @
e1a7aa23
...
...
@@ -88,27 +88,8 @@ SRC_TEST_C = \
test_main.c
\
lib/tinytest/tinytest.c
\
LIB_SRC_C
+=
$(
addprefix
lib/,
\
libm/math.c
\
libm/fmodf.c
\
libm/nearbyintf.c
\
libm/ef_sqrt.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_sin.c
\
libm/sf_cos.c
\
libm/sf_tan.c
\
libm/sf_frexp.c
\
libm/sf_modf.c
\
libm/sf_ldexp.c
\
libm/asinfacosf.c
\
libm/atanf.c
\
libm/atan2f.c
\
libm/roundf.c
\
)
LIB_SRC_C
+=
$(SRC_LIB_LIBM_C)
LIB_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
OBJ_COMMON
=
OBJ_COMMON
+=
$(PY_O)
...
...
ports/renesas-ra/Makefile
View file @
e1a7aa23
...
...
@@ -198,96 +198,19 @@ TINYUSB_SRC_C += $(addprefix lib/tinyusb/,\
)
ifeq
($(MICROPY_FLOAT_IMPL),double)
LIBM_SRC_C
+=
$(
addprefix
lib/libm_dbl/,
\
__cos.c
\
__expo2.c
\
__fpclassify.c
\
__rem_pio2.c
\
__rem_pio2_large.c
\
__signbit.c
\
__sin.c
\
__tan.c
\
acos.c
\
acosh.c
\
asin.c
\
asinh.c
\
atan.c
\
atan2.c
\
atanh.c
\
ceil.c
\
cos.c
\
cosh.c
\
copysign.c
\
erf.c
\
exp.c
\
expm1.c
\
floor.c
\
fmod.c
\
frexp.c
\
ldexp.c
\
lgamma.c
\
log.c
\
log10.c
\
log1p.c
\
modf.c
\
nearbyint.c
\
pow.c
\
rint.c
\
round.c
\
scalbn.c
\
sin.c
\
sinh.c
\
tan.c
\
tanh.c
\
tgamma.c
\
trunc.c
\
)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_C)
ifeq
($(SUPPORTS_HARDWARE_FP_DOUBLE),1)
LIBM_SRC_C
+=
lib/libm_dbl/thumb_vfp_sqrt.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_SQRT_HW_C)
else
LIBM_SRC_C
+=
lib/libm_dbl/sqrt.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_SQRT_SW_C)
endif
else
LIBM_SRC_C
+=
$(
addprefix
lib/libm/,
\
math.c
\
acoshf.c
\
asinfacosf.c
\
asinhf.c
\
atan2f.c
\
atanf.c
\
atanhf.c
\
ef_rem_pio2.c
\
erf_lgamma.c
\
fmodf.c
\
kf_cos.c
\
kf_rem_pio2.c
\
kf_sin.c
\
kf_tan.c
\
log1pf.c
\
nearbyintf.c
\
roundf.c
\
sf_cos.c
\
sf_erf.c
\
sf_frexp.c
\
sf_ldexp.c
\
sf_modf.c
\
sf_sin.c
\
sf_tan.c
\
wf_lgamma.c
\
wf_tgamma.c
\
)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_C)
ifeq
($(SUPPORTS_HARDWARE_FP_SINGLE),1)
LIBM_SRC_C
+=
lib/libm/thumb_vfp_sqrtf.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_HW_C)
else
LIBM_SRC_C
+=
lib/libm/ef_sqrt.c
endif
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
endif
LIBM_O
=
$(
addprefix
$(BUILD)
/,
$(LIBM_SRC_C:.c=.o)
)
# Too many warnings in libm_dbl, disable for now.
ifeq
($(MICROPY_FLOAT_IMPL),double)
$(LIBM_O)
:
CFLAGS := $(filter-out -Wdouble-promotion -Wfloat-conversion
,
$(CFLAGS))
endif
DRIVERS_SRC_C
+=
$(
addprefix
drivers/,
\
...
...
@@ -470,7 +393,7 @@ endif
OBJ
+=
$(PY_O)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(LIB_SRC_C:.c=.o)
)
OBJ
+=
$(
LIBM_O
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(LIBM_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(SHARED_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(DRIVERS_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(HAL_SRC_C:.c=.o)
)
...
...
ports/rp2/CMakeLists.txt
View file @
e1a7aa23
...
...
@@ -209,33 +209,8 @@ target_sources(pico_float_micropython INTERFACE
${
PICO_SDK_PATH
}
/src/rp2_common/pico_float/float_aeabi.S
${
PICO_SDK_PATH
}
/src/rp2_common/pico_float/float_init_rom.c
${
PICO_SDK_PATH
}
/src/rp2_common/pico_float/float_v1_rom_shim.S
${
MICROPY_DIR
}
/lib/libm/math.c
${
MICROPY_DIR
}
/lib/libm/acoshf.c
${
MICROPY_DIR
}
/lib/libm/asinfacosf.c
${
MICROPY_DIR
}
/lib/libm/asinhf.c
${
MICROPY_DIR
}
/lib/libm/atan2f.c
${
MICROPY_DIR
}
/lib/libm/atanf.c
${
MICROPY_DIR
}
/lib/libm/atanhf.c
${
MICROPY_DIR
}
/lib/libm/ef_rem_pio2.c
${
MICROPY_DIR
}
/lib/libm/ef_sqrt.c
${
MICROPY_DIR
}
/lib/libm/erf_lgamma.c
${
MICROPY_DIR
}
/lib/libm/fmodf.c
${
MICROPY_DIR
}
/lib/libm/kf_cos.c
${
MICROPY_DIR
}
/lib/libm/kf_rem_pio2.c
${
MICROPY_DIR
}
/lib/libm/kf_sin.c
${
MICROPY_DIR
}
/lib/libm/kf_tan.c
${
MICROPY_DIR
}
/lib/libm/log1pf.c
${
MICROPY_DIR
}
/lib/libm/nearbyintf.c
${
MICROPY_DIR
}
/lib/libm/roundf.c
${
MICROPY_DIR
}
/lib/libm/sf_cos.c
${
MICROPY_DIR
}
/lib/libm/sf_erf.c
${
MICROPY_DIR
}
/lib/libm/sf_frexp.c
${
MICROPY_DIR
}
/lib/libm/sf_ldexp.c
${
MICROPY_DIR
}
/lib/libm/sf_modf.c
${
MICROPY_DIR
}
/lib/libm/sf_sin.c
${
MICROPY_DIR
}
/lib/libm/sf_tan.c
${
MICROPY_DIR
}
/lib/libm/wf_lgamma.c
${
MICROPY_DIR
}
/lib/libm/wf_tgamma.c
${
MICROPY_SOURCE_LIB_LIBM
}
${
MICROPY_SOURCE_LIB_LIBM_SQRT_SW
}
${
MICROPY_PORT_DIR
}
/libm_extra.c
)
...
...
ports/samd/Makefile
View file @
e1a7aa23
...
...
@@ -142,35 +142,8 @@ ASF4_SRC_C += $(addprefix lib/asf4/$(MCU_SERIES_LOWER)/,\
hpl/nvmctrl/hpl_nvmctrl.c
\
)
LIBM_SRC_C
+=
$(
addprefix
lib/libm/,
\
acoshf.c
\
asinfacosf.c
\
asinhf.c
\
atan2f.c
\
atanf.c
\
atanhf.c
\
ef_rem_pio2.c
\
ef_sqrt.c
\
erf_lgamma.c
\
fmodf.c
\
kf_cos.c
\
kf_rem_pio2.c
\
kf_sin.c
\
kf_tan.c
\
log1pf.c
\
math.c
\
nearbyintf.c
\
roundf.c
\
sf_cos.c
\
sf_erf.c
\
sf_frexp.c
\
sf_ldexp.c
\
sf_modf.c
\
sf_sin.c
\
sf_tan.c
\
wf_lgamma.c
\
wf_tgamma.c
\
)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_C)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
TINYUSB_SRC_C
+=
$(
addprefix
lib/tinyusb/src/,
\
class/cdc/cdc_device.c
\
...
...
ports/stm32/Makefile
View file @
e1a7aa23
...
...
@@ -189,96 +189,19 @@ SHARED_SRC_C += $(addprefix shared/,\
)
ifeq
($(MICROPY_FLOAT_IMPL),double)
LIBM_SRC_C
+=
$(
addprefix
lib/libm_dbl/,
\
__cos.c
\
__expo2.c
\
__fpclassify.c
\
__rem_pio2.c
\
__rem_pio2_large.c
\
__signbit.c
\
__sin.c
\
__tan.c
\
acos.c
\
acosh.c
\
asin.c
\
asinh.c
\
atan.c
\
atan2.c
\
atanh.c
\
ceil.c
\
cos.c
\
cosh.c
\
copysign.c
\
erf.c
\
exp.c
\
expm1.c
\
floor.c
\
fmod.c
\
frexp.c
\
ldexp.c
\
lgamma.c
\
log.c
\
log10.c
\
log1p.c
\
modf.c
\
nearbyint.c
\
pow.c
\
rint.c
\
round.c
\
scalbn.c
\
sin.c
\
sinh.c
\
tan.c
\
tanh.c
\
tgamma.c
\
trunc.c
\
)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_C)
ifeq
($(SUPPORTS_HARDWARE_FP_DOUBLE),1)
LIBM_SRC_C
+=
lib/libm_dbl/thumb_vfp_sqrt.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_SQRT_HW_C)
else
LIBM_SRC_C
+=
lib/libm_dbl/sqrt.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_DBL_SQRT_SW_C)
endif
else
LIBM_SRC_C
+=
$(
addprefix
lib/libm/,
\
math.c
\
acoshf.c
\
asinfacosf.c
\
asinhf.c
\
atan2f.c
\
atanf.c
\
atanhf.c
\
ef_rem_pio2.c
\
erf_lgamma.c
\
fmodf.c
\
kf_cos.c
\
kf_rem_pio2.c
\
kf_sin.c
\
kf_tan.c
\
log1pf.c
\
nearbyintf.c
\
roundf.c
\
sf_cos.c
\
sf_erf.c
\
sf_frexp.c
\
sf_ldexp.c
\
sf_modf.c
\
sf_sin.c
\
sf_tan.c
\
wf_lgamma.c
\
wf_tgamma.c
\
)
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_C)
ifeq
($(SUPPORTS_HARDWARE_FP_SINGLE),1)
LIBM_SRC_C
+=
lib/libm/thumb_vfp_sqrtf.c
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_HW_C)
else
LIBM_SRC_C
+=
lib/libm/ef_sqrt.c
endif
LIBM_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
endif
LIBM_O
=
$(
addprefix
$(BUILD)
/,
$(LIBM_SRC_C:.c=.o)
)
# Too many warnings in libm_dbl, disable for now.
ifeq
($(MICROPY_FLOAT_IMPL),double)
$(LIBM_O)
:
CFLAGS := $(filter-out -Wdouble-promotion -Wfloat-conversion
,
$(CFLAGS))
endif
DRIVERS_SRC_C
+=
$(
addprefix
drivers/,
\
...
...
@@ -499,7 +422,7 @@ endif # MICROPY_PY_BLUETOOTH
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(SRC_O)
)
OBJ
+=
$(PY_O)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(LIB_SRC_C:.c=.o)
)
OBJ
+=
$(
LIBM_O
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(LIBM_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(SHARED_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(DRIVERS_SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(HAL_SRC_C:.c=.o)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment