Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/esp: compile optional modules in CI #17314

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions boards/esp32-wrover-kit/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,34 @@ endif
# Sets up configuration for openocd
USEMODULE += esp_jtag

# if compiled in CI, optional modules are selected for compile tests
ifneq (,$(RIOT_CI_BUILD))
USEMODULE += esp_idf_heap
USEMODULE += esp_log_startup
USEMODULE += esp_log_tagged
USEMODULE += esp_qemu
USEMODULE += esp_spi_ram

ifneq (,$(filter periph_i2c,$(USEMODULE)))
USEMODULE += esp_i2c_hw
endif

ifneq (,$(filter periph_timer,$(USEMODULE)))
USEMODULE += esp_hw_counter
endif

ifneq (,$(filter netdev_default,$(USEMODULE)))
# if netdev_default is used, we use gnrc modules that are enabled
# in different examples to use different esp_wifi modules
ifneq (,$(filter gnrc_netif_single,$(USEMODULE)))
# if gnrc_netif_single module is enabled, esp_wifi_enterprise is used
USEMODULE += esp_wifi_enterprise
else
# in all other case esp_wifi_ap is enabled
USEMODULE += esp_wifi_ap
endif
endif

endif

include $(RIOTBOARD)/common/esp32/Makefile.dep
17 changes: 17 additions & 0 deletions boards/esp32-wrover-kit/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@
#endif
/** @} */

#ifndef DOXYGEN
/**
* @name Default configuration parameters for ESP WiFi Enterprise netdev
* @{
*/
#ifndef ESP_WIFI_EAP_USER
/** User name used in phase 2 (inner) EAP authentication. */
#define ESP_WIFI_EAP_USER "riot-os@riot-os.org"
#endif /* ESP_WIFI_EAP_USER */

#ifndef ESP_WIFI_EAP_PASS
/** Password used in phase 2 (inner) EAP authentication. */
#define ESP_WIFI_EAP_PASS "riot-os"
#endif /* ESP_WIFI_EAP_PASS */
/** @} */
#endif /* !DOXYGEN */

/* include common board definitions as last step */
#include "board_common.h"

Expand Down
21 changes: 21 additions & 0 deletions boards/esp8266-olimex-mod/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# if compiled in CI, optional modules are selected for compile tests
ifneq (,$(RIOT_CI_BUILD))
USEMODULE += esp_log_tagged
USEMODULE += esp_log_startup
USEMODULE += esp_qemu

ifneq (,$(filter periph_timer,$(USEMODULE)))
USEMODULE += esp_sw_timer
endif

ifneq (,$(filter netdev_default,$(USEMODULE)))
# if netdev_default is used, we use gnrc modules that are enabled
# in different examples to use different esp_wifi modules
ifeq (,$(filter gnrc_netif_single,$(USEMODULE)))
# if gnrc_netif_single module is not enabled, esp_wifi_ap is used
USEMODULE += esp_wifi_ap
endif
endif

endif

include $(RIOTBOARD)/common/esp8266/Makefile.dep
2 changes: 0 additions & 2 deletions cpu/esp32/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ include $(RIOTCPU)/esp_common/Makefile.include
TARGET_ARCH_ESP32 ?= xtensa-esp32-elf
TARGET_ARCH ?= $(TARGET_ARCH_ESP32)

PSEUDOMODULES += esp_eth_hw
PSEUDOMODULES += esp_gdbstub
PSEUDOMODULES += esp_hw_counter
PSEUDOMODULES += esp_i2c_hw
PSEUDOMODULES += esp_idf_newlib
PSEUDOMODULES += esp_jtag
PSEUDOMODULES += esp_rtc_timer_32k
PSEUDOMODULES += esp_spi_ram
Expand Down
2 changes: 1 addition & 1 deletion cpu/esp32/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ void IRAM hw_timer_handler(void* arg)

int timer_init (tim_t dev, uint32_t freq, timer_cb_t cb, void *arg)
{
DEBUG("%s dev=%u freq=%lu cb=%p arg=%p\n", __func__, dev, freq, cb, arg);
DEBUG("%s dev=%u freq=%u cb=%p arg=%p\n", __func__, dev, freq, cb, arg);

CHECK_PARAM_RET (dev < HW_TIMER_NUMOF, -1);
CHECK_PARAM_RET (freq == XTIMER_HZ_BASE, -1);
Expand Down
2 changes: 1 addition & 1 deletion cpu/esp8266/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void IRAM os_timer_handler (void* arg)

int timer_init (tim_t dev, uint32_t freq, timer_cb_t cb, void *arg)
{
DEBUG("%s dev=%u freq=%lu cb=%p arg=%p\n", __func__, dev, freq, cb, arg);
DEBUG("%s dev=%u freq=%u cb=%p arg=%p\n", __func__, dev, freq, cb, arg);

CHECK_PARAM_RET (dev < OS_TIMER_NUMOF, -1);
CHECK_PARAM_RET (freq == XTIMER_HZ_BASE, -1);
Expand Down