1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/esp_common/Makefile.dep
2024-04-30 09:49:36 +02:00

109 lines
2.4 KiB
Makefile

# additional modules dependencies
# Modules used by ESP*
USEMODULE += esp_common
USEMODULE += esp_common_periph
USEMODULE += esp_freertos
USEMODULE += esp_idf
USEMODULE += log
USEMODULE += periph
USEMODULE += periph_hwrng
USEMODULE += periph_uart
USEMODULE += random
ifneq (,$(filter mtd,$(USEMODULE)))
USEMODULE += periph_flash
endif
ifeq (xtensa,$(CPU_ARCH))
USEMODULE += esp_xtensa
USEMODULE += xtensa
endif
ifeq (rv32,$(CPU_ARCH))
USEMODULE += esp_riscv
endif
# Features used by ESP*
FEATURES_REQUIRED += newlib
ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE)))
FEATURES_REQUIRED += cpp
endif
ifneq (,$(filter esp_wifi_ap,$(USEMODULE)))
FEATURES_REQUIRED += esp_wifi_ap
USEMODULE += esp_wifi
endif
ifneq (,$(filter esp_wifi_enterprise,$(USEMODULE)))
FEATURES_REQUIRED += esp_wifi_enterprise
USEMODULE += esp_wifi
endif
ifneq (,$(filter netdev_default,$(USEMODULE)))
ifneq (,$(filter lwip,$(USEMODULE)))
# for lwip, use esp_wifi as default netdev if no other netdev is enabled
ifeq (,$(filter esp_eth,$(USEMODULE)))
USEMODULE += esp_wifi
endif
else
# otherwise use esp_now as default netdev if no other netdev is enabled
ifeq (,$(filter esp_wifi esp_eth nimble_netif nimble_netif_ext,$(USEMODULE)))
USEMODULE += esp_now
endif
endif
endif
ifneq (,$(filter esp_gdbstub,$(USEMODULE)))
USEMODULE += esp_gdb
endif
ifneq (,$(filter log_color,$(USEMODULE)))
USEMODULE += esp_log_colored
endif
ifneq (,$(filter 4 5,$(LOG_LEVEL)))
USEMODULE += esp_log_startup
endif
# default to using littlefs2 on the SPI flash
ifneq (,$(filter vfs_default,$(USEMODULE)))
USEMODULE += littlefs2
endif
# each device has SPI flash memory, but it has to be enabled explicitly
ifneq (,$(filter esp_spiffs,$(USEMODULE)))
USEMODULE += spiffs
endif
ifneq (,$(filter esp_freertos,$(USEMODULE)))
USEMODULE += esp_freertos_common
endif
ifneq (,$(filter esp_now,$(USEMODULE)))
USEMODULE += esp_wifi_any
endif
ifneq (,$(filter esp_wifi,$(USEMODULE)))
USEMODULE += esp_wifi_any
USEMODULE += netdev_eth
endif
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
USEMODULE += netopt
USEMODULE += ztimer_msec
endif
ifneq (,$(filter esp_eth esp_wifi esp_now,$(USEMODULE)))
USEMODULE += netdev_legacy_api
endif
ifneq (,$(filter esp_freertos_common,$(USEMODULE)))
ifneq (,$(filter ztimer_msec,$(USEMODULE)))
USEMODULE += core_thread_flags
endif
endif