From 6d79c939de740fea25726d60914a0c26309088a3 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Sun, 7 Aug 2022 07:54:38 +0200 Subject: [PATCH] tests/external_boards: add esp32c3-ci board for optional modules --- .murdock | 1 + .../esp-ci-boards/esp32c3-ci/Kconfig | 37 +++++++++++++++++++ .../esp-ci-boards/esp32c3-ci/Makefile | 6 +++ .../esp-ci-boards/esp32c3-ci/Makefile.dep | 24 ++++++++++++ .../esp32c3-ci/Makefile.features | 3 ++ .../esp-ci-boards/esp32c3-ci/Makefile.include | 10 +++++ .../esp32c3-ci/esp32c3-ci.config | 5 +++ 7 files changed, 86 insertions(+) create mode 100644 tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Kconfig create mode 100644 tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile create mode 100644 tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.dep create mode 100644 tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.features create mode 100644 tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.include create mode 100644 tests/external_board_dirs/esp-ci-boards/esp32c3-ci/esp32c3-ci.config diff --git a/.murdock b/.murdock index 1288948170..a338e1e10c 100755 --- a/.murdock +++ b/.murdock @@ -35,6 +35,7 @@ dwm1001 esp32-ci esp32-heltec-lora32-v2 esp32-olimex-evb +esp32c3-ci esp32c3-devkit esp8266-ci esp8266-esp-12x diff --git a/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Kconfig b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Kconfig new file mode 100644 index 0000000000..d19e55bbe2 --- /dev/null +++ b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Kconfig @@ -0,0 +1,37 @@ +# Copyright (c) 2020 HAW Hamburg +# 2022 Gunar Schorcht +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "esp32c3-ci" if BOARD_ESP32C3_CI + +config BOARD_ESP32C3_CI + bool + default y + select BOARD_COMMON_ESP32C3 + select CPU_MODEL_ESP32C3_MINI_1X + select HAS_ARDUINO + select HAS_ESP_RTC_TIMER_32K + select HAS_ESP_JTAG + select HAS_PERIPH_ADC + select HAS_PERIPH_I2C + select HAS_PERIPH_PWM + select HAS_PERIPH_SPI + select MODULE_BOARD_ESP32C3-CI + select MODULE_ESP_IDF_HEAP + +config MODULE_BOARD_ESP32C3-CI + bool + +if TEST_KCONFIG + +choice ESP32_I2C_IMPLEMENTATION + default MODULE_ESP_I2C_HW +endchoice + +endif # TEST_KCONFIG + +source "$(RIOTBOARD)/common/esp32c3/Kconfig" diff --git a/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile new file mode 100644 index 0000000000..0fe918a026 --- /dev/null +++ b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile @@ -0,0 +1,6 @@ +# This must be a different name than 'board' as it is implemented by 'esp32c3-devkit' +MODULE = board_esp32c3-ci + +DIRS += $(RIOTBOARD)/esp32c3-devkit + +include $(RIOTBASE)/Makefile.base diff --git a/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.dep b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.dep new file mode 100644 index 0000000000..90029202a1 --- /dev/null +++ b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.dep @@ -0,0 +1,24 @@ +# This must be a different name than 'board' as it is implemented by 'esp32c3-devkit' +USEMODULE += board_esp32c3-ci + +USEMODULE += esp_idf_heap +USEMODULE += esp_log_startup +USEMODULE += esp_log_tagged + +ifneq (,$(filter periph_i2c,$(USEMODULE))) + USEMODULE += esp_i2c_hw +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 + +include $(RIOTBOARD)/esp32c3-devkit/Makefile.dep diff --git a/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.features b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.features new file mode 100644 index 0000000000..faf8325e7f --- /dev/null +++ b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.features @@ -0,0 +1,3 @@ +FEATURES_PROVIDED += esp_rtc_timer_32k + +include $(RIOTBOARD)/esp32c3-devkit/Makefile.features diff --git a/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.include b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.include new file mode 100644 index 0000000000..c36113cd4a --- /dev/null +++ b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/Makefile.include @@ -0,0 +1,10 @@ +# We must duplicate the include done by $(RIOTBASE)/Makefile.include +# to also include the main board header +INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32c3-devkit/include)) + +# ESP_WIFI_EAP_USER and ESP_WIFI_EAP_PASS have to be defined to compile the +# optional module esp_wifi_enterprise in CI +CFLAGS += -DESP_WIFI_EAP_USER=\"riot@riot-os.org\" +CFLAGS += -DESP_WIFI_EAP_PASS=\"riot\" + +include $(RIOTBOARD)/esp32c3-devkit/Makefile.include diff --git a/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/esp32c3-ci.config b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/esp32c3-ci.config new file mode 100644 index 0000000000..6bf62c20c7 --- /dev/null +++ b/tests/external_board_dirs/esp-ci-boards/esp32c3-ci/esp32c3-ci.config @@ -0,0 +1,5 @@ +# Sets up configuration for openocd +CONFIG_MODULE_ESP_JTAG=y +CONFIG_MODULE_ESP_IDF_HEAP=y +CONFIG_MODULE_ESP_LOG_STARTUP=y +CONFIG_MODULE_ESP_LOG_TAGGED=y