From bec44ca2e9ca2b0c1406192a6ddc72b111cd4786 Mon Sep 17 00:00:00 2001 From: morris Date: Mon, 11 Jul 2022 11:53:21 +0800 Subject: [PATCH] gptimer: test on c2 with xtal 26mhz --- .gitlab/ci/target-test.yml | 8 ++++++ .../test_apps/gptimer/pytest_gptimer.py | 27 ++++++++++++++++--- .../gptimer/sdkconfig.ci.esp32c2_xtal26m | 2 ++ .../soc/esp32c2/ld/esp32c2.peripherals.ld | 5 ---- pytest.ini | 1 + ...onfig.ci.esp32c2_with_rom_impl_components} | 0 6 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 components/driver/test_apps/gptimer/sdkconfig.ci.esp32c2_xtal26m rename tools/test_apps/system/build_test/{sdkconfig.ci copy.esp32c2_with_rom_impl_components => sdkconfig.ci.esp32c2_with_rom_impl_components} (100%) diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 8490ee6758..578ba2793a 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -251,6 +251,14 @@ component_ut_pytest_esp32c2_generic: - build_pytest_components_esp32c2 tags: [ esp32c2, generic ] +component_ut_pytest_esp32c2_xtal_26mhz: + extends: + - .pytest_components_dir_template + - .rules:test:component_ut-esp32c2 + needs: + - build_pytest_components_esp32c2 + tags: [ esp32c2, xtal_26mhz ] + component_ut_pytest_esp32c3_generic: extends: - .pytest_components_dir_template diff --git a/components/driver/test_apps/gptimer/pytest_gptimer.py b/components/driver/test_apps/gptimer/pytest_gptimer.py index 19a5284685..9ee6a734fd 100644 --- a/components/driver/test_apps/gptimer/pytest_gptimer.py +++ b/components/driver/test_apps/gptimer/pytest_gptimer.py @@ -7,11 +7,30 @@ from pytest_embedded import Dut @pytest.mark.supported_targets @pytest.mark.generic -@pytest.mark.parametrize('config', [ - 'iram_safe', - 'release', -], indirect=True) +@pytest.mark.parametrize( + 'config', + [ + 'iram_safe', + 'release', + ], + indirect=True, +) def test_gptimer(dut: Dut) -> None: dut.expect_exact('Press ENTER to see the list of tests') dut.write('*') dut.expect_unity_test_output() + + +@pytest.mark.esp32c2 +@pytest.mark.xtal_26mhz +@pytest.mark.parametrize( + 'config, baud', + [ + ('esp32c2_xtal26m', '74880'), + ], + indirect=True, +) +def test_gptimer_esp32c2_xtal_26mhz(dut: Dut) -> None: + dut.expect_exact('Press ENTER to see the list of tests') + dut.write('*') + dut.expect_unity_test_output() diff --git a/components/driver/test_apps/gptimer/sdkconfig.ci.esp32c2_xtal26m b/components/driver/test_apps/gptimer/sdkconfig.ci.esp32c2_xtal26m new file mode 100644 index 0000000000..520e2cf90a --- /dev/null +++ b/components/driver/test_apps/gptimer/sdkconfig.ci.esp32c2_xtal26m @@ -0,0 +1,2 @@ +CONFIG_IDF_TARGET="esp32c2" +CONFIG_ESP32C2_XTAL_FREQ_26=y diff --git a/components/soc/esp32c2/ld/esp32c2.peripherals.ld b/components/soc/esp32c2/ld/esp32c2.peripherals.ld index 6f34ae6237..11dc633490 100644 --- a/components/soc/esp32c2/ld/esp32c2.peripherals.ld +++ b/components/soc/esp32c2/ld/esp32c2.peripherals.ld @@ -8,15 +8,10 @@ PROVIDE ( UART1 = 0x60010000 ); PROVIDE ( SPIMEM1 = 0x60002000 ); PROVIDE ( SPIMEM0 = 0x60003000 ); PROVIDE ( GPIO = 0x60004000 ); -PROVIDE ( SIGMADELTA = 0x60004f00 ); PROVIDE ( RTCCNTL = 0x60008000 ); PROVIDE ( RTCIO = 0x60008400 ); PROVIDE ( EFUSE = 0x60008800 ); -PROVIDE ( HINF = 0x6000B000 ); PROVIDE ( I2C0 = 0x60013000 ); -PROVIDE ( HOST = 0x60015000 ); -PROVIDE ( PCNT = 0x60017000 ); -PROVIDE ( SLC = 0x60018000 ); PROVIDE ( LEDC = 0x60019000 ); PROVIDE ( TIMERG0 = 0x6001F000 ); PROVIDE ( SYSTIMER = 0x60023000 ); diff --git a/pytest.ini b/pytest.ini index 872330371b..d15296ea1a 100644 --- a/pytest.ini +++ b/pytest.ini @@ -47,6 +47,7 @@ markers = wifi_router: both the runner and dut connect to the same wifi router wifi_high_traffic: wifi high traffic runners wifi_wlan: wifi runner with a wireless NIC + xtal_26mhz: runner with 26MHz xtal on board # multi-dut markers multi_dut_generic: tests should be run on generic runners, at least have two duts connected. diff --git a/tools/test_apps/system/build_test/sdkconfig.ci copy.esp32c2_with_rom_impl_components b/tools/test_apps/system/build_test/sdkconfig.ci.esp32c2_with_rom_impl_components similarity index 100% rename from tools/test_apps/system/build_test/sdkconfig.ci copy.esp32c2_with_rom_impl_components rename to tools/test_apps/system/build_test/sdkconfig.ci.esp32c2_with_rom_impl_components