Skip to content

Commit aa6abbb

Browse files
authored
Merge branch 'espressif:release/v5.3' into release/v5.3
2 parents fcbd289 + a0f798c commit aa6abbb

File tree

176 files changed

+5628
-3689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+5628
-3689
lines changed

.gitlab/ci/pre_check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ check_blobs:
4444
- IDF_TARGET=esp32c2 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
4545
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
4646
- IDF_TARGET=esp32c6 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
47+
- IDF_TARGET=esp32c5 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
48+
- IDF_TARGET=esp32_host $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
4749
# Check if Coexistence library header files match between IDF and the version used when compiling the libraries
4850
- IDF_TARGET=esp32 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
4951
- IDF_TARGET=esp32s2 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
@@ -52,6 +54,7 @@ check_blobs:
5254
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
5355
- IDF_TARGET=esp32c6 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
5456
- IDF_TARGET=esp32h2 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
57+
- IDF_TARGET=esp32c5 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
5558
# Check if Wi-Fi, PHY, BT blobs contain references to specific symbols
5659
- bash $IDF_PATH/tools/ci/check_blobs.sh
5760

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ if(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE)
136136
list(APPEND compile_definitions "-DNDEBUG")
137137
endif()
138138

139+
if(CONFIG_COMPILER_NO_MERGE_CONSTANTS)
140+
list(APPEND compile_options "-fno-merge-constants")
141+
endif()
142+
139143
if(CONFIG_COMPILER_STACK_CHECK_MODE_NORM)
140144
list(APPEND compile_options "-fstack-protector")
141145
elseif(CONFIG_COMPILER_STACK_CHECK_MODE_STRONG)

Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,15 @@ mainmenu "Espressif IoT Development Framework Configuration"
529529
help
530530
Stack smashing protection.
531531

532+
config COMPILER_NO_MERGE_CONSTANTS
533+
bool "Disable merging const sections"
534+
depends on IDF_TOOLCHAIN_GCC
535+
help
536+
Disable merging identical constants (string/floating-point) across compilation units.
537+
This helps in better size analysis of the application binary as the rodata section
538+
distribution is more uniform across libraries. On downside, it may increase
539+
the binary size and hence should be used during development phase only.
540+
532541
config COMPILER_WARN_WRITE_STRINGS
533542
bool "Enable -Wwrite-strings warning flag"
534543
default "n"

components/bootloader_support/bootloader_flash/src/bootloader_flash.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ void bootloader_spi_flash_reset(void)
697697
******************************************************************************/
698698

699699
#define XMC_SUPPORT CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT
700-
#define XMC_VENDOR_ID 0x20
700+
#define XMC_VENDOR_ID_1 0x20
701701

702702
#if BOOTLOADER_BUILD
703703
#define BOOTLOADER_FLASH_LOG(level, ...) ESP_EARLY_LOG##level(TAG, ##__VA_ARGS__)
@@ -714,7 +714,7 @@ static IRAM_ATTR bool is_xmc_chip_strict(uint32_t rdid)
714714
uint32_t mfid = BYTESHIFT(rdid, 1);
715715
uint32_t cpid = BYTESHIFT(rdid, 0);
716716

717-
if (vendor_id != XMC_VENDOR_ID) {
717+
if (vendor_id != XMC_VENDOR_ID_1) {
718718
return false;
719719
}
720720

@@ -747,7 +747,7 @@ esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)
747747
// Check the Manufacturer ID in SFDP registers (JEDEC standard). If not XMC chip, no need to run the flow
748748
const int sfdp_mfid_addr = 0x10;
749749
uint8_t mf_id = (bootloader_flash_read_sfdp(sfdp_mfid_addr, 1) & 0xff);
750-
if (mf_id != XMC_VENDOR_ID) {
750+
if (mf_id != XMC_VENDOR_ID_1) {
751751
BOOTLOADER_FLASH_LOG(D, "non-XMC chip detected by SFDP Read (%02X), skip.", mf_id);
752752
return ESP_OK;
753753
}
@@ -779,7 +779,7 @@ esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)
779779
static IRAM_ATTR bool is_xmc_chip(uint32_t rdid)
780780
{
781781
uint32_t vendor_id = (rdid >> 16) & 0xFF;
782-
return (vendor_id == XMC_VENDOR_ID);
782+
return (vendor_id == XMC_VENDOR_ID_1);
783783
}
784784

785785
esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)

components/driver/test_apps/.build-test-rules.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ components/driver/test_apps/touch_sensor_v2:
9595
components/driver/test_apps/twai:
9696
disable:
9797
- if: SOC_TWAI_SUPPORTED != 1
98-
disable_test:
99-
- if: IDF_TARGET == "esp32p4"
100-
temporary: true
101-
reason: test not pass, should be re-enable # TODO: IDF-8966
10298
depends_filepatterns:
10399
- components/driver/twai/**/*
104100
depends_components:

components/driver/test_apps/components/test_driver_utils/test_spi_utils.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,19 @@ void spitest_gpio_input_sel(uint32_t gpio_num, int func, uint32_t signal_idx)
231231
esp_rom_gpio_connect_in_signal(gpio_num, signal_idx, 0);
232232
}
233233

234-
//Note this cs_num is the ID of the connected devices' ID, e.g. if 2 devices are connected to the bus,
235-
//then the cs_num of the 1st and 2nd devices are 0 and 1 respectively.
236-
void same_pin_func_sel(spi_bus_config_t bus, spi_device_interface_config_t dev, uint8_t cs_num)
234+
//Note this cs_dev_id is the ID of the connected devices' ID, e.g. if 2 devices are connected to the bus,
235+
//then the cs_dev_id of the 1st and 2nd devices are 0 and 1 respectively.
236+
void same_pin_func_sel(spi_bus_config_t bus, spi_device_interface_config_t dev, uint8_t cs_dev_id)
237237
{
238238
spitest_gpio_output_sel(bus.mosi_io_num, FUNC_GPIO, spi_periph_signal[TEST_SPI_HOST].spid_out);
239239
spitest_gpio_input_sel(bus.mosi_io_num, FUNC_GPIO, spi_periph_signal[TEST_SLAVE_HOST].spid_in);
240240

241241
spitest_gpio_output_sel(bus.miso_io_num, FUNC_GPIO, spi_periph_signal[TEST_SLAVE_HOST].spiq_out);
242242
spitest_gpio_input_sel(bus.miso_io_num, FUNC_GPIO, spi_periph_signal[TEST_SPI_HOST].spiq_in);
243243

244-
spitest_gpio_output_sel(dev.spics_io_num, FUNC_GPIO, spi_periph_signal[TEST_SPI_HOST].spics_out[cs_num]);
244+
spitest_gpio_output_sel(dev.spics_io_num, FUNC_GPIO, spi_periph_signal[TEST_SPI_HOST].spics_out[cs_dev_id]);
245245
spitest_gpio_input_sel(dev.spics_io_num, FUNC_GPIO, spi_periph_signal[TEST_SLAVE_HOST].spics_in);
246246

247247
spitest_gpio_output_sel(bus.sclk_io_num, FUNC_GPIO, spi_periph_signal[TEST_SPI_HOST].spiclk_out);
248248
spitest_gpio_input_sel(bus.sclk_io_num, FUNC_GPIO, spi_periph_signal[TEST_SLAVE_HOST].spiclk_in);
249-
250-
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
251-
GPIO.func_in_sel_cfg[FSPIQ_IN_IDX].sig_in_sel = 1;
252-
#endif
253249
}

components/driver/test_apps/twai/main/test_twai_interactive.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -16,6 +16,9 @@
1616
#include "soc/soc_caps.h"
1717
#include "esp_log.h"
1818

19+
#define TEST_TWAI_TX_PIN 4
20+
#define TEST_TWAI_RX_PIN 5
21+
1922
#if CONFIG_TWAI_ISR_IN_IRAM
2023
static void IRAM_ATTR test_delay_post_cache_disable(void *args)
2124
{
@@ -27,7 +30,7 @@ TEST_CASE("twai_listen_only", "[twai]")
2730
{
2831
twai_timing_config_t t_config = TWAI_TIMING_CONFIG_250KBITS();
2932
twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL();
30-
twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT(4, 5, TWAI_MODE_LISTEN_ONLY);
33+
twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT(TEST_TWAI_TX_PIN, TEST_TWAI_RX_PIN, TWAI_MODE_LISTEN_ONLY);
3134
#if CONFIG_TWAI_ISR_IN_IRAM
3235
g_config.intr_flags |= ESP_INTR_FLAG_IRAM;
3336
#endif
@@ -60,8 +63,8 @@ TEST_CASE("twai_remote_request", "[twai]")
6063
twai_handle_t bus_handle;
6164
twai_timing_config_t t_config = TWAI_TIMING_CONFIG_250KBITS();
6265
twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL();
63-
twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT(4, 5, TWAI_MODE_NORMAL);
64-
#if CONFIG_IDF_TARGET_ESP32C6
66+
twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT(TEST_TWAI_TX_PIN, TEST_TWAI_RX_PIN, TWAI_MODE_NORMAL);
67+
#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32P4
6568
g_config.controller_id = 1;
6669
#endif
6770
TEST_ESP_OK(twai_driver_install_v2(&g_config, &t_config, &f_config, &bus_handle));

components/driver/test_apps/twai/main/test_twai_loop_back.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -99,25 +99,27 @@ TEST_CASE("twai_mode_ext_no_ack_250kbps", "[twai-loop-back]")
9999
.extd = true, // Extended Frame Format (29bit ID)
100100
};
101101

102-
printf("install twai driver\r\n");
103102
for (int i = 0; i < SOC_TWAI_CONTROLLER_NUM; i++) {
104103
g_config.controller_id = i;
105104
g_config.tx_io = i;
106105
g_config.rx_io = i;
106+
printf("install twai driver %d\r\n", g_config.controller_id);
107107
TEST_ESP_OK(twai_driver_install_v2(&g_config, &t_config, &f_config, &twai_buses[i]));
108108
TEST_ESP_OK(twai_start_v2(twai_buses[i]));
109109
}
110110

111-
printf("transmit message\r\n");
112111
for (int i = 0; i < SOC_TWAI_CONTROLLER_NUM; i++) {
112+
printf("transmit message from %d\r\n", i);
113+
tx_msg.data[5] = SOC_TWAI_CONTROLLER_NUM - i;
113114
TEST_ESP_OK(twai_transmit_v2(twai_buses[i], &tx_msg, pdMS_TO_TICKS(1000)));
114115
}
115116

116-
printf("receive message\r\n");
117117
twai_message_t rx_msg;
118118
for (int i = 0; i < SOC_TWAI_CONTROLLER_NUM; i++) {
119+
printf("receive message from %d\r\n", i);
119120
TEST_ESP_OK(twai_receive_v2(twai_buses[i], &rx_msg, pdMS_TO_TICKS(1000)));
120121
TEST_ASSERT_TRUE(rx_msg.data_length_code == 6);
122+
tx_msg.data[5] = SOC_TWAI_CONTROLLER_NUM - i;
121123
for (int i = 0; i < 6; i++) {
122124
TEST_ASSERT_EQUAL(tx_msg.data[i], rx_msg.data[i]);
123125
}

components/driver/test_apps/twai/pytest_twai.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: CC0-1.0
3-
43
import logging
54
import subprocess
65
from time import sleep
76

87
import pytest
9-
from can import Bus, Message
8+
from can import Bus
9+
from can import Message
1010
from pytest_embedded import Dut
1111

1212

@@ -16,6 +16,7 @@
1616
@pytest.mark.esp32h2
1717
@pytest.mark.esp32s2
1818
@pytest.mark.esp32s3
19+
@pytest.mark.esp32p4
1920
@pytest.mark.generic
2021
@pytest.mark.parametrize(
2122
'config',
@@ -46,6 +47,7 @@ def fixture_create_socket_can() -> Bus:
4647
@pytest.mark.esp32h2
4748
@pytest.mark.esp32s2
4849
@pytest.mark.esp32s3
50+
@pytest.mark.esp32p4
4951
@pytest.mark.twai_std
5052
@pytest.mark.parametrize(
5153
'config',
@@ -79,6 +81,7 @@ def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None:
7981
@pytest.mark.esp32h2
8082
@pytest.mark.esp32s2
8183
@pytest.mark.esp32s3
84+
@pytest.mark.esp32p4
8285
@pytest.mark.twai_std
8386
@pytest.mark.parametrize(
8487
'config',

0 commit comments

Comments
 (0)