2020-03-27 02:30:11 +01:00
|
|
|
# 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
|
|
|
|
|
2021-01-26 14:55:40 +01:00
|
|
|
FEATURES_REQUIRED_ANY += newlib|picolibc
|
|
|
|
ifneq (,$(filter newlib,$(USEMODULE)))
|
2019-09-25 22:13:08 +02:00
|
|
|
# use the nano-specs of Newlib when available
|
2021-04-26 17:27:03 +02:00
|
|
|
DEFAULT_MODULE += newlib_nano
|
2019-09-25 22:13:08 +02:00
|
|
|
endif
|
2020-03-27 02:30:11 +01:00
|
|
|
|
|
|
|
# Export the peripheral drivers to be linked into the final binary:
|
|
|
|
USEMODULE += periph
|
2020-03-27 13:17:52 +01:00
|
|
|
|
|
|
|
# Use Hardware FPU by default if present
|
|
|
|
FEATURES_OPTIONAL += cortexm_fpu
|
|
|
|
ifneq (,$(filter cortexm_fpu,$(FEATURES_USED)))
|
|
|
|
DEFAULT_MODULE += cortexm_fpu
|
|
|
|
endif
|
2020-06-25 13:14:59 +02:00
|
|
|
|
|
|
|
# Enable the MPU stack guard if develhelp is enabled
|
|
|
|
ifeq (1, $(DEVELHELP))
|
|
|
|
FEATURES_OPTIONAL += cortexm_mpu
|
|
|
|
endif
|
2020-12-10 09:59:21 +01:00
|
|
|
|
|
|
|
# Make calls to malloc and friends thread-safe
|
|
|
|
USEMODULE += malloc_thread_safe
|
2022-05-04 20:43:35 +02:00
|
|
|
|
|
|
|
# CMSIS headers are fetched using a package
|
|
|
|
USEPKG += cmsis
|