2019-12-12 13:46:20 +01:00
|
|
|
# additional modules dependencies
|
|
|
|
|
2020-03-10 11:01:38 +01:00
|
|
|
# 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
|
2020-08-14 10:36:16 +02:00
|
|
|
|
2021-11-18 17:14:33 +01:00
|
|
|
ifneq (,$(filter mtd,$(USEMODULE)))
|
|
|
|
USEMODULE += periph_flash
|
|
|
|
endif
|
|
|
|
|
2022-06-25 19:43:01 +02:00
|
|
|
ifeq (xtensa,$(CPU_ARCH))
|
|
|
|
USEMODULE += esp_xtensa
|
2022-03-09 16:50:33 +01:00
|
|
|
USEMODULE += xtensa
|
|
|
|
endif
|
2020-03-10 11:01:38 +01:00
|
|
|
|
2022-07-20 17:18:19 +02:00
|
|
|
ifeq (rv32,$(CPU_ARCH))
|
2022-06-25 23:51:56 +02:00
|
|
|
USEMODULE += esp_riscv
|
|
|
|
endif
|
|
|
|
|
2020-07-10 16:29:05 +02:00
|
|
|
# Features used by ESP*
|
|
|
|
|
2021-01-26 14:55:40 +01:00
|
|
|
FEATURES_REQUIRED += newlib
|
2022-01-21 13:32:56 +01:00
|
|
|
|
|
|
|
ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += cpp
|
|
|
|
endif
|
2020-07-10 16:29:05 +02:00
|
|
|
|
2020-05-22 15:13:14 +02:00
|
|
|
ifneq (,$(filter esp_wifi_ap,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += esp_wifi_ap
|
|
|
|
USEMODULE += esp_wifi
|
|
|
|
endif
|
|
|
|
|
2020-03-10 11:49:42 +01:00
|
|
|
ifneq (,$(filter esp_wifi_enterprise,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += esp_wifi_enterprise
|
|
|
|
USEMODULE += esp_wifi
|
|
|
|
endif
|
|
|
|
|
2020-08-26 16:10:13 +02:00
|
|
|
ifneq (,$(filter netdev_default,$(USEMODULE)))
|
2020-03-10 11:49:42 +01:00
|
|
|
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
|
2022-08-12 16:37:48 +02:00
|
|
|
ifeq (,$(filter esp_wifi esp_eth nimble_netif nimble_netif_ext,$(USEMODULE)))
|
2020-03-10 11:49:42 +01:00
|
|
|
USEMODULE += esp_now
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-03-10 11:57:42 +01:00
|
|
|
ifneq (,$(filter esp_gdbstub,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_gdb
|
|
|
|
endif
|
|
|
|
|
2020-03-10 12:03:07 +01:00
|
|
|
ifneq (,$(filter log_color,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_log_colored
|
|
|
|
endif
|
|
|
|
|
2020-03-10 12:07:14 +01:00
|
|
|
ifneq (,$(filter 4 5,$(LOG_LEVEL)))
|
|
|
|
USEMODULE += esp_log_startup
|
|
|
|
endif
|
|
|
|
|
2022-06-01 23:46:03 +02:00
|
|
|
# default to using littlefs2 on the SPI flash
|
|
|
|
ifneq (,$(filter vfs_default,$(USEMODULE)))
|
|
|
|
USEMODULE += littlefs2
|
|
|
|
endif
|
|
|
|
|
2019-12-12 13:46:20 +01:00
|
|
|
# each device has SPI flash memory, but it has to be enabled explicitly
|
2019-12-13 07:50:53 +01:00
|
|
|
ifneq (,$(filter esp_spiffs,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += spiffs
|
|
|
|
endif
|
|
|
|
|
2019-12-13 07:50:53 +01:00
|
|
|
ifneq (,$(filter esp_freertos,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_freertos_common
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter esp_now,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += esp_wifi_any
|
|
|
|
endif
|
|
|
|
|
2019-12-13 07:50:53 +01:00
|
|
|
ifneq (,$(filter esp_wifi,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += esp_wifi_any
|
|
|
|
USEMODULE += netdev_eth
|
|
|
|
endif
|
|
|
|
|
2019-12-13 07:50:53 +01:00
|
|
|
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += netopt
|
2021-12-09 11:43:20 +01:00
|
|
|
USEMODULE += ztimer_msec
|
2019-12-12 13:46:20 +01:00
|
|
|
endif
|
2022-06-17 07:17:40 +02:00
|
|
|
|
2024-04-26 21:31:27 +02:00
|
|
|
ifneq (,$(filter esp_eth esp_wifi esp_now,$(USEMODULE)))
|
|
|
|
USEMODULE += netdev_legacy_api
|
|
|
|
endif
|
|
|
|
|
2022-06-17 07:17:40 +02:00
|
|
|
ifneq (,$(filter esp_freertos_common,$(USEMODULE)))
|
|
|
|
ifneq (,$(filter ztimer_msec,$(USEMODULE)))
|
|
|
|
USEMODULE += core_thread_flags
|
|
|
|
endif
|
|
|
|
endif
|