From 9fa06719faa9d9b2d5e1f2bfb3acecb26b8c9437 Mon Sep 17 00:00:00 2001 From: morris Date: Thu, 20 Aug 2020 12:22:36 +0800 Subject: [PATCH] global: enable build uinit test for esp32-s3 --- components/driver/test/adc_dma_test/test_esp32.c | 2 +- components/driver/test/adc_dma_test/test_esp32s2.c | 2 +- components/driver/test/dac_dma_test/test_esp32.c | 2 +- components/driver/test/dac_dma_test/test_esp32s2.c | 2 +- components/driver/test/test_adc2_with_wifi.c | 4 ++++ components/driver/test/test_adc_common.c | 6 +++++- components/driver/test/test_common_spi.c | 6 +++++- components/driver/test/test_dac.c | 3 +++ components/driver/test/test_gpio.c | 4 ++++ components/driver/test/test_i2c.c | 3 +++ components/driver/test/test_i2s.c | 4 ++++ components/driver/test/test_ledc.c | 4 ++++ components/driver/test/test_pcnt.c | 6 +++++- components/driver/test/test_pwm.c | 6 +++++- components/driver/test/test_rmt.c | 4 ++++ components/driver/test/test_rs485.c | 6 +++++- components/driver/test/test_rtcio.c | 6 +++++- components/driver/test/test_sdio.c | 6 +++++- components/driver/test/test_sigmadelta.c | 4 ++++ components/driver/test/test_spi_bus_lock.c | 3 +++ components/driver/test/test_spi_master.c | 3 +++ components/driver/test/test_spi_param.c | 4 ++++ components/driver/test/test_spi_sio.c | 3 +++ components/driver/test/test_spi_slave.c | 4 ++++ components/driver/test/test_spi_slave_hd.c | 5 ++++- components/driver/test/test_timer.c | 4 ++++ components/driver/test/test_uart.c | 4 ++++ components/driver/test/touch_sensor_test/test_esp32.c | 2 +- components/driver/test/touch_sensor_test/test_esp32s2.c | 2 +- components/efuse/test/test_efuse.c | 4 ++++ components/esp_eth/test/test_emac.c | 4 +++- components/newlib/test/test_time.c | 8 +++++++- components/soc/test/test_rtc_clk.c | 2 +- components/ulp/test/CMakeLists.txt | 3 +++ components/wear_levelling/test/test_wl.c | 6 ++++-- docs/en/api-guides/tools/idf-tools-notes.inc | 5 +++++ docs/zh_CN/api-guides/tools/idf-tools-notes.inc | 5 +++++ .../test/test_cxx_exceptions.cpp | 2 +- .../experimental_cpp_component/test/test_i2c.cpp | 3 +-- tools/ci/config/build.yml | 5 +++++ tools/ci/config/target-test.yml | 2 +- tools/ci/python_packages/ttfw_idf/CIScanTests.py | 4 +++- tools/ci/python_packages/ttfw_idf/IDFAssignTest.py | 4 +++- tools/find_build_apps/cmake.py | 2 ++ tools/idf_size.py | 4 ++++ .../components/test_utils/test/ccomp_timer_test_data.c | 4 +++- .../components/test_utils/test/ccomp_timer_test_inst.c | 2 +- tools/unit-test-app/sdkconfig.defaults.esp32s3 | 1 + 48 files changed, 157 insertions(+), 27 deletions(-) create mode 100644 tools/unit-test-app/sdkconfig.defaults.esp32s3 diff --git a/components/driver/test/adc_dma_test/test_esp32.c b/components/driver/test/adc_dma_test/test_esp32.c index 134bbe1785..27bf9183af 100644 --- a/components/driver/test/adc_dma_test/test_esp32.c +++ b/components/driver/test/adc_dma_test/test_esp32.c @@ -29,7 +29,7 @@ #include "test_utils.h" #include "esp_rom_sys.h" -#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2) // This testcase for ESP32 +#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2, ESP32S3) // This testcase for ESP32 /* * ADC DMA testcase diff --git a/components/driver/test/adc_dma_test/test_esp32s2.c b/components/driver/test/adc_dma_test/test_esp32s2.c index e875c1bfe5..c04b728e6c 100644 --- a/components/driver/test/adc_dma_test/test_esp32s2.c +++ b/components/driver/test/adc_dma_test/test_esp32s2.c @@ -36,7 +36,7 @@ #include "test/test_common_adc.h" #include "esp_rom_sys.h" -#if !DISABLED_FOR_TARGETS(ESP8266, ESP32) // This testcase for ESP32S2 +#if !DISABLED_FOR_TARGETS(ESP8266, ESP32, ESP32S3) // This testcase for ESP32S2 #include "soc/system_reg.h" #include "soc/lldesc.h" diff --git a/components/driver/test/dac_dma_test/test_esp32.c b/components/driver/test/dac_dma_test/test_esp32.c index f4fd57af70..7a02da9281 100644 --- a/components/driver/test/dac_dma_test/test_esp32.c +++ b/components/driver/test/dac_dma_test/test_esp32.c @@ -31,7 +31,7 @@ #include "test_dac_audio_file.h" #include "driver/i2s.h" -#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2) // This testcase for ESP32 +#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2, ESP32S3) // This testcase for ESP32 /* * DAC DMA config. diff --git a/components/driver/test/dac_dma_test/test_esp32s2.c b/components/driver/test/dac_dma_test/test_esp32s2.c index 02fcbbcf47..7b84a32fef 100644 --- a/components/driver/test/dac_dma_test/test_esp32s2.c +++ b/components/driver/test/dac_dma_test/test_esp32s2.c @@ -37,7 +37,7 @@ #include "soc/dac_periph.h" #include "test/test_common_adc.h" -#if !DISABLED_FOR_TARGETS(ESP8266, ESP32) // This testcase for ESP32S2 +#if !DISABLED_FOR_TARGETS(ESP8266, ESP32, ESP32S3) // This testcase for ESP32S2 #include "soc/system_reg.h" #include "esp32s2/rom/lldesc.h" diff --git a/components/driver/test/test_adc2_with_wifi.c b/components/driver/test/test_adc2_with_wifi.c index 080d05eef4..1b709665b2 100644 --- a/components/driver/test/test_adc2_with_wifi.c +++ b/components/driver/test/test_adc2_with_wifi.c @@ -12,6 +12,8 @@ #include "nvs_flash.h" #include "test_utils.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + static const char* TAG = "test_adc2"; #ifdef CONFIG_IDF_TARGET_ESP32 @@ -165,3 +167,5 @@ TEST_CASE("adc2 work with wifi","[adc]") TEST_IGNORE_MESSAGE("this test case is ignored due to the critical memory leak of esp_netif and event_loop."); } + +#endif diff --git a/components/driver/test/test_adc_common.c b/components/driver/test/test_adc_common.c index 2b7929f553..c269a466e9 100644 --- a/components/driver/test/test_adc_common.c +++ b/components/driver/test/test_adc_common.c @@ -15,6 +15,8 @@ #include "test_utils.h" #include "soc/adc_periph.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + static const char *TAG = "test_adc"; #ifdef CONFIG_IDF_TARGET_ESP32 @@ -382,4 +384,6 @@ void test_adc_slope_debug(void) vTaskDelay(SCOPE_DEBUG_FREQ_MS / portTICK_RATE_MS); } #endif -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/components/driver/test/test_common_spi.c b/components/driver/test/test_common_spi.c index 59bfc49e3e..07ca8c7584 100644 --- a/components/driver/test/test_common_spi.c +++ b/components/driver/test/test_common_spi.c @@ -3,6 +3,8 @@ #include "esp_log.h" #include "driver/gpio.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + int test_freq_default[]=TEST_FREQ_DEFAULT(); const char MASTER_TAG[] = "test_master"; @@ -204,4 +206,6 @@ void spitest_gpio_output_sel(uint32_t gpio_num, int func, uint32_t signal_idx) { PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio_num], func); GPIO.func_out_sel_cfg[gpio_num].func_sel=signal_idx; -} \ No newline at end of file +} + +#endif diff --git a/components/driver/test/test_dac.c b/components/driver/test/test_dac.c index e3ab9cf521..755e5490f6 100644 --- a/components/driver/test/test_dac.c +++ b/components/driver/test/test_dac.c @@ -14,6 +14,7 @@ #include "test_utils.h" #include "driver/i2s.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) #include "esp_adc_cal.h" static const char *TAG = "test_dac"; @@ -180,3 +181,5 @@ TEST_CASE("esp32s2 adc2-dac with adc2 calibration", "[adc-dac]") subtest_adc_dac(2500, &chars); } #endif + +#endif diff --git a/components/driver/test/test_gpio.c b/components/driver/test/test_gpio.c index e7cc42a67b..b12790c26d 100644 --- a/components/driver/test/test_gpio.c +++ b/components/driver/test/test_gpio.c @@ -16,6 +16,8 @@ #include "esp_rom_uart.h" #include "esp_rom_sys.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + #define WAKE_UP_IGNORE 1 // gpio_wakeup function development is not completed yet, set it deprecated. #if CONFIG_IDF_TARGET_ESP32 @@ -770,3 +772,5 @@ TEST_CASE("GPIO ISR service test", "[gpio][ignore]") gpio_uninstall_isr_service(); TEST_ASSERT((io18_param.isr_cnt == 1) && (io19_param.isr_cnt == 1)); } + +#endif diff --git a/components/driver/test/test_i2c.c b/components/driver/test/test_i2c.c index 6548b30e46..d1dcc1567d 100644 --- a/components/driver/test/test_i2c.c +++ b/components/driver/test/test_i2c.c @@ -19,6 +19,7 @@ #include "driver/periph_ctrl.h" #include "esp_rom_gpio.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) #define DATA_LENGTH 512 /*! (b)? (b): (a)) #endif @@ -1164,3 +1166,5 @@ spitest_param_set_t mode_conf[] = { TEST_SPI_MASTER_SLAVE(MODE, mode_conf, "") #endif + +#endif diff --git a/components/driver/test/test_spi_sio.c b/components/driver/test/test_spi_sio.c index 6a3196a044..9146b417e8 100644 --- a/components/driver/test/test_spi_sio.c +++ b/components/driver/test/test_spi_sio.c @@ -25,6 +25,7 @@ #include "hal/spi_ll.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) /******************************************************************************** * Test SIO @@ -221,3 +222,5 @@ void test_sio_slave(void) TEST_CASE_MULTIPLE_DEVICES("sio mode", "[spi][test_env=Example_SPI_Multi_device]", test_sio_master, test_sio_slave); #endif + +#endif diff --git a/components/driver/test/test_spi_slave.c b/components/driver/test/test_spi_slave.c index d1c448b6a9..925b7f0a8e 100644 --- a/components/driver/test/test_spi_slave.c +++ b/components/driver/test/test_spi_slave.c @@ -12,6 +12,8 @@ #include "test/test_common_spi.h" #include "esp_rom_gpio.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + #ifndef CONFIG_SPIRAM //This test should be removed once the timing test is merged. @@ -142,3 +144,5 @@ TEST_CASE("test slave send unaligned","[spi]") } #endif // !CONFIG_SPIRAM + +#endif \ No newline at end of file diff --git a/components/driver/test/test_spi_slave_hd.c b/components/driver/test/test_spi_slave_hd.c index 95caf676ae..e978841e4c 100644 --- a/components/driver/test/test_spi_slave_hd.c +++ b/components/driver/test/test_spi_slave_hd.c @@ -17,6 +17,7 @@ #include "unity.h" #include "test/test_common_spi.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) #define TEST_DMA_MAX_SIZE 14000 #define TEST_BUFFER_SIZE 256 ///< buffer size of each wrdma buffer in fifo mode @@ -573,4 +574,6 @@ TEST_CASE("test spi slave hd continuous mode, master too long", "[spi][spi_slv_h master_free_device_bus(spi); } -#endif //SOC_SPI_SUPPORT_SLAVE_HD_VER2 \ No newline at end of file +#endif //SOC_SPI_SUPPORT_SLAVE_HD_VER2 + +#endif diff --git a/components/driver/test/test_timer.c b/components/driver/test/test_timer.c index 1445314d38..9a58eed1dd 100644 --- a/components/driver/test/test_timer.c +++ b/components/driver/test/test_timer.c @@ -9,6 +9,8 @@ #include "soc/rtc.h" #include "esp_rom_sys.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + #define TIMER_DIVIDER 16 #define TIMER_SCALE (TIMER_BASE_CLK / TIMER_DIVIDER) /*!< used to calculate counter value */ #define TIMER_DELTA 0.001 @@ -973,3 +975,5 @@ TEST_CASE_MULTIPLE_STAGES("timer_group software reset test", "[intr_status][intr_status = 0]", timer_group_test_first_stage, timer_group_test_second_stage); + +#endif diff --git a/components/driver/test/test_uart.c b/components/driver/test/test_uart.c index 7f1c285e0b..d86c3cb581 100644 --- a/components/driver/test/test_uart.c +++ b/components/driver/test/test_uart.c @@ -6,6 +6,8 @@ #include "esp_log.h" #include "esp_system.h" // for uint32_t esp_random() +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + #define UART_TAG "Uart" #define UART_NUM1 (UART_NUM_1) #define BUF_SIZE (100) @@ -312,3 +314,5 @@ TEST_CASE("uart tx with ringbuffer test", "[uart]") free(rd_data); free(wr_data); } + +#endif diff --git a/components/driver/test/touch_sensor_test/test_esp32.c b/components/driver/test/touch_sensor_test/test_esp32.c index 6ad6902119..c5fa040196 100644 --- a/components/driver/test/touch_sensor_test/test_esp32.c +++ b/components/driver/test/touch_sensor_test/test_esp32.c @@ -34,7 +34,7 @@ #include "soc/rtc_io_struct.h" #include "esp_rom_sys.h" -#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2) // This testcase for ESP32 +#if !DISABLED_FOR_TARGETS(ESP8266, ESP32S2, ESP32S3) // This testcase for ESP32 static const char *TAG = "test_touch"; diff --git a/components/driver/test/touch_sensor_test/test_esp32s2.c b/components/driver/test/touch_sensor_test/test_esp32s2.c index c0ce93209f..0191538fac 100644 --- a/components/driver/test/touch_sensor_test/test_esp32s2.c +++ b/components/driver/test/touch_sensor_test/test_esp32s2.c @@ -38,7 +38,7 @@ #include "driver/rtc_io.h" #include "esp_rom_sys.h" -#if !DISABLED_FOR_TARGETS(ESP8266, ESP32) // This testcase for ESP32S2 +#if !DISABLED_FOR_TARGETS(ESP8266, ESP32, ESP32S3) // This testcase for ESP32S2 static const char *TAG = "test_touch"; diff --git a/components/efuse/test/test_efuse.c b/components/efuse/test/test_efuse.c index 1c06370c6a..f5e02c8a29 100644 --- a/components/efuse/test/test_efuse.c +++ b/components/efuse/test/test_efuse.c @@ -19,6 +19,8 @@ #include "esp_rom_efuse.h" #include "bootloader_common.h" +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) + static const char* TAG = "efuse_test"; static void test_read_blob(void) @@ -858,3 +860,5 @@ TEST_CASE("Test chip_revision APIs return the same value", "[efuse]") esp_efuse_utility_update_virt_blocks(); TEST_ASSERT_EQUAL_INT(esp_efuse_get_chip_ver(), bootloader_common_get_chip_revision()); } + +#endif // #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3) diff --git a/components/esp_eth/test/test_emac.c b/components/esp_eth/test/test_emac.c index d6fd28bfa9..e05fdb771d 100644 --- a/components/esp_eth/test/test_emac.c +++ b/components/esp_eth/test/test_emac.c @@ -35,6 +35,8 @@ static const char *TAG = "esp32_eth_test"; #define ETH_PING_DURATION_MS (5000) #define ETH_PING_END_TIMEOUT_MS (ETH_PING_DURATION_MS * 2) +#define TEST_ICMP_DESTINATION_DOMAIN_NAME "127.0.0.1" + // compute md5 of download file static md5_context_t md5_context; static uint8_t digest[16]; @@ -343,7 +345,7 @@ TEST_CASE("esp32 ethernet icmp test", "[ethernet][test_env=UT_T2_Ethernet]") memset(&hint, 0, sizeof(hint)); memset(&target_addr, 0, sizeof(target_addr)); /* convert URL to IP */ - TEST_ASSERT(getaddrinfo("www.espressif.com", NULL, &hint, &res) == 0); + TEST_ASSERT(getaddrinfo(TEST_ICMP_DESTINATION_DOMAIN_NAME, NULL, &hint, &res) == 0); struct in_addr addr4 = ((struct sockaddr_in *)(res->ai_addr))->sin_addr; inet_addr_to_ip4addr(ip_2_ip4(&target_addr), &addr4); freeaddrinfo(res); diff --git a/components/newlib/test/test_time.c b/components/newlib/test/test_time.c index d5aa58c097..995a90c329 100644 --- a/components/newlib/test/test_time.c +++ b/components/newlib/test/test_time.c @@ -9,6 +9,7 @@ #include "freertos/semphr.h" #include "sdkconfig.h" #include "soc/rtc.h" +#include "soc/rtc_cntl_reg.h" #include "esp_system.h" #include "test_utils.h" #include "esp_log.h" @@ -17,8 +18,13 @@ #if CONFIG_IDF_TARGET_ESP32 #include "esp32/clk.h" +#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ #elif CONFIG_IDF_TARGET_ESP32S2 #include "esp32s2/clk.h" +#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ +#elif CONFIG_IDF_TARGET_ESP32S3 +#include "esp32s3/clk.h" +#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ #endif #if portNUM_PROCESSORS == 2 @@ -32,7 +38,7 @@ TEST_CASE("Reading RTC registers on APP CPU doesn't affect clock", "[newlib]") for (int i = 0; i < 200000; ++i) { // wait for 20us, reading one of RTC registers uint32_t ccount = xthal_get_ccount(); - while (xthal_get_ccount() - ccount < 20 * CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ) { + while (xthal_get_ccount() - ccount < 20 * TARGET_DEFAULT_CPU_FREQ_MHZ) { volatile uint32_t val = REG_READ(RTC_CNTL_STATE0_REG); (void) val; } diff --git a/components/soc/test/test_rtc_clk.c b/components/soc/test/test_rtc_clk.c index 0b45c1a9de..b763d51943 100644 --- a/components/soc/test/test_rtc_clk.c +++ b/components/soc/test/test_rtc_clk.c @@ -17,7 +17,7 @@ extern void rtc_clk_select_rtc_slow_clk(void); -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2) +#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3) #include "esp32/clk.h" diff --git a/components/ulp/test/CMakeLists.txt b/components/ulp/test/CMakeLists.txt index b71796927d..d800757fd2 100644 --- a/components/ulp/test/CMakeLists.txt +++ b/components/ulp/test/CMakeLists.txt @@ -1,3 +1,6 @@ +if(IDF_TARGET STREQUAL "esp32s3") + return() +endif() idf_component_register(SRC_DIRS ${IDF_TARGET} PRIV_INCLUDE_DIRS . PRIV_REQUIRES cmock ulp soc esp_common) diff --git a/components/wear_levelling/test/test_wl.c b/components/wear_levelling/test/test_wl.c index 93a45083d4..19537316a6 100644 --- a/components/wear_levelling/test/test_wl.c +++ b/components/wear_levelling/test/test_wl.c @@ -7,10 +7,12 @@ #include "freertos/portable.h" #include "freertos/task.h" #include "freertos/semphr.h" -#ifdef CONFIG_IDF_TARGET_ESP32 +#if CONFIG_IDF_TARGET_ESP32 #include "esp32/clk.h" -#elif defined(CONFIG_IDF_TARGET_ESP32S2) +#elif CONFIG_IDF_TARGET_ESP32S2 #include "esp32s2/clk.h" +#elif CONFIG_IDF_TARGET_ESP32S3 +#include "esp32s3/clk.h" #endif #include "soc/cpu.h" #include "esp_rom_sys.h" diff --git a/docs/en/api-guides/tools/idf-tools-notes.inc b/docs/en/api-guides/tools/idf-tools-notes.inc index 7600e28c09..41ca6e01d4 100644 --- a/docs/en/api-guides/tools/idf-tools-notes.inc +++ b/docs/en/api-guides/tools/idf-tools-notes.inc @@ -10,6 +10,11 @@ .. tool-xtensa-esp32s2-elf-notes +--- + +.. tool-xtensa-esp32s3-elf-notes + + --- .. tool-esp32ulp-elf-notes diff --git a/docs/zh_CN/api-guides/tools/idf-tools-notes.inc b/docs/zh_CN/api-guides/tools/idf-tools-notes.inc index ba5bdc43de..3e22db2113 100644 --- a/docs/zh_CN/api-guides/tools/idf-tools-notes.inc +++ b/docs/zh_CN/api-guides/tools/idf-tools-notes.inc @@ -12,6 +12,11 @@ .. tool-xtensa-esp32s2-elf-notes +--- + +.. tool-xtensa-esp32s3-elf-notes + + --- .. tool-esp32ulp-elf-notes diff --git a/examples/cxx/experimental/experimental_cpp_component/test/test_cxx_exceptions.cpp b/examples/cxx/experimental/experimental_cpp_component/test/test_cxx_exceptions.cpp index e5b55ab857..c4e16cd27e 100644 --- a/examples/cxx/experimental/experimental_cpp_component/test/test_cxx_exceptions.cpp +++ b/examples/cxx/experimental/experimental_cpp_component/test/test_cxx_exceptions.cpp @@ -13,7 +13,7 @@ using namespace idf; #if CONFIG_IDF_TARGET_ESP32 #define LEAKS "300" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 #define LEAKS "800" #else #error "unknown target in CXX tests, can't set leaks threshold" diff --git a/examples/cxx/experimental/experimental_cpp_component/test/test_i2c.cpp b/examples/cxx/experimental/experimental_cpp_component/test/test_i2c.cpp index 4ce9f14a2e..fb6218575a 100644 --- a/examples/cxx/experimental/experimental_cpp_component/test/test_i2c.cpp +++ b/examples/cxx/experimental/experimental_cpp_component/test/test_i2c.cpp @@ -20,9 +20,8 @@ #include #include "test_utils.h" // unity_send_signal -#include "i2c_cxx.hpp" - #ifdef __cpp_exceptions +#include "i2c_cxx.hpp" using namespace std; using namespace idf; diff --git a/tools/ci/config/build.yml b/tools/ci/config/build.yml index edf3ca0113..88660e5f0b 100644 --- a/tools/ci/config/build.yml +++ b/tools/ci/config/build.yml @@ -83,6 +83,11 @@ build_esp_idf_tests_cmake_esp32s2: variables: IDF_TARGET: esp32s2 +build_esp_idf_tests_cmake_esp32s3: + extends: .build_esp_idf_tests_cmake + variables: + IDF_TARGET: esp32s3 + .build_examples_template: extends: .build_template artifacts: diff --git a/tools/ci/config/target-test.yml b/tools/ci/config/target-test.yml index 1c9c944696..8737fb0be4 100644 --- a/tools/ci/config/target-test.yml +++ b/tools/ci/config/target-test.yml @@ -432,7 +432,7 @@ UT_001: UT_002: extends: .unit_test_template - parallel: 12 + parallel: 13 tags: - ESP32_IDF - UT_T1_1 diff --git a/tools/ci/python_packages/ttfw_idf/CIScanTests.py b/tools/ci/python_packages/ttfw_idf/CIScanTests.py index 11af6fe864..250841636b 100644 --- a/tools/ci/python_packages/ttfw_idf/CIScanTests.py +++ b/tools/ci/python_packages/ttfw_idf/CIScanTests.py @@ -8,7 +8,7 @@ from collections import defaultdict from find_apps import find_apps from find_build_apps import BUILD_SYSTEMS, BUILD_SYSTEM_CMAKE from ttfw_idf.IDFAssignTest import ExampleAssignTest, TestAppsAssignTest -from idf_py_actions.constants import SUPPORTED_TARGETS +from idf_py_actions.constants import SUPPORTED_TARGETS, PREVIEW_TARGETS TEST_LABELS = { 'example_test': 'BOT_LABEL_EXAMPLE_TEST', @@ -90,6 +90,8 @@ def main(): if e.errno != errno.EEXIST: raise e + SUPPORTED_TARGETS.extend(PREVIEW_TARGETS) + if (not build_standalone_apps) and (not build_test_case_apps): for target in SUPPORTED_TARGETS: output_json([], target, args.build_system, args.output_path) diff --git a/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py b/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py index 200d3618ad..75c581c1e8 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py +++ b/tools/ci/python_packages/ttfw_idf/IDFAssignTest.py @@ -17,7 +17,7 @@ except ImportError: import gitlab_api from tiny_test_fw.Utility import CIAssignTest -from idf_py_actions.constants import SUPPORTED_TARGETS +from idf_py_actions.constants import SUPPORTED_TARGETS, PREVIEW_TARGETS IDF_PATH_FROM_ENV = os.getenv('IDF_PATH') @@ -311,6 +311,8 @@ if __name__ == '__main__': parser.add_argument('--test-case-file-pattern', help='file name pattern used to find Python test case files') args = parser.parse_args() + SUPPORTED_TARGETS.extend(PREVIEW_TARGETS) + test_case_paths = [os.path.join(IDF_PATH_FROM_ENV, path) if not os.path.isabs(path) else path for path in args.test_case_paths] args_list = [test_case_paths, args.config] if args.case_group == 'example_test': diff --git a/tools/find_build_apps/cmake.py b/tools/find_build_apps/cmake.py index 27ed361bb0..5d3b65d67f 100644 --- a/tools/find_build_apps/cmake.py +++ b/tools/find_build_apps/cmake.py @@ -19,6 +19,7 @@ SUPPORTED_TARGETS_REGEX = re.compile(r'Supported [Tt]argets((?:[\s|]+(?:ESP[0-9A FORMAL_TO_USUAL = { 'ESP32': 'esp32', 'ESP32-S2': 'esp32s2', + 'ESP32-S3': 'esp32s3', } @@ -99,6 +100,7 @@ class CMakeBuildSystem(BuildSystem): formal_to_usual = { 'ESP32': 'esp32', 'ESP32-S2': 'esp32s2', + 'ESP32-S3': 'esp32s3', } readme_file_content = BuildSystem._read_readme(app_path) diff --git a/tools/idf_size.py b/tools/idf_size.py index 7bd84bace4..a4fc173a60 100755 --- a/tools/idf_size.py +++ b/tools/idf_size.py @@ -124,6 +124,10 @@ class MemRegions(object): # MemRegDef(0x3FFF8000, 0x4000, MemRegions.DIRAM_ID, 0x40068000), # MemRegDef(0x3FFFC000, 0x4000, MemRegions.DIRAM_ID, 0x4006C000), ]) + elif target == 'esp32s3': + return sorted([ + MemRegDef(0x3FC88000, 0x8000 + 6 * 0x10000, MemRegions.DIRAM_ID, 0x40378000), + ]) else: return None 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 e1f620fabc..8009a4606d 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 @@ -14,6 +14,8 @@ #include "esp32/clk.h" #elif CONFIG_IDF_TARGET_ESP32S2 #include "esp32s2/clk.h" +#elif CONFIG_IDF_TARTGET_ESP32S3 +#include "esp32s3/clk.h" #endif #include "unity.h" @@ -28,7 +30,7 @@ static const char* TAG = "test_ccomp_timer"; #define CACHE_SIZE (1 << 15) // Only test half due to lack of memory #define TEST_SIZE (CACHE_SIZE / 2) -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 // Default cache configuration - no override specified on // test_utils config #define CACHE_WAYS 8 diff --git a/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_inst.c b/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_inst.c index bd26f057e7..0797730de2 100644 --- a/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_inst.c +++ b/tools/unit-test-app/components/test_utils/test/ccomp_timer_test_inst.c @@ -17,7 +17,7 @@ #define CACHE_LINE_SIZE 32 #define CACHE_SIZE (1 << 15) // Only test half due to lack of memory -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 // Default cache configuration - no override specified on // test_utils config #define CACHE_WAYS 8 diff --git a/tools/unit-test-app/sdkconfig.defaults.esp32s3 b/tools/unit-test-app/sdkconfig.defaults.esp32s3 new file mode 100644 index 0000000000..117349c012 --- /dev/null +++ b/tools/unit-test-app/sdkconfig.defaults.esp32s3 @@ -0,0 +1 @@ +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y