diff --git a/.gitlab/ci/assign-test.yml b/.gitlab/ci/assign-test.yml index f697c3d23c..d3e92d440f 100644 --- a/.gitlab/ci/assign-test.yml +++ b/.gitlab/ci/assign-test.yml @@ -25,6 +25,9 @@ assign_example_test: - job: build_examples_cmake_esp32s2 artifacts: false optional: true + - job: build_examples_cmake_esp32c2 + artifacts: false + optional: true - job: build_examples_cmake_esp32c3 artifacts: false optional: true @@ -47,6 +50,9 @@ assign_custom_test: - job: build_test_apps_esp32s2 artifacts: false optional: true + - job: build_test_apps_esp32c2 + artifacts: false + optional: true - job: build_test_apps_esp32c3 artifacts: false optional: true @@ -67,6 +73,8 @@ assign_unit_test: optional: true - job: build_esp_idf_tests_cmake_esp32s2 optional: true + - job: build_esp_idf_tests_cmake_esp32c2 + optional: true - job: build_esp_idf_tests_cmake_esp32c3 optional: true - job: build_esp_idf_tests_cmake_esp32s3 diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index 1341a172fe..ffadba23f4 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -59,13 +59,6 @@ build_pytest_examples_esp32s3: script: - run_cmd python tools/ci/build_pytest_apps.py examples --target esp32s3 --size-info $SIZE_INFO_LOCATION -vv -build_pytest_examples_esp32c3: - extends: - - .build_pytest_template - - .rules:build:example_test-esp32c3 - script: - - run_cmd python tools/ci/build_pytest_apps.py examples --target esp32c3 --size-info $SIZE_INFO_LOCATION -vv - build_pytest_examples_esp32c2: extends: - .build_pytest_template @@ -73,6 +66,13 @@ build_pytest_examples_esp32c2: script: - run_cmd python tools/ci/build_pytest_apps.py examples --target esp32c2 --size-info $SIZE_INFO_LOCATION -vv +build_pytest_examples_esp32c3: + extends: + - .build_pytest_template + - .rules:build:example_test-esp32c3 + script: + - run_cmd python tools/ci/build_pytest_apps.py examples --target esp32c3 --size-info $SIZE_INFO_LOCATION -vv + build_pytest_components_esp32: extends: - .build_pytest_template @@ -139,6 +139,13 @@ build_pytest_test_apps_esp32s3: script: - run_cmd python tools/ci/build_pytest_apps.py tools/test_apps --target esp32s3 --size-info $SIZE_INFO_LOCATION -vv +build_pytest_test_apps_esp32c2: + extends: + - .build_pytest_template + - .rules:build:custom_test-esp32c2 + script: + - run_cmd python tools/ci/build_pytest_apps.py tools/test_apps --target esp32c2 --size-info $SIZE_INFO_LOCATION -vv + build_pytest_test_apps_esp32c3: extends: - .build_pytest_template @@ -282,13 +289,6 @@ build_esp_idf_tests_cmake_esp32s3: variables: IDF_TARGET: esp32s3 -build_esp_idf_tests_cmake_esp32c3: - extends: - - .build_esp_idf_tests_cmake_template - - .rules:build:unit_test-esp32c3 - variables: - IDF_TARGET: esp32c3 - build_esp_idf_tests_cmake_esp32c2: extends: - .build_esp_idf_tests_cmake_template @@ -296,6 +296,13 @@ build_esp_idf_tests_cmake_esp32c2: variables: IDF_TARGET: esp32c2 +build_esp_idf_tests_cmake_esp32c3: + extends: + - .build_esp_idf_tests_cmake_template + - .rules:build:unit_test-esp32c3 + variables: + IDF_TARGET: esp32c3 + .build_examples_template: extends: .build_template dependencies: # set dependencies to null to avoid missing artifacts issue @@ -362,6 +369,14 @@ build_examples_cmake_esp32s3: variables: IDF_TARGET: esp32s3 +build_examples_cmake_esp32c2: + extends: + - .build_examples_cmake_template + - .rules:build:example_test-esp32c2 + parallel: 8 + variables: + IDF_TARGET: esp32c2 + build_examples_cmake_esp32c3: extends: - .build_examples_cmake_template diff --git a/.gitlab/ci/dependencies/dependencies.yml b/.gitlab/ci/dependencies/dependencies.yml index a8601518a8..3e7a1e890d 100644 --- a/.gitlab/ci/dependencies/dependencies.yml +++ b/.gitlab/ci/dependencies/dependencies.yml @@ -156,6 +156,27 @@ build:integration_test: - "build:component_ut-{0}" - build:target_test +# due to the lack of runners, c2 tests will only be triggered by label +"test:{0}-esp32c2": + matrix: + - *target_test + labels: + - "{0}_esp32c2" + included_in: + - "build:{0}" + - "build:{0}-esp32c2" + - build:target_test + +# overwrite the esp32c2 component ut again +"test:component_ut-esp32c2": # component_ut will trigger by unit_test as well, since now we have 2 kinds of UT + labels: + - "component_ut_esp32c2" + - "unit_test_esp32c2" + included_in: + - build:component_ut + - "build:component_ut-esp32c2" + - build:target_test + # due to the lack of runners, s3 tests will only be triggered by label "test:{0}-esp32s3": matrix: diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index b11e5a9928..f87b6c218d 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -483,10 +483,7 @@ when: never - <<: *if-protected - <<: *if-label-build - - <<: *if-label-component_ut - <<: *if-label-component_ut_esp32c2 - - <<: *if-label-target_test - - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32c2 - <<: *if-dev-push changes: *patterns-build_components @@ -494,8 +491,6 @@ changes: *patterns-build_system - <<: *if-dev-push changes: *patterns-build_target_test - - <<: *if-dev-push - changes: *patterns-component_ut .rules:build:component_ut-esp32c3: rules: @@ -628,17 +623,13 @@ when: never - <<: *if-protected - <<: *if-label-build - - <<: *if-label-custom_test - <<: *if-label-custom_test_esp32c2 - - <<: *if-label-target_test - <<: *if-dev-push changes: *patterns-build_components - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push changes: *patterns-build_target_test - - <<: *if-dev-push - changes: *patterns-custom_test .rules:build:custom_test-esp32c3: rules: @@ -775,19 +766,13 @@ when: never - <<: *if-protected - <<: *if-label-build - - <<: *if-label-example_test - <<: *if-label-example_test_esp32c2 - - <<: *if-label-target_test - - <<: *if-dev-push - changes: *patterns-build-example_test - <<: *if-dev-push changes: *patterns-build_components - <<: *if-dev-push changes: *patterns-build_system - <<: *if-dev-push changes: *patterns-build_target_test - - <<: *if-dev-push - changes: *patterns-example_test .rules:build:example_test-esp32c3: rules: @@ -1002,8 +987,6 @@ when: never - <<: *if-protected - <<: *if-label-build - - <<: *if-label-target_test - - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32c2 - <<: *if-dev-push changes: *patterns-build_components @@ -1011,8 +994,6 @@ changes: *patterns-build_system - <<: *if-dev-push changes: *patterns-build_target_test - - <<: *if-dev-push - changes: *patterns-unit_test .rules:build:unit_test-esp32c3: rules: @@ -1152,13 +1133,8 @@ - <<: *if-protected - <<: *if-label-build-only when: never - - <<: *if-label-component_ut - <<: *if-label-component_ut_esp32c2 - - <<: *if-label-target_test - - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32c2 - - <<: *if-dev-push - changes: *patterns-component_ut .rules:test:component_ut-esp32c3: rules: @@ -1235,11 +1211,7 @@ - <<: *if-protected - <<: *if-label-build-only when: never - - <<: *if-label-custom_test - <<: *if-label-custom_test_esp32c2 - - <<: *if-label-target_test - - <<: *if-dev-push - changes: *patterns-custom_test .rules:test:custom_test-esp32c3: rules: @@ -1311,13 +1283,7 @@ - <<: *if-protected - <<: *if-label-build-only when: never - - <<: *if-label-example_test - <<: *if-label-example_test_esp32c2 - - <<: *if-label-target_test - - <<: *if-dev-push - changes: *patterns-build-example_test - - <<: *if-dev-push - changes: *patterns-example_test .rules:test:example_test-esp32c3: rules: @@ -1427,11 +1393,7 @@ - <<: *if-protected - <<: *if-label-build-only when: never - - <<: *if-label-target_test - - <<: *if-label-unit_test - <<: *if-label-unit_test_esp32c2 - - <<: *if-dev-push - changes: *patterns-unit_test .rules:test:unit_test-esp32c3: rules: diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index 501e036fc4..46a04fa652 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -61,6 +61,16 @@ example_test_pytest_esp32s3_generic: TARGET: ESP32S3 ENV_MARKER: generic +example_test_pytest_esp32c2_generic: + extends: + - .pytest_examples_dir_template + - .rules:test:example_test-esp32c2 + needs: + - build_pytest_examples_esp32c2 + variables: + TARGET: ESP32C2 + ENV_MARKER: generic + example_test_pytest_esp32c3_generic: extends: - .pytest_examples_dir_template @@ -256,6 +266,16 @@ component_ut_pytest_esp32s3_octal_psram: TARGET: ESP32S3 ENV_MARKER: octal_psram +component_ut_pytest_esp32c2_generic: + extends: + - .pytest_components_dir_template + - .rules:test:component_ut-esp32c2 + needs: + - build_pytest_components_esp32c2 + variables: + TARGET: ESP32C2 + ENV_MARKER: generic + component_ut_pytest_esp32c3_generic: extends: - .pytest_components_dir_template @@ -303,6 +323,16 @@ test_app_test_pytest_esp32s3_generic: TARGET: ESP32S3 ENV_MARKER: generic +test_app_test_pytest_esp32c2_generic: + extends: + - .pytest_test_apps_dir_template + - .rules:test:custom_test-esp32c2 + needs: + - build_pytest_test_apps_esp32c2 + variables: + TARGET: ESP32C2 + ENV_MARKER: generic + test_app_test_pytest_esp32c3_generic: extends: - .pytest_test_apps_dir_template @@ -401,6 +431,11 @@ test_weekend_mqtt: - .example_test_template - .rules:test:example_test-esp32s2 +.example_test_esp32c2_template: + extends: + - .example_test_template + - .rules:test:example_test-esp32c2 + .example_test_esp32c3_template: extends: - .example_test_template @@ -572,6 +607,13 @@ example_test_017: - ESP32S2 - Example_GENERIC +example_test_C2_GENERIC: + extends: .example_test_esp32c2_template + parallel: 2 + tags: + - ESP32C2 + - Example_GENERIC + example_test_C3_GENERIC: extends: .example_test_esp32c3_template parallel: 2 @@ -621,6 +663,11 @@ example_test_ESP32C3_SDSPI: - .test_app_template - .rules:test:custom_test-esp32s2 +.test_app_esp32c2_template: + extends: + - .test_app_template + - .rules:test:custom_test-esp32c2 + .test_app_esp32c3_template: extends: - .test_app_template @@ -663,6 +710,12 @@ test_app_test_004: - ESP32S2 - Example_GENERIC +test_app_test_esp32c2_generic: + extends: .test_app_esp32c2_template + tags: + - ESP32C2 + - Example_GENERIC + test_app_test_005: extends: .test_app_esp32c3_template tags: @@ -716,6 +769,11 @@ test_app_test_flash_psram_f8r8: - .unit_test_template - .rules:test:unit_test-esp32s3 +.unit_test_esp32c2_template: + extends: + - .unit_test_template + - .rules:test:unit_test-esp32c2 + .unit_test_esp32c3_template: extends: - .unit_test_template @@ -767,7 +825,7 @@ UT_006: UT_007: extends: .unit_test_esp32_template - parallel: 5 + parallel: 2 tags: - ESP32_IDF - UT_T1_1 @@ -904,7 +962,7 @@ UT_046: UT_047: extends: .unit_test_esp32s2_template - parallel: 13 + parallel: 5 tags: - ESP32S2_IDF - UT_T1_1 @@ -921,9 +979,16 @@ UT_S2_SDSPI: - ESP32S2_IDF - UT_T1_SPIMODE +UT_C2: + extends: .unit_test_esp32c2_template + parallel: 19 + tags: + - ESP32C2_IDF + - UT_T1_1 + UT_C3: extends: .unit_test_esp32c3_template - parallel: 34 + parallel: 31 tags: - ESP32C3_IDF - UT_T1_1 @@ -967,27 +1032,19 @@ UT_C3_SDSPI: UT_S3: extends: .unit_test_esp32s3_template - parallel: 33 + parallel: 28 tags: - ESP32S3_IDF - UT_T1_1 UT_S3_QUAD_PSRAM: extends: .unit_test_esp32s3_template - parallel: 33 + parallel: 4 tags: - ESP32S3_IDF - UT_T1_1 - quad_psram -UT_S3_OCTAL_PSRAM: - extends: .unit_test_esp32s3_template - parallel: 33 - tags: - - ESP32S3_IDF - - UT_T1_1 - - octal_psram - UT_S3_SPI_DUAL: extends: .unit_test_esp32s3_template tags: diff --git a/components/app_update/test/test_switch_ota.c b/components/app_update/test/test_switch_ota.c index da3c8ab2ce..9689ef5469 100644 --- a/components/app_update/test/test_switch_ota.c +++ b/components/app_update/test/test_switch_ota.c @@ -32,9 +32,13 @@ #include "driver/gpio.h" #include "esp_sleep.h" +#include "test_utils.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 RTC_DATA_ATTR static int boot_count = 0; + static const char *TAG = "ota_test"; /* @brief Copies a current app to next partition using handle. @@ -821,6 +825,7 @@ static void test_flow6(void) // 3 Stage: run OTA0 -> check it -> erase OTA_DATA for next tests -> PASS TEST_CASE_MULTIPLE_STAGES("Switching between factory, OTA0 using esp_ota_write_with_offset", "[app_update][timeout=90][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET]", start_test, test_flow6, test_flow6); +//IDF-5145 TEST_CASE("Test bootloader_common_get_sha256_of_partition returns ESP_ERR_IMAGE_INVALID when image is ivalid", "[partitions]") { const esp_partition_t *cur_app = esp_ota_get_running_partition(); @@ -842,3 +847,4 @@ TEST_CASE("Test bootloader_common_get_sha256_of_partition returns ESP_ERR_IMAGE_ TEST_ESP_ERR(ESP_ERR_IMAGE_INVALID, bootloader_common_get_sha256_of_partition(other_app->address, other_app->size, other_app->type, sha_256_other_app)); TEST_ASSERT_EQUAL_MEMORY_MESSAGE(sha_256_cur_app, sha_256_other_app, sizeof(sha_256_cur_app), "must be the same"); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/bootloader_support/test/test_verify_image.c b/components/bootloader_support/test/test_verify_image.c index 7675abb718..a73a8d10f1 100644 --- a/components/bootloader_support/test/test_verify_image.c +++ b/components/bootloader_support/test/test_verify_image.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -37,6 +37,8 @@ TEST_CASE("Verify bootloader image in flash", "[bootloader_support]") TEST_ASSERT_EQUAL(data.image_len, bootloader_length); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5145 TEST_CASE("Verify unit test app image", "[bootloader_support]") { esp_image_metadata_t data = { 0 }; @@ -51,6 +53,7 @@ TEST_CASE("Verify unit test app image", "[bootloader_support]") TEST_ASSERT_NOT_EQUAL(0, data.image_len); TEST_ASSERT_TRUE(data.image_len <= running->size); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) void check_label_search (int num_test, const char *list, const char *t_label, bool result) { diff --git a/components/driver/deprecated/timer_legacy.c b/components/driver/deprecated/timer_legacy.c index d753a75f16..6b12845e54 100644 --- a/components/driver/deprecated/timer_legacy.c +++ b/components/driver/deprecated/timer_legacy.c @@ -90,12 +90,12 @@ esp_err_t timer_get_counter_time_sec(timer_group_t group_num, timer_idx_t timer_ #endif #if SOC_TIMER_GROUP_SUPPORT_AHB case TIMER_SRC_CLK_AHB: - *time = (double)timer_val * div / 48 * 1000 * 1000; + *time = (double)timer_val * div / (48 * 1000 * 1000); break; #endif #if SOC_TIMER_GROUP_SUPPORT_PLL_F40M case TIMER_SRC_CLK_PLL_F40M: - *time = (double)timer_val * div / 40 * 1000 * 1000; + *time = (double)timer_val * div / (40 * 1000 * 1000); break; #endif default: diff --git a/components/driver/test/test_spi_bus_lock.c b/components/driver/test/test_spi_bus_lock.c index 8159d61909..0d4ff36ba4 100644 --- a/components/driver/test/test_spi_bus_lock.c +++ b/components/driver/test/test_spi_bus_lock.c @@ -283,11 +283,12 @@ static void test_bus_lock(bool test_flash) #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3, ESP32S3, ESP32C2) //no runners +//IDF-5049 TEST_CASE("spi bus lock, with flash","[spi][test_env=UT_T1_ESP_FLASH]") { test_bus_lock(true); } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2) +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(...) TEST_CASE("spi bus lock","[spi]") diff --git a/components/driver/test/test_spi_master.c b/components/driver/test/test_spi_master.c index aec05c70c0..8cbe974048 100644 --- a/components/driver/test/test_spi_master.c +++ b/components/driver/test/test_spi_master.c @@ -30,6 +30,7 @@ #include "soc/soc_memory_layout.h" #include "driver/spi_common_internal.h" #include "esp_private/esp_clk.h" +#include "test_utils.h" const static char TAG[] = "test_spi"; @@ -604,6 +605,8 @@ TEST_CASE("SPI Master no response when switch from host1 (SPI2) to host2 (SPI3)" TEST_ESP_OK(spi_bus_free(host)); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5146 DRAM_ATTR static uint32_t data_dram[80] = {0}; //force to place in code area. static const uint8_t data_drom[320 + 3] = { @@ -717,6 +720,7 @@ TEST_CASE("SPI Master DMA test, TX and RX in different regions", "[spi]") free(data_iram); #endif } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) //this part tests 3 DMA issues in master mode, full-duplex in IDF2.1 // 1. RX buffer not aligned (start and end) @@ -1123,6 +1127,7 @@ TEST_CASE("SPI master hd dma TX without RX test", "[spi]") } #endif //#if (TEST_SPI_PERIPH_NUM >= 2) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32) //TODO: IDF-3494 #define FD_TEST_BUF_SIZE 32 #define TEST_NUM 4 @@ -1298,6 +1303,7 @@ static void fd_slave(void) TEST_CASE_MULTIPLE_DEVICES("SPI Master: FD, DMA, Master Single Direction Test", "[spi_ms][test_env=Example_SPI_Multi_device]", fd_master, fd_slave); #endif //#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32) //TODO: IDF-3494 +#endif //#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) //TODO: IDF-3494 //NOTE: Explained in IDF-1445 | MR !14996 #if !(CONFIG_SPIRAM) || (CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL >= 16384) @@ -1306,6 +1312,8 @@ TEST_CASE_MULTIPLE_DEVICES("SPI Master: FD, DMA, Master Single Direction Test", ********************************************************************************/ //Disabled since the check in portENTER_CRITICAL in esp_intr_enable/disable increase the delay #ifndef CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5146 #define RECORD_TIME_PREPARE() uint32_t __t1, __t2 #define RECORD_TIME_START() do {__t1 = esp_cpu_get_ccount();}while(0) @@ -1446,5 +1454,7 @@ TEST_CASE("spi_speed", "[spi]") spi_device_release_bus(spi); master_free_device_bus(spi); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + #endif // CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE #endif // !(CONFIG_SPIRAM) || (CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL >= 16384) diff --git a/components/driver/test/test_spi_param.c b/components/driver/test/test_spi_param.c index e3da108fd8..83fa5b06d6 100644 --- a/components/driver/test/test_spi_param.c +++ b/components/driver/test/test_spi_param.c @@ -622,7 +622,7 @@ TEST_CASE("Slave receive correct data", "[spi]") } } -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3, ESP32C2) //These tests are ESP32 only due to lack of runners /******************************************************************************** * Test By Master & Slave (2 boards) @@ -1175,6 +1175,6 @@ spitest_param_set_t mode_conf[] = { }; TEST_SPI_MASTER_SLAVE(MODE, mode_conf, "") -#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3) +#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3, ESP32C2) #endif // #if (TEST_SPI_PERIPH_NUM >= 2) diff --git a/components/driver/test/test_spi_slave.c b/components/driver/test/test_spi_slave.c index c7b735fbdc..fa0a1a6188 100644 --- a/components/driver/test/test_spi_slave.c +++ b/components/driver/test/test_spi_slave.c @@ -261,6 +261,7 @@ TEST_CASE("test slave send unaligned","[spi]") #endif // #if (TEST_SPI_PERIPH_NUM >= 2) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if (TEST_SPI_PERIPH_NUM == 1) //These tests are for chips which only have 1 SPI controller /******************************************************************************** @@ -384,3 +385,4 @@ static void unaligned_test_slave(void) TEST_CASE_MULTIPLE_DEVICES("SPI_Slave_Unaligned_Test", "[spi_ms][test_env=Example_SPI_Multi_device][timeout=120]", unaligned_test_master, unaligned_test_slave); #endif //#if (TEST_SPI_PERIPH_NUM == 1) +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(...) diff --git a/components/driver/test/test_spi_slave_hd.c b/components/driver/test/test_spi_slave_hd.c index fbdcdcd82e..393811ebd0 100644 --- a/components/driver/test/test_spi_slave_hd.c +++ b/components/driver/test/test_spi_slave_hd.c @@ -601,6 +601,7 @@ TEST_CASE("test spi slave hd segment mode, master too long", "[spi][spi_slv_hd]" #if (TEST_SPI_PERIPH_NUM == 1) #if SOC_SPI_SUPPORT_SLAVE_HD_VER2 +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) //These tests are for chips which only have 1 SPI controller /******************************************************************************** * Test By Master & Slave (2 boards) @@ -747,9 +748,7 @@ static void hd_slave(void) spi_slave_hd_deinit(TEST_SLAVE_HOST); } - TEST_CASE_MULTIPLE_DEVICES("SPI Slave HD: segment mode, master sends too long", "[spi_ms][test_env=Example_SPI_Multi_device]", hd_master, hd_slave); - +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(...) #endif //#if SOC_SPI_SUPPORT_SLAVE_HD_VER2 - #endif //#if (TEST_SPI_PERIPH_NUM == 1) diff --git a/components/driver/test_apps/gptimer/README.md b/components/driver/test_apps/gptimer/README.md index 3f7a0a04f0..57433de18a 100644 --- a/components/driver/test_apps/gptimer/README.md +++ b/components/driver/test_apps/gptimer/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/components/driver/test_apps/legacy_timer_driver/README.md b/components/driver/test_apps/legacy_timer_driver/README.md index 3f7a0a04f0..57433de18a 100644 --- a/components/driver/test_apps/legacy_timer_driver/README.md +++ b/components/driver/test_apps/legacy_timer_driver/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/components/esp-tls/test/test_esp_tls.c b/components/esp-tls/test/test_esp_tls.c index f6a0b7aaab..f410df6ba8 100644 --- a/components/esp-tls/test/test_esp_tls.c +++ b/components/esp-tls/test/test_esp_tls.c @@ -16,6 +16,10 @@ #elif SOC_SHA_SUPPORT_DMA #include "sha/sha_dma.h" #endif +#include "test_utils.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5044 const char *test_cert_pem = "-----BEGIN CERTIFICATE-----\n"\ "MIICrDCCAZQCCQD88gCs5AFs/jANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1F\n"\ @@ -120,3 +124,5 @@ TEST_CASE("esp_tls_server session create delete", "[esp-tls][leaks=0]") esp_tls_server_session_delete(tls); } #endif + +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/esp_common/test/test_attr.c b/components/esp_common/test/test_attr.c index 6e5378dda2..023226d474 100644 --- a/components/esp_common/test/test_attr.c +++ b/components/esp_common/test/test_attr.c @@ -13,16 +13,7 @@ #if CONFIG_IDF_TARGET_ESP32 #include "spiram.h" #endif - -static __NOINIT_ATTR uint32_t s_noinit; -static RTC_NOINIT_ATTR uint32_t s_rtc_noinit; -static RTC_DATA_ATTR uint32_t s_rtc_data; -static RTC_RODATA_ATTR uint32_t s_rtc_rodata; -static RTC_FAST_ATTR uint32_t s_rtc_force_fast; -static RTC_SLOW_ATTR uint32_t s_rtc_force_slow; -#if CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY -static EXT_RAM_NOINIT_ATTR uint32_t s_noinit_ext; -#endif +#include "test_utils.h" extern int _rtc_noinit_start; extern int _rtc_noinit_end; @@ -40,6 +31,19 @@ extern int _ext_ram_bss_start; extern int _ext_ram_bss_end; +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5045 +//Variables for test: Attributes place variables into correct sections +static __NOINIT_ATTR uint32_t s_noinit; +static RTC_NOINIT_ATTR uint32_t s_rtc_noinit; +static RTC_DATA_ATTR uint32_t s_rtc_data; +static RTC_RODATA_ATTR uint32_t s_rtc_rodata; +static RTC_FAST_ATTR uint32_t s_rtc_force_fast; +static RTC_SLOW_ATTR uint32_t s_rtc_force_slow; +#if CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY +static EXT_RAM_NOINIT_ATTR uint32_t s_noinit_ext; +#endif + static bool data_in_segment(void *ptr, int *seg_start, int *seg_end) { return ((intptr_t)ptr < (intptr_t)seg_end) && \ @@ -75,6 +79,7 @@ TEST_CASE("Attributes place variables into correct sections", "[ld]") #endif } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY diff --git a/components/esp_event/test/test_event.c b/components/esp_event/test/test_event.c index a368ab42e7..bea936eb9e 100644 --- a/components/esp_event/test/test_event.c +++ b/components/esp_event/test/test_event.c @@ -21,6 +21,9 @@ #include "test_utils.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-4035 static const char* TAG = "test_event"; #define TEST_CONFIG_ITEMS_TO_REGISTER 5 @@ -2018,3 +2021,4 @@ TEST_CASE("can post events from interrupt handler", "[event]") } #endif // CONFIG_ESP_EVENT_POST_FROM_ISR +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/esp_hw_support/test/test_intr_alloc.c b/components/esp_hw_support/test/test_intr_alloc.c index b6b0808167..34435a3176 100644 --- a/components/esp_hw_support/test/test_intr_alloc.c +++ b/components/esp_hw_support/test/test_intr_alloc.c @@ -196,6 +196,9 @@ TEST_CASE("allocate 2 handlers for a same source and remove the later one", "[in esp_intr_free(handle1); } + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5061 static void dummy(void *arg) { } @@ -224,6 +227,8 @@ TEST_CASE("Can allocate IRAM int only with an IRAM handler", "[intr_alloc]") TEST_ESP_OK(err); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + #ifndef CONFIG_FREERTOS_UNICORE void isr_free_task(void *param) { diff --git a/components/esp_hw_support/test/test_rtc_clk.c b/components/esp_hw_support/test/test_rtc_clk.c index b264f72288..57a149c017 100644 --- a/components/esp_hw_support/test/test_rtc_clk.c +++ b/components/esp_hw_support/test/test_rtc_clk.c @@ -349,6 +349,8 @@ TEST_CASE("Test starting 'External 32kHz XTAL' on the board without it.", "[rtc_ #endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5060 TEST_CASE("Test rtc clk calibration compensation", "[rtc_clk]") { int64_t t1 = esp_rtc_get_time_us(); @@ -378,7 +380,6 @@ TEST_CASE("Test rtc clk calibration compensation", "[rtc_clk]") #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) /* Disabled until deep sleep is brought up TODO ESP32-S3 IDF-2691 */ - static RTC_NOINIT_ATTR int64_t start = 0; static void trigger_deepsleep(void) @@ -431,3 +432,4 @@ static void check_time_deepsleep_2(void) TEST_CASE_MULTIPLE_STAGES("Test rtc clk calibration compensation across deep sleep", "[rtc_clk][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET]", trigger_deepsleep, check_time_deepsleep_1, check_time_deepsleep_2); #endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/esp_netif/test/test_esp_netif.c b/components/esp_netif/test/test_esp_netif.c index 212537dc97..45a10c44a8 100644 --- a/components/esp_netif/test/test_esp_netif.c +++ b/components/esp_netif/test/test_esp_netif.c @@ -75,6 +75,10 @@ TEST_CASE("esp_netif: create and delete multiple netifs", "[esp_netif][leaks=0]" } + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5047 + TEST_CASE("esp_netif: test dhcp client state transitions for wifi station", "[esp_netif]") { // init default wifi netif @@ -298,6 +302,8 @@ TEST_CASE("esp_netif: get/set hostname", "[esp_netif]") esp_netif_destroy(esp_netif); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + TEST_CASE("esp_netif: convert ip address from string", "[esp_netif]") { const char *ipv4_src[] = {"127.168.1.1", "255.255.255.0", "305.500.721.801", "127.168.1..", "abc.def.***.ddd"}; @@ -322,6 +328,8 @@ TEST_CASE("esp_netif: convert ip address from string", "[esp_netif]") TEST_ASSERT_EQUAL(ESP_ERR_INVALID_ARG, esp_netif_str_to_ip6(ipv6_src[0], NULL)); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5047 TEST_CASE("esp_netif: create and destroy default wifi interfaces", "[esp_netif][leaks=0]") { // Helper constants to refer default STA and AP's params @@ -356,6 +364,9 @@ TEST_CASE("esp_netif: create and destroy default wifi interfaces", "[esp_netif][ esp_netif_destroy_default_wifi(sta); } + +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + static esp_err_t dummy_transmit(void* hd, void *buf, size_t length) { return ESP_OK; diff --git a/components/esp_phy/test/test_phy_rtc.c b/components/esp_phy/test/test_phy_rtc.c index e7a4ee0844..ea24cdfbe2 100644 --- a/components/esp_phy/test/test_phy_rtc.c +++ b/components/esp_phy/test/test_phy_rtc.c @@ -7,13 +7,17 @@ #include "esp_log.h" #include "nvs_flash.h" #include "test_utils.h" -#include "esp_phy_init.h" #include #include #include #include "soc/soc_caps.h" #include "esp_private/wifi.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5046 +#include "esp_phy_init.h" + #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3) //Function just extern, need not test @@ -126,3 +130,5 @@ TEST_CASE("Test PHY/RTC functions called when cache is disabled", "[phy_rtc][cac vSemaphoreDelete(semphr_done); } #endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2) + +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/esp_pm/test/CMakeLists.txt b/components/esp_pm/test/CMakeLists.txt index 46a739f2ba..34851aeb16 100644 --- a/components/esp_pm/test/CMakeLists.txt +++ b/components/esp_pm/test/CMakeLists.txt @@ -1,2 +1,2 @@ idf_component_register(SRC_DIRS . - PRIV_REQUIRES unity esp_pm ulp driver esp_timer) + PRIV_REQUIRES unity esp_pm ulp driver esp_timer test_utils) diff --git a/components/esp_pm/test/test_pm.c b/components/esp_pm/test/test_pm.c index 0c0abdbd66..938ab71c45 100644 --- a/components/esp_pm/test/test_pm.c +++ b/components/esp_pm/test/test_pm.c @@ -18,6 +18,7 @@ #include "soc/rtc_periph.h" #include "esp_rom_sys.h" #include "esp_private/esp_clk.h" +#include "test_utils.h" #include "sdkconfig.h" @@ -38,6 +39,8 @@ TEST_CASE("Can dump power management lock stats", "[pm]") #ifdef CONFIG_PM_ENABLE +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5053 static void switch_freq(int mhz) { int xtal_freq_mhz = esp_clk_xtal_freq() / MHZ; @@ -47,6 +50,8 @@ static void switch_freq(int mhz) esp_pm_config_esp32s2_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32S3 esp_pm_config_esp32s3_t pm_config = { +#elif CONFIG_IDF_TARGET_ESP32C2 + esp_pm_config_esp32c2_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32C3 esp_pm_config_esp32c3_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32H2 @@ -81,6 +86,7 @@ TEST_CASE("Can switch frequency using esp_pm_configure", "[pm]") switch_freq(orig_freq_mhz); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if CONFIG_FREERTOS_USE_TICKLESS_IDLE @@ -95,6 +101,8 @@ static void light_sleep_enable(void) esp_pm_config_esp32s2_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32S3 esp_pm_config_esp32s3_t pm_config = { +#elif CONFIG_IDF_TARGET_ESP32C2 + esp_pm_config_esp32c2_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32C3 esp_pm_config_esp32c3_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32H2 @@ -117,6 +125,8 @@ static void light_sleep_disable(void) esp_pm_config_esp32s2_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32S3 esp_pm_config_esp32s3_t pm_config = { +#elif CONFIG_IDF_TARGET_ESP32C2 + esp_pm_config_esp32c2_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32C3 esp_pm_config_esp32c3_t pm_config = { #elif CONFIG_IDF_TARGET_ESP32H2 @@ -128,6 +138,8 @@ static void light_sleep_disable(void) ESP_ERROR_CHECK( esp_pm_configure(&pm_config) ); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5053 TEST_CASE("Automatic light occurs when tasks are suspended", "[pm]") { gptimer_handle_t gptimer = NULL; @@ -178,6 +190,7 @@ TEST_CASE("Automatic light occurs when tasks are suspended", "[pm]") TEST_ESP_OK(gptimer_disable(gptimer)); TEST_ESP_OK(gptimer_del_timer(gptimer)); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if CONFIG_ULP_COPROC_TYPE_FSM #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3) @@ -255,6 +268,8 @@ TEST_CASE("Can wake up from automatic light sleep by GPIO", "[pm][ignore]") #endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3) #endif //CONFIG_ULP_COPROC_TYPE_FSM +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5053 typedef struct { int delay_us; int result; @@ -375,6 +390,7 @@ TEST_CASE("esp_timer produces correct delays with light sleep", "[pm]") #undef NUM_INTERVALS } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static void timer_cb1(void *arg) { diff --git a/components/esp_rom/test/test_libgcc.c b/components/esp_rom/test/test_libgcc.c index 2b85c33179..85c9398643 100644 --- a/components/esp_rom/test/test_libgcc.c +++ b/components/esp_rom/test/test_libgcc.c @@ -175,7 +175,7 @@ TEST_CASE("libgcc math functions", "[rom][libgcc]") TEST_ASSERT(__umoddi3(15, 2) == 1); extern unsigned __umodsi3(unsigned x, unsigned y); TEST_ASSERT(__umodsi3(15, 2) == 1); -#if !CONFIG_IDF_TARGET_ESP32C3 +#if !(CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3) extern uint64_t __umulsidi3(unsigned x, unsigned y); TEST_ASSERT(__umulsidi3(0x10000000, 0x10000000) == 0x100000000000000ULL); #endif diff --git a/components/esp_system/test/test_reset_reason.c b/components/esp_system/test/test_reset_reason.c index 5dc5585ad1..793e5e8fc9 100644 --- a/components/esp_system/test/test_reset_reason.c +++ b/components/esp_system/test/test_reset_reason.c @@ -13,17 +13,6 @@ #define CHECK_VALUE 0x89abcdef -static __NOINIT_ATTR uint32_t s_noinit_val; -static RTC_NOINIT_ATTR uint32_t s_rtc_noinit_val; -static RTC_DATA_ATTR uint32_t s_rtc_data_val; -static RTC_BSS_ATTR uint32_t s_rtc_bss_val; -/* There is no practical difference between placing something into RTC_DATA and - * RTC_RODATA. This only checks a usage pattern where the variable has a non-zero - * initializer (should be initialized by the bootloader). - */ -static RTC_RODATA_ATTR uint32_t s_rtc_rodata_val = CHECK_VALUE; -static RTC_FAST_ATTR uint32_t s_rtc_force_fast_val; -static RTC_SLOW_ATTR uint32_t s_rtc_force_slow_val; #if CONFIG_IDF_TARGET_ESP32 #define DEEPSLEEP "DEEPSLEEP_RESET" @@ -61,6 +50,30 @@ static RTC_SLOW_ATTR uint32_t s_rtc_force_slow_val; #endif // CONFIG_IDF_TARGET_ESP32 + +/* This test needs special test runners: rev1 silicon, and SPI flash with + * fast start-up time. Otherwise reset reason will be RTCWDT_RESET. + */ +TEST_CASE("reset reason ESP_RST_POWERON", "[reset][ignore]") +{ + TEST_ASSERT_EQUAL(ESP_RST_POWERON, esp_reset_reason()); +} + + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5059 +static __NOINIT_ATTR uint32_t s_noinit_val; +static RTC_NOINIT_ATTR uint32_t s_rtc_noinit_val; +static RTC_DATA_ATTR uint32_t s_rtc_data_val; +static RTC_BSS_ATTR uint32_t s_rtc_bss_val; +/* There is no practical difference between placing something into RTC_DATA and + * RTC_RODATA. This only checks a usage pattern where the variable has a non-zero + * initializer (should be initialized by the bootloader). + */ +static RTC_RODATA_ATTR uint32_t s_rtc_rodata_val = CHECK_VALUE; +static RTC_FAST_ATTR uint32_t s_rtc_force_fast_val; +static RTC_SLOW_ATTR uint32_t s_rtc_force_slow_val; + static void setup_values(void) { s_noinit_val = CHECK_VALUE; @@ -73,14 +86,6 @@ static void setup_values(void) s_rtc_force_slow_val = CHECK_VALUE; } -/* This test needs special test runners: rev1 silicon, and SPI flash with - * fast start-up time. Otherwise reset reason will be RTCWDT_RESET. - */ -TEST_CASE("reset reason ESP_RST_POWERON", "[reset][ignore]") -{ - TEST_ASSERT_EQUAL(ESP_RST_POWERON, esp_reset_reason()); -} - #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) static void do_deep_sleep(void) { @@ -298,6 +303,8 @@ TEST_CASE_MULTIPLE_STAGES("reset reason ESP_RST_BROWNOUT after brownout event", do_brownout, check_reset_reason_brownout); +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + #ifdef CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY #ifndef CONFIG_FREERTOS_UNICORE diff --git a/components/esp_system/test/test_sleep.c b/components/esp_system/test/test_sleep.c index 1f3eb56f8f..c9857dcc4a 100644 --- a/components/esp_system/test/test_sleep.c +++ b/components/esp_system/test/test_sleep.c @@ -55,8 +55,16 @@ static void do_deep_sleep_from_app_cpu(void) ; } } + +TEST_CASE("enter deep sleep on APP CPU and wake up using timer", "[deepsleep][reset=DEEPSLEEP_RESET]") +{ + esp_sleep_enable_timer_wakeup(2000000); + do_deep_sleep_from_app_cpu(); +} #endif +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 TEST_CASE("wake up from deep sleep using timer", "[deepsleep][reset=DEEPSLEEP_RESET]") { esp_sleep_enable_timer_wakeup(2000000); @@ -70,6 +78,7 @@ TEST_CASE("light sleep followed by deep sleep", "[deepsleep][reset=DEEPSLEEP_RES esp_deep_sleep_start(); } +//IDF-5053 TEST_CASE("wake up from light sleep using timer", "[deepsleep]") { esp_sleep_enable_timer_wakeup(2000000); @@ -81,6 +90,7 @@ TEST_CASE("wake up from light sleep using timer", "[deepsleep]") (tv_stop.tv_usec - tv_start.tv_usec) * 1e-3f; TEST_ASSERT_INT32_WITHIN(500, 2000, (int) dt); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) //NOTE: Explained in IDF-1445 | MR !14996 #if !(CONFIG_SPIRAM) || (CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL >= 16384) @@ -218,14 +228,8 @@ TEST_CASE("light sleep and frequency switching", "[deepsleep]") } } -#ifndef CONFIG_FREERTOS_UNICORE -TEST_CASE("enter deep sleep on APP CPU and wake up using timer", "[deepsleep][reset=DEEPSLEEP_RESET]") -{ - esp_sleep_enable_timer_wakeup(2000000); - do_deep_sleep_from_app_cpu(); -} -#endif - +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 static void do_deep_sleep(void) { esp_sleep_enable_timer_wakeup(100000); @@ -292,10 +296,13 @@ static void check_wake_stub(void) #endif } + TEST_CASE_MULTIPLE_STAGES("can set sleep wake stub", "[deepsleep][reset=DEEPSLEEP_RESET]", prepare_wake_stub, check_wake_stub); +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + #if CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP @@ -363,6 +370,9 @@ TEST_CASE_MULTIPLE_STAGES("can set sleep wake stub from stack in RTC RAM", "[dee #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 TEST_CASE("wake up using ext0 (13 high)", "[deepsleep][ignore]") { ESP_ERROR_CHECK(rtc_gpio_init(GPIO_NUM_13)); @@ -417,6 +427,8 @@ TEST_CASE("wake up using ext1 when RTC_PERIPH is on (13 low)", "[deepsleep][igno esp_deep_sleep_start(); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + __attribute__((unused)) static float get_time_ms(void) { gettimeofday(&tv_stop, NULL); @@ -512,6 +524,8 @@ TEST_CASE("disable source trigger behavior", "[deepsleep]") #endif //SOC_RTCIO_INPUT_OUTPUT_SUPPORTED +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 static RTC_DATA_ATTR struct timeval start; static void trigger_deepsleep(void) { @@ -571,3 +585,4 @@ TEST_CASE("wake up using GPIO (2 or 4 low)", "[deepsleep][ignore]") esp_deep_sleep_start(); } #endif // SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/esp_system/test/test_task_wdt.c b/components/esp_system/test/test_task_wdt.c index f726216071..b80ccae0be 100644 --- a/components/esp_system/test/test_task_wdt.c +++ b/components/esp_system/test/test_task_wdt.c @@ -8,6 +8,7 @@ #include "unity.h" #include "esp_rom_sys.h" #include "esp_task_wdt.h" +#include "test_utils.h" #define TASK_WDT_TIMEOUT_MS 1000 @@ -18,6 +19,8 @@ void esp_task_wdt_isr_user_handler(void) timeout_flag = true; } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5055 TEST_CASE("Task WDT task timeout", "[task_wdt]") { timeout_flag = false; @@ -34,6 +37,7 @@ TEST_CASE("Task WDT task timeout", "[task_wdt]") TEST_ASSERT_EQUAL(ESP_OK, esp_task_wdt_delete(NULL)); TEST_ASSERT_EQUAL(ESP_OK, esp_task_wdt_deinit()); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("Task WDT task feed", "[task_wdt]") { @@ -54,6 +58,8 @@ TEST_CASE("Task WDT task feed", "[task_wdt]") TEST_ASSERT_EQUAL(ESP_OK, esp_task_wdt_deinit()); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5055 TEST_CASE("Task WDT user timeout", "[task_wdt]") { const char *user_name = "test_user"; @@ -72,6 +78,7 @@ TEST_CASE("Task WDT user timeout", "[task_wdt]") TEST_ASSERT_EQUAL(ESP_OK, esp_task_wdt_delete_user(user_handle)); TEST_ASSERT_EQUAL(ESP_OK, esp_task_wdt_deinit()); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("Task WDT user feed", "[task_wdt]") { diff --git a/components/esp_system/test_apps/rtc_8md256/main/test_rtc_8md256.c b/components/esp_system/test_apps/rtc_8md256/main/test_rtc_8md256.c index 1c43dfd2e7..902f8423bd 100644 --- a/components/esp_system/test_apps/rtc_8md256/main/test_rtc_8md256.c +++ b/components/esp_system/test_apps/rtc_8md256/main/test_rtc_8md256.c @@ -15,6 +15,10 @@ #include "freertos/FreeRTOS.h" #include "soc/soc_caps.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 + static const char TAG[] = "rtc_8m"; static void test_deepsleep(bool force_rtc_periph) @@ -36,6 +40,7 @@ TEST_CASE("Can use 8MD256 as RTC clock source in deepsleep", "[pm]") { test_deepsleep(false); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static void test_lightsleep(bool force_rtc_periph) { diff --git a/components/esp_system/test_apps/rtc_8md256/pytest_rtc_8md256.py b/components/esp_system/test_apps/rtc_8md256/pytest_rtc_8md256.py index 7d534656c8..8410d9a5a5 100644 --- a/components/esp_system/test_apps/rtc_8md256/pytest_rtc_8md256.py +++ b/components/esp_system/test_apps/rtc_8md256/pytest_rtc_8md256.py @@ -12,11 +12,18 @@ def deepsleep_test(dut: Dut, case_name: str) -> None: if dut.target == 'esp32c3': # Known issue: IDF-5003 dut.expect(r'rst:.*\(%s\)' % reset_reason, timeout=40) + elif dut.target == 'esp32c2': + # Known issue: IDF-5003 + dut.expect(r'rst:.*\(%s\)' % reset_reason, timeout=60) else: dut.expect(r'rst:.*\(%s\)' % reset_reason, timeout=10) -@pytest.mark.supported_targets +# IDF-5131 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_rtc_8md256_deepsleep(dut: Dut) -> None: deepsleep_test(dut, '"Can use 8MD256 as RTC clock source in deepsleep"') diff --git a/components/esp_timer/test/test_esp_timer.c b/components/esp_timer/test/test_esp_timer.c index 3a4e0471b6..18bca2b54f 100644 --- a/components/esp_timer/test/test_esp_timer.c +++ b/components/esp_timer/test/test_esp_timer.c @@ -381,6 +381,8 @@ TEST_CASE("esp_timer for very short intervals", "[esp_timer]") } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5052 TEST_CASE("esp_timer_get_time call takes less than 1us", "[esp_timer]") { int64_t begin = esp_timer_get_time(); @@ -392,6 +394,7 @@ TEST_CASE("esp_timer_get_time call takes less than 1us", "[esp_timer]") int ns_per_call = (int) ((end - begin) * 1000 / iter_count); TEST_PERFORMANCE_LESS_THAN(ESP_TIMER_GET_TIME_PER_CALL, "%dns", ns_per_call); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static int64_t IRAM_ATTR __attribute__((noinline)) get_clock_diff(void) { diff --git a/components/esp_timer/test/test_ets_timer.c b/components/esp_timer/test/test_ets_timer.c index ac266dcca6..43e7a54d6a 100644 --- a/components/esp_timer/test/test_ets_timer.c +++ b/components/esp_timer/test/test_ets_timer.c @@ -18,6 +18,8 @@ #include "esp32c3/rom/ets_sys.h" #elif CONFIG_IDF_TARGET_ESP32H2 #include "esp32h2/rom/ets_sys.h" +#elif CONFIG_IDF_TARGET_ESP32C2 +#include "esp32c2/rom/ets_sys.h" #endif static void test_correct_delay_timer_func(void* arg) diff --git a/components/esp_wifi/test/test_wifi.c b/components/esp_wifi/test/test_wifi.c index f186086e1f..788c4c26fc 100644 --- a/components/esp_wifi/test/test_wifi.c +++ b/components/esp_wifi/test/test_wifi.c @@ -32,8 +32,9 @@ #define EVENT_HANDLER_FLAG_DO_NOT_AUTO_RECONNECT 0x00000001 -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3) -/* TODO IDF-2618 */ +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3, ESP32C2) +/* TODO IDF-2618, IDF-5046 */ +//IDF-5046 static const char* TAG = "test_wifi"; static uint32_t wifi_event_handler_flag; @@ -352,4 +353,4 @@ static void test_wifi_connection_softap(void) TEST_CASE_MULTIPLE_DEVICES("test wifi retain connection for 60s", "[wifi][test_env=UT_T2_1][timeout=90]", test_wifi_connection_sta, test_wifi_connection_softap); -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3) +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(...) diff --git a/components/esp_wifi/test/test_wifi_init.c b/components/esp_wifi/test/test_wifi_init.c index ff4875d1a2..7ddc37e5ef 100644 --- a/components/esp_wifi/test/test_wifi_init.c +++ b/components/esp_wifi/test/test_wifi_init.c @@ -14,6 +14,8 @@ #define EVENT_HANDLER_FLAG_DO_NOT_AUTO_RECONNECT 0x00000001 #define EMPH_STR(s) "****** "s" ******" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5046 static const char* TAG = "test_wifi_init"; static uint32_t wifi_event_handler_flag; static EventGroupHandle_t wifi_events; @@ -276,3 +278,5 @@ TEST_CASE("Calling esp_wifi_deinit() without stop", "[wifi_init]") sema = NULL; unity_utils_task_delete(th); } + +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/espcoredump/test/CMakeLists.txt b/components/espcoredump/test/CMakeLists.txt index d29c6848fb..32c2b8226d 100644 --- a/components/espcoredump/test/CMakeLists.txt +++ b/components/espcoredump/test/CMakeLists.txt @@ -3,5 +3,5 @@ if(TESTS_ALL EQUAL 1) else() idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock nvs_flash) + PRIV_REQUIRES cmock nvs_flash test_utils) endif() diff --git a/components/espcoredump/test/test_sections.c b/components/espcoredump/test/test_sections.c index 9b27669413..175369e1b6 100644 --- a/components/espcoredump/test/test_sections.c +++ b/components/espcoredump/test/test_sections.c @@ -6,6 +6,10 @@ #include #include "unity.h" #include "esp_attr.h" +#include "test_utils.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5050 /* Global variables that should be part of the coredump */ COREDUMP_IRAM_DATA_ATTR uint32_t var_iram = 0x42; @@ -58,3 +62,5 @@ TEST_CASE("test variables presence in core dump sections", "[espcoredump]") TEST_ASSERT(section_size > 0); TEST_ASSERT(is_addr_in_region(&var_rtcfast, (uint8_t*) section_start, section_size)); } + +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/fatfs/test/test_fatfs_rawflash.c b/components/fatfs/test/test_fatfs_rawflash.c index 12d4b272e0..efb7437198 100644 --- a/components/fatfs/test/test_fatfs_rawflash.c +++ b/components/fatfs/test/test_fatfs_rawflash.c @@ -24,6 +24,8 @@ #include "esp_rom_sys.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5136 static void test_setup(size_t max_files) { extern const char fatfs_start[] asm("_binary_fatfs_img_start"); @@ -337,3 +339,10 @@ TEST_CASE("(raw) read speed test", "[fatfs][timeout=60]") free(buf); test_teardown(); } +#else //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +TEST_CASE("FATFS dummy test", "[spi_flash]") +{ + printf("This test does nothing, just to make the UT build fatfs-fast-seek passed.\n"); + printf("When any case above is supported, remove this test case\n"); +} +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/fatfs/test/test_fatfs_spiflash.c b/components/fatfs/test/test_fatfs_spiflash.c index e34007b9eb..904f0ff72d 100644 --- a/components/fatfs/test/test_fatfs_spiflash.c +++ b/components/fatfs/test/test_fatfs_spiflash.c @@ -23,6 +23,8 @@ #include "esp_partition.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5136 static wl_handle_t s_test_wl_handle; static void test_setup(void) { @@ -200,6 +202,7 @@ TEST_CASE("(WL) can get partition info", "[fatfs][wear_levelling]") test_fatfs_info("/spiflash", "/spiflash/test.txt"); test_teardown(); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) /* * In FatFs menuconfig, set CONFIG_FATFS_API_ENCODING to UTF-8 and set the @@ -207,6 +210,9 @@ TEST_CASE("(WL) can get partition info", "[fatfs][wear_levelling]") * Ensure that the text editor is UTF-8 compatible when compiling these tests. */ #if defined(CONFIG_FATFS_API_ENCODING_UTF_8) && (CONFIG_FATFS_CODEPAGE == 936) + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5136 TEST_CASE("(WL) can read file with UTF-8 encoded strings", "[fatfs][wear_levelling]") { test_setup(); @@ -221,7 +227,8 @@ TEST_CASE("(WL) opendir, readdir, rewinddir, seekdir work as expected using UTF- test_fatfs_opendir_readdir_rewinddir_utf_8("/spiflash/目录"); test_teardown(); } -#endif +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +#endif //defined(CONFIG_FATFS_API_ENCODING_UTF_8) && (CONFIG_FATFS_CODEPAGE == 936) #ifdef CONFIG_SPIRAM TEST_CASE("FATFS prefers SPI RAM for allocations", "[fatfs]") diff --git a/components/freertos/test/integration/timers/test_timers.c b/components/freertos/test/integration/timers/test_timers.c index f90b187f72..98322c2922 100644 --- a/components/freertos/test/integration/timers/test_timers.c +++ b/components/freertos/test/integration/timers/test_timers.c @@ -11,6 +11,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/timers.h" +#include "test_utils.h" static void timer_callback(TimerHandle_t timer) { @@ -20,6 +21,8 @@ static void timer_callback(TimerHandle_t timer) printf("Callback timer %p count %p = %d\n", timer, count, *count); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5140 TEST_CASE("Oneshot FreeRTOS timers", "[freertos]") { volatile int count = 0; @@ -74,6 +77,7 @@ TEST_CASE("Recurring FreeRTOS timers", "[freertos]") TEST_ASSERT( xTimerDelete(recurring, 1) ); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("Static timer creation", "[freertos]") { diff --git a/components/freertos/test/port/test_newlib_reent.c b/components/freertos/test/port/test_newlib_reent.c index a5608cda92..74afc033c3 100644 --- a/components/freertos/test/port/test_newlib_reent.c +++ b/components/freertos/test/port/test_newlib_reent.c @@ -17,10 +17,13 @@ #include "freertos/semphr.h" #include "freertos/queue.h" #include "unity.h" +#include "test_utils.h" volatile static int done; volatile static int error; +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5140 static void tskTestRand(void *pvParameters) { int l; @@ -57,3 +60,4 @@ TEST_CASE("Test for per-task non-reentrant tasks", "[freertos]") } TEST_ASSERT(error == 0); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/hal/test/test_mpu.c b/components/hal/test/test_mpu.c index 8dc3abdbd7..38a7c2c4d1 100644 --- a/components/hal/test/test_mpu.c +++ b/components/hal/test/test_mpu.c @@ -10,6 +10,8 @@ // LL still not implemented #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5058 volatile static int RTC_NOINIT_ATTR access = 0; @@ -47,4 +49,5 @@ TEST_CASE_MULTIPLE_STAGES("Can set illegal access regions", "[soc][mpu]", trigger_illegal_access, check_access); +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3) diff --git a/components/heap/test/test_diram.c b/components/heap/test/test_diram.c index 1796635218..f31aecb673 100644 --- a/components/heap/test/test_diram.c +++ b/components/heap/test/test_diram.c @@ -10,6 +10,8 @@ #define ALLOC_SZ 1024 +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5167 static void *malloc_block_diram(uint32_t caps) { void *attempts[256] = { 0 }; // Allocate up to 256 ALLOC_SZ blocks to exhaust all non-D/IRAM memory temporarily @@ -72,3 +74,4 @@ TEST_CASE("Allocate D/IRAM as IRAM", "[heap]") free(iram); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/heap/test/test_malloc_caps.c b/components/heap/test/test_malloc_caps.c index cfd359c434..d4104fdf3a 100644 --- a/components/heap/test/test_malloc_caps.c +++ b/components/heap/test/test_malloc_caps.c @@ -12,6 +12,9 @@ #include #include + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5167 #ifndef CONFIG_ESP_SYSTEM_MEMPROT_FEATURE TEST_CASE("Capabilities allocator test", "[heap]") { @@ -103,6 +106,7 @@ TEST_CASE("Capabilities allocator test", "[heap]") printf("Done.\n"); } #endif +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY TEST_CASE("IRAM_8BIT capability test", "[heap]") @@ -165,6 +169,8 @@ TEST_CASE("heap_caps metadata test", "[heap]") TEST_ASSERT(after.minimum_free_bytes < original.total_free_bytes); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5167 /* Small function runs from IRAM to check that malloc/free/realloc all work OK when cache is disabled... */ @@ -189,6 +195,7 @@ TEST_CASE("heap_caps_xxx functions work with flash cache disabled", "[heap]") { TEST_ASSERT( iram_malloc_test() ); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #ifdef CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS TEST_CASE("When enabled, allocation operation failure generates an abort", "[heap][reset=abort,SW_CPU_RESET]") diff --git a/components/heap/test/test_realloc.c b/components/heap/test/test_realloc.c index 60a7749fb0..0701f6dabd 100644 --- a/components/heap/test/test_realloc.c +++ b/components/heap/test/test_realloc.c @@ -23,6 +23,8 @@ TEST_CASE("realloc shrink buffer in place", "[heap]") #endif +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5167 #ifndef CONFIG_ESP_SYSTEM_MEMPROT_FEATURE TEST_CASE("realloc shrink buffer with EXEC CAPS", "[heap]") { @@ -65,3 +67,4 @@ TEST_CASE("realloc move data to a new heap type", "[heap]") free(c); } #endif +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/lwip/test/test_lwip_apps.c b/components/lwip/test/test_lwip_apps.c index a1141ed07d..d9a9f9dacd 100644 --- a/components/lwip/test/test_lwip_apps.c +++ b/components/lwip/test/test_lwip_apps.c @@ -18,6 +18,8 @@ #define ETH_PING_END_TIMEOUT_MS (ETH_PING_DURATION_MS * 2) #define TEST_ICMP_DESTINATION_DOMAIN_NAME "127.0.0.1" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5047 static void test_on_ping_success(esp_ping_handle_t hdl, void *args) { uint8_t ttl; @@ -110,6 +112,7 @@ TEST_CASE("localhost ping test", "[lwip]") vEventGroupDelete(eth_event_group); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("dhcp server init/deinit", "[lwip][leaks=0]") { diff --git a/components/mbedtls/test/test_aes.c b/components/mbedtls/test/test_aes.c index 780ba84eea..2d987b0cfd 100644 --- a/components/mbedtls/test/test_aes.c +++ b/components/mbedtls/test/test_aes.c @@ -16,6 +16,9 @@ #include "freertos/task.h" #include "freertos/semphr.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 static const uint8_t key_256[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, @@ -298,6 +301,7 @@ TEST_CASE("mbedtls CFB-128 AES-256 test", "[aes]") free(chipertext); free(decryptedtext); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static void aes_ctr_stream_test(void) { @@ -399,6 +403,8 @@ static void aes_ctr_stream_test(void) free(decryptedtext); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls CTR stream test", "[aes]") { aes_ctr_stream_test(); @@ -778,6 +784,7 @@ TEST_CASE("mbedtls OFB, chained DMA descriptors", "[aes]") free(chipertext); free(decryptedtext); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) @@ -839,11 +846,14 @@ void aes_ctr_alignment_test(uint32_t input_buf_caps, uint32_t output_buf_caps) free(decryptedtext); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls AES internal mem alignment tests", "[aes]") { uint32_t internal_dma_caps = MALLOC_CAP_DMA | MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL; aes_ctr_alignment_test(internal_dma_caps, internal_dma_caps); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #ifdef CONFIG_SPIRAM_USE_MALLOC diff --git a/components/mbedtls/test/test_aes_perf.c b/components/mbedtls/test/test_aes_perf.c index 00a6247bf4..ea0635b974 100644 --- a/components/mbedtls/test/test_aes_perf.c +++ b/components/mbedtls/test/test_aes_perf.c @@ -12,6 +12,8 @@ #include "test_utils.h" #include "ccomp_timer.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls AES performance", "[aes][timeout=60]") { const unsigned CALLS = 256; @@ -68,3 +70,4 @@ TEST_CASE("mbedtls AES performance", "[aes][timeout=60]") TEST_PERFORMANCE_CCOMP_GREATER_THAN(AES_CBC_THROUGHPUT_MBSEC, "%.3fMB/sec", mb_sec); #endif } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/mbedtls/test/test_aes_sha_parallel.c b/components/mbedtls/test/test_aes_sha_parallel.c index 888935a773..a6ba18b687 100644 --- a/components/mbedtls/test/test_aes_sha_parallel.c +++ b/components/mbedtls/test/test_aes_sha_parallel.c @@ -16,6 +16,9 @@ #include "freertos/task.h" #include "freertos/semphr.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 static SemaphoreHandle_t done_sem; static const unsigned char *one_hundred_bs = (unsigned char *) @@ -130,3 +133,4 @@ TEST_CASE("mbedtls AES/SHA multithreading", "[mbedtls]") vSemaphoreDelete(done_sem); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/mbedtls/test/test_ecp.c b/components/mbedtls/test/test_ecp.c index 44a58e92cd..f89d8e7c9d 100644 --- a/components/mbedtls/test/test_ecp.c +++ b/components/mbedtls/test/test_ecp.c @@ -31,6 +31,8 @@ which are undefined if the following flag is not defined */ error hex value (mbedTLS uses -N for error codes) */ #define TEST_ASSERT_MBEDTLS_OK(X) TEST_ASSERT_EQUAL_HEX32(0, -(X)) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls ECDH Generate Key", "[mbedtls]") { mbedtls_ecdh_context ctx; @@ -84,6 +86,7 @@ TEST_CASE("mbedtls ECP mul w/ koblitz", "[mbedtls]") mbedtls_ctr_drbg_free(&ctxRandom); mbedtls_entropy_free(&ctxEntropy); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #if CONFIG_MBEDTLS_HARDWARE_ECC /* @@ -154,6 +157,8 @@ const uint8_t ecc_p256_mul_res_y[] = { 0xC7, 0xD4, 0x0C, 0x90, 0xA1, 0xC9, 0xD3, 0x3A }; +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 static int rng_wrapper(void *ctx, unsigned char *buf, size_t len) { esp_fill_random(buf, len); @@ -253,4 +258,5 @@ TEST_CASE("mbedtls ECP point verify with SECP256R1", "[mbedtls]") { test_ecp_verify(MBEDTLS_ECP_DP_SECP256R1, ecc_p256_mul_res_x, ecc_p256_mul_res_y); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif /* CONFIG_MBEDTLS_HARDWARE_ECC */ diff --git a/components/mbedtls/test/test_esp_crt_bundle.c b/components/mbedtls/test/test_esp_crt_bundle.c index b8ea822435..fa5d58fafe 100644 --- a/components/mbedtls/test/test_esp_crt_bundle.c +++ b/components/mbedtls/test/test_esp_crt_bundle.c @@ -210,6 +210,8 @@ esp_err_t endpoint_teardown(mbedtls_endpoint_t *endpoint) return ESP_OK; } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 esp_err_t client_setup(mbedtls_endpoint_t *client) { int ret; @@ -344,9 +346,12 @@ TEST_CASE("custom certificate bundle", "[mbedtls]") vSemaphoreDelete(signal_sem); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("custom certificate bundle - weak hash", "[mbedtls]") { /* A weak signature hash on the trusted certificate should not stop @@ -392,6 +397,7 @@ TEST_CASE("custom certificate bundle - wrong signature", "[mbedtls]") esp_crt_bundle_detach(NULL); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("custom certificate bundle init API - bound checking", "[mbedtls]") { diff --git a/components/mbedtls/test/test_mbedtls.c b/components/mbedtls/test/test_mbedtls.c index 62787355be..eca5b5d083 100644 --- a/components/mbedtls/test/test_mbedtls.c +++ b/components/mbedtls/test/test_mbedtls.c @@ -21,7 +21,10 @@ #include "unity.h" #include "sdkconfig.h" #include "test_apb_dport_access.h" +#include "test_utils.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls AES self-tests", "[aes]") { start_apb_access_loop(); @@ -42,3 +45,4 @@ TEST_CASE("mbedtls RSA self-tests", "[bignum]") TEST_ASSERT_FALSE_MESSAGE(mbedtls_rsa_self_test(1), "RSA self-tests should pass."); verify_apb_access_loop(); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/mbedtls/test/test_mbedtls_mpi.c b/components/mbedtls/test/test_mbedtls_mpi.c index 22bdac0f30..5d7d7866e7 100644 --- a/components/mbedtls/test/test_mbedtls_mpi.c +++ b/components/mbedtls/test/test_mbedtls_mpi.c @@ -15,9 +15,12 @@ #include "freertos/semphr.h" #include "unity.h" #include "sdkconfig.h" +#include "test_utils.h" #define MBEDTLS_OK 0 +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 /* Debugging function to print an MPI number to stdout. Happens to print output that can be copy-pasted directly into a Python shell. */ @@ -274,3 +277,4 @@ TEST_CASE("test MPI modexp", "[bignum]") TEST_ASSERT_FALSE_MESSAGE(test_error, "mbedtls_mpi_exp_mod incorrect for some tests\n"); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/mbedtls/test/test_mbedtls_sha.c b/components/mbedtls/test/test_mbedtls_sha.c index 87c644c0f6..a8081d39d1 100644 --- a/components/mbedtls/test/test_mbedtls_sha.c +++ b/components/mbedtls/test/test_mbedtls_sha.c @@ -21,6 +21,7 @@ #include "sdkconfig.h" #include "test_apb_dport_access.h" #include "soc/soc_caps.h" +#include "test_utils.h" TEST_CASE("mbedtls SHA self-tests", "[mbedtls]") { @@ -42,10 +43,15 @@ static const uint8_t sha256_thousand_as[32] = { 0x20, 0xcb, 0xc9, 0xf5, 0xa5, 0xd1, 0x34, 0x64, 0x5a, 0xdb, 0x5d, 0xb1, 0xb9, 0x73, 0x7e, 0xa3 }; + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 static const uint8_t sha256_thousand_bs[32] = { 0xf6, 0xf1, 0x18, 0xe1, 0x20, 0xe5, 0x2b, 0xe0, 0xbd, 0x0c, 0xfd, 0xf2, 0x79, 0x4c, 0xd1, 0x2c, 0x07, 0x68, 0x6c, 0xc8, 0x71, 0x23, 0x5a, 0xc2, 0xf1, 0x14, 0x59, 0x37, 0x8e, 0x6d, 0x23, 0x5b }; +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + static const uint8_t sha512_thousand_bs[64] = { 0xa6, 0x68, 0x68, 0xa3, 0x73, 0x53, 0x2a, 0x5c, 0xc3, 0x3f, 0xbf, 0x43, 0x4e, 0xba, 0x10, 0x86, 0xb3, 0x87, 0x09, 0xe9, 0x14, 0x3f, 0xbf, 0x37, 0x67, 0x8d, 0x43, 0xd9, 0x9b, 0x95, 0x08, 0xd5, 0x80, 0x2d, 0xbe, 0x9d, 0xe9, 0x1a, 0x54, 0xab, 0x9e, 0xbc, 0x8a, 0x08, 0xa0, 0x1a, 0x89, 0xd8, 0x72, 0x68, 0xdf, 0x52, 0x69, 0x7f, 0x1c, 0x70, 0xda, 0xe8, 0x3f, 0xe5, 0xae, 0x5a, 0xfc, 0x9d }; @@ -94,7 +100,11 @@ TEST_CASE("mbedtls SHA interleaving", "[mbedtls]") TEST_ASSERT_EQUAL_MEMORY_MESSAGE(sha1_thousand_as, sha1, 20, "SHA1 calculation"); } +#define SHA_TASK_STACK_SIZE (10*1024) static SemaphoreHandle_t done_sem; + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 static void tskRunSHA1Test(void *pvParameters) { mbedtls_sha1_context sha1_ctx; @@ -133,7 +143,6 @@ static void tskRunSHA256Test(void *pvParameters) vTaskDelete(NULL); } -#define SHA_TASK_STACK_SIZE (10*1024) TEST_CASE("mbedtls SHA multithreading", "[mbedtls]") { @@ -150,6 +159,7 @@ TEST_CASE("mbedtls SHA multithreading", "[mbedtls]") } vSemaphoreDelete(done_sem); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) void tskRunSHASelftests(void *param) { @@ -264,6 +274,8 @@ TEST_CASE("mbedtls SHA384 clone", "[mbedtls][") } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls SHA256 clone", "[mbedtls]") { mbedtls_sha256_context ctx; @@ -339,6 +351,7 @@ TEST_CASE("mbedtls SHA session passed between tasks", "[mbedtls]") TEST_ASSERT_EQUAL(0, param.ret); TEST_ASSERT_EQUAL_MEMORY_MESSAGE(sha256_thousand_as, param.result, 32, "SHA256 result from other task"); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) @@ -386,6 +399,8 @@ const uint8_t test_vector_digest[] = { 0x98, 0x5d, 0x36, 0xc0, 0xb7, 0xeb, 0x35, 0xe0, }; +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls SHA, input in flash", "[mbedtls]") { mbedtls_sha256_context sha256_ctx; @@ -400,6 +415,7 @@ TEST_CASE("mbedtls SHA, input in flash", "[mbedtls]") TEST_ASSERT_EQUAL_MEMORY_MESSAGE(test_vector_digest, sha256, 32, "SHA256 calculation"); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) /* Function are not implemented in SW */ #if CONFIG_MBEDTLS_HARDWARE_SHA && SOC_SHA_SUPPORT_SHA512_T diff --git a/components/mbedtls/test/test_rsa.c b/components/mbedtls/test/test_rsa.c index e795a6d2de..0d6292ac92 100644 --- a/components/mbedtls/test/test_rsa.c +++ b/components/mbedtls/test/test_rsa.c @@ -24,6 +24,8 @@ #define PRINT_DEBUG_INFO +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 /* Taken from openssl s_client -connect api.gigafive.com:443 -showcerts */ static const char *rsa4096_cert = "-----BEGIN CERTIFICATE-----\n"\ @@ -108,9 +110,11 @@ static const char *rsa2048_cert = "-----BEGIN CERTIFICATE-----\n"\ "b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S\n"\ "-----END CERTIFICATE-----\n"; + /* Some random input bytes to public key encrypt */ static const uint8_t pki_input[4096/8] = { 0, 1, 4, 6, 7, 9, 33, 103, 49, 11, 56, 211, 67, 92 }; +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) /* Result of an RSA4096 operation using cert's public key (raw PKI, no padding/etc) */ @@ -323,10 +327,13 @@ _Static_assert(sizeof(pki_rsa2048_output) == 2048/8, "rsa2048 output is wrong si _Static_assert(sizeof(pki_rsa3072_output) == 3072/8, "rsa3072 output is wrong size"); _Static_assert(sizeof(pki_rsa4096_output) == 4096/8, "rsa4096 output is wrong size"); -static void test_cert(const char *cert, const uint8_t *expected_output, size_t output_len); void mbedtls_mpi_printf(const char *name, const mbedtls_mpi *X); +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 +static void test_cert(const char *cert, const uint8_t *expected_output, size_t output_len); + TEST_CASE("mbedtls RSA4096 cert", "[mbedtls]") { @@ -394,6 +401,7 @@ static void test_cert(const char *cert, const uint8_t *expected_output, size_t o mbedtls_x509_crt_free(&crt); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #ifdef CONFIG_MBEDTLS_HARDWARE_MPI static void rsa_key_operations(int keysize, bool check_performance, bool generate_new_rsa); @@ -533,6 +541,8 @@ static void rsa_key_operations(int keysize, bool check_performance, bool generat #endif // CONFIG_MBEDTLS_HARDWARE_MPI +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls RSA Generate Key", "[mbedtls][timeout=60]") { @@ -570,3 +580,4 @@ TEST_CASE("mbedtls RSA Generate Key", "[mbedtls][timeout=60]") #endif //CONFIG_MBEDTLS_MPI_USE_INTERRUPT } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/mbedtls/test/test_sha.c b/components/mbedtls/test/test_sha.c index c6a771f67c..66ff02cfb9 100644 --- a/components/mbedtls/test/test_sha.c +++ b/components/mbedtls/test/test_sha.c @@ -89,6 +89,8 @@ TEST_CASE("Test esp_sha()", "[hw_crypto]") #endif } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("Test esp_sha() function with long input", "[hw_crypto]") { const void* ptr; @@ -135,3 +137,4 @@ TEST_CASE("Test esp_sha() function with long input", "[hw_crypto]") TEST_ASSERT_EQUAL_MEMORY_MESSAGE(sha512_espsha, sha512_mbedtls, sizeof(sha512_espsha), "SHA512 results should match"); #endif } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/mbedtls/test/test_sha_perf.c b/components/mbedtls/test/test_sha_perf.c index 41101e712f..3fe909b852 100644 --- a/components/mbedtls/test/test_sha_perf.c +++ b/components/mbedtls/test/test_sha_perf.c @@ -18,6 +18,8 @@ #include "ccomp_timer.h" #include "test_mbedtls_utils.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5141 TEST_CASE("mbedtls SHA performance", "[aes]") { const unsigned CALLS = 256; @@ -60,3 +62,4 @@ TEST_CASE("mbedtls SHA performance", "[aes]") TEST_PERFORMANCE_CCOMP_GREATER_THAN(SHA256_THROUGHPUT_MBSEC, "%.3fMB/sec", mb_sec); #endif } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/mdns/test/CMakeLists.txt b/components/mdns/test/CMakeLists.txt index 5994c440ca..d0a1135706 100644 --- a/components/mdns/test/CMakeLists.txt +++ b/components/mdns/test/CMakeLists.txt @@ -1,2 +1,8 @@ +idf_build_get_property(target IDF_TARGET) +if(${target} STREQUAL "esp32c2") + # IDF-5046 + return() +endif() + idf_component_register(SRC_DIRS "." PRIV_REQUIRES cmock test_utils mdns) diff --git a/components/newlib/test/test_newlib.c b/components/newlib/test/test_newlib.c index ec836ea122..03fc39a36c 100644 --- a/components/newlib/test/test_newlib.c +++ b/components/newlib/test/test_newlib.c @@ -126,17 +126,17 @@ static bool fn_in_rom(void *fn) TEST_CASE("check if ROM or Flash is used for functions", "[newlib]") { -#if defined(CONFIG_NEWLIB_NANO_FORMAT) +#if CONFIG_NEWLIB_NANO_FORMAT && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C2) TEST_ASSERT(fn_in_rom(vfprintf)); #else TEST_ASSERT_FALSE(fn_in_rom(vfprintf)); -#endif // CONFIG_NEWLIB_NANO_FORMAT +#endif // CONFIG_NEWLIB_NANO_FORMAT && CONFIG_IDF_TARGETx -#if defined(CONFIG_IDF_TARGET_ESP32) && defined(CONFIG_NEWLIB_NANO_FORMAT) +#if defined(CONFIG_NEWLIB_NANO_FORMAT) TEST_ASSERT(fn_in_rom(sscanf)); #else TEST_ASSERT_FALSE(fn_in_rom(sscanf)); -#endif // CONFIG_IDF_TARGET_ESP32 && CONFIG_NEWLIB_NANO_FORMAT +#endif // CONFIG_NEWLIB_NANO_FORMAT #if defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_SPIRAM) TEST_ASSERT(fn_in_rom(atoi)); diff --git a/components/newlib/test/test_time.c b/components/newlib/test/test_time.c index 4a2966d209..ff9618b49d 100644 --- a/components/newlib/test/test_time.c +++ b/components/newlib/test/test_time.c @@ -531,9 +531,13 @@ TEST_CASE("test time functions wide 64 bits", "[newlib]") #endif // !_USE_LONG_TIME_T #if defined( CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER ) && defined( CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER ) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5057 extern int64_t s_microseconds_offset; static const uint64_t s_start_timestamp = 1606838354; + + static RTC_NOINIT_ATTR uint64_t s_saved_time; static RTC_NOINIT_ATTR uint64_t s_time_in_reboot; @@ -623,7 +627,9 @@ static void check_time(void) TEST_ASSERT_LESS_OR_EQUAL(latency_before_run_ut, dt); } + TEST_CASE_MULTIPLE_STAGES("Timestamp after abort is correct in case RTC & High-res timer have + big error", "[newlib][reset=abort,SW_CPU_RESET]", set_timestamp1, check_time); TEST_CASE_MULTIPLE_STAGES("Timestamp after restart is correct in case RTC & High-res timer have + big error", "[newlib][reset=SW_CPU_RESET]", set_timestamp2, check_time); TEST_CASE_MULTIPLE_STAGES("Timestamp after restart is correct in case RTC & High-res timer have - big error", "[newlib][reset=SW_CPU_RESET]", set_timestamp3, check_time); +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif // CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER && CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER diff --git a/components/perfmon/test/CMakeLists.txt b/components/perfmon/test/CMakeLists.txt index 83721e048b..5a9c72e8a4 100644 --- a/components/perfmon/test/CMakeLists.txt +++ b/components/perfmon/test/CMakeLists.txt @@ -1,3 +1,7 @@ -idf_component_register(SRC_DIRS "." +if(CONFIG_IDF_TARGET_ARCH_XTENSA) + list(APPEND src_dirs .) +endif() + +idf_component_register(SRC_DIRS ${src_dirs} PRIV_INCLUDE_DIRS "." PRIV_REQUIRES cmock xtensa perfmon) diff --git a/components/protocomm/test/CMakeLists.txt b/components/protocomm/test/CMakeLists.txt index 56659e8270..1542683b45 100644 --- a/components/protocomm/test/CMakeLists.txt +++ b/components/protocomm/test/CMakeLists.txt @@ -1,4 +1,4 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." PRIV_INCLUDE_DIRS "../proto-c/" - PRIV_REQUIRES cmock mbedtls protocomm protobuf-c) + PRIV_REQUIRES cmock mbedtls protocomm protobuf-c test_utils) diff --git a/components/protocomm/test/test_protocomm.c b/components/protocomm/test/test_protocomm.c index b8323e3296..9d4453e104 100644 --- a/components/protocomm/test/test_protocomm.c +++ b/components/protocomm/test/test_protocomm.c @@ -32,6 +32,7 @@ which are undefined if the following flag is not defined */ #include #include #include +#include "test_utils.h" #include "session.pb-c.h" @@ -680,6 +681,8 @@ static void stop_test_service(void) test_pc = NULL; } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5143 static esp_err_t test_security1_no_encryption (void) { ESP_LOGI(TAG, "Starting Security 1 no encryption test"); @@ -887,7 +890,7 @@ static esp_err_t test_security1_wrong_pop (void) return ESP_OK; } -__attribute__((unused)) static esp_err_t test_security1_insecure_client (void) +static esp_err_t test_security1_insecure_client (void) { ESP_LOGI(TAG, "Starting Security 1 insecure client test"); @@ -939,7 +942,7 @@ __attribute__((unused)) static esp_err_t test_security1_insecure_client (void) return ESP_OK; } -__attribute__((unused)) static esp_err_t test_security1_weak_session (void) +static esp_err_t test_security1_weak_session (void) { ESP_LOGI(TAG, "Starting Security 1 weak session test"); @@ -1002,6 +1005,7 @@ __attribute__((unused)) static esp_err_t test_security1_weak_session (void) ESP_LOGI(TAG, "Protocomm test successful"); return ESP_OK; } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static esp_err_t test_protocomm (session_t *session) { @@ -1051,6 +1055,8 @@ static esp_err_t test_protocomm (session_t *session) return ESP_OK; } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5143 static esp_err_t test_security1 (void) { ESP_LOGI(TAG, "Starting Sec1 test"); @@ -1081,6 +1087,7 @@ static esp_err_t test_security1 (void) free(session); return ESP_OK; } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static esp_err_t test_security0 (void) { @@ -1107,6 +1114,8 @@ static esp_err_t test_security0 (void) return ESP_OK; } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5143 TEST_CASE("leak test", "[PROTOCOMM]") { #ifdef CONFIG_HEAP_TRACING @@ -1147,12 +1156,15 @@ TEST_CASE("leak test", "[PROTOCOMM]") TEST_ASSERT(pre_start_mem == post_stop_mem); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("security 0 basic test", "[PROTOCOMM]") { TEST_ASSERT(test_security0() == ESP_OK); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5143 TEST_CASE("security 1 basic test", "[PROTOCOMM]") { TEST_ASSERT(test_security1() == ESP_OK); @@ -1182,3 +1194,4 @@ TEST_CASE("security 1 weak session test", "[PROTOCOMM]") { TEST_ASSERT(test_security1_weak_session() == ESP_OK); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/pthread/test/test_pthread_cxx.cpp b/components/pthread/test/test_pthread_cxx.cpp index b7cfbb275c..6be75f1101 100644 --- a/components/pthread/test/test_pthread_cxx.cpp +++ b/components/pthread/test/test_pthread_cxx.cpp @@ -6,11 +6,12 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "unity.h" +#include "test_utils.h" #if __GTHREADS && __GTHREADS_CXX0X #include "esp_log.h" -const static char *TAG = "pthread_test"; +const static __attribute__((unused)) char *TAG = "pthread_test"; static std::mutex mtx; static std::shared_ptr global_sp_mtx; // protected by mux @@ -96,6 +97,8 @@ TEST_CASE("pthread C++", "[pthread]") global_sp_recur_mtx.reset(); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5142 static void task_test_sandbox() { std::stringstream ss; @@ -135,5 +138,6 @@ TEST_CASE("pthread mix C/C++", "[pthread]") t1.join(); } } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif diff --git a/components/pthread/test/test_pthread_local_storage.c b/components/pthread/test/test_pthread_local_storage.c index d6d7678dad..e74f5734a2 100644 --- a/components/pthread/test/test_pthread_local_storage.c +++ b/components/pthread/test/test_pthread_local_storage.c @@ -173,6 +173,10 @@ typedef struct { int last_idx; // index of last key where destructor was called } destr_test_state_t; + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5142 + static void s_test_repeat_destructor(void *vp_state); static void *s_test_repeat_destructor_thread(void *vp_state); @@ -249,3 +253,4 @@ static void *s_test_repeat_destructor_thread(void *vp_state) } pthread_exit(NULL); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/sdmmc/test/test_sd.c b/components/sdmmc/test/test_sd.c index 0feaf0f231..5fcfc7fe11 100644 --- a/components/sdmmc/test/test_sd.c +++ b/components/sdmmc/test/test_sd.c @@ -31,8 +31,8 @@ // Currently no runners for S3 #define WITH_SD_TEST (SOC_SDMMC_HOST_SUPPORTED && !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)) -// Currently, no runners for S3 -#define WITH_SDSPI_TEST (!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)) +// Currently, no runners for S3 and C2 +#define WITH_SDSPI_TEST (!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3, ESP32C2)) // Can't test eMMC (slot 0) and PSRAM together #define WITH_EMMC_TEST (SOC_SDMMC_HOST_SUPPORTED && !CONFIG_SPIRAM && !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)) diff --git a/components/spi_flash/test/test_esp_flash.c b/components/spi_flash/test/test_esp_flash.c index e37364ae33..e8d77daf76 100644 --- a/components/spi_flash/test/test_esp_flash.c +++ b/components/spi_flash/test/test_esp_flash.c @@ -128,37 +128,49 @@ static uint8_t sector_buf[4096]; typedef void (*flash_test_func_t)(const esp_partition_t *part); -/* Use FLASH_TEST_CASE for SPI flash tests that only use the main SPI flash chip +/* Use TEST_CASE_FLASH for SPI flash tests that only use the main SPI flash chip */ -#define FLASH_TEST_CASE(STR, FUNC_TO_RUN) \ +#define TEST_CASE_FLASH(STR, FUNC_TO_RUN) \ TEST_CASE(STR, "[esp_flash]") {flash_test_func(FUNC_TO_RUN, 1 /* first index reserved for main flash */ );} -#define FLASH_TEST_CASE_IGNORE(STR, FUNC_TO_RUN) \ +#define TEST_CASE_FLASH_IGNORE(STR, FUNC_TO_RUN) \ TEST_CASE(STR, "[esp_flash][ignore]") {flash_test_func(FUNC_TO_RUN, 1 /* first index reserved for main flash */ );} -/* Use FLASH_TEST_CASE_3 for tests which also run on external flash, which sits in the place of PSRAM +/* Use TEST_CASE_MULTI_FLASH for tests which also run on external flash, which sits in the place of PSRAM (these tests are incompatible with PSRAM) These tests run for all the flash chip configs shown in config_list, below (internal and external). */ + + #if defined(CONFIG_SPIRAM) -#define FLASH_TEST_CASE_3(STR, FUNCT_TO_RUN) -#define FLASH_TEST_CASE_3_IGNORE(STR, FUNCT_TO_RUN) -#else //CONFIG_SPIRAM -#if !CONFIG_IDF_TARGET_ESP32C3 -#define FLASH_TEST_CASE_3(STR, FUNC_TO_RUN) \ - TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][timeout=35]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} +//SPI1 CS1 occupied by PSRAM +#define BYPASS_MULTIPLE_CHIP 1 +#elif TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5049 +#define BYPASS_MULTIPLE_CHIP 1 +#endif -#define FLASH_TEST_CASE_3_IGNORE(STR, FUNC_TO_RUN) \ - TEST_CASE(STR", 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} -#else //CONFIG_IDF_TARGET_ESP32C3 -#define FLASH_TEST_CASE_3(STR, FUNC_TO_RUN) \ - TEST_CASE(STR", 2 chips", "[esp_flash_2][test_env=UT_T1_ESP_FLASH]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} +#if CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 +//chips without PSRAM +#define TEST_CHIP_NUM 2 +#elif CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 +#define TEST_CHIP_NUM 3 +#endif -#define FLASH_TEST_CASE_3_IGNORE(STR, FUNC_TO_RUN) \ - TEST_CASE(STR", 2 chips", "[esp_flash_2][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} -#endif // !CONFIG_IDF_TARGET_ESP32C3 -#endif //CONFIG_SPIRAM +#define _STRINGIFY(s) #s +#define STRINGIFY(s) _STRINGIFY(s) +#define TEST_CHIP_NUM_STR STRINGIFY(TEST_CHIP_NUM) + +#if BYPASS_MULTIPLE_CHIP +#define TEST_CASE_MULTI_FLASH TEST_CASE_MULTI_FLASH_IGNORE +#else +#define TEST_CASE_MULTI_FLASH(STR, FUNC_TO_RUN) \ + TEST_CASE(STR", "TEST_CHIP_NUM_STR" chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][timeout=35]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} +#endif + +#define TEST_CASE_MULTI_FLASH_IGNORE(STR, FUNC_TO_RUN) \ + TEST_CASE(STR", "TEST_CHIP_NUM_STR" chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);} //currently all the configs are the same with esp_flash_spi_device_config_t, no more information required @@ -461,8 +473,8 @@ static void test_metadata(const esp_partition_t* part) printf("Flash ID %08x detected size %d bytes\n", id, size); } -FLASH_TEST_CASE("SPI flash metadata functions", test_metadata); -FLASH_TEST_CASE_3("SPI flash metadata functions", test_metadata); +TEST_CASE_FLASH("SPI flash metadata functions", test_metadata); +TEST_CASE_MULTI_FLASH("SPI flash metadata functions", test_metadata); static uint32_t erase_test_region(const esp_partition_t *part, int num_sectors) { @@ -521,8 +533,8 @@ void test_simple_read_write(const esp_partition_t* part) } } -FLASH_TEST_CASE("SPI flash simple read/write", test_simple_read_write); -FLASH_TEST_CASE_3("SPI flash simple read/write", test_simple_read_write); +TEST_CASE_FLASH("SPI flash simple read/write", test_simple_read_write); +TEST_CASE_MULTI_FLASH("SPI flash simple read/write", test_simple_read_write); void test_unaligned_read_write(const esp_partition_t* part) { @@ -542,8 +554,8 @@ void test_unaligned_read_write(const esp_partition_t* part) TEST_ASSERT(memcmp(buf, msg, strlen(msg) + 1) == 0); } -FLASH_TEST_CASE("SPI flash unaligned read/write", test_unaligned_read_write); -FLASH_TEST_CASE_3("SPI flash unaligned read/write", test_unaligned_read_write); +TEST_CASE_FLASH("SPI flash unaligned read/write", test_unaligned_read_write); +TEST_CASE_MULTI_FLASH("SPI flash unaligned read/write", test_unaligned_read_write); void test_single_read_write(const esp_partition_t* part) { @@ -566,8 +578,8 @@ void test_single_read_write(const esp_partition_t* part) } } -FLASH_TEST_CASE("SPI flash single byte reads/writes", test_single_read_write); -FLASH_TEST_CASE_3("SPI flash single byte reads/writes", test_single_read_write); +TEST_CASE_FLASH("SPI flash single byte reads/writes", test_single_read_write); +TEST_CASE_MULTI_FLASH("SPI flash single byte reads/writes", test_single_read_write); /* this test is notable because it generates a lot of unaligned reads/writes, @@ -596,8 +608,8 @@ void test_three_byte_read_write(const esp_partition_t* part) } } -FLASH_TEST_CASE("SPI flash three byte reads/writes", test_three_byte_read_write); -FLASH_TEST_CASE_3("SPI flash three byte reads/writes", test_three_byte_read_write); +TEST_CASE_FLASH("SPI flash three byte reads/writes", test_three_byte_read_write); +TEST_CASE_MULTI_FLASH("SPI flash three byte reads/writes", test_three_byte_read_write); void test_erase_large_region(const esp_partition_t *part) { @@ -634,8 +646,8 @@ void test_erase_large_region(const esp_partition_t *part) TEST_ASSERT_EQUAL_HEX32(0xFFFFFFFF, readback); } -FLASH_TEST_CASE("SPI flash erase large region", test_erase_large_region); -FLASH_TEST_CASE_3("SPI flash erase large region", test_erase_large_region); +TEST_CASE_FLASH("SPI flash erase large region", test_erase_large_region); +TEST_CASE_MULTI_FLASH("SPI flash erase large region", test_erase_large_region); #if CONFIG_SPI_FLASH_AUTO_SUSPEND void esp_test_for_suspend(void) @@ -707,8 +719,8 @@ static void test_write_protection(const esp_partition_t* part) } } -FLASH_TEST_CASE("Test esp_flash can enable/disable write protetion", test_write_protection); -FLASH_TEST_CASE_3("Test esp_flash can enable/disable write protetion", test_write_protection); +TEST_CASE_FLASH("Test esp_flash can enable/disable write protetion", test_write_protection); +TEST_CASE_MULTI_FLASH("Test esp_flash can enable/disable write protetion", test_write_protection); static const uint8_t large_const_buffer[16400] = { 203, // first byte @@ -799,8 +811,8 @@ IRAM_ATTR NOINLINE_ATTR static void test_toggle_qe(const esp_partition_t* part) // These tests show whether the QE is permanent or not for the chip tested. // To test the behaviour of a new SPI flash chip, enable force_check flag in generic driver // `spi_flash_common_set_io_mode` and then run this test. -FLASH_TEST_CASE_IGNORE("Test esp_flash_write can toggle QE bit", test_toggle_qe); -FLASH_TEST_CASE_3_IGNORE("Test esp_flash_write can toggle QE bit", test_toggle_qe); +TEST_CASE_FLASH_IGNORE("Test esp_flash_write can toggle QE bit", test_toggle_qe); +TEST_CASE_MULTI_FLASH_IGNORE("Test esp_flash_write can toggle QE bit", test_toggle_qe); #endif //CONFIG_ESPTOOLPY_OCT_FLASH // This table could be chip specific in the future. @@ -911,6 +923,8 @@ TEST_CASE("SPI flash test reading with all speed/mode permutations", "[esp_flash } #ifndef CONFIG_SPIRAM +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5049 TEST_CASE("SPI flash test reading with all speed/mode permutations, 3 chips", "[esp_flash_3][test_env=UT_T1_ESP_FLASH]") { for (int i = 0; i < TEST_CONFIG_NUM; i++) { @@ -918,6 +932,7 @@ TEST_CASE("SPI flash test reading with all speed/mode permutations, 3 chips", "[ } } #endif +#endif static void test_write_large_const_buffer(const esp_partition_t* part) @@ -925,8 +940,8 @@ static void test_write_large_const_buffer(const esp_partition_t* part) test_write_large_buffer(part, large_const_buffer, sizeof(large_const_buffer)); } -FLASH_TEST_CASE("Test esp_flash_write large const buffer", test_write_large_const_buffer); -FLASH_TEST_CASE_3("Test esp_flash_write large const buffer", test_write_large_const_buffer); +TEST_CASE_FLASH("Test esp_flash_write large const buffer", test_write_large_const_buffer); +TEST_CASE_MULTI_FLASH("Test esp_flash_write large const buffer", test_write_large_const_buffer); static void test_write_large_ram_buffer(const esp_partition_t* part) { @@ -938,8 +953,8 @@ static void test_write_large_ram_buffer(const esp_partition_t* part) free(source_buf); } -FLASH_TEST_CASE("Test esp_flash_write large RAM buffer", test_write_large_ram_buffer); -FLASH_TEST_CASE_3("Test esp_flash_write large RAM buffer", test_write_large_ram_buffer); +TEST_CASE_FLASH("Test esp_flash_write large RAM buffer", test_write_large_ram_buffer); +TEST_CASE_MULTI_FLASH("Test esp_flash_write large RAM buffer", test_write_large_ram_buffer); static void write_large_buffer(const esp_partition_t *part, const uint8_t *source, size_t length) { @@ -985,8 +1000,6 @@ static void test_write_large_buffer(const esp_partition_t* part, const uint8_t * read_and_check(part, source, length); } -#if !CONFIG_SPIRAM - typedef struct { uint32_t us_start; size_t len; @@ -1157,12 +1170,12 @@ static void test_flash_read_write_performance(const esp_partition_t *part) free(data_read); } - - +#if !BYPASS_MULTIPLE_CHIP +//To make performance data stable, needs to run on special runner TEST_CASE("Test esp_flash read/write performance", "[esp_flash][test_env=UT_T1_ESP_FLASH]") {flash_test_func(test_flash_read_write_performance, 1);} +#endif -#endif // !CONFIG_SPIRAM -FLASH_TEST_CASE_3("Test esp_flash read/write performance"", 3 chips", test_flash_read_write_performance); +TEST_CASE_MULTI_FLASH("Test esp_flash read/write performance", test_flash_read_write_performance); #ifdef CONFIG_SPIRAM_USE_MALLOC @@ -1200,7 +1213,7 @@ static void test_flash_read_large_psram_buffer(const esp_partition_t *part) free(buf); } -FLASH_TEST_CASE("esp_flash_read large PSRAM buffer", test_flash_read_large_psram_buffer); +TEST_CASE_FLASH("esp_flash_read large PSRAM buffer", test_flash_read_large_psram_buffer); /* similar to above test, but perform it under memory pressure */ @@ -1229,7 +1242,7 @@ static void test_flash_read_large_psram_buffer_low_internal_mem(const esp_partit free(buf); } -FLASH_TEST_CASE("esp_flash_read large PSRAM buffer low memory", test_flash_read_large_psram_buffer_low_internal_mem); +TEST_CASE_FLASH("esp_flash_read large PSRAM buffer low memory", test_flash_read_large_psram_buffer_low_internal_mem); #endif diff --git a/components/spi_flash/test/test_mmap.c b/components/spi_flash/test/test_mmap.c index 489fc4e3c2..80f496b573 100644 --- a/components/spi_flash/test/test_mmap.c +++ b/components/spi_flash/test/test_mmap.c @@ -13,6 +13,9 @@ #include "test_utils.h" + +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5138 static uint32_t buffer[1024]; /* read-only region used for mmap tests, intialised in setup_mmap_tests() */ @@ -20,6 +23,7 @@ static uint32_t start; static uint32_t end; static spi_flash_mmap_handle_t handle1, handle2, handle3; +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static esp_err_t spi_flash_read_maybe_encrypted(size_t src_addr, void *des_addr, size_t size) { @@ -30,6 +34,8 @@ static esp_err_t spi_flash_read_maybe_encrypted(size_t src_addr, void *des_addr, } } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5138 static esp_err_t spi_flash_write_maybe_encrypted(size_t des_addr, const void *src_addr, size_t size) { if (!esp_flash_encryption_enabled()) { @@ -356,6 +362,7 @@ TEST_CASE("flash_mmap can mmap after get enough free MMU pages", "[spi_flash][mm TEST_ASSERT_EQUAL_PTR(NULL, spi_flash_phys2cache(start, SPI_FLASH_MMAP_DATA)); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("phys2cache/cache2phys basic checks", "[spi_flash][mmap]") { @@ -391,6 +398,8 @@ TEST_CASE("phys2cache/cache2phys basic checks", "[spi_flash][mmap]") TEST_ASSERT_EQUAL_HEX8_ARRAY(constant_data, buf, sizeof(constant_data)); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5138 TEST_CASE("mmap consistent with phys2cache/cache2phys", "[spi_flash][mmap]") { const void *ptr = NULL; @@ -459,3 +468,4 @@ TEST_CASE("no stale data read post mmap and write partition", "[spi_flash][mmap] spi_flash_munmap(handle); TEST_ASSERT_EQUAL(0, memcmp(buf, read_data, sizeof(buf))); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/spi_flash/test/test_partitions.c b/components/spi_flash/test/test_partitions.c index a01aa399f1..c766a29a1c 100644 --- a/components/spi_flash/test/test_partitions.c +++ b/components/spi_flash/test/test_partitions.c @@ -1,16 +1,8 @@ -// Copyright 2010-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ // Test for spi_flash_{read,write}. @@ -69,6 +61,8 @@ TEST_CASE("Test erase partition", "[spi_flash][esp_flash]") } } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5137 static bool s_test_nonzero_sha_of_partition(const esp_partition_t *part, bool allow_invalid_image) { uint8_t sha256[32] = { 0 }; @@ -145,3 +139,4 @@ TEST_CASE("Test esp_partition_get_sha256() that it can handle a big partition", spi_flash_munmap(handle); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/tcp_transport/test/test_transport_connect.c b/components/tcp_transport/test/test_transport_connect.c index 2160d47e9b..8a4bbdb827 100644 --- a/components/tcp_transport/test/test_transport_connect.c +++ b/components/tcp_transport/test/test_transport_connect.c @@ -6,6 +6,7 @@ #include "esp_log.h" #include "lwip/sockets.h" #include "tcp_transport_fixtures.h" +#include "test_utils.h" #define TEST_TRANSPORT_BIND_IFNAME() \ @@ -48,6 +49,8 @@ TEST_CASE("tcp_transport: connect timeout", "[tcp_transport]") esp_transport_list_destroy(transport_list); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5144 TEST_CASE("ssl_transport: connect timeout", "[tcp_transport]") { // Init the transport under test @@ -120,6 +123,7 @@ TEST_CASE("ssl_transport: Keep alive test", "[tcp_transport]") esp_transport_close(ssl); esp_transport_list_destroy(transport_list); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("ws_transport: Keep alive test", "[tcp_transport]") { @@ -150,6 +154,8 @@ TEST_CASE("ws_transport: Keep alive test", "[tcp_transport]") esp_transport_list_destroy(transport_list); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5144 // Note: This functionality is tested and kept only for compatibility reasons with IDF <= 4.x // It is strongly encouraged to use transport within lists only TEST_CASE("ssl_transport: Check that parameters (keepalive) are set independently on the list", "[tcp_transport]") @@ -177,3 +183,4 @@ TEST_CASE("ssl_transport: Check that parameters (keepalive) are set independentl esp_transport_close(ssl); esp_transport_destroy(ssl); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/ulp/test/CMakeLists.txt b/components/ulp/test/CMakeLists.txt index 7626bc5073..5123ea2190 100644 --- a/components/ulp/test/CMakeLists.txt +++ b/components/ulp/test/CMakeLists.txt @@ -3,6 +3,11 @@ if(IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3") return() endif() +if(IDF_TARGET STREQUAL "esp32c2") + # IDF-5048 + return() +endif() + if(CONFIG_ULP_COPROC_TYPE_FSM) set(src_dirs "ulp_fsm") diff --git a/components/ulp/test/ulp_fsm/test_ulp.c b/components/ulp/test/ulp_fsm/test_ulp.c index 42d325fe41..31d01032b0 100644 --- a/components/ulp/test/ulp_fsm/test_ulp.c +++ b/components/ulp/test/ulp_fsm/test_ulp.c @@ -205,6 +205,8 @@ TEST_CASE("ULP FSM light-sleep wakeup test", "[ulp]") TEST_ASSERT(esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_ULP); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 TEST_CASE("ULP FSM deep-sleep wakeup test", "[ulp][reset=SW_CPU_RESET][ignore]") { assert(CONFIG_ULP_COPROC_RESERVE_MEM >= 260 && "this test needs ULP_COPROC_RESERVE_MEM option set in menuconfig"); @@ -248,6 +250,8 @@ TEST_CASE("ULP FSM deep-sleep wakeup test", "[ulp][reset=SW_CPU_RESET][ignore]") UNITY_TEST_FAIL(__LINE__, "Should not get here!"); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + TEST_CASE("ULP FSM can write and read peripheral registers", "[ulp]") { assert(CONFIG_ULP_COPROC_RESERVE_MEM >= 260 && "this test needs ULP_COPROC_RESERVE_MEM option set in menuconfig"); @@ -374,6 +378,8 @@ TEST_CASE("ULP FSM I_WR_REG instruction test", "[ulp]") } } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 TEST_CASE("ULP FSM controls RTC_IO", "[ulp][ignore]") { assert(CONFIG_ULP_COPROC_RESERVE_MEM >= 260 && "this test needs ULP_COPROC_RESERVE_MEM option set in menuconfig"); @@ -474,6 +480,8 @@ TEST_CASE("ULP FSM power consumption in deep sleep", "[ulp][ignore]") UNITY_TEST_FAIL(__LINE__, "Should not get here!"); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) + TEST_CASE("ULP FSM timer setting", "[ulp]") { assert(CONFIG_ULP_COPROC_RESERVE_MEM >= 32 && "this test needs ULP_COPROC_RESERVE_MEM option set in menuconfig"); @@ -539,6 +547,8 @@ TEST_CASE("ULP FSM timer setting", "[ulp]") } } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 TEST_CASE("ULP FSM can use temperature sensor (TSENS) in deep sleep", "[ulp][ignore]") { assert(CONFIG_ULP_COPROC_RESERVE_MEM >= 260 && "this test needs ULP_COPROC_RESERVE_MEM option set in menuconfig"); @@ -709,3 +719,5 @@ TEST_CASE("ULP FSM can use ADC in deep sleep", "[ulp][ignore]") esp_deep_sleep_start(); UNITY_TEST_FAIL(__LINE__, "Should not get here!"); } + +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/ulp/test/ulp_riscv/test_ulp_riscv_main.c b/components/ulp/test/ulp_riscv/test_ulp_riscv_main.c index b4d1963d6e..392abb1548 100644 --- a/components/ulp/test/ulp_riscv/test_ulp_riscv_main.c +++ b/components/ulp/test/ulp_riscv/test_ulp_riscv_main.c @@ -201,6 +201,8 @@ TEST_CASE("ULP-RISC-V can stop itself and be resumed from the main CPU", "[ulp]" TEST_ASSERT(ulp_riscv_is_running()); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5131 /* * Keep this test case as the last test case in this suite as a CPU reset occurs. * Add new test cases above in order to ensure they run when all test cases are run together. @@ -220,3 +222,5 @@ TEST_CASE("ULP-RISC-V is able to wakeup main CPU from deep sleep", "[ulp][reset= esp_deep_sleep_start(); UNITY_TEST_FAIL(__LINE__, "Should not get here!"); } + +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/vfs/test/test_vfs_access.c b/components/vfs/test/test_vfs_access.c index b8e30efabf..2fe9fb1fb0 100644 --- a/components/vfs/test/test_vfs_access.c +++ b/components/vfs/test/test_vfs_access.c @@ -14,6 +14,7 @@ #include "esp_vfs_dev.h" #include "esp_vfs_fat.h" #include "wear_levelling.h" +#include "test_utils.h" static wl_handle_t test_wl_handle; @@ -88,6 +89,8 @@ static inline void test_fatfs_delete_file(const char *name) TEST_ASSERT_EQUAL(ret, 0); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5139 TEST_CASE("Can use access() for FATFS", "[vfs][fatfs][wear_levelling]") { const char *path = "/spiflash/access.txt"; @@ -127,3 +130,4 @@ TEST_CASE("Can use access() for FATFS", "[vfs][fatfs][wear_levelling]") test_spi_flash_teardown(); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/vfs/test/test_vfs_append.c b/components/vfs/test/test_vfs_append.c index 80aa8e5f95..6efa8a725a 100644 --- a/components/vfs/test/test_vfs_append.c +++ b/components/vfs/test/test_vfs_append.c @@ -13,6 +13,7 @@ #include "esp_vfs_fat.h" #include "esp_spiffs.h" #include "wear_levelling.h" +#include "test_utils.h" #define TEST_PARTITION_LABEL "flash_test" @@ -77,6 +78,8 @@ static void test_append(const char *path) TEST_ASSERT_NOT_EQUAL(-1, unlink(path)); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5139 TEST_CASE("open() with O_APPEND on FATFS works well", "[vfs][FATFS]") { wl_handle_t test_wl_handle; @@ -91,6 +94,7 @@ TEST_CASE("open() with O_APPEND on FATFS works well", "[vfs][FATFS]") TEST_ESP_OK(esp_vfs_fat_spiflash_unmount_rw_wl("/spiflash", test_wl_handle)); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) TEST_CASE("open() with O_APPEND on SPIFFS works well", "[vfs][spiffs]") { diff --git a/components/vfs/test/test_vfs_select.c b/components/vfs/test/test_vfs_select.c index 8568f2c284..badb69e0b5 100644 --- a/components/vfs/test/test_vfs_select.c +++ b/components/vfs/test/test_vfs_select.c @@ -544,6 +544,8 @@ TEST_CASE("concurrent selects work", "[vfs]") close(dummy_socket_fd); } +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5139 TEST_CASE("select() works with concurrent mount", "[vfs][fatfs]") { wl_handle_t test_wl_handle; @@ -605,3 +607,4 @@ TEST_CASE("select() works with concurrent mount", "[vfs][fatfs]") deinit(uart_fd, socket_fd); close(dummy_socket_fd); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/vfs/test/test_vfs_uart.c b/components/vfs/test/test_vfs_uart.c index a7229e8f6a..6ffd7cd4b5 100644 --- a/components/vfs/test/test_vfs_uart.c +++ b/components/vfs/test/test_vfs_uart.c @@ -19,6 +19,7 @@ #include "soc/uart_struct.h" #include "esp_vfs_dev.h" #include "esp_vfs.h" +#include "test_utils.h" #include "sdkconfig.h" static void fwrite_str_loopback(const char* str, size_t size) @@ -207,6 +208,8 @@ TEST_CASE("fcntl supported in UART VFS", "[vfs]") } #ifdef CONFIG_VFS_SUPPORT_TERMIOS +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5139 TEST_CASE("Can use termios for UART", "[vfs]") { uart_config_t uart_config = { @@ -333,4 +336,5 @@ TEST_CASE("Can use termios for UART", "[vfs]") close(uart_fd); uart_driver_delete(UART_NUM_1); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif // CONFIG_VFS_SUPPORT_TERMIOS diff --git a/components/wpa_supplicant/test/test_crypto.c b/components/wpa_supplicant/test/test_crypto.c index 7a7fed85c5..f67224871a 100644 --- a/components/wpa_supplicant/test/test_crypto.c +++ b/components/wpa_supplicant/test/test_crypto.c @@ -15,8 +15,12 @@ #include "crypto/crypto.h" #include "mbedtls/ecp.h" +#include "test_utils.h" + typedef struct crypto_bignum crypto_bignum; +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5046 TEST_CASE("Test crypto lib bignum apis", "[wpa_crypto]") { { @@ -536,3 +540,4 @@ TEST_CASE("Test crypto lib ECC apis", "[wpa_crypto]") } } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) diff --git a/components/wpa_supplicant/test/test_offchannel.c b/components/wpa_supplicant/test/test_offchannel.c index 8b078ce437..a492cb3ce4 100644 --- a/components/wpa_supplicant/test/test_offchannel.c +++ b/components/wpa_supplicant/test/test_offchannel.c @@ -32,8 +32,8 @@ #define TEST_LISTEN_CHANNEL 6 /* No runners */ -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3) - +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3, ESP32C3, ESP32C2) +//IDF-5046 static const char *TAG = "test_offchan"; esp_netif_t *wifi_netif; static EventGroupHandle_t wifi_event; diff --git a/components/wpa_supplicant/test/test_sae.c b/components/wpa_supplicant/test/test_sae.c index 5cd56ad257..a9616e34c9 100644 --- a/components/wpa_supplicant/test/test_sae.c +++ b/components/wpa_supplicant/test/test_sae.c @@ -18,7 +18,10 @@ #include "crypto/crypto.h" #include "../src/common/sae.h" #include "utils/wpabuf.h" +#include "test_utils.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5046 typedef struct crypto_bignum crypto_bignum; @@ -43,9 +46,6 @@ void wpabuf_free2(struct wpabuf *buf) os_free(buf); } - - - TEST_CASE("Test SAE functionality with ECC group", "[wpa3_sae]") { ESP_LOGI("SAE Test", "### Beginning SAE init and deinit ###"); @@ -261,5 +261,6 @@ TEST_CASE("Test SAE functionality with ECC group", "[wpa3_sae]") ESP_LOGI("SAE Test", "=========== Complete ============"); } +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif /* CONFIG_WPA3_SAE */ diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index 20b1b1036a..e9ec4d7c5d 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -928,7 +928,9 @@ Custom sdkconfig defaults For example projects or other projects where you don't want to specify a full sdkconfig configuration, but you do want to override some key values from the ESP-IDF defaults, it is possible to create a file ``sdkconfig.defaults`` in the project directory. This file will be used when creating a new config from scratch, or when any new config value hasn't yet been set in the ``sdkconfig`` file. -To override the name of this file or to specify multiple files, set the ``SDKCONFIG_DEFAULTS`` environment variable or set ``SDKCONFIG_DEFAULTS`` in top-level CMakeLists.txt. If specifying multiple files, use semicolon as the list separator. File names not specified as full paths are resolved relative to current project. +To override the name of this file or to specify multiple files, set the ``SDKCONFIG_DEFAULTS`` environment variable or set ``SDKCONFIG_DEFAULTS`` in top-level CMakeLists.txt. File names not specified as full paths are resolved relative to current project. + +If specifying multiple files, use semicolon as the list separator. Files listed first will be applied first. If there is a key with different values existing in different default files, the value in latter file of the list will override the value in the former file. Some of the IDF examples include a ``sdkconfig.ci`` file. This is part of the continuous integration (CI) test framework and is ignored by the normal build process. @@ -937,7 +939,9 @@ Target-dependent sdkconfig defaults In addition to ``sdkconfig.defaults`` file, build system will also load defaults from ``sdkconfig.defaults.TARGET_NAME`` file, where ``TARGET_NAME`` is the value of ``IDF_TARGET``. For example, for ``esp32`` target, default settings will be taken from ``sdkconfig.defaults`` first, and then from ``sdkconfig.defaults.esp32``. -If ``SDKCONFIG_DEFAULTS`` is used to override the name of defaults file/files, the name of target-specific defaults file will be derived from ``SDKCONFIG_DEFAULTS`` value/values using the rule above. +If ``SDKCONFIG_DEFAULTS`` is used to override the name of defaults file/files, the name of target-specific defaults file will be derived from ``SDKCONFIG_DEFAULTS`` value/values using the rule above. When there are multiple files in ``SDKCONFIG_DEFAULTS``, target-specific file will be applied right after the file bringing it in, before all latter files in ``SDKCONFIG_DEFAULTS`` + +For example, if ``SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig_devkit1"``, and there is a file ``sdkconfig.defaults.esp32`` in the same folder, then the files will be applied in the following order: (1) sdkconfig.defaults (2) sdkconfig.defaults.esp32 (3) sdkconfig_devkit1. .. _flash_parameters: diff --git a/docs/en/migration-guides/build-system.rst b/docs/en/migration-guides/build-system.rst index 737834c674..933d1fd4fd 100644 --- a/docs/en/migration-guides/build-system.rst +++ b/docs/en/migration-guides/build-system.rst @@ -77,3 +77,18 @@ Update CMake version In ESP-IDF v5.0 minimal cmake version was increased to 3.16 and versions lower than 3.16 are not supported anymore. Run "tools/idf_tools.py install cmake" to install a suitable version if your OS versions doesn't have one. This affects ESP-IDF users who use system-provided CMake and custom CMake project users. + +Target-specific sdkconfig files no longer always override all other files in SDKCONFIG_DEFAULTS +----------------------------------------------------------------------------------------------- + +.. highlight:: none + +ESP-IDF v5.0 reorders the applying order of target-specific config files and other files listed in SDKCONFIG_DEFAULTS. Now, target-specific file will be applied right after the file bringing it in, before all latter files in ``SDKCONFIG_DEFAULTS``. + +For example:: + + If ``SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig_devkit1"``, and there is a file ``sdkconfig.defaults.esp32`` in the same folder, then the files will be applied in the following order: (1) sdkconfig.defaults (2) sdkconfig.defaults.esp32 (3) sdkconfig_devkit1. + +If you have a key with different values in the target-specific file of former item (e.g. ``sdkconfig.defaults.esp32`` above) and the latter item (e.g. ``sdkconfig_devket1`` above), please note the latter one will override the target-specific file of the former one. + +If you do want to have some target-specific config values, please put it into the target-specific file of the latter item (e.g. ``sdkconfig_devkit1.esp32``). diff --git a/examples/cxx/exceptions/README.md b/examples/cxx/exceptions/README.md index 7b49194131..64adddf49f 100644 --- a/examples/cxx/exceptions/README.md +++ b/examples/cxx/exceptions/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Example: C++ exception handling (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/cxx/experimental/esp_event_async_cxx/README.md b/examples/cxx/experimental/esp_event_async_cxx/README.md index bc52645dda..4cec9fd297 100644 --- a/examples/cxx/experimental/esp_event_async_cxx/README.md +++ b/examples/cxx/experimental/esp_event_async_cxx/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # ESP-Event asynchronous example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/cxx/experimental/esp_event_cxx/README.md b/examples/cxx/experimental/esp_event_cxx/README.md index 6ad7a221dc..dac6cd17aa 100644 --- a/examples/cxx/experimental/esp_event_cxx/README.md +++ b/examples/cxx/experimental/esp_event_cxx/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # ESP Event synchronous example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/cxx/experimental/esp_mqtt_cxx/ssl/README.md b/examples/cxx/experimental/esp_mqtt_cxx/ssl/README.md new file mode 100644 index 0000000000..57433de18a --- /dev/null +++ b/examples/cxx/experimental/esp_mqtt_cxx/ssl/README.md @@ -0,0 +1,2 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/examples/cxx/experimental/esp_mqtt_cxx/tcp/README.md b/examples/cxx/experimental/esp_mqtt_cxx/tcp/README.md new file mode 100644 index 0000000000..57433de18a --- /dev/null +++ b/examples/cxx/experimental/esp_mqtt_cxx/tcp/README.md @@ -0,0 +1,2 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/examples/cxx/experimental/esp_timer_cxx/README.md b/examples/cxx/experimental/esp_timer_cxx/README.md index e041b2a394..a2748dde9c 100644 --- a/examples/cxx/experimental/esp_timer_cxx/README.md +++ b/examples/cxx/experimental/esp_timer_cxx/README.md @@ -1,10 +1,13 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Example: ESPTimer C++ class (See the README.md file in the upper level 'examples' directory for more information about examples.) This example demonstrates usage of the ESPTimer c++ class in ESP-IDF. -In this example, the `sdkconfig.defaults` file sets the `CONFIG_COMPILER_CXX_EXCEPTIONS` option. +In this example, the `sdkconfig.defaults` file sets the `CONFIG_COMPILER_CXX_EXCEPTIONS` option. This enables both compile time support (`-fexceptions` compiler flag) and run-time support for C++ exception handling. This is necessary for the C++ APIs. diff --git a/examples/cxx/experimental/simple_i2c_rw_example/README.md b/examples/cxx/experimental/simple_i2c_rw_example/README.md index 9e715c7071..f034c07427 100644 --- a/examples/cxx/experimental/simple_i2c_rw_example/README.md +++ b/examples/cxx/experimental/simple_i2c_rw_example/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Example: C++ I2C sensor read for MPU9250 (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/cxx/experimental/simple_spi_rw_example/README.md b/examples/cxx/experimental/simple_spi_rw_example/README.md index 4dbc2bdc47..68a3677087 100644 --- a/examples/cxx/experimental/simple_spi_rw_example/README.md +++ b/examples/cxx/experimental/simple_spi_rw_example/README.md @@ -1,10 +1,13 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Example: C++ SPI sensor read for MCU9250 inertial/giroscope sensor (See the README.md file in the upper level 'examples' directory for more information about examples.) This example demonstrates usage of C++ SPI classes in ESP-IDF to read the `WHO_AM_I` register of the sensor. -In this example, the `sdkconfig.defaults` file sets the `CONFIG_COMPILER_CXX_EXCEPTIONS` option. +In this example, the `sdkconfig.defaults` file sets the `CONFIG_COMPILER_CXX_EXCEPTIONS` option. This enables both compile time support (`-fexceptions` compiler flag) and run-time support for C++ exception handling. This is necessary for the C++ SPI API. diff --git a/examples/cxx/pthread/README.md b/examples/cxx/pthread/README.md index 244036adb2..2a07891a85 100644 --- a/examples/cxx/pthread/README.md +++ b/examples/cxx/pthread/README.md @@ -1,8 +1,11 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # C++ pthread Example (See the README.md file in the upper level 'examples' directory for more information about examples.) -Support for the [C++ threads](http://www.cplusplus.com/reference/thread/thread/) in ESP-IDF is implemented on top of the [ESP-pthread](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/system/esp_pthread.html#overview) component. Thus, C++ threads created using the standard thread class constructor will automatically inherit the current ESP-pthread configuration. This example demonstrates how to leverage the thread configuration functions provided by ESP-pthread (e.g., `esp_pthread_get_default_config()` and `esp_pthread_set_cfg()`) to modify the stack sizes, priorities, names, and core affinities of the C++ threads. +Support for the [C++ threads](http://www.cplusplus.com/reference/thread/thread/) in ESP-IDF is implemented on top of the [ESP-pthread](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/system/esp_pthread.html#overview) component. Thus, C++ threads created using the standard thread class constructor will automatically inherit the current ESP-pthread configuration. This example demonstrates how to leverage the thread configuration functions provided by ESP-pthread (e.g., `esp_pthread_get_default_config()` and `esp_pthread_set_cfg()`) to modify the stack sizes, priorities, names, and core affinities of the C++ threads. **Note: Due to the use of the C++ threads, this example is written in C++ instead of C.** diff --git a/examples/cxx/rtti/README.md b/examples/cxx/rtti/README.md index 8ab0c985aa..f2bcd6d05d 100644 --- a/examples/cxx/rtti/README.md +++ b/examples/cxx/rtti/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Example: C++ run-time type info (RTTI) (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/ethernet/basic/README.md b/examples/ethernet/basic/README.md index e37d696b63..d5d2b6e8f7 100644 --- a/examples/ethernet/basic/README.md +++ b/examples/ethernet/basic/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Ethernet Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -22,7 +25,7 @@ Besides that, `esp_eth` component can drive third-party Ethernet module which in The ESP-IDF supports the usage of multiple Ethernet interfaces at a time when external modules are utilized which is also demonstrated by this example. There are several options you can combine: * Internal EMAC and one SPI Ethernet module. * Two SPI Ethernet modules of the same type connected to single SPI interface and accessed by switching appropriate CS. - * Internal EMAC and two SPI Ethernet modules of the same type. + * Internal EMAC and two SPI Ethernet modules of the same type. #### Pin Assignment diff --git a/examples/ethernet/enc28j60/README.md b/examples/ethernet/enc28j60/README.md index 414662cac4..e71e7fe577 100644 --- a/examples/ethernet/enc28j60/README.md +++ b/examples/ethernet/enc28j60/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ENC28J60 Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/ethernet/eth2ap/README.md b/examples/ethernet/eth2ap/README.md index 13bd9aa0b9..7f24d71def 100644 --- a/examples/ethernet/eth2ap/README.md +++ b/examples/ethernet/eth2ap/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # eth2ap Example (See the README.md file in the upper level 'examples' directory for more information about examples. To try a more complex application about Ethernet to WiFi data forwarding, please go to [iot-solution](https://github.com/espressif/esp-iot-solution/tree/release/v1.0/examples/eth2wifi).) diff --git a/examples/ethernet/iperf/README.md b/examples/ethernet/iperf/README.md index af90abfe4b..4b8f5bf1d8 100644 --- a/examples/ethernet/iperf/README.md +++ b/examples/ethernet/iperf/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Ethernet iperf Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/mesh/internal_communication/README.md b/examples/mesh/internal_communication/README.md index 3c97dc427c..8ff57f8d3b 100644 --- a/examples/mesh/internal_communication/README.md +++ b/examples/mesh/internal_communication/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Mesh Internal Communication Example This example demonstrates how to use the mesh APIs to set up a mesh network, send and receive messages over the mesh network and etc. diff --git a/examples/mesh/ip_internal_network/README.md b/examples/mesh/ip_internal_network/README.md index 0040840535..7da93620d9 100644 --- a/examples/mesh/ip_internal_network/README.md +++ b/examples/mesh/ip_internal_network/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Mesh IP Internal Networking example This example demonstrates how to use mesh to create a IP capable sub-network. @@ -6,11 +9,11 @@ and uses internal communication at the same time ## Functionality -This example uses experimental NAT feature to translate addresses/ports from an internal subnet, that is created +This example uses experimental NAT feature to translate addresses/ports from an internal subnet, that is created by the root node running a DHCP server. At the same time, the nodes communicate using low level mesh send/receive API to exchange data, such as routing table from root to all nodes and an event notification from one node to all other nodes in the mesh. As a demonstration, the same event is also published at the mqtt broker -on a subscribed topic, so both internal mesh_recv() notification as well as mqtt data event are to be received. +on a subscribed topic, so both internal mesh_recv() notification as well as mqtt data event are to be received. ### Hardware Required diff --git a/examples/mesh/manual_networking/README.md b/examples/mesh/manual_networking/README.md index 1e5c094d06..714954db01 100644 --- a/examples/mesh/manual_networking/README.md +++ b/examples/mesh/manual_networking/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Mesh Manual Networking Example ESP-MESH provides the function of self-organized networking, but if users disable this function on one node, users must designate a parent for this node. diff --git a/examples/network/network_tests/README.md b/examples/network/network_tests/README.md index 9dd2c6caa9..8894885601 100644 --- a/examples/network/network_tests/README.md +++ b/examples/network/network_tests/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Intel net test suite for LwIP network stack This project provides a test interface to esp32 network stack in order to execute standard set of @@ -46,7 +49,7 @@ Purpose of this test is to execute standard network suite on a ESP32 network sta DUT, Device (Network stack in this case) under test, runs normally on target, but a specific interface with configured esp-netif for passing arbitrary data to and from the network stack. Embedded code `net_suite.c` implements an application which serves stdin/stdout and propagates the data to/from this test interface. -Standard Intel net suite executed by TTCN3 engine uses udp ports for input/ouput of network packets. Python script `net_suite.py` translates this communication +Standard Intel net suite executed by TTCN3 engine uses udp ports for input/ouput of network packets. Python script `net_suite.py` translates this communication from/to those udp ports to stdin/stdout, where after propagating over USB/UART to the ESP32 board are processed in the network stack (on the target). Actual test execution, progress, evaluation and test reporting is done using standard net-test-suite scripts running on PC. diff --git a/examples/network/simple_sniffer/README.md b/examples/network/simple_sniffer/README.md index 72c3b1fd19..6496a8f423 100644 --- a/examples/network/simple_sniffer/README.md +++ b/examples/network/simple_sniffer/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Simple Sniffer Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/openthread/ot_br/README.md b/examples/openthread/ot_br/README.md index e59d9485dc..83d24ee7eb 100644 --- a/examples/openthread/ot_br/README.md +++ b/examples/openthread/ot_br/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # OpenThread Border Router Example ## Overview @@ -18,8 +21,8 @@ Connect the two SoCs via UART, below is an example setup with ESP32 DevKitC and ESP32 pin | ESP32-H2 pin ----------|------------- - GND | G - GPIO4 | TX + GND | G + GPIO4 | TX GPIO5 | RX ### Configure the project @@ -231,16 +234,16 @@ sudo sysctl -w net/ipv6/conf/wlan0/accept_ra_rt_info_max_plen=128 For mobile devices, the route table rules will be automatically configured after iOS 14 and Android 8.1. -### Testing IPv6 connectivity +### Testing IPv6 connectivity Now in the joining device, check the IP addresses: ``` -> ipaddr +> ipaddr fde6:75ff:def4:3bc3:9e9e:3ef:4245:28b5 -fdde:ad00:beef:0:0:ff:fe00:c402 +fdde:ad00:beef:0:0:ff:fe00:c402 fdde:ad00:beef:0:ad4a:9a9a:3cd6:e423 -fe80:0:0:0:f011:2951:569e:9c4a +fe80:0:0:0:f011:2951:569e:9c4a ``` You'll notice an IPv6 global prefix with only on address assigned under it. This is the routable address of this Thread node. @@ -275,7 +278,7 @@ Done This service will also become visible on the Wi-Fi network: ```bash -$ avahi-browse -r _test._udp -t +$ avahi-browse -r _test._udp -t + enp1s0 IPv6 my-service _test._udp local = enp1s0 IPv6 my-service _test._udp local diff --git a/examples/peripherals/adc/dma_read/README.md b/examples/peripherals/adc/dma_read/README.md index ab56e690f1..f446b23223 100644 --- a/examples/peripherals/adc/dma_read/README.md +++ b/examples/peripherals/adc/dma_read/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ADC DMA Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/adc/single_read/single_read/README.md b/examples/peripherals/adc/single_read/single_read/README.md index ba9650c15d..015aecbfe3 100644 --- a/examples/peripherals/adc/single_read/single_read/README.md +++ b/examples/peripherals/adc/single_read/single_read/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ADC Single Read Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/i2c/i2c_self_test/README.md b/examples/peripherals/i2c/i2c_self_test/README.md index 7734c34b9f..4be69fb566 100644 --- a/examples/peripherals/i2c/i2c_self_test/README.md +++ b/examples/peripherals/i2c/i2c_self_test/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # I2C Self-Test Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/i2c/i2c_simple/README.md b/examples/peripherals/i2c/i2c_simple/README.md index 9309a8356b..5dca645efb 100644 --- a/examples/peripherals/i2c/i2c_simple/README.md +++ b/examples/peripherals/i2c/i2c_simple/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # I2C Simple Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/i2c/i2c_tools/README.md b/examples/peripherals/i2c/i2c_tools/README.md index 9d70bb20bf..945edf700c 100644 --- a/examples/peripherals/i2c/i2c_tools/README.md +++ b/examples/peripherals/i2c/i2c_tools/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # I2C Tools Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/i2s/i2s_es8311/README.md b/examples/peripherals/i2s/i2s_es8311/README.md index 550d07e204..ba85c38279 100644 --- a/examples/peripherals/i2s/i2s_es8311/README.md +++ b/examples/peripherals/i2s/i2s_es8311/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # I2S ES8311 Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/lcd/gc9a01/README.md b/examples/peripherals/lcd/gc9a01/README.md index c785062c59..2dc48c3931 100644 --- a/examples/peripherals/lcd/gc9a01/README.md +++ b/examples/peripherals/lcd/gc9a01/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # GC9A01 porting example [esp_lcd](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/lcd.html) provides several panel drivers out-of box, e.g. ST7789, SSD1306, NT35510. However, there're a lot of other panels on the market, it's beyond `esp_lcd` component's responsibility to include them all. diff --git a/examples/peripherals/lcd/i2c_oled/README.md b/examples/peripherals/lcd/i2c_oled/README.md index 04f08fcb8e..ac62ac6fb0 100644 --- a/examples/peripherals/lcd/i2c_oled/README.md +++ b/examples/peripherals/lcd/i2c_oled/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # I2C OLED example [esp_lcd](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/lcd.html) supports I2C interfaced OLED LCD, whose color depth is usually 1bpp. diff --git a/examples/peripherals/lcd/tjpgd/README.md b/examples/peripherals/lcd/tjpgd/README.md index 3d9f80f67a..16345eff07 100644 --- a/examples/peripherals/lcd/tjpgd/README.md +++ b/examples/peripherals/lcd/tjpgd/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + ## LCD tjpgd example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/sigmadelta/README.md b/examples/peripherals/sigmadelta/README.md index 1a542fd55e..9734b3960b 100644 --- a/examples/peripherals/sigmadelta/README.md +++ b/examples/peripherals/sigmadelta/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Sigma Delta Modulation Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -12,7 +15,7 @@ This example uses the sigma-delta driver to generate modulated output on a GPIO. Besides the [ESP32 development board](https://www.espressif.com/en/products/hardware/development-boards) you need a LED and a resistor to limit the LED current. Connect them as below: ``` - 330R LED + 330R LED GPIO4 +----/\/\/\----+------|>|-----+ GND ``` diff --git a/examples/peripherals/spi_master/hd_eeprom/README.md b/examples/peripherals/spi_master/hd_eeprom/README.md index 870f58dc89..8b5bbd367a 100644 --- a/examples/peripherals/spi_master/hd_eeprom/README.md +++ b/examples/peripherals/spi_master/hd_eeprom/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + ## SPI master half duplex EEPROM example This code demonstrates how to use the SPI master half duplex mode to read/write a AT93C46D diff --git a/examples/peripherals/spi_slave/README.md b/examples/peripherals/spi_slave/README.md index c7e60ca686..d7547fe84f 100644 --- a/examples/peripherals/spi_slave/README.md +++ b/examples/peripherals/spi_slave/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + ## SPI slave example These two projects illustrate the SPI Slave driver. They're supposed to be flashed into two separate Espressif chips connected to eachother using the SPI pins defined in app_main.c. Once connected and flashed, they will use the spi master and spi slave driver to communicate with eachother. The example also includes a handshaking line to allow the master to only poll the slave when it is actually ready to parse a transaction. diff --git a/examples/peripherals/spi_slave_hd/append_mode/master/README.md b/examples/peripherals/spi_slave_hd/append_mode/master/README.md index 93ba4c8220..95779d8ed8 100644 --- a/examples/peripherals/spi_slave_hd/append_mode/master/README.md +++ b/examples/peripherals/spi_slave_hd/append_mode/master/README.md @@ -1 +1,4 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + See README.md in the parent directory diff --git a/examples/peripherals/spi_slave_hd/segment_mode/seg_master/README.md b/examples/peripherals/spi_slave_hd/segment_mode/seg_master/README.md index 93ba4c8220..95779d8ed8 100644 --- a/examples/peripherals/spi_slave_hd/segment_mode/seg_master/README.md +++ b/examples/peripherals/spi_slave_hd/segment_mode/seg_master/README.md @@ -1 +1,4 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + See README.md in the parent directory diff --git a/examples/peripherals/timer_group/gptimer/README.md b/examples/peripherals/timer_group/gptimer/README.md index 96d071fe58..2b79522473 100644 --- a/examples/peripherals/timer_group/gptimer/README.md +++ b/examples/peripherals/timer_group/gptimer/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Example: General Purpose Timer This example illustrates how to use gptimer APIs to generate periodic alarm events and how different alarm actions behave on events. diff --git a/examples/peripherals/timer_group/gptimer/sdkconfig.defaults b/examples/peripherals/timer_group/gptimer/sdkconfig.defaults new file mode 100644 index 0000000000..82d4960857 --- /dev/null +++ b/examples/peripherals/timer_group/gptimer/sdkconfig.defaults @@ -0,0 +1,6 @@ +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# + +# Disable nano printf, because we need to print the timer count in %llu format +CONFIG_NEWLIB_NANO_FORMAT=n diff --git a/examples/peripherals/timer_group/legacy_driver/README.md b/examples/peripherals/timer_group/legacy_driver/README.md index 1da4ef74d3..5cd057725a 100644 --- a/examples/peripherals/timer_group/legacy_driver/README.md +++ b/examples/peripherals/timer_group/legacy_driver/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Example: General Purpose Timer This example uses the timer group driver to generate timer interrupts at two specified alarm intervals. diff --git a/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults b/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults index 57b9e914f0..03820fcd3c 100644 --- a/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults +++ b/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults @@ -2,3 +2,6 @@ # Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y + +# Disable nano printf, because we need to print the timer count in %llu format +CONFIG_NEWLIB_NANO_FORMAT=n diff --git a/examples/peripherals/twai/twai_alert_and_recovery/README.md b/examples/peripherals/twai/twai_alert_and_recovery/README.md index d76bb0900e..a5d7bc673d 100644 --- a/examples/peripherals/twai/twai_alert_and_recovery/README.md +++ b/examples/peripherals/twai/twai_alert_and_recovery/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # TWAI Alert and Recovery Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/twai/twai_network/README.md b/examples/peripherals/twai/twai_network/README.md index 0136b016f2..17698069d4 100644 --- a/examples/peripherals/twai/twai_network/README.md +++ b/examples/peripherals/twai/twai_network/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # TWAI Network Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/peripherals/twai/twai_self_test/README.md b/examples/peripherals/twai/twai_self_test/README.md index a46e34b049..44caff52ca 100644 --- a/examples/peripherals/twai/twai_self_test/README.md +++ b/examples/peripherals/twai/twai_self_test/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # TWAI Self Test Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/asio/asio_chat/README.md b/examples/protocols/asio/asio_chat/README.md index 4848b457b8..2896e9ab75 100644 --- a/examples/protocols/asio/asio_chat/README.md +++ b/examples/protocols/asio/asio_chat/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Asio chat client and server examples @@ -48,7 +51,7 @@ Set following parameters under Example Configuration Options: - Connect to the server using multiple clients, for example using any option below. - build and run asio chat client on your host machine - run chat_client asio example on ESP platform - - since chat messages consists of ASCII size and message, it is possible to + - since chat messages consists of ASCII size and message, it is possible to netcat `nc IP PORT` and type for example ` 4ABC` to transmit 'ABC\n' ## Running the example in client mode diff --git a/examples/protocols/asio/ssl_client_server/README.md b/examples/protocols/asio/ssl_client_server/README.md index e99ccfe11d..fbf2cc15eb 100644 --- a/examples/protocols/asio/ssl_client_server/README.md +++ b/examples/protocols/asio/ssl_client_server/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Asio SSL client/server example Simple Asio client and server with SSL/TLS transport @@ -13,8 +16,8 @@ to connect to internet or a local network via WiFi or Ethernet to easily exercis * Open the project configuration menu (`idf.py menuconfig`) * Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../../README.md) for more details. -* Enable the ASIO client and set server's host name to examine client's functionality. -The ASIO client connects to the configured server and sends default payload string "GET / HTTP/1.1" +* Enable the ASIO client and set server's host name to examine client's functionality. +The ASIO client connects to the configured server and sends default payload string "GET / HTTP/1.1" * Enable the ASIO server to examine server's functionality. The ASIO server listens to connection and echos back what was received. ### Build and Flash @@ -58,7 +61,7 @@ D ### Both server and client enabled The below output demonstrates the client connecting to the ASIO server via loopback interface, so no WiFi, nor Ethernet connection -was established. +was established. ``` I (0) cpu_start: App cpu up. I (495) heap_init: Initializing. RAM available for dynamic allocation: diff --git a/examples/protocols/asio/tcp_echo_server/README.md b/examples/protocols/asio/tcp_echo_server/README.md index b2443a245e..2c3893550b 100644 --- a/examples/protocols/asio/tcp_echo_server/README.md +++ b/examples/protocols/asio/tcp_echo_server/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Asio TCP echo server example Simple Asio TCP echo server using WiFi STA or Ethernet. diff --git a/examples/protocols/asio/udp_echo_server/README.md b/examples/protocols/asio/udp_echo_server/README.md index cc8a67e66c..cd384fc397 100644 --- a/examples/protocols/asio/udp_echo_server/README.md +++ b/examples/protocols/asio/udp_echo_server/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Asio UDP echo server example Simple Asio UDP echo server using WiFi STA or Ethernet. diff --git a/examples/protocols/coap_client/README.md b/examples/protocols/coap_client/README.md index 1db75c611f..6df0f788d8 100644 --- a/examples/protocols/coap_client/README.md +++ b/examples/protocols/coap_client/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # CoAP client example @@ -18,7 +21,7 @@ If the URI is prefixed with coap+tcp://, then the CoAP will try to use TCP for t NOTE: coaps+tcp:// is not currently supported, even though both libcoap and MbedTLS support it. The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with -constrained nodes and constrained networks in the Internet of Things. +constrained nodes and constrained networks in the Internet of Things. The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation. @@ -61,9 +64,9 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output Prerequisite: we startup a CoAP server on coap server example, -or use the default of coap://californium.eclipseprojects.io. +or use the default of coap://californium.eclipseprojects.io. -and you could receive data from CoAP server if succeed, +and you could receive data from CoAP server if succeed, such as the following log: ``` diff --git a/examples/protocols/coap_server/README.md b/examples/protocols/coap_server/README.md index bb37783ff4..d12ef08e91 100644 --- a/examples/protocols/coap_server/README.md +++ b/examples/protocols/coap_server/README.md @@ -1,7 +1,10 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # CoAP server example -(See the README.md file in the upper level 'examples' directory for more information about examples.) +(See the README.md file in the upper level 'examples' directory for more information about examples.) This CoAP server example is very simplified adaptation of one of the [libcoap](https://github.com/obgm/libcoap) examples. @@ -17,7 +20,7 @@ NOTE: Client sessions trying to use coaps+tcp:// are not currently supported, ev libcoap and MbedTLS support it. The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with -constrained nodes and constrained networks in the Internet of Things. +constrained nodes and constrained networks in the Internet of Things. The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation. @@ -58,8 +61,8 @@ idf.py -p PORT flash monitor See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. ## Example Output -current CoAP server would startup a daemon task, -and the log is such as the following: +current CoAP server would startup a daemon task, +and the log is such as the following: ``` ... @@ -76,7 +79,7 @@ I (2622) CoAP_server: Connected to AP ... ``` -If a CoAP client queries the `/Espressif` resource, CoAP server will return `"Hello World!"` +If a CoAP client queries the `/Espressif` resource, CoAP server will return `"Hello World!"` until a CoAP client does a PUT with different data. ## libcoap Documentation diff --git a/examples/protocols/esp_http_client/README.md b/examples/protocols/esp_http_client/README.md index c4225fde25..90584a16f2 100644 --- a/examples/protocols/esp_http_client/README.md +++ b/examples/protocols/esp_http_client/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESP HTTP Client Example See the README.md file in the upper level 'examples' directory for more information about examples. diff --git a/examples/protocols/esp_local_ctrl/README.md b/examples/protocols/esp_local_ctrl/README.md index 3bd2203255..309c6da72e 100644 --- a/examples/protocols/esp_local_ctrl/README.md +++ b/examples/protocols/esp_local_ctrl/README.md @@ -1,5 +1,6 @@ | Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | | ----------------- | ----- | -------- | -------- | -------- | + # ESP Local Control using HTTPS server This example creates a `esp_local_ctrl` service over HTTPS transport, for securely controlling the device over local network. In this case the device name is resolved through `mDNS`, which in this example is `my_esp_ctrl_device.local`. diff --git a/examples/protocols/http2_request/README.md b/examples/protocols/http2_request/README.md index e7be3a83ef..bc0f7b11aa 100644 --- a/examples/protocols/http2_request/README.md +++ b/examples/protocols/http2_request/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # HTTP/2 Request Example Establish an HTTP/2 connection with https://http2.github.io diff --git a/examples/protocols/http_request/README.md b/examples/protocols/http_request/README.md index a81b5c874e..7448e2521d 100644 --- a/examples/protocols/http_request/README.md +++ b/examples/protocols/http_request/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # HTTP Request Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -72,7 +75,7 @@ Connection: close margin: 0; padding: 0; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; - + } div { width: 600px; @@ -92,7 +95,7 @@ Connection: close width: auto; } } - + @@ -105,7 +108,7 @@ Connection: close I (11467) example: ... done reading from socket. Last read return=0 errno=128. -I (11477) example: 10... -I (12477) example: 9... -I (13477) example: 8... +I (11477) example: 10... +I (12477) example: 9... +I (13477) example: 8... ``` diff --git a/examples/protocols/http_server/advanced_tests/README.md b/examples/protocols/http_server/advanced_tests/README.md index c320b2a00a..ec555d5d1b 100644 --- a/examples/protocols/http_server/advanced_tests/README.md +++ b/examples/protocols/http_server/advanced_tests/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # HTTP server advanced tests (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/http_server/captive_portal/README.md b/examples/protocols/http_server/captive_portal/README.md index 992ba257d2..a7a1536f4a 100644 --- a/examples/protocols/http_server/captive_portal/README.md +++ b/examples/protocols/http_server/captive_portal/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Captive Portal Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/http_server/file_serving/README.md b/examples/protocols/http_server/file_serving/README.md index ce5fb4cd23..d38fdea1cc 100644 --- a/examples/protocols/http_server/file_serving/README.md +++ b/examples/protocols/http_server/file_serving/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Simple HTTP File Server Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -70,7 +73,7 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui The following steps assume that IP address 192.168.1.100 was assigned. -2. Test the example interactively in a web browser. The default port is 80. +2. Test the example interactively in a web browser. The default port is 80. 1. Open path http://192.168.1.100/ or http://192.168.1.100/index.html to see an HTML page with list of files on the server. The page will initially be empty. 2. Use the file upload form on the webpage to select and upload a file to the server. diff --git a/examples/protocols/http_server/persistent_sockets/README.md b/examples/protocols/http_server/persistent_sockets/README.md index 2ce2a3022b..c4b0853b30 100644 --- a/examples/protocols/http_server/persistent_sockets/README.md +++ b/examples/protocols/http_server/persistent_sockets/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # HTTPD Server Persistent Sockets Example The Example consists of HTTPD server persistent sockets demo. diff --git a/examples/protocols/http_server/restful_server/README.md b/examples/protocols/http_server/restful_server/README.md index a50bb6f744..95d852adcf 100644 --- a/examples/protocols/http_server/restful_server/README.md +++ b/examples/protocols/http_server/restful_server/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # HTTP Restful API Server Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -57,7 +60,7 @@ Only if you deploy the website to SD card, then the following pin connection is ### Configure the project -Open the project configuration menu (`idf.py menuconfig`). +Open the project configuration menu (`idf.py menuconfig`). In the `Example Connection Configuration` menu: diff --git a/examples/protocols/http_server/simple/README.md b/examples/protocols/http_server/simple/README.md index 38e6b52f8c..c64d0336be 100644 --- a/examples/protocols/http_server/simple/README.md +++ b/examples/protocols/http_server/simple/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Simple HTTPD Server Example The Example consists of HTTPD server demo with demostration of URI handling : diff --git a/examples/protocols/http_server/ws_echo_server/README.md b/examples/protocols/http_server/ws_echo_server/README.md index e8f4d24818..1efd44cf2a 100644 --- a/examples/protocols/http_server/ws_echo_server/README.md +++ b/examples/protocols/http_server/ws_echo_server/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Websocket echo server (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -24,7 +27,7 @@ We register the URI handler with the standard API `httpd_register_uri_handler()` ```c static const httpd_uri_t ws_uri_handler_options = { ... // httpd options - + .is_websocket = true, // Mandatory: set to `true` to handler websocket protocol .handle_ws_control_frames = false, // Optional: set to `true` for the handler to receive control packets, too .supported_subprotocol = "chat", // Optional: set supported subprotocol for this handler diff --git a/examples/protocols/icmp_echo/README.md b/examples/protocols/icmp_echo/README.md index efcac6791e..1469bbf72b 100644 --- a/examples/protocols/icmp_echo/README.md +++ b/examples/protocols/icmp_echo/README.md @@ -1,12 +1,15 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # ICMP Echo-Reply (Ping) example (See the README.md file in the upper level 'examples' directory for more information about examples.) -Ping is a useful network utility used to test if a remote host is reachable on the IP network. It measures the round-trip time for messages sent from the source host to a destination target that are echoed back to the source. +Ping is a useful network utility used to test if a remote host is reachable on the IP network. It measures the round-trip time for messages sent from the source host to a destination target that are echoed back to the source. Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP echo reply. -This example implements a simple ping command line util based on the [console component](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/console.html). +This example implements a simple ping command line util based on the [console component](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/console.html). **Notes:** Currently this example only supports IPv4. diff --git a/examples/protocols/l2tap/README.md b/examples/protocols/l2tap/README.md index a166601b2b..7c2ada42a1 100644 --- a/examples/protocols/l2tap/README.md +++ b/examples/protocols/l2tap/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESP-NETIF L2 TAP Interface Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/mdns/README.md b/examples/protocols/mdns/README.md index b66cebc57a..4d575e2a9a 100644 --- a/examples/protocols/mdns/README.md +++ b/examples/protocols/mdns/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # mDNS example Shows how to use mDNS to advertise lookup services and hosts diff --git a/examples/protocols/mqtt/ssl/README.md b/examples/protocols/mqtt/ssl/README.md index 754c693be6..a87f2084c9 100644 --- a/examples/protocols/mqtt/ssl/README.md +++ b/examples/protocols/mqtt/ssl/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESP-MQTT SSL Sample application (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/mqtt/ssl_mutual_auth/README.md b/examples/protocols/mqtt/ssl_mutual_auth/README.md index 74beb8996e..be0c9b6d1b 100644 --- a/examples/protocols/mqtt/ssl_mutual_auth/README.md +++ b/examples/protocols/mqtt/ssl_mutual_auth/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESP-MQTT SSL Sample application (mutual authentication) (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/mqtt/ssl_psk/README.md b/examples/protocols/mqtt/ssl_psk/README.md index 486fc5e5df..cec38fe1fb 100644 --- a/examples/protocols/mqtt/ssl_psk/README.md +++ b/examples/protocols/mqtt/ssl_psk/README.md @@ -1,4 +1,7 @@ -# ESP-MQTT SSL example with PSK verification +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + +# ESP-MQTT SSL example with PSK verification (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -8,11 +11,11 @@ This example connects to a local broker configured to PSK authentication ### Hardware Required -This example can be executed on any ESP32 board, the only required interface is WiFi (or ethernet) to connect to a MQTT +This example can be executed on any ESP32 board, the only required interface is WiFi (or ethernet) to connect to a MQTT broker with preconfigured PSK verification method. #### Mosquitto settings -In case of using mosquitto broker, here is how to enable PSK authentication in `mosquitto.config`, +In case of using mosquitto broker, here is how to enable PSK authentication in `mosquitto.config`, ``` psk_hint hint psk_file path_to_your_psk_file diff --git a/examples/protocols/mqtt/tcp/README.md b/examples/protocols/mqtt/tcp/README.md index e12a16144f..be6d70a577 100644 --- a/examples/protocols/mqtt/tcp/README.md +++ b/examples/protocols/mqtt/tcp/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESP-MQTT sample application (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/mqtt/ws/README.md b/examples/protocols/mqtt/ws/README.md index 2bceb3ca69..c2620b377e 100644 --- a/examples/protocols/mqtt/ws/README.md +++ b/examples/protocols/mqtt/ws/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESP-MQTT MQTT over Websocket (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/mqtt/wss/README.md b/examples/protocols/mqtt/wss/README.md index fb4b6c1a8d..f836920aaa 100644 --- a/examples/protocols/mqtt/wss/README.md +++ b/examples/protocols/mqtt/wss/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESP-MQTT MQTT over WSS Sample application (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/slip/slip_udp/README.md b/examples/protocols/slip/slip_udp/README.md index d7869ff978..67d21736fa 100644 --- a/examples/protocols/slip/slip_udp/README.md +++ b/examples/protocols/slip/slip_udp/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # SLIP device client (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/smtp_client/README.md b/examples/protocols/smtp_client/README.md index 55e8ec3ed7..c4db206a43 100644 --- a/examples/protocols/smtp_client/README.md +++ b/examples/protocols/smtp_client/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # SMTP Client Example The Example is SMTP client demo. It sends and email with attachment to recipient. diff --git a/examples/protocols/sockets/non_blocking/README.md b/examples/protocols/sockets/non_blocking/README.md index 8dd55a3d75..06d14c47a7 100644 --- a/examples/protocols/sockets/non_blocking/README.md +++ b/examples/protocols/sockets/non_blocking/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # TCP non-blocking client and server examples @@ -8,7 +11,7 @@ It could be configured to run either a TCP server, or a TCP client, or both, in ## How to use example -The example is configured by default as the TCP client. +The example is configured by default as the TCP client. Note that the example uses string representation of IP addresses and ports and thus could be used on both IPv4 and IPv6 protocols. diff --git a/examples/protocols/sockets/tcp_client/README.md b/examples/protocols/sockets/tcp_client/README.md index c6245c399b..d3a9c3340f 100644 --- a/examples/protocols/sockets/tcp_client/README.md +++ b/examples/protocols/sockets/tcp_client/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # TCP Client example @@ -9,8 +12,8 @@ The application creates a TCP socket and tries to connect to the server with pre In order to create TCP server that communicates with TCP Client example, choose one of the following options. -There are many host-side tools which can be used to interact with the UDP/TCP server/client. -One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. +There are many host-side tools which can be used to interact with the UDP/TCP server/client. +One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. Note: please replace `192.168.0.167 3333` with desired IPV4/IPV6 address (displayed in monitor console) and port number in the following command. In addition to those tools, simple Python scripts can be found under sockets/scripts directory. Every script is designed to interact with one of the examples. diff --git a/examples/protocols/sockets/tcp_client_multi_net/README.md b/examples/protocols/sockets/tcp_client_multi_net/README.md index 572b0b9730..1a9343bb7f 100644 --- a/examples/protocols/sockets/tcp_client_multi_net/README.md +++ b/examples/protocols/sockets/tcp_client_multi_net/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Multiple Ethernet Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/protocols/sockets/tcp_server/README.md b/examples/protocols/sockets/tcp_server/README.md index d4324038a4..7b0e71da6b 100644 --- a/examples/protocols/sockets/tcp_server/README.md +++ b/examples/protocols/sockets/tcp_server/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # TCP Server example @@ -9,8 +12,8 @@ The application creates a TCP socket with the specified port number and waits fo In order to create TCP client that communicates with TCP server example, choose one of the following options. -There are many host-side tools which can be used to interact with the UDP/TCP server/client. -One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. +There are many host-side tools which can be used to interact with the UDP/TCP server/client. +One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. Note: please replace `192.168.0.167 3333` with desired IPV4/IPV6 address (displayed in monitor console) and port number in the following command. In addition to those tools, simple Python scripts can be found under sockets/scripts directory. Every script is designed to interact with one of the examples. diff --git a/examples/protocols/sockets/udp_client/README.md b/examples/protocols/sockets/udp_client/README.md index eeae2f2c87..c1db97b310 100644 --- a/examples/protocols/sockets/udp_client/README.md +++ b/examples/protocols/sockets/udp_client/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # UDP Client example @@ -9,8 +12,8 @@ The application creates UDP socket and sends message to the predefined port and In order to create UDP server that communicates with UDP Client example, choose one of the following options. -There are many host-side tools which can be used to interact with the UDP/TCP server/client. -One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. +There are many host-side tools which can be used to interact with the UDP/TCP server/client. +One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. Note: please replace `192.168.0.167 3333` with desired IPV4/IPV6 address (displayed in monitor console) and port number in the following commands. In addition to those tools, simple Python scripts can be found under sockets/scripts directory. Every script is designed to interact with one of the examples. diff --git a/examples/protocols/sockets/udp_multicast/README.md b/examples/protocols/sockets/udp_multicast/README.md index 25224649f8..2d65d7f5e9 100644 --- a/examples/protocols/sockets/udp_multicast/README.md +++ b/examples/protocols/sockets/udp_multicast/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # UDP Multicast Example This example shows how to use the IPV4 & IPV6 UDP multicast features via the BSD-style sockets interface. diff --git a/examples/protocols/sockets/udp_server/README.md b/examples/protocols/sockets/udp_server/README.md index c29ab3ed6b..b461d8c76a 100644 --- a/examples/protocols/sockets/udp_server/README.md +++ b/examples/protocols/sockets/udp_server/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # UDP Server example @@ -9,8 +12,8 @@ The application creates UDP socket with the specified port number and waits for In order to create UDP client that communicates with UDP server example, choose one of the following options. -There are many host-side tools which can be used to interact with the UDP/TCP server/client. -One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. +There are many host-side tools which can be used to interact with the UDP/TCP server/client. +One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. Note: please replace `192.168.0.167 3333` with desired IPV4/IPV6 address (displayed in monitor console) and port number in the following commands. If want to use this RECVINFO function, please enable LWIP_NETBUF_RECVINFO in menuconfig,this function can only resolve the destination address of IPV4. diff --git a/examples/protocols/static_ip/README.md b/examples/protocols/static_ip/README.md index 974a7d3363..8c95367435 100644 --- a/examples/protocols/static_ip/README.md +++ b/examples/protocols/static_ip/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # WiFi station example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/security/flash_encryption/README.md b/examples/security/flash_encryption/README.md index 0dd247ad8e..587c1233e3 100644 --- a/examples/security/flash_encryption/README.md +++ b/examples/security/flash_encryption/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Flash Encryption The example checks if the flash encryption feature is enabled/disabled and if enabled prints the flash encryption mode (DEVELOPMENT / RELEASE) and FLASH_CRYPT_CNT (for ESP32) or SPI_BOOT_CRYPT_CNT (for ESP32-S2 and newer targets) eFuse value. diff --git a/examples/storage/custom_flash_driver/README.md b/examples/storage/custom_flash_driver/README.md index 391fc4b8e4..1409321756 100644 --- a/examples/storage/custom_flash_driver/README.md +++ b/examples/storage/custom_flash_driver/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Custom Flash Driver Example This example shows how to override the default chip driver list provided by IDF. Please make sure the SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST config option is enabled when you build this project (though it should already be enabled by default via `sdkconfig.defaults`). See [the programming guide](https://docs.espressif.com/projects/esp-idf/en/stable/api-reference/storage/spi_flash_override_driver.html) for more details regarding this feature. diff --git a/examples/storage/ext_flash_fatfs/README.md b/examples/storage/ext_flash_fatfs/README.md index 41d7d75db8..d196b679ae 100644 --- a/examples/storage/ext_flash_fatfs/README.md +++ b/examples/storage/ext_flash_fatfs/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # FAT FS on External Flash example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/fatfsgen/README.md b/examples/storage/fatfsgen/README.md index f736a8c501..d9bcb711a6 100644 --- a/examples/storage/fatfsgen/README.md +++ b/examples/storage/fatfsgen/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # FATFS partition generation example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/nvs_rw_blob/README.md b/examples/storage/nvs_rw_blob/README.md index 398418cabf..0c81a61247 100644 --- a/examples/storage/nvs_rw_blob/README.md +++ b/examples/storage/nvs_rw_blob/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Non-Volatile Storage (NVS) Read and Write Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/nvs_rw_value/README.md b/examples/storage/nvs_rw_value/README.md index e5a7f2e909..5e606a327b 100644 --- a/examples/storage/nvs_rw_value/README.md +++ b/examples/storage/nvs_rw_value/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Non-Volatile Storage (NVS) Read and Write Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/nvs_rw_value_cxx/README.md b/examples/storage/nvs_rw_value_cxx/README.md index 7ca19cea36..b3573e97a3 100644 --- a/examples/storage/nvs_rw_value_cxx/README.md +++ b/examples/storage/nvs_rw_value_cxx/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Non-Volatile Storage (NVS) C++ Read and Write Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/partition_api/partition_find/README.md b/examples/storage/partition_api/partition_find/README.md index a05152850e..8efdc97552 100644 --- a/examples/storage/partition_api/partition_find/README.md +++ b/examples/storage/partition_api/partition_find/README.md @@ -1,17 +1,20 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Finding Partitions Example This example demonstrates how to use the partition API functions `esp_partition_find` and `esp_partition_find_first` to search the device partition table. These functions return the matching partitions given a set of constraints. By constraints we simply mean -properties that returned results should match - notably partition type, subtype and label/name. In the case of `esp_partition_find_first`, the first matching instance is returned; +properties that returned results should match - notably partition type, subtype and label/name. In the case of `esp_partition_find_first`, the first matching instance is returned; for `esp_partition_find`, an iterator is returned iterating over matching instances. # Example Flow -The example uses a [custom partition table](./partitions_example.csv). The first part uses `esp_partition_find_first` to search for partition instances -using two constraints - type and subtype. However, the partition table contains partitions with same type/subtype combination. In order to differentiate these partitions, +The example uses a [custom partition table](./partitions_example.csv). The first part uses `esp_partition_find_first` to search for partition instances +using two constraints - type and subtype. However, the partition table contains partitions with same type/subtype combination. In order to differentiate these partitions, a third constraint - the label, is specified. -The second part shows how to iterate over partitions that match certain constraints, manually checking the properties of each iterated partition. +The second part shows how to iterate over partitions that match certain constraints, manually checking the properties of each iterated partition. The iterator is obtained using `esp_partition_find` and is released after its use to avoid memory leaks. ### Output diff --git a/examples/storage/partition_api/partition_mmap/README.md b/examples/storage/partition_api/partition_mmap/README.md index e60d75c4bd..e7556b409e 100644 --- a/examples/storage/partition_api/partition_mmap/README.md +++ b/examples/storage/partition_api/partition_mmap/README.md @@ -1,13 +1,16 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Partition Memory Map Example -This example demonstrates how to use `esp_partition_mmap` to configure MMU and map a partition into memory address space for read operations. +This example demonstrates how to use `esp_partition_mmap` to configure MMU and map a partition into memory address space for read operations. # Example Flow -The example uses a [custom partition table](./partitions_example.csv), with a data partition `storage` used for demonstration. Before mapping this partition to memory, +The example uses a [custom partition table](./partitions_example.csv), with a data partition `storage` used for demonstration. Before mapping this partition to memory, data is written to the partition used for verification. -The partition API function `esp_partition_mmap` is used to get a pointer to the mapped memory region and a handle to the mapping. The pointer is used to transparently read back the +The partition API function `esp_partition_mmap` is used to get a pointer to the mapped memory region and a handle to the mapping. The pointer is used to transparently read back the verification data written previously. Once the data written and read are verified to be the same, the function `spi_flash_munmap` is used to release the mapping. ### Output diff --git a/examples/storage/partition_api/partition_ops/README.md b/examples/storage/partition_api/partition_ops/README.md index 4e9d792efe..e5763942d3 100644 --- a/examples/storage/partition_api/partition_ops/README.md +++ b/examples/storage/partition_api/partition_ops/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Partition Read, Write, Erase Example This example demonstrates how to perform partition read, write and erase operations using API functions `esp_partition_read`, `esp_partition_write` and `esp_partition_erase`. @@ -7,7 +10,7 @@ This example demonstrates how to perform partition read, write and erase operati The example uses a [custom partition table](./partitions_example.csv), with a data partition `storage` used as the demo partition. For the most part the example code is well-commented so users should be able to follow along the code easily. Nevertheless, this section provides an overview of the code flow. The partition table is searched for the `storage` partition. Once found, the entire partition is erased using `esp_partition_erase_range`. Sample data is written using `esp_partition_write` -and read back using `esp_partition_read`, verifying the read and written data match. The partition is erased once again using `esp_partition_erase_range`, limited to the sector the sample data was written to. +and read back using `esp_partition_read`, verifying the read and written data match. The partition is erased once again using `esp_partition_erase_range`, limited to the sector the sample data was written to. ### Output diff --git a/examples/storage/parttool/README.md b/examples/storage/parttool/README.md index 8bacc7e03a..157639039e 100644 --- a/examples/storage/parttool/README.md +++ b/examples/storage/parttool/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Partitions Tool Example This example demonstrates common operations the partitions tool [parttool.py](../../../components/partition_table/parttool.py) allows the user to perform: diff --git a/examples/storage/sd_card/sdspi/README.md b/examples/storage/sd_card/sdspi/README.md index ebc228994c..2750fbae9d 100644 --- a/examples/storage/sd_card/sdspi/README.md +++ b/examples/storage/sd_card/sdspi/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # SD Card example (SDSPI) (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/semihost_vfs/README.md b/examples/storage/semihost_vfs/README.md index 696b9460ab..cfbaf19c51 100644 --- a/examples/storage/semihost_vfs/README.md +++ b/examples/storage/semihost_vfs/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Semihosting VFS driver example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -101,9 +104,9 @@ There are two outputs produced by example: but they're the best we can do in text. A graphics file illustrating the character set should be available from the same archive as this file. - + Hex Description Hex Description - + 20 SPACE ... 7D RIGHT CURLY BRACKET FD SMALL LETTER Y WITH ACUTE diff --git a/examples/storage/spiffs/README.md b/examples/storage/spiffs/README.md index 6ceb34634e..00655f0f5a 100644 --- a/examples/storage/spiffs/README.md +++ b/examples/storage/spiffs/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # SPIFFS example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/spiffsgen/README.md b/examples/storage/spiffsgen/README.md index 07525e03dd..08f5b24d08 100644 --- a/examples/storage/spiffsgen/README.md +++ b/examples/storage/spiffsgen/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # SPIFFS Image Generation on Build Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/storage/wear_levelling/README.md b/examples/storage/wear_levelling/README.md index a10dd4c55b..aeb4a6b1e2 100644 --- a/examples/storage/wear_levelling/README.md +++ b/examples/storage/wear_levelling/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Wear levelling example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -36,7 +39,7 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example output -Here is a typical example console output. +Here is a typical example console output. ``` I (280) example: Mounting FAT filesystem diff --git a/examples/system/base_mac_address/README.md b/examples/system/base_mac_address/README.md index 990aca44b3..57d919a611 100644 --- a/examples/system/base_mac_address/README.md +++ b/examples/system/base_mac_address/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Base MAC Address (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/system/base_mac_address/pytest_base_mac_address.py b/examples/system/base_mac_address/pytest_base_mac_address.py index ee3dcb7381..41c2910b06 100644 --- a/examples/system/base_mac_address/pytest_base_mac_address.py +++ b/examples/system/base_mac_address/pytest_base_mac_address.py @@ -5,7 +5,11 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets +# IDF-5046 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_base_mac_address(dut: Dut) -> None: dut.expect_exact('BASE_MAC: Base MAC Address read from EFUSE BLK0') diff --git a/examples/system/console/advanced/README.md b/examples/system/console/advanced/README.md index 94c080aa98..a88bc9bef4 100644 --- a/examples/system/console/advanced/README.md +++ b/examples/system/console/advanced/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Console Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -36,7 +39,7 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui ## Example Output -Enter the `help` command get a full list of all available commands. The following is a sample session of the Console Example where a variety of commands provided by the Console Example are used. Note that GPIO15 is connected to GND to remove the boot log output. +Enter the `help` command get a full list of all available commands. The following is a sample session of the Console Example where a variety of commands provided by the Console Example are used. Note that GPIO15 is connected to GND to remove the boot log output. ``` This is an example of ESP-IDF console component. @@ -44,13 +47,13 @@ Type 'help' to get the list of commands. Use UP/DOWN arrows to navigate through command history. Press TAB when typing command name to auto-complete. [esp32]> help -help +help Print the list of registered commands -free +free Get the total size of heap memory available -restart +restart Restart the program deep_sleep [-t ] [--io=] [--io_level=<0|1>] @@ -99,7 +102,7 @@ This is an example of ESP-IDF console component. Type 'help' to get the list of commands. Use UP/DOWN arrows to navigate through command history. Press TAB when typing command name to auto-complete. -[esp32]> +[esp32]> ``` @@ -124,7 +127,7 @@ esp32> ### Configuring UART -The ``initialize_console()`` function in the example configures some aspects of UART relevant to the operation of the console. +The ``initialize_console()`` function in the example configures some aspects of UART relevant to the operation of the console. - **Line Endings**: The default line endings are configured to match those expected/generated by common serial monitor programs, such as `screen`, `minicom`, and the `idf_monitor.py` included in the SDK. The default behavior for these commands are: - When 'enter' key is pressed on the keyboard, `CR` (0x13) code is sent to the serial device. diff --git a/examples/system/console/basic/README.md b/examples/system/console/basic/README.md index 67a67be03b..2bcef7e700 100644 --- a/examples/system/console/basic/README.md +++ b/examples/system/console/basic/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Basic Console Example (`esp_console_repl`) (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -70,13 +73,13 @@ Type 'help' to get the list of commands. Use UP/DOWN arrows to navigate through command history. Press TAB when typing command name to auto-complete. [esp32]> help -help +help Print the list of registered commands -free +free Get the total size of heap memory available -restart +restart Restart the program deep_sleep [-t ] [--io=] [--io_level=<0|1>] @@ -125,7 +128,7 @@ This is an example of ESP-IDF console component. Type 'help' to get the list of commands. Use UP/DOWN arrows to navigate through command history. Press TAB when typing command name to auto-complete. -[esp32]> +[esp32]> ``` diff --git a/examples/system/efuse/README.md b/examples/system/efuse/README.md index 10ec84cac5..c37d1d1ff2 100644 --- a/examples/system/efuse/README.md +++ b/examples/system/efuse/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # eFuse Example ## Overview diff --git a/examples/system/esp_event/default_event_loop/README.md b/examples/system/esp_event/default_event_loop/README.md index a3e6060f8f..27f43e5bd0 100644 --- a/examples/system/esp_event/default_event_loop/README.md +++ b/examples/system/esp_event/default_event_loop/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Default Event Loop Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -101,12 +104,12 @@ I (3398) default_event_loop: TASK_EVENTS:TASK_ITERATION_EVENT: deleting task eve ### Setting of Event Sources -This example uses two event sources: +This example uses two event sources: - A periodic timer. An event is raised when (1) the timer is started (2) the timer period expires and (3) the timer is stopped - A task with a loop inside. An event is raised for the when (1) the loop iterates. -All of the events mentioned above have their own specific handler, however there are the following additional handlers. +All of the events mentioned above have their own specific handler, however there are the following additional handlers. - One handler executes when **any** event under the periodic timer event is posted - The other handler executes if **any** event is posted. diff --git a/examples/system/esp_event/user_event_loops/README.md b/examples/system/esp_event/user_event_loops/README.md index 18fb719c6e..2c101d6563 100644 --- a/examples/system/esp_event/user_event_loops/README.md +++ b/examples/system/esp_event/user_event_loops/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # User Event Loops Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/system/esp_event/user_event_loops/pytest_esp_event_user.py b/examples/system/esp_event/user_event_loops/pytest_esp_event_user.py index 33275591f1..3c1edad083 100644 --- a/examples/system/esp_event/user_event_loops/pytest_esp_event_user.py +++ b/examples/system/esp_event/user_event_loops/pytest_esp_event_user.py @@ -12,7 +12,11 @@ TASK_ITERATION_POSTING = 'posting TASK_EVENTS:TASK_ITERATION_EVENT to {}, iterat TASK_ITERATION_HANDLING = 'handling TASK_EVENTS:TASK_ITERATION_EVENT from {}, iteration {}' -@pytest.mark.supported_targets +# IDF-5051 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_esp_event_user_event_loops(dut: Dut) -> None: diff --git a/examples/system/esp_timer/pytest_esp_timer.py b/examples/system/esp_timer/pytest_esp_timer.py index 86f7847ea3..ae3489f9ca 100644 --- a/examples/system/esp_timer/pytest_esp_timer.py +++ b/examples/system/esp_timer/pytest_esp_timer.py @@ -28,7 +28,11 @@ LIGHT_SLEEP_TIME = 500000 ONE_SHOT_TIMER_PERIOD = 5000000 -@pytest.mark.supported_targets +# IDF-5052 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/examples/system/eventfd/README.md b/examples/system/eventfd/README.md index 67fb1afdce..2ee63c4838 100644 --- a/examples/system/eventfd/README.md +++ b/examples/system/eventfd/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # eventfd example The example demonstrates the use of `eventfd()` to collect events from other tasks and ISRs in a diff --git a/examples/system/eventfd/pytest_eventfd.py b/examples/system/eventfd/pytest_eventfd.py index 1fb730ec73..4548c36b7a 100644 --- a/examples/system/eventfd/pytest_eventfd.py +++ b/examples/system/eventfd/pytest_eventfd.py @@ -8,7 +8,11 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets +# IDF-5051 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_eventfd(dut: Dut) -> None: diff --git a/examples/system/freertos/real_time_stats/README.md b/examples/system/freertos/real_time_stats/README.md index bf52abcef2..3abfffb8c0 100644 --- a/examples/system/freertos/real_time_stats/README.md +++ b/examples/system/freertos/real_time_stats/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # FreeRTOS Real Time Stats Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/system/freertos/real_time_stats/pytest_freertos_real_time_stats.py b/examples/system/freertos/real_time_stats/pytest_freertos_real_time_stats.py index d0dbad2d1e..87a762fd43 100644 --- a/examples/system/freertos/real_time_stats/pytest_freertos_real_time_stats.py +++ b/examples/system/freertos/real_time_stats/pytest_freertos_real_time_stats.py @@ -5,7 +5,11 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets +# IDF-5051 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_freertos_real_time_stats(dut: Dut) -> None: diff --git a/examples/system/gdbstub/README.md b/examples/system/gdbstub/README.md index 45b335a28e..ef06c8e71c 100644 --- a/examples/system/gdbstub/README.md +++ b/examples/system/gdbstub/README.md @@ -1,24 +1,27 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # GDBstub example -This example shows how to use gdbstub and it's functionality at runtime to debug an application with GDB. -With the gdbstub component it is possible to run GDB from IDF Monitor by pressing Ctrl+C and debug -the application using GDB. It is also possible to read/modify memory values, interrupt and continue +This example shows how to use gdbstub and it's functionality at runtime to debug an application with GDB. +With the gdbstub component it is possible to run GDB from IDF Monitor by pressing Ctrl+C and debug +the application using GDB. It is also possible to read/modify memory values, interrupt and continue the application, set breakpoints, make steps and so on. Upon exit from GDB, the application will continue to work in IDF Monitor as before. ## How to use example ### Hardware Required -The example can run on any commonly available ESP32 development board. +The example can run on any commonly available ESP32 development board. There are two possible ways to execute gdbstub with GDB: from IDF Monitor and as standalone application. -gdbstub support ESP32, ESP32-S2 and ESP32-S3 chips. +gdbstub support ESP32, ESP32-S2 and ESP32-S3 chips. ### Configure the project By default, the example is already pre-configured, but the user can change configuration options with the following command: ``` idf.py menuconfig -``` +``` Current example is pre-configured. The user can scroll through the system parameters and see the settings. Most important one is: -> Component Config -> ESP System Settings -> Panic handler behaviour -> GDBStub on runtime @@ -46,16 +49,16 @@ This will execute GDB and GDB will connect to your Esp32 by serial port COM10 wi ## Example Output -The example demonstrates how to switch to GDB, watch values, change values, continue to run, and exit from GDB to the application. +The example demonstrates how to switch to GDB, watch values, change values, continue to run, and exit from GDB to the application. To switch to GDB, the user presses Ctrl+C. This will stop the application and run the GDB. In GDB, the user can print values "print call_count" and "print update_log_level" and then change them "set call_count 100" and "set update_log_level = ESP_LOG_WARN". The user can continue running the application in GDB by entering "continue" and then interrupt the application by pressing Ctrl+C. The user can check again that the application has worked by checking variable "print call_count". -The user can exit from GDB to continue seeing the trace from IDF Monitor by pressing "quit" and then "y". +The user can exit from GDB to continue seeing the trace from IDF Monitor by pressing "quit" and then "y". The user will see in IDF Monitor that call_count and logging level have changed. The user can add breakpoint to the label test_point2 by entering "break test_point2" and then enter "continue" or "c". The application will break at this line. -If user will continue again, the application will break at this line again. +If user will continue again, the application will break at this line again. Also, user can try to step application by entering "si". A typical console output for such a scenario is shown below: ``` @@ -160,7 +163,7 @@ task4test (param=0x0) at ../main/gdbstub_main.c:38 To reproduce this scenario run the application by: idf.py -P PORT flash monitor Then: 1. Interrupt the application by pressing Ctrl+C -2. In GDB, print the application values by typing in GDB command line "print call_count" or "print update_log_level" +2. In GDB, print the application values by typing in GDB command line "print call_count" or "print update_log_level" 3. Modify the application values by typing in GDB command line "set call_count = 100" or "set update_log_level = ESP_LOG_WARN" 4. Continue the application by typing in GDB command line "continue" 5. Interrupt application by pressing Ctrl+C @@ -170,7 +173,7 @@ Then: 9. Add breakpoint by typing in GDB command line "break test_point2" or break 40 (break at line 40). 10. Continue the application by typing in GDB command line "continue" 11. After application stop at label "test_point2". -12. Make stepping by typing "si" +12. Make stepping by typing "si" 13. To exit from GDB to monitor type "exit" and press "y" To exit from monitor please use Ctrl+] diff --git a/examples/system/heap_task_tracking/README.md b/examples/system/heap_task_tracking/README.md index 9284a519d5..7afeff1488 100644 --- a/examples/system/heap_task_tracking/README.md +++ b/examples/system/heap_task_tracking/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Heap Task Tracking Example ## Overview diff --git a/examples/system/light_sleep/README.md b/examples/system/light_sleep/README.md index 63d99b084b..2d1cbd9d9d 100644 --- a/examples/system/light_sleep/README.md +++ b/examples/system/light_sleep/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Light Sleep Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/system/light_sleep/pytest_light_sleep.py b/examples/system/light_sleep/pytest_light_sleep.py index 96472be46d..ea99aefe50 100644 --- a/examples/system/light_sleep/pytest_light_sleep.py +++ b/examples/system/light_sleep/pytest_light_sleep.py @@ -8,7 +8,11 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets +# IDF-5053 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_light_sleep(dut: Dut) -> None: diff --git a/examples/system/ota/otatool/README.md b/examples/system/ota/otatool/README.md index aa465c2331..461c6f4ae1 100644 --- a/examples/system/ota/otatool/README.md +++ b/examples/system/ota/otatool/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # OTA Tool Example This example demonstrates common operations the OTA tool [otatool.py](../../../../components/app_update/otatool.py) allows the user to perform: diff --git a/examples/system/pthread/README.md b/examples/system/pthread/README.md index 047df78c57..5a87776234 100644 --- a/examples/system/pthread/README.md +++ b/examples/system/pthread/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Pthread Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/system/pthread/pytest_pthread.py b/examples/system/pthread/pytest_pthread.py index 2852bb1039..020e6ff49b 100644 --- a/examples/system/pthread/pytest_pthread.py +++ b/examples/system/pthread/pytest_pthread.py @@ -5,7 +5,11 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets +# IDF-5054 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_pthread(dut: Dut) -> None: diff --git a/examples/system/select/README.md b/examples/system/select/README.md index 888d46109c..952c571c63 100644 --- a/examples/system/select/README.md +++ b/examples/system/select/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Synchronous I/O multiplexing example The example demonstrates the use of synchronous I/O multiplexing by the select() diff --git a/examples/system/task_watchdog/pytest_task_watchdog.py b/examples/system/task_watchdog/pytest_task_watchdog.py index 7a4a8e223f..77d2aca393 100644 --- a/examples/system/task_watchdog/pytest_task_watchdog.py +++ b/examples/system/task_watchdog/pytest_task_watchdog.py @@ -5,7 +5,11 @@ import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets +# IDF-5055 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic def test_task_watchdog(dut: Dut) -> None: diff --git a/examples/wifi/espnow/README.md b/examples/wifi/espnow/README.md index db07648a6c..765cd5d76c 100644 --- a/examples/wifi/espnow/README.md +++ b/examples/wifi/espnow/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # ESPNOW Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -8,22 +11,22 @@ This example shows how to use ESPNOW of wifi. Example does the following steps: * Initialize ESPNOW. * Register ESPNOW sending or receiving callback function. * Add ESPNOW peer information. -* Send and receive ESPNOW data. +* Send and receive ESPNOW data. This example need at least two ESP devices: -* In order to get the MAC address of the other device, Device1 firstly send broadcast ESPNOW data with 'state' set as 0. -* When Device2 receiving broadcast ESPNOW data from Device1 with 'state' as 0, adds Device1 into the peer list. - Then start sending broadcast ESPNOW data with 'state' set as 1. -* When Device1 receiving broadcast ESPNOW data with 'state' as 1, compares the local magic number with that in the data. - If the local one is bigger than that one, stop sending broadcast ESPNOW data and starts sending unicast ESPNOW data to Device2. -* If Device2 receives unicast ESPNOW data, also stop sending broadcast ESPNOW data. - -In practice, if the MAC address of the other device is known, it's not required to send/receive broadcast ESPNOW data first, +* In order to get the MAC address of the other device, Device1 firstly send broadcast ESPNOW data with 'state' set as 0. +* When Device2 receiving broadcast ESPNOW data from Device1 with 'state' as 0, adds Device1 into the peer list. + Then start sending broadcast ESPNOW data with 'state' set as 1. +* When Device1 receiving broadcast ESPNOW data with 'state' as 1, compares the local magic number with that in the data. + If the local one is bigger than that one, stop sending broadcast ESPNOW data and starts sending unicast ESPNOW data to Device2. +* If Device2 receives unicast ESPNOW data, also stop sending broadcast ESPNOW data. + +In practice, if the MAC address of the other device is known, it's not required to send/receive broadcast ESPNOW data first, just add the device into the peer list and send/receive unicast ESPNOW data. -There are a lot of "extras" on top of ESPNOW data, such as type, state, sequence number, CRC and magic in this example. These "extras" are -not required to use ESPNOW. They are only used to make this example to run correctly. However, it is recommended that users add some "extras" +There are a lot of "extras" on top of ESPNOW data, such as type, state, sequence number, CRC and magic in this example. These "extras" are +not required to use ESPNOW. They are only used to make this example to run correctly. However, it is recommended that users add some "extras" to make ESPNOW data more safe and more reliable. ## How to use example @@ -35,7 +38,7 @@ idf.py menuconfig ``` * Set WiFi mode (station or SoftAP) under Example Configuration Options. -* Set ESPNOW primary master key under Example Configuration Options. +* Set ESPNOW primary master key under Example Configuration Options. This parameter must be set to the same value for sending and recving devices. * Set ESPNOW local master key under Example Configuration Options. This parameter must be set to the same value for sending and recving devices. @@ -45,7 +48,7 @@ idf.py menuconfig * Set Send len under Example Configuration Options. * Set Enable Long Range Options. When this parameter is enabled, the ESP32 device will send data at the PHY rate of 512Kbps or 256Kbps - then the data can be transmitted over long range between two ESP32 devices. + then the data can be transmitted over long range between two ESP32 devices. ### Build and Flash @@ -110,8 +113,8 @@ I (24125) espnow_example: send data to 30:ae:a4:80:45:68 ## Troubleshooting -If ESPNOW data can not be received from another device, maybe the two devices are not -on the same channel or the primary key and local key are different. +If ESPNOW data can not be received from another device, maybe the two devices are not +on the same channel or the primary key and local key are different. -In real application, if the receiving device is in station mode only and it connects to an AP, +In real application, if the receiving device is in station mode only and it connects to an AP, modem sleep should be disabled. Otherwise, it may fail to revceive ESPNOW data from other devices. diff --git a/examples/wifi/fast_scan/README.md b/examples/wifi/fast_scan/README.md index d2b5970c83..40a64d6579 100644 --- a/examples/wifi/fast_scan/README.md +++ b/examples/wifi/fast_scan/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Wi-Fi Fast Scan Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -23,7 +26,7 @@ Before project configuration and build, be sure to set the correct chip target u ### Configure the project -Open the project configuration menu (`idf.py menuconfig`). +Open the project configuration menu (`idf.py menuconfig`). In the `Example Configuration` menu: diff --git a/examples/wifi/getting_started/softAP/README.md b/examples/wifi/getting_started/softAP/README.md index 22810c2e8a..f356d2dc53 100644 --- a/examples/wifi/getting_started/softAP/README.md +++ b/examples/wifi/getting_started/softAP/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Wi-Fi SoftAP Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -10,7 +13,7 @@ SoftAP supports Protected Management Frames(PMF). Necessary configurations can b ### Configure the project -Open the project configuration menu (`idf.py menuconfig`). +Open the project configuration menu (`idf.py menuconfig`). In the `Example Configuration` menu: diff --git a/examples/wifi/getting_started/station/README.md b/examples/wifi/getting_started/station/README.md index a778c269a1..4a1989076b 100644 --- a/examples/wifi/getting_started/station/README.md +++ b/examples/wifi/getting_started/station/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Wi-Fi Station Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -8,7 +11,7 @@ This example shows how to use the Wi-Fi Station functionality of the Wi-Fi drive ### Configure the project -Open the project configuration menu (`idf.py menuconfig`). +Open the project configuration menu (`idf.py menuconfig`). In the `Example Configuration` menu: diff --git a/examples/wifi/iperf/README.md b/examples/wifi/iperf/README.md index ce7247f051..2283fce4f5 100644 --- a/examples/wifi/iperf/README.md +++ b/examples/wifi/iperf/README.md @@ -1,18 +1,21 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Iperf Example ## Note about iperf version The iperf example doesn't support all features in standard iperf. It's compitable with iperf version 2.x. ## Note about 80MHz flash frequency -The iperf can get better throughput if the SPI flash frequency is set to 80MHz, but the system may crash in 80MHz mode for ESP-WROVER-KIT. -Removing R140~R145 from the board can fix this issue. Currently the default SPI frequency is set to 40MHz, if you want to change the SPI flash +The iperf can get better throughput if the SPI flash frequency is set to 80MHz, but the system may crash in 80MHz mode for ESP-WROVER-KIT. +Removing R140~R145 from the board can fix this issue. Currently the default SPI frequency is set to 40MHz, if you want to change the SPI flash frequency to 80MHz, please make sure R140~R145 are removed from ESP-WROVER-KIT or use ESP32 DevKitC. ## Introduction -This example implements the protocol used by the common performance measurement tool [iPerf](https://iperf.fr/). +This example implements the protocol used by the common performance measurement tool [iPerf](https://iperf.fr/). Performance can be measured between two ESP32s running this example, or between a single ESP32 and a computer running the iPerf tool -Demo steps to test station TCP Tx performance: +Demo steps to test station TCP Tx performance: 1. Build the iperf example with sdkconfig.defaults, which contains performance test specific configurations diff --git a/examples/wifi/power_save/README.md b/examples/wifi/power_save/README.md index 63b11576f5..a9595666dd 100644 --- a/examples/wifi/power_save/README.md +++ b/examples/wifi/power_save/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Wifi Power Save Example This example shows how to use power save mode of wifi. diff --git a/examples/wifi/roaming/README.md b/examples/wifi/roaming/README.md index 37e83407fe..a27c3f905d 100644 --- a/examples/wifi/roaming/README.md +++ b/examples/wifi/roaming/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Roaming Example (See the README.md file in the upper level 'examples' directory for more information about examples.) diff --git a/examples/wifi/scan/README.md b/examples/wifi/scan/README.md index 28feace27c..402505cde6 100644 --- a/examples/wifi/scan/README.md +++ b/examples/wifi/scan/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Wi-Fi Scan Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -15,7 +18,7 @@ Before project configuration and build, be sure to set the correct chip target u ### Configure the project -Open the project configuration menu (`idf.py menuconfig`). +Open the project configuration menu (`idf.py menuconfig`). In the `Example Configuration` menu: diff --git a/examples/wifi/smart_config/README.md b/examples/wifi/smart_config/README.md index b94d10068b..e9b8abb0d7 100644 --- a/examples/wifi/smart_config/README.md +++ b/examples/wifi/smart_config/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # smartconfig Example This example shows how ESP32 connects to a target AP with ESPTOUCH. @@ -6,7 +9,7 @@ This example shows how ESP32 connects to a target AP with ESPTOUCH. ### Hardware Required -Download ESPTOUCH APP from app store: +Download ESPTOUCH APP from app store: [Android source code](https://github.com/EspressifApp/EsptouchForAndroid) [iOS source code](https://github.com/EspressifApp/EsptouchForIOS) is available. diff --git a/examples/wifi/wifi_eap_fast/README.md b/examples/wifi/wifi_eap_fast/README.md index aced7cc9bc..ff150d2a29 100644 --- a/examples/wifi/wifi_eap_fast/README.md +++ b/examples/wifi/wifi_eap_fast/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # WPA2 Enterprise Example This example shows how ESP32 connects to AP with Wi-Fi enterprise encryption using the EAP-FAST method. The example does the following steps: diff --git a/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md b/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md index 03ced1a144..89815d3bcf 100644 --- a/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md +++ b/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Device Provisioning Protocol (Enrollee) Example This example shows how to configure ESP32 as an enrollee using Device Provisioning Protocol(DPP) also known as Wi-Fi Easy Connect. @@ -13,7 +16,7 @@ To run the example with an Android 10+ device follow below steps - 3. Now go to Settings->WiFi & Internet->Wi-Fi->Example-AP->Advanced->Add Device. 4. Scan QR Code using the scanner, which will make ESP32 connect to Example-AP. -Optional configuration available +Optional configuration available *Note:* - QR Code should be displayed as dark on a white/light background to work properly. diff --git a/examples/wifi/wifi_enterprise/README.md b/examples/wifi/wifi_enterprise/README.md index 9e83f3e2e9..0b207471e4 100644 --- a/examples/wifi/wifi_enterprise/README.md +++ b/examples/wifi/wifi_enterprise/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # WPA2 Enterprise Example This example shows how ESP32 connects to AP with Wi-Fi enterprise encryption. The example does the following steps: @@ -46,9 +49,9 @@ idf.py -p PORT flash monitor mkdir demoCA/private sh -c "echo '01' > ./demoCA/serial" touch ./demoCA/index.txt - touch xpextensions + touch xpextensions - add following lines in xpextensions file + add following lines in xpextensions file [ xpclient_ext ] extendedKeyUsage = 1.3.6.1.5.5.7.3.2 @@ -79,7 +82,7 @@ idf.py -p PORT flash monitor openssl pkcs12 -in client.p12 -out client.pem openssl pkcs12 -in server.p12 -out server.pem - + ### Example output diff --git a/examples/wifi/wps/README.md b/examples/wifi/wps/README.md index eb5b051cd8..2c9f63dbd5 100644 --- a/examples/wifi/wps/README.md +++ b/examples/wifi/wps/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + # Wi-Fi WPS Example (See the README.md file in the upper level 'examples' directory for more information about examples.) @@ -15,7 +18,7 @@ Before project configuration and build, be sure to set the correct chip target u ### Configure the project -Open the project configuration menu (`idf.py menuconfig`). +Open the project configuration menu (`idf.py menuconfig`). In the `Example Configuration` menu: diff --git a/examples/zigbee/esp_zigbee_gateway/README.md b/examples/zigbee/esp_zigbee_gateway/README.md index ae11dd1cdb..80c63ea7e0 100644 --- a/examples/zigbee/esp_zigbee_gateway/README.md +++ b/examples/zigbee/esp_zigbee_gateway/README.md @@ -1,4 +1,7 @@ -# Gateway Example +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | + +# Gateway Example (See the `README.md` file in the upper level 'examples' directory for more information about examples.) @@ -36,20 +39,20 @@ Build the project, flash it to the board, and start the monitor tool to view the As you run the example, you will see the following log: -esp_zigbee_gateway: -I (660) ESP_ZB_GATEWAY: status: -1 -I (670) ESP_ZB_GATEWAY: Zigbee stack initialized -I (680) ESP_ZB_GATEWAY: Zigbee rcp device booted -I (1280) ESP_ZB_GATEWAY: Start network formation -I (3060) ESP_ZB_GATEWAY: Formed network successfully (ieee extended address: f9:54:2d:01:a0:03:f7:84, PAN ID: 0x8651) -I (4060) ESP_ZB_GATEWAY: status: 0 -I (4400) ESP_ZB_GATEWAY: Network steering started +esp_zigbee_gateway: +I (660) ESP_ZB_GATEWAY: status: -1 +I (670) ESP_ZB_GATEWAY: Zigbee stack initialized +I (680) ESP_ZB_GATEWAY: Zigbee rcp device booted +I (1280) ESP_ZB_GATEWAY: Start network formation +I (3060) ESP_ZB_GATEWAY: Formed network successfully (ieee extended address: f9:54:2d:01:a0:03:f7:84, PAN ID: 0x8651) +I (4060) ESP_ZB_GATEWAY: status: 0 +I (4400) ESP_ZB_GATEWAY: Network steering started ## Gateway Functions * After Zigbee gateway starts up, it will read MAC ieee address and Zigbee stack version number from the Zigbee rcp and start working together with Zigbee rcp via UART communication to form a Zigbee network * More Gateway functionalities supporting Wi-Fi interaction will come later - + ## Troubleshooting For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index b672c17a17..10fea2ddc5 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -1557,7 +1557,6 @@ components/spi_flash/test/test_flash_encryption.c components/spi_flash/test/test_mmap.c components/spi_flash/test/test_out_of_bounds_write.c components/spi_flash/test/test_partition_ext.c -components/spi_flash/test/test_partitions.c components/spi_flash/test/test_spi_flash.c components/tcp_transport/include/esp_transport_ssl.h components/tcp_transport/include/esp_transport_tcp.h diff --git a/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py b/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py index 89218931b3..83d0baccf7 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py +++ b/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py @@ -126,6 +126,7 @@ class UnitTestGroup(IDFCaseGroup): 'esp32': 'ESP32DUT', 'esp32s2': 'ESP32S2DUT', 'esp32s3': 'ESP32S3DUT', + 'esp32c2': 'ESP32C2DUT', 'esp32c3': 'ESP32C3DUT', 'esp8266': 'ESP8266DUT', } diff --git a/tools/ci/python_packages/ttfw_idf/IDFDUT.py b/tools/ci/python_packages/ttfw_idf/IDFDUT.py index 89fb2429d6..f3d69becc1 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFDUT.py +++ b/tools/ci/python_packages/ttfw_idf/IDFDUT.py @@ -604,6 +604,15 @@ class ESP32S3DUT(IDFDUT): raise NotImplementedError() +class ESP32C2DUT(IDFDUT): + TARGET = 'esp32c2' + TOOLCHAIN_PREFIX = 'riscv32-esp-elf-' + + @classmethod + def get_rom(cls): + return targets.ESP32C2ROM + + class ESP32C3DUT(IDFDUT): TARGET = 'esp32c3' TOOLCHAIN_PREFIX = 'riscv32-esp-elf-' @@ -641,7 +650,7 @@ class ESP8266DUT(IDFDUT): def get_target_by_rom_class(cls): - for c in [ESP32DUT, ESP32S2DUT, ESP32S3DUT, ESP32C3DUT, ESP32C6DUT, ESP32H2DUT, ESP8266DUT, IDFQEMUDUT]: + for c in [ESP32DUT, ESP32S2DUT, ESP32S3DUT, ESP32C2DUT, ESP32C3DUT, ESP32C6DUT, ESP32H2DUT, ESP8266DUT, IDFQEMUDUT]: if c.get_rom() == cls: return c.TARGET return None diff --git a/tools/ci/python_packages/ttfw_idf/__init__.py b/tools/ci/python_packages/ttfw_idf/__init__.py index 33ae4a434a..af5fae6f66 100644 --- a/tools/ci/python_packages/ttfw_idf/__init__.py +++ b/tools/ci/python_packages/ttfw_idf/__init__.py @@ -14,8 +14,8 @@ from tiny_test_fw import TinyFW, Utility from .DebugUtils import CustomProcess, GDBBackend, OCDBackend # noqa: export DebugUtils for users from .IDFApp import UT, ComponentUTApp, Example, IDFApp, LoadableElfTestApp, TestApp # noqa: export all Apps for users -from .IDFDUT import (ESP32C3DUT, ESP32C3FPGADUT, ESP32C6DUT, ESP32DUT, ESP32H2DUT, # noqa: export DUTs for users - ESP32QEMUDUT, ESP32S2DUT, ESP32S3DUT, ESP32S3FPGADUT, ESP8266DUT, IDFDUT) +from .IDFDUT import (ESP32C2DUT, ESP32C3DUT, ESP32C3FPGADUT, ESP32C6DUT, ESP32DUT, # noqa: export DUTs for users + ESP32H2DUT, ESP32QEMUDUT, ESP32S2DUT, ESP32S3DUT, ESP32S3FPGADUT, ESP8266DUT, IDFDUT) from .unity_test_parser import TestFormat, TestResults # pass TARGET_DUT_CLS_DICT to Env.py to avoid circular dependency issue. @@ -23,6 +23,7 @@ TARGET_DUT_CLS_DICT = { 'ESP32': ESP32DUT, 'ESP32S2': ESP32S2DUT, 'ESP32S3': ESP32S3DUT, + 'ESP32C2': ESP32C2DUT, 'ESP32C3': ESP32C3DUT, 'ESP32C3FPGA': ESP32C3FPGADUT, 'ESP32S3FPGA': ESP32S3FPGADUT, diff --git a/tools/cmake/kconfig.cmake b/tools/cmake/kconfig.cmake index c554fd7f49..7a564f1a7d 100644 --- a/tools/cmake/kconfig.cmake +++ b/tools/cmake/kconfig.cmake @@ -112,11 +112,6 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) if(sdkconfig_defaults) foreach(sdkconfig_default ${sdkconfig_defaults}) list(APPEND defaults_arg --defaults "${sdkconfig_default}") - endforeach() - endif() - - if(sdkconfig_defaults) - foreach(sdkconfig_default ${sdkconfig_defaults}) if(EXISTS "${sdkconfig_default}.${idf_target}") list(APPEND defaults_arg --defaults "${sdkconfig_default}.${idf_target}") endif() diff --git a/tools/test_apps/phy/phy_multi_init_data_test/README.md b/tools/test_apps/phy/phy_multi_init_data_test/README.md index 57433de18a..3f7a0a04f0 100644 --- a/tools/test_apps/phy/phy_multi_init_data_test/README.md +++ b/tools/test_apps/phy/phy_multi_init_data_test/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | +| ----------------- | ----- | -------- | -------- | -------- | diff --git a/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py b/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py index 9f9c914542..d657695f4a 100644 --- a/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py +++ b/tools/test_apps/phy/phy_multi_init_data_test/pytest_phy_multi_init_data.py @@ -5,7 +5,11 @@ import pytest from pytest_embedded_idf.dut import IdfDut -@pytest.mark.supported_targets +# IDF-5046 +@pytest.mark.esp32 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 +@pytest.mark.esp32c3 @pytest.mark.generic @pytest.mark.parametrize('config', [ 'phy_multiple_init_data', diff --git a/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_data.c b/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_data.c index 238b02426b..6e93687e55 100644 --- a/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_data.c +++ b/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_data.c @@ -8,18 +8,13 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_private/esp_clk.h" +#include "test_utils.h" #include "unity.h" #include "sdkconfig.h" -/* No performance monitor in RISCV for now - */ -#if !DISABLED_FOR_TARGETS(ESP32C3) - -static const char* TAG = "test_ccomp_timer"; - #if CONFIG_IDF_TARGET_ESP32 #define CACHE_WAYS 2 #define CACHE_LINE_SIZE 32 @@ -50,6 +45,14 @@ typedef struct { int64_t ccomp; } ccomp_test_time_t; +/* No performance monitor in RISCV for now + */ +#if !DISABLED_FOR_TARGETS(ESP32C3) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) +//IDF-5052 + +static const char* TAG = "test_ccomp_timer"; + #if CONFIG_SPIRAM static uint8_t *flash_mem; #else @@ -175,5 +178,5 @@ TEST_CASE("data cache hit rate sweep", "[test_utils][ccomp_timer]") free(flash_mem); #endif } - +#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) #endif // !DISABLED_FOR_TARGETS(ESP32C3) diff --git a/tools/unit-test-app/configs/app_update_c2 b/tools/unit-test-app/configs/app_update_c2 new file mode 100644 index 0000000000..c912e5627f --- /dev/null +++ b/tools/unit-test-app/configs/app_update_c2 @@ -0,0 +1,15 @@ +# This config is split between targets since different component needs to be excluded (esp32, esp32s2) +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=app_update +TEST_EXCLUDE_COMPONENTS=bt +CONFIG_UNITY_FREERTOS_STACK_SIZE=12288 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partition_table_unit_test_two_ota_2m.csv" +CONFIG_PARTITION_TABLE_FILENAME="partition_table_unit_test_two_ota_2m.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x18000 +CONFIG_BOOTLOADER_FACTORY_RESET=y +CONFIG_BOOTLOADER_APP_TEST=y +CONFIG_BOOTLOADER_HOLD_TIME_GPIO=2 +CONFIG_BOOTLOADER_OTA_DATA_ERASE=y +CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4 +CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18 diff --git a/tools/unit-test-app/configs/default_2_c2 b/tools/unit-test-app/configs/default_2_c2 new file mode 100644 index 0000000000..b5b89f39c6 --- /dev/null +++ b/tools/unit-test-app/configs/default_2_c2 @@ -0,0 +1,3 @@ +# This config is split between targets since different component needs to be included +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=app_trace bootloader_support console efuse esp_common esp_eth esp_event esp_hid esp_http_client esp_http_server esp_netif esp_phy esp_ringbuf esp_rom esp_wifi espcoredump hal lwip mbedtls mdns mqtt newlib nvs_flash partition_table protocomm sdmmc spiffs diff --git a/tools/unit-test-app/configs/default_3_c2 b/tools/unit-test-app/configs/default_3_c2 new file mode 100644 index 0000000000..af8e5fbf11 --- /dev/null +++ b/tools/unit-test-app/configs/default_3_c2 @@ -0,0 +1,3 @@ +# This config is split between targets since different component needs to be included +CONFIG_IDF_TARGET="esp32c2" +TEST_EXCLUDE_COMPONENTS=app_trace bootloader_support console efuse esp_common esp_eth esp_event esp_hid esp_http_client esp_http_server esp_netif esp_phy esp_ringbuf esp_rom esp_wifi espcoredump hal lwip mbedtls mdns mqtt newlib nvs_flash partition_table protocomm sdmmc spiffs freertos esp_hw_support esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs diff --git a/tools/unit-test-app/configs/default_c2 b/tools/unit-test-app/configs/default_c2 new file mode 100644 index 0000000000..d99387e17e --- /dev/null +++ b/tools/unit-test-app/configs/default_c2 @@ -0,0 +1,3 @@ +# This config is split between targets since different component needs to be included +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=freertos esp_hw_support esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs diff --git a/tools/unit-test-app/configs/freertos_compliance_c2 b/tools/unit-test-app/configs/freertos_compliance_c2 new file mode 100644 index 0000000000..f7db24d8b6 --- /dev/null +++ b/tools/unit-test-app/configs/freertos_compliance_c2 @@ -0,0 +1,4 @@ +# This config is split between targets since different component needs to be included (esp32, esp32s2) +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=driver esp_hw_support esp_system esp_timer spi_flash +CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE=y diff --git a/tools/unit-test-app/configs/freertos_options_c2 b/tools/unit-test-app/configs/freertos_options_c2 new file mode 100644 index 0000000000..53b3026581 --- /dev/null +++ b/tools/unit-test-app/configs/freertos_options_c2 @@ -0,0 +1,22 @@ +# This is a small set of tests where we enable as many as possible of the optional features +# in FreeRTOS that are gated behind config + +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=freertos + +CONFIG_FREERTOS_CORETIMER_1=y +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=n +CONFIG_FREERTOS_HZ=500 +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=n +CONFIG_FREERTOS_LEGACY_HOOKS=y +CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y +CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=10 +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y +CONFIG_FREERTOS_FPU_IN_ISR=y diff --git a/tools/unit-test-app/configs/heap_light_poison_c2 b/tools/unit-test-app/configs/heap_light_poison_c2 new file mode 100644 index 0000000000..1c165b4765 --- /dev/null +++ b/tools/unit-test-app/configs/heap_light_poison_c2 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=heap +CONFIG_HEAP_POISONING_COMPREHENSIVE=n +CONFIG_HEAP_POISONING_LIGHT=y diff --git a/tools/unit-test-app/configs/no_optimization_c2 b/tools/unit-test-app/configs/no_optimization_c2 new file mode 100644 index 0000000000..c0d62b770c --- /dev/null +++ b/tools/unit-test-app/configs/no_optimization_c2 @@ -0,0 +1,3 @@ +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=esp_ipc spi_flash +CONFIG_COMPILER_OPTIMIZATION_NONE=y diff --git a/tools/unit-test-app/configs/pm_c2 b/tools/unit-test-app/configs/pm_c2 new file mode 100644 index 0000000000..47444a0932 --- /dev/null +++ b/tools/unit-test-app/configs/pm_c2 @@ -0,0 +1,4 @@ +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=esp_pm +CONFIG_PM_ENABLE=y +CONFIG_FREERTOS_USE_TICKLESS_IDLE=y diff --git a/tools/unit-test-app/configs/release_c2 b/tools/unit-test-app/configs/release_c2 new file mode 100644 index 0000000000..820ad4f26e --- /dev/null +++ b/tools/unit-test-app/configs/release_c2 @@ -0,0 +1,5 @@ +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=freertos esp_hw_support esp_system esp_ipc esp_timer driver heap pthread soc spi_flash vfs sdmmc +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y diff --git a/tools/unit-test-app/configs/rom_options_c2 b/tools/unit-test-app/configs/rom_options_c2 new file mode 100644 index 0000000000..6f1d16870c --- /dev/null +++ b/tools/unit-test-app/configs/rom_options_c2 @@ -0,0 +1,3 @@ +CONFIG_IDF_TARGET="esp32c2" +TEST_COMPONENTS=spi_flash +CONFIG_SPI_FLASH_ROM_IMPL=y diff --git a/tools/unit-test-app/partition_table_unit_test_two_ota_2m.csv b/tools/unit-test-app/partition_table_unit_test_two_ota_2m.csv new file mode 100644 index 0000000000..9c097b4fad --- /dev/null +++ b/tools/unit-test-app/partition_table_unit_test_two_ota_2m.csv @@ -0,0 +1,11 @@ +# Special partition table for unit test app_update +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, , 0x4000 +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000 +factory, 0, 0, , 0x70000 +ota_0, 0, ota_0, , 0x70000 +ota_1, 0, ota_1, , 0x70000 +test, 0, test, , 0x70000 +# flash_test partition used for SPI flash tests, WL FAT tests, and SPIFFS tests +flash_test, data, fat, , 128K diff --git a/tools/unit-test-app/tools/ConfigDependency.yml b/tools/unit-test-app/tools/ConfigDependency.yml index 70961bbdd8..403ca4ad53 100644 --- a/tools/unit-test-app/tools/ConfigDependency.yml +++ b/tools/unit-test-app/tools/ConfigDependency.yml @@ -3,6 +3,7 @@ "ESP32_IDF": "CONFIG_IDF_TARGET_ESP32=y" "ESP32S2_IDF": "CONFIG_IDF_TARGET_ESP32S2=y" "ESP32S3_IDF": "CONFIG_IDF_TARGET_ESP32S3=y" +"ESP32C2_IDF": "CONFIG_IDF_TARGET_ESP32C2=y" "ESP32C3_IDF": "CONFIG_IDF_TARGET_ESP32C3=y" "quad_psram": '{CONFIG_SPIRAM_MODE_QUAD=y} and {CONFIG_IDF_TARGET_ESP32S3=y}' "octal_psram": '{CONFIG_SPIRAM_MODE_OCT=y} and {CONFIG_IDF_TARGET_ESP32S3=y}'