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
|
2021-12-30 10:27:28 +01:00
|
|
|
|
2022-06-19 08:19:26 +02:00
|
|
|
USEMODULE += esp_idf_api
|
2022-02-01 22:11:43 +01:00
|
|
|
USEMODULE += esp_idf_common
|
2022-06-18 18:57:19 +02:00
|
|
|
USEMODULE += esp_idf_efuse
|
2022-02-01 22:11:43 +01:00
|
|
|
USEMODULE += esp_bootloader
|
2020-03-09 18:01:24 +01:00
|
|
|
|
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
|
|
|
|
|
2022-05-13 18:56:17 +02:00
|
|
|
ifneq (,$(filter cpp,$(USEMODULE)))
|
2022-03-02 15:16:23 +01:00
|
|
|
USEMODULE += pthread
|
|
|
|
endif
|
|
|
|
|
2022-08-11 10:14:56 +02:00
|
|
|
ifneq (,$(filter esp_ble,$(USEMODULE)))
|
|
|
|
# add additional modules and packages used for any BLE interface
|
|
|
|
FEATURES_REQUIRED += esp_ble
|
|
|
|
USEMODULE += esp_idf_ble
|
|
|
|
USEPKG += esp32_sdk_lib_phy
|
|
|
|
ifeq (esp32,$(CPU_FAM))
|
|
|
|
FEATURES_REQUIRED += esp_ble_esp32
|
|
|
|
USEPKG += esp32_sdk_lib_bt_esp32
|
2022-08-26 18:23:10 +02:00
|
|
|
else ifneq (,$(filter esp32c3 esp32s3,$(CPU_FAM)))
|
2022-08-26 17:10:36 +02:00
|
|
|
FEATURES_REQUIRED += esp_ble_esp32c3
|
|
|
|
USEPKG += esp32_sdk_lib_bt_esp32c3
|
2022-08-11 10:14:56 +02:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-10-08 12:20:49 +02:00
|
|
|
ifneq (,$(filter esp_eth,$(USEMODULE)))
|
2024-05-27 16:12:24 +02:00
|
|
|
FEATURES_REQUIRED += periph_eth
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += esp_idf_eth
|
2022-02-01 22:11:43 +01:00
|
|
|
USEMODULE += esp_idf_event
|
|
|
|
USEMODULE += esp_idf_gpio
|
|
|
|
USEMODULE += esp_idf_spi_flash
|
2019-12-12 13:46:20 +01:00
|
|
|
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)))
|
2022-02-01 22:11:43 +01:00
|
|
|
# add additional modules and packages used for any WiFi interface
|
|
|
|
USEPKG += esp32_sdk_lib_phy
|
|
|
|
USEPKG += esp32_sdk_lib_wifi
|
|
|
|
USEMODULE += esp_idf_event
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += esp_idf_heap
|
|
|
|
USEMODULE += esp_idf_nvs_flash
|
2022-02-01 22:11:43 +01:00
|
|
|
USEMODULE += esp_idf_spi_flash
|
|
|
|
USEMODULE += esp_idf_wifi
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant
|
2022-03-10 15:34:19 +01:00
|
|
|
USEMODULE += esp_idf_wpa_supplicant_esp_supplicant
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_port
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_ap
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_common
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_crypto
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_eap_peer
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_rsn_supp
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_tls
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_utils
|
|
|
|
USEMODULE += esp_idf_wpa_supplicant_wps
|
2022-02-01 22:11:43 +01:00
|
|
|
USEMODULE += pthread
|
2018-10-08 12:20:49 +02:00
|
|
|
endif
|
|
|
|
|
2022-06-18 18:57:19 +02:00
|
|
|
ifneq (,$(filter esp_hw_counter,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += esp_hw_counter
|
|
|
|
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
|
2022-03-02 15:16:23 +01:00
|
|
|
USEMODULE += pthread
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += mtd
|
2018-11-10 14:14:49 +01:00
|
|
|
endif
|
|
|
|
|
2022-06-28 13:36:57 +02:00
|
|
|
ifneq (,$(filter esp_idf_wifi,$(USEMODULE)))
|
|
|
|
# add additional modules required by esp_idf_wifi
|
|
|
|
USEMODULE += esp_idf_adc
|
2020-01-09 17:00:23 +01:00
|
|
|
endif
|
|
|
|
|
2022-06-08 16:47:33 +02:00
|
|
|
ifneq (,$(filter periph_rtt,$(USEMODULE)))
|
2022-06-28 13:36:57 +02:00
|
|
|
FEATURES_OPTIONAL += esp_rtc_timer_32k
|
2020-01-09 17:00:23 +01:00
|
|
|
endif
|
|
|
|
|
2022-06-28 13:36:57 +02:00
|
|
|
ifneq (,$(filter esp_rtc_timer_32k,$(FEATURES_USED)))
|
|
|
|
USEMODULE += esp_rtc_timer_32k
|
2020-03-09 17:53:46 +01:00
|
|
|
endif
|
|
|
|
|
2022-06-19 13:34:04 +02:00
|
|
|
ifneq (,$(filter periph_gpio,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_idf_gpio
|
|
|
|
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)))
|
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
|
|
|
|
|
2023-06-28 17:31:54 +02:00
|
|
|
ifneq (,$(filter periph_sdmmc,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_idf_sdmmc
|
|
|
|
USEMODULE += periph_gpio_irq
|
|
|
|
endif
|
|
|
|
|
2021-11-30 10:36:20 +01:00
|
|
|
ifneq (,$(filter esp_spi_ram,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += esp_spi_ram
|
2022-08-09 15:56:39 +02:00
|
|
|
FEATURES_OPTIONAL += esp_spi_oct
|
2022-02-01 22:11:43 +01:00
|
|
|
USEMODULE += esp_idf_gpio
|
|
|
|
USEMODULE += esp_idf_heap
|
|
|
|
USEMODULE += esp_idf_spi_flash
|
|
|
|
USEMODULE += esp_idf_spi_ram
|
2021-11-30 10:36:20 +01:00
|
|
|
endif
|
|
|
|
|
2022-08-09 15:56:39 +02:00
|
|
|
ifneq (,$(filter esp_spi_oct,$(FEATURES_USED)))
|
|
|
|
USEMODULE += esp_spi_oct
|
|
|
|
endif
|
|
|
|
|
2022-06-15 07:31:02 +02:00
|
|
|
ifneq (,$(filter esp_idf_heap,$(USEMODULE)))
|
|
|
|
# The ESP-IDF heap component uses the TLSF implementation that is part of
|
|
|
|
# the component. To avoid conflicts with modules and packages that use the
|
|
|
|
# RIOT package `tlsf`, this package is also used for the ESP-IDF heap instead
|
|
|
|
# of its own implementation. There does not seem to be any differences in
|
|
|
|
# the implementations of TLSF with the exception of heap poisoning, which
|
|
|
|
# is not configured.
|
|
|
|
USEPKG += tlsf
|
|
|
|
endif
|
|
|
|
|
2023-08-02 19:06:33 +02:00
|
|
|
ifneq (,$(filter lcd_parallel_ll_mcu,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_lcd
|
|
|
|
USEMODULE += esp_idf_lcd
|
|
|
|
USEMODULE += esp_idf_heap
|
|
|
|
endif
|
|
|
|
|
2023-01-07 13:11:31 +01:00
|
|
|
ifneq (,$(filter mtd periph_flashpage,$(USEMODULE)))
|
2019-12-12 13:46:20 +01:00
|
|
|
USEMODULE += esp_idf_spi_flash
|
2018-10-08 12:20:49 +02:00
|
|
|
endif
|
|
|
|
|
2022-08-11 12:46:41 +02:00
|
|
|
ifneq (,$(filter nimble,$(USEPKG)))
|
|
|
|
USEMODULE += esp_ble
|
|
|
|
USEMODULE += esp_ble_nimble
|
|
|
|
USEMODULE += nimble_host
|
|
|
|
USEMODULE += nimble_transport_hci_h4
|
|
|
|
USEMODULE += ztimer_msec
|
|
|
|
endif
|
|
|
|
|
2022-06-28 13:36:57 +02:00
|
|
|
ifneq (,$(filter periph_adc,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_idf_adc
|
|
|
|
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
|
|
|
|
|
2022-09-22 11:16:57 +02:00
|
|
|
ifneq (,$(filter periph_usbdev,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_idf_usb
|
2022-09-24 23:36:15 +02:00
|
|
|
USEMODULE += usbdev_synopsys_dwc2
|
2022-09-22 11:16:57 +02:00
|
|
|
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
|
|
|
|
2022-12-29 00:35:41 +01:00
|
|
|
ifneq (,$(filter stdio_usb_serial_jtag, $(USEMODULE)))
|
|
|
|
USEMODULE += tsrb
|
|
|
|
ifneq (,$(filter stdin,$(USEMODULE)))
|
|
|
|
USEMODULE += stdio_usb_serial_jtag_rx
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter stdio_usb_serial_jtag_rx, $(USEMODULE)))
|
|
|
|
USEMODULE += isrpipe
|
|
|
|
USEMODULE += stdio_available
|
|
|
|
endif
|
|
|
|
|
2022-09-14 09:28:31 +02:00
|
|
|
ifneq (,$(filter tinyusb_portable_espressif,$(USEMODULE)))
|
|
|
|
USEMODULE += esp_idf_usb
|
|
|
|
endif
|
|
|
|
|
2021-11-30 11:32:29 +01:00
|
|
|
ifneq (,$(filter esp_jtag,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += esp_jtag
|
|
|
|
endif
|
2023-01-06 01:37:28 +01:00
|
|
|
|
|
|
|
# enable bootloader reset over USB, requires CDC ACM to be used
|
|
|
|
ifneq (,$(filter usbus_cdc_acm tinyusb_class_cdc,$(USEMODULE)))
|
|
|
|
USEMODULE += usb_board_reset
|
|
|
|
endif
|