diff --git a/boards/esp32-olimex-evb/Makefile.include b/boards/esp32-olimex-evb/Makefile.include index 020c145151..6367a3f004 100644 --- a/boards/esp32-olimex-evb/Makefile.include +++ b/boards/esp32-olimex-evb/Makefile.include @@ -2,14 +2,10 @@ PSEUDOMODULES += olimex_esp32_gateway USEMODULE += boards_common_esp32 -# enables esp_eth as network device +# enables esp_eth as default network device +# cannot be done in Makefile.dep since Makefile.dep is included too late ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE))) - # avoid multiple definitions when package depenedencies are resolved recursively - ifndef MODULE_ESP_ETH_ADDED - MODULE_ESP_ETH_ADDED = 1 - USEMODULE += esp_eth - $(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1)))) - endif + USEMODULE += esp_eth endif include $(RIOTBOARD)/common/esp32/Makefile.include diff --git a/cpu/esp32/Makefile.include b/cpu/esp32/Makefile.include index f28699be1a..6a87a62685 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -51,6 +51,10 @@ ifneq (,$(filter esp_wifi,$(USEMODULE))) USEMODULE += esp_wifi_any endif +ifneq (,$(filter esp_eth,$(USEMODULE))) + $(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1)))) +endif + ifneq (,$(filter spiffs,$(USEMODULE))) export RIOT_TEST_TIMEOUT = 300 endif