mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
111fe80eb9
For a yet unknown reason, both esp8266 and esp32 get stuck in a reboot loop when thin archives are used. As a workaround, disable thin archives for now if esp_wifi is used. fixes #12258
124 lines
3.4 KiB
Makefile
124 lines
3.4 KiB
Makefile
# additional modules dependencies
|
|
|
|
ifneq (,$(filter cpp,$(FEATURES_USED)))
|
|
USEMODULE += pthread
|
|
BASELIBS += -lstdc++
|
|
endif
|
|
|
|
ifneq (,$(filter esp_eth,$(USEMODULE)))
|
|
USEMODULE += esp_idf_eth
|
|
USEMODULE += esp_idf_eth_phy
|
|
USEMODULE += gnrc
|
|
USEMODULE += netdev_eth
|
|
USEMODULE += netopt
|
|
USEMODULE += riot_freertos
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/ethernet
|
|
INCLUDES += -I$(ESP32_SDK_DIR)/components/ethernet/include
|
|
endif
|
|
|
|
ifneq (,$(filter esp_now,$(USEMODULE)))
|
|
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
|
USEMODULE += esp_wifi_any
|
|
USEMODULE += gnrc
|
|
USEMODULE += netopt
|
|
endif
|
|
|
|
ifneq (,$(filter esp_wifi,$(USEMODULE)))
|
|
$(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1))))
|
|
USEMODULE += esp_wifi_any
|
|
USEMODULE += gnrc
|
|
USEMODULE += netopt
|
|
USEMODULE += netdev_eth
|
|
endif
|
|
|
|
ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
|
|
# add additional modules used for any WiFi interface
|
|
USEMODULE += esp_idf_heap
|
|
USEMODULE += esp_idf_wpa_supplicant_crypto
|
|
USEMODULE += esp_idf_wpa_supplicant_port
|
|
USEMODULE += esp_idf_nvs_flash
|
|
USEMODULE += riot_freertos
|
|
|
|
# crypto and hashes produce symbol conflicts with esp_idf_wpa_supplicant_crypto
|
|
DISABLE_MODULE += crypto
|
|
DISABLE_MODULE += hashes
|
|
|
|
# thin archives trigger a reboot loop - see #12258
|
|
ARFLAGS = rcs
|
|
endif
|
|
|
|
ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE)))
|
|
# add additional modules required by esp_idf_nvs_flash
|
|
USEMODULE += mtd
|
|
USEMODULE += pthread
|
|
endif
|
|
|
|
ifneq (,$(filter riot_freertos,$(USEMODULE)))
|
|
# add additional modules required by riot_freertos
|
|
USEMODULE += xtimer
|
|
endif
|
|
|
|
ifneq (,$(filter periph_i2c,$(USEMODULE)))
|
|
ifneq (,$(filter esp_i2c_hw,$(USEMODULE)))
|
|
USEMODULE += core_thread_flags
|
|
USEMODULE += xtimer
|
|
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
|
|
endif
|
|
|
|
ifneq (, $(filter esp_spi_ram, $(DISABLE_MODULE)))
|
|
USEMODULE := $(filter-out esp_spi_ram, $(USEMODULE))
|
|
endif
|
|
|
|
# each device has SPI flash memory, but must be explicitly enabled
|
|
ifneq (,$(filter esp_spiffs,$(USEMODULE)))
|
|
USEMODULE += spiffs
|
|
endif
|
|
|
|
ifneq (,$(filter mtd,$(USEMODULE)))
|
|
USEMODULE += esp_idf_spi_flash
|
|
endif
|
|
|
|
ifneq (,$(filter ndn-riot,$(USEPKG)))
|
|
USEMODULE += crypto
|
|
USEMODULE += cipher_modes
|
|
endif
|
|
|
|
ifneq (,$(filter shell,$(USEMODULE)))
|
|
USEMODULE += ps
|
|
USEMODULE += xtimer
|
|
endif
|
|
|
|
# if SPI RAM is enabled, ESP-IDF heap and quot flash mode have to be used
|
|
ifneq (,$(filter esp_spi_ram,$(USEMODULE)))
|
|
USEMODULE += esp_idf_heap
|
|
export FLASH_MODE = qout
|
|
CFLAGS += -DFLASH_MODE_QOUT=1
|
|
else
|
|
ifeq ($(FLASH_MODE), qio)
|
|
CFLAGS += -DFLASH_MODE_QIO=1
|
|
endif
|
|
ifeq ($(FLASH_MODE), qout)
|
|
CFLAGS += -DFLASH_MODE_QOUT=1
|
|
endif
|
|
ifeq ($(FLASH_MODE), dio)
|
|
CFLAGS += -DFLASH_MODE_DIO=1
|
|
endif
|
|
ifeq ($(FLASH_MODE), dout)
|
|
CFLAGS += -DFLASH_MODE_DOUT=1
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter esp_idf_heap,$(USEMODULE)))
|
|
LINKFLAGS += -Wl,-wrap,_malloc_r
|
|
LINKFLAGS += -Wl,-wrap,_calloc_r
|
|
LINKFLAGS += -Wl,-wrap,_realloc_r
|
|
LINKFLAGS += -Wl,-wrap,_free_r
|
|
endif
|