From a434dc5173add66b284c1e4c8c67c37947c844a0 Mon Sep 17 00:00:00 2001 From: "Michael.B" Date: Wed, 5 Aug 2026 01:49:14 +0800 Subject: [PATCH] ci(psram): add esp32p4 250M XIP coverage with flash 120M HPM-DC --- .../esp_psram/test_apps/psram/pytest_psram.py | 10 ++++++++++ .../psram/sdkconfig.ci.esp32p4_250m_release | 12 +++++++++++ .../psram/sdkconfig.ci.esp32p4_250m_xip | 18 +++++++++++++++++ .../xip_from_psram/pytest_xip_from_psram.py | 20 +++++++++++++++++++ .../xip_from_psram/sdkconfig.ci.esp32p4_250m | 5 +++++ 5 files changed, 65 insertions(+) create mode 100644 components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_release create mode 100644 components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_xip create mode 100644 examples/system/xip_from_psram/sdkconfig.ci.esp32p4_250m diff --git a/components/esp_psram/test_apps/psram/pytest_psram.py b/components/esp_psram/test_apps/psram/pytest_psram.py index 8b2d0003bfb..a13bf4bb064 100644 --- a/components/esp_psram/test_apps/psram/pytest_psram.py +++ b/components/esp_psram/test_apps/psram/pytest_psram.py @@ -86,6 +86,16 @@ def test_psram_esp32s3_octal(dut: Dut) -> None: def test_psram_esp32p4(dut: Dut) -> None: dut.run_all_single_board_cases() +@pytest.mark.flash_120m +@pytest.mark.parametrize( + 'config', + ['esp32p4_250m_release', 'esp32p4_250m_xip'], + indirect=True, +) +@idf_parametrize('target', ['esp32p4'], indirect=['target']) +def test_psram_esp32p4_250m(dut: Dut) -> None: + dut.run_all_single_board_cases() + @pytest.mark.generic @pytest.mark.parametrize( diff --git a/components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_release b/components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_release new file mode 100644 index 00000000000..565535d9ae3 --- /dev/null +++ b/components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_release @@ -0,0 +1,12 @@ +CONFIG_IDF_TARGET="esp32p4" + +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y + +CONFIG_SPIRAM=y +CONFIG_IDF_EXPERIMENTAL_FEATURES=y +CONFIG_SPIRAM_SPEED_250M=y +CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_SPI_FLASH_HPM_ENA=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y diff --git a/components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_xip b/components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_xip new file mode 100644 index 00000000000..ce9f5e4a0d5 --- /dev/null +++ b/components/esp_psram/test_apps/psram/sdkconfig.ci.esp32p4_250m_xip @@ -0,0 +1,18 @@ +CONFIG_IDF_TARGET="esp32p4" + +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y + +CONFIG_SPIRAM=y +CONFIG_IDF_EXPERIMENTAL_FEATURES=y +CONFIG_SPIRAM_SPEED_250M=y +CONFIG_SPIRAM_XIP_FROM_PSRAM=y + +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" + +CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_SPI_FLASH_HPM_ENA=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y diff --git a/examples/system/xip_from_psram/pytest_xip_from_psram.py b/examples/system/xip_from_psram/pytest_xip_from_psram.py index 81cd35452a8..55e3ff9938a 100644 --- a/examples/system/xip_from_psram/pytest_xip_from_psram.py +++ b/examples/system/xip_from_psram/pytest_xip_from_psram.py @@ -69,6 +69,26 @@ def test_xip_from_psram_example_p4_200m(dut: Dut) -> None: response_time = res.group(1).decode('utf8') assert float(response_time) <= 10 +@pytest.mark.flash_120m +@pytest.mark.parametrize( + 'config', + [ + 'esp32p4_250m', + ], + indirect=True, +) +@idf_parametrize('target', ['esp32p4'], indirect=['target']) +def test_xip_from_psram_example_p4_250m(dut: Dut) -> None: + dut.expect_exact('found partition') + + res = dut.expect(r'callback\(in PSRAM\) response time: (\d{1,3}) us') + response_time = res.group(1).decode('utf8') + assert float(response_time) <= 10 + + res = dut.expect(r'callback\(in IRAM\) response time: (\d{1,3}) us') + response_time = res.group(1).decode('utf8') + assert float(response_time) <= 10 + @pytest.mark.generic @pytest.mark.parametrize( diff --git a/examples/system/xip_from_psram/sdkconfig.ci.esp32p4_250m b/examples/system/xip_from_psram/sdkconfig.ci.esp32p4_250m new file mode 100644 index 00000000000..8644fd82b45 --- /dev/null +++ b/examples/system/xip_from_psram/sdkconfig.ci.esp32p4_250m @@ -0,0 +1,5 @@ +CONFIG_IDF_TARGET="esp32p4" +CONFIG_SPIRAM_SPEED_250M=y +CONFIG_ESPTOOLPY_FLASHFREQ_120M=y +CONFIG_SPI_FLASH_HPM_ENA=y +CONFIG_BOOTLOADER_FLASH_DC_AWARE=y