global: enable build uinit test for esp32-s3

This commit is contained in:
morris 2020-08-20 12:22:36 +08:00
parent bff0016eb8
commit 9fa06719fa
48 changed files with 157 additions and 27 deletions

View File

@ -29,7 +29,7 @@
#include "test_utils.h" #include "test_utils.h"
#include "esp_rom_sys.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 * ADC DMA testcase

View File

@ -36,7 +36,7 @@
#include "test/test_common_adc.h" #include "test/test_common_adc.h"
#include "esp_rom_sys.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/system_reg.h"
#include "soc/lldesc.h" #include "soc/lldesc.h"

View File

@ -31,7 +31,7 @@
#include "test_dac_audio_file.h" #include "test_dac_audio_file.h"
#include "driver/i2s.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. * DAC DMA config.

View File

@ -37,7 +37,7 @@
#include "soc/dac_periph.h" #include "soc/dac_periph.h"
#include "test/test_common_adc.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 "soc/system_reg.h"
#include "esp32s2/rom/lldesc.h" #include "esp32s2/rom/lldesc.h"

View File

@ -12,6 +12,8 @@
#include "nvs_flash.h" #include "nvs_flash.h"
#include "test_utils.h" #include "test_utils.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
static const char* TAG = "test_adc2"; static const char* TAG = "test_adc2";
#ifdef CONFIG_IDF_TARGET_ESP32 #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."); TEST_IGNORE_MESSAGE("this test case is ignored due to the critical memory leak of esp_netif and event_loop.");
} }
#endif

View File

@ -15,6 +15,8 @@
#include "test_utils.h" #include "test_utils.h"
#include "soc/adc_periph.h" #include "soc/adc_periph.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
static const char *TAG = "test_adc"; static const char *TAG = "test_adc";
#ifdef CONFIG_IDF_TARGET_ESP32 #ifdef CONFIG_IDF_TARGET_ESP32
@ -382,4 +384,6 @@ void test_adc_slope_debug(void)
vTaskDelay(SCOPE_DEBUG_FREQ_MS / portTICK_RATE_MS); vTaskDelay(SCOPE_DEBUG_FREQ_MS / portTICK_RATE_MS);
} }
#endif #endif
} }
#endif

View File

@ -3,6 +3,8 @@
#include "esp_log.h" #include "esp_log.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
int test_freq_default[]=TEST_FREQ_DEFAULT(); int test_freq_default[]=TEST_FREQ_DEFAULT();
const char MASTER_TAG[] = "test_master"; 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); PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio_num], func);
GPIO.func_out_sel_cfg[gpio_num].func_sel=signal_idx; GPIO.func_out_sel_cfg[gpio_num].func_sel=signal_idx;
} }
#endif

View File

@ -14,6 +14,7 @@
#include "test_utils.h" #include "test_utils.h"
#include "driver/i2s.h" #include "driver/i2s.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#include "esp_adc_cal.h" #include "esp_adc_cal.h"
static const char *TAG = "test_dac"; 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); subtest_adc_dac(2500, &chars);
} }
#endif #endif
#endif

View File

@ -16,6 +16,8 @@
#include "esp_rom_uart.h" #include "esp_rom_uart.h"
#include "esp_rom_sys.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. #define WAKE_UP_IGNORE 1 // gpio_wakeup function development is not completed yet, set it deprecated.
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
@ -770,3 +772,5 @@ TEST_CASE("GPIO ISR service test", "[gpio][ignore]")
gpio_uninstall_isr_service(); gpio_uninstall_isr_service();
TEST_ASSERT((io18_param.isr_cnt == 1) && (io19_param.isr_cnt == 1)); TEST_ASSERT((io18_param.isr_cnt == 1) && (io19_param.isr_cnt == 1));
} }
#endif

View File

@ -19,6 +19,7 @@
#include "driver/periph_ctrl.h" #include "driver/periph_ctrl.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define DATA_LENGTH 512 /*!<Data buffer length for test buffer*/ #define DATA_LENGTH 512 /*!<Data buffer length for test buffer*/
#define RW_TEST_LENGTH 129 /*!<Data length for r/w test, any value from 0-DATA_LENGTH*/ #define RW_TEST_LENGTH 129 /*!<Data length for r/w test, any value from 0-DATA_LENGTH*/
@ -686,3 +687,5 @@ TEST_CASE("I2C SCL freq test (local test)", "[i2c][ignore]")
free(data); free(data);
TEST_ESP_OK(i2c_driver_delete(i2c_num)); TEST_ESP_OK(i2c_driver_delete(i2c_num));
} }
#endif

View File

@ -15,6 +15,8 @@
#include "math.h" #include "math.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define SAMPLE_RATE (36000) #define SAMPLE_RATE (36000)
#define SAMPLE_BITS (16) #define SAMPLE_BITS (16)
#define MASTER_BCK_IO 15 #define MASTER_BCK_IO 15
@ -516,3 +518,5 @@ TEST_CASE("I2S APLL clock variation test", "[i2s]")
vTaskDelay(100 / portTICK_PERIOD_MS); vTaskDelay(100 / portTICK_PERIOD_MS);
TEST_ASSERT(initial_size == esp_get_free_heap_size()); TEST_ASSERT(initial_size == esp_get_free_heap_size());
} }
#endif

View File

@ -25,6 +25,8 @@
#include "driver/ledc.h" #include "driver/ledc.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define PULSE_IO 18 #define PULSE_IO 18
#define PCNT_INPUT_IO 4 #define PCNT_INPUT_IO 4
#define PCNT_CTRL_FLOATING_IO 5 #define PCNT_CTRL_FLOATING_IO 5
@ -543,3 +545,5 @@ TEST_CASE("LEDC memory test", "[ledc][test_env=UT_T1_LEDC]")
} }
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2) #endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
#endif

View File

@ -25,6 +25,8 @@
#include "unity.h" #include "unity.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define PULSE_IO 21 #define PULSE_IO 21
#define PCNT_INPUT_IO 4 #define PCNT_INPUT_IO 4
#define PCNT_CTRL_VCC_IO 5 #define PCNT_CTRL_VCC_IO 5
@ -669,4 +671,6 @@ TEST_CASE("PCNT counting mode test", "[pcnt]")
count_mode_test(PCNT_CTRL_VCC_IO); count_mode_test(PCNT_CTRL_VCC_IO);
printf("PCNT mode test for negative count\n"); printf("PCNT mode test for negative count\n");
count_mode_test(PCNT_CTRL_GND_IO); count_mode_test(PCNT_CTRL_GND_IO);
} }
#endif

View File

@ -25,6 +25,8 @@
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#ifdef SOC_MCPWM_SUPPORTED #ifdef SOC_MCPWM_SUPPORTED
#include "soc/mcpwm_periph.h" #include "soc/mcpwm_periph.h"
#include "driver/mcpwm.h" #include "driver/mcpwm.h"
@ -786,4 +788,6 @@ TEST_CASE("MCPWM unit1, timer2 capture test", "[mcpwm][test_env=UT_T1_MCPWM][tim
capture_test(MCPWM_UNIT_1, MCPWM_TIMER_2, MCPWM_POS_EDGE); capture_test(MCPWM_UNIT_1, MCPWM_TIMER_2, MCPWM_POS_EDGE);
} }
#endif #endif
#endif

View File

@ -12,6 +12,8 @@
#include "test_utils.h" #include "test_utils.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
// CI ONLY: Don't connect any other signals to this GPIO // CI ONLY: Don't connect any other signals to this GPIO
#define RMT_DATA_IO (12) // bind signal RMT_SIG_OUT0_IDX and RMT_SIG_IN0_IDX on the same GPIO #define RMT_DATA_IO (12) // bind signal RMT_SIG_OUT0_IDX and RMT_SIG_IN0_IDX on the same GPIO
@ -519,3 +521,5 @@ TEST_CASE("RMT TX loop", "[rmt]")
rmt_clean_testbench(tx_channel, rx_channel); rmt_clean_testbench(tx_channel, rx_channel);
} }
#endif #endif
#endif

View File

@ -9,6 +9,8 @@
#include "esp_log.h" #include "esp_log.h"
#include "esp_system.h" // for uint32_t esp_random() #include "esp_system.h" // for uint32_t esp_random()
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define UART_TAG "Uart" #define UART_TAG "Uart"
#define UART_NUM1 (UART_NUM_1) #define UART_NUM1 (UART_NUM_1)
#define BUF_SIZE (100) #define BUF_SIZE (100)
@ -283,4 +285,6 @@ static void rs485_master(void)
*/ */
TEST_CASE_MULTIPLE_DEVICES("RS485 half duplex uart multiple devices test.", "[driver_RS485][test_env=UT_T2_RS485]", rs485_master, rs485_slave); TEST_CASE_MULTIPLE_DEVICES("RS485 half duplex uart multiple devices test.", "[driver_RS485][test_env=UT_T2_RS485]", rs485_master, rs485_slave);
#endif #endif
#endif

View File

@ -16,6 +16,8 @@
#include "esp_log.h" #include "esp_log.h"
#include "soc/rtc_io_periph.h" #include "soc/rtc_io_periph.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define RTCIO_CHECK(condition) TEST_ASSERT_MESSAGE((condition == ESP_OK), "ret is not ESP_OK") #define RTCIO_CHECK(condition) TEST_ASSERT_MESSAGE((condition == ESP_OK), "ret is not ESP_OK")
#define RTCIO_VERIFY(condition, msg) TEST_ASSERT_MESSAGE((condition), msg) #define RTCIO_VERIFY(condition, msg) TEST_ASSERT_MESSAGE((condition), msg)
@ -267,4 +269,6 @@ TEST_CASE("RTCIO output hold test", "[rtcio]")
} }
} }
ESP_LOGI(TAG, "RTCIO hold test over"); ESP_LOGI(TAG, "RTCIO hold test over");
} }
#endif

View File

@ -22,6 +22,8 @@
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
#include "ccomp_timer.h" #include "ccomp_timer.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#if defined(SOC_SDMMC_HOST_SUPPORTED) && defined(SOC_SDIO_SLAVE_SUPPORTED) #if defined(SOC_SDMMC_HOST_SUPPORTED) && defined(SOC_SDIO_SLAVE_SUPPORTED)
#include "driver/sdio_slave.h" #include "driver/sdio_slave.h"
#include "driver/sdmmc_host.h" #include "driver/sdmmc_host.h"
@ -805,4 +807,6 @@ ptest_func_t tohost_slave = {
TEST_MASTER_SLAVE(SDIO_TOHOST, test_cfg_array, "[sdio][timeout=180][test_env=UT_SDIO]", &tohost_master, &tohost_slave); TEST_MASTER_SLAVE(SDIO_TOHOST, test_cfg_array, "[sdio][timeout=180][test_env=UT_SDIO]", &tohost_master, &tohost_slave);
#endif #endif
#endif

View File

@ -9,6 +9,8 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "driver/sigmadelta.h" #include "driver/sigmadelta.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
TEST_CASE("SigmaDelta config test", "[sigma_delta]") TEST_CASE("SigmaDelta config test", "[sigma_delta]")
{ {
sigmadelta_config_t sigmadelta_cfg = { sigmadelta_config_t sigmadelta_cfg = {
@ -85,3 +87,5 @@ TEST_CASE("SigmaDelta pin, duty, prescale set", "[sigma_delta][ignore]")
TEST_ESP_OK(sigmadelta_set_pin(SIGMADELTA_CHANNEL_0, 5)); TEST_ESP_OK(sigmadelta_set_pin(SIGMADELTA_CHANNEL_0, 5));
vTaskDelay(3000 / portTICK_PERIOD_MS); vTaskDelay(3000 / portTICK_PERIOD_MS);
} }
#endif

View File

@ -7,6 +7,7 @@
#include "test/test_common_spi.h" #include "test/test_common_spi.h"
#include "unity.h" #include "unity.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
// The VSPI pins on UT_T1_ESP_FLASH are connected to a external flash // The VSPI pins on UT_T1_ESP_FLASH are connected to a external flash
@ -344,4 +345,6 @@ TEST_CASE("spi master can be used on SPI1", "[spi]")
//TODO: add a case when a non-polling transaction happened in the bus-acquiring time and then release the bus then queue a new trans //TODO: add a case when a non-polling transaction happened in the bus-acquiring time and then release the bus then queue a new trans
#endif
#endif #endif

View File

@ -26,6 +26,7 @@
#include "soc/soc_memory_layout.h" #include "soc/soc_memory_layout.h"
#include "driver/spi_common_internal.h" #include "driver/spi_common_internal.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
const static char TAG[] = "test_spi"; const static char TAG[] = "test_spi";
@ -1094,3 +1095,5 @@ TEST_CASE("spi_speed","[spi]")
master_free_device_bus(spi); master_free_device_bus(spi);
} }
#endif #endif
#endif

View File

@ -6,6 +6,8 @@
#include "test/test_common_spi.h" #include "test/test_common_spi.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#ifndef MIN #ifndef MIN
#define MIN(a, b)((a) > (b)? (b): (a)) #define MIN(a, b)((a) > (b)? (b): (a))
#endif #endif
@ -1164,3 +1166,5 @@ spitest_param_set_t mode_conf[] = {
TEST_SPI_MASTER_SLAVE(MODE, mode_conf, "") TEST_SPI_MASTER_SLAVE(MODE, mode_conf, "")
#endif #endif
#endif

View File

@ -25,6 +25,7 @@
#include "hal/spi_ll.h" #include "hal/spi_ll.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
/******************************************************************************** /********************************************************************************
* Test SIO * 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); TEST_CASE_MULTIPLE_DEVICES("sio mode", "[spi][test_env=Example_SPI_Multi_device]", test_sio_master, test_sio_slave);
#endif #endif
#endif

View File

@ -12,6 +12,8 @@
#include "test/test_common_spi.h" #include "test/test_common_spi.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#ifndef CONFIG_SPIRAM #ifndef CONFIG_SPIRAM
//This test should be removed once the timing test is merged. //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 // !CONFIG_SPIRAM
#endif

View File

@ -17,6 +17,7 @@
#include "unity.h" #include "unity.h"
#include "test/test_common_spi.h" #include "test/test_common_spi.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define TEST_DMA_MAX_SIZE 14000 #define TEST_DMA_MAX_SIZE 14000
#define TEST_BUFFER_SIZE 256 ///< buffer size of each wrdma buffer in fifo mode #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); master_free_device_bus(spi);
} }
#endif //SOC_SPI_SUPPORT_SLAVE_HD_VER2 #endif //SOC_SPI_SUPPORT_SLAVE_HD_VER2
#endif

View File

@ -9,6 +9,8 @@
#include "soc/rtc.h" #include "soc/rtc.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define TIMER_DIVIDER 16 #define TIMER_DIVIDER 16
#define TIMER_SCALE (TIMER_BASE_CLK / TIMER_DIVIDER) /*!< used to calculate counter value */ #define TIMER_SCALE (TIMER_BASE_CLK / TIMER_DIVIDER) /*!< used to calculate counter value */
#define TIMER_DELTA 0.001 #define TIMER_DELTA 0.001
@ -973,3 +975,5 @@ TEST_CASE_MULTIPLE_STAGES("timer_group software reset test",
"[intr_status][intr_status = 0]", "[intr_status][intr_status = 0]",
timer_group_test_first_stage, timer_group_test_first_stage,
timer_group_test_second_stage); timer_group_test_second_stage);
#endif

View File

@ -6,6 +6,8 @@
#include "esp_log.h" #include "esp_log.h"
#include "esp_system.h" // for uint32_t esp_random() #include "esp_system.h" // for uint32_t esp_random()
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
#define UART_TAG "Uart" #define UART_TAG "Uart"
#define UART_NUM1 (UART_NUM_1) #define UART_NUM1 (UART_NUM_1)
#define BUF_SIZE (100) #define BUF_SIZE (100)
@ -312,3 +314,5 @@ TEST_CASE("uart tx with ringbuffer test", "[uart]")
free(rd_data); free(rd_data);
free(wr_data); free(wr_data);
} }
#endif

View File

@ -34,7 +34,7 @@
#include "soc/rtc_io_struct.h" #include "soc/rtc_io_struct.h"
#include "esp_rom_sys.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"; static const char *TAG = "test_touch";

View File

@ -38,7 +38,7 @@
#include "driver/rtc_io.h" #include "driver/rtc_io.h"
#include "esp_rom_sys.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"; static const char *TAG = "test_touch";

View File

@ -19,6 +19,8 @@
#include "esp_rom_efuse.h" #include "esp_rom_efuse.h"
#include "bootloader_common.h" #include "bootloader_common.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
static const char* TAG = "efuse_test"; static const char* TAG = "efuse_test";
static void test_read_blob(void) 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(); esp_efuse_utility_update_virt_blocks();
TEST_ASSERT_EQUAL_INT(esp_efuse_get_chip_ver(), bootloader_common_get_chip_revision()); TEST_ASSERT_EQUAL_INT(esp_efuse_get_chip_ver(), bootloader_common_get_chip_revision());
} }
#endif // #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)

View File

@ -35,6 +35,8 @@ static const char *TAG = "esp32_eth_test";
#define ETH_PING_DURATION_MS (5000) #define ETH_PING_DURATION_MS (5000)
#define ETH_PING_END_TIMEOUT_MS (ETH_PING_DURATION_MS * 2) #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 // compute md5 of download file
static md5_context_t md5_context; static md5_context_t md5_context;
static uint8_t digest[16]; 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(&hint, 0, sizeof(hint));
memset(&target_addr, 0, sizeof(target_addr)); memset(&target_addr, 0, sizeof(target_addr));
/* convert URL to IP */ /* 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; struct in_addr addr4 = ((struct sockaddr_in *)(res->ai_addr))->sin_addr;
inet_addr_to_ip4addr(ip_2_ip4(&target_addr), &addr4); inet_addr_to_ip4addr(ip_2_ip4(&target_addr), &addr4);
freeaddrinfo(res); freeaddrinfo(res);

View File

@ -9,6 +9,7 @@
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/rtc_cntl_reg.h"
#include "esp_system.h" #include "esp_system.h"
#include "test_utils.h" #include "test_utils.h"
#include "esp_log.h" #include "esp_log.h"
@ -17,8 +18,13 @@
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h" #include "esp32/clk.h"
#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h" #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 #endif
#if portNUM_PROCESSORS == 2 #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) { for (int i = 0; i < 200000; ++i) {
// wait for 20us, reading one of RTC registers // wait for 20us, reading one of RTC registers
uint32_t ccount = xthal_get_ccount(); 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); volatile uint32_t val = REG_READ(RTC_CNTL_STATE0_REG);
(void) val; (void) val;
} }

View File

@ -17,7 +17,7 @@
extern void rtc_clk_select_rtc_slow_clk(void); 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" #include "esp32/clk.h"

View File

@ -1,3 +1,6 @@
if(IDF_TARGET STREQUAL "esp32s3")
return()
endif()
idf_component_register(SRC_DIRS ${IDF_TARGET} idf_component_register(SRC_DIRS ${IDF_TARGET}
PRIV_INCLUDE_DIRS . PRIV_INCLUDE_DIRS .
PRIV_REQUIRES cmock ulp soc esp_common) PRIV_REQUIRES cmock ulp soc esp_common)

View File

@ -7,10 +7,12 @@
#include "freertos/portable.h" #include "freertos/portable.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#ifdef CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h" #include "esp32/clk.h"
#elif defined(CONFIG_IDF_TARGET_ESP32S2) #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h" #include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#endif #endif
#include "soc/cpu.h" #include "soc/cpu.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"

View File

@ -10,6 +10,11 @@
.. tool-xtensa-esp32s2-elf-notes .. tool-xtensa-esp32s2-elf-notes
---
.. tool-xtensa-esp32s3-elf-notes
--- ---
.. tool-esp32ulp-elf-notes .. tool-esp32ulp-elf-notes

View File

@ -12,6 +12,11 @@
.. tool-xtensa-esp32s2-elf-notes .. tool-xtensa-esp32s2-elf-notes
---
.. tool-xtensa-esp32s3-elf-notes
--- ---
.. tool-esp32ulp-elf-notes .. tool-esp32ulp-elf-notes

View File

@ -13,7 +13,7 @@ using namespace idf;
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#define LEAKS "300" #define LEAKS "300"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
#define LEAKS "800" #define LEAKS "800"
#else #else
#error "unknown target in CXX tests, can't set leaks threshold" #error "unknown target in CXX tests, can't set leaks threshold"

View File

@ -20,9 +20,8 @@
#include <iostream> #include <iostream>
#include "test_utils.h" // unity_send_signal #include "test_utils.h" // unity_send_signal
#include "i2c_cxx.hpp"
#ifdef __cpp_exceptions #ifdef __cpp_exceptions
#include "i2c_cxx.hpp"
using namespace std; using namespace std;
using namespace idf; using namespace idf;

View File

@ -83,6 +83,11 @@ build_esp_idf_tests_cmake_esp32s2:
variables: variables:
IDF_TARGET: esp32s2 IDF_TARGET: esp32s2
build_esp_idf_tests_cmake_esp32s3:
extends: .build_esp_idf_tests_cmake
variables:
IDF_TARGET: esp32s3
.build_examples_template: .build_examples_template:
extends: .build_template extends: .build_template
artifacts: artifacts:

View File

@ -432,7 +432,7 @@ UT_001:
UT_002: UT_002:
extends: .unit_test_template extends: .unit_test_template
parallel: 12 parallel: 13
tags: tags:
- ESP32_IDF - ESP32_IDF
- UT_T1_1 - UT_T1_1

View File

@ -8,7 +8,7 @@ from collections import defaultdict
from find_apps import find_apps from find_apps import find_apps
from find_build_apps import BUILD_SYSTEMS, BUILD_SYSTEM_CMAKE from find_build_apps import BUILD_SYSTEMS, BUILD_SYSTEM_CMAKE
from ttfw_idf.IDFAssignTest import ExampleAssignTest, TestAppsAssignTest 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 = { TEST_LABELS = {
'example_test': 'BOT_LABEL_EXAMPLE_TEST', 'example_test': 'BOT_LABEL_EXAMPLE_TEST',
@ -90,6 +90,8 @@ def main():
if e.errno != errno.EEXIST: if e.errno != errno.EEXIST:
raise e raise e
SUPPORTED_TARGETS.extend(PREVIEW_TARGETS)
if (not build_standalone_apps) and (not build_test_case_apps): if (not build_standalone_apps) and (not build_test_case_apps):
for target in SUPPORTED_TARGETS: for target in SUPPORTED_TARGETS:
output_json([], target, args.build_system, args.output_path) output_json([], target, args.build_system, args.output_path)

View File

@ -17,7 +17,7 @@ except ImportError:
import gitlab_api import gitlab_api
from tiny_test_fw.Utility import CIAssignTest 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') 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') parser.add_argument('--test-case-file-pattern', help='file name pattern used to find Python test case files')
args = parser.parse_args() 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] 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] args_list = [test_case_paths, args.config]
if args.case_group == 'example_test': if args.case_group == 'example_test':

View File

@ -19,6 +19,7 @@ SUPPORTED_TARGETS_REGEX = re.compile(r'Supported [Tt]argets((?:[\s|]+(?:ESP[0-9A
FORMAL_TO_USUAL = { FORMAL_TO_USUAL = {
'ESP32': 'esp32', 'ESP32': 'esp32',
'ESP32-S2': 'esp32s2', 'ESP32-S2': 'esp32s2',
'ESP32-S3': 'esp32s3',
} }
@ -99,6 +100,7 @@ class CMakeBuildSystem(BuildSystem):
formal_to_usual = { formal_to_usual = {
'ESP32': 'esp32', 'ESP32': 'esp32',
'ESP32-S2': 'esp32s2', 'ESP32-S2': 'esp32s2',
'ESP32-S3': 'esp32s3',
} }
readme_file_content = BuildSystem._read_readme(app_path) readme_file_content = BuildSystem._read_readme(app_path)

View File

@ -124,6 +124,10 @@ class MemRegions(object):
# MemRegDef(0x3FFF8000, 0x4000, MemRegions.DIRAM_ID, 0x40068000), # MemRegDef(0x3FFF8000, 0x4000, MemRegions.DIRAM_ID, 0x40068000),
# MemRegDef(0x3FFFC000, 0x4000, MemRegions.DIRAM_ID, 0x4006C000), # MemRegDef(0x3FFFC000, 0x4000, MemRegions.DIRAM_ID, 0x4006C000),
]) ])
elif target == 'esp32s3':
return sorted([
MemRegDef(0x3FC88000, 0x8000 + 6 * 0x10000, MemRegions.DIRAM_ID, 0x40378000),
])
else: else:
return None return None

View File

@ -14,6 +14,8 @@
#include "esp32/clk.h" #include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h" #include "esp32s2/clk.h"
#elif CONFIG_IDF_TARTGET_ESP32S3
#include "esp32s3/clk.h"
#endif #endif
#include "unity.h" #include "unity.h"
@ -28,7 +30,7 @@ static const char* TAG = "test_ccomp_timer";
#define CACHE_SIZE (1 << 15) #define CACHE_SIZE (1 << 15)
// Only test half due to lack of memory // Only test half due to lack of memory
#define TEST_SIZE (CACHE_SIZE / 2) #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 // Default cache configuration - no override specified on
// test_utils config // test_utils config
#define CACHE_WAYS 8 #define CACHE_WAYS 8

View File

@ -17,7 +17,7 @@
#define CACHE_LINE_SIZE 32 #define CACHE_LINE_SIZE 32
#define CACHE_SIZE (1 << 15) #define CACHE_SIZE (1 << 15)
// Only test half due to lack of memory // 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 // Default cache configuration - no override specified on
// test_utils config // test_utils config
#define CACHE_WAYS 8 #define CACHE_WAYS 8

View File

@ -0,0 +1 @@
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y