ci(esp32p4): add ci for esp32p4

This commit is contained in:
xysun 2024-09-13 17:05:15 +08:00
parent 8ad6260d8b
commit f1d41fce57
18 changed files with 187 additions and 19581 deletions

View File

@ -122,7 +122,7 @@ build_esp_sr:
extends:
- .build_test_template
- .rules:build:test_esp_sr
image: espressif/idf:release-v5.0
image: espressif/idf:release-v5.3
variables:
EXAMPLES_PATH: "test_apps/esp-sr"
@ -130,7 +130,7 @@ build_esp_tts:
extends:
- .build_test_template
- .rules:build:test_esp_tts
image: espressif/idf:release-v5.0
image: espressif/idf:release-v5.3
variables:
EXAMPLES_PATH: "test_apps/esp-tts"
@ -174,14 +174,18 @@ test_esp_sr:
- job: "build_esp_sr"
artifacts: true
optional: true
parallel:
matrix:
- TEST_TARGET: esp32p4
TEST_ENV: esp32p4
- TEST_TARGET: esp32s3
TEST_ENV: esp32s3
tags:
- esp32s3
image: $DOCKER_TARGET_TEST_v5_0_ENV_IMAGE
- ${TEST_ENV}
image: $DOCKER_TARGET_TEST_v5_3_ENV_IMAGE
variables:
TEST_TARGET: 'esp32s3'
TEST_FOLDER: './test_apps/esp-sr'
TEST_ENV: 'esp32s3'
IDF_VERSION: "5.0"
IDF_VERSION: "5.3"
test_esp_tts:
extends:
@ -191,14 +195,18 @@ test_esp_tts:
- job: "build_esp_tts"
artifacts: true
optional: true
parallel:
matrix:
- TEST_TARGET: esp32p4
TEST_ENV: esp32p4
- TEST_TARGET: esp32s3
TEST_ENV: esp32s3
tags:
- esp32s3
image: $DOCKER_TARGET_TEST_v5_0_ENV_IMAGE
- ${TEST_ENV}
image: $DOCKER_TARGET_TEST_v5_3_ENV_IMAGE
variables:
TEST_TARGET: 'esp32s3'
TEST_FOLDER: './test_apps/esp-tts'
TEST_ENV: 'esp32s3'
IDF_VERSION: "5.0"
IDF_VERSION: "5.3"
.build_doc_template:
stage: build_docs
@ -224,7 +232,7 @@ build_esp_sr_html:
parallel:
matrix:
- DOCLANG: ["en", "zh_CN"]
DOCTGT: ["esp32", "esp32s3"]
DOCTGT: ["esp32", "esp32s3", "esp32p4"]
build_esp_sr_pdf:
extends:
@ -246,7 +254,7 @@ build_esp_sr_pdf:
parallel:
matrix:
- DOCLANG: ["en", "zh_CN"]
DOCTGT: ["esp32", "esp32s3"]
DOCTGT: ["esp32", "esp32s3", "esp32p4"]
.deploy_docs_template:

View File

@ -1,9 +1,9 @@
test_apps/esp-sr:
enable:
- if: IDF_TARGET in ["esp32s3", "esp32"]
- if: IDF_TARGET in ["esp32s3", "esp32", "esp32p4"]
temporary: false
test_apps/esp-tts:
enable:
- if: IDF_TARGET in ["esp32s3", "esp32"]
- if: IDF_TARGET in ["esp32s3", "esp32", "esp32p4"]
temporary: false

View File

@ -20,7 +20,7 @@
#include "dl_lib_convq_queue.h"
#include <sys/time.h>
#ifdef CONFIG_IDF_TARGET_ESP32S3
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4)
#include "esp_nsn_models.h"
#include "esp_nsn_iface.h"
#endif
@ -376,7 +376,7 @@ TEST_CASE("audio_front_end VC create/destroy API & memory leak", "[afe_vc]")
for (int se_init = 0; se_init < 2; se_init++) {
for (int vad_init = 0; vad_init < 2; vad_init++) {
for (int voice_communication_agc_init = 0; voice_communication_agc_init < 2; voice_communication_agc_init++) {
#ifdef CONFIG_IDF_TARGET_ESP32S3
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4)
for (int afe_ns_mode = 0; afe_ns_mode < 2; afe_ns_mode++) {
#else
int afe_ns_mode = NS_MODE_SSP;
@ -400,7 +400,7 @@ TEST_CASE("audio_front_end VC create/destroy API & memory leak", "[afe_vc]")
start_spiram_mem_size = heap_caps_get_free_size(MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM);
srmodel_list_t *models = esp_srmodel_init("model");
char *nsnet_name = NULL;
#ifdef CONFIG_IDF_TARGET_ESP32S3
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4)
nsnet_name = esp_srmodel_filter(models, ESP_NSNET_PREFIX, NULL);
#endif
printf("nsnet_name: %s\n", nsnet_name ? nsnet_name : "");
@ -438,7 +438,7 @@ TEST_CASE("audio_front_end VC create/destroy API & memory leak", "[afe_vc]")
TEST_ASSERT_EQUAL(true, (start_total_mem_size - end_total_mem_size) < 1000);
}
}
#ifdef CONFIG_IDF_TARGET_ESP32S3
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4)
}
#endif
}
@ -454,7 +454,7 @@ TEST_CASE("audio_front_end VC cpu loading and memory info", "[afe_vc]")
psram_size_before = heap_caps_get_free_size(MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM);
srmodel_list_t *models = esp_srmodel_init("model");
char *nsnet_name = NULL;
#ifdef CONFIG_IDF_TARGET_ESP32S3
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4)
nsnet_name = esp_srmodel_filter(models, ESP_NSNET_PREFIX, NULL);
#endif
printf("nsnet_name: %s\n", nsnet_name ? nsnet_name : "");
@ -464,7 +464,7 @@ TEST_CASE("audio_front_end VC cpu loading and memory info", "[afe_vc]")
afe_config.wakenet_init = false;
afe_config.voice_communication_init = true;
afe_config.voice_communication_agc_init = true;
#ifdef CONFIG_IDF_TARGET_ESP32S3
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4)
afe_config.afe_ns_mode = NS_MODE_NET;
#else
afe_config.afe_ns_mode = NS_MODE_SSP;

View File

@ -1,4 +1,5 @@
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size
factory, app, factory, 0x010000, 8000k
model, data, , , 6500K,
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
factory, app, factory, 0x010000, 8000K,
model, data, spiffs, , 7900K,

1 # Espressif ESP32 Partition Table # Name, Type, SubType, Offset, Size, Flags
2 # Name, Type, SubType, Offset, Size # Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
3 factory, app, factory, 0x010000, 8000k factory, app, factory, 0x010000, 8000K,
4 model, data, , , 6500K, model, data, spiffs, , 7900K,
5

View File

@ -1,6 +1,7 @@
import pytest
from pytest_embedded import Dut
@pytest.mark.target('esp32s3')
@pytest.mark.env('esp32s3')
@pytest.mark.parametrize(
@ -13,7 +14,22 @@ from pytest_embedded import Dut
'mn7_en',
],
)
def test_multinet(dut: Dut)-> None:
def test_multinet_s3(dut: Dut)-> None:
# dut.run_all_single_board_cases(group="mn")
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('[mn]')
dut.expect_unity_test_output(timeout = 1000)
@pytest.mark.target('esp32p4')
@pytest.mark.env('esp32p4')
@pytest.mark.parametrize(
'config',
[
'p4_mn7_en',
'p4_mn7_cn',
],
)
def test_multinet_p4(dut: Dut)-> None:
# dut.run_all_single_board_cases(group="mn")
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('[mn]')
@ -35,6 +51,20 @@ def test_wakenet(dut: Dut)-> None:
dut.write('[wn]')
dut.expect_unity_test_output(timeout = 1000)
@pytest.mark.target('esp32p4')
@pytest.mark.env('esp32p4')
@pytest.mark.parametrize(
'config',
[
'p4_mn7_en',
'p4_nsnet2',
],
)
def test_wakenet_p4(dut: Dut)-> None:
# dut.run_all_single_board_cases(group="wn")
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('[wn]')
dut.expect_unity_test_output(timeout = 1000)
@pytest.mark.target('esp32s3')
@pytest.mark.env('esp32s3')
@ -50,13 +80,26 @@ def test_sr_afe(dut: Dut)-> None:
dut.write('[afe_sr]')
dut.expect_unity_test_output(timeout = 1000)
@pytest.mark.target('esp32p4')
@pytest.mark.env('esp32p4')
@pytest.mark.parametrize(
'config',
[
'p4_mn7_cn',
],
)
def test_sr_afe_p4(dut: Dut)-> None:
# dut.run_all_single_board_cases(group="afe")
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('[afe_sr]')
dut.expect_unity_test_output(timeout = 1000)
@pytest.mark.target('esp32s3')
@pytest.mark.env('esp32s3')
@pytest.mark.parametrize(
'config',
[
'nsnet1',
'nsnet2',
],
)
@ -65,3 +108,18 @@ def test_vc_afe(dut: Dut)-> None:
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('[afe_vc]')
dut.expect_unity_test_output(timeout = 100000)
@pytest.mark.target('esp32p4')
@pytest.mark.env('esp32p4')
@pytest.mark.parametrize(
'config',
[
'p4_nsnet2',
],
)
def test_vc_afe_p4(dut: Dut)-> None:
# dut.run_all_single_board_cases(group="afe")
dut.expect_exact('Press ENTER to see the list of tests.')
dut.write('[afe_vc]')
dut.expect_unity_test_output(timeout = 100000)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) 5.3.0 Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_SR_MN_CN_MULTINET7_QUANT=y
CONFIG_COMPILER_OPTIMIZATION_PERF=y
CONFIG_ESP32P4_REV_MIN_0=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_SPEED_200M=y
CONFIG_CACHE_L2_CACHE_256KB=y
CONFIG_CACHE_L2_CACHE_LINE_128B=y
CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=n
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8000
CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT_EN=n
CONFIG_FREERTOS_HZ=1000
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_IDF_EXPERIMENTAL_FEATURES=y

View File

@ -0,0 +1,21 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) 5.3.0 Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_SR_WN_WN9_HIESP=y
CONFIG_SR_MN_EN_MULTINET7_QUANT=y
CONFIG_COMPILER_OPTIMIZATION_PERF=y
CONFIG_ESP32P4_REV_MIN_0=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_SPEED_200M=y
CONFIG_CACHE_L2_CACHE_256KB=y
CONFIG_CACHE_L2_CACHE_LINE_128B=y
CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=n
CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT_EN=n
CONFIG_FREERTOS_HZ=1000
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_IDF_EXPERIMENTAL_FEATURES=y

View File

@ -0,0 +1,22 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) 5.3.0 Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_USE_NSNET=y
CONFIG_SR_WN_WN9_HIESP=y
CONFIG_USE_MULTINET=n
CONFIG_COMPILER_OPTIMIZATION_PERF=y
CONFIG_ESP32P4_REV_MIN_0=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_SPEED_200M=y
CONFIG_CACHE_L2_CACHE_256KB=y
CONFIG_CACHE_L2_CACHE_LINE_128B=y
CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=n
CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT_EN=n
CONFIG_FREERTOS_HZ=1000
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_IDF_EXPERIMENTAL_FEATURES=y

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff