1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/atmega_common/Makefile.dep
Marian Buschsieweke 902aa29b62
sys/malloc_thread_safe: split out of cpu/atmega_common
Split out Gunar Schorcht's clever approach to provide thread safe malloc for
AVR into a system module and make AVR depend on this. This allows other
platforms to also use this.
2020-12-17 15:39:05 +01:00

49 lines
1.3 KiB
Makefile

# avr libc needs some RIOT-specific support code
USEMODULE += avr_libc_extra
# tell the build system to build the atmega common files
USEMODULE += atmega_common
# peripheral drivers are linked into the final binary
USEMODULE += atmega_common_periph
# The AVR-libc provides no thread safe malloc implementation and has no hooks
# to inject. Use malloc_thread_safe to link calls to malloc to safe wrappers
# instead.
USEMODULE += malloc_thread_safe
# the atmel port uses stdio_uart by default
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_uart
endif
# expand atmega_pcint module
ifneq (,$(filter atmega_pcint,$(USEMODULE)))
USEMODULE += atmega_pcint0
endif
# feature for atmega_pcint0 module
ifneq (,$(filter atmega_pcint0,$(USEMODULE)))
FEATURES_REQUIRED += atmega_pcint0
endif
# feature for atmega_pcint1 module
ifneq (,$(filter atmega_pcint1,$(USEMODULE)))
FEATURES_REQUIRED += atmega_pcint1
endif
# feature for atmega_pcint2 module
ifneq (,$(filter atmega_pcint2,$(USEMODULE)))
FEATURES_REQUIRED += atmega_pcint2
endif
# feature for atmega_pcint3 module
ifneq (,$(filter atmega_pcint3,$(USEMODULE)))
FEATURES_REQUIRED += atmega_pcint3
endif
# static C++ constructors need guards for thread safe initialization
ifneq (,$(filter cpp,$(FEATURES_USED)))
USEMODULE += cxx_ctor_guards
endif