1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #17525 from fjmolinas/pr_esp_compile_test_boards

[POC] tests/external-boards: add esp compile test boards
This commit is contained in:
Kevin "Tristate Tom" Weiss 2022-02-10 08:31:12 +01:00 committed by GitHub
commit d97eed54a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 165 additions and 53 deletions

View File

@ -31,7 +31,9 @@ cc1352-launchpad
cc2650-launchpad
derfmega128
dwm1001
esp32-ci
esp32-heltec-lora32-v2
esp8266-ci
esp8266-esp-12x
hamilton
hifive1
@ -89,6 +91,7 @@ tests/driver_s*
tests/driver_t*
tests/driver_u*
tests/driver_v*
tests/external_board_dirs
tests/periph_*
tests/pkg_elk
tests/pkg_uzlib

View File

@ -5,34 +5,4 @@ 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

View File

@ -19,5 +19,5 @@ FEATURES_PROVIDED += arduino
# This configuration enables modules that are only available when using Kconfig
# module modelling
ifeq (1, $(TEST_KCONFIG))
KCONFIG_BOARD_CONFIG += $(BOARDDIR)/esp32-wrover-kit.config
KCONFIG_BOARD_CONFIG += $(BOARDDIR)/$(BOARD).config
endif

View File

@ -1,22 +1 @@
# 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

View File

@ -27,4 +27,8 @@ config MODULE_PERIPH_RTT_HW_RTC
bool
default y if MODULE_PERIPH_RTT
config MODULE_ESP_HW_COUNTER
bool "Use hardware counter"
depends on MODULE_PERIPH_TIMER
endif # TEST_KCONFIG

View File

@ -7,7 +7,7 @@
if TEST_KCONFIG
choice
choice ESP32_I2C_IMPLEMENTATION
bool "I2C implementation"
depends on MODULE_PERIPH_I2C
help

View File

@ -84,5 +84,9 @@ config MODULE_ESP_I2C_SW
default y if MODULE_PERIPH_I2C
select MODULE_PERIPH_I2C_SW
config MODULE_ESP_SW_TIMER
bool "Use software timer"
depends on MODULE_PERIPH_TIMER
rsource "sdk/Kconfig"
rsource "vendor/Kconfig"

View File

@ -111,6 +111,9 @@ config MODULE_ESP_LOG_STARTUP
endmenu
config MODULE_ESP_QEMU
bool "Simulate ESP with QEMU"
endif # TEST_KCONFIG
rsource "freertos/Kconfig"

View File

@ -7,5 +7,6 @@ FEATURES_REQUIRED += arch_native
# Set without '?=' to also verify the docker integration when set with =
EXTERNAL_BOARD_DIRS = $(CURDIR)/external_board_dir_1
EXTERNAL_BOARD_DIRS += $(CURDIR)/external_board_dir_2
EXTERNAL_BOARD_DIRS += $(CURDIR)/esp-ci-boards
include $(RIOTBASE)/Makefile.include

View File

@ -0,0 +1,38 @@
# Copyright (c) 2020 HAW Hamburg
#
# 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 "esp32-ci" if BOARD_ESP32_CI
config BOARD_ESP32_CI
bool
default y
select BOARD_COMMON_ESP32
select CPU_MODEL_ESP32_WROVER
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 HAS_SDCARD_SPI
select HAVE_ILI9341
if TEST_KCONFIG
choice ESP32_I2C_IMPLEMENTATION
default MODULE_ESP_I2C_HW
endchoice
config MODULE_ESP_HW_COUNTER
default y
depends on MODULE_PERIPH_TIMER
endif # TEST_KCONFIG
source "$(RIOTBOARD)/common/esp32/Kconfig"

View File

@ -0,0 +1,6 @@
# This must be a different name than 'board' as it is implemented by 'esp32-wrover-kit'
MODULE = board_esp32-ci
DIRS += $(RIOTBOARD)/esp32-wrover-kit
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,30 @@
# This must be a different name than 'board' as it is implemented by 'esp32-wrover-kit'
USEMODULE += board_esp32-ci
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
include $(RIOTBOARD)/esp32-wrover-kit/Makefile.dep

View File

@ -0,0 +1 @@
include $(RIOTBOARD)/esp32-wrover-kit/Makefile.features

View File

@ -0,0 +1,5 @@
# We must duplicate the include done by $(RIOTBASE)/Makefile.include
# to also include the main board header
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp32-wrover-kit/include))
include $(RIOTBOARD)/esp32-wrover-kit/Makefile.include

View File

@ -0,0 +1,7 @@
# 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
CONFIG_MODULE_ESP_QEMU=y
CONFIG_MODULE_ESP_SPI_RAM=y

View File

@ -0,0 +1,21 @@
# Copyright (c) 2020 HAW Hamburg
#
# 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 "esp8266-ci" if BOARD_ESP8266_CI
config BOARD_ESP8266_CI
bool
default y
select BOARD_COMMON_ESP8266
select CPU_MODEL_ESP8266_ESP_12X
config MODULE_ESP_SW_TIMER
default y
depends on TEST_KCONFIG
depends on MODULE_PERIPH_TIMER
source "$(RIOTBOARD)/common/esp8266/Kconfig"

View File

@ -0,0 +1,6 @@
# This must be a different name than 'board' as it is implemented by 'esp8266-olimex-mod'
MODULE = board_esp32-ci
DIRS += $(RIOTBOARD)/esp8266-olimex-mod
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,18 @@
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
include $(RIOTBOARD)/esp8266-olimex-mod/Makefile.dep

View File

@ -0,0 +1,5 @@
include $(RIOTBOARD)/esp8266-olimex-mod/Makefile.features
ifeq (1, $(TEST_KCONFIG))
KCONFIG_ADD_CONFIG += $(BOARDDIR)/$(BOARD).config
endif

View File

@ -0,0 +1,5 @@
# We must duplicate the include done by $(RIOTBASE)/Makefile.include
# to also include the main board header
INCLUDES += $(addprefix -I,$(wildcard $(RIOTBOARD)/esp8266-olimex-mod/include))
include $(RIOTBOARD)/esp8266-olimex-mod/Makefile.include

View File

@ -0,0 +1,4 @@
# Sets up configuration for openocd
CONFIG_MODULE_ESP_LOG_STARTUP=y
CONFIG_MODULE_ESP_LOG_TAGGED=y
CONFIG_MODULE_ESP_QEMU=y

View File

@ -12,4 +12,6 @@ USEMODULE += xtimer
# avoid running Kconfig by default
SHOULD_RUN_KCONFIG ?=
EXTERNAL_BOARD_DIRS += $(CURDIR)/../external_board_dirs/esp-ci-boards
include $(RIOTBASE)/Makefile.include