From c85dc30b45676b12c1272015093892ee9cab14ab Mon Sep 17 00:00:00 2001 From: Armando Date: Wed, 10 Jul 2024 10:02:47 +0800 Subject: [PATCH] test(psram): enable bss psram test --- .../esp_common/test_apps/.build-test-rules.yml | 3 --- .../test_apps/esp_common/pytest_esp_common.py | 18 ++++++++++++++++-- .../esp_common/sdkconfig.xip_psram_esp32p4 | 6 ++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 components/esp_common/test_apps/esp_common/sdkconfig.xip_psram_esp32p4 diff --git a/components/esp_common/test_apps/.build-test-rules.yml b/components/esp_common/test_apps/.build-test-rules.yml index 7b18cd897d..04fd48936f 100644 --- a/components/esp_common/test_apps/.build-test-rules.yml +++ b/components/esp_common/test_apps/.build-test-rules.yml @@ -3,6 +3,3 @@ components/esp_common/test_apps/esp_common: disable: - if: CONFIG_NAME == "psram" and SOC_SPIRAM_SUPPORTED != 1 - - if: CONFIG_NAME == "psram" and IDF_TARGET in ["esp32p4"] - temporary: true - reason: esp32p4 is not supported yet # TODO: IDF-7557 diff --git a/components/esp_common/test_apps/esp_common/pytest_esp_common.py b/components/esp_common/test_apps/esp_common/pytest_esp_common.py index 983220995f..1a31480cc2 100644 --- a/components/esp_common/test_apps/esp_common/pytest_esp_common.py +++ b/components/esp_common/test_apps/esp_common/pytest_esp_common.py @@ -1,6 +1,5 @@ -# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 - import pytest from pytest_embedded import Dut @@ -51,6 +50,7 @@ def run_multiple_stages(dut: Dut, test_case_num: int, stages: int) -> None: @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.esp32s3 +@pytest.mark.esp32p4 @pytest.mark.generic @pytest.mark.parametrize( 'config', @@ -89,3 +89,17 @@ def test_esp_attr_xip_psram_esp32s2(dut: Dut) -> None: ) def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None: dut.run_all_single_board_cases() + + +# psram attr tests with xip_psram +@pytest.mark.esp32p4 +@pytest.mark.generic +@pytest.mark.parametrize( + 'config', + [ + 'xip_psram_esp32p4' + ], + indirect=True, +) +def test_esp_attr_xip_psram_esp32p4(dut: Dut) -> None: + dut.run_all_single_board_cases() diff --git a/components/esp_common/test_apps/esp_common/sdkconfig.xip_psram_esp32p4 b/components/esp_common/test_apps/esp_common/sdkconfig.xip_psram_esp32p4 new file mode 100644 index 0000000000..706f080ca9 --- /dev/null +++ b/components/esp_common/test_apps/esp_common/sdkconfig.xip_psram_esp32p4 @@ -0,0 +1,6 @@ +# For XiP PSRAM EXT_RAM_BSS_ATTR + +CONFIG_IDF_TARGET="esp32p4" +CONFIG_SPIRAM=y +CONFIG_SPIRAM_XIP_FROM_PSRAM=y +CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y