1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/cortexm_common/Makefile.dep

38 lines
1.3 KiB
Makefile
Raw Normal View History

# Tell the build system that the CPU depends on the Cortex-M common files:
USEMODULE += cortexm_common
# include common periph code
USEMODULE += cortexm_common_periph
# Ensure newlib is not added if picolibc is already in FEATURES_USED or USEMODULE.
# nucleo-l011k4 doesn't use features to forces picolibc but directly set it in
# USEMODULE. This is because during the first pass of the dependency resolution,
# with the feature mechanism, the picolib feature is not present in FEATURES_USED
# at this staged and as a result newlib modules are wrongly added.
ifneq (,$(filter picolibc,$(FEATURES_USED) $(USEMODULE)))
# Use Picolibc when explicitly selected
USEMODULE += picolibc
else
# all cortex MCU's use newlib as libc
USEMODULE += newlib
# use the nano-specs of Newlib when available
USEMODULE += newlib_nano
endif
# Export the peripheral drivers to be linked into the final binary:
USEMODULE += periph
# Use Hardware FPU by default if present
FEATURES_OPTIONAL += cortexm_fpu
ifneq (,$(filter cortexm_fpu,$(FEATURES_USED)))
DEFAULT_MODULE += cortexm_fpu
endif
# Enable the MPU stack guard if develhelp is enabled
ifeq (1, $(DEVELHELP))
FEATURES_OPTIONAL += cortexm_mpu
endif
# Make calls to malloc and friends thread-safe
USEMODULE += malloc_thread_safe