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 b52b43a823..6c2332ad27 100644 --- a/cpu/esp32/Makefile.include +++ b/cpu/esp32/Makefile.include @@ -41,6 +41,13 @@ ifneq (,$(filter esp_gdbstub,$(USEMODULE))) USEMODULE += esp_gdb endif +ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE))) + # use esp_now as default netdev if no other netdev module is enabled + ifeq (,$(filter esp_wifi esp_eth,$(USEMODULE))) + USEMODULE += esp_now + endif +endif + ifneq (,$(filter esp_now,$(USEMODULE))) $(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1)))) USEMODULE += esp_wifi_any @@ -51,6 +58,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 @@ -109,7 +120,7 @@ INCLUDES += -I$(RIOTBOARD)/common/$(CPU)/include INCLUDES += -I$(RIOTCPU)/$(CPU) # if any WiFi interface is used, the number of priority levels has to be 32 -ifneq (,$(filter esp_wifi_any,$(USEMODULE))) +ifneq (,$(filter esp_wifi_any esp_eth,$(USEMODULE))) CFLAGS += -DSCHED_PRIO_LEVELS=32 endif diff --git a/cpu/esp8266/Makefile.include b/cpu/esp8266/Makefile.include index 1c7ba7e14e..4ee539a3e9 100644 --- a/cpu/esp8266/Makefile.include +++ b/cpu/esp8266/Makefile.include @@ -19,10 +19,25 @@ endif # SPECIAL module dependencies # cannot be done in Makefile.dep since Makefile.dep is included too late -ifneq (, $(filter esp_now esp_wifi, $(USEMODULE))) +ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE))) + # use esp_now as default netdev if no other netdev module is enabled + ifeq (,$(filter esp_wifi esp_eth,$(USEMODULE))) + USEMODULE += esp_now + endif +endif + +ifneq (, $(filter esp_wifi, $(USEMODULE))) $(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1)))) - CFLAGS += -DSCHED_PRIO_LEVELS=32 USEMODULE += esp_wifi_any +endif + +ifneq (, $(filter esp_now, $(USEMODULE))) + $(eval GNRC_NETIF_NUMOF=$(shell echo $$(($(GNRC_NETIF_NUMOF)+1)))) + USEMODULE += esp_wifi_any +endif + +ifneq (, $(filter esp_wifi_any, $(USEMODULE))) + CFLAGS += -DSCHED_PRIO_LEVELS=32 USEMODULE += netopt USEMODULE += xtimer endif diff --git a/tests/netstats_l2/Makefile b/tests/netstats_l2/Makefile index 8773329a19..1da76655bb 100644 --- a/tests/netstats_l2/Makefile +++ b/tests/netstats_l2/Makefile @@ -4,7 +4,8 @@ BOARD_PROVIDES_NETIF := airfy-beacon fox iotlab-m3 mulle native nrf51dk nrf51don nrf6310 pba-d-01-kw2x samd21-xpro saml21-xpro samr21-xpro spark-core \ yunjia-nrf51822 msba2 \ esp32-mh-et-live-minikit esp32-olimex-evb \ - esp32-wemos-lolin-d32-pro esp32-wroom-32 esp32-wrover-kit + esp32-wemos-lolin-d32-pro esp32-wroom-32 esp32-wrover-kit \ + esp8266-esp-12x esp8266-olimex-mod esp8266-sparkfun-thing BOARD_WHITELIST += $(BOARD_PROVIDES_NETIF)