ESP32H2: Add small CI test for ESP32H2

pull/10469/head
Cao Sen Miao 2022-12-29 11:00:42 +08:00
rodzic 8a095a74d4
commit 4e67332b74
16 zmienionych plików z 66 dodań i 10 usunięć

Wyświetl plik

@ -6,6 +6,7 @@
- esp32h4
- esp32c2
- esp32c6
- esp32h2
.target_test: &target_test
- example_test

Wyświetl plik

@ -93,6 +93,7 @@ check_public_headers:
- IDF_TARGET=esp32c3 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
- IDF_TARGET=esp32c2 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
- IDF_TARGET=esp32c6 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
- IDF_TARGET=esp32h2 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
check_chip_support_components:
extends:

Wyświetl plik

@ -394,6 +394,9 @@
.if-label-component_ut_esp32c6: &if-label-component_ut_esp32c6
if: '$BOT_LABEL_COMPONENT_UT_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32c6(?:,[^,\n\r]+)*$/i'
.if-label-component_ut_esp32h2: &if-label-component_ut_esp32h2
if: '$BOT_LABEL_COMPONENT_UT_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-component_ut_esp32h4: &if-label-component_ut_esp32h4
if: '$BOT_LABEL_COMPONENT_UT_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32h4(?:,[^,\n\r]+)*$/i'
@ -418,6 +421,9 @@
.if-label-custom_test_esp32c6: &if-label-custom_test_esp32c6
if: '$BOT_LABEL_CUSTOM_TEST_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32c6(?:,[^,\n\r]+)*$/i'
.if-label-custom_test_esp32h2: &if-label-custom_test_esp32h2
if: '$BOT_LABEL_CUSTOM_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-custom_test_esp32h4: &if-label-custom_test_esp32h4
if: '$BOT_LABEL_CUSTOM_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32h4(?:,[^,\n\r]+)*$/i'
@ -445,6 +451,9 @@
.if-label-example_test_esp32c6: &if-label-example_test_esp32c6
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32c6(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32h2: &if-label-example_test_esp32h2
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32h4: &if-label-example_test_esp32h4
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32h4(?:,[^,\n\r]+)*$/i'
@ -505,6 +514,9 @@
.if-label-unit_test_esp32c6: &if-label-unit_test_esp32c6
if: '$BOT_LABEL_UNIT_TEST_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32c6(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32h2: &if-label-unit_test_esp32h2
if: '$BOT_LABEL_UNIT_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32h4: &if-label-unit_test_esp32h4
if: '$BOT_LABEL_UNIT_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32h4(?:,[^,\n\r]+)*$/i'
@ -544,6 +556,7 @@
- <<: *if-label-component_ut_esp32c2
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32h4
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
@ -554,6 +567,7 @@
- <<: *if-label-unit_test_esp32c2
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
@ -782,6 +796,7 @@
- <<: *if-label-custom_test_esp32c2
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
@ -999,6 +1014,7 @@
- <<: *if-label-example_test_esp32c2
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32h4
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
@ -1332,6 +1348,7 @@
- <<: *if-label-component_ut_esp32c2
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32h4
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
@ -1340,6 +1357,7 @@
- <<: *if-label-custom_test_esp32c2
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
@ -1348,6 +1366,7 @@
- <<: *if-label-example_test_esp32c2
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32h4
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
@ -1362,6 +1381,7 @@
- <<: *if-label-unit_test_esp32c2
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
@ -1420,6 +1440,7 @@
- <<: *if-label-unit_test_esp32c2
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3

Wyświetl plik

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16)
project(idf_as_lib C)
set(targets "esp32" "esp32s2" "esp32s3" "esp32c3" "esp32h4" "esp32c2" "esp32c6")
set(targets "esp32" "esp32s2" "esp32s3" "esp32c3" "esp32h4" "esp32c2" "esp32c6" "esp32h2")
if("${TARGET}" IN_LIST targets)
# Include for ESP-IDF build system functions

Wyświetl plik

@ -0,0 +1 @@
build.sh

Wyświetl plik

@ -0,0 +1 @@
run-esp32.sh

Wyświetl plik

@ -62,7 +62,7 @@ build_stage2() {
--build-log ${BUILD_LOG_CMAKE} \
--size-file size.json \
--collect-size-info size_info.txt \
--default-build-targets esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32c6 # add esp32h4 back after IDF-5541
--default-build-targets esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32c6,esp32h2 # add esp32h4 back after IDF-5541
}
build_stage1() {
@ -76,7 +76,7 @@ build_stage1() {
--build-log ${BUILD_LOG_CMAKE} \
--size-file size.json \
--collect-size-info size_info.txt \
--default-build-targets esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32h4,esp32c6
--default-build-targets esp32,esp32s2,esp32s3,esp32c2,esp32c3,esp32h4,esp32c6,esp32h2
}
# Default arguments

Wyświetl plik

@ -32,6 +32,7 @@ USUAL_TO_FORMAL = {
'esp32h4': 'ESP32-H4',
'esp32c2': 'ESP32-C2',
'esp32c6': 'ESP32-C6',
'esp32h2': 'ESP32-H2',
'linux': 'Linux',
}
@ -43,6 +44,7 @@ FORMAL_TO_USUAL = {
'ESP32-H4': 'esp32h4',
'ESP32-C2': 'esp32c2',
'ESP32-C6': 'esp32c6',
'ESP32-H2': 'esp32h2',
'Linux': 'linux',
}

Wyświetl plik

@ -513,7 +513,7 @@ function run_tests()
print_status "Test build ESP-IDF as a library to a custom CMake projects for all targets"
IDF_AS_LIB=$IDF_PATH/examples/build_system/cmake/idf_as_lib
# note: we just need to run cmake
for TARGET in "esp32" "esp32s2" "esp32s3" "esp32c3" "esp32h4" "esp32c2" "esp32c6"
for TARGET in "esp32" "esp32s2" "esp32s3" "esp32c3" "esp32h4" "esp32c2" "esp32c6" "esp32h2"
do
echo "Build idf_as_lib for $TARGET target"
rm -rf build

Wyświetl plik

@ -0,0 +1,17 @@
# Data_type:
# primary_address: value
# length: value or equation
# secondary_address: value if exist
DRAM:
primary_address: 0x40800000
length: 0x50000
secondary_address: 0x40800000
CACHE_I:
primary_address: 0x42000000
length: 0x800000
CACHE_D:
primary_address: 0x42000000
length: 0x800000
RTC_SLOW_D: # TODO: IDF-5667 Better to rename to LP_RAM
primary_address: 0x50000000
length: 0x4000

Wyświetl plik

@ -115,7 +115,7 @@ tools/test_apps/system/flash_psram:
tools/test_apps/system/g0_components:
enable:
- if: INCLUDE_DEFAULT == 1 or IDF_TARGET in ["esp32h4", "esp32c6"] # preview targets
- if: INCLUDE_DEFAULT == 1 or IDF_TARGET in ["esp32h4", "esp32c6", "esp32h2"] # preview targets
tools/test_apps/system/g1_components:

Wyświetl plik

@ -0,0 +1,5 @@
CONFIG_IDF_TARGET="esp32h2"
CONFIG_HAL_WDT_USE_ROM_IMPL=y
CONFIG_HAL_SYSTIMER_USE_ROM_IMPL=y
CONFIG_HEAP_TLSF_USE_ROM_IMPL=y
CONFIG_SPI_FLASH_ROM_IMPL=y

Wyświetl plik

@ -0,0 +1,5 @@
CONFIG_IDF_TARGET="esp32h2"
CONFIG_HAL_WDT_USE_ROM_IMPL=n
CONFIG_HAL_SYSTIMER_USE_ROM_IMPL=n
CONFIG_HEAP_TLSF_USE_ROM_IMPL=n
CONFIG_SPI_FLASH_ROM_IMPL=n

Wyświetl plik

@ -28,7 +28,7 @@ project(g0_components)
# As a workaround for ESP32-C2, we need to define the MMU page size here, until MMU hal-driver
# is refactored
if(CONFIG_IDF_TARGET_ESP32C2 OR CONFIG_IDF_TARGET_ESP32C6)
if(CONFIG_IDF_TARGET_ESP32C2 OR CONFIG_IDF_TARGET_ESP32C6 OR CONFIG_IDF_TARGET_ESP32H2)
idf_build_set_property(C_COMPILE_OPTIONS "-DCONFIG_MMU_PAGE_SIZE=64" APPEND)
endif()

Wyświetl plik

@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-H4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
# "G0"-components-only app

Wyświetl plik

@ -390,7 +390,8 @@
"esp32c3",
"esp32h4",
"esp32c2",
"esp32c6"
"esp32c6",
"esp32h2"
],
"version_cmd": [
"clang",
@ -454,7 +455,8 @@
"esp32c3",
"esp32h4",
"esp32c2",
"esp32c6"
"esp32c6",
"esp32h2"
],
"version_cmd": [
"riscv32-esp-elf-gcc",