866 Commits

Author SHA1 Message Date
Tomasz Kramkowski
452e20d90b 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 15:17:35 +08:00
morris
96c3f6c041 Merge branch 'fix/build_when_rom_patch_disable_v5.4' into 'release/v5.4'
fix(spi_flash): Fix build fail when rom_patch config disabled  (backport v5.4)

See merge request espressif/esp-idf!37103
2025-02-20 14:41:25 +08:00
Jiang Jiang Jian
f9ae8dfb04 Merge branch 'fix/esp32p4_lightsleep_fixes_v5.4' into 'release/v5.4'
fix(esp_hw_support): some fixes of esp32p4 lightsleep retention & power switch process (v5.4)

See merge request espressif/esp-idf!37086
2025-02-20 13:48:50 +08:00
C.S.M
4da5de094e fix(spi_flash): Fix build fail when rom_patch config disabled,
Closes https://github.com/espressif/esp-idf/issues/15229
2025-02-19 16:50:03 +08:00
wuzhenghui
228e74e06c
feat(esp_hw_support): do esp32p4 l1 cache invalidate by regdma 2025-02-19 14:32:04 +08:00
wangtao@espressif.com
35771eed0e fix(wifi): fix max idle period 1 issue 2025-02-19 10:48:43 +08:00
Song Ruo Jing
ed46ec4433 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:11 +08:00
Island
b05de813e3 Merge branch 'change/ble_update_lib_20250114_v5.4' into 'release/v5.4'
change(ble): [AUTO_MR] 20250114 - Update ESP BLE Controller Lib (v5.4)

See merge request espressif/esp-idf!36480
2025-01-22 18:17:46 +08:00
yinqingzhao
c725253d53 feat(wifi): add wifi support for esp32c61 eco2 2025-01-20 14:16:30 +08:00
Jiang Jiang Jian
ebd04eb2fc Merge branch 'fix/fix_esp32c2_eco4_rx_csa_ld_v54' into 'release/v5.4'
fix(wifi): fix esp32c2eco4 sta_rx_csa ld

See merge request espressif/esp-idf!36203
2025-01-17 17:42:02 +08:00
Zhou Xiao
1c5f26af2b change(ble): update esp32c2 rom ld file
(cherry picked from commit e5feba6ed314c47aab4ae993edc77c377cb10b7e)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-01-17 16:54:09 +08:00
Jiang Jiang Jian
192874f939 Merge branch 'change/ble_update_lib_20250103_v5.4' into 'release/v5.4'
change(ble): [AUTO_MR] 20250103 - Update ESP BLE Controller Lib (v5.4)

See merge request espressif/esp-idf!36373
2025-01-17 11:42:18 +08:00
wangtao@espressif.com
18aced40f9 fix(wifi): fix esp32c2eco4 sta_rx_csa ld 2025-01-17 11:41:43 +08:00
liuning
ce124478f1 fix(wifi): fix double max active time, fix coex pwr period cant been updated by ps type set 2025-01-15 19:42:11 +05:30
Zhou Xiao
d4ebd1ec26 fix(ble): fixed ld file for c2eco0 and c2eco4
(cherry picked from commit 937fe2a6e3102ff9a44da2e2288c7df7588a271c)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 17:45:32 +08:00
Roland Dobai
5bb41c4932 Merge branch 'feature/move-gdb-options-to_project_description_json_v5.4' into 'release/v5.4'
feat(debugging): move gdbinit generation to CMake (v5.4)

See merge request espressif/esp-idf!35175
2025-01-09 18:58:23 +08:00
Chen Jian Hua
331e368647 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(fd62b31)
- Fixed periodic adv enable params checking
- Fixed BLE assert lld_scan.c 1728 when receiving directed adv
- Support resolving RPA to identity address when creating connection
- Fixed BLE assert rwble.c 505 param 00400010
- Fixed peer address type error in HCI LE meta event
- Fixed setting random address failed when extended adv is enabled


(cherry picked from commit 326f391f9c5a218bad521f3a1277fd09f240ac6d)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-01-07 14:33:39 +08:00
Jiang Jiang Jian
176b9c9dba Merge branch 'fix/fix_esp32c2_ld_issue_v54' into 'release/v5.4'
fix(wifi): fix esp32c2 ld issue

See merge request espressif/esp-idf!35610
2025-01-07 10:47:32 +08:00
Island
f4138ade17 Merge branch 'bugfix/fixed_ble_issues_241220_v5.4' into 'release/v5.4'
Bugfix/fixed ble issues 241220 (v5.4)

See merge request espressif/esp-idf!35924
2025-01-06 17:01:07 +08:00
Zhao Wei Liang
b908018780 feat(ble): fixed some ble issues on ESP32-C2
(cherry picked from commit 5f9a3cdd1a89c6987ff64a62e325533fc217b38a)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:44 +08:00
Zhao Wei Liang
cb90787ac5 fix(ble): fixed the connect issue when rx error aa on ESP32-C2
(cherry picked from commit 6b01a56e094e3220265c37fabfb42bade8417c2b)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:53 +08:00
wangtao@espressif.com
7f844e0e0f fix(wifi): fix esp32c2 ld issue 2024-12-12 15:02:44 +08:00
Alexey Lapshin
0e57dc044e feat(debugging): move gdbinit generation to CMake
This feature is useful for 3rd-party software to run GDB with predefined
options that described in project_description.json file

allow to pass custom options to "idf.py gdb":

  --gdb-commands: command line arguments for gdb. (without changes)
  -ex: pass command to gdb.
  -x: pass gdbinit file to gdb. Alias for old --gdbinit command
2024-12-06 19:36:41 +07:00
wangtao@espressif.com
84bd87231d fix(wifi): fix esp32c2eco4 wifi deinit crash issue 2024-12-03 16:02:07 +08:00
Jiang Jiang Jian
25039926a6 Merge branch 'fix/duplicated_enc_restart_request_when_change_key_type_v5.4' into 'release/v5.4'
fix(bt): fixed some issues in esp32 bt controller(backport v5.4)

See merge request espressif/esp-idf!35295
2024-11-30 01:57:46 +08:00
xuxiao
bd21db34b2 fix(wifi): fix esp32c6 can receive data frames where the SA (Source Address) matches its own address 2024-11-29 23:36:51 +08:00
gongyantao
a3774cae8a fix(bt): fixed some issues in esp32 bt controller
1: fix duplicated lc_enc_restart_req when new lk type is semi-permanent
   key
2: reset PreventEncEvt flag at the end of restart encryption procedure
2024-11-29 14:10:01 +08:00
Jiang Jiang Jian
05b6d92042 Merge branch 'bugfix/esp32c3_eco7_usj_console_v5.4' into 'release/v5.4'
fix(esp_rom): fix esp32c3 eco7 console rom function address (v5.4)

See merge request espressif/esp-idf!34738
2024-11-28 19:55:38 +08:00
Island
3915ea30f2 Merge branch 'bugfix/fix_c2_light_sleep_coex_v5.4' into 'release/v5.4'
fix(ble): fix ble light sleep error on esp32c2 (v5.4)

See merge request espressif/esp-idf!35056
2024-11-26 10:50:33 +08:00
Li Bo
7bba3dfe8a fix(esp_rom): fix esp32c3 eco7 console rom function address 2024-11-22 13:40:05 +08:00
Jin Cheng
5cd5ede2f5 fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed wrong logic in handling sniff transaction collision at slave
      side
    - Fixed the issue ACL is stopped too early before eSCO
2024-11-22 11:01:30 +08:00
Jin Chen
999b10d2d4 fix(ble): change ld for ble scan coex issue
(cherry picked from commit dd499d7b2e199dab1e56297136ce5af479d01cd9)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-21 11:03:55 +08:00
Jin Chen
43cd3491c9 fix(ble): fix ble light sleep error on esp32c2
(cherry picked from commit 23f7e33a97ad70ff1e73407650f7b8edbd91fc9a)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-21 11:03:53 +08:00
Jiang Jiang Jian
a61663d63b Merge branch 'bugfix/crash_deauth_fix_5.4' into 'release/v5.4'
Fix for crash while receiving deauth in esp32c2 ECO4(v5.4)

See merge request espressif/esp-idf!34984
2024-11-20 19:10:59 +08:00
Island
28bf5eacb9 Merge branch 'feature/support_moving_code_to_flash_v5.4' into 'release/v5.4'
feat(ble): Support for putting code in flash on ESP32-C2 (v5.4)

See merge request espressif/esp-idf!34786
2024-11-20 17:46:55 +08:00
akshat
853a944cd0 fix(esp_rom): Comment out unused function pointers in esp32c2 eco4 linker file 2024-11-18 11:49:50 +05:30
Aditi
1917e7f532 fix(esp_wifi): Fix for crash while receiving deauth in esp32c2 ECO4 2024-11-18 11:45:46 +05:30
YAMAMOTO Takashi
dbd394cb4a fix(esp-rom): Fix comment typos in cache.h
Fix typo in parameter names in cache_flash_mmu_set
amd cache_sram_mmu_set functions.

Closes https://github.com/espressif/esp-idf/pull/14518
2024-11-13 07:00:49 +01:00
Shen Wei Long
59e3a1f046 feat(ble): Support for putting code in flash on ESP32-C2
(cherry picked from commit 192f13135488a2f8a386ace2dad69da59e81f5b5)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2024-11-13 10:45:03 +08:00
yinqingzhao
30acf8b5d1 feat(twt): twt add parameter to enable keep alive 2024-11-08 12:08:59 +08:00
xuxiao
e2c732c906 feat(wifi): add wifi support for esp32c5 eco1 2024-11-08 12:08:59 +08:00
zhiweijian
2a05eb8fd3 feat(bt/controller): Support controller code run in flash only 2024-11-04 15:44:11 +08:00
Aditya Patwardhan
e5d246ef27 feat(hal): esp32c5: Add hal layer for key manager 2024-10-28 11:13:43 +08:00
Marius Vikhammer
2a2f0fd6f1 Merge branch 'bugfix/p4_ld_newlib_api' into 'master'
fix(lp_core): updated lp rom newlib API addresses

See merge request espressif/esp-idf!34412
2024-10-28 10:24:57 +08:00
Marius Vikhammer
8406735635 fix(lp_core): updated lp rom newlib API addresses 2024-10-24 10:45:55 +08:00
Jiang Jiang Jian
8b4f9689ba Merge branch 'fix/fix_esp32c2eco4_country_auto_issue_master' into 'master'
fix(wifi): fix esp32c2 eco4 set conutry policy auto issue

Closes WIFIBUG-892

See merge request espressif/esp-idf!34332
2024-10-23 19:18:56 +08:00
Island
7dd10f37d7 Merge branch 'bugfix/fix_some_ble_bugs_240926_esp32c3' into 'master'
Fixed some BLE bugs 240926 on ESP32C3

Closes BLERP-1086, BLERP-1087, BLERP-1146, and BLERP-1160

See merge request espressif/esp-idf!33922
2024-10-23 17:24:51 +08:00
wangtao@espressif.com
013add5378 fix(wifi): fix esp32c2 eco4 set conutry policy auto issue 2024-10-22 17:09:03 +08:00
Jiang Jiang Jian
34e2f08c5c Merge branch 'fix/fix_esp32c2_eco4_h2e_isssue' into 'master'
fix(wifi): fix esp32eco4 softap h2e issue

Closes WIFIBUG-858

See merge request espressif/esp-idf!34180
2024-10-21 10:52:50 +08:00
chenjianhua
1e3220b0b0 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(52ee788)
- Fixed BLE vendor HCI set and get tx power
- Support BLE vendor HCI set adv aux offset command
- Support BLE vendor HCI set CSA support command
- Added config for BLE instant passed workaround
- Fixed btdm_sleep_clock_sync timeout workaround
2024-10-20 16:33:27 +08:00