2018-10-08 12:20:49 +02:00
|
|
|
# additional modules dependencies
|
|
|
|
|
2019-12-12 13:46:20 +01:00
|
|
|
include $(RIOTCPU)/esp_common/Makefile.dep
|
|
|
|
|
2021-12-30 10:18:24 +01:00
|
|
|
USEPKG += esp32_sdk
|
2020-03-09 18:01:24 +01:00
|
|
|
USEMODULE += esp_idf_driver
|
|
|
|
USEMODULE += esp_idf_esp32
|
|
|
|
USEMODULE += esp_idf_soc
|
|
|
|
|
2021-01-26 14:55:40 +01:00
|
|
|
ifneq (,$(filter newlib,$(USEMODULE)))
|
2021-04-26 17:27:03 +02:00
|
|
|
DEFAULT_MODULE += newlib_nano
|
2021-01-26 14:55:40 +01:00
|
|
|
endif
|
|
|
|
|
2018-10-08 12:20:49 +02:00
|
|
|
ifneq (,$(filter esp_eth,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += esp_freertos
|
|
|
|
USEMODULE += esp_idf_eth
|
|
|
|
USEMODULE += esp_idf_eth_phy
|
|
|
|
USEMODULE += netdev_eth
|
|
|
|
USEMODULE += netopt
|
2021-12-09 11:43:20 +01:00
|
|
|
USEMODULE += ztimer_msec
|
2018-10-08 12:20:49 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
# add additional modules used for any WiFi interface
|
|
|
|
USEMODULE += esp_freertos
|
|
|
|
USEMODULE += esp_idf_heap
|
|
|
|
USEMODULE += esp_idf_nvs_flash
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_crypto
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_port
|
2018-10-08 12:20:49 +02:00
|
|
|
endif
|
|
|
|
|
2019-08-16 15:47:12 +02:00
|
|
|
ifneq (,$(filter esp_wifi_enterprise,$(USEMODULE)))
|
|
|
|
# add additional modules used for WPA2 Enterprise mode
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_wpa2_eap_peer
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_wpa2_tls
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_wpa2_utils
|
|
|
|
endif
|
|
|
|
|
2018-11-10 14:14:49 +01:00
|
|
|
ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
# add additional modules required by esp_idf_nvs_flash
|
|
|
|
USEMODULE += mtd
|
2018-11-10 14:14:49 +01:00
|
|
|
endif
|
|
|
|
|
2020-01-09 17:00:23 +01:00
|
|
|
ifneq (,$(filter periph_rtc,$(USEMODULE)))
|
|
|
|
FEATURES_OPTIONAL += esp_rtc_timer_32k
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter esp_rtc_timer_32k,$(FEATURES_USED)))
|
|
|
|
USEMODULE += esp_rtc_timer_32k
|
|
|
|
endif
|
|
|
|
|
2020-03-09 17:53:46 +01:00
|
|
|
ifneq (,$(filter periph_adc periph_dac,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += periph_adc_ctrl
|
|
|
|
endif
|
|
|
|
|
2019-04-04 00:22:41 +02:00
|
|
|
ifneq (,$(filter periph_i2c,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
ifneq (,$(filter esp_i2c_hw,$(USEMODULE)))
|
|
|
|
USEMODULE += core_thread_flags
|
2021-12-09 11:43:20 +01:00
|
|
|
USEMODULE += ztimer_msec
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += periph_i2c_hw
|
|
|
|
else
|
|
|
|
# PLEASE NOTE: because of the very poor and faulty hardware implementation
|
|
|
|
# we use software implementation by default for the moment (if module
|
|
|
|
# esp_i2c_hw is not explicitly used)
|
|
|
|
USEMODULE += esp_i2c_sw
|
|
|
|
USEMODULE += periph_i2c_sw
|
|
|
|
endif
|
2018-10-08 12:20:49 +02:00
|
|
|
endif
|
|
|
|
|
2020-02-21 10:14:03 +01:00
|
|
|
ifneq (,$(filter esp_now esp_wifi esp_spi_ram,$(USEMODULE)))
|
|
|
|
# the ESP-IDF heap has to be used if SPI RAM is used
|
|
|
|
USEMODULE += esp_idf_heap
|
|
|
|
endif
|
|
|
|
|
2021-11-30 10:36:20 +01:00
|
|
|
ifneq (,$(filter esp_spi_ram,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += esp_spi_ram
|
|
|
|
endif
|
|
|
|
|
2018-11-10 14:14:49 +01:00
|
|
|
ifneq (,$(filter mtd,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += esp_idf_spi_flash
|
2018-10-08 12:20:49 +02:00
|
|
|
endif
|
|
|
|
|
2020-03-29 13:34:11 +02:00
|
|
|
ifneq (,$(filter periph_rtc,$(USEMODULE)))
|
|
|
|
USEMODULE += rtt_rtc
|
|
|
|
endif
|
|
|
|
|
2020-02-20 08:30:06 +01:00
|
|
|
ifneq (,$(filter pm_layered,$(USEMODULE)))
|
2020-03-29 13:27:53 +02:00
|
|
|
USEMODULE += periph_rtt
|
2020-02-20 08:30:06 +01:00
|
|
|
endif
|
|
|
|
|
2020-04-03 01:16:55 +02:00
|
|
|
ifneq (,$(filter periph_rtt,$(USEMODULE)))
|
|
|
|
USEMODULE += periph_rtt_hw_sys
|
|
|
|
USEMODULE += periph_rtt_hw_rtc
|
|
|
|
endif
|
|
|
|
|
2018-10-08 12:20:49 +02:00
|
|
|
ifneq (,$(filter shell,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += ps
|
2019-08-06 18:17:45 +02:00
|
|
|
endif
|
2021-11-30 11:32:29 +01:00
|
|
|
|
|
|
|
ifneq (,$(filter esp_jtag,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += esp_jtag
|
|
|
|
endif
|