36342 Commits

Author SHA1 Message Date
linruihao
6eaf8815db feat(bt): add coexist scheme status support for bt page 2025-02-23 17:44:29 +08:00
Michael (XIAO Xufeng)
a250f4ee2c Merge branch 'update/version_5_2_4' into 'release/v5.2'
Update version to 5.2.4

See merge request espressif/esp-idf!37141
2025-02-21 17:24:45 +08:00
Zhang Hai Peng
339b829126 fix(ble/bluedroid): Fix adv data and scan rsp data not reported together in BLE active scan
(cherry picked from commit 7f2cedc0488fe30316b7c6a45be1c8933ad36952)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-02-21 16:13:40 +08:00
cjin
89dcc4a113 feat(ble): support rssi comp for esp32h2 2025-02-21 11:50:38 +08:00
wuzhenghui
aff8ad355b
fix(esp_hw_support): fix esp32s2/esp32s3 RTC IOMUX clock management 2025-02-21 10:18:27 +08:00
wuzhenghui
6ed9e39ffa
fix(esp_driver_gpio): manage lp_io module clock by driver
Closes https://github.com/espressif/esp-idf/issues/13683
2025-02-20 19:46:22 +08:00
Tomasz Kramkowski
84a162aba7 fix(rom): Fix s2 and s3 Cache_Count_Flash_Pages rom function wrapper
The rom function on the s2 and s3 only counts one page for any pages
which are mapped to page 0 of flash as the Cache_Flash_To_SPIRAM_Copy
function attempts to map all flash page 0 mapped pages to one PSRAM
page.

As this function can be called for multiple regions, it needs to track
if a page mapped to page 0 has previously been accounted for by a
previous call. It does this using the page0_mapped in-out parameter.
This logic contains an error:

```
if (*page0_mapped == 0) {
    // BUG: If page0_count is 0, 1 is still added
    count = valid_flash_count + 1 - page0_count;
} else {
    count = valid_flash_count - page0_count;
}
*page0_mapped += page0_count;
return count;
```

The current Cache_Count_Flash_Pages wrapper in the idf attempts to
compensate for this bug by checking if the page0_mapped parameter was
changed by a call to the function and reducing the count if it has not.

This, however, will incorrectly over-compensate in situations where the
initial value of page0_mapped was not zero as the code above only
miscounts when it was zero.

This patch addresses the issue in this wrapper function by correctly
compensating for the bug only in cases where the final page0_mapped
value is 0.
2025-02-20 16:11:08 +08:00
Martin Vychodil
671dc31a32 fix(security): Fixed ESP32S2 memory protection check for Peri1 RTCSLOW interrupt
- fixes the issue found in https://github.com/espressif/esp-idf/issues/15359
- extends debug printouts in the related tests
2025-02-19 19:26:21 +01:00
Xiao Xufeng
af4a98ba99 change(version): Update version to 5.2.4 v5.2.4 2025-02-19 23:17:56 +08:00
C.S.M
084cb924f2 refactor(spi_flash): remove redundent flash suspend check 2025-02-19 16:59:30 +08:00
C.S.M
60b8013bc3 fix(spi_flash): Fix build fail when rom_patch config disabled,
Closes https://github.com/espressif/esp-idf/issues/15229
2025-02-19 16:58:59 +08:00
Shu Chen
0830c08e89 Merge branch 'support/ieee802154_get_rssi_comp_from_phy_v5.2' into 'release/v5.2'
feat(802.15.4): support ieee802154 get rssi comp from phylib (v5.2)

See merge request espressif/esp-idf!37053
2025-02-19 09:56:52 +08:00
Abhinav Kudnar
475ef1bb53 fix(nimble): Save the gatt context in case of preemption 2025-02-18 17:04:34 +05:30
zwx
31436bd626 feat(802.15.4): use btbb function to get rssi comp for h2 2025-02-18 12:11:00 +08:00
wanlei
1c93d41325 fix(spi_master): fix spi halt when remove device who using rc_fast 2025-02-18 11:29:04 +08:00
wuzhenghui
5435b614df
fix(esp_hw_support): fix lp/hp clock wait time calculation 2025-02-17 20:49:15 +08:00
wuzhenghui
cb169282bb
change(esp_hw_support): wait pll calibration done in regdma link instead of wait fixed value 2025-02-17 20:47:55 +08:00
wuzhenghui
5e81eb6cf7
fix(esp_hw_support): add timer wakeup sleep duration check
Closes https://github.com/espressif/esp-idf/issues/15255
2025-02-17 19:57:11 +08:00
zhangyanjiao
28bc154e4c fix(wifi): fix the delete queue error in espnow exapmle
Closes https://github.com/espressif/esp-idf/issues/15383
2025-02-17 14:57:19 +08:00
Mitch Cairns
72c86ba35c feat(ble/bluedroid): Support change HID task size by Kconfig in HID example 2025-02-17 11:28:48 +08:00
Zhang Hai Peng
691f9131fc docs(ble/bluedroid): Optimize doc for implementation of a characteristic with 128 bit UUID
(cherry picked from commit fa40d971a52e9eb66686ac3ae645fca2589f0807)

Co-authored-by: Erast  <78802792+MatoiDev@users.noreply.github.com>
2025-02-17 11:15:03 +08:00
Zhang Hai Peng
72527f85ea fix(ble/bluedroid): Don't log error on 16/128-bit UUID mixed descriptors
(cherry picked from commit fed1d41aa7170d8418dd126dd8e3b47a977b4aca)

Co-authored-by: Nebojša Cvetković <nebkat@gmail.com>
2025-02-17 11:15:01 +08:00
Zhang Hai Peng
af002606a7 refactor(ble/bluedroid): Fix typos in gatt_sr.c
(cherry picked from commit 63b2dcc3a7b4b56486a7ef82050d8a43dd2bb4af)

Co-authored-by: Nebojsa Cvetkovic <nebkat@gmail.com>
2025-02-17 11:14:58 +08:00
Zhang Hai Peng
be13df1104 fix(ble/bluedroid): Allow 0 length indications
(cherry picked from commit 9b5a52e2f784a50c0e4c1a422a2b3d22ce5e9998)

Co-authored-by: Nebojsa Cvetkovic <nebkat@gmail.com>
2025-02-17 11:14:54 +08:00
Zhang Hai Peng
d096dc7cbe refactor(ble/bluedroid): Fix typos in bta_gatts_act.c
(cherry picked from commit a8041a99533628b044a8158bcc4410404f83ea63)

Co-authored-by: Nebojsa Cvetkovic <nebkat@gmail.com>
2025-02-17 11:14:51 +08:00
Zhang Hai Peng
bdef0e0cb4 fix(coredump): only clear high bit in PC when set
(cherry picked from commit eaefd0bd25862fcc7d98c95fbc1f1f0c6a48dca7)

Co-authored-by: Erhan Kurubas <erhan.kurubas@espressif.com>
2025-02-17 11:14:48 +08:00
liuning
56d0173011 feat(coex): add coexist scheme for bt inquiry/page coexist with wifi 2025-02-15 15:41:10 +08:00
Frantisek Hrbata
9a1eef2ccc fix(ldgen): don't emit intermediate placements without sections
When a symbol needs to be placed to a different target than the one
designated for the object file, the object file is expanded, which
includes the following steps:

1. Creating a new placement for the symbol's input section with the
   specified target.
2. Excluding the object placement from the orignal target.
3. Creating a new intermediate placement for the object for the original
   target, where its input sections are expanded, excluding the input
   section for the symbol.

Let's illustrate the object expansion process with the following example:

[sections:rodata]
entries:
    .rodata+
    .sdata2+
    .srodata+

[scheme:default]
entries:
    text -> flash_text
    rodata -> flash_rodata

[scheme:noflash]
entries:
    text -> iram0_text
    rodata -> dram0_data

[mapping:soc_pm]
archive: libsoc.a
entries:
    gpio_periph: GPIO_HOLD_MASK (noflash)

gpio_periph section headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        00000000 000034 000000 00  AX  0   0  2
  [ 2] .data             PROGBITS        00000000 000034 000000 00  WA  0   0  1
  [ 3] .bss              NOBITS          00000000 000034 000000 00  WA  0   0  1
  [ 4] .rodata.GPIO_HOLD_MASK PROGBITS        00000000 000034 000058 00   A  0   0  4
  [ 5] .rodata.GPIO_PIN_MUX_REG PROGBITS        00000000 00008c 000058 00   A  0   0  4
  [ 6] .debug_info       PROGBITS        00000000 0000e4 0000d8 00      0   0  1
  [ 7] .rela.debug_info  RELA            00000000 0009d4 000108 0c   I 16   6  4
  [ 8] .debug_abbrev     PROGBITS        00000000 0001bc 000070 00      0   0  1
  [ 9] .debug_aranges    PROGBITS        00000000 00022c 000018 00      0   0  1
  [10] .rela.debug_aranges RELA            00000000 000adc 00000c 0c   I 16   9  4
  [11] .debug_line       PROGBITS        00000000 000244 0001ab 00      0   0  1
  [12] .debug_str        PROGBITS        00000000 0003ef 00022d 01  MS  0   0  1
  [13] .comment          PROGBITS        00000000 00061c 000030 01  MS  0   0  1
  [14] .note.GNU-stack   PROGBITS        00000000 00064c 000000 00      0   0  1
  [15] .riscv.attributes RISCV_ATTRIBUTES 00000000 00064c 000044 00      0   0  1
  [16] .symtab           SYMTAB          00000000 000690 000260 10     17  36  4
  [17] .strtab           STRTAB          00000000 0008f0 0000e1 00      0   0  1
  [18] .shstrtab         STRTAB          00000000 000ae8 0000d1 00      0   0  1

1. Creating a new placement
.dram0.data :
{
    *libsoc.a:gpio_periph.*(.rodata.GPIO_HOLD_MASK .sdata2.GPIO_HOLD_MASK .srodata.GPIO_HOLD_MASK)
}

2. Excluding the object placement
.flash.rodata :
{
    *(EXCLUDE_FILE(*libsoc.a:gpio_periph.*) .rodata.* ...)
}

3. Creating a new intermediate placement
.flash.rodata :
{
    *libsoc.a:gpio_periph.*(.rodata.GPIO_PIN_MUX_REG)
}

Now, let's do the same, but also move GPIO_PIN_MUX_REG to noflash with an updated mapping.

[mapping:soc_pm]
archive: libsoc.a
entries:
    gpio_periph: GPIO_HOLD_MASK (noflash)
    gpio_periph: GPIO_PIN_MUX_REG (noflash)

1. Creating a new placement
.dram0.data :
{
    *libsoc.a:gpio_periph.*(.rodata.GPIO_HOLD_MASK .sdata2.GPIO_HOLD_MASK .srodata.GPIO_HOLD_MASK)
    *libsoc.a:gpio_periph.*(.rodata.GPIO_PIN_MUX_REG .sdata2.GPIO_PIN_MUX_REG
                            .srodata.GPIO_PIN_MUX_REG)
}

2. Excluding the object placement
.flash.rodata :
{
    *(EXCLUDE_FILE(*libsoc.a:gpio_periph.*) .rodata.* ...)
}

3. Creating a new intermediate placement
.flash.rodata :
{
    *libsoc.a:gpio_periph.*
}

The *libsoc.a:gpio_periph.* entity in step 3 no longer has input
sections, as there are no remaining .rodata input sections in the object
file. The linker behavior for this mapping is to include all object
input sections that have not yet been placed as described in
https://sourceware.org/binutils/docs/ld.html#Input-Section-Basics
"If you use a file name without a list of sections, then all sections in
the input file will be included in the output section. This is not
commonly done, but it may by useful on occasion."

The map file for such mapping now contains following input sections

 .flash.rodata   0x3c0a0120    0x19b34
     *libsoc.a:gpio_periph.*()
     .debug_info    0x3c0b95bf       0xd8 esp-idf/soc/libsoc.a(gpio_periph.c.obj)
     .debug_abbrev  0x3c0b9697       0x70 esp-idf/soc/libsoc.a(gpio_periph.c.obj)
     .debug_aranges
                    0x3c0b9707       0x18 esp-idf/soc/libsoc.a(gpio_periph.c.obj)
     .debug_line    0x3c0b971f      0x1ab esp-idf/soc/libsoc.a(gpio_periph.c.obj)
     .debug_str     0x3c0b98ca      0x21a esp-idf/soc/libsoc.a(gpio_periph.c.obj)
                                    0x22d (size before relaxing)
     .comment       0x3c0b9ae4       0x30 esp-idf/soc/libsoc.a(gpio_periph.c.obj)
     .note.GNU-stack
                    0x3c0b9ae4        0x0 esp-idf/soc/libsoc.a(gpio_periph.c.obj)
     .riscv.attributes
                    0x3c0b9ae4       0x44 esp-idf/soc/libsoc.a(gpio_periph.c.obj)

This is incorrect, and such intermediate placement should not be
generated. This type of placement can be recognized because it is not
explicitly defined in the mapping and lacks input sections. We can
identify this in the significant function and prevent issuing commands
for such placement.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-02-14 12:18:23 +01:00
Laukik Hase
b216535f73
fix(esp_system): Correct address used to fetch application image header 2025-02-14 16:38:56 +05:30
Jiang Jiang Jian
beb054baad Merge branch 'bugfix/stack_corruption_btm_task_v5.2' into 'release/v5.2'
fix(esp_wifi): Fix stack curruption in btm task (v5.2)

See merge request espressif/esp-idf!36971
2025-02-14 19:02:20 +08:00
Kapil Gupta
f40e875ece fix(esp_wifi): Fix stack curruption in btm task (v5.2) 2025-02-14 13:00:51 +05:30
Jiang Jiang Jian
cc834de6b7 Merge branch 'bugfix/skip_memory_reordering_wpa2_semaphr_v5.2' into 'release/v5.2'
fix(esp_wifi): fixed stack corruption in WiFi tasks (v5.2)

See merge request espressif/esp-idf!36938
2025-02-14 14:30:56 +08:00
xiongweichao
8debf8cf32 fix(bt): Fixed SDP record integrity check bug 2025-02-14 10:29:25 +08:00
xiongweichao
53493fc99e fix(bt/bluedroid): fixed the format error of passkey printing 2025-02-14 10:29:25 +08:00
xiongweichao
353b860837 fix(bt/bluedroid): Fixed incorrect types of some variables in SDP 2025-02-14 10:29:24 +08:00
xiongweichao
99ee24a0bd fix(bt): Fix incorrect type returned when searching SAP record 2025-02-14 10:29:24 +08:00
xiongweichao
af7c188bd8 fix(bt): Fix the incorrect record found using uuid16 search 2025-02-14 10:29:24 +08:00
Kapil Gupta
22dd269b53 fix(esp_wifi): Fix stack corruption in wpa3 task 2025-02-13 18:08:00 +05:30
Kapil Gupta
5d9db0b972 fix(esp_wifi): fixed Stack corruption in DPP task 2025-02-13 18:08:00 +05:30
Kapil Gupta
9fb88f83df fix(esp_wifi): fixed Stack corruption in WPS processing 2025-02-13 18:08:00 +05:30
Kapil Gupta
d5f7c1253e fix(esp_wifi): Fixed memory corruption in wifi enterprise
Closes https://github.com/espressif/esp-idf/issues/15370
2025-02-13 18:07:46 +05:30
Jiang Jiang Jian
9841f23578 Merge branch 'bugfix/gpio_rom_patch_fix_v5.2' into 'release/v5.2'
fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2 (v5.2)

See merge request espressif/esp-idf!36867
2025-02-13 20:32:42 +08:00
Shreyas Sheth
d87529d992 fix(wifi): Fixed memory leak occurring in SAE PK connection 2025-02-13 12:03:31 +05:30
Jiang Jiang Jian
7a778aefce Merge branch 'bugfix/add_bluedroid_init_migration_v5.2' into 'release/v5.2'
docs(bt/bluedroid): Added migration guide for bluedroid init API[backport v5.2]

See merge request espressif/esp-idf!36877
2025-02-12 11:18:40 +08:00
Jiang Jiang Jian
b0f63c505b Merge branch 'bugfix/fix_wep_shared_auth_connect_fail_issue_v5.2' into 'release/v5.2'
fix(wifi): fix wep shared auth connect fail issue(Backport v5.2)

See merge request espressif/esp-idf!36871
2025-02-12 10:42:10 +08:00
liqigan
b528187291 docs(bt/bluedroid): Added migration guide for bluedroid init API
Closes https://github.com/espressif/esp-idf/issues/15352
2025-02-11 19:41:23 +08:00
muhaidong
2d900a63a2 fix(wifi): fix wep shared auth connect fail issue 2025-02-11 17:53:28 +08:00
Song Ruo Jing
bfd7f7723f fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2
Closes https://github.com/espressif/esp-idf/issues/15209
2025-02-11 16:05:35 +08:00
Armando
771bbf2f63 test(mmu): test can find paddr caps by any paddr offset 2025-02-11 15:57:25 +08:00
Jiang Jiang Jian
f23a4dc52e Merge branch 'fix/stack_overuse_by_failure_retry_cnt_v5.2' into 'release/v5.2'
fix(wifi): Fix stack overflow when failure_retry_cnt is set in station configuration (Backport v5.2)

See merge request espressif/esp-idf!36836
2025-02-11 15:51:51 +08:00