Compare commits

...

2865 Commits

Author SHA1 Message Date
d7b0a45ddb versions: Update to v5.1.4 2024-05-09 18:35:18 +08:00
9d8842f3ff Merge branch 'bugfix/libphy_chips_20240430_v5.1' into 'release/v5.1'
Bugfix/libphy chips 20240430 v5.1

See merge request espressif/esp-idf!30578
2024-05-09 12:08:10 +08:00
3004af48e6 update c3 s3 c6 libphy fix coex reset and bug 2024-05-08 17:15:09 +08:00
9a91fba9f2 feat(esp_wifi): Update FTM PHY Compensation with calibration 2024-04-30 12:11:29 +08:00
d06c758489 Merge branch 'bugfix/fix_scan_get_ap_number_issue_v5.1' into 'release/v5.1'
fix(wifi): fixed scan get ap number issue(Backport v5.1)

See merge request espressif/esp-idf!30569
2024-04-30 11:42:46 +08:00
26a2f687e7 fix(wifi): fixed scan get ap number issue 2024-04-30 10:53:28 +08:00
24dc97b296 Merge branch 'fix/fix_some_esp32c6_twt_bugs_v5.1' into 'release/v5.1'
fix(wifi): fix some esp32c6 wifi bugs (Backport v5.1)

See merge request espressif/esp-idf!30412
2024-04-29 15:02:00 +08:00
fdbdf6036f fix(wifi): fix some esp32c6 wifi bugs (Backport v5.1) 2024-04-28 16:24:49 +08:00
2fd087b246 Merge branch 'fix/ieee802154_include_header_issue_v5.1' into 'release/v5.1'
Fix/ieee802154 include header issue (backport v5.1)

See merge request espressif/esp-idf!30331
2024-04-22 15:40:14 +08:00
f0d0463a93 fix(ieee802154): fix ieee802154 next operation acquire lock in interrupt 2024-04-18 11:34:25 +08:00
4528d2299d fix(ieee802154): fix ieee802154 include header file issue and unused value issue 2024-04-18 11:33:51 +08:00
c686e23038 Merge branch 'bugfix/fix_lmac_end_frame_exchange_sequence_assert_issue_v5.1' into 'release/v5.1'
fix(wifi): fixed lmacEndFrameExchangeSequence assert issue(Backport v5.1)

See merge request espressif/esp-idf!30316
2024-04-18 11:29:08 +08:00
2622be4328 Merge branch 'bugfix/fixed_coex_asset_on_esp32c2_v5.1' into 'release/v5.1'
Bugfix/fixed coex asset on esp32c2 v5.1

See merge request espressif/esp-idf!30301
2024-04-18 11:28:45 +08:00
c58e1e2ec5 fix(wifi): fixed lmacEndFrameExchangeSequence assert issue 2024-04-17 19:36:03 +08:00
zwl
f22ac0ff82 ble: fixed an occasional assertion issue in coexistence scenarios on ESP32C2 2024-04-17 14:55:29 +08:00
zwl
e4fe67f7c2 ble: fixed the bt cmakelist error when use nimble host only 2024-04-17 14:54:54 +08:00
c432c692fa Merge branch 'bugfix/howsmyssl_cert_update_v5.1' into 'release/v5.1'
fix(examples): update root certificate for howsmyssl endpoint (v5.1)

See merge request espressif/esp-idf!30204
2024-04-16 10:58:26 +08:00
6a89ca77e1 fix(examples): update root certificate for howsmyssl endpoint
This fixes CI failure seen because of cert migration of howsmyssl
endpoint from previous "DST Root CA X3" (cross-signed) to "ISRG Root X1".
2024-04-12 11:12:06 +08:00
dd8080e164 Merge branch 'bugfix/BT-3491_v5.1' into 'release/v5.1'
bugfix(ble_mesh): Avoid provisioner handling messages from nodes that have...(v5.1)

See merge request espressif/esp-idf!28050
2024-04-12 10:30:49 +08:00
07c17c6114 Merge branch 'feat/adjust_ble_log_init_order_v5.1' into 'release/v5.1'
Feat/adjust ble log init order v5.1

See merge request espressif/esp-idf!30002
2024-04-12 10:30:36 +08:00
ac3087ea36 Merge branch 'bugfix/gptimer_alarm_config_in_sram_v5.1' into 'release/v5.1'
feat(gptimer): check the alarm config is not in flash (v5.1)

See merge request espressif/esp-idf!30135
2024-04-12 09:08:41 +08:00
592b7a9b80 Merge branch 'bugfix/fix_some_wifi_bugs_240411_v5.1' into 'release/v5.1'
fix(wifi): fixed some wifi issue 240411(Backport v5.1)

See merge request espressif/esp-idf!30187
2024-04-12 09:08:14 +08:00
8fc57142a3 update invalid links in the ble mesh example documentation 2024-04-11 20:23:50 +08:00
ea6e8653f6 bugfix(ble_mesh): Avoid provisioner handling messages from nodes that have already left the network. 2024-04-11 20:23:50 +08:00
35d5ea1104 Merge branch 'bugfix/config_sae_compile_error_v5.1' into 'release/v5.1'
fix(wpa_supplicant): Compile error when CONFIG_SAE is disabled (v5.1)

See merge request espressif/esp-idf!30178
2024-04-11 16:09:45 +08:00
edbf44b290 fix(wifi): fixed some wifi issue
1. sync multi antenna gpio register from IDF
2. fixed multicast address qos frames issue
3. fixed task watchdog got triggered by esp_wifi_stop issue
2024-04-11 15:33:43 +08:00
9abd010153 Merge branch 'fix/heap-calloc-fail-wrong-size_v5.1' into 'release/v5.1'
fix(heap): Wrong size propagated in alloc fail callback of heap_caps_calloc() (backport v5.1)

See merge request espressif/esp-idf!30091
2024-04-11 15:19:10 +08:00
6f20668b24 fix(wifi): fix multicast address qos frames issue 2024-04-11 14:54:37 +08:00
32c8c5805d Merge branch 'bugfix/fix_rtc_cntl_v5.1' into 'release/v5.1'
[S3]fix(rtc_cntl_reg.h): fix RTC_CNTL_SLAVE_PD_M

See merge request espressif/esp-idf!30170
2024-04-11 14:12:24 +08:00
3826f2b828 Merge branch 'bugfix/fix_coded_phy_s8_tx_issue_v5.1' into 'release/v5.1'
fix(esp_phy): fixed BLE coded phy s8 tx issue in coexistence scenarios (backport v5.1)

See merge request espressif/esp-idf!30173
2024-04-11 13:59:47 +08:00
2ac6e7345f fix(wpa_supplicant): Compile error when CONFIG_SAE is disabled
Closes https://github.com/espressif/esp-idf/issues/13553
2024-04-11 11:18:58 +05:30
661d066872 fix(esp_phy): update phylib for C3, S3, C2 and C6
- fixed BLE coded phy s8 tx issue in coexistence scenarios
- fixed ESP32-C3 and ESP32-S3 BLE RX issue
- optimize ESP32-C3 and ESP32-S3 light sleep current
2024-04-10 20:35:34 +08:00
zlq
58848946af [S3]fix(rtc_cntl_reg.h): fix RTC_CNTL_SLAVE_PD_M 2024-04-10 19:51:25 +08:00
a8f833a912 Merge branch 'fix/fix_pmu_power_domain_initialize_order_v5.1' into 'release/v5.1'
fix(esp_hw_support): fix pmu power domain initialize order (v5.1)

See merge request espressif/esp-idf!30152
2024-04-10 17:23:55 +08:00
d82b572ecd Merge branch 'bugfix/i2c_timeout_issue_v5.1' into 'release/v5.1'
fix(i2c): fix issues related to timeout and alive interval tick (backport v5.1)

See merge request espressif/esp-idf!29980
2024-04-10 16:44:22 +08:00
ddd2c5b418 fix(esp_hw_support): fix pmu power domain initialize order 2024-04-10 10:07:58 +08:00
4a497e1212 feat(gptimer): check the alarm config is not in flash
related to https://github.com/espressif/esp-idf/issues/13543
2024-04-09 17:33:26 +08:00
d1c17f96f6 Merge branch 'fix/pmp_idcache_prot_c6_h2_v5.1' into 'release/v5.1'
fix(esp_hw_support): Fix the flash I/DROM region PMP protection (v5.1)

See merge request espressif/esp-idf!30023
2024-04-08 17:52:23 +08:00
2c794ee423 fix(heap): Wrong size propagated in alloc fail callback
Propagate `n * size` as the size of the failed allocation
instead of just `size` when heap_caps_calloc() fails since
`n * size` is the actual number of bytes that the heap
component tried to allocate.
2024-04-08 08:42:49 +02:00
46d402d22e Merge branch 'bugfix/wpa3_ap_ci_crash_v5.1' into 'release/v5.1'
fix(esp_wifi): Fix crash when assoc req comes before confirm is processed

See merge request espressif/esp-idf!29950
2024-04-07 10:35:12 +08:00
368b7eb3fc Merge branch 'fix/add_phy_private_dslp_callback_v5.1' into 'release/v5.1'
fix(esp_hw_support): move deepsleep phy callback before PLL disable (v5.1)

See merge request espressif/esp-idf!30014
2024-04-07 10:24:39 +08:00
581bcf46b5 Merge branch 'bugfix/fix_ble_power_save_ci_v5.1' into 'release/v5.1'
fix(ble): fix conn error of ble power save ci test(v5.1)

See merge request espressif/esp-idf!29823
2024-04-03 19:03:29 +08:00
a1471a9291 Merge branch 'bugfix/aud-5252_v5.1' into 'release/v5.1'
backport v5.1: fix the issue of modem hang caused by incorrect configuration of power and isolate signals

See merge request espressif/esp-idf!30008
2024-04-03 19:03:09 +08:00
54ad993fe9 Merge branch 'feature/add_cli_in_openthread_sleep_example_v5.1' into 'release/v5.1'
feat(openthread): add cli in openthread sleep example (backport v5.1)

See merge request espressif/esp-idf!29596
2024-04-03 19:02:32 +08:00
f839fa089a fix(esp_hw_support): Fix the flash I/DROM region PMP protection 2024-04-03 15:51:39 +05:30
b0d7c5ac40 fix(esp_hw_support): move deepsleep phy callback before PLL disable 2024-04-03 14:11:18 +08:00
4254953374 fix(esp_hw_support): fixed modem hang caused by incorrect configuration of power and isolate signals 2024-04-03 10:49:31 +08:00
a64d8b12c8 fix(esp_wifi): Fix crash when assoc req comes before confirm is processed 2024-04-03 00:04:14 +05:30
d7c4968d3c feat(ble): add cca related config in c6, h2 and c2 2024-04-02 19:55:37 +08:00
8e140779e7 change(ble): support ble light sleep using ext 32k xtal on C2 2024-04-02 19:55:36 +08:00
zwl
142af33ded ble: update esp32c2 lib to 7a428d35 2024-04-02 19:25:51 +08:00
zwl
056754317c ble: update esp32h2 and esp32c6 lib to 39c6e050 2024-04-02 19:25:37 +08:00
90cf9c42d7 ble : adjust the log initialization sequence of ESP32C6 and ESP32H2 2024-04-02 19:25:10 +08:00
4c896cbb3a fix(i2c): fix issues related to timeout and alive interval tick
Fixes https://github.com/espressif/esp-idf/issues/4999

Former usage of I2C_CMD_ALIVE_INTERVAL_TICK macro overrode the ticks_to_wait
parameter when the latter was too big
2024-04-02 10:43:00 +08:00
d1baafb8c0 Merge branch 'bugfix/fix_call_to_header_event_callback_v5.1' into 'release/v5.1'
fix: Fix call to event_handler on on_header state of HTTP Client (v5.1)

See merge request espressif/esp-idf!29955
2024-04-01 20:41:02 +08:00
ce225dfc1a Revert "fix(esp_http_client): Call event_handler after header value is received"
This reverts commit 04ac8e43db.

Fixes https://github.com/espressif/esp-idf/issues/13497
Fixes https://github.com/espressif/esp-idf/issues/13097
2024-04-01 13:19:57 +05:30
a355214a16 Merge branch 'bugfix/fix_coex_ld_issue_v5.1' into 'release/v5.1'
fix(wifi): fix coex ld issue (v5.1)

See merge request espressif/esp-idf!29916
2024-04-01 14:08:58 +08:00
92a184d482 Merge branch 'bugfix/dpp_example_init_error_v5.1' into 'release/v5.1'
fix(wifi/example): Fix dpp example init error (v5.1)

See merge request espressif/esp-idf!29860
2024-03-29 19:47:50 +08:00
6c015fd05e fix(wifi): fix coex ld issue 2024-03-28 21:19:27 +08:00
c218c35439 fix(wifi/example): Fix dpp example init error
Set wifi mode before calling esp_supp_dpp_init.

Closes https://github.com/espressif/esp-idf/pull/12769

Signed-off-by: Shreyas Sheth <shreyas.sheth@espressif.com>
2024-03-27 11:21:20 +05:30
27b553eb38 fix(ble): fix ci ble powe save test addresss error 2024-03-25 15:59:32 +08:00
d23b7a0361 Merge branch 'bugfix/wps_reg_regression_v5.1' into 'release/v5.1'
fix(esp_wifi): Fixed regression caused by 02d6704a when wpa_supplicant debug logs enabled (!29701)

See merge request espressif/esp-idf!29754
2024-03-22 13:53:44 +08:00
c642c72713 Merge branch 'bugfix/fix_softap_coex_start_issue_v5.1' into 'release/v5.1'
fix(wifi): fix softap coex start issue, no wifi request if wifi is not used at idle

See merge request espressif/esp-idf!29771
2024-03-22 10:46:26 +08:00
01548764f6 fix(wifi): fix softap coex start issue, no wifi request if wifi is not used at idle 2024-03-21 19:16:55 +08:00
d2b674622c fix(esp_wifi): Fix regression caused by 02d6704a when supplicant logs enabled 2024-03-20 11:03:20 +05:30
9f7eacb089 Merge branch 'fix/ci_flash_counter_v5.1' into 'release/v5.1'
fix(spi_flash): Fix spi_flash counter test on CI (backport v5.1)

See merge request espressif/esp-idf!29710
2024-03-19 11:54:42 +08:00
29f78cea74 Merge branch 'feature/refactor_ftm_code_v5.1' into 'release/v5.1'
Refactor and improve FTM code (Backport v5.1)

See merge request espressif/esp-idf!29713
2024-03-19 11:39:48 +08:00
16a80db4d0 feat(esp_wifi): Refactor and improve FTM code
Enable FTM Responder mode for ESP32C6. Update wifi libs with below -

1. Break FTM State Machine code into separate functions
2. Use dynamic allocation for FTM session to save memory
3. Add API to get FTM report instead of event based mechanism
4. Add FTM Request retry and comeback support
2024-03-18 21:33:02 +05:30
aead2f3205 Merge branch 'bugfix/wps_crash_issue_v5.1' into 'release/v5.1'
fix(wpa_supplicant): Avoid dereferencing a dangling function pointer in WPS (Backport v5.1)

See merge request espressif/esp-idf!29701
2024-03-18 21:23:26 +08:00
9afa5e53c0 fix(spi_flash): Fix spi_flash counter test on CI 2024-03-18 20:23:55 +08:00
4bdbb79b34 Merge branch 'bugfix/add_authmode_wpa_wpa2_wpa3_psk_v5.1' into 'release/v5.1'
esp_wifi: Handle case when AP advertises WPA, WPA2 and WPA3 securities simultaneously and other bugfixes (Backport v5.1)

See merge request espressif/esp-idf!29689
2024-03-18 19:49:15 +08:00
f12d65357f Merge branch 'bugfix/flash_enc_write_ram_v5.1' into 'release/v5.1'
fix(spi_flash): Fix that internal RAM has no enough space to put all stuff inside (backport v5.1)

See merge request espressif/esp-idf!29657
2024-03-18 19:41:32 +08:00
4325d5c9c5 fix(bt): fix gcc 13.1.0 warnings 2024-03-18 14:55:22 +05:30
02d6704a30 fix(wpa_supplicant): Improve execution flow for WPS registrar public APIs
Make sure that WPS registrar public APIs do not modify supplicant
data in application task context. Execute API functionlity in eloop
context to prevent protential race conditions.
2024-03-18 12:44:59 +05:30
e1502fb99e fix(wifi): Avoid dereferencing a dangling function pointer in WPS supplicant
Avoid dereferencing a dangling function pointer in 'eap_server_sm_deinit()'.
This issue arises when hostap unregisteres EAP methods before it removes
the server state machine for station.
2024-03-18 12:44:53 +05:30
a02adef4f6 fix(example): fixed app partition is too small for binary size 2024-03-18 14:15:45 +08:00
d9b42232bd fix(esp_wifi): Improvements in scan and connect path
* Improvements in scan and connect path as per specifications along with
  minor bugfixes
* When AP advertises all PSK modes (WPA, WPA2 and WPA3), make sure that
  station treats it as WPA2_WPA3_PSK mixed mode.
2024-03-18 14:15:45 +08:00
7d16878564 Merge branch 'bugfix/make_coexist_callback_safe_v5.1' into 'release/v5.1'
fix(bt/controller): Fixed some bugs in esp32 bt controller (v5.1)

See merge request espressif/esp-idf!29683
2024-03-18 11:30:57 +08:00
819fbf9a68 Merge branch 'bugfix/cve-2023-52160_v5.1' into 'release/v5.1'
fix(wpa_supplicant): (PEAP client) Update Phase 2 auth requirements (v5.1)

See merge request espressif/esp-idf!29676
2024-03-17 19:24:44 +08:00
19dd33854b Merge branch 'backport5.1/openthread_2024_3_14' into 'release/v5.1'
openthread modifications backport to 5.1

See merge request espressif/esp-idf!29653
2024-03-17 08:21:12 +08:00
8af8f5840c Merge branch 'bugfix/fix_the_spiram_malloc_issue_in_wifi_mesh_v5.1' into 'release/v5.1'
fix(wifi): fixed the spiram malloc issue in wifi mesh (v5.1)

See merge request espressif/esp-idf!29630
2024-03-15 20:11:20 +08:00
c90f4fce9c fix(bt/controller): Fixed some bugs in esp32 bt controller
1. fixed crash issue in coexist callback
2. fixed wrong LMP message send when expect peer device increase tx power to max
2024-03-15 19:08:51 +08:00
88cd813311 feat(openthread): support configuring indicator color of openthread device 2024-03-15 17:38:44 +08:00
7155146f9c fix(vfs): fix eventfd select 2024-03-15 17:38:28 +08:00
089113c6db Merge branch 'doc/update_espnow_doc_v5.1' into 'release/v5.1'
docs(wifi): Updated the LMK description in ESP-NOW (v5.1)

See merge request espressif/esp-idf!29670
2024-03-15 17:23:56 +08:00
6f9cc06b30 fix(wpa_supplicant): (PEAP client) Update Phase 2 auth requirements
The previous PEAP client behavior allowed the server to skip Phase 2
authentication with the expectation that the server was authenticated
during Phase 1 through TLS server certificate validation. Various PEAP
specifications are not exactly clear on what the behavior on this front
is supposed to be and as such, this ended up being more flexible than
the TTLS/FAST/TEAP cases. However, this is not really ideal when
unfortunately common misconfiguration of PEAP is used in deployed
devices where the server trust root (ca_cert) is not configured or the
user has an easy option for allowing this validation step to be skipped.

Change the default PEAP client behavior to be to require Phase 2
authentication to be successfully completed for cases where TLS session
resumption is not used and the client certificate has not been
configured. Those two exceptions are the main cases where a deployed
authentication server might skip Phase 2 and as such, where a more
strict default behavior could result in undesired interoperability
issues. Requiring Phase 2 authentication will end up disabling TLS
session resumption automatically to avoid interoperability issues.

Allow Phase 2 authentication behavior to be configured with a new phase1
configuration parameter option:
'phase2_auth' option can be used to control Phase 2 (i.e., within TLS
tunnel) behavior for PEAP:
 * 0 = do not require Phase 2 authentication
 * 1 = require Phase 2 authentication when client certificate
   (private_key/client_cert) is no used and TLS session resumption was
   not used (default)
 * 2 = require Phase 2 authentication in all cases
2024-03-15 13:22:10 +05:30
30d070ea72 docs(wifi): Updated the LMK description in ESP-NOW
Closes https://github.com/espressif/esp-idf/issues/12976
2024-03-15 15:10:09 +08:00
0bef269ac0 Merge branch 'fix/fix_curses_py312_v5.1' into 'release/v5.1'
Fix Access Violation Error on Windows with Python 3.12 (v5.1)

See merge request espressif/esp-idf!29510
2024-03-15 13:45:00 +08:00
b2123cc7ff Merge branch 'bugfix/sdspi_acmd41_arg_v5.1' into 'release/v5.1'
fix(sdmmc): fixes for card initialization (ACMD41) (v5.1)

See merge request espressif/esp-idf!29377
2024-03-15 13:44:39 +08:00
59d686ed3c Merge branch 'bugfix/fix_maximum_value_of_config_rtc_clk_cal_cycles_bug_v5.1' into 'release/v5.1'
ESP All Chip: fixed the maximum value of config RTC_CLK_CAL_SYCLES bug (v5.1)

See merge request espressif/esp-idf!29649
2024-03-15 13:44:18 +08:00
8d3b3dfefa Merge branch 'bugfix/fix_some_wifi_coexist_issue_v5.1' into 'release/v5.1'
fix(coex): fix some wifi coexist issue v5.1

See merge request espressif/esp-idf!29660
2024-03-15 12:27:58 +08:00
9eb22e688c Merge branch 'bugfix/fix_fastmem_slowmem_lost_data_bug_v5.1' into 'release/v5.1'
[C3/S3]Fix sleep fast_mem & slow_mem may lost bug (v5.1)

See merge request espressif/esp-idf!29641
2024-03-15 11:30:44 +08:00
4885b77b47 Merge branch 'bugfix/fix_s3_bbpll_cali_fail_bug_v5.1' into 'release/v5.1'
fix: fix s3 bbpll calibration fail bug (v5.1)

See merge request espressif/esp-idf!29645
2024-03-15 11:30:22 +08:00
7f2dfdb38e fix(wifi): fixed the spiram malloc issue in wifi mesh
Closes https://github.com/espressif/esp-idf/issues/13285
2024-03-15 11:12:44 +08:00
583c8665f4 feat(coex): support to scan long time on channel, fix coexist sync issue 2024-03-15 10:49:18 +08:00
c8901276b7 example: add custom partition table for mesh manual networking 2024-03-15 10:49:18 +08:00
dfebf6cbbe feat(coex): improve Wi-Fi connecting compatibility at coexistence 2024-03-15 10:49:18 +08:00
cb0fd9010b fix(clk): clear all lpclk source at clk init 2024-03-15 10:49:18 +08:00
3e526ef774 Merge branch 'bugfix/supplicant_disconnect_process_v5.1' into 'release/v5.1'
esp_wifi: Fix bug in esp_wifi_deauthenticate_internal() & wpa_supplicant: Add parameter to configure reason code of deauth frame  (Backport v5.1)

See merge request espressif/esp-idf!29622
2024-03-14 22:08:25 +08:00
e1eaa7b5d3 Merge branch 'feat/move_ag_cb_malloc_to_btc_v5.1' into 'release/v5.1'
feat(bt/bluedroid): Moved the memory allocation of HF AG control blocks to BTC module (v5.1)

See merge request espressif/esp-idf!29632
2024-03-14 21:10:26 +08:00
723519cf67 fix(spi_flash): Fix that internal RAM has no enough space to put all stuff inside 2024-03-14 19:40:14 +08:00
5340a56af1 fix(spi_flash): Improve encryption write performance, Closes https://github.com/espressif/esp-idf/issues/12553 2024-03-14 19:38:11 +08:00
zwx
85ae8bfd5a fix(openthread): using atomic variable for buffer count 2024-03-14 17:18:16 +08:00
zwx
65b652ad34 feat(openthread): enable RCP uart configuration for BR by default 2024-03-14 17:18:05 +08:00
9f8e6dff24 feat(openthread): add different led color for openthread devices 2024-03-14 17:17:22 +08:00
d50b336afd fix: fix_maximum_value_of_config_rtc_clk_cal_cycle_bug 2024-03-14 16:12:17 +08:00
3b7a934498 fix: fix s3 bbpll cali fail bug 2024-03-14 15:45:37 +08:00
9680d3fa81 fix: fix sleep fast_mem & slow_mem may lost bug 2024-03-14 15:03:49 +08:00
7be8274b3a Merge branch 'fix/support_gcm_soft_fallback_for_non_aes_ciphers_v5.1' into 'release/v5.1'
fix(mbedtls/gcm): Add support for software fallback for non-AES ciphers in a GCM operation (v5.1)

See merge request espressif/esp-idf!29251
2024-03-14 14:02:11 +08:00
344c5d1fce fix(wifi): fix bug in 'esp_wifi_deauthenticate_internal' and other improvements 2024-03-14 11:24:27 +05:30
e5059dffec fix(wpa_supplicant): Add some bugfixes in wpa_supplicant
1) Add parameter to configure reason code of deauth frame
2) Add logs to indicate MIC failure 4-Way-Handshake
3) Process RSNXE capabilities only if AP advertises them
2024-03-14 11:23:05 +05:30
f21038666a Merge branch 'update/littlefs_demo_example_v5.1_v2' into 'release/v5.1'
LittleFS demo example added & Update/littlefs demo example (v5.1) v2

See merge request espressif/esp-idf!29450
2024-03-14 13:49:53 +08:00
7c20d54953 fix(sdmmc): extend the maximum number of retries of ACMD41
According to the application note in SD Card Physical Specification:

> The host shall set ACMD41 timeout more than 1 second to abort repeat
of issuing ACMD41 when the card does not indicate ready. The timeout
count starts from the first ACMD41 which is set voltage window
in the argument.

Previously, the timeout was exactly one second, and this caused
certain larger-capacity cards to "time out", because they couldn't
finish initialization process in time.
2024-03-14 13:49:23 +08:00
7ff2886c84 fix(sdmmc): use correct argument for ACMD41 in SPI mode
ACMD41 argument is different between SD mode and SPI mode.
In SPI mode, the only non-zero bit may be the HCS bit. Unlike the SD
mode, the bits reflecting the host's OCR should be zero.
Previously, we used to set these bits the same way as for the SD mode.
This has caused certain cards to fail initializing, apparently their
controllers have checked the ACMD41 argument more strictly and refused
to finish initialization, resulting in an error such as

    sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107

(Note that this error may have other causes than the one fixed in
this commit. For example, if the card doesn't have a sufficient and
stable power supply, it may also fail to complete the internal
initialization process, and will never clear the busy flag in R1
response.)

Closes https://github.com/espressif/esp-idf/issues/6686
Closes https://github.com/espressif/esp-idf/issues/10542
2024-03-14 13:49:23 +08:00
5059908d08 Merge branch 'fix/fatfs_sdmmc_triming_v5.1' into 'release/v5.1'
fix(storage/fatfs): check whether sdcard supports trimming (v5.1)

See merge request espressif/esp-idf!28336
2024-03-14 13:47:00 +08:00
2d900158ce Merge branch 'ci/create_esp-dockerfile_MR_after_tools.json_updated_v5.1' into 'release/v5.1'
CI: created job and script for creating MR to esp-dockerfiles, added script execution to CI pipeline (v5.1)

See merge request espressif/esp-idf!28130
2024-03-14 13:46:24 +08:00
0fcd6a7c73 feat(bt/bluedroid): Moved the memory allocation of HF AG control blocks to BTC module 2024-03-14 10:53:11 +08:00
8b48f33304 Merge branch 'bugfix/reduce_memory_footprint_of_sae_pk_v5.1' into 'release/v5.1'
fix(wifi): Reduce memory footprint for scan when SAE-PK is enabled (v5.1)

See merge request espressif/esp-idf!27654
2024-03-14 10:52:50 +08:00
96888a9ad6 Merge branch 'bugfix/flash_mxic_chip_v5.1' into 'release/v5.1'
fix(spi_flash): Fix MXIC chip flash size detected wrong (backport v5.1)

See merge request espressif/esp-idf!29611
2024-03-14 10:46:13 +08:00
374e54ca78 Merge branch 'bugfix/workaround_reset_eof_counter_c3_v5.1' into 'release/v5.1'
fix(adc): workaround to fix adc continuous get less results on c3 (v5.1)

See merge request espressif/esp-idf!29137
2024-03-14 10:44:23 +08:00
077a966fb0 Merge branch 'contrib/github_pr_13034_v5.1' into 'release/v5.1'
docs(nimble): Fixed typo in examples/bluetooth/nimble/blehr/README (GitHub PR) (v5.1)

See merge request espressif/esp-idf!29616
2024-03-13 23:47:08 +08:00
9706e5a274 Merge branch 'bugfix/nvs_lock_initi_and_multipage_blob_v5.1' into 'release/v5.1'
Bugfix/nvs Improved handling of BLOB during unreliable power environment and concurrent data access scenarios (v5.1)

See merge request espressif/esp-idf!29321
2024-03-13 23:10:02 +08:00
0c26579d2b Merge branch 'feature/add_doc_for_p4_v5.1' into 'release/v5.1'
docs(nimble): Added gpio configuration table for esp32p4 (v5.1)

See merge request espressif/esp-idf!29600
2024-03-13 20:37:42 +08:00
b884b3788e Merge branch 'bugfix/update_disabling_hmac_jtag_method_v5.1' into 'release/v5.1'
fix(esp_hw_support): update hmac toggle method due to discrepency in ROM code (v5.1)

See merge request espressif/esp-idf!29531
2024-03-13 20:20:52 +08:00
db2a037329 Merge branch 'bugfix/hpm_dc_default_disabled_v5.1' into 'release/v5.1'
spi_flash: fixed issue that enabling HPM-DC by default may cause app unable to restart (v5.1)

See merge request espressif/esp-idf!26656
2024-03-13 19:50:59 +08:00
9bada8c1da Merge branch 'save_twdt_to_coredump_v5.1' into 'release/v5.1'
feat(coredump): save twdt panic output to coredump elf file (v5.1)

See merge request espressif/esp-idf!29509
2024-03-13 19:50:17 +08:00
ed4d8752c1 Update README.md
Fix typo
2024-03-13 17:09:31 +05:30
4af88f7458 fix(spi_flash): Fix MXIC chip flash size detected wrong,
Closes https://github.com/espressif/esp-idf/issues/12222
2024-03-13 18:51:36 +08:00
663d42f5be Merge branch 'feat/newlib-add-aligned-alloc_v5.1' into 'release/v5.1'
feat(newlib): Add definition of aligned_alloc to heap.c (backport v5.1)

See merge request espressif/esp-idf!29471
2024-03-13 17:52:51 +08:00
a8a178a480 Merge branch 'docs/esp_event_doc_fix_v5.1' into 'release/v5.1'
docs(esp_event): Fixed mistake in API docs (v5.1)

See merge request espressif/esp-idf!29564
2024-03-13 17:51:50 +08:00
c045e98092 Merge branch 'contrib/github_pr_12785_v5.1' into 'release/v5.1'
Provide ulp_adc_deinit() API to fix ADC1 handle leakage (GitHub PR) (v5.1)

See merge request espressif/esp-idf!28456
2024-03-13 17:31:19 +08:00
d6105439b7 docs(nimble): Added gpio configuration table for esp32p4 2024-03-13 14:02:49 +05:30
8507136b58 feat(openthread): add cli in openthread sleep example 2024-03-13 14:53:43 +08:00
b1586cc041 fix(tcp_transport): Fix coverity report regarding tcp_transport 2024-03-13 11:25:12 +05:30
1d8b484cce fix(esp_wifi): Reduce memory footprint for scan when SAE-PK is enabled
Use bss information cached in wifi library to get RSNXE capabilities
instead of storing bss information again in supplicant and accessing it.
2024-03-13 10:48:07 +05:30
5710425216 Merge branch 'bugfix/reconnect_host_based_v5.1' into 'release/v5.1'
fix(nimble): Added ble_host_rpa_enabled flag for address resoultion for esp32 (v5.1)

See merge request espressif/esp-idf!29570
2024-03-13 12:55:07 +08:00
9ceabe7959 Merge branch 'docs/fix_spiram_mistake_v5.1' into 'release/v5.1'
docs(heap): Fixed mistake in the heap allocator docs (v5.1)

See merge request espressif/esp-idf!29589
2024-03-13 11:32:06 +08:00
1a50f0863b Merge branch 'bugfix/fix_modbus_tcp_slave_examples_use_events_v51' into 'release/v5.1'
fix(examples/modbus): fix modbus slave examples may process event flags incorrectly (Backport v5.1)

See merge request espressif/esp-idf!28248
2024-03-13 10:56:26 +08:00
123f8e6714 fix(examples/modbus): fix modbus slave examples may process event flags incorrectly (Backport v5.1) 2024-03-13 10:56:26 +08:00
9fe40d424d Merge branch 'bugfix/ble_update_lib_20240306_v5.1' into 'release/v5.1'
update lib on release/v5.1

See merge request espressif/esp-idf!29436
2024-03-13 10:18:33 +08:00
0a0c74ae1b docs(heap): Fixed mistake in the heap allocator docs
Closes https://github.com/espressif/esp-idf/issues/13353
2024-03-13 09:46:54 +08:00
1794471b57 Merge branch 'docs/remove_ulp_deep_sleep_example_v5.1' into 'release/v5.1'
docs(deep_sleep): removed mentions of ULP in deep sleep example readme (v5.1)

See merge request espressif/esp-idf!29575
2024-03-13 09:26:01 +08:00
c3f335817b fix(nvs): Fixed Page::findItem performance degradation caused by wrong condition before hash map use
The condition enabling use of hash map when page is searched for Item was modified
to correct the bug introduced by commit addressing delete of any BLOB_INDEX Items.
This correction returns the performance of findItem to the state before previous change.
2024-03-12 16:27:36 +01:00
2acac6b848 fix(nvs): Adopted CMakeLists for host test if IDF v5.1 2024-03-12 16:27:36 +01:00
0d3bbed981 fix(nvs): Improved lockig mechanism for initialization phase 2024-03-12 16:27:36 +01:00
a1750801f6 fix(nvs): eraseMultiPageBlob to robustly delete all related BLOB_DATA records and respect VER_ANY 2024-03-12 16:27:36 +01:00
66b2a50066 fix(nvs): corrected findItem to return BLOB_DATA when chunkIndex = CHUNK_ANY 2024-03-12 16:27:36 +01:00
9a9ef9d843 fix(nvs): added check and erase of mismatched BLOB_DATA on init 2024-03-12 16:27:36 +01:00
ee836d236f fix(nvs): prevent out of bounds write if blob data is inconsistent 2024-03-12 16:27:36 +01:00
86ec111525 fix(nimble): Added ble_host_rpa_enabled flag for address resoultion for esp32 2024-03-12 20:53:43 +05:30
a4916eb8a6 Merge branch 'bugfix/fix_strict_prototype_hid_v5.1' into 'release/v5.1'
fix(nimble): Address compilation errors when strict-prototype is enabled (v5.1)

See merge request espressif/esp-idf!29541
2024-03-12 23:00:59 +08:00
3991a987f1 Merge branch 'bugfix/fix_some_wifi_bugs_240311_v5.1' into 'release/v5.1'
fix(wifi): fix some wifi issues(Backport v5.1)

See merge request espressif/esp-idf!29565
2024-03-12 22:44:19 +08:00
7a235d5bae feat: LittleFS bump version to 1.14.2 2024-03-12 20:58:14 +08:00
61b5121c38 feat: LittleFS bump version to 1.13.0 2024-03-12 20:58:14 +08:00
0bec1976b1 feat(example/storage/littlefs): add LittleFS demo example 2024-03-12 20:58:14 +08:00
ec16fa7dd5 fix(wifi): fix some amsdu issue
1. fix qos encapsulated eapol issue
2. fix qos eapol eb data length issue
3. eapol arp and dhcp add flag PP_F_PER_PKT_RATE
4. fix lmac_stop_hw_txq issue
5. limit the number of sub amsdu
6. fix recycle cache sub amsdu eb issue
2024-03-12 19:01:09 +08:00
4ae8d2179d fix(wifi): fix lmac_stop_hw_txq issue 2024-03-12 19:01:09 +08:00
0aadc3ec2a fix(wifi): fix some wifi issues
1. fix qos encapsulated eapol issue
2. fixed dhcp offer and dhcp ack data rates
2024-03-12 19:01:09 +08:00
becd279fd7 fix(example): fixed app partion is too small for binary size 2024-03-12 19:01:09 +08:00
b7e382e0a5 fix(wifi): fix smart config bssid set issue 2024-03-12 19:01:09 +08:00
5d1b6b7b99 feat(coredump): save twdt panic output to coredump elf file 2024-03-12 10:40:29 +01:00
7b04776d13 Merge branch 'fix/bbpll_usb_link_error_backport5.1' into 'release/v5.1'
fix(esp_phy): Allow WiFi/USB interference workaround option only on supported targets (backport v5.1)

See merge request espressif/esp-idf!29480
2024-03-12 16:28:51 +08:00
af31783225 docs(deep_sleep): removed mentions of ULP in deep sleep example readme
Updated readme to reflect that ULP is no longer a part of this examples
functionality.

Closes https://github.com/espressif/esp-idf/issues/13340
2024-03-12 16:12:15 +08:00
77ffead00a ci(mbedtls/gcm): Added test to verify software fallback for non-AES cipher GCM operations 2024-03-12 13:35:54 +05:30
2c85399da0 fix(mbedtls/gcm): Add support for software fallback for non-AES ciphers in a GCM operation
- Even if the config MBEDTLS_HARDWARE_AES is enabled, we now support fallback
to software implementation of GCM operations when non-AES ciphers are used.
2024-03-12 13:35:49 +05:30
46ba89c8be Merge branch 'feature/export_bat_exit_codes_v5.1' into 'release/v5.1'
feat(tools): produce correct err code in install/export .bat scripts (v5.1)

See merge request espressif/esp-idf!29545
2024-03-12 15:12:15 +08:00
8cb2aa4fd3 fix(esp_hw_support): update hmac toggle method due to discrepency in ROM code
Need to update the HMAC enable/disable method due to discrepancy in ROM code
across different targets for the ets_hmac_disable() API.
2024-03-12 12:27:39 +05:30
7c82811e70 feat(newlib): Add definition of aligned_alloc to heap.c
Add the definition of aligned_alloc to the list of
definitions provided by heap.c.

Note that memalign (strictly equivalent) to aligned_alloc
is already defined in heap.c.
2024-03-12 14:07:53 +08:00
f93025b7f9 Merge branch 'feat/exposed_gap_service_macros_to_menuconfig_v5.1' into 'release/v5.1'
feat(nimble): Exposed macros used by GAP service to menuconfig (v5.1)

See merge request espressif/esp-idf!29505
2024-03-12 12:22:23 +08:00
fcd6cfdde5 Merge branch 'backport5.1/openthread_example_configurations' into 'release/v5.1'
fix(openthread): configurations for openthread examples(backport 5.1)

See merge request espressif/esp-idf!29533
2024-03-12 11:18:40 +08:00
e524ab1ede Merge branch 'bugfix/fix_task_wdt_in_mplen_clear_v5.1' into 'release/v5.1'
fix(wifi):fix issues that in mplen clear and esp_wifi_set_mode(Backport v5.1)

See merge request espressif/esp-idf!29530
2024-03-12 10:56:54 +08:00
b0fb3bbe01 Merge branch 'bugfix/fix_some_ble_bugs_240310_v5.1' into 'release/v5.1'
Bugfix/fix some ble bugs 240310 v5.1(backport v5.1)

See merge request espressif/esp-idf!29518
2024-03-12 10:56:25 +08:00
635ab30377 Merge branch 'coredump_refactoring_v5.1' into 'release/v5.1'
Coredump refactoring (v5.1)

See merge request espressif/esp-idf!29502
2024-03-12 10:54:35 +08:00
8519d3c509 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.1' into 'release/v5.1'
Fixed some BLE bugs 2403 (backport v5.1)

See merge request espressif/esp-idf!29466
2024-03-12 10:54:06 +08:00
d7649cbc4d change(ulp): added test for ulp adc init/deinit 2024-03-12 10:52:06 +08:00
39a5f73a75 fix(ulp_adc): Provide ulp_adc_deinit() API to fix ADC1 handle leakage 2024-03-12 10:52:06 +08:00
6ab8948502 doc(spi_flash): hide unsupported optional features 2024-03-12 10:48:08 +08:00
194ea85ee8 spi_flash: fixed issue that enabling HPM-DC by default may cause app unable to restart 2024-03-12 10:48:08 +08:00
311c899bee docs(esp_event): Fixed mistake in API docs
Closes https://github.com/espressif/esp-idf/issues/13346
2024-03-12 10:33:10 +08:00
dc384fcb4d Merge branch 'bugfix/gap_connect_failed_with_0x0d_v5.1' into 'release/v5.1'
fix(nimble): Revise the help section for the Kconfig macro BLE_RPA_TIMEOUT (v5.1)

See merge request espressif/esp-idf!29493
2024-03-11 23:10:55 +08:00
9ddaaca46d Merge branch 'bugfix/add_esp_timer_get_expiry_time_v5.1' into 'release/v5.1'
fix(nimble): Add support for esp_timer_get_expiry_time to nimble porting layer (v5.1)

See merge request espressif/esp-idf!29463
2024-03-11 22:36:26 +08:00
bdfa644d5f Merge branch 'feature/usb_hs_periodic_scheduler_v5.1' into 'release/v5.1'
feat(usb/host): Update ISOC scheduler for HS endpoints (backport 5.1)

See merge request espressif/esp-idf!29398
2024-03-11 21:20:35 +08:00
2f89804e5c fix(esp_phy): Allow WiFi/USB interference workaround option only on supported targets
"Enable USB when phy init" Kconfig option would call esp_phy function
`phy_bbpll_en_usb()` that is not implemented for all targets.
Selecting this option for unsupported target results in linking error.

The necessity of this workaround is now defined soc_caps.h rather than
in the Kconfig.

Closes https://github.com/espressif/esp-idf/issues/12185
2024-03-11 20:21:54 +08:00
e78e9a9558 Merge branch 'bugfix/expose_baud_rate_in_menu_v5.1' into 'release/v5.1'
fix(nimble): Exposed the baud rate for hci uart in menuconfig (v5.1)

See merge request espressif/esp-idf!29489
2024-03-11 20:09:45 +08:00
74e3970cfe feat(nimble): Exposed macros used by GAP service to menuconfig (v5.1) 2024-03-11 17:25:30 +05:30
ab7708bdee fix(nimble): Address compilation errors when strict-prototype is enabled 2024-03-11 17:22:13 +05:30
cac867d92e Merge branch 'feat/read_multiple_variable_length_v5.1' into 'release/v5.1'
feat(nimble): read multiple variable length characteristics (v5.1)

See merge request espressif/esp-idf!29129
2024-03-11 19:50:03 +08:00
b5425ffa5c feat(bt/bluedroid): Add ext adv and privacy status check 2024-03-11 18:03:26 +08:00
2fc2876109 fix(bt/bluedroid): Fixed "reprot" typo in esp_ble_gap_ext_adv_reprot_t 2024-03-11 18:03:26 +08:00
01cd47c663 fix(bt/example): Use correct struct type 2024-03-11 18:03:26 +08:00
dc63404d06 fix(bt/blufi): Fixed BluFi module link error(C++ hybrid compilation) 2024-03-11 18:03:26 +08:00
7d197cfd0d fix(bt/bluedroid): Fixed crash when calculating GATTS database hash 2024-03-11 18:03:26 +08:00
c2528a0eff fix(bt): Update bt lib for ESP32(5ea2fca)
- Fixed HCI command status event sending for disconnect command
- Fixed LE transmitter test command param check
2024-03-11 18:03:26 +08:00
91589676fc fix(bt/controller): Fixed 3 esp32 bt controller bugs
update esp32 bt-lib (952debf4)

1. Increased the length of queue for coexist requestions
2. fix(bt/controller): Cleared BT SNIFF when no connections exists
3. fix(bt/controller): Corrected a typo in coex module
2024-03-11 18:03:26 +08:00
b098010c1e fix(bt): Update bt lib for ESP32(2de69f3)
- Fixed HCI command status event send when LLCP busy
2024-03-11 18:03:26 +08:00
672775bc17 fix(ble/bluedroid): Fixed BLE BLE periodic advertising parameter check 2024-03-11 18:01:27 +08:00
2e34e6c02c fix(ble/bluedroid): Fixed BLE crash when repeatedly initialize and deinitialize host 2024-03-11 18:01:27 +08:00
7ec19d4268 refactor(espcoredump): simplify uart/flash write flow 2024-03-11 17:12:41 +08:00
210d06e7e4 refactor(espcoredump): replace uart and flash callbacks with aliases 2024-03-11 17:12:41 +08:00
25e69d8f01 refactor(espcoredump): keep checksum context in coredump stack 2024-03-11 17:12:41 +08:00
b3b87e1b47 feat(tools): produce correct err code in export/install .bat scripts
Plus unify labels to begin with underscore
2024-03-11 10:02:50 +01:00
zwl
78c72ca62b ble(update):
Update h2 lib to d0218de8
Update c6 lib to d0218de8
2024-03-11 15:49:59 +08:00
9b32ce4903 fix(nimble): Add support for esp_timer_get_expiry_time to nimble porting layer 2024-03-11 12:58:27 +05:30
4febc6ef70 Merge branch 'bugfix/fix_esp_wifi_scan_start_memory_leakage_issue_v5.1' into 'release/v5.1'
fix(wifi): fix esp_wifi_scan_start memory leakage issue(Backport v5.1)

See merge request espressif/esp-idf!29476
2024-03-11 15:27:54 +08:00
1b5ada37a8 fix(openthread): configurations for openthread examples 2024-03-11 14:09:38 +08:00
e9fcccf271 Merge branch 'bugfix/mbo_api_flag_v5.1' into 'release/v5.1'
fix(wpa_supplicant):Add MBO config flag for mbo apis(v5.1)

See merge request espressif/esp-idf!28697
2024-03-11 14:04:45 +08:00
0a3407f379 fix(nimble): Revise the help section for the Kconfig macro BLE_RPA_TIMEOUT 2024-03-11 10:22:02 +05:30
13141a060b Merge branch 'features/uart_host_only_tut_v5.1' into 'release/v5.1'
docs(nimble): Improved documentation for uart host only example (v5.1)

See merge request espressif/esp-idf!29491
2024-03-11 12:51:09 +08:00
88605c0ae0 fix(nimble): Exposed the baud rate for hci uart in menuconfig 2024-03-11 10:20:43 +05:30
e5058945ea feat(nimble): read multiple variable length characteristics (v5.1) 2024-03-11 10:19:31 +05:30
52224d1d32 fix(wifi):fix issues that in mplen clear and esp_wifi_set_mode 2024-03-11 12:18:39 +08:00
02d5b43f4c feat(example): modify iperf sdkconfig to imporve iperf performance 2024-03-11 12:16:58 +08:00
3a2f9feec3 fix(wifi): fix esp_wifi_scan_start memory leakage issue
Closes https://github.com/espressif/esp-idf/issues/10693
2024-03-11 10:49:18 +08:00
181e305b52 Merge branch 'ci/fix_lwip_default_test_app_v5.1' into 'release/v5.1'
ci: build default app for lwip test app

See merge request espressif/esp-idf!29506
2024-03-11 10:45:04 +08:00
b5c19506d1 fix(wpa_supplicant):Add MBO config flag for mbo apis 2024-03-11 10:43:49 +08:00
590c650fc0 Merge branch 'fix/pmp_idcache_reg_prot_v5.1' into 'release/v5.1'
fix(esp_hw_support): Fix the I/DCACHE region PMP protection (v5.1)

See merge request espressif/esp-idf!29357
2024-03-08 22:50:10 +08:00
c19dfc68d9 fix(menuconfig): Prevent Access violation on Windows with Python 3.12
Closes https://github.com/espressif/esp-idf/issues/13232
2024-03-08 14:25:35 +01:00
bddf56e3d0 ci: build default app for lwip test app 2024-03-08 11:06:21 +01:00
50a2d34be6 Merge branch 'feature/ble_mesh_example_light_driver_v5.1' into 'release/v5.1'
feat: replace lightdriver, and support more chips in ble mesh examples(backport v5.1)

See merge request espressif/esp-idf!29456
2024-03-08 14:57:51 +08:00
d6f6f8117c docs(nimble): Improved documentation for uart host only example 2024-03-08 10:32:45 +05:30
2365871f18 feat: replace lightdriver, and support more chips in ble mesh examples 2024-03-07 10:22:00 +08:00
4d26988f72 Merge branch 'revert-2374a0c0' into 'release/v5.1'
Revert "Merge branch 'update/littlefs_demo_example_v5.1' into 'release/v5.1'"

See merge request espressif/esp-idf!29445
2024-03-07 04:30:18 +08:00
0cbe0e0e5f Revert "Merge branch 'update/littlefs_demo_example_v5.1' into 'release/v5.1'"
This reverts merge request !28452
2024-03-06 18:34:14 +01:00
10a0dd5322 Merge branch 'enable_flash_elf_sha_tests_v5.1' into 'release/v5.1'
Enable SHA256 coredump flash integrity verification for all targets (v5.1)

See merge request espressif/esp-idf!29039
2024-03-06 22:48:52 +08:00
37c5d1a6cf Merge branch 'feature/ble_mesh_example_light_driver_v5.1' into 'release/v5.1'
feat: replace lightdriver, and support more chips in ble mesh examples(backport v5.1)

See merge request espressif/esp-idf!28920
2024-03-06 20:14:48 +08:00
e994071089 feat: replace lightdriver, and support more chips in ble mesh examples 2024-03-06 14:18:53 +08:00
7452f30907 Merge branch 'bugfix/struct_init_order_blemesh_v5.1' into 'release/v5.1'
ble_mesh: example: fix the structure init order to meet C++ requirements(backport v5.1)

See merge request espressif/esp-idf!28927
2024-03-06 14:09:50 +08:00
9f1922d59e Merge branch 'bugfix/heap_task_includes_v5.1' into 'release/v5.1'
fix(heap): fixed missing include in esp_heap_task_info.h (v5.1)

See merge request espressif/esp-idf!29117
2024-03-06 10:20:04 +08:00
43956831c2 Merge branch 'bugfix/fix_phy_pll_track_corner_case_backport_51' into 'release/v5.1'
fix(phy): fix pll track when enabling and disabling PHY frequently(Backport V5.1)

See merge request espressif/esp-idf!29387
2024-03-05 12:36:37 +08:00
19022e0904 Merge branch 'contrib/github_pr_13025_v5.1' into 'release/v5.1'
Missing include for rom/uart.h (GitHub PR) (v5.1)

See merge request espressif/esp-idf!29361
2024-03-05 12:02:36 +08:00
1f1d252e76 Merge branch 'fix/openthread_alarm_timer_overflow_v5.1' into 'release/v5.1'
fix(openthread): fix openthread alarm timer calculation remaining_us overflow issue (backport v5.1)

See merge request espressif/esp-idf!29391
2024-03-05 11:10:12 +08:00
1f1d2b0559 Merge branch 'fix/idf_tools_diff_python_dir_v5.1' into 'release/v5.1'
fix(tools): Add additional Python environment checks (v5.1)

See merge request espressif/esp-idf!29383
2024-03-05 11:00:43 +08:00
8aa5610689 Merge branch 'bugfix/fix_flash_encryption_rom_c3_v5.1' into 'release/v5.1'
fix(spi_flash): Fix issue that flash encryption failed while rom_impl config is enabled (backport v5.1)

See merge request espressif/esp-idf!29351
2024-03-05 11:00:07 +08:00
44fa82c7c3 Merge branch 'feature/support_gdma_retention_v5.1' into 'release/v5.1'
feature: support gdma retention in pd_top lightsleep (v5.1)

See merge request espressif/esp-idf!29089
2024-03-05 10:59:30 +08:00
f87ee9c4ec Merge branch 'bugfix/fix_c6_wakeup_access_flash_v5.1' into 'release/v5.1'
fix(hal): fix esp32c6 clock bug workaround access flash in wakeup process (v5.1)

See merge request espressif/esp-idf!29245
2024-03-05 10:58:14 +08:00
3052c5a461 Merge branch 'fix/segger_sysview_build_v5.1' into 'release/v5.1'
fix(app_trace): Fix SystemView build (v5.1)

See merge request espressif/esp-idf!24709
2024-03-05 10:52:35 +08:00
603268efe1 Merge branch 'bugfix/update_spp_doc_v5.1' into 'release/v5.1'
docs(bt/bluedroid): update API documents of SPP (v5.1)

See merge request espressif/esp-idf!29171
2024-03-05 10:49:24 +08:00
2d2bfc1962 Merge branch 'feat/reduce_usage_of_iram_when_bt_in_single_mode_v5.1' into 'release/v5.1'
change(bt/bluedroid): Redirect app functions in controller based on the bluetooth mode(backport v5.1)

See merge request espressif/esp-idf!29305
2024-03-05 10:48:17 +08:00
69c8490537 Merge branch 'bugfix/fix_issues_in_mesh_and_scan_v5.1' into 'release/v5.1'
fix issues in wifi and lwip (v5.1)

See merge request espressif/esp-idf!29187
2024-03-05 10:47:59 +08:00
50eea052a3 Merge branch 'contrib/github_pr_13294_v5.1' into 'release/v5.1'
Flush rgb lcd PSRAM framebuffers after allocation (GitHub PR) (v5.1)

See merge request espressif/esp-idf!29394
2024-03-05 10:45:40 +08:00
005e6656be Merge branch 'feature/add_new_pkg_and_flash_psram_efuses_v5.1' into 'release/v5.1'
feat(efuse): Add flash&psram efuses for S3 (v5.1)

See merge request espressif/esp-idf!29143
2024-03-05 10:34:18 +08:00
66e6e7c925 Merge branch 'feat/usb_host_set_device_config_v5.1' into 'release/v5.1'
USB Host: Add enumeration callback filter (backport v5.1)

See merge request espressif/esp-idf!28548
2024-03-05 09:47:56 +08:00
a8bd637e73 feat(coredump): use SHA ROM functions for all targets except ESP32
For ESP32, continue using mbedtls due to a required ROM patch for the SHA implementation.
For other targets, we can now leverage the ROM functions.
2024-03-04 15:21:58 +01:00
e3e112e612 Merge branch 'fix/examples_format_sd_card_disable_v5.1' into 'release/v5.1'
fix(examples): Disable formatting SD cards in storage examples by default (v5.1)

See merge request espressif/esp-idf!29004
2024-03-04 20:48:45 +08:00
c1f26cca62 Merge branch 'bugfix/increase_reattempt_conn_count_v5.1' into 'release/v5.1'
fix(nimble): Increase range of reattempt connection count (v5.1)

See merge request espressif/esp-idf!29341
2024-03-04 19:44:11 +08:00
2374a0c04e Merge branch 'update/littlefs_demo_example_v5.1' into 'release/v5.1'
LittleFS demo example added (v5.1)

See merge request espressif/esp-idf!28452
2024-03-04 19:42:31 +08:00
0417eec03e Merge branch 'fix/console_none_build_issues_v5.1' into 'release/v5.1'
fix(console): Fix build issues when CONFIG_ESP_CONSOLE_NONE is enabled (v5.1)

See merge request espressif/esp-idf!29339
2024-03-04 18:04:10 +08:00
afc3ee80e1 fix(esp_lcd): Flush rgb lcd PSRAM framebuffers after allocation
Flush PSRAM framebuffers after allocation to avoid visual corruption.

Merges https://github.com/espressif/esp-idf/pull/13294
Closes https://github.com/espressif/esp-idf/issues/13293
2024-03-04 17:39:22 +08:00
c64d0be428 feat(usb/host): Update ISOC scheduler for HS endpoints
USB-OTG uses 'sched_info' field of HCTSIZ register to schedule transactions
in USB microframes.
2024-03-04 09:59:50 +01:00
6c9a7da5db fix(openthread): fix openthread alarm timer calculation remaining_us overflow issue 2024-03-04 15:12:15 +08:00
zwx
006c058df5 fix(phy): fix pll track when enabling and disabling PHY frequently 2024-03-04 14:49:32 +08:00
975a86bf8a Merge branch 'bugfix/usb_host_usbh_callback_misses_action_v5.1' into 'release/v5.1'
fix(usb): Fix bug where usbh_process() misses an event (v5.1)

See merge request espressif/esp-idf!29365
2024-03-04 11:37:55 +08:00
cbfdec3e6d Merge branch 'staging/espcoredump_move_strings_flash_v5.1' into 'release/v5.1'
change(espcoredump): save RAM space by placing constants in flash (backport v5.1)

See merge request espressif/esp-idf!29191
2024-03-04 11:21:27 +08:00
594c61add4 fix(wifi): fixed scan and mesh deinit issues
1. update scan ap number when clear scan ap records
2. wait for child disconnect when mesh deinit
2024-03-04 10:25:04 +08:00
aefc33b2ce fix(lwip): Fixed debug format, added ci test config
Detailed description of the changes:
  - lwip_debug: Fixed string format error in ip6 and napt (espressif/esp-lwip@f5c43549)
  - dns: fix init with only ipv4 enabled (espressif/esp-lwip@5aab73d7)
2024-03-04 10:25:04 +08:00
dc39b40145 feat(lwip): add fall back dns config in menuconfig 2024-03-04 10:25:04 +08:00
4a21a629c6 fix(tools): Add additional Python installation checks
Warn if IDF_PYTHON_ENV_PATH set to a suspicious path with
different ESP-IDF version and/or Python version.

Fail if the virtual environment was created for a different ESP-IDF
version.

Closes https://github.com/espressif/esp-idf/issues/13196
2024-03-01 16:01:03 +01:00
d22c95a3a8 Merge branch 'refactor/protocomm_public_hdr_v5.1' into 'release/v5.1'
refactor(protocomm): Make the protocomm `proto-c` headers public (v5.1)

See merge request espressif/esp-idf!29359
2024-03-01 21:42:08 +08:00
9ed7c8b426 feat(tools/test_apps): Add violation tests for the flash I/DROM region
- For SoCs supporting PMP
2024-03-01 17:57:17 +05:30
67c4eac799 Merge branch 'bugfix/backport_ble_fixes_v5.1' into 'release/v5.1'
Bugfix/backport ble fixes v5.1

See merge request espressif/esp-idf!29291
2024-03-01 20:24:41 +08:00
54f22f7c43 feat(docs): added usb host enumeration filter description
- CN and EN docs
2024-03-01 10:15:09 +01:00
e87bb08216 feat(us/host): set device cfg during enumeration
- user callback funciton to set device configuration
      as a part of usb_host_install
    - callback provides device descriptor of a device being enumerated
    - user can set which cfg descriptor the USB device will be set with
    - user can filter device enumeration
    - Kconfig menu to enable callback function
    - usb_host_lib example demonstration
2024-03-01 10:15:02 +01:00
e8c901b144 docs: update cn trans usb_host.rst 2024-03-01 09:04:20 +01:00
4236416774 feat(docs): added USB Host Stack Configuration description 2024-03-01 09:04:20 +01:00
86aaec48a0 fix(nimble): fixed missing controller disabled guard in esp_nimble_deinit 2024-03-01 12:54:53 +05:30
fbbf6d2708 fix(nimble): Merge hci_common.h file for all chips 2024-03-01 12:54:53 +05:30
e7302b533c fix(nimble): Corrected acl data handling code in bleprph_host_only 2024-03-01 12:54:53 +05:30
39c27275c8 feat(nimble): Nimble Host only mode over uart 2024-03-01 12:54:53 +05:30
85befcc45d feat(nimble): client presentation and aggregate format descriptor support 2024-03-01 12:54:53 +05:30
90c029494f feat(nimble): signed write support 2024-03-01 12:54:53 +05:30
0dbfe37505 feat(nimble): additional AD types for advertisements 2024-03-01 12:54:53 +05:30
5b0c32e37f feat(nimble): authorization permission on gatt read and write 2024-03-01 12:54:53 +05:30
b62d94b2a4 fix(nimble): allow auto connection and observer role 2024-03-01 12:54:53 +05:30
39624549e8 Merge branch 'ci/new-known_failure_cases_workflow(v5.1)' into 'release/v5.1'
ci: change known_failure_cases workflow(v5.1)

See merge request espressif/esp-idf!27966
2024-03-01 15:03:48 +08:00
f21a43b622 fix(uart): add missing include for rom/uart.h
Without this include it fails to compile with this error:

```
esp/esp-idf-v5.2/components/esp_rom/include/esp32/rom/uart.h:262:32: error: implicit declaration of function 'UART_STATUS_REG' [-Werror=implicit-function-declaration]
  262 |         status = READ_PERI_REG(UART_STATUS_REG(uart_no));
```

Merges https://github.com/espressif/esp-idf/pull/13025
2024-03-01 14:36:50 +08:00
bda0a44eaf refactor(protocomm): Make the protocomm proto-c headers public 2024-03-01 10:26:42 +05:30
5fcd908d26 refactor(esp_hw_support): Remove redundant PMP entry for ROM region
- The ROM text and data sections share the address range
    (see SOC_I/DROM_MASK_LOW - SOC_I/DROM_MASK_HIGH).
  - Initially, we had two PMP entries for this address range - one marking the
    region as RX and the other as R.
  - However, the latter entry is redundant as the former locks the PMP settings.
  - We can divide the ROM region into text and data sections later when we
    define boundaries marking these regions from the ROM.
2024-03-01 10:25:25 +05:30
5173ba1777 fix(esp_hw_support): Fix the I/DCACHE region PMP protection 2024-03-01 10:25:25 +05:30
9df0678421 fix(spi_flash): Fix issue that flash encryption failed while rom_impl config is enabled
The issue is `esp_flash_write_encryped` function in ROM on ESP32C3, ESP32S3
calls legacy implementation, which uses old configuration. And this causes
write fails.
The solution in this commit is to compile and link this function(and related)
in IRAM instead of the ROM one.
The IRAM cost increases around 1.2KB after the fix
2024-03-01 10:51:31 +08:00
ef698857d1 fix(usb): Fix bug where usbh_process() misses an event
This commit fixes a bug where if multiple concurrent USBH API calls trigger
multiple events on the same device, some events will be lost. As a result,
those lost events don't get processed by the subsequent usbh_process() call.
2024-03-01 09:42:57 +08:00
929a8449bd Merge branch 'feature/usb_host_collective_backport_v5.1' into 'release/v5.1'
USB Host: Collective backport to v5.1

See merge request espressif/esp-idf!28096
2024-03-01 09:28:23 +08:00
8fb370f38b Merge branch 'bugfix/fix_http_client_error_v5.1' into 'release/v5.1'
esp_http_client: Fix reset errno to 0 before call esp_transport_read(backport v5.1)

See merge request espressif/esp-idf!28328
2024-02-29 21:57:43 +08:00
00d9861a08 Merge branch 'feature/mmd_access_v5.1' into 'release/v5.1'
esp_eth: Add functions to access PHY using MDIO (v5.1)

See merge request espressif/esp-idf!28840
2024-02-29 20:29:57 +08:00
bf23680ac1 Merge branch 'bugfix/eth_link_reset_v5.1' into 'release/v5.1'
fix(esp_eth): Fixed Ethernet link reset when Ethernet is stopped (v5.1)

See merge request espressif/esp-idf!29329
2024-02-29 19:25:31 +08:00
d771840189 fix(nimble): Increase range of reattempt connection count 2024-02-29 15:57:46 +05:30
08079631eb change(console): Add build test for no console output
This commit adds a build test to test the scenario where both the primary and
secondary console outputs are disabled by Kconfig.
2024-02-29 17:48:08 +08:00
e82ae7787d fix(console): Fix build issues when CONFIG_ESP_CONSOLE_NONE is enabled
This commit fixes the following build issues when CONFIG_ESP_CONSOLE_NONE is
enabled:

- esp_console_repl.c will have 'defined but unused' warnings on various console
functions.
- esp_console_repl.c does not use "TAG" when CONFIG_ESP_CONSOLE_NONE is
enabled, leading to a "defined by not used" warning.

Closes https://github.com/espressif/esp-idf/issues/12984
2024-02-29 17:48:07 +08:00
b65563f7f7 Merge branch 'bugfix/esp_intr_free_v5.1' into 'release/v5.1'
fix(esp_hw_support): Fix esp_intr_free when task has no core affinity (v5.1)

See merge request espressif/esp-idf!29194
2024-02-29 12:44:38 +08:00
fd859d8931 fix(esp_http_client): Add test case in esp_http_client example
Add a test case in esp_http_client example to test HTTP_METHOD_HEAD
with async mode
2024-02-29 12:00:58 +08:00
jim
2060f3a645 esp_http_client: Fix reset errno to 0 before call esp_transport_read
Closes https://github.com/espressif/esp-idf/issues/9020
2024-02-29 12:00:58 +08:00
ba14fc20d3 Merge branch 'bugfix/fix_adc_reset_issue_on_legacy_v5.1' into 'release/v5.1'
fix(adc): fix adc continuous get less results beacuse do not reset apb clk(legacy) (v5.1)

See merge request espressif/esp-idf!28333
2024-02-29 10:25:28 +08:00
c4f114d671 Merge branch 'bugfix/bunch_tsens_v5.1' into 'release/v5.1'
fix(temperature_sensor): Fix the value is incorrect if disable and enable again (backport v5.1)

See merge request espressif/esp-idf!28625
2024-02-29 10:24:17 +08:00
226a4d39cf Merge branch 'bugfix/cannot_jump_range_v5.1' into 'release/v5.1'
fix(temperature_sensor): Cannot switch the range smmothly on esp32h2(backport v5.1)

See merge request espressif/esp-idf!29153
2024-02-29 10:20:52 +08:00
e9ab9f3c38 Merge branch 'bugfix/ip101_reset_timing_v5.1' into 'release/v5.1'
fix(esp_eth): ip101-specific reset_hw to match reset timings from datasheet (v5.1)

See merge request espressif/esp-idf!29012
2024-02-28 23:11:03 +08:00
746fd01aea fix(esp_eth): Fixed Ethernet link reset when Ethernet is stopped 2024-02-28 15:49:26 +01:00
2b07dbf875 Merge branch 'bugfix/fix_blufi_deinit_v5.1' into 'release/v5.1'
Blufi : Corrected blufi host deinit API (v5.1)

See merge request espressif/esp-idf!29000
2024-02-28 17:51:57 +08:00
48777e7983 Merge branch 'change/usb_host_minor_optimizations_v5.1' into 'release/v5.1'
change(usb/host): Remove unecessary features (v5.1)

See merge request espressif/esp-idf!27594
2024-02-28 17:20:18 +08:00
b0107bdbd7 Merge branch 'bugfix/ble_update_lib_20240223_v5.1' into 'release/v5.1'
update lib on release/v5.1

See merge request espressif/esp-idf!29209
2024-02-28 16:54:19 +08:00
cc9932c7ef docs(bt/bluedroid): update API documents of SPP 2024-02-28 16:22:15 +08:00
58606027da feat(usb/host): Calculate FIFO sizes based on USB configuration 2024-02-28 16:09:53 +08:00
2ba1790ef6 refactor(usb): Deprecate CONFIG_USB_OTG_SUPPORTED, use SOC_USB_OTG_SUPPORTED instead
Previously, USB build dependencies used the CONFIG_USB_OTG_SUPPORTED. However,
they could depend on `soc_caps.h` instead.
2024-02-28 16:09:53 +08:00
d837836f84 refactor(hal/usb): Rename usb_fsls_phy API to match header/source names
Note: Also fixed some formatting issues in usb_wrap_struct.h
2024-02-28 16:09:52 +08:00
148cc6e75d refactor(hal/usb): Rename usb_phy files to usb_fsls_phy
This commit renames USB PHY related HAL files from "usb_phy_xxx" to
"usb_fsls_phy_xxx" since they are only designed to support Full-Speed/Low-Speed
Serial USB PHYs. This renmaing is done to accommodate future USB PHYs that use
other PHY interfaces (e.g., UTMI, ULPI etc).
2024-02-28 16:09:52 +08:00
f524a59875 refactor(hal/usb): Remove usage of old USB OTG config macros 2024-02-28 16:09:51 +08:00
b32a735bb0 refactor(soc/host): Update USB OTG struct fields
This commit updates the "*_struct.h" files for the USB OTG peripheral:

- Added/removed some missing/non-existing register fields
- Added "reserved" place holders for registers that are missing due to IP
configuration.
- Added "usb_dwc_cfg.h" listing the USB OTG IP configuration for each target.
- Updated LL/HAL according to register field updates. Also tidied up the include
directives in those headers.
2024-02-28 16:09:51 +08:00
177eb9f6c6 refactor(hal/usb): Fix USB OTG compilation dependency
Update "hal/CMakeLists.txt" so that USB OTG related HAL files depend on
the "SOC_USB_OTG_SUPPORTED" capability.
2024-02-28 16:09:51 +08:00
dc27d5456f refactor(usb/host): reformat code with astyle 2024-02-28 16:09:50 +08:00
d26320d8a1 fix(usb/host): Correctly parse bInterval field in HighSpeed EP descriptors
For LS and FS interrupt endpoint: interval = bInterval
For isochronous and HS interrupt endpoint: interval = 2^(bInterval-1)
2024-02-28 16:09:50 +08:00
388360cc5a fix(usb/host): Correctly parse MPS fields in HighSpeed EP descriptors
Bits [11,12] in HighSpeed periodic endpoints specify
the number of additional transaction opportunities per microframe
2024-02-28 16:09:49 +08:00
7cfe2274d2 Merge branch 'bugfix/fix_ble_max_reconnect_v5.1' into 'release/v5.1'
fix(ble/bluedroid): Update maximum BLE reconnection attempts configuration(backport v5.1)

See merge request espressif/esp-idf!29223
2024-02-28 15:41:08 +08:00
73654741c3 Merge branch 'contrib/github_pr_12867_v5.1' into 'release/v5.1'
fix(esp32): Removed rogue semicolon in #define in esp_smartconfig.h (GitHub PR) (v5.1)

See merge request espressif/esp-idf!29112
2024-02-28 15:32:04 +08:00
9025e440ae fix(temperature_sensor): Cannot switch the range smmothly on esp32h2 2024-02-28 12:39:07 +08:00
30095494be fix(tsens): 300us delay in phy cause extra power consumption 2024-02-28 12:36:04 +08:00
6932e5958b fix(tsens,adc): Fix issue that disable adc will make temperature sensor crash,
Closes https://github.com/espressif/esp-idf/issues/12921
2024-02-28 12:35:59 +08:00
c205bbf90f fix(temperature_sensor): Fix the value is incorrect if disable and enable again
Closes https://github.com/espressif/esp-idf/issues/12864
2024-02-28 12:35:53 +08:00
bbb7c4c756 Merge branch 'feature/usb_hs_support_v5.1' into 'release/v5.1'
feat(usb/host): Add High Speed enumeration types (backport v5.1)

See merge request espressif/esp-idf!28059
2024-02-28 11:46:17 +08:00
37e0e8ab53 Merge branch 'bugfix/soft_uart_send_dummy_byte_v5.1' into 'release/v5.1'
fix(peripheral_drivers/dedicated_gpio): Remove dummy byte from the emulate_uart_send routine (backport v5.1)

See merge request espressif/esp-idf!28687
2024-02-28 11:43:38 +08:00
92b25c06b3 Merge branch 'bugfix/fix_incorrect_regbase_name_of_i2s_v5.1' into 'release/v5.1'
fix(i2s): fixed incorrect reg base name on C3 (v5.1)

See merge request espressif/esp-idf!28630
2024-02-28 11:41:58 +08:00
c48ddea0f6 Merge branch 'contrib/github_pr_13020_v5.1' into 'release/v5.1'
fix (esp_lcd): Don't assume panels are 16bit in VSYNC restart logic (GitHub PR) (v5.1)

See merge request espressif/esp-idf!28812
2024-02-28 11:40:46 +08:00
bfd1cfd382 Merge branch 'feature/rmt_encoder_memory_allocator_v5.1' into 'release/v5.1'
feat(rmt): added a help function for allocating encoder memory (v5.1)

See merge request espressif/esp-idf!28791
2024-02-28 11:39:58 +08:00
6e44d4ebfc Merge branch 'bugfix/mcpwm_reset_generator_gpio_v5.1' into 'release/v5.1'
fix(mcpwm): reset GPIO used by generator after delete (v5.1)

See merge request espressif/esp-idf!28832
2024-02-28 11:39:02 +08:00
bb66e97518 Merge branch 'feature/bytes_encoder_config_update_v5.1' into 'release/v5.1'
feat(rmt): support update bytes encoder configurations at runtime (v5.1)

See merge request espressif/esp-idf!28382
2024-02-28 11:38:29 +08:00
a74edb7bbb Merge branch 'contrib/github_pr_12963_v5.1' into 'release/v5.1'
fix misformatted link (GitHub PR) (v5.1)

See merge request espressif/esp-idf!28755
2024-02-28 11:38:16 +08:00
55c5c8367b Merge branch 'bugfix/soc_cpu_subsys_region_v5.1' into 'release/v5.1'
fix(soc): change debug addr range to CPU subsystem range (v5.1)

See merge request espressif/esp-idf!28672
2024-02-28 11:16:48 +08:00
467780474f Merge branch 'bugfix/fix_double_free_coc_v5.1' into 'release/v5.1'
fix(nimble): Removed double free of packet (v5.1)

See merge request espressif/esp-idf!29032
2024-02-28 11:14:40 +08:00
2e9916bf7c Merge branch 'feat/support_get_bluedroid_status_v5.1' into 'release/v5.1'
Support get status of bluedroid host (backport v5.1)

See merge request espressif/esp-idf!28882
2024-02-28 11:14:10 +08:00
d1ad4b57de Merge branch 'bugfix/ble_mesh_ble_advtype_v5.1' into 'release/v5.1'
ble_mesh: update ble mesh ble adv type(backport v5.1)

See merge request espressif/esp-idf!28917
2024-02-28 11:13:18 +08:00
eca249f41a Merge branch 'bugfix/ble_mesh_deinit_reinit_v5.1' into 'release/v5.1'
feat: ble mesh: improve ble mesh deinit when nimble enable(backport v5.1)

See merge request espressif/esp-idf!28925
2024-02-28 11:12:53 +08:00
0cc6903e15 Merge branch 'feature/spi_eth_no_int_v5.1' into 'release/v5.1'
feat(esp_eth): added SPI Ethernet module polling mode (v5.1)

See merge request espressif/esp-idf!29045
2024-02-28 11:11:01 +08:00
ab894a1086 Merge branch 'bugfix/spi_eth_recv_alloc_v5.1' into 'release/v5.1'
fix(esp_eth): improved SPI Ethernet _alloc_recv_buf error handling (v5.1)

See merge request espressif/esp-idf!29082
2024-02-28 11:10:38 +08:00
c404e951e3 Merge branch 'docs/rf_coexistence_api_guides_support_esp32c2_v5.1' into 'release/v5.1'
Docs: RF coexistence api guides support esp32c2 (v5.1)

See merge request espressif/esp-idf!29214
2024-02-28 11:09:29 +08:00
8b7bd28549 Merge branch 'feat/flash_enc_encrypt_app_image_of_size_image_length_v5.1' into 'release/v5.1'
feat(bootloader_support): Encrypt only the app image instead of the whole partition (v5.1)

See merge request espressif/esp-idf!28266
2024-02-28 10:57:45 +08:00
76152c80a2 Merge branch 'c6_auto_dbias_master_hsq_v5.1' into 'release/v5.1'
ESP32C6: Active & sleep dbg and dbias get from efuse to fix the voltage (v5.1)

See merge request espressif/esp-idf!28722
2024-02-28 10:49:13 +08:00
2f6c902be8 Merge branch 'ci/enable_ip101_jobs_v5.1' into 'release/v5.1'
ci(esp_eth): enabled Ethernet ip101 jobs (v5.1)

See merge request espressif/esp-idf!28611
2024-02-28 10:45:11 +08:00
956797efbd Merge branch 'feature/gatt_caching_support_v5.1' into 'release/v5.1'
feat(nimble): Gatt caching support (v5.1)

See merge request espressif/esp-idf!28512
2024-02-28 10:44:38 +08:00
96f44688aa Merge branch 'bugfix/fix_wrong_dcache_0_size_issue_on_s2_v5.1' into 'release/v5.1'
fix(cache): fix wrong dcache size 0 configuration issue on s2 (v5.1)

See merge request espressif/esp-idf!28288
2024-02-28 10:43:55 +08:00
1553b5b1d1 Merge branch 'feature/case_for_ot_sleepy_ci' into 'release/v5.1'
ci(openthread): add a test case for openthread sleepy device

See merge request espressif/esp-idf!28280
2024-02-28 10:41:10 +08:00
88b8f533cd Merge branch 'bugfix/BLEQABR23-577' into 'release/v5.1'
Resolve BLEQABR23-577 "Bugfix/" Prevent the generation of link ID as 0.

See merge request espressif/esp-idf!28185
2024-02-28 10:40:26 +08:00
1b5d4f8d3e Merge branch 'fix/build_failure_when_hardware_gcm_is_disabled_v5.1' into 'release/v5.1'
fix(mbedtls/gcm): Fix build failure when config `MBEDTLS_HARDWARE_GCM` is disabled (v5.1)

See merge request espressif/esp-idf!29068
2024-02-28 10:34:51 +08:00
82a36ee753 change(bt/bluedroid): Redirect app functions in controller based on the bluetooth mode 2024-02-28 09:40:15 +08:00
d8e82c3890 Merge branch 'register_gcov_tick_hook_once_v5.1' into 'release/v5.1'
fix(gcov): avoid multiple tick hook registration (v5.1)

See merge request espressif/esp-idf!29273
2024-02-27 22:16:55 +08:00
cfc893f125 Merge branch 'bugfix/fix_coex_lib_circular_dependency_v5.1' into 'release/v5.1'
fix(esp_coex): fix circular dependency issue on esp32 (v5.1)

See merge request espressif/esp-idf!29156
2024-02-27 20:01:45 +08:00
f9db462a46 Merge branch 'bugfix/fix_dangling_pointer_in_remove_bond_list_section_v5.1' into 'release/v5.1'
fix(bt/bluedroid): fix dangling pointer issue when logging removed section (backport v5.1)

See merge request espressif/esp-idf!28962
2024-02-27 20:01:11 +08:00
44da2b9fbd Merge branch 'bugfix/bootloader_custom_rtc_data_crc_v5.1' into 'release/v5.1'
fix(bootloader): add legacy retained memory CRC calculation (backport v5.1)

See merge request espressif/esp-idf!28936
2024-02-27 20:00:55 +08:00
69900de25d Merge branch 'bugfix/ble_bug_backport_20240205_v5.1' into 'release/v5.1'
Bugfix/ble bug backport 20240205 v5.1 (backport v5.1)

See merge request espressif/esp-idf!28900
2024-02-27 20:00:24 +08:00
6481fdf05e Merge branch 'bugfix/esp32c2_eap_auth_v5.1' into 'release/v5.1'
fix(wifi): Added low heap usage Kconfig option for eap enterprise (v5.1)

See merge request espressif/esp-idf!28825
2024-02-27 19:59:52 +08:00
f8a1cf930e Merge branch 'feature/supplicant_bss_extmem_v5.1' into 'release/v5.1'
WiFi: Add support to move supplicant BSS to external memory (v5.1)

See merge request espressif/esp-idf!28744
2024-02-27 19:59:38 +08:00
c8d47c167a Merge branch 'bugfix/no_wakeup_sleep_v5.1' into 'release/v5.1'
fix(ble): Fixed Bluetooth not waking up due to clock drift(v5.1)

See merge request espressif/esp-idf!28721
2024-02-27 19:59:26 +08:00
ffd34ba04a Merge branch 'bugfix/bod_threshold_v5.1' into 'release/v5.1'
fix(bod): Fix BOD threshold value on ESP32H2(backport v5.1)

See merge request espressif/esp-idf!28624
2024-02-27 19:58:51 +08:00
2817a67c94 Merge branch 'ble_dev/added_ble_power_save_pytest_v5.1' into 'release/v5.1'
Added pytest case for BLE power save example v5.1

See merge request espressif/esp-idf!28595
2024-02-27 19:58:17 +08:00
69695c23da Merge branch 'bugfix/spp_disc_connect_btqabr2023_156_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fixed SPP connection failure(v5.1)

See merge request espressif/esp-idf!28536
2024-02-27 19:57:55 +08:00
00db642b52 Merge branch 'bugfix/fix_dtm_tx_count_v5.1' into 'release/v5.1'
Update bt lib for ESP32-C3 and ESP32-S3(30b57c45)(backport v5.1)

See merge request espressif/esp-idf!28879
2024-02-27 19:09:08 +08:00
ebbacf49cf Merge branch 'bugfix/fix_esp_http_client_build_failure_with_wifi_v5.1' into 'release/v5.1'
fix: fix esp_http_client_example build failure (v5.1)

See merge request espressif/esp-idf!28761
2024-02-27 18:49:46 +08:00
13e7052bd2 Merge branch 'bugfix/fix_http_auth_without_qop_v5.1' into 'release/v5.1'
fix(esp_http_client): Fix http digest auth without qop (v5.1)

See merge request espressif/esp-idf!28758
2024-02-27 18:49:40 +08:00
35713b9e25 Merge branch 'bugfix/encrypted_flash_write_safe_addr_v5.1' into 'release/v5.1'
fix(spi_flash): check for safe write address in encrypted flash API (v5.1)

See merge request espressif/esp-idf!29205
2024-02-27 18:27:47 +08:00
a24715d822 feat(bootloader_support): Encrypt only the app image instead of the whole partition
Currently, when flash encryption is enabled, the whole partition gets encrypted.
This can be optimised by encrypting only the app image instead of encrypting the whole partition.

Closes https://github.com/espressif/esp-idf/issues/12576
2024-02-27 18:27:04 +08:00
633b63d6fd fix(bootloader_support): Fix image_length calculation when secure boot v1 is enabled
Fixed the value of the image_length field of the image metadata populated by esp_image_verfiy()
to include the size of the signature sector when Secure Boot V1 is enabled.
2024-02-27 18:27:04 +08:00
dcf187ff76 Merge branch 'feature/update_mbedtls_v5.1' into 'release/v5.1'
feat(mbedtls): updated mbedtls version from 3.5.0 to 3.5.2 (v5.1)

See merge request espressif/esp-idf!28893
2024-02-27 18:26:27 +08:00
7003f1ef0d Merge branch 'bugfix/ota_anti_rollback_checks_2_v5.1' into 'release/v5.1'
feat(bootloader_support): Read secure_version under sha256 protection (v5.1)

See merge request espressif/esp-idf!29060
2024-02-27 18:26:03 +08:00
fe5ccaf2cb Merge branch 'feature/conservative_key_revocation_in_secure_boot_v5.1' into 'release/v5.1'
feat: Add API to verify the bootloader and application image before revoking... (v5.1)

See merge request espressif/esp-idf!28489
2024-02-27 18:25:32 +08:00
b80a694abe Merge branch 'bugfix/rtc_i2c_not_in_od_mode_v5.1' into 'release/v5.1'
fix(ulp_riscv): Updated RTC I2C to use open-drain IOs (v5.1)

See merge request espressif/esp-idf!28932
2024-02-27 18:16:08 +08:00
507880fa32 change(usb/host): Remove some handler function event flags
This commit removes internal event flags in the USB Host Library event handling
functions (i.e., usb_host_lib_handle_events() and usb_host_client_handle_events()).

Previously, these flags were added to reduce the number of times semaphores
were given. However, these flags were removed as the performance gain is
negligible and made the logic more complicated.

For usb_host_client_handle_events(), the following flags were removed:

- Remove 'events_pending' flag. The semaphore is now always given
- Remove 'blocked' flag. The 'handling_events' flag is already sufficient
- Critical sections are now shortened due to simplication of semaphore usage.

For usb_host_lib_handle_events(), the following flags were removed:

- Remove 'process_pending' flag. The semaphore is now always given
- Renamed 'blocked' flag to 'handling_events'
2024-02-27 18:16:00 +08:00
bfc8c3a154 change(usb/host): Remove data buffer headers from URBs
This commit removes the ability to reserve a header in the data buffer of an
allocated URB. The header was required for a now defunct implementation of a
synchronous USB Host library API. Thus, headers are no longer required in
URB data buffers.
2024-02-27 18:15:59 +08:00
ece4e4ec6d fix(esp_wifi): Remove semicolon from SMARTCONFIG_START_CONFIG_DEFAULT
Removed rogue semicolon from SMARTCONFIG_START_CONFIG_DEFAULT() macro. This
fixes build issues when this macro is used via C++ brace initialization.

Closes https://github.com/espressif/esp-idf/pull/12867

[Darian Leung: Updated commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2024-02-27 18:15:04 +08:00
900cf69513 Merge branch 'ci/limit_idf_build_apps_to_1.x' into 'release/v5.1'
ci: limit idf-build-apps version to 1.x in pre-commit config file (5.1)

See merge request espressif/esp-idf!28828
2024-02-27 18:10:22 +08:00
6c9b4e1b09 Merge branch 'docs/esp_event_minor_update_v5.1' into 'release/v5.1'
fix(docs): Minor update to esp_event.rst for improved user experience (v5.1)

See merge request espressif/esp-idf!29124
2024-02-27 17:55:21 +08:00
f62f2cf3a7 Merge branch 'docs/add_cannonical_url_v5.1' into 'release/v5.1'
docs(build): add cannonical stable url to all docs (v5.1)

See merge request espressif/esp-idf!28848
2024-02-27 17:55:08 +08:00
51b461e6b4 Merge branch 'bugfix_lp_i2c_not_in_od_mode_v5.1' into 'release/v5.1'
fix(lp_i2c): Fixed an issue where the LP_I2C IO lines were not in open-drain mode (v5.1)

See merge request espressif/esp-idf!28771
2024-02-27 17:51:37 +08:00
51c263bd8f Merge branch 'bugfix/linenoise_calculates_negative_prompt_len_v5.1' into 'release/v5.1'
fix(console): Fixed linenoise prompt length calculation (v5.1)

See merge request espressif/esp-idf!28527
2024-02-27 17:51:08 +08:00
ba155b0ebd Merge branch 'fix/esp_hw_support_remove_unused_include_dirs_v5.1' into 'release/v5.1'
fix(esp_hw_support): Removed nonexistent include directories from cmake (v5.1)

See merge request espressif/esp-idf!27608
2024-02-27 17:50:51 +08:00
acec4e2af2 Merge branch 'fix/gdbgui_py311_v5.1' into 'release/v5.1'
Tools: Fix support of gdbgui on Unix with Python 3.11 (v5.1)

See merge request espressif/esp-idf!28314
2024-02-27 17:47:15 +08:00
c2274f9ef3 Merge branch 'bugfix/reset_reasons_v5.1' into 'release/v5.1'
Update reset reasons for C6, H2, P4 and C5 (v5.1)

See merge request espressif/esp-idf!29181
2024-02-27 17:47:00 +08:00
47207b68ae Merge branch 'fix/gdbgui_py311_v5.1' into 'release/v5.1'
Tools: Fix support of gdbgui on Unix with Python 3.11 (v5.1)

See merge request espressif/esp-idf!28314
2024-02-27 17:46:48 +08:00
82563d3861 Merge branch 'fix/kconcheck_checks_v5.1' into 'release/v5.1'
fix(kconfcheck): Fixed false-positive indent errors and extended limits (backport v5.1)

See merge request espressif/esp-idf!28569
2024-02-27 17:46:13 +08:00
f85280f0ba Merge branch 'fix/runtool_crcrlf_v5.1' into 'release/v5.1'
fix: save RunTool command output with correct line endings (v5.1)

See merge request espressif/esp-idf!28678
2024-02-27 17:45:52 +08:00
b552d069a1 Merge branch 'fix/harden_hints_parsing_v5.1' into 'release/v5.1'
fix: harden input parsing in component_requirements hint module (v5.1)

See merge request espressif/esp-idf!28711
2024-02-27 17:45:31 +08:00
68debd061f Merge branch 'feature/python-reorder-imports-instead-isort_v5.1' into 'release/v5.1'
feat: Use python-reorder-imports instead of isort (v5.1)

See merge request espressif/esp-idf!28732
2024-02-27 17:45:15 +08:00
4f2de56e11 Merge branch 'fix/py_dep_check_v5.1' into 'release/v5.1'
fix(tools): catch more general errors in python dependency checker (v5.1)

See merge request espressif/esp-idf!29164
2024-02-27 17:44:49 +08:00
66ff0e9455 Merge branch 'feat/bump_up_pre_commit_hook_v5.1' into 'release/v5.1'
fix: Bump up pre-commit hooks version (v5.1)

See merge request espressif/esp-idf!29253
2024-02-27 17:43:10 +08:00
c361705ae7 Merge branch 'update/version_5_1_3' into 'release/v5.1'
Update version to 5.1.3

See merge request espressif/esp-idf!29236
2024-02-27 12:17:40 +08:00
4f26dcfdff fix(gcov): avoid multiple tick hook registration 2024-02-26 14:05:03 +01:00
f185ac42e2 fix(esp_hw_support): Fix esp_intr_free when taks has no core affinity
Closes https://github.com/espressif/esp-idf/issues/12608
2024-02-26 12:05:32 +02:00
8176a00282 fix(bootloader): add legacy retained memory CRC calculation
* Closes https://github.com/espressif/esp-idf/issues/12849

In former versions of ESP-IDF, the user custom memory data in the retained memory
was taken into account during the CRC calculation. This was changed in a later
commit, the custom memory was ignored, therefore this can seen as a breaking change.
This commit gives the possibility to choose between the former (legacy) or
new way of calculating the CRC.
2024-02-26 17:35:57 +08:00
a31bbd11a3 fix: Bump up pre-commit hooks version 2024-02-26 10:34:52 +01:00
54a15b81f9 feat: support cache safe assertion check in sleep process
- Add support for cache safe assertion check to ensure that code expected to be in RAM is in IRAM
2024-02-26 17:24:04 +08:00
12dca8d086 fix(hal): fix esp32c6 clock bug workaround access flash in wakeup process 2024-02-26 11:42:38 +08:00
6519b60c47 fix(peripheral_drivers/dedicated_gpio): Remove dummy byte from the emulate_uart_send routine
Let the user application decide for when to send the dummy byte instead of
hardcoding it from the assembly routine.
2024-02-26 11:42:03 +08:00
9765dd05d6 fix(heap): fixed missing include in esp_heap_task_info.h
Would fail to compile if esp_heap_task_info.h was included without/before freertos includes
2024-02-26 11:26:49 +08:00
e7771c75bd versions: Update version to 5.1.3 2024-02-26 11:09:16 +08:00
c97f5d79d9 ci: enable hardware crypto module for powersave tests 2024-02-23 18:30:22 +08:00
40a869935b feat(esp_hw_support): support gdma register context sleep retention
Closes https://github.com/espressif/esp-idf/issues/12528
2024-02-23 18:30:17 +08:00
zwl
95a2ad919f bugfix(ble) : fixed some ble issues on ESP32-C2 2024-02-23 18:03:24 +08:00
c863eb27da docs: update rf coexistenct api guides
1. support esp32c2
2. fix inconsistency between CN and EN docs of rf coexistence
3. adjust the visibility of some contents based on soc_caps
2024-02-23 16:29:33 +08:00
89881c7c59 fix(esp_coex): add support_coexistence soc_caps for esp32c2 and esp32h2 2024-02-23 16:26:10 +08:00
12131f4b8a fix(ble/bluedroid): Update maximum BLE reconnection attempts configuration 2024-02-23 15:51:05 +08:00
zwl
82b34e3431 ble(update):
Update c2 lib to 79be7ec9
Update h2 lib to c6f7cb08
Update c6 lib to c6f7cb08
2024-02-23 14:07:54 +08:00
f1ced5357f fix(spi_flash): check for safe write address in encrypted flash API 2024-02-23 12:42:37 +08:00
a17ec488d9 fix(tools): catch more general errors in python dependency checker 2024-02-22 15:51:47 +01:00
e7d5fee856 change(espcoredump): save RAM space by placing constants in flash
All the log messages of espcoredump component used to be in DRAM, which would
lower the available RAM space for the user application. Since the cache is always
enabled after an exception, constants can be put in flash.
2024-02-22 18:49:49 +08:00
80378b809e feat(pmu): set fix voltage to different mode for esp32c6 2024-02-22 15:01:14 +08:00
d9a6158700 fix(system): update reset reasons for C6 and H2 2024-02-22 12:36:09 +08:00
905a0d3d01 fix(esp_coex): fix circular dependency issue on esp32
Closes https://github.com/espressif/esp-idf/issues/13113
2024-02-21 19:15:10 +08:00
24f6995fb5 feat(efuse): Add flash&psram efuses for S3 2024-02-21 09:36:49 +02:00
5101e52a36 fix(adc): workaround to fix adc continuous get less results on c3 2024-02-21 13:54:29 +08:00
a66234b6de fix(esp_hw_support): Removed unused include directories from cmake
* Closes https://github.com/espressif/esp-idf/issues/12700
2024-02-21 11:41:11 +08:00
d922d4178f Merge branch 'bugfix/fix_ble_free_all_crash_issue_5.1' into 'release/v5.1'
fix(ble): Fixed the free_all crash on esp32c6 and esp32h2

See merge request espressif/esp-idf!29108
2024-02-20 17:57:42 +08:00
f047237aa5 fix(bootloader_support): check the secure version only for app image
Secure version in the image header is only available for the application
image. However, for certain security workflows, bootloader verifies
itself (own image) and hence the secure version check during that must be
avoided.

Regression introduced in recent commit-id: 3305cb4d

Tested that both secure boot and flash-enc workflows work correctly
with the anti-rollback scenario.
2024-02-20 11:16:56 +02:00
57627f5883 fix(docs): Minor update to esp_event.rst for improved user experience
This commit adds semicolons in c-code blocks in esp_event.rst for
improved user experience when directly copying and pasting code.

Closes https://github.com/espressif/esp-idf/issues/13156
2024-02-20 08:45:38 +01:00
f05aef3ddf fix(ble): Fixed the free_all crash on esp32c6 and esp32h2 2024-02-19 20:17:17 +08:00
931eaf7320 Merge branch 'bugfix/ble_update_lib_20240207_v5.1' into 'release/v5.1'
update lib on release/v5.1

See merge request espressif/esp-idf!28970
2024-02-19 18:12:41 +08:00
41b67e1031 fix(esp_eth): improved SPI Ethernet _alloc_recv_buf error handling 2024-02-16 16:03:59 +01:00
85e18aa755 fix(mbedtls/gcm): Avoid using GCM hardware when config MBEDTLS_HARDWARE_GCM is disabled 2024-02-16 11:55:02 +05:30
7e4d273e45 fix(mbedtls/gcm): Fix build failure when config MBEDTLS_HARDWARE_GCM is disabled 2024-02-16 11:55:01 +05:30
8d8fd2b765 feat(esp_eth): added SPI Ethernet module polling mode
Closes https://github.com/espressif/esp-idf/issues/12682
2024-02-15 14:27:45 +00:00
83ec466b26 fix(ota): additional checks for secure version in anti-rollback case
Some additional checks related to secure version of the application in
anti-rollback case have been added to avoid any attempts to boot lower
security version but valid application (e.g., passive partition image).

- Read secure_version under sha256 protection

- First check has been added in the bootloader to ensure correct secure
  version after application verification and loading stage. This check
  happens before setting up the flash cache mapping and handling over
  the final control to application. This check ensures that application
  was not swapped (e.g., to lower security version but valid image) just
  before the load stage in bootloader.

- Second check has been added in the application startup code to ensure
  that currently booting app has higher security version than the one
  programmed in the eFuse for anti-rollback scenario. This will ensure
  that only the legit application boots-up on the device for
  anti-rollback case.
2024-02-15 15:10:28 +02:00
5b9b27ff75 esp_eth: Add functions to access PHY using MDIO
Specifically:
  - Set/get address
  - Read/write data at address with specified MDIO access function
  - Read/write both address and data with a single call
2024-02-13 12:47:46 +01:00
0b0648eddb fix(nimble): Removed double free of packet 2024-02-13 14:40:51 +05:30
7cb91c19cd fix(esp_eth): ip101-specific reset_hw to match reset timings from datasheet
IP101 requires 10ms reset assertion time and 10ms post-reset delay to properly initialize.
2024-02-09 15:04:12 +01:00
910c82b27c fix(examples): Disable formatting SD cards in storage examples by default 2024-02-08 14:22:45 +01:00
52d36bee61 Blufi : fix blufi deinit 2024-02-08 17:14:00 +05:30
f5a0d5d0bc ble(update):
Update h2 lib to eb112893
Update c6 lib to eb112893
2024-02-07 17:29:32 +08:00
aad082a795 fix(bt/bluedroid): fix dangling pointer issue when logging remove section 2024-02-07 14:58:08 +08:00
34b0450241 ble_mesh: example: fix the structure init order to meet C++ requirements
Closes https://github.com/espressif/esp-idf/issues/8110
2024-02-07 13:05:23 +08:00
88fc51f107 ble_mesh: stack: fix the structure init order to meet C++ requirements 2024-02-07 10:21:31 +08:00
746b8bf98f fix(ulp_riscv): Updated RTC I2C to use open-drain IOs
This commit updates the RTC I2C driver in the ULP RISC-V to initialize
all I2C IOs in open-drain mode.
2024-02-06 08:42:12 +01:00
4a2290fce0 feat: ble mesh: improve ble mesh deinit when nimble enable 2024-02-06 14:44:32 +08:00
31ca7c9a8c ble_mesh: update ble mesh ble adv type 2024-02-06 14:15:53 +08:00
4ae845cd3e fix(rgb_lcd): relax the check for the data line GPIO
There are a bunch of cases you might want some pins not exposed.

Eg.

  * Reading say 8 bit data and outputting the top 5 bits, discarding the rest by not mapping those data pins to output pins

 * Not using hsync/vsync because sync data is embedded within the data bits for more timing flexibility (eg. interlacing).

 * Using the LCD module as a high speed parallel data output bus, with no need for sync/control pins.

Removing this validation makes these cases work.

Merges https://github.com/espressif/esp-idf/pull/13103
2024-02-06 10:35:11 +08:00
add7c68104 feat(ble/controller): Add API to get BLE controller status on ESP32 2024-02-05 16:07:19 +08:00
fd8bfba10a Fixed xQueueSemaphoreTask assert when deinit host during scan 2024-02-05 16:06:37 +08:00
fee1e43f09 feat(mbedtls): updated mbedtls version from 3.5.0 to 3.5.2
This updates the submodule mbedtls to its latest version 3.5.2.
2024-02-05 12:50:43 +05:30
7380f96017 Merge branch 'bugfix/bugfix_for_radio_spinel' into 'release/v5.1'
fix(openthread): fix openthread configurations for radio spinle on 5.1

See merge request espressif/esp-idf!28872
2024-02-05 14:15:15 +08:00
eb4fa7234f Merge branch 'backport/openthread_related_mr_v51' into 'release/v5.1'
Backport openthread fix to v5.1

See merge request espressif/esp-idf!28819
2024-02-05 14:15:00 +08:00
4e4f494ca7 feat(bt/bluedroid): Support get status of bluedroid host 2024-02-04 16:50:36 +08:00
cf1008a064 fix(bt/example): Fixed UART HCI when flow control is off on ESP32C3 2024-02-04 16:50:27 +08:00
ad7a2831b2 feat(bt/bluedroid): Make the max number of bond device to be configurable 2024-02-04 16:50:18 +08:00
a95d480780 fix(ble/controller): Fixed tx count in direct test mode on ESP32-C3 and ESP32-S3
- Fixed tx count in direct test mode on ESP32-C3 and ESP32-S3
- fixed modem sleep enter failed sometimes
2024-02-04 14:30:19 +08:00
f86a5ffb2a fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(91980c2)
- Fixed scheduling when modem sleep wakeup delayed
- Fixed IRQ FIFO overflow when enter critical
- Fixed clock sync timeout for modem sleep
- Fixed directed adv with RPA when privacy disabled
- Fixed instant passed for connection update and PHY update
2024-02-04 14:30:10 +08:00
3c6ee5a957 fix(openthread): fix openthread configurations for radio spinle on 5.1 2024-02-04 11:50:41 +08:00
1e3c43297d docs(build): add cannonical stable url to all docs 2024-02-02 10:36:33 +08:00
8ab2edda00 fix(mcpwm): reset GPIO used by generator after delete
Closes https://github.com/espressif/esp-idf/issues/12980
2024-02-01 17:49:18 +08:00
d2b1e5b577 ci: limit idf-build-apps version to 1.x in pre-commit config file 2024-02-01 09:56:42 +01:00
zwx
5c74483fb6 feat(openthread): disable the rx on when idle in coex scenario 2024-02-01 14:53:57 +08:00
zwx
d117ae0d21 fix(openthread): fix RCP handle timeout crashing issue
* update openthread upstream
2024-02-01 14:17:04 +08:00
zwx
ff1fd81e2f fix(openthread): support uart ISR in IRAM 2024-02-01 14:16:00 +08:00
zwx
1cc34e69d7 fix(802154): fix pending tx will be delayed issue 2024-02-01 14:16:00 +08:00
8a01702d65 fix(wifi): add low memory options for eap enterprise 2024-02-01 10:05:06 +05:30
6319f9ab2c fix(rgb_lcd): don't assume 16 bit width on panels for restart logic
Merges https://github.com/espressif/esp-idf/pull/13020
2024-01-31 18:56:14 +08:00
91b1a362ea feat: Use python-reorder-imports instead of isort 2024-01-31 09:27:47 +01:00
dcf0d5b67c feat(rmt): added a help function for allocating encoder memory
The encoder memory location should respect the RMT_MEM_ALLOC_CAPS,
which is affected by some Kconfig options, like ISR_IRAM_SAFE

Closes https://github.com/espressif/esp-idf/issues/13032
2024-01-30 17:03:54 +08:00
05d196938d fix(bt/bluedroid): Fixed SPP connection failure
The connection failure is caused by the BTU and application layer status being out of sync.
2024-01-30 15:42:39 +08:00
2c9dccc64e fix(ble): Fixed macro definition error for 136K clock drift 2024-01-30 15:37:01 +08:00
75dcda2750 fix(ble): Fixed Bluetooth not waking up due to clock drift 2024-01-30 15:36:53 +08:00
300cd0c34f fix(lp_i2c): Fixed an issue where the LP_I2C IO lines were not in open-drain mode
This commit fixes an issue where in the LP I2C IO lines were not
initialized in open-drain mode.

Closes https://github.com/espressif/esp-idf/issues/12969
2024-01-29 09:48:39 +01:00
6cf7528125 ci: change known_failure_cases workflow 2024-01-29 16:26:28 +08:00
7cbee80fb9 Merge branch 'bugfix/fix_ble_tx_2m_problem_causing_by_phy_wifi_enable_set_v5.1' into 'release/v5.1'
fix(esp_phy): Fixed BLE TX 2M problem causing by phy_wifi_enable_set() (backport v5.1)

See merge request espressif/esp-idf!28679
2024-01-29 14:46:58 +08:00
0b28bdb8f0 Merge branch 'backport/154_receive_handle_done_v5.1' into 'release/v5.1'
Backport/154 receive handle done v5.1

See merge request espressif/esp-idf!28718
2024-01-29 14:30:16 +08:00
276ebe98a0 fix: fix esp_http_client_example build failure
Fixed the build failure of esp_http_client_example for ESP32-C6 when
build with Wi-Fi enabled
2024-01-29 11:36:26 +05:30
3cfbbbd978 fix(esp_http_client): Fix http digest auth without qop
Closes https://github.com/espressif/esp-idf/issues/12962
2024-01-29 11:11:02 +05:30
1daeac210b feat(rmt): support update bytes encoder configurations at runtime
Closes https://github.com/espressif/esp-idf/issues/12775
2024-01-29 13:28:53 +08:00
4ef3261dd3 fix misformatted link 2024-01-29 13:16:01 +08:00
7f39afb373 Merge branch 'h2_auto_dbias_master_hsq_v5.1' into 'release/v5.1'
ESP32H2: Active & sleep dbias get from efuse to fix the voltage (v5.1)

See merge request espressif/esp-idf!28715
2024-01-29 11:21:06 +08:00
71dfc32a98 Merge branch 'bugfix/ble_update_lib_20240125_v5.1' into 'release/v5.1'
Bugfix/ble update lib 20240125 v5.1

See merge request espressif/esp-idf!28709
2024-01-29 10:40:21 +08:00
0cd6a05fdf fix(wifi): Add support to move supplicant BSS to external memory 2024-01-27 10:54:26 +05:30
a5e3e0b90e Merge branch 'bugfix/fix_dynamic_mbedtls_crash_v5.1' into 'release/v5.1'
mbedtls: Fix enable dynamic mbedtls will occur heap corruption when server support TLS renegotiation(backport v5.1)

See merge request espressif/esp-idf!28325
2024-01-26 22:25:24 +08:00
1b4837fb24 docs(ieee802154): add migration note for the receive done handler feature 2024-01-26 17:00:38 +08:00
81ee463f54 feat(ieee802154): make the receive done handler feature mandatory 2024-01-26 17:00:38 +08:00
fa544a6dff feat(ieee802154): remove the ieee802154 lib submodule 2024-01-26 17:00:38 +08:00
918705d6e0 feat(zigbee): Updated Zigbee examples to align with esp-zigbee-lib v1.0.9 2024-01-26 17:00:31 +08:00
15a392cfd9 Merge branch 'backport5.1/openthread_backport' into 'release/v5.1'
some openthread changes backport to release/v5.1

See merge request espressif/esp-idf!28638
2024-01-26 13:37:02 +08:00
9f5cd217a0 feat(pmu): set fix voltage to different mode for esp32h2
h2 remove include
2024-01-26 11:39:16 +08:00
cce3c4a1d5 feat(efuse): Adds new efuses for esp32c6 2024-01-26 11:39:16 +08:00
f7a920685a feat(efuse): Adds new efuse for esp32h2 2024-01-26 11:39:16 +08:00
9f405f2174 fix failure of pre-commit 2024-01-26 10:38:16 +08:00
6133810392 fix: harden input parsing in component_requirements hint module
Currently we silently ignore when the original component is not found
in a hope we can provide at least some meaningful hint. As it turned
out it's not true. Instead of providing misleading hint, just return
error. This adds several checks for situations, which should not happen,
but when they do it should be easier to identify the root cause of the
problem.

For example when hint module received malformed output with extra new
lines, e.g. caused by a bug in RunTool, it wrongly reported the original
component as source component.

This should also fix the tests on Windows.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-01-25 14:20:22 +01:00
0fc2e77017 feat(hints): use all_component_info from project_description.json
Currently the component_requirements hint module does not work
as expected if the component list for a project is trimmed down.
With the new "all_component_info" dictionary info in project_description.json,
the module can produce hints even if cmake's COMPONENTS variable is
set.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-01-25 14:20:22 +01:00
87afd5e829 feat(tools): export information about all components in __COMPONENT_TARGETS
Add new "all_component_info" dictionary into the
project_description.json file. It contains information about all
registered components presented in the __COMPONENT_TARGETS list.
Since components in this list are not fully evaluated, because only the first
stage of cmakefiles processing is done, it does not contain the same information
as the "build_component_info" dictionary. The "type", "file" and "sources" variables
are missing.

Most of the properties are already attached to the component target, so
this only adds INCLUDE_DIRS property to the target during the first cmakefiles
processing stage.

The "all_component_info" dict is generated in a separate function, even
though the original function for "build_component_info" could be
adjusted. This introduces a little bit of boilerplate, but keeps it
logically separated and probably easier if we want to extend it in the
future.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-01-25 14:20:22 +01:00
17aa60886c fix(hints): properly identify source component
If there is a component(child) within a component(parent), like for test_apps, the parent
component may be wrongly identified as source component for the failed include. This may
lead to a false bug report if the parent component has component, which provides the missing
header, in requirements.

Fix this by looking for the longest matching source component directory.

Suggested-by: Ivan Grokhotkov <ivan@espressif.com>
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-01-25 14:20:22 +01:00
zwl
39ef366eed Update ble lib to eb473dda on ESP32-C6 and ESP32-H2 2024-01-25 20:37:28 +08:00
zwl
0b3649aa0e feat(ble): add ble controller version output on ESP32-C6 and ESP32-H2 2024-01-25 20:37:22 +08:00
zwl
d1e16cea67 feat(ble): add ble controller status check api on ESP32-C6 and ESP32-H2 2024-01-25 20:37:15 +08:00
zwl
b13a4e2d9c fix(ble): fixed build error when disable sm feature 2024-01-25 20:37:08 +08:00
e8f0906c11 Update C6 H2 lib to bb9d578e 2024-01-25 20:36:55 +08:00
zwx
e2e54312da feat(openthread): support openthread radio caps rx on when idle 2024-01-25 14:14:51 +08:00
738145a65e fix(ieee802154): add next operation in ieee802154 test when rx abort by tx ack coex 2024-01-25 14:14:51 +08:00
zwx
2f988d08de feat(802.15.4): introduce pending tx while rx feature 2024-01-25 14:14:51 +08:00
zwx
08f462dc0e feat(openthread): integrate console command with ot command 2024-01-25 14:14:51 +08:00
dd0eeaf7f3 feat(openthread): add menuconfig for openthread address query 2024-01-25 14:14:51 +08:00
f86a39ad87 fix(openthread): set spinel frame buffer to member variables 2024-01-25 14:14:51 +08:00
d339120bed feat(openthread): support esp openthread radio spinel 2024-01-25 14:14:51 +08:00
30f01c33e1 feat(nimble): Gatt caching support 2024-01-25 09:59:03 +05:30
4529a6ab6e fix(esp_phy): Fixed BLE TX 2M problem causing by phy_wifi_enable_set()
1. Fixed BLE 2M phy TX problem causing by phy_wifi_enable_set() on ESP32-C3 and ESP32-S3
2. Fixed BLE CCA bug on ESP32-C2
3. Fixed wifi boot bug at low temp on ESP32-C6
4. Fixed BLE and WIFI could not receive packets after entering light sleep for a long time on ESP32-C3, ESP32-S3, ESP32-C2 and ESP32-C6
2024-01-25 12:26:25 +08:00
e4ae078224 Merge branch 'bugfix/ble_check_adv_data_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix ble adv data check to avoid memory overflow(backport v5.1)

See merge request espressif/esp-idf!28406
2024-01-25 12:06:02 +08:00
7d45bbef63 Merge branch 'bugfix/fix_ble_memory_leak_v5.1' into 'release/v5.1'
fix(ble/bluedroid): Fix ble memory leak when gattc config off(backport v5.1)

See merge request espressif/esp-idf!28496
2024-01-25 11:59:13 +08:00
4fd3de1ce8 Merge branch 'bugfix/fix_some_ble_issue_v5.1' into 'release/v5.1'
Bugfix/fix some ble issue v5.1(backport v5.1)

See merge request espressif/esp-idf!28616
2024-01-25 11:59:02 +08:00
9a85bb8426 Merge branch 'bugfix/address_resolution_v5.1' into 'release/v5.1'
fix(nimble): Added support for address resolution during inquiry (v5.1)

See merge request espressif/esp-idf!28519
2024-01-25 11:58:47 +08:00
26bbec86f2 Merge branch 'bugfix/fix_pmk_invalid_wpa_or_wpa2_connect_fail_issue_v5.1' into 'release/v5.1'
fix(wifi): fix pmk invalid lead same ssid wpa and wpa2 connect fail issue(Backport v5.1)

See merge request espressif/esp-idf!28668
2024-01-25 09:57:44 +08:00
f3c6aa975d fix: save RunTool command output with correct line endings
Currently RunTool reads command's output with asyncio read, which
returns bytes. This is decoded into python's string and the output already
contains OS specific line endings, which on Windows is CRLF. Problem is
that the command output is saved by using python's text stream/file,
which replaces LF, native python's line ending, with OS specific line ending.
On Windows, and in this particular case, the CRLF from the command output is
translated into CRCRLF and saved in the commands output file. When this
file is read in again, e.g. for hint modules, the CRCRLF is replaced
with LFLF. Again the file is open as text file. Meaning a new emply line
is added.

Fix this by opening the output file with "newline=''", which prevents
this translation. We already have the OS specific line ending in the
command's output.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-01-24 13:15:03 +01:00
jim
35b4151fee mbedtls: Fix enable dynamic mbedtls will occur heap corruption when server support TLS renegotiation 2024-01-24 17:53:09 +08:00
614ad494f6 fix(soc): change debug addr range to CPU subsystem range
For C6/H2/P4/C5, there is no SoC specific debug range. Instead the same
address range is part of CPU Subsystem range which contains debug mode
specific code and interrupt config registers (CLINT, PLIC etc.).

For now the PMP entry is provided with RWX permission for both machine
and user mode but we can save this entry and allow the access to only
machine mode for this range.

For P4/C5 case, this PMP entry can have RW permission as the debug mode
specific code is not present in this memory range.
2024-01-24 12:52:27 +05:30
5dec348666 Merge branch 'feat/update_cjson_v1_7_17_v5.1' into 'release/v5.1'
feat(cJSON): update submodule to v1.7.17 (v5.1)

See merge request espressif/esp-idf!28349
2024-01-24 15:05:10 +08:00
d7e275c408 Merge branch 'feat/add_ble_support_in_local_ctrl_example_v5.1' into 'release/v5.1'
fix(examples): Fix encoding issue in esp_local_ctrl's proto script (v5.1)

See merge request espressif/esp-idf!28128
2024-01-24 15:04:45 +08:00
da47d4d632 Merge branch 'bugfix/update_jtag_disabling_api_v5.1' into 'release/v5.1'
fix(esp_hw_support): fix API esp_hmac_disable_jtag() to disable JTAG (v5.1)

See merge request espressif/esp-idf!28493
2024-01-24 15:04:33 +08:00
c9f2c512b6 Merge branch 'bugfix/change_default_value_for_ip_ttl_5.1' into 'release/v5.1'
Fix(lwip):bugfix for change default value for ip ttl 5.1

See merge request espressif/esp-idf!28400
2024-01-24 14:48:11 +08:00
01f6a7a5c7 Merge branch 'bugfix/revert_changes_a2dp_sink_example_v5.1' into 'release/v5.1'
Revert "fix(bt/bluedroid): corrected the strings of A2DP audio states" (v5.1)

See merge request espressif/esp-idf!28363
2024-01-24 14:47:49 +08:00
3fa5a76a00 fix(wifi): fix pmk invalid lead same ssid wpa and wpa2 connect fail issue 2024-01-24 12:03:14 +08:00
8b16d9b8bc Fix(lwip):bugfix for change default value for ip ttl 2024-01-24 10:48:57 +08:00
bc3c3ac417 Revert "fix(bt/bluedroid): corrected the strings of A2DP audio states"
This reverts commit 00052aa208.
2024-01-24 10:48:10 +08:00
abaa9f2bfe ci(openthread): Add a test case for openthread sleepy device 2024-01-23 16:11:29 +08:00
9a246bcbf1 feat: support dump last time sleep context 2024-01-23 16:11:29 +08:00
fa02eeeb97 fix(esp_hw_support): fix API esp_hmac_disable_jtag() to disable JTAG
After ets_hmac_disable(), invalidating JTAG register process is ineffective.
So, added call to enable hmac begore invalidating JTAG REG.
And similarly disabled it after invalidation.
2024-01-23 12:20:06 +05:30
d7b6ebe7df fix(i2s): fixed incorrect reg base name on C3
Closes https://github.com/espressif/esp-idf/issues/12643
2024-01-23 12:05:45 +08:00
bba56bc016 fix(bod): Fix BOD threshold value on ESP32H2 2024-01-23 10:13:33 +08:00
2874c5e281 feat(bt/bluedroid): Support ext adv aux option 2024-01-22 20:56:26 +08:00
d6d6963fea fix(bt/bluedroid): Fix BLE malloc internal wrapper fail 2024-01-22 20:56:14 +08:00
5fa653771f feat(ble/bluedroid): Add getter for BLE GAP callback 2024-01-22 20:56:03 +08:00
8dbfff100e feat(ble/bluedroid): Add getter for BLE GATTS callback 2024-01-22 20:55:56 +08:00
77ca6c58c1 feat(ble/bluedroid): Add getter for BLE GATTC calllback 2024-01-22 20:55:49 +08:00
cc78bb61b5 docs(ble/bluedroid): Optimize documentation for BLE duplicate scan 2024-01-22 20:55:42 +08:00
9c93c54d81 fix(ble/bluedroid): Fix dangling pointer issue in deletion of bonded devices 2024-01-22 20:55:31 +08:00
22bdd07668 fix(ble/bluedroid): Fix BLE background connection log level 2024-01-22 20:55:23 +08:00
8cd9f33235 feat: LittleFS bump version to 1.13.0 2024-01-22 20:23:28 +08:00
dbc3a2a80b feat(example/storage/littlefs): add LittleFS demo example 2024-01-22 20:23:28 +08:00
e9db535290 ci(esp_eth): enabled Ethernet ip101 jobs 2024-01-22 12:46:33 +01:00
e2e1542378 fix(console): Fixed linenoise prompt length calculation
This commit fixes a potential issue where in the prompt length used
for the linenoise based console could be calculated as a negative
integer, leading to a console hang.

Closes https://github.com/espressif/esp-idf/issues/4924
2024-01-22 16:22:28 +08:00
7011329b35 Merge branch 'bugfix/fix_scan_request_ifs_error_v5.1' into 'release/v5.1'
Fixed BLE scan request ifs time error in coexistence scenarios on ESP32(backport v5.1)

See merge request espressif/esp-idf!28575
2024-01-22 14:43:05 +08:00
766d26f1f3 Merge branch 'bugfix/fix_crash_issue_when_mesh_deinit_v5.1' into 'release/v5.1'
fix(wifi): fix the crash and malloc fail issue (v5.1)

See merge request espressif/esp-idf!28537
2024-01-22 11:02:46 +08:00
cdb421f08f feat(ble): added pytest for ble power save example 2024-01-22 10:56:52 +08:00
22e6e5be06 fix(ble): Fixed the issue of being unable to enter light sleep
- Fixed the issue where light sleep cannot be entered when external 32k XTAL does not exist
2024-01-22 10:49:00 +08:00
899b216223 Merge branch 'bugfix/ble_update_lib_20231229_v5.1' into 'release/v5.1'
update lib on release/v5.1

See merge request espressif/esp-idf!28188
2024-01-22 10:39:06 +08:00
95e0a1d1b6 fix(nimble): Added support for address resolution during inquiry. 2024-01-22 09:42:22 +08:00
2ec5d6b0f2 fix(esp_coex): Fixed potential BLE scan request ifs timer error bug 2024-01-20 11:28:20 +08:00
bf322fbc4a Fixed BLE scan request ifs timer error in coexistence scenarios 2024-01-20 11:28:20 +08:00
47b44dfa71 Merge branch 'fix/esp32h2_phy_sleep_wakeup_issue_v5.1' into 'release/v5.1'
fix(esp_phy): fix esp32h2 sleep wakeup issue (backport v5.1)

See merge request espressif/esp-idf!28299
2024-01-19 16:47:58 +08:00
214a4d7a37 Merge branch 'bugfix/fix_mac_bb_pd_iwdt_timeout_v5.1' into 'release/v5.1'
fix(ble): fixed interrupt timeout in MAC_BB_PD callback (v5.1)

See merge request espressif/esp-idf!28465
2024-01-19 16:45:35 +08:00
e1b257934c Merge branch 'bugfix/fix_systick_lost_in_esp32_dfs_v5.1' into 'release/v5.1'
fix(esp_pm): safely check ccompare validity in DFS update_ccompare (v5.1)

See merge request espressif/esp-idf!28562
2024-01-19 16:44:39 +08:00
7869e584ce feat(cjson): update submodule to v1.7.17
Changelog: https://github.com/DaveGamble/cJSON/releases/tag/v1.7.17
2024-01-19 14:06:11 +05:30
cada5533f2 fix(app_update): fixed undeclared variable 'ret' in esp_ota_ops.c 2024-01-19 14:04:06 +05:30
a7f654fd64 feat: Add API to verify the bootloader and app image
Added an API to verify the bootloader and app image before revoking the key in Secure Boot V2.
This will help in preventing the device to be bricked if the bootloader/application cannot be
verified by any other keys in efuse
2024-01-19 14:04:06 +05:30
6c8fa646e4 change(ble): npl count is zero if nimble host is not used
change(ble): added npl eventq put to front

change(ble): added cache safe check in ble power save example

ble(update):
    Update c2 lib to 91b81332
    Update h2 lib to 620fbe79
    Update c6 lib to 620fbe79

fix(ble): fix stack overflow disable at sleep

Revert "change(ble): added ble cca en and thresh option"

This reverts commit 71901499b9.
2024-01-19 16:14:05 +08:00
ad9a195c3a fix(esp_pm): safely check ccompare validity in DFS update_ccompare 2024-01-19 11:14:28 +08:00
1410699d88 fix(wifi): fix the crash and malloc fail issue
1. fix(wifi/mesh): fix the crash issue when mesh deinit
2. fix(wifi):fix when ap recv auth in sa query porcess will memset psq issue
2024-01-19 11:11:34 +08:00
b59aeaa192 fix(bt/bluedroid): Fix ble adv data check to avoid memory overflow 2024-01-19 10:52:34 +08:00
6a81c1fcce fix(ble/bluedroid): Fix ble memory leak when gattc config off 2024-01-19 10:52:20 +08:00
1091ce2106 fix(ble): fixed interrupt timeout in MAC_BB_PD callback 2024-01-19 10:50:09 +08:00
ee68063b6a fix(esp_phy): fix esp32h2 sleep wakeup and i2c issue 2024-01-19 10:06:11 +08:00
ade4d4d757 fix(kconfcheck): Fixed false-positive indent errors and extended limits 2024-01-18 11:38:41 +01:00
6824abbdb3 Merge branch 'fix/i2c_test_app_change_gpio_v5.1' into 'release/v5.1'
fix(i2c): test app change gpio (v5.1)

See merge request espressif/esp-idf!28484
2024-01-18 17:43:09 +08:00
e3532b522e fix(i2c): test app change gpio 2024-01-18 11:13:06 +08:00
ea0c86e30a Merge branch 'ci/temp_disable_jobs_v5.1' into 'release/v5.1'
ci: remove ip101 jobs and twai_std jobs (v5.1)

See merge request espressif/esp-idf!28378
2024-01-18 11:08:33 +08:00
aa2793f3f1 Merge branch 'feature/support_hw_trigger_regdma_when_pu_top_v5.1' into 'release/v5.1'
fix(pm): trigger regdma retention by PMU when TOP is not power down on esp32H2 (backport v5.1)

See merge request espressif/esp-idf!28342
2024-01-18 11:06:51 +08:00
89cc9084ab Merge branch 'bugfix/recalib_bbpll_before_tuning_v5.1' into 'release/v5.1'
fix(bbpll): fix bbpll may not lock or not stable bug for stop early (ESP32C2/S3/C6/H2) (v5.1)

See merge request espressif/esp-idf!28285
2024-01-17 21:24:10 +08:00
1e43abfb57 change(pm): put pmu_hal to iram 2024-01-16 14:01:22 +08:00
2ecbfecedf feat(pm): support PMU trigger regdma when PU TOP 2024-01-16 14:01:22 +08:00
507541444b ci: remove ip101 jobs and twai_std jobs 2024-01-10 10:31:11 +01:00
9c4b89c6d2 Merge branch 'bugfix/fix_no_sleep_null_data_after_data_sent_v5.1' into 'release/v5.1'
fix(pm): fix no sleep null after data sent (e7243f1f)

See merge request espressif/esp-idf!28290
2024-01-10 11:20:56 +08:00
276332f14c Merge branch 'bugfix/increase_btu_task_stack_size_v5.1' into 'release/v5.1'
fix(bt/bludroid): Increase BTU task stack size(backport v5.1)

See merge request espressif/esp-idf!28322
2024-01-08 19:51:40 +08:00
e5742d6f41 fix(storage/fatfs): check whether sdcard supports triming
Closes https://github.com/espressif/esp-idf/issues/12912
2024-01-08 09:35:01 +01:00
0ad58fe10e fix(adc): fix adc continuous get less results beacuse do not reset apb clk(legacy) 2024-01-08 16:11:53 +08:00
2fa19aab7a fix(bt/bludroid): Increase BTU task stack size 2024-01-08 11:36:07 +08:00
74b20f3885 fix(gdbgui): Fix support of gdbgui on Unix with Python 3.11
Closes https://github.com/espressif/esp-idf/issues/12764
2024-01-05 18:52:19 +01:00
4d509333ef fix(pm): fix no sleep null after data sent (e7243f1f) 2024-01-05 10:38:11 +08:00
5bdc38908b fix(cache): fix wrong dcache size 0 configuration issue on s2
Closes https://github.com/espressif/esp-idf/issues/12711
2024-01-05 10:37:59 +08:00
a055fcbda4 fix(rtc): fixed bbpll not calibrated from bootloader issue 2024-01-05 10:19:20 +08:00
db1e54a0c5 Merge branch 'fix/esp32h2_rssi_positive_issue_5.1' into 'release/v5.1'
Fix/esp32h2 rssi positive issue 5.1

See merge request espressif/esp-idf!28269
2024-01-05 07:32:39 +08:00
630a8ff709 fix(bbpll): fix bbpll calibration may stop early bug(ESP32C2/S3/C6/H2) 2024-01-05 03:24:20 +08:00
efa71e8711 Merge branch 'feat/support_dump_ack_csi_v5.1' into 'release/v5.1'
feat(wifi): support dump 802.11 ACK frame for CSI (Backport v5.1)

See merge request espressif/esp-idf!28272
2024-01-04 23:41:19 +08:00
e57bf9a308 Merge branch 'bugfix/a2dp_sink_example_v5.1' into 'release/v5.1'
fix(bt/bluedroid): corrected the strings of A2DP audio states (v5.1)

See merge request espressif/esp-idf!28277
2024-01-04 23:35:01 +08:00
b7834bd64d Merge branch 'feat/max_ver_c3_199_v5.1' into 'release/v5.1'
feat(soc): Increase max supported version of C3 to 1.99 (v5.1)

See merge request espressif/esp-idf!26823
2024-01-04 18:12:59 +08:00
00052aa208 fix(bt/bluedroid): corrected the strings of A2DP audio states 2024-01-04 17:53:51 +08:00
2cda3fc0c1 feat(wifi): support dump 802.11 ACK frame for CSI
1. fix beacon was unexpectedly freed issue
2. support dump ACK frame for CSI
2024-01-04 15:58:15 +08:00
zwl
5644fee5be fix(ble): fixed rssi inaccuracy issue on ESP32-H2 2024-01-04 15:09:50 +08:00
a9679450b2 fix(ieee802154): fix the issue of not receiving packets when RSSI is positive in esp32h2 2024-01-04 15:09:42 +08:00
54bce56ae3 Merge branch 'bugfix/dpp_listen_bugs_v5.1' into 'release/v5.1'
fix(wpa_supplicant): Fix few bugs in dpp(v5.1)

See merge request espressif/esp-idf!26793
2024-01-04 13:47:29 +08:00
f735330caa Merge branch 'refactor/uart_read_bytes_from_ringbuf_v5.1' into 'release/v5.1'
change(uart): improved the internal logic of uart_read_bytes (v5.1)

See merge request espressif/esp-idf!28225
2024-01-04 11:57:37 +08:00
a66693cd63 Merge branch 'contrib/github_pr_12908_v5.1' into 'release/v5.1'
spi_lcd: add flag to control the DC level in cmd/param/data phase separately (GitHub PR) (v5.1)

See merge request espressif/esp-idf!28241
2024-01-04 10:25:33 +08:00
d2c1fcf56e Merge branch 'bugfix/enable_addr_resol_across_reboot_v5.1' into 'release/v5.1'
fix(nimble): Enable address resolution across reboot (v5.1)

See merge request espressif/esp-idf!28215
2024-01-03 20:10:00 +08:00
1dc2b953b0 Merge branch 'ci/pre_commit_sbom_validation_v5.1' into 'release/v5.1'
ci: add sbom validation using pre-commit's post-commit stage (v5.1)

See merge request espressif/esp-idf!28229
2024-01-03 18:36:59 +08:00
67043f557f feat(soc): Increase max supported version of C3 to 1.99 2024-01-03 18:02:49 +08:00
3078210b26 feat(spi_lcd): control DC level for cmd, param, color phase separately
Closes https://github.com/espressif/esp-idf/issues/10635
Merges https://github.com/espressif/esp-idf/pull/12908
2024-01-03 17:25:01 +08:00
24467ccc8a Merge branch 'contrib/github_pr_12177_v5.1' into 'release/v5.1'
mbedtls: define MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding (GitHub PR) (v5.1)

See merge request espressif/esp-idf!28209
2024-01-03 16:51:57 +08:00
f33c32dc05 fix(wpa_supplicant): Move concurrent wps and dpp check to before creating task
- Move the check for checking concurrent wps and dpp check to before creating
  task rather than after.
2024-01-03 13:46:41 +05:30
078da4b2d2 fix(wpa_supplicant): Fix a crash in esp_wifi_wps_disable
- Fixes a crash observed in esp_wifi_wps_disable when wps process
  is ongoing, caused due to concurrency issues in cancelling timers.
2024-01-03 13:46:41 +05:30
a65cb7669c fix(wpa_supplicant): Add support for a dpp authentication timeout
- Adds support for a 1 second dpp authentication timeout.
2024-01-03 13:46:41 +05:30
dcc14e8c15 fix(wpa_supplicant): Restructuring DPP init method to ensure cleanup
- Restructuring DPP init function to ensure cleanup of variables in case of
  init failure
2024-01-03 13:46:40 +05:30
5e20319831 fix(wpa_supplicant): Fix location of clearing up dpp global variables
- Fix location of cleaing up dpp global variables to ensure that there are
  no concurrency issues.
2024-01-03 13:46:40 +05:30
c3518e0c87 fix(wpa_supplicant): Fix a memory leak in dpp deinit path
- Ensures that the auth information of dpp gets freed when there is
  dpp gets deinited.
2024-01-03 13:46:40 +05:30
4dd0805a6e fix(esp_wifi):Fix WDT when esp_supp_dpp_start_listen called multiple times 2024-01-03 13:46:38 +05:30
04d624c50a Merge branch 'feat/ble_mesh_miscellaneous_update_v5.1' into 'release/v5.1'
feat(ble_mesh): Miscellaneous updates for mesh kconfig, relay related(v5.1)

See merge request espressif/esp-idf!28033
2024-01-03 15:42:15 +08:00
575af15974 Merge branch 'backport5.1/fix_ot_br_pcb_ttl' into 'release/v5.1'
fix(openthread): update lib to set raw pcb ttl value (backport v5.1)

See merge request espressif/esp-idf!28218
2024-01-03 15:25:28 +08:00
453738c2ff Merge branch 'bugfix/nan_crash_sched_bcn_v5.1' into 'release/v5.1'
Fix crash while stopping NAN (Backport v5.1)

See merge request espressif/esp-idf!28181
2024-01-03 13:57:36 +08:00
0aed680855 Merge branch 'bugfix/fix_ble_robost_cashing_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix BLE robost cashing config(backport v5.1)

See merge request espressif/esp-idf!28200
2024-01-03 11:31:54 +08:00
8d3170e044 Merge branch 'bugfix/BLEQABR23-35_v5.1' into 'release/v5.1'
fix(ble_mesh): avoid ble_mesh packet collision by using random adv interval(v5.1)

See merge request espressif/esp-idf!27487
2024-01-03 10:44:37 +08:00
6bc256adb7 fix(esp_wifi): Fix crash while stopping NAN
Also fix inconsistent NAN macro values
2024-01-03 10:35:56 +08:00
62fd4abded ci: add sbom validation using pre-commit's post-commit stage
With 09ba070b7e ("fix: allow to use older pre-commit hook version")
and b93cc581a5 ("fix: set default pre-commit hook stages to pre-commit..")
we set the default pre-commit hook stage to commit/pre-commit, which avoids
running the pre-commit plugins/hooks multiple times for different stages.
Unfortunately this also affects "pre-commit run" used in CI and
now it runs only plugins which are by default using the
commit/pre-commit stage. Meaning the sbom validation, which uses
post-commit, is not run at all. This adds an explicit pre-commit command
for validate-sbom-manifest plugin, which needs to be started in
post-commit stage.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-01-02 16:29:58 +01:00
0da4b0867b change(uart): improved the internal logic of uart_read_bytes
Ringbuffer usage becomes more efficient with the use of xRingbufferReceiveUpTo

Closes https://github.com/espressif/esp-idf/issues/12386
2024-01-02 20:21:39 +08:00
ccc8b274eb Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/sdio_slave.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/sdio_slave.rst (Backport v5.1)

See merge request espressif/esp-idf!26109
2024-01-02 19:43:24 +08:00
8495a31f46 docs: provide CN translation for api-reference/peripherals/sdio_slave.rst (Backport v5.1) 2024-01-02 19:43:24 +08:00
d2b8ddfb1f fix(openthread): update lib to set raw pcb ttl value 2024-01-02 16:56:52 +08:00
c6946cb2fd fix(nimble): Enable address resolution across reboot 2024-01-02 14:04:44 +05:30
29803d93b5 Merge branch 'bigfix/BLEQABR23-503_v51' into 'release/v5.1'
fix(ble_mesh): reject node-reseting when provision link is active (V5.1)

See merge request espressif/esp-idf!25849
2024-01-02 15:38:12 +08:00
53b013f041 fix(ble_mesh): reject node-reseting when provision link is active (V5.1) 2024-01-02 15:38:11 +08:00
268fbf83c1 bugfix(ble_mesh): add duplicate scan config for esp32s3 2024-01-02 15:35:11 +08:00
fa85443a44 feat(ble_mesh): Miscellaneous updates for mesh kconfig, relay related 2024-01-02 15:34:27 +08:00
4fe0523a5f bugfix(ble_mesh): Prevent the generation of link ID as 0. 2024-01-02 15:24:15 +08:00
f9569bde37 mbedtls: define MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY for CID padding
Updates config to define the new MBEDTLS_SSL_CID_TLS1_3_PAD_GRANULARITY
option, which replaced the previously used
MBEDTLS_SSL_CID_PADDING_GRANULARITY. The old option is continuing to be
used as the new one exceeds the maximum length for an option name in
esp-idf.

See https://github.com/Mbed-TLS/mbedtls/pull/4490 for more information.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-01-02 11:22:10 +05:30
401653364d fix(bt/bluedroid): Optimize ble remove all bonded devices function 2023-12-30 20:39:57 +08:00
9f478a8305 fix(bt/bluedroid): Update ble ibeacon example document 2023-12-30 20:39:47 +08:00
a76b44602c fix(bt/bluedroid): Update ble gattc gatts coex example 2023-12-30 20:39:37 +08:00
3241fd237b fix(bt/bluedroid): Fix BLE robost cashing config 2023-12-30 20:14:19 +08:00
bc2389029c Merge branch 'bugfix/fix_ble_app_unregister_no_event_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix ble app unregister no event(backport v5.1)

See merge request espressif/esp-idf!28175
2023-12-29 16:03:39 +08:00
b929a149db Merge branch 'bugfix/fix_gatts_stop_race_condition_v5.1' into 'release/v5.1'
fix(nimble): Handled race condition for conn variables being set to NULL (v5.1)

See merge request espressif/esp-idf!28169
2023-12-29 16:02:17 +08:00
4e8b573481 Merge branch 'bugfix/fix_ble_phy_tx_ifs_v5.1' into 'release/v5.1'
Bugfix/fix ble phy tx ifs v5.1

See merge request espressif/esp-idf!28152
2023-12-29 14:14:00 +08:00
6e57f35873 Merge branch 'backport/add_dynamic_iram_check_for_ot_sleep_v51' into 'release/v5.1'
fix(pm): fix extra retention function to iram(Backportv5.1)

See merge request espressif/esp-idf!28134
2023-12-29 12:26:04 +08:00
2c7d68d17b Merge branch 'bugfix/clear_lp_sw_trigger_int_before_sleep_v5.1' into 'release/v5.1'
feat(ulp): add api to get lp_cpu wakeup cause and clear wakeup source at startup(v5.1)

See merge request espressif/esp-idf!28147
2023-12-29 12:20:58 +08:00
82bfc1de86 Merge branch 'bugfix/crash_in_btc_hf_init_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Avoided crash of LoadProhibited during HFP AG deinitialization (v5.1)

See merge request espressif/esp-idf!28117
2023-12-29 12:01:51 +08:00
8b84071f6a Merge branch 'backport/fix_ble_prepare_write_v5.1' into 'release/v5.1'
Backport/fix ble prepare write v5.1

See merge request espressif/esp-idf!27909
2023-12-29 12:01:01 +08:00
b938ef047c Merge branch 'bugfix/fix_fragment_bug_v5.1' into 'release/v5.1'
fix(wifi): fix the rate check error in fragment (v5.1)

See merge request espressif/esp-idf!28171
2023-12-29 11:48:49 +08:00
5fd7c865c7 bugfix(ble_mesh): Supplementary configuration options that should be enabled. 2023-12-29 11:11:21 +08:00
a4635d75ca fix(ble_mesh): Support using random adv interval for mesh packets 2023-12-29 11:11:21 +08:00
f4756fc21e fix(wifi): fix the rate check error in fragment 2023-12-28 19:13:00 +08:00
7755e6190c fix(bt/bluedroid): Fix ble app unregister no event 2023-12-28 19:10:10 +08:00
aa2c91072d fix(nimble): Handled race condition for conn variables being set to NULL 2023-12-28 15:13:09 +05:30
bbd8d13f93 Merge branch 'bugfix/periodic_adv_enh_fixes_v5.1' into 'release/v5.1'
fix(nimble): Added periodic_adv_enh soc_caps for c2, h2 (v5.1)

See merge request espressif/esp-idf!28077
2023-12-28 17:24:05 +08:00
04895043f5 Merge branch 'feat/support_esp32c3_v1.1_wifi_v5.1' into 'release/v5.1'
feat(wifi): support esp32c3 v1.1 WiFi(v5.1)

See merge request espressif/esp-idf!27914
2023-12-28 16:56:49 +08:00
ddc3b14fdb fix(app_trace): Fix SystemView build 2023-12-28 12:08:57 +04:00
17752f970a fix(phy): Fix ble tx ifs time for ESP32 2023-12-28 14:32:26 +08:00
53afab3850 feat(ulp): add api to get lp_cpu wakeup cause and clear wakeup source at startup
Closes https://github.com/espressif/esp-idf/issues/12651
2023-12-28 13:31:55 +08:00
47c89441c1 Merge branch 'backport/ieee802154_receive_done_handler_v51' into 'release/v5.1'
fix(ieee802154): introduce a receive done handler feature(backportV5.1)

See merge request espressif/esp-idf!28133
2023-12-28 11:13:06 +08:00
9088450645 Merge branch 'bugfix/fix_establish_two_sco_fail_v5.1' into 'release/v5.1'
fix(bt/controller): Fixed establish two sco connections failed (Backport v5.1)

See merge request espressif/esp-idf!28101
2023-12-27 19:38:25 +08:00
61a11a7c1f Merge branch 'bugfix/wait_tvsl_after_non_pd_top_lightsleep_v5.1' into 'release/v5.1'
fix(esp_hw_support/sleep): wait flash ready after non-pd_top lightsleep for esp32c6 (v5.1)

See merge request espressif/esp-idf!28143
2023-12-27 19:37:42 +08:00
dc9d9b41f2 fix(nimble): Added periodic_adv_enh soc_caps for c2, h2 2023-12-27 15:03:17 +05:30
48091104b6 Merge branch 'test/ctrl_acl_u_pkt_type_v5.1' into 'release/v5.1'
feat(bt/bluedroid): Added an API to specify data types for ACL-U traffic

See merge request espressif/esp-idf!27598
2023-12-27 16:53:43 +08:00
58de97b193 fix(wifi): change default flash freq from 40M to 80M for esp32 in iperf 2023-12-27 16:47:00 +08:00
e7b20b754f fix(wifi): fix beacon eb memory leak issue 2023-12-27 16:47:00 +08:00
afbe2d1165 fix(rom): fix rom ld for v5.1 2023-12-27 16:47:00 +08:00
e6efcc407e fix(rom): remove related rom funcs in c3 rom eco7 MR 2023-12-27 16:47:00 +08:00
36e082d6e2 feat(wifi): support esp32c3 v1.1 WiFi
1.bringup c3 v1.1 and sync func to c3 eco7 rom
2.support to set null&probe lifetime
3.support to adjust listen interval to dtim period
4.support tx pkt w/o wake null
5.allow to tx null0 if requtest to rx data
2023-12-27 16:47:00 +08:00
ecca6fb1c2 change(esp_hw_support/sleep): rename ESP_SLEEP_DEEP_SLEEP_WAKEUP_DELAY
1. Rename ESP_SLEEP_DEEP_SLEEP_WAKEUP_DELAY to ESP_SLEEP_WAIT_FLASH_READY_EXTRA_DELAY
2. Set ESP_SLEEP_WAIT_FLASH_READY_EXTRA_DELAY visible for all targets
2023-12-27 15:36:20 +08:00
c33dd0f4a2 fix(esp_hw_support/sleep): wait flash ready after non-pd_top lightsleep for esp32c6 2023-12-27 15:36:15 +08:00
ddd142e624 Merge branch 'bugfix/fix_ble_recorrect_enable_bug_v5.1' into 'release/v5.1'
fix(ble/controller): Fixed BLE recorrect enable bug and fixed BLE bb isr enable by default (backport v5.1)

See merge request espressif/esp-idf!28110
2023-12-27 12:03:47 +08:00
9d41ed6546 feat(bt/bluedroid): Added an API to specify data types for ACL-U traffic 2023-12-26 20:21:15 +08:00
zwx
81123259ff fix(pm): fix extra retention function to iram
* Also remove unused function on H2
2023-12-26 19:20:44 +08:00
zwx
66efe67609 fix(ieee802154): introduce a receive done handler feature 2023-12-26 19:12:11 +08:00
cf241fdaf1 CI: created script for creating MR to esp-dockerfiles, added script execution to CI pipeline 2023-12-26 16:51:05 +07:00
f922e43625 Merge branch 'backport/some_openthread_related_features_v51' into 'release/v5.1'
Backport some openthread related features (backport v5.1)

See merge request espressif/esp-idf!28055
2023-12-26 17:27:27 +08:00
d62f61dc47 fix(examples): Fix encoding issue in esp_local_ctrl's proto script 2023-12-26 14:03:09 +05:30
b7f0139dcb Merge branch 'bugfix/alarm_args_double_free_v5.1' into 'release/v5.1'
Bugfix/alarm args double free v5.1

See merge request espressif/esp-idf!27538
2023-12-26 16:16:58 +08:00
f7cfcebe69 fix(bt/bluedroid): Disabled Sniff Subrating temporarily as it did not work well 2023-12-26 11:51:32 +08:00
885c070eb8 fix(bt/bluedroid): Changed the default air mode to invalid value 2023-12-26 11:51:32 +08:00
5f621c33da fix(bt/bluedroid): Removed redundant operation of SCO clean up 2023-12-26 11:51:32 +08:00
bf7e27d126 fix(bt/bluedroid): Corrected the definitions of HF Client callback events 2023-12-26 11:51:32 +08:00
94faa4a112 fix(bt/bluedroid): Avoided crash of LoadProhibited during HFP AG deinitialization
Move the release of the control blocks from the start
of deinitialization to the profile disabled event.
2023-12-26 11:51:32 +08:00
3c088db873 fix(bt/bluedroid): Added dynamic memory allocation for HFP control blocks 2023-12-26 11:51:32 +08:00
244a3f892e fix(bt/bluedroid): Set the alarm_arg to NULL after releasing to avoid double free in L2CAP layer 2023-12-26 11:04:46 +08:00
0d5d7cbff7 fix(bt/bluedroid): Set the alarm_arg to NULL after releasing to avoid double free in BTC layer 2023-12-26 11:04:46 +08:00
d24b321eec Merge branch 'bugfix/fixed_stop_periodic_adv_assert_issue_v5.1' into 'release/v5.1'
fixed(ble): fixed an assertion issue when stopping periodic adv on ESP32C6 and ESP32H2

See merge request espressif/esp-idf!28084
2023-12-25 18:31:20 +08:00
dd6e1b76fc fix(ble/controller): Fixed BLE recorrect enable bug and fixed BLE bb isr enable by default 2023-12-25 16:21:47 +08:00
ddab5dbaa4 fix(bt/controller): Fixed establish two sco connections failed 2023-12-25 10:42:36 +08:00
df8cc9ad37 Merge branch 'fix/btc_config_lock_error_v5.1' into 'release/v5.1'
fix(bt/bluedroid): fixed btc_config_lock error (backport v5.1)

See merge request espressif/esp-idf!28070
2023-12-25 10:18:26 +08:00
08545547d8 Merge branch 'bugfix/boot_flash_build_v5.1' into 'release/v5.1'
bugfix(spi_flash): Fix build error when octal flash is enabled (5.1)

See merge request espressif/esp-idf!28078
2023-12-25 10:02:08 +08:00
c57b352725 Merge branch 'feat/add_csa_selection_vsc_v5.1' into 'release/v5.1'
feat(nimble): Add VSC support for setting chan select algo (v5.1)

See merge request espressif/esp-idf!28028
2023-12-23 23:47:15 +08:00
6ae956d81c fix(bt/bluedroid): Fix prepare write for BLE example 2023-12-23 20:19:37 +08:00
6644bcc320 fix(bt/bluedroid): Fix BLE prepare write 2023-12-23 20:19:37 +08:00
0dc286db38 fix(nimble): Add VSC support for setting chan select algo 2023-12-22 18:31:52 +05:30
3629f070b6 Merge branch 'feature/hogp_example_support_v5.1' into 'release/v5.1'
feat(nimble): Added HID over Gatt Profile Support (v5.1)

See merge request espressif/esp-idf!28025
2023-12-22 20:52:17 +08:00
zwl
0fe3057529 fixed(ble): fixed an assertion issue when stopping periodic adv on ESP32C6 and ESP32H2 2023-12-22 15:35:28 +08:00
6deb0ae743 Merge branch 'bugfix/ble_update_lib_20231219_v5.1' into 'release/v5.1'
update lib on release/v5.1

See merge request espressif/esp-idf!27999
2023-12-22 14:57:32 +08:00
8f6213c9f2 bugfix(spi_flash): Fix build error when octal flash is enabled,
Closes https://github.com/espressif/esp-idf/issues/12850
2023-12-22 14:11:28 +08:00
a95bf9e0c3 feat(nimble): added HID over Gatt profile support 2023-12-22 11:23:05 +05:30
04b6feb1ad Merge branch 'bugfix/handle_all_zero_bdaddr_v5.1' into 'release/v5.1'
fix(nimble): Handle all 0s address of external controllers during IRK generation (v5.1)

See merge request espressif/esp-idf!27960
2023-12-22 11:53:07 +08:00
83a99d954d fix(bt/bluedroid): fixed btc_config_lock error 2023-12-22 11:30:39 +08:00
b34ab72832 Merge branch 'bugfix/BLEQABR23-811_v5.1' into 'release/v5.1'
bugfix(ble_mesh): Enable CONFIG_BT_NIMBLE_VS_SUPPORT when using the duplicate...(v5.1)

See merge request espressif/esp-idf!27568
2023-12-21 20:22:26 +08:00
cb4e90ca6e refactor(usb/host): Move FIFO size configuration to HAL layer
The logic of calculating FIFO sizes is DWC OTG specific.
We move it to the HAL layer to provide better abstraction in the HDC layer.
2023-12-21 10:45:21 +01:00
325205faee refactor(usb/host): Make private hal types USB_DWC specific 2023-12-21 10:45:04 +01:00
d9223c6d91 feat(usb/host): Add High Speed enumeration types 2023-12-21 10:35:31 +01:00
aa3a1efdd3 fix(openthread): allow setting netif_idx of udp pcb to no_index 2023-12-21 15:17:58 +08:00
6eba71f171 fix(coex): 802.15.4 coex break notification 2023-12-21 15:17:58 +08:00
866bc77246 feat(ieee802154): add tx/rx report for IEEE802.15.4 debug 2023-12-21 15:17:54 +08:00
7e469f1330 feat(openthread): modification of uart and spi spinel based on openthread 41ef807 2023-12-21 15:16:29 +08:00
zwx
6221119c2f fix(openthread): fix openthread SPI tx timeout issue 2023-12-21 15:16:28 +08:00
zwx
d799d361ea fix(openthread): add netif check when call udp api for ot 2023-12-21 15:16:28 +08:00
zwx
abe36b97a5 fix(openthread): fix ot netif destroy netif order issue 2023-12-21 15:16:28 +08:00
925e3e2ed5 Merge branch 'fix/build_error_in_compiler_performance_mode_v5.1' into 'release/v5.1'
fix(bt/bluedroid): fixed build error when compiler in performace mode (backport v5.1)

See merge request espressif/esp-idf!27864
2023-12-21 11:30:38 +08:00
90435019a1 Merge branch 'bugfix/fix_memory_leak_in_c3_s3_controller_v5.1' into 'release/v5.1'
Fixed memory leak in ESP32C3 and ESP32S3 controller (Backport v5.1)

See merge request espressif/esp-idf!27892
2023-12-21 11:29:39 +08:00
a8a3adcfb8 Merge branch 'bugfix/put_extra_link_retention_in_iram_5.1' into 'release/v5.1'
fix(pm): place extra link opt in iram(Backport v5.1)

See merge request espressif/esp-idf!27898
2023-12-21 11:28:38 +08:00
d09d7bb646 Merge branch 'bugfix/ieee802154_deinit_v5.1' into 'release/v5.1'
Bugfix/ieee802154 deinit (Backport v5.1)

See merge request espressif/esp-idf!27973
2023-12-21 11:27:45 +08:00
487adc09f4 Merge branch 'change/change_regdma_power_issue_macro_v5.1' into 'release/v5.1'
change(pm): change macro SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG (backport v5.1)

See merge request espressif/esp-idf!27991
2023-12-21 11:27:10 +08:00
503eccb261 Merge branch 'docs/Separate_low-power_documents_v5.1' into 'release/v5.1'
docs:separate low power documents (backport v5.1)

See merge request espressif/esp-idf!28021
2023-12-21 11:10:13 +08:00
b38ee33b6d Merge branch 'bugfix/fix-clean-up-in-error-condition-in-http-example_v5.1' into 'release/v5.1'
fix(example/http): Fixed potential memory leak/crash in when handling error condition (v5.1)

See merge request espressif/esp-idf!27875
2023-12-20 16:41:29 +08:00
2c564d32db Merge branch 'bugfix/fix_some_wifi_bugs_231214_v5.1' into 'release/v5.1'
fix(wifi): fix some wifi bugs 231214 (Backport v5.1)

See merge request espressif/esp-idf!27943
2023-12-20 13:59:25 +08:00
b37d4079ff bugfix(ble_mesh): Enable CONFIG_BT_NIMBLE_VS_SUPPORT when using the duplicate scan feature on the NimBLE host. 2023-12-20 11:18:36 +08:00
6360246a29 Apply 2 suggestion(s) to 2 file(s) 2023-12-20 11:08:12 +08:00
a56b523822 docs:Separate low-power documents(backprot v5.1) 2023-12-20 11:07:28 +08:00
acb84ca804 Merge branch 'bugfix/u32_reg_tsens_v5.1' into 'release/v5.1'
fix(tempertuer_sensor): Fix regs on temperature sensor is not volatile due to GCC bug(backport v5.1)

See merge request espressif/esp-idf!27948
2023-12-20 10:51:51 +08:00
40bea117e4 Merge branch 'bugfix/s3_irom_addr_v5.1' into 'release/v5.1'
soc: fix SOC_IROM_MASK_HIGH for esp32s3 (v5.1)

See merge request espressif/esp-idf!27136
2023-12-20 10:00:39 +08:00
b88e73f3ed Merge branch 'fix/sbom_validation_post_commit_v5.1' into 'release/v5.1'
fix: do sbom manifest validation in post-commit (v5.1)

See merge request espressif/esp-idf!28012
2023-12-20 00:03:18 +08:00
a537dafa74 fix: do sbom manifest validation in post-commit
Following commit c3afbebf23 ("fix: bump esp-idf-sbom to v0.13.0 in pre-commit"),
the validation of submodule hash now relies solely on the information recorded
in the git-tree. Previously, the hash verification used submodule's
working tree hash if available. Since the new submodule hash is recorded
in git-tree only after the commit is created, we need to move the check
into post-commit, otherwise the hash validation checks the old value.

For example:

1. in .gitmodules

	[submodule "components/json/cJSON"]
	   sbom-hash = cb8693b058ba302f4829ec6d03f609ac6f848546

2. update the cJSON

	$ git -C components/json/cJSON checkout b45f48e600671feade0b6bd65d1c69de7899f2be

3. update cJSON hash in .gitmodules

	[submodule "components/json/cJSON"]
	   sbom-hash = b45f48e600671feade0b6bd65d1c69de7899f2be

4. commit the changes

	$ git commit -a -s

Step 4. will fail, because the validation is currently started in pre-commit stage,
where the hash for cJSON recorded in git-tree is still
cb8693b058ba302f4829ec6d03f609ac6f848546. The new hash b45f48e600671feade0b6bd65d1c69de7899f2be
will be stored in git-tree after the new commit is created.

Note that this means we cannot prevent the commit creation, but only
notify user about the hash inconsistency. If he/she still decides to
push it, it will fail in pre-commit checks in CI.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-19 12:30:37 +01:00
b0493e0f6b fix(docs): fixed doxygen warnings in few headers
- non-matching arguments in `i2c_types.h` and `esp_wifi_crypto_types.h`
 - Fixed unended `@cond` macro in `esp_err.h`
2023-12-19 19:15:49 +08:00
f841f0ae52 fix(esp_srp): Use @file for file documentation and missing doc
Using @brief for file description wrongly associates the documentation to an API.
Correct way to add file description is to use `@file` and then `@brief`. Corrected the same.

- Also added missing doc for esp_srp_handle_t
2023-12-19 19:15:49 +08:00
24da38f63c fix(wifi): fix some wifi bugs 20231214
1. add support for espnow to seet dcm rate
2. bugfix: fix csi info is not correct
3. feature: add support for establishing over 4 rx ba sessions
4. sniffer: modified rx error dump in sniffer mode
5. fix(itwt): fix when receiving the twt setup response frame, twt tx cb has not yet been called
6. itwt: fix itwt information frame format is not correct when suspend time is 0
7. update esp_wifi_crypto_types.h
8. sta not pmf capable when ap requires should reject profile
9. fix softap set config issue
10. allow some special igtk keyindex to workaround faulty APs
11. fix psram enabled but initialized fail issue
12. add missing header files for wifi files
13. feat(wifi/vendor): get more wifi information in csi rx callback
2023-12-19 19:15:49 +08:00
796f315f6b doc(Wi-Fi/Vendor): Update comments for wifi_csi_info_t 2023-12-19 19:15:49 +08:00
23148a3138 Fix(esp_wifi): Add the missing header file to the wifi header files. 2023-12-19 19:15:49 +08:00
482ba2b909 fix(wifi): fix psram enabled but initialized fail issue
Closes https://github.com/espressif/esp-idf/issues/11971
2023-12-19 19:15:49 +08:00
1881900781 fix(wifi): allow some special igtk keyindx to workaround faulty APs 2023-12-19 19:15:49 +08:00
61ae9bd8e2 fix(wifi/mesh): fix the IE crypto disable error and update doc 2023-12-19 19:15:49 +08:00
13094f2216 change(wifi): update esp_coexist_internal.h and esp_modem_wrapper.h 2023-12-19 19:15:49 +08:00
0573c44f32 docs(esp_mesh): update esp_mesh_internal.h 2023-12-19 19:15:49 +08:00
7d5eaa8b79 update(wifi): update esp_wifi_crypto_types.h 2023-12-19 19:15:49 +08:00
7b3cee0dd8 update(esp_coexist): update esp coexist header file 2023-12-19 19:15:49 +08:00
5960284022 esp_supplicant: remove wpa supplicant ROM source code copyrights 2023-12-19 19:15:49 +08:00
e321e8b640 fix(wifi): fix esp32c6 rxctrl info is not correct 2023-12-19 19:15:49 +08:00
baeed9fb6a fix(wifi): update scan example for scan get ap records 2023-12-19 19:15:49 +08:00
c61b2c4790 Merge branch 'feature/add_fatfs_sbom_v5.1' into 'release/v5.1'
feat(storage/fatfs): add sbom file manifest for FatFs (v5.1)

See merge request espressif/esp-idf!27480
2023-12-19 16:47:52 +08:00
641ac3ee71 feat(storage/fatfs): add sbom file manifest for FatFs (v5.1) 2023-12-19 16:47:51 +08:00
d5bfb9b326 change(ble): added ble cca en and thresh option 2023-12-19 14:34:44 +08:00
c67710bacf ble: support for selecting CSA#2 by menuconfig
ble(fix): fixed event receiving on host side without returning event buffer to pool
2023-12-19 14:20:19 +08:00
dbeb870635 Merge branch 'feature/update-gdb-to-12.1_20231023_v5.1' into 'release/v5.1'
feat(tools): update gdb version to 12.1_20231023 (v5.1)

See merge request espressif/esp-idf!27377
2023-12-19 14:11:20 +08:00
90497ae541 ble(update):
Update c2 lib to 7c6c9d53
Update h2 lib to 0ecb36f0
Update c6 lib to 0ecb36f0
2023-12-19 12:25:26 +08:00
fae6ce0e7d Merge branch 'bugfix/ble_stack_disable_v5.1' into 'release/v5.1'
Bugfix/ble stack disable v5.1(backport v5.1)

See merge request espressif/esp-idf!27650
2023-12-19 12:00:04 +08:00
08d54a6436 Merge branch 'backport/fix_ble_menuconfig_v5.1' into 'release/v5.1'
Backport/fix ble menuconfig v5.1(backport v5.1)

See merge request espressif/esp-idf!27497
2023-12-19 11:59:29 +08:00
1419db4b91 change(pm): change macro SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG 2023-12-19 11:44:23 +08:00
2abb36bc7f Merge branch 'optimize/When_psram_is_enable_the_number_of_ooseq_is_not_limited_5.1' into 'release/v5.1'
optimize(lwip):when psram is enable the number of ooseq is not limited 5.1

See merge request espressif/esp-idf!27945
2023-12-19 10:44:08 +08:00
9ed598aefe Merge branch 'backport/uart_select_malloc_5.1' into 'release/v5.1'
fix(vfs): fix uart malloc when locates ISR context in IRAM(Backport 5.1)

See merge request espressif/esp-idf!27382
2023-12-19 10:43:13 +08:00
602cdf2fb4 Merge branch 'fix/cleanup_deleted_menuconfig_option_entries_v5.1' into 'release/v5.1'
fix(mbedtls): Fix menuconfig option entries (v5.1)

See merge request espressif/esp-idf!27464
2023-12-18 18:18:18 +08:00
8e11721c40 feat(tools): update gdb version to 12.1_20231023 2023-12-18 17:44:22 +08:00
zwx
2f49042b07 feat(ieee802154): rf enable and disable refactor 2023-12-18 15:57:42 +08:00
00cbc1fad2 fix(ieee802154): fix ieee802154 mac deinit and config ieee802154_enable 2023-12-18 15:57:34 +08:00
103656e7a2 feat(bt/bluedroid): Support ble create sync report disable and filter duplicate 2023-12-18 11:51:29 +08:00
e0a0ee9ae9 fix(bt/bluedroid): Fix bluedroid menuconfig 2023-12-18 11:51:29 +08:00
8d78433dea fix(bt/bluedroid): Fix BLE SMP register log level 2023-12-18 11:51:29 +08:00
d0e9b33f5d docs(bt/bluedroid): Update ble example document 2023-12-18 11:51:29 +08:00
55409e2395 fix(bt/bluedroid): Fix ble adv and scan status when deinit bluedroid 2023-12-18 11:47:50 +08:00
25144125d6 fix(mbedtls): Removed redundant menuconfig entry 2023-12-18 11:19:00 +08:00
fa7383162f Merge branch 'fix/esp32s3_soc_drom_high_addr_v5.1' into 'release/v5.1'
fix(soc): esp32s3/Fix the DROM_HIGH_ADDR (v5.1)

See merge request espressif/esp-idf!27822
2023-12-17 16:31:41 +08:00
c0cfdd9c46 fix(nimble): Handle all 0s address of external controllers during IRK generation 2023-12-16 17:31:57 +05:30
36ca229332 Merge branch 'bugfix/add_peer_null_check_v5.1' into 'release/v5.1'
fix(nimble): Added NULL peer addr check (v5.1)

See merge request espressif/esp-idf!27939
2023-12-16 15:55:00 +08:00
3c49099503 fix(nimble): Added NULL peer addr check 2023-12-15 18:06:40 +05:30
8a6d244a21 Merge branch 'bugfix/fix_sm_inject_return_value_v5.1' into 'release/v5.1'
fix(nimble): Added change to return success for API execution (v5.1)

See merge request espressif/esp-idf!27727
2023-12-15 19:33:16 +08:00
dfff867379 fix(tempertuer_sensor): Fix regs on temperature sensor is not volatile due to GCC bug 2023-12-15 16:41:16 +08:00
7a32d046bd Merge branch 'fix/spi_lcd_example_fix_border_pixel_display_v5.1' into 'release/v5.1'
fix(spi_master): fixed lcd example block border pixel issue (v5.1)

See merge request espressif/esp-idf!27920
2023-12-15 16:03:30 +08:00
965c1da3e0 optimize(lwip):when psram is enable the number of ooseq is not limited 2023-12-15 14:11:38 +08:00
820d4a92d2 Merge branch 'feature/current_time_service_v5.1' into 'release/v5.1'
feat(nimble): Added Example support for Current Time Service (v5.1)

See merge request espressif/esp-idf!27262
2023-12-15 13:18:24 +08:00
e51e8a0948 Merge branch 'bugfix/fix_esp32h2_system_retention_restore_backup_v5.1' into 'release/v5.1'
fix(esp_hw_support): fix esp32h2 system link restore override cpu clk configuration(v5.1)

See merge request espressif/esp-idf!27814
2023-12-15 10:38:24 +08:00
4c288321cb fix(nimble): Added change to return success for API execution 2023-12-14 20:57:30 +05:30
694c9ccdf5 Merge branch 'bugfix/authcomplete_failure_v5.1' into 'release/v5.1'
fix(nimble): Fixed authcomplete failure caused by a mismatch in the c1 value (v5.1)

See merge request espressif/esp-idf!27620
2023-12-14 23:19:14 +08:00
e8503d6efe feat(nimble): Added example support for Current Time Service 2023-12-14 20:24:20 +05:30
24e4b87925 Merge branch 'feature/eth_spi_abstraction_v5.1' into 'release/v5.1'
Abstraction of SPI driver for SPI Ethernet modules (v5.1)

See merge request espressif/esp-idf!27640
2023-12-14 21:49:00 +08:00
bd1dc8dfaf fix(bt/bluedroid): Fix ble gattc deregister 2023-12-14 17:53:22 +08:00
94fb5232ce fix(spi_master): fixed lcd example block border pixel issue 2023-12-14 17:17:36 +08:00
6bae5e5d6f fix(nimble): Fixed authcomplete failure caused by a mismatch in the c1 value (v5.1) 2023-12-14 14:13:45 +05:30
3ed9c70aa3 Merge branch 'bugfix/remove_rpa_rec_v5.1' into 'release/v5.1'
fix(nimble): Handled the deletion of RPA mapping(v5.1).

See merge request espressif/esp-idf!27319
2023-12-14 16:40:23 +08:00
eef85a92f4 fix(nimble): Handled the deletion of RPA mapping. 2023-12-14 09:41:07 +05:30
87cd764d6c Merge branch 'bugfix/fix_issuse_in_scan_and_mesh_v5.1' into 'release/v5.1'
fix(wifi): fix issues in scan and wifi mesh (backport v5.1)

See merge request espressif/esp-idf!27844
2023-12-14 12:09:31 +08:00
0eec2b50be Merge branch 'bugfix/add_legacy_adv_clear_vsc_v5.1' into 'release/v5.1'
fix(nimble): Add support for VSC to clear legacy adv memory (v5.1)

See merge request espressif/esp-idf!27471
2023-12-14 12:01:09 +08:00
7d2ab4c14d fix(pm): place extra link opt in iram 2023-12-14 11:17:54 +08:00
eb7022dd06 Merge branch 'contrib/github_pr_12559_v5.1' into 'release/v5.1'
fix(spi): Correct REG_SPI_BASE(i) macro for all targets (GitHub PR) (v5.1)

See merge request espressif/esp-idf!27714
2023-12-14 11:08:03 +08:00
1b78d57496 Merge branch 'bugfix/bod_reset_c6_h2_v5.1' into 'release/v5.1'
fix(bod): Reset brownout in configuration to avoid RF cannot be enabled again(backport v5.1)

See merge request espressif/esp-idf!27723
2023-12-14 11:05:55 +08:00
45e96ae1c3 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(9129dec) 2023-12-13 19:53:06 +08:00
e3ca11c83a Merge branch 'contrib/github_pr_12683_v5.1' into 'release/v5.1'
fix(tools): fix path delimiter in gdbinit for Windows (v5.1)

See merge request espressif/esp-idf!27575
2023-12-13 19:21:58 +08:00
51aad1d75b feat(esp_eth): abstraction of SPI driver for SPI Ethernet modules 2023-12-13 10:44:23 +01:00
293bd9a0df fix(tools): fix path delimiter in gdbinit for Windows
Merges https://github.com/espressif/esp-idf/pull/12683

Signed-off-by: Alexey Lapshin <alexey.lapshin@espressif.com>
2023-12-13 09:27:08 +00:00
6dc9cc81cc Merge branch 'bugfix/coredump_detect_v5.1' into 'release/v5.1'
tools: idf.py: fix detection of raw core dump file (v5.1)

See merge request espressif/esp-idf!27842
2023-12-13 17:25:19 +08:00
5bbb04ce46 Merge branch 'fix/bump_precommit_esp_idf_sbom_v5.1' into 'release/v5.1'
fix: bump esp-idf-sbom to v0.13.0 in pre-commit (v5.1)

See merge request espressif/esp-idf!27879
2023-12-13 17:03:03 +08:00
ed2a5f0f0e fix(wifi): fix issues in scan and wifi mesh
1. fix(wifi): fix the crash issue when clear scan ap list
2. fix the bug that station can't found AP when the authmode is WPA
3. fix wifi mode error when mesh start after station has connected to router
2023-12-13 17:02:13 +08:00
6e218ceefe feat(wifi): add new api to get one scan ap record 2023-12-13 16:49:04 +08:00
598a86e40a Merge branch 'tools/use_recommended_tool_priority_backport_v_5_1' into 'release/v5.1'
fix(idf_tools): Opt for the recommended tool in tools.json rather than the supported one (v5.1)

See merge request espressif/esp-idf!27795
2023-12-13 16:38:30 +08:00
09ac0b47f9 fix: bump esp-idf-sbom to v0.13.0 in pre-commit
v0.13.0 contains fix for the submodule hash validation. Let's
bump its version in pre-commit, so the fix is used.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-13 07:31:22 +01:00
4c93085e4a fix(example/http): Fixed potential memory leak/crash in when handling error condition 2023-12-13 10:05:19 +05:30
c6a9a06856 Merge branch 'bugfix/fix_some_ble_bugs_v5.1' into 'release/v5.1'
Fixed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!27695
2023-12-13 11:55:52 +08:00
7a7d6aad41 Merge branch 'fix/esp_vfs_fat_sdcard_format_workbuf_leak_v5.1' into 'release/v5.1'
fix: esp_vfs_fat_sdcard_format workbuf memory leak (v5.1)

See merge request espressif/esp-idf!27504
2023-12-12 22:15:52 +08:00
407376b6e6 fix(bt/bluedroid): fixed build error when compiler in performace mode
Closes https://github.com/espressif/esp-idf/issues/12751
2023-12-12 19:04:27 +08:00
2ed73a0714 fix(idf_tools): Opt for the recommended tool in tools.json rather than the supported one 2023-12-12 14:21:55 +08:00
1a6a941521 Merge branch 'bugfix/connect_issue_for_zero_rssi_v5.1' into 'release/v5.1'
fix(esp_wifi): Fix issue of station disconnecting immediately after scanning  (Backport v5.1)

See merge request espressif/esp-idf!26743
2023-12-12 14:00:24 +08:00
9f76b1a57b Merge branch 'fix/wrong_order_of_includes_in_esp_tls_v5.1' into 'release/v5.1'
fix(esp-tls): Fix missing header files in esp_tls_errors.h header file (v5.1)

See merge request espressif/esp-idf!27704
2023-12-12 13:44:36 +08:00
7e47921f12 Merge branch 'bugfix/connect_after_scan_v5.1' into 'release/v5.1'
fix(conn): Change second connect delay time to 730 (v5.1)

See merge request espressif/esp-idf!27835
2023-12-12 13:43:34 +08:00
dbc13bc2ef Merge branch 'bugfix/fix_rtc_us_to_cycle_div_zero_in_deepsleep_v5.1' into 'release/v5.1'
fix(esp_hw_support/sleep): fix rtc_time_us_to_slowclk div zero in deepsleep process (backport v5.1)

See merge request espressif/esp-idf!27764
2023-12-12 13:43:25 +08:00
72ce0187c9 Merge branch 'contrib/github_pr_12460_v5.1' into 'release/v5.1'
fixing OTA write up to SPI_FLASH_SEC_SIZE margins (GitHub PR) (v5.1)

See merge request espressif/esp-idf!27644
2023-12-12 13:41:33 +08:00
4aa464a4ea Merge branch 'fix/aes_mpi_interrupt_allocation_workflow_v5.1' into 'release/v5.1'
fix(mbedtls): move interrupt allocation during initialization phase (v5.1)

See merge request espressif/esp-idf!27204
2023-12-12 11:44:42 +08:00
09c7104752 Merge branch 'fix/coexist_reg_esp32c6_set_default_value_v5.1' into 'release/v5.1'
fix(esp_coex): fix esp32c6 coex reg reset issue (backport v5.1)

See merge request espressif/esp-idf!27829
2023-12-12 11:35:56 +08:00
a0b2682e58 fix(nimble): Add support for VSC to clear legacy adv memory
Legacy adv does not have an API for clear adv memory in controller.
 Added VSC for same.
2023-12-12 07:49:18 +05:30
9ad2c6f8df Merge branch 'docs/fix_dash_encoding_v5.1' into 'release/v5.1'
docs(programming_guide): turned off smartquotes (v5.1)

See merge request espressif/esp-idf!27819
2023-12-12 09:53:10 +08:00
e26de66065 Merge branch 'contrib/github_pr_12637_v5.1' into 'release/v5.1'
Dockerfile with variable depth parameter (GitHub PR) (v5.1)

See merge request espressif/esp-idf!27830
2023-12-11 23:09:50 +08:00
e60b0235ad Merge branch 'feature/qemu-esp-develop-8.1.3-20231206_v5.1' into 'release/v5.1'
feat(tools): update qemu to esp-develop-8.1.3-20231206 (v5.1)

See merge request espressif/esp-idf!27812
2023-12-11 19:21:12 +08:00
62f3dddff7 fix(tools): idf.py: fix detection of raw core dump file
When idf.py coredump-debug is launched with '--core' argument, it
tries to determine the file format (raw, elf, b64). To detect the
'raw' core dump the code checked if the version word matched one of
the known values.
However, the version word also contains the chip ID in the high
half-word, so the check failed for anything other than the ESP32.
The detection of core file format has been moved to esp-coredump
package in version 1.9.0, including the fix for chip ID.

Reported in https://github.com/espressif/esp-idf/issues/10852
2023-12-11 11:26:58 +01:00
d1e31a4194 fix(esp_wifi): Fix issue of station disconnecting immediately when AP RSSI is zero 2023-12-11 14:58:16 +05:30
70f1bd582f Merge branch 'bugfix/backport_wifi_fix_1208_v5.1' into 'release/v5.1'
fix(wifi): backport some wifi bugfix(v5.1)

See merge request espressif/esp-idf!27766
2023-12-11 17:26:06 +08:00
5dac3d9e03 fix(esp_hw_support/sleep): fix rtc_time_us_to_slowclk div zero in deepsleep process
Closes https://github.com/espressif/esp-idf/issues/12695
2023-12-11 09:24:07 +00:00
f4e724a93b fix(conn): Change second connect delay time to 730 2023-12-11 16:57:09 +08:00
b2250f31b9 feat(docker): Add Dockerfile argument for variable clone depth
Closes https://github.com/espressif/esp-idf/pull/12637
2023-12-11 09:03:46 +01:00
de2c208994 fix(esp_coex): fix esp32c6 coex reg reset issue 2023-12-11 15:57:36 +08:00
e91322891c Merge branch 'fix/esp32c6_sleep_pll_issue_v5.1' into 'release/v5.1'
fix(pm): add mac/bb power down/up prepare for fix esp32c6 pll issue (backport v5.1)

See merge request espressif/esp-idf!27339
2023-12-11 15:12:51 +08:00
cda441f47f Merge branch 'bugfix/cts_handle_invalid_year_val_v5.1' into 'release/v5.1'
fix(nimble): Handled invalid write on year value in Current Time Service (v5.1)

See merge request espressif/esp-idf!27462
2023-12-11 15:12:14 +08:00
6836ffd8c9 Merge branch 'fix/check_integrity_on_used_blocks_v5.1' into 'release/v5.1'
heap: fix integrity check on used blocks by the tlsf component (backport v5.1)

See merge request espressif/esp-idf!26563
2023-12-11 15:11:39 +08:00
e0cd5b7aa5 Merge branch 'backport/add_config_to_set_custom_mac_as_base_mac_v5_1' into 'release/v5.1'
feat(mac): Add a configuration to set custom MAC as base MAC(Backport V5.1)

See merge request espressif/esp-idf!27737
2023-12-11 15:11:19 +08:00
8a47b0776b Merge branch 'feature/refactor_some_coexist_sections_v5.1' into 'release/v5.1'
Feature/refactor some coexist sections v5.1

See merge request espressif/esp-idf!27367
2023-12-11 14:50:43 +08:00
f62e7fd4e8 fix(soc): esp32s3/Fix the DROM_DROM_HIGH limit
Previously the DROM_HIGH_ADDR for esp32s3 was 0x3D000000, which
    convers only 16 MB of address range. But esp32s3 supports 32 MB
    external memory. So this address should be 0x3E000000
2023-12-11 12:17:31 +05:30
e8a5d9ef98 fix(mbedtls/aes): fix AES interrupt allocation for AES-GCM operations 2023-12-11 06:46:24 +00:00
4c30f2a4a0 fix(mbedtls): move interrupt allocation during initialization phase 2023-12-11 06:46:24 +00:00
40241d4b68 docs(programming_guide): turned off smartquotes
Sphinx would "smartly" format e.g. double dashes into typographically correct entities,
i.e. a long dash unicode character.

This doesnt always work well for our docs were sometimes a double dash could be a python
argument, which when copied would no longer work.
2023-12-11 14:06:32 +08:00
3646b5d0c1 fix(esp_hw_support): fix esp32h2 system link restore override cpu clk configuration 2023-12-11 11:42:56 +08:00
850bf2b156 feat(tools): update qemu to esp-develop-8.1.3-20231206
https://github.com/espressif/qemu/releases/tag/esp-develop-8.1.3-20231206
2023-12-11 10:35:35 +07:00
05c5d04734 Merge branch 'feature/reinitialize_icg_map_in_modem_module_enable_v5.1' into 'release/v5.1'
fix(esp_hw_support): re-initialize icg map in modem_clock_module_enable (backport v5.1)

See merge request espressif/esp-idf!27767
2023-12-11 10:57:48 +08:00
5bd0ae4dea Merge branch 'bugfix/ble_update_lib_20231201_v5.1' into 'release/v5.1'
update lib on release/v5.1

See merge request espressif/esp-idf!27587
2023-12-11 10:30:23 +08:00
6250af8ed1 fix: esp_vfs_fat_sdcard_format workbuf memory leak 2023-12-11 00:27:44 +00:00
ae07349ec4 feat(coex): apply struct for coex version 2023-12-08 13:06:55 +00:00
834968796a feat(coex): rename coexist sections 2023-12-08 13:06:55 +00:00
15c8d7f65f fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(65db61f)
- Fixed remove and clear white list
2023-12-08 19:54:51 +08:00
5f2c8edd27 fix(bt): Update bt lib for ESP32(fa43201)
- Fixed assert for instant passed workaround
- Fixed scan evt timeout
- Fixed random address setting when scanning
2023-12-08 19:54:39 +08:00
4d6be44b25 fix(bt/controller): Fixed some HCI commands parameter 2023-12-08 19:54:39 +08:00
4d546878b7 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(b8f0db9)
- Fixed assert when llcp instant passed
2023-12-08 19:54:39 +08:00
b1421ac4af fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(70ab55f)
- Fixed assert for instant passed workaround
- Fixed add RPA to white list
- Fixed AES encryption for RPA resolution
2023-12-08 19:54:39 +08:00
2dea0ef6ef fix(bt/bluedroid): Fixed add RPA to white list 2023-12-08 19:54:39 +08:00
3cdbb0406d ble(fix): Fixed crash issue when reset event queue 2023-12-08 17:21:19 +08:00
9b0e4ee24a ble(fix): clear event queue when init event queue
ble: update log module on ESP32C2, ESP32H2 and ESP32C6
2023-12-08 17:20:55 +08:00
4f27be7127 ble(update):
Update c2 lib to 47a787f0
Update h2 lib to 73452eac
Update c6 lib to 73452eac
2023-12-08 17:19:57 +08:00
bcf1645e44 Merge branch 'feat/manifest_check_v5.1' into 'release/v5.1'
feat: use esp-idf-sbom pre-commit plugin (v5.1)

See merge request espressif/esp-idf!27749
2023-12-08 16:55:54 +08:00
ef4f420663 fix(pm): add mac/bb power down/up prepare for fix esp32c6 pll issue
* switch root clk src to PLL for modem reg opt and added callback
* register power_down/power_up callback in ieee802154 driver for esp32c6
* remove software regdma opt in bt
2023-12-08 08:03:32 +00:00
ffeb545260 Merge branch 'ci/fix_test_case_name_while_setup_v5.1' into 'release/v5.1'
ci: assign the test_case_name attribute to the case item while setting up a pytest session (v5.1)

See merge request espressif/esp-idf!27668
2023-12-08 15:32:18 +08:00
d15ef874a7 Merge branch 'bugfix/fix_http_client_async_mode_v5.1' into 'release/v5.1'
fix(esp_http_client): Fix esp_http_client async mode (v5.1)

See merge request espressif/esp-idf!27514
2023-12-08 14:25:55 +08:00
4a7d9dd387 fix(esp_hw_support): re-initialize icg map in modem_clock_module_enable 2023-12-08 14:22:36 +08:00
b3c7123568 fix(esp_wifi): Drop fragmented AMPDU(fixCVE-2020-26142) 2023-12-08 14:17:02 +08:00
b7d599984b fix(wifi): optimize wifi bin size and fix some issue
1.Optimize bin size for STA only mode
2.Change fragment threshold to 256
3.Support fragment for LR mode
4.Fix ampdu duration issue
5.Fix rx fragment fail in Open mode.
2023-12-08 14:16:47 +08:00
54f2536222 Merge branch 'backport/router_forwarding_flag_set_v51' into 'release/v5.1'
feat(lwip): support NA router farwording flag set(Backport V5.1)

See merge request espressif/esp-idf!27630
2023-12-08 12:24:38 +08:00
ca02c6d274 Merge branch 'fix/rng_register_prefix_discrepency_newer_targets_v5.1' into 'release/v5.1'
Fix: RNG register prefix discrepancy for ESP32C6 and ESP32H2 (v5.1)

See merge request espressif/esp-idf!27684
2023-12-08 12:01:36 +08:00
d52d82ee83 Merge branch 'doc/change_deepsleep_example_readme_v5.1' into 'release/v5.1'
Doc/change deepsleep example readme v5.1

See merge request espressif/esp-idf!27447
2023-12-08 11:20:50 +08:00
4caaabec9e Merge branch 'bugfix/lwip_dns_docs_v5.1' into 'release/v5.1'
fix(lwip): Document DNS limitation in lwIP (v5.1)

See merge request espressif/esp-idf!27562
2023-12-08 11:20:13 +08:00
27a78278a6 fix(heap): Patch tlsf_check_pool in ROM heap
The integrity_walker now calls the integrity check hook to control
free AND used blocks of memory in the TLSF pool. This integrity walker
function is called from tlsf_check_pool.

This commit creates a patch of integrity_walker function to update the
outdated implementation in the ROM.
2023-12-08 03:19:04 +00:00
6ac25c9324 fix(heap): Fixed integrity check on used blocks by the tlsf component
This commit updates the tlsf submodule to include the modification made in the component
aiming to perform integrity check on all blocks (not only the free ones).
Added test to test the fix in test_apps/heap_tests.

Fixes https://github.com/espressif/esp-idf/issues/12231
2023-12-08 03:19:04 +00:00
bc3a75d5ba Merge branch 'fix/esp_netif_lock_v5.1' into 'release/v5.1'
fix(esp_netif): Lock netif list with TCPIP context (v5.1)

See merge request espressif/esp-idf!26710
2023-12-08 11:18:09 +08:00
c3de87083f Merge branch 'fix/remove_deprecated_bt_example_sdkfonfigs_v5.1' into 'release/v5.1'
ci(bt/bluedroid): remove configs that are not in effect (backport v5.1)

See merge request espressif/esp-idf!27282
2023-12-08 11:17:18 +08:00
5e29bd5370 Merge branch 'bugfix/fix_adc_continuous_do_not_rst_apb_clk_v5.1' into 'release/v5.1'
fix(adc): fix adc continuous get less results beacuse do not reset apb clk (v5.1)

See merge request espressif/esp-idf!27604
2023-12-07 21:27:05 +08:00
fb511f4ec6 Merge branch 'bugfix/nan_sd_dp_timer_fixes_v5.1' into 'release/v5.1'
Fix NAN service discovery, datapath and timer bugs (Backport v5.1)

See merge request espressif/esp-idf!27522
2023-12-07 21:17:31 +08:00
493ecf59d4 Merge branch 'bugfix/fix_dhcp_subnet_option_api_dos_not_work_issue_5.1' into 'release/v5.1'
Fix(dhcps):fix dhcp subnet option api dos not work issue 5.1

See merge request espressif/esp-idf!27675
2023-12-07 21:09:38 +08:00
977098edca Merge branch 'feature/support_ext1_clear_spec_pins_v5.1' into 'release/v5.1'
fix(pm/ext1): fix c6 h2 lp_aon_ll_ext1_set_wakeup_pins func

See merge request espressif/esp-idf!27552
2023-12-07 21:07:54 +08:00
db25ec2a37 feat: use esp-idf-sbom pre-commit plugin
Currently sbom manifest is checked only in .gitmodules and
this check is done in pre-commit and also in CI. Meaning it's running
three times(pre-commit before push if user has it enabled, in CI
as there is the pre-commit run again and again with test in CI). Since
esp-idf-sbom contains a full manifest validation support and pre-commit
plugin for it, let's use it. This removes all the current sbom testing
and replaces it with a signle pre-commit plugin which validates all
manifests files(sbom.yml, idf_component.yml, .gitmodules and also
referenced manifests) in repository. Note that this checks all
manifests, not only ones which were modified. The check is reasonably
fast though, so it should not cause any problem. The reason for
validating all manifest files is that we want to make sure that the sbom
information in .gitmodules is updated too and that the hash
recorded in .gitmodules is up-to-date. Meaning submodule update
would not trigger this plugin, because no manifest was changed.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-07 13:36:00 +01:00
1bce7d255d fix(esp-tls): Add headers in esp_tls_errors.h header file
Closes https://github.com/espressif/esp-idf/issues/12541
2023-12-07 10:13:43 +00:00
b3d77e3ea5 fix(app_update): avoid erasing an extra sector than the actual required size
OTA update used to fail if `firmware_size == partition_size`, because the code was trying to
erase one additional sector beyond the space reserved for the firmware partition.

This commit fixes the problem and OTA update can work if the firmware
size exactly matches the allocated partition size.

Closes https://github.com/espressif/esp-idf/pull/12460
2023-12-07 10:08:08 +00:00
8425cada28 Merge branch 'bugfix/fix_adc_cali_error_after_light_sleep_wake_on_h2_v5.1' into 'release/v5.1'
adc: fix calibration error when waking up from light sleep on H2 and enable test (v5.1)

See merge request espressif/esp-idf!27603
2023-12-07 17:49:06 +08:00
25507da236 Merge branch 'bugfix/import_lib_example_url_v5.1' into 'release/v5.1'
fix(build-system/example): Removed dead URL for downloading tinyxml2 (v5.1)

See merge request espressif/esp-idf!27661
2023-12-07 16:56:49 +08:00
817884eb31 Merge branch 'bugfix/fix_wifi_init_reentrant_issue_v5.1' into 'release/v5.1'
Bugfix/fix wifi init reentrant issue v5.1

See merge request espressif/esp-idf!27629
2023-12-07 16:22:57 +08:00
19355c0fef fix(esp_http_client): Fix esp_http_client async mode
Closes https://github.com/espressif/esp-idf/issues/12358
2023-12-07 06:47:37 +00:00
zwx
923ce6a4b2 feat(mac): Add a configuration to set custom MAC as base MAC 2023-12-07 14:15:40 +08:00
6a990a37ce fix(soc/esp32h2): Fix llperi_rng_data field discrepancy 2023-12-07 11:42:00 +05:30
9cdf839cf6 fix(esp_wifi): Fix NAN service discovery, datapath and timer bugs
1. Fix crash while cancelling NAN service
2. Avoid possible crash scenarios while forming datapath
3. Modify peer records structure thus fixing issues in datapath establishment
4. Fix timer out of bound issue causing "No timer handle" warning
5. Fix miscellaneous service discovery and datapath issues
2023-12-07 03:54:55 +00:00
e86ff640f8 fix(wifi): free beacon eb when softap destroy 2023-12-07 03:54:55 +00:00
c1782faf0f fix(pm/ext1): fix c6 h2 lp_aon_ll_ext1_set_wakeup_pins func 2023-12-07 03:52:22 +00:00
46d4c6cc0a fix(wifi): fix wifi deinit s_wifi_modem_sleep_lock 2023-12-07 03:44:38 +00:00
3515b1d5c8 fix(wifi): fix wifi init reentrant issue 2023-12-07 03:44:38 +00:00
97b9c24c62 fix(dhcp server):dhcp server can not restore address pool 2023-12-07 02:59:50 +00:00
c69f3aec91 Fix(dhcps):fix dhcp subnet option api dos not work issue 2023-12-07 02:59:50 +00:00
zwx
5413b6b794 feat(lwip): support NA router farwording flag set
* Update submodule: git log --oneline
  4a8286ab8bcf983f22421e3d4be650837b5eb277..542ba2997f6cc14fe9c3d781bf9b0d890cd70bb1
- fix router forwarding flag set (espressif/esp-lwip@542ba299)
2023-12-07 10:52:10 +08:00
zwx
7f12a645ce fix(vfs): fix uart malloc when locates ISR context in IRAM 2023-12-07 10:43:58 +08:00
9dd90e2d9b fix(bod): Reset brownout in configuration to avoid RF cannot be enabled again 2023-12-07 10:33:58 +08:00
5bdcaef8c9 Merge branch 'fix/ieee802154_sleep_config_v5.1' into 'release/v5.1'
fix(ieee802154): fix ieeee802154 sleep enable configuration dependency issue (backport v5.1)

See merge request espressif/esp-idf!27466
2023-12-07 10:05:17 +08:00
ca5c8deb7e Merge branch 'fix/fatfsgen_construct_v5.1' into 'release/v5.1'
fix(tools): Fix fatfsgen construct dependency (v5.1)

See merge request espressif/esp-idf!27655
2023-12-07 07:18:49 +08:00
46d52c81f9 Merge branch 'backport5.1/ot_examples_config' into 'release/v5.1'
fix(openthread): openthread examples config (backport v5.1)

See merge request espressif/esp-idf!27553
2023-12-06 21:44:08 +08:00
f38e56e685 fix(ieee802154): fix ieeee802154 sleep enable configuration dependency issue 2023-12-06 12:43:58 +00:00
a496e87d73 fix(nimble): Handled invalid write on year value in Current Time Service 2023-12-06 18:03:59 +05:30
c42c37aff7 Merge branch 'save_isr_ctx_to_coredump_v5.1' into 'release/v5.1'
feat(coredump): save isr context to coredump elf file (v5.1)

See merge request espressif/esp-idf!27454
2023-12-06 18:38:54 +08:00
6190b3f7c9 fix(adc): restore cali registers after light sleep wake up on H2 and enable test 2023-12-06 10:19:52 +00:00
98ec583690 ci(adc): add a test that adc continuous read after restarting 2023-12-06 10:19:45 +00:00
57a5c4684c fix(adc): fix adc continuous get less results beacuse do not reset apb clk 2023-12-06 10:19:45 +00:00
ccc75dd2da fix(tools): Fix fatfsgen construct exception type and dependency
construct=2.10.70 fixed an issue
(c3866e9492)
and StringError is raised instead of UnicodeDecodeError.
2023-12-06 08:50:01 +00:00
3486cf1b60 fix(spi): correct some signals and dummy bits docs 2023-12-06 16:15:23 +08:00
8e0d64e94c fix(spi): Correct REG_SPI_BASE(i) macro for all targets
The existing formula can never match these registers.

Closes https://github.com/espressif/esp-idf/pull/12559
Closes https://github.com/espressif/esp-idf/pull/12562
2023-12-06 16:13:01 +08:00
4fe15460ab Merge branch 'ci/fix_build_linux_targets' into 'release/v5.1'
Ci/fix build linux targets (v5.1)

See merge request espressif/esp-idf!27519
2023-12-06 15:31:35 +08:00
5cf65ce766 Merge branch 'fix/usb_host_soc_caps_backport_v5.1' into 'release/v5.1'
USB host soc caps (backport v5.1)

See merge request espressif/esp-idf!27399
2023-12-06 09:59:53 +08:00
c040a614a9 fix(soc/esp32c6): Fix llperi_rng_data field discrepancy 2023-12-05 21:08:48 +05:30
3ed6c9bed5 ci: assign the test_case_name attribute to the case item while setting up a pytest session 2023-12-05 09:06:01 +01:00
81ab5f7fb7 fix(build-system/example): Updated dead URL for downloading tinyxml2
The import_lib example contained a fallback mirror for downloading tinyxml2 sources
but this link was dead. If this mirror was used it would cause the build to fail.
2023-12-05 12:32:33 +08:00
d083a0e313 Merge branch 'support/add_srp_salt_ver_gen_api_v5.1' into 'release/v5.1'
Generate Salt and verifier pair for given username and password (v5.1)

See merge request espressif/esp-idf!27351
2023-12-04 21:10:51 +08:00
d13e47596b fix(openthread): add eventfd nums for spi interface 2023-12-04 17:51:25 +08:00
c9babf8cb3 fix(openthread): remove invalid configs from ot examples 2023-12-04 17:51:25 +08:00
9226c65c74 docs(pm):add uart wakeup description when pd top 2023-12-04 07:39:11 +00:00
57787d1aae docs(pm):add gpio wakeup description when pd top 2023-12-04 07:39:11 +00:00
5d4a786354 docs(pm):change_deepsleep_example_readme 2023-12-04 07:39:11 +00:00
b5289ed2ba Merge branch 'feature/docker_git_safe_dirs_v5.1' into 'release/v5.1'
feat(docker): allow to add dirs into git's safe.directory (v5.1)

See merge request espressif/esp-idf!27560
2023-12-01 20:02:53 +08:00
0f51b5da67 fix(lwip): Document DNS limitation in lwIP
* Add a note that DNS server config is global in lwIP
* Add a section about defining LWIP config macros from CMake
* Mention the DNS limitation in ESP-IDF additions to lwIP
* Update CN for lwIP DNS limitation

Co-Authored-By: Wang Ziyan <wangziyan@espressif.com>
2023-12-01 09:51:47 +01:00
99f9dd4c07 feat(docker): allow to add paths into git's safe.directory
With 8959555cee7e[1] ("setup_git_directory(): add an owner check for the top..")
git added an ownership check of the git directory and refuses to
run any git commands, even parsing the config file, if the git directory
is not owned by the current user. The "fatal: detected dubious ownership in repository"
is reported.

This fixes CVE-2022-24765[2], which allows to compromise user account. On a
multi-user system or e.g. on a shared file system, one user may create a "rogue"
git repository with e.g. core.fsmonitor set to an arbitrary command. Other user
may unwillingly execute this command by running e.g. git-diff or
git-status within the "rogue" git repository, which may be in one of the parent
directories. If e.g. PS1 is set to display information about a git
repository in CWD, as suggested in Git in Bash[3], the user do not need to run
any git command to trigger this, just entering some subdirectory under
this "rogue" git repository is enough, because the git command will be
started transparently through the script used in PS1. The core.fsmonitor
can be set to arbitrary command. It's purpose is to help git to identify changed files
and speed up the scanning for changed files.

rogue
├── .git     # owned by user1
└── dir1     # owned by user2
    ├── dir2 # owned by user2
    └── .git # owned by user2

user1 sets core.fsmonitor for git repository in rogue directory
$ git config --add core.fsmonitor "bash -c 'rm -rf \$HOME'"

user2 enters dir1 and runs e.g. git diff and triggers the core.fsmonitor command.

The ownership check may cause problems when running git commands in
ESP-IDF Docker container. For example user may run the container as
root, but the mounted project may be owned by a particular user.

In this case git will refuse to execute any git command within the
"/project" directory, because it's not owned by root. To overcome this,
git allows to set safe.directories, for which the ownership check is
skipped. The security check may be completely disabled by setting
safe.directories to "*". This solution was proposed in PR 12636[4], but
it would allow make it possible to exploit this vulnerability again.

This fix allows user to specify git's safe.directory in IDF_GIT_SAFE_DIR
environmental variable, which may be set during container startup.

The IDF_GIT_SAFE_DIR has same format as PATH and multiple directories can be
specified by using a ":" separator. To entirely disable this git security check
within the container, user may set IDF_GIT_SAFE_DIR='*'. This might be
heplfull in CI.

Closes https://github.com/espressif/esp-idf/pull/12636

[1] - 8959555cee
[2] - https://nvd.nist.gov/vuln/detail/cve-2022-24765
[3] - https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash
[4] - https://github.com/espressif/esp-idf/pull/12636

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-12-01 08:23:16 +01:00
9a05c9446f Merge branch 'fix/ble_mesh_example_relay_enable_v5.1' into 'release/v5.1'
fix(ble_mesh): Enable relay by default for the specific dev role (v5.1)

See merge request espressif/esp-idf!27512
2023-12-01 15:17:24 +08:00
fae44bf123 Merge branch 'bugfix/ble_update_lib_20231124_v5.1' into 'release/v5.1'
ble(update):Update c2 lib to 79ed4e8a,Update h2 lib to 9a237426,Update c6 lib to 9a237426

See merge request espressif/esp-idf!27393
2023-12-01 13:58:21 +08:00
76d3d18fdd Merge branch 'fix/monitor_print_filter_v5.1' into 'release/v5.1'
fix(tools/monitor): fix PRINT_FILTER env variable usage (v5.1)

See merge request espressif/esp-idf!27418
2023-12-01 00:09:14 +08:00
1f0f661979 ci: skip pytest cases in managed_components 2023-11-30 09:08:01 +01:00
7df8574119 ci: fix missing linux related .build-test-rules.yml 2023-11-30 09:07:36 +01:00
1bfd5e35af fix(ble_mesh): Enable relay by default for the specific dev role 2023-11-30 12:29:37 +08:00
a803c846aa Merge branch 'bugfix/console_examples_reenable_v5.1' into 'release/v5.1'
examples: re-enable console examples for C2, C6, H2 (v5.1)

See merge request espressif/esp-idf!24336
2023-11-29 23:57:09 +08:00
a165b5c1d5 Merge branch 'feature/expose_unload_partitions_v5.1' into 'release/v5.1'
refactor(esp_partition): Expose function for unloading partitions (v5.1)

See merge request espressif/esp-idf!27426
2023-11-29 16:35:19 +08:00
958d98c8e7 Merge branch 'fix/fatfs_formatting_wrong_volume_v5.1' into 'release/v5.1'
Fix: FATFS formatting wrong partition (v5.1)

See merge request espressif/esp-idf!27373
2023-11-29 16:33:29 +08:00
d51b71260a Merge branch 'feature/support_ble_esp32c3_eco7_v5.1' into 'release/v5.1'
Feature/support ble esp32c3 eco7 (backport v5.1)

See merge request espressif/esp-idf!27326
2023-11-29 14:14:22 +08:00
3b1d428501 Merge branch 'bugfix/preencrypted_ota_failed_with_partial_download_v5.1' into 'release/v5.1'
fix(esp_https_ota): fix preencrypted ota failed with pytest server and partial http enabled (v5.1)

See merge request espressif/esp-idf!27354
2023-11-29 14:05:39 +08:00
4788804f6d Merge branch 'bugfix/wrong_ota_upgrade_size_log_v5.1' into 'release/v5.1'
fix(esp_https_ota): Fix wrong debug print for ota upgrade size (v5.1)

See merge request espressif/esp-idf!27352
2023-11-29 11:38:53 +08:00
5f35f5ddb8 Merge branch 'bugfix/i80_lcd_tx_param_check_enhancement_v5.1' into 'release/v5.1'
fix(i80_lcd): enhance the check of a valid data phase (v5.1)

See merge request espressif/esp-idf!27428
2023-11-29 10:37:43 +08:00
e950cdf549 fix(usb/host): remove bInterval verification during pipe opening for INTR and ISOC EPs 2023-11-28 22:00:54 +01:00
609628e139 fix(usb/host): Do not abort on string descriptor overflow
Some devices return full LANGID table, even if short LANGID table was requested.
No memory overflow occurs, because we have allocated enough memory for transfers to the
default pipe. So we can ignore the error and continue with string desc fetching.
2023-11-28 22:00:54 +01:00
fdab2d0c32 refactor(hal/usb_dwc): Add DWC OTG configuration values
This commit adds a subset of the DWC OTG configuration values to the
'usb_dwc_ll.h' file. Only relevant configuration values have been added.

Some DWC OTG releated constants have also been moved from 'usb_dwc_hal.h'
to 'usb_dwc_ll.h' and renamed.
2023-11-28 22:00:54 +01:00
411405355d refactor(soc): SOC_USB_PERIPH_NUM option
This commit refactors SOC_USB_PERIPH_NUM as follows:

- Renamed to SOC_USB_OTG_PERIPH_NUM to avoid confusion with USB Serial JTAG
- Updated to unsigned integer "1U"
- Updated some build rules to depend on SOC_USB_OTG_SUPPORTED instead
2023-11-28 22:00:30 +01:00
4a32955f74 feat(coredump): save isr context to coredump elf file 2023-11-28 18:19:19 +01:00
be057f26dc ci(system): re-enable build test app for C2 and C6, clean up configs
Since we can use CONFIG_NAME now to specify build rules, we don't need
to have target-specific config files.
2023-11-28 18:09:06 +01:00
6e2dd2924a fix(esp_hw_support): fix build with CONFIG_ESP_CONSOLE_UART=n on C6
Closes https://github.com/espressif/esp-idf/issues/11924
2023-11-28 18:08:11 +01:00
b52607af71 examples: re-enable console examples for C2, C6, H2
- Split the sleep-related system commands into a separate file
- Don't compile that file and don't register sleep commands for H2 yet
- Exclude Wi-Fi commands if the chip doesn't have Wi-Fi
2023-11-28 18:08:11 +01:00
4f16f201af Merge branch 'bugfix/fix_duplicate_exception_vsc_5.1' into 'release/v5.1'
fix(nimble): Fix the parameters in duplicate exception list vsc command(v5.1)

See merge request espressif/esp-idf!27406
2023-11-28 15:49:37 +08:00
3875e26b3b Merge branch 'test/idf-build-apps-1.0.0_v5.1' into 'release/v5.1'
CI: make master pipeline compatible with idf-build-apps 1.0.0 release (v5.1)

See merge request espressif/esp-idf!26247
2023-11-28 14:59:39 +08:00
d8456e5767 fix(i80_lcd): enhance the check of a valid data phase
in case the user passes a (uint8_t){0x00} parameter with the perameter size
set to zero
2023-11-28 09:57:11 +08:00
5e140f4228 refactor(esp_partition): Expose function for unloading partitions
Closes https://github.com/espressif/esp-idf/issues/12625
2023-11-27 19:50:16 +01:00
a34d9774bf feat: support ble esp32c3 eco7 2023-11-27 11:32:50 +00:00
03582a8cfe fix(esp32c3): Update esp32c3 chip revision 2023-11-27 11:32:50 +00:00
5aa458a591 feat(esp32c3): Add rom ld with ROM tag esp32c3-eco7-20230720 2023-11-27 11:32:50 +00:00
c14d05ff61 docs: Update CN translation for api-guides/tools/idf-monitor.rst 2023-11-27 09:38:39 +01:00
c0e8969afa fix(tools/monitor): fix PRINT_FILTER env variable usage 2023-11-27 09:37:36 +01:00
2c77ccda5e Merge branch 'check_debug_aware_config_v5.1' into 'release/v5.1'
fix(esp_hw_support): re-enable CONFIG_ESP_DEBUG_OCDAWARE functionality (v5.1)

See merge request espressif/esp-idf!27106
2023-11-27 14:12:05 +08:00
d300f91b4e fix(nimble): Fix the parameters in duplicate exception list vsc command 2023-11-27 09:22:07 +05:30
54a5d13a7a Merge branch 'bugfix/fix_dangling_pointer_compilation_warning_v5.1' into 'release/v5.1'
fix(nimble): Fix dangling pointer error during compilation (v5.1)

See merge request espressif/esp-idf!27161
2023-11-27 10:38:03 +08:00
40534e5ad6 fix(nimble): Fix dangling pointer error during compilation 2023-11-26 12:38:19 +05:30
e6602ced8e ble: update rom.ld file 2023-11-24 20:34:21 +08:00
8f37c22a0d ble: update sdkconfig_version on ESP32C2, ESP32H2 and ESP32C6 2023-11-24 20:19:50 +08:00
49d81c71a8 ble(fix): fix RX issue on ESP32-C2 2023-11-24 19:40:28 +08:00
ff0106345f ble:
Update c2 lib to 79ed4e8a
Update h2 lib to 9a237426
Update c6 lib to 9a237426
2023-11-24 19:21:04 +08:00
5e88ecfd02 fix(esp_hw_support): re-enable CONFIG_ESP_DEBUG_OCDAWARE functionality 2023-11-24 09:54:18 +00:00
3ba577165c Merge branch 'bugfix/esp32s3_usb_otg_console_v5.1' into 'release/v5.1'
system: support USB_OTG CDC console on ESP32-S3 (v5.1)

See merge request espressif/esp-idf!24337
2023-11-24 10:19:02 +08:00
9e863521c6 Merge branch 'bugfix/ble_gap_unpair_oldest_peer_fix_v5.1' into 'release/v5.1'
fix(nimble): Fixed ble_gap_unpair_oldest_peer to prevent writing to invalid memory (v5.1)

See merge request espressif/esp-idf!27316
2023-11-24 10:15:33 +08:00
ff8b0cf14b fix(storage): FATFS WL function formatting wrong partition
Closes https://github.com/espressif/esp-idf/issues/12542

Co-authored-by: Tony Stuart <anthonyfstuart@gmail.com>
2023-11-23 22:55:58 +01:00
3bcbbf13fe Merge branch 'feature/eth_loopback_test_v5.1' into 'release/v5.1'
esp_eth/test_apps: add loopback test (v5.1)

See merge request espressif/esp-idf!26806
2023-11-24 00:43:35 +08:00
80b61281b9 Merge branch 'bugfix/ble_update_lib_1110_5.1' into 'release/v5.1'
Bugfix/ble update lib 1110 5.1

See merge request espressif/esp-idf!27061
2023-11-23 19:10:49 +08:00
c1eae4b7be Merge branch 'bugfix/return_code_of_ota_finish_api_v5.1' into 'release/v5.1'
fix(esp_https_ota): fix return code of esp_https_ota_finish API (v5.1)

See merge request espressif/esp-idf!27335
2023-11-23 16:31:06 +08:00
0e214b776b fix: fix preencrypted ota failed with pytest server and partial http enabled 2023-11-23 12:50:18 +05:30
79704082c2 fix(component-esp_https_ota): Fix wrong debug print for ota upgrade size 2023-11-23 12:28:39 +05:30
6b8ba332b8 feat(provisioning): Generate Salt and verifier pair for given username and password
This commit adds a new feature to generate a salt and verifier pair for a given username and
password during the provisioning process. This is useful in scenarios where the pairing pin is
randomly generated and shown via some interface such as a display or console.

- Uses the provided username and password to generate a salt and verifier pair
- Adds support for dev mode where the pin/password can still be read from flash
2023-11-23 12:01:10 +05:30
8857082585 refactor(esp_srp): Expose esp_srp.h and add API docs
- Also added missing `protocomm_security2` reference in `protocomm.rst`
2023-11-23 12:01:10 +05:30
0feef5f2f3 Merge branch 'backport/add_docs_for_coex_v51' into 'release/v5.1'
feat(docs) Add RF Coexist docs for H2(BackportV5.1)

See merge request espressif/esp-idf!27236
2023-11-23 13:57:42 +08:00
2db80a8d3c fix(nimble): Fixed ble_gap_unpair_oldest_peer to prevent writing to invalid memory (v5.1) 2023-11-23 11:17:04 +05:30
e55ede5f94 Merge branch 'feature/get_whitelist_size_v5.1' into 'release/v5.1'
feat(nimble): Added API to retrieve the size of the controller's white list (v5.1)

See merge request espressif/esp-idf!26954
2023-11-23 12:34:19 +08:00
3e2dbfec47 Merge branch 'contrib/github_pr_12558_v5.1' into 'release/v5.1'
Fix: esptool_py incorrectly assumed target name equals binary name (GitHub PR) (v5.1)

See merge request espressif/esp-idf!27269
2023-11-22 22:41:47 +08:00
3e04fba477 Merge branch 'bugfix/uart_vfs_select_in_iram_v5.1' into 'release/v5.1'
fix: add UART VFS select callback in IRAM when CONFIG_UART_ISR_IN_IRAM is enabled (v5.1)

See merge request espressif/esp-idf!27298
2023-11-22 22:41:18 +08:00
d23b41c7cb fix(esp_eth): fixed ETH_CMD_READ/WRITE_PHY_REG build issue 2023-11-22 15:28:01 +01:00
0df97644c4 ci(esp_eth): addressed LAN8720 errata in CI test 2023-11-22 15:28:01 +01:00
99d4c1d13c feat(esp_eth): added ioctl option to read/write PHY registers
LAN87xx: Added extra delay after setting PHY speed
2023-11-22 15:28:01 +01:00
1d3e466c61 ci(esp_eth): make additional Ethernet chips test as nightly run 2023-11-22 15:28:01 +01:00
50a54194b7 ci: fix pytest components ethernet rules 2023-11-22 15:28:01 +01:00
1215fca04e ci(esp_eth): added tests of all supported Etherent chips 2023-11-22 15:27:57 +01:00
6fda9fe207 fix(esp_eth): various Ethernet driver fixes
ksz8851snl: enabled reception of multicast frames

Internal EMAC: fixed APLL CLK deinitialization

DM9051 and KSZ80xx: fixed speed configuration when not in loopback mode

phy_802_3: added multiple attempts when autodetecting PHY address
2023-11-22 15:23:52 +01:00
6bc957ee4f esp_eth: add loopback test, change chip drivers to reflect chip specific behaviour
In esp_eth_test_apps.c:
Add test of loopback functionality. Change speed/duplex/autonegotiation test - remove need to enable loopback (required
for it to work on some phys supported by ESP-IDF)

In Kconfig.projbuild:
Add parameters to select which configuration is used - standard or custom.
Add for custom configuration parameters to select MDC and MDIO pins (required to work with WESP-32 and other boards that
use non-standard pin assignments).

In esp_eth_test_common.c:
Add code to support changes made in Kconfig

In sdkconfig.ci.default_rtl8201:
Change config which is used. Now custom is used and MDC is gpio 16, MDIO is gpio 17. Reuqired to work with WESP-32

In esp_eth_phy_802_3.h:
Make 802.3 API public.

In esp_eth_phy_802_3.c:
Add loopback check in eth_phy_802_3_set_duplex(). Now ESP_ERR_INVALID_STATE is invoked on attempt to set duplex to half
when loopback is enabled.
Remove static property from esp_eth_phy_802_3_autonego_ctrl and esp_eth_phy_802_3_loopback.

In esp_eth_phy_dm9051.c:
Add dm9051_loopback() because DM9051 requires setting additional bit to enable auto-negotiation loopback for data to be
received. Add dm9051_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is
enabled because such speed configuration is unsupported.

In esp_eth_phy_ksz80xx.c:
Add ksz80xx_set_speed() which invokes ESP_ERR_INVALID_STATE on attempt to set speed to 10 Mbps when loopback is enabled
because such speed configuration is unsupported.

In esp_eth_phy_ksz8851snl.c:
Change phy_ksz8851_set_duplex() to invoke ESP_ERR_INVALID_STATE on attempt to set duplex to half when loopback is enabled.

In  esp_eth_phy_dp83848.c, esp_eth_phy_rtl8201.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.

In esp_eth_phy_lan87xx.c:
Add autonego_ctrl implementation which prevents enabling autonegotiation when loopback is enabled.
Add loopback implementation which disables autonegotiation prior to enabling loopback.
Fix link indicating being down when loopback is enabled by force setting link up.
2023-11-22 15:23:52 +01:00
d778b07b22 fix(esp_https_ota): fix return code of esp_https_ota_finish API
Closes https://github.com/espressif/esp-idf/issues/12635
2023-11-22 17:10:08 +05:30
2a227b89d5 Merge branch 'feature/walkthrough_for_bleprph_v5.1' into 'release/v5.1'
doc (nimble): Added the tutorial for bleprph example. (v5.1)

See merge request espressif/esp-idf!26887
2023-11-22 18:21:49 +08:00
ad11452275 Merge branch 'bugfix/cleanup_nimble_sdkconfig_v5.1' into 'release/v5.1'
ci(nimble): Cleanup sdkconfig files for nimble examples (v5.1)

See merge request espressif/esp-idf!27289
2023-11-22 18:09:16 +08:00
5e07ffb444 fix(esp_netif): Mark esp_netif_next deprecated and fix usages
* Uses netif_find_if() in IPv6 examples
* Fixes esp_netif_next() usage in L2TAP
2023-11-22 09:59:37 +00:00
80cc7e8928 feat(esp_netif): Added new API to search in netif list 2023-11-22 09:59:37 +00:00
65917bb8c3 fix(esp_netif): Lock netif list with TCPIP context
This commit removes the lock from the list manipulation code in esp_netif_objects.c,
 because we already have another lock/task context for lwip.
So the list manipulation is unsafe and safety must be assured by the stack layer
(in esp_netif_lwip).
Problems with current locking:
* implementation of locking was wrong -- lazy init style of creating the mutex is not
  thread safe (and destroying it if we have no interface makes the problem exhibit very frequently)
* locking only the list won't solve issues when assessing interfaces atomically
* maintaining multiple locks is problematic, as we often switch between
lwip context and user context in internal implementation of esp_netif_lwip

Closes https://github.com/espressif/esp-idf/issues/12261
2023-11-22 09:59:37 +00:00
2cc61caf7b Merge branch 'bugfix/add_par_check_in_ag_cind_res_v5.1' into 'release/v5.1'
Bugfix/add par check in ag cind res v5.1

See merge request espressif/esp-idf!27257
2023-11-22 17:47:28 +08:00
d5e87fed74 Merge branch 'bugfix/spp_deinit_crash_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix the crash of invalid access to released resources (v5.1)

See merge request espressif/esp-idf!27251
2023-11-22 17:45:48 +08:00
8b6977b883 Merge branch 'bugfix/coex_cfg_option_invisible_v5.1' into 'release/v5.1'
fix(esp_coex): Fix dependency errors in coexist configuration (Backport v5.1)

See merge request espressif/esp-idf!26577
2023-11-22 17:45:05 +08:00
b09e1d860d Merge branch 'bugfix/fix_psram_access_faild_after_pd_cpu_wakeup_v5.1' into 'release/v5.1'
fix(esp_pm): fix psram access failed after pd_cpu wakeup if uart driver driven console is used (backport v5.1)

See merge request espressif/esp-idf!27051
2023-11-22 17:44:32 +08:00
zwx
f710a49680 feat(docs) Add RF Coexist docs for H2 2023-11-22 17:04:55 +08:00
8dcd59f34f feat(nimble): Added API to retrieve the size of the controller's white list (v5.1) 2023-11-22 10:29:36 +05:30
ecbbd3c3d9 Merge branch 'backport/add_ot_radio_stats_enable_config_5_1' into 'release/v5.1'
feat(openthread): backport some openthread features(BackportV5.1)

See merge request espressif/esp-idf!26885
2023-11-22 12:23:53 +08:00
3662303f31 Merge branch 'bugfix/generate_new_irk_across_reboot_v5.1' into 'release/v5.1'
fix(nimble): Generate a new unique IRK for every chip. (v5.1)

See merge request espressif/esp-idf!27117
2023-11-22 03:03:39 +08:00
6481b0161c ci: add build test for CONFIG_ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF 2023-11-21 17:33:30 +01:00
e2f1327a5c examples: re-enable system/console/advanced_usb_cdc for ESP32-S3
Closes https://github.com/espressif/esp-idf/issues/9364
2023-11-21 17:33:30 +01:00
6ec4937cec esp_system: usb_console support for ESP32-S3
Closes https://github.com/espressif/esp-idf/issues/8879
Closes https://github.com/espressif/esp-idf/issues/8738
2023-11-21 17:33:30 +01:00
22dd730a7c esp_rom: convert USB related headers to SPDX, update COPYRIGHTS.rst 2023-11-21 17:33:30 +01:00
6d1f573945 esp_rom: implement usb deinit functions added in S3 ROM for S2
This cleans up usb_console.c and prepares it for S3 support.
2023-11-21 17:33:29 +01:00
228dbe103f esp_rom: add USB_OTG "port" number for S2 and S3 2023-11-21 17:33:29 +01:00
c7b409aa94 esp_rom: sync changes for ESP32-S3 USB related files, minor fix for S2
Used esp-rom tag esp32s3-20210327 and did manual cleanup.
Rename s_usb_osglue to rom_usb_osglue like it was done for esp32s2.
Some comments in esp32s2 headers are synced from esp32s3.
2023-11-21 17:33:29 +01:00
2c341a8557 console: minor fixes
- wrong comment
- duplicated setvbuf
2023-11-21 17:33:29 +01:00
633a3b06db fix(vfs/uart): add UART VFS select callback in IRAM
UART VFS select callback is placed in IRAM when CONFIG_UART_ISR_IN_IRAM is enabled
2023-11-21 14:17:08 +01:00
d24f7d9f12 ble(fix): deinit crash issue 2023-11-21 15:05:22 +08:00
zwl
9cf6280eea fix(ble): fixed ble occasional rx exception issue 2023-11-21 15:03:38 +08:00
2cf6c185dc ci(ble/bluedroid): Add notes in sdkconfig.defaults 2023-11-21 15:03:38 +08:00
11f26f3319 ble: update controller log module 2023-11-21 15:03:38 +08:00
fcc8ce5de5 ble: update c6 h2 lib to 5b1dfd2b, c2 lib to db4e1fb2 2023-11-21 15:03:38 +08:00
2984e14eba ble(fix): Fixed the issue of not returning memory to the memory pool after deinit callout
ble(fix): Fixed the issue of not returning memory to the memory pool after deinit callout
2023-11-21 15:03:38 +08:00
9571780d5e ci(nimble): Cleanup sdkconfig files for nimble examples 2023-11-21 12:23:06 +05:30
514cd783a3 Merge branch 'bugfix/esp32h2_ecdsa_hardware_k_v5.1' into 'release/v5.1'
fix(esp32h2): program use_hardware_k efuse bit for ECDSA key purpose (v5.1)

See merge request espressif/esp-idf!27271
2023-11-21 13:57:38 +08:00
6965a11570 fix(nimble): Generate a new unique Local IRK for each chip 2023-11-21 10:23:42 +05:30
4d88e7b9a7 Merge branch 'bugfix/remove_bond_v5.1' into 'release/v5.1'
fix(nimble):Handled IRK/LTK deletion based on key availability (v5.1)

See merge request espressif/esp-idf!26597
2023-11-21 12:47:54 +08:00
d578395041 Merge branch 'bugfix/secure_boot_v2_docs_v5.1' into 'release/v5.1'
fix(docs): correct the target specific macros for secure boot v2 guide (v5.1)

See merge request espressif/esp-idf!27170
2023-11-21 11:10:41 +08:00
64e7343e40 Merge branch 'bugfix/fix_adc_read_zero_h2_v5.1' into 'release/v5.1'
ADC: fix adc raw data get 0 because of signal delay on ESP32H2(v5.1)

See merge request espressif/esp-idf!26976
2023-11-21 11:08:57 +08:00
0fa38244cb Merge branch 'bugfix/newlib_test_correct_assertions_v5.1' into 'release/v5.1'
fix(newlib,ci): wrong floating point number handling in tests (v5.1)

See merge request espressif/esp-idf!27090
2023-11-21 11:08:32 +08:00
de81da8b53 Merge branch 'bugfix/fix_espcoredump_compilation_warning_v5.1' into 'release/v5.1'
fix(espcoredump): fixed compilation warning (v5.1)

See merge request espressif/esp-idf!26591
2023-11-21 11:07:57 +08:00
b3479b3164 Merge branch 'bugfix/docs_hw_breakpoints_num_v5.1' into 'release/v5.1'
fix(docs/jtag): Fix hard-coded HW breakpoints/watchpoints number (v5.1)

See merge request espressif/esp-idf!26500
2023-11-21 11:07:13 +08:00
2277c3c9dd Merge branch 'feature/pseudo_exccause_to_openocd_v5.1' into 'release/v5.1'
Feature/pseudo exccause to openocd (v5.1)

See merge request espressif/esp-idf!26544
2023-11-21 11:06:41 +08:00
58344b1517 Merge branch 'backport-v5.1/gcov-write-fix' into 'release/v5.1'
fix(app_trace): fix host file write API return value

See merge request espressif/esp-idf!26421
2023-11-21 11:06:04 +08:00
6bc8a025d5 Merge branch 'bugfix/ledc_max_duty_cycle_v5.1' into 'release/v5.1'
fix(ledc): fix ledc driver 100% duty cycle configuration (backport v5.1)

See merge request espressif/esp-idf!27179
2023-11-21 10:58:16 +08:00
e718b603e4 Merge branch 'bugfix/clear_ulp_wake_intr_in_wake_source_enable_v5.1' into 'release/v5.1'
fix(esp_hw_support): clear all type ULP wakeup intr status at ulp wakeup source enable (backport v5.1)

See merge request espressif/esp-idf!27188
2023-11-21 10:52:54 +08:00
0e1ec38785 Merge branch 'bugfix/fix_lightsleep_current_leakage_on_usj_pad_v5.1' into 'release/v5.1'
fix(esp_hw_support): fix lightsleep current leakage on usb pad (backport v5.1)

See merge request espressif/esp-idf!27205
2023-11-21 10:51:11 +08:00
1978b711f0 ci(bt/bluedroid): remove configs that are not in effect 2023-11-21 10:09:40 +08:00
533b4a2e02 fix(nimble): Handled IRK/LTK deletion based on key availability 2023-11-21 07:15:56 +05:30
443a612a46 Merge branch 'bugfix/pairing_when_enc_with_no_key_fails_v5.1' into 'release/v5.1'
fix(nimble): Initate pairing if encryption fails with reason no pin or key missing (v5.1)

See merge request espressif/esp-idf!27017
2023-11-21 09:05:44 +08:00
c75bab8fcb fix(nimble): Initate pairing if encryption fails with reason no pin or key missing 2023-11-20 20:22:48 +05:30
3b30594eef Merge branch 'bugfix/ble_gap_unpair_oldest_peer_v5.1' into 'release/v5.1'
fix(nimble): Fixed incorrect handling of bonded devices (v5.1)

See merge request espressif/esp-idf!26939
2023-11-20 22:41:11 +08:00
78453c8918 docs(ecdsa): add a note about TRNG dependency for ECDSA peripheral 2023-11-20 16:17:51 +05:30
bb1376ff5d fix(api-docs): include in the ECDSA APIs for doxygen build 2023-11-20 16:17:11 +05:30
d9abb44049 docs: add ECDSA peripheral chapter for H2/P4
- Add ECDSA peripheral chapter and instructions to program efuse key block
- Update security guide for ECDSA peripheral mention for device identity
- Link with ESP-TLS guide about using ECDSA peripheral in TLS connection
2023-11-20 16:13:35 +05:30
2cd1635b86 fix(ecdsa): remove unused k_mode from the ECDSA HAL/LL API
For ESP32-H2 case, the hardware k mode is always enforced through
efuse settings (done in startup code).

For ESP32-P4 case, the software k mode is not supported in the peripheral
itself and code was redundant.
2023-11-20 16:05:15 +05:30
0ccfa4b0c2 fix(esp32h2): program use_hardware_k efuse bit for ECDSA key purpose
In ESP32-H2, the ECDSA peripheral by default uses the TRNG (hardware)
generated k value but it can be overridden to software supplied k.
This can happen through by overriding the `ECDSA_SOFTWARE_SET_K` bit
in the configuration register. Even though the HAL API is not exposed
for this but still it could be achieved by direct register
programming. And for this scenario, if sufficiently random k is not
supplied by the software then it could posses a security risk.

In this change, we are unconditionally programming the efuse
`ESP_EFUSE_ECDSA_FORCE_USE_HARDWARE_K` bit during startup security
checks itself. Additionally, same is ensured in the `esp_efuse_write_key`
API as well. This always enforces the hardware k mode in the ECDSA
peripheral and ensures strongest possible security.
2023-11-20 16:03:29 +05:30
4c3beef656 feat(ci): add test for custom cmake CMAKE_EXECUTABLE_SUFFIX
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-11-20 11:03:28 +01:00
ecd485be87 Merge branch 'feat/ecdsa_perph_while_mutual_auth_v5.1' into 'release/v5.1'
Feat/ecdsa perph while mutual auth v5.1

See merge request espressif/esp-idf!27245
2023-11-20 18:03:19 +08:00
c6913fa397 fix(build): fix build failure if CMAKE_EXECUTABLE_SUFFIX is set
From: Arno Moonen <arno.moonen@airios.eu>

Follows original message from Arno Moonen <arno.moonen@airios.eu>

While integrating the ESP-IDF into our existing CMake structure,
I've come across quite some hurdles. Most I've been able to fix
in our CMake files, however this one I could not.

Most of the targets created by the esptool_py component assume
that the EXECUTABLE IDF build property (which contains the name
of the CMake executable target) always equals the name of the
created binary.

This is however not always true. For instance, in our setup we use
CMAKE_EXECUTABLE_SUFFIX_C and CMAKE_EXECUTABLE_SUFFIX_CXX in our
toolchain file (both set to .elf). If we do add_executable(my_app),
the target binary file would actually be my_app.elf.

In order to fix this, I've updated it to use the TARGET_FILE generated
expression. That way we also no longer need the EXECUTABLE_DIR IDF build
property here.

I've fixed this on v5.0.1 (as that's the ESP-IDF version I'm currently
trying to integrate), but I assume it should be easy to apply the same
fix to newer versions and the master branch as well.

Note that this problem might exist in multiple places where EXECUTABLE
is being used. While going through the ESP-IDF code base, I even noticed
that a few places actually already seem to use the TARGET_FILE expression.
To be honest the property name might be somewhat confusing as well, as it
is actually the executable target.

Closes https://github.com/espressif/esp-idf/pull/12558
2023-11-20 10:49:02 +01:00
92ebdd9e16 Merge branch 'ci/fix_add_build_unit_test_jobs' into 'release/v5.1'
ci: add build unit test apps jobs (v5.1)

See merge request espressif/esp-idf!27156
2023-11-20 17:43:51 +08:00
5719d882d1 Merge branch 'bugfix/fix_onebyte_watchpoint_setting_v5.1' into 'release/v5.1'
fix(riscv): supports 1 byte and larger than 64byte range watchpoint setting (v5.1)

See merge request espressif/esp-idf!27215
2023-11-20 17:37:03 +08:00
ea081e04b9 Merge branch 'bugfix/dpp_config_memset_v5.1' into 'release/v5.1'
Wi-Fi: Fixed some DPP issues (v5.1)

See merge request espressif/esp-idf!27192
2023-11-20 16:52:20 +08:00
2348a0a61d Merge branch 'bufix/Backport_some_lwip_bugs_for_5.1_1115' into 'release/v5.1'
Bufix/backport some lwip bugs for 5.1 1115

See merge request espressif/esp-idf!27149
2023-11-20 16:09:30 +08:00
ca4ba28613 fix(nimble): Fixed incorrect handling of bonded devices 2023-11-20 12:27:18 +05:30
a08c557001 Merge branch 'bugfix/validate_random_address_v5.1' into 'release/v5.1'
fix(nimble): Added check to validate allowed random address (v5.1)

See merge request espressif/esp-idf!26928
2023-11-20 14:48:33 +08:00
00936f9434 Merge branch 'feature/support_for_32_and_128_bit_custom_uuids_v5.1' into 'release/v5.1'
feat(bt/bluedroid): Add new APIs for 32 and 128-bit UUIDs (backport v5.1)

See merge request espressif/esp-idf!27230
2023-11-20 14:07:56 +08:00
b9a0ca6feb fix(bt/bluedroid): corrected the API documents of profile HFP and A2DP 2023-11-20 11:59:05 +08:00
e4ab4499b0 fix(bt/bluedroid): Added some argument check in APIs of HFP AG 2023-11-20 11:59:01 +08:00
fcd0b8b8e9 Merge branch 'fix/https_request_example_build_with_esp_wolfssl_v5.1' into 'release/v5.1'
fix(esp-tls): Fix the https_request example build for esp-wolfssl (v5.1)

See merge request espressif/esp-idf!26735
2023-11-20 11:07:36 +08:00
7e21aff12c fix(nimble): Added check to validate allowed random address 2023-11-20 08:19:38 +05:30
81a4a86196 Merge branch 'bugfix/ble_gap_connect_v5.1' into 'release/v5.1'
fix(nimble):Handled the Load access fault crash caused due to an invalid setting of index-variable 'reattempt_idx' (v5.1)

See merge request espressif/esp-idf!26944
2023-11-20 10:41:26 +08:00
c91c8a1197 fix(nimble): Handled crash caused due to incorrect use of reattempt_idx 2023-11-18 17:16:17 +05:30
57090788ec Merge branch 'feature/walkthrough_for_coc_ble_prph_v5.1' into 'release/v5.1'
doc (nimble): Added the tutorial for coc_bleprph example. (v5.1)

See merge request espressif/esp-idf!26480
2023-11-18 16:21:42 +08:00
54e3737202 Merge branch 'feature/protocomm_update_params_v5.1' into 'release/v5.1'
fix(protocomm): added Protocomm BLE Event Structure and Event Handling (v5.1)

See merge request espressif/esp-idf!26899
2023-11-18 16:16:48 +08:00
4023a22512 Merge branch 'bugfix/fix_some_ble_bugs_v5.1' into 'release/v5.1'
Fixed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!27196
2023-11-17 20:21:57 +08:00
7d6ef329d7 docs: Add documentation for using ECDSA peripheral with TLS 2023-11-17 16:25:58 +05:30
37836b3c62 feat: ECDSA peripheral while performing http connection with mutual auth 2023-11-17 16:24:10 +05:30
7f63951872 Merge branch 'backport/fix_ble_scan_rsp_v5.1' into 'release/v5.1'
Backport/fix ble scan rsp v5.1(backport v5.1)

See merge request espressif/esp-idf!27007
2023-11-17 18:18:29 +08:00
1b3713f7cd Merge branch 'feature/support_adc_calibration_on_h2_v5.1' into 'release/v5.1'
adc_cali: supported adc calibration v1 on ESP32H2 (v5.1)

See merge request espressif/esp-idf!26963
2023-11-17 16:41:00 +08:00
ddb6d22468 Merge branch 'feature/gpio_dump_io_info_v5.1' into 'release/v5.1'
feat(gpio): add a dump API to dump IO configurations (v5.1)

See merge request espressif/esp-idf!26870
2023-11-17 16:30:22 +08:00
ceb0aec0cc Merge branch 'bugfix/rmt_stop_issue_v5.1' into 'release/v5.1'
fix(rmt): a disabled channel may pick up a pending transaction (v5.1)

See merge request espressif/esp-idf!26779
2023-11-17 16:27:21 +08:00
a32f0cf11e Merge branch 'feature/mcpwm_trigger_driver_v5.1' into 'release/v5.1'
feature(MCPWM): Add MCPWM trigger driver (v5.1)

See merge request espressif/esp-idf!26787
2023-11-17 16:17:34 +08:00
71d08e38db feat(bt/bluedroid): Add new APIs for 32 and 128-bit UUIDs
1. Added new API functions that can add 32 and 128-bit UUID to the EIR data
when these UUIDs are set in SDP.
The old functions that only work with 16-bit UUIDs have been left
unchanged to avoid having to redo code that already utilizes them.

2. Fixed bug with zero handler return in btc_sdp.c
sdp_create_record.handle in tBTA_SDP struct wasn't saved before.
Because of it Bluetooth stack always returned zero handler to
application callback.

Closes https://github.com/espressif/esp-idf/issues/11529
2023-11-17 15:57:28 +08:00
03299962f6 fix(ledc): fix ledc driver 100% duty cycle configuration
Update ledc duty cycle value range in doxygen.
Fix duty configuration error at 100% duty cycle for ESP32.
Improve LEDC API doxygen.

Closes https://github.com/espressif/esp-idf/pull/11516
Closes https://github.com/espressif/esp-idf/issues/12593
Closes https://github.com/espressif/esp-idf/issues/12083
2023-11-17 12:38:32 +08:00
472718d2cd Merge branch 'bugfix/fix_ble_bond_error_after_reboot_v5.1' into 'release/v5.1'
fix(ble/bluedroid): fixed BLE bond error after reboot (backport v5.1)

See merge request espressif/esp-idf!27120
2023-11-17 10:43:08 +08:00
ac4ee1d2d6 fix(bt/bluedroid): Fix the crash of invalid access to released resources
It is caused by the delayed timer is alarmed after esp_spp_deinit.
2023-11-17 10:38:55 +08:00
95d24edd3e ci(adc): add a test that adc read zero after getting done signal 2023-11-17 02:16:21 +00:00
1179d9859f fix(adc): fix h2 adc oneshot read zero and add delay after getting done signal v5.1 2023-11-17 02:16:21 +00:00
6b14ca55d5 fix(riscv): supports 1 byte and larger than 64byte range watchpoint setting 2023-11-16 20:40:04 +08:00
eb45eec5db change(soc): rename SOC_CPU_WATCHPOINT_SIZE to SOC_CPU_WATCHPOINT_MAX_REGION_SIZE 2023-11-16 20:40:03 +08:00
ff3ca9300a riscv: remove outdated macros 2023-11-16 20:37:09 +08:00
b6b8b0bd1f riscv: fix trigger add from trap handlers 2023-11-16 20:37:08 +08:00
a5091276e4 riscv: fix & refactor triggers add/delete 2023-11-16 20:37:08 +08:00
6ae596c764 fix(esp_hw_support): fix lightsleep current leakage on usb-phy controlled pad 2023-11-16 20:03:30 +08:00
4db9dbb3e8 fix(console): switch USB PHY to OTG when OTG is used for console
On ESP32-S3 with the default efuse settings, USB PHY is connected to
the USB_SERIAL_JTAG peripheral. If USB OTG peripheral is used for the
console, we need to additionally switch the PHY to USB OTG, otherwise
we won't get any output.

Closes https://github.com/espressif/esp-idf/issues/12437
2023-11-16 19:05:26 +08:00
6edb9982fd Merge branch 'coredump-info-offset_v5.1' into 'release/v5.1'
Tools: coredump-info - fix non-default partition table offset issues (v5.1)

See merge request espressif/esp-idf!26802
2023-11-16 18:56:55 +08:00
36cb0b29b2 Merge branch 'bugfix/docker_safe_repo_v5.1' into 'release/v5.1'
fix(docker): set esp-idf repo as safe directory (v5.1)

See merge request espressif/esp-idf!26804
2023-11-16 18:55:32 +08:00
53aaf3462f Merge branch 'feature/add_qemu_to_tools-json_v5.1' into 'release/v5.1'
Add QEMU to tools.json (v5.1)

See merge request espressif/esp-idf!26407
2023-11-16 18:54:46 +08:00
27751a7693 Merge branch 'ci/fix_c6_adc_std_performance_ci_fail_v5.1' into 'release/v5.1'
ci(adc): increase adc performance test threshold on c6 (v5.1)

See merge request espressif/esp-idf!27148
2023-11-16 18:47:04 +08:00
b862072372 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(2758518)
- Fixed power state setting when entering modem sleep
2023-11-16 16:40:31 +08:00
981d3d2336 Update bt lib for ESP32-C3 and ESP32-S3(f817304)
- Support get the range of TX power level
- Support clear legacy adv using vendor hci
2023-11-16 16:40:18 +08:00
a6de577573 fix(ble/controller): Fix bugs in setting adv data and scan response data 2023-11-16 16:40:04 +08:00
565c2e9d92 update esp32 bt-lib (6458728)
- Modify mesh proxy solic uuid to 0x18590303
- Support get the range of TX power level
- Support clear legacy adv using vendor hci
2023-11-16 16:39:46 +08:00
aaf6f7433d feat(bt/bluedroid): support clear legacy advertising 2023-11-16 16:39:33 +08:00
0c3440a5bc fix(wifi): Disallow DPP and WPS concurrency 2023-11-16 12:35:19 +05:30
5d5dac7754 fix(wpa_supplicant): memzero wifi config before sending config event 2023-11-16 12:35:15 +05:30
4e73c23e98 ci(ulp_test): fix fake sleep of the maincore in ulp pytest cases 2023-11-16 11:49:40 +08:00
61bb3fb67f fix(esp_hw_support): clear all type ULP wakeup intr status at ulp wakeup source enable 2023-11-16 11:49:40 +08:00
46dae91a39 fix(esp_pm): fix psram access faild after pd_cpu wakeup 2023-11-16 03:20:27 +00:00
e6bc722b38 change(esp_pm): improve POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP description 2023-11-16 03:20:27 +00:00
11d32279a0 fix(esp_coex): Fix deprecated configuration options not rename to new one 2023-11-16 03:16:15 +00:00
f57826e239 fix(esp_coex): Fix dependency errors in coexist configuration 2023-11-16 03:16:15 +00:00
989e0371db Fix(lwip):bugfix for add config for tcp ooseq bufs 2023-11-15 20:35:25 +08:00
5f9f8ac068 fix(docs): correct the target specific macros for secure boot v2 guide
It appears that target specific or'ing is not supported through the
docs build. Actual text rendering on the docs site was still using
"default" field from the custom macro, rather than using target
specific.
2023-11-15 15:37:59 +05:30
fd478346fb fix(bt/bluedroid): Fix BLE remove bond list status 2023-11-15 07:18:04 +00:00
e01f4c4d24 fix(ble/bluedroid): fixed BLE bond error after reboot 2023-11-15 07:18:04 +00:00
5c61c89308 Merge branch 'fix/exception_was_unhandled_for_bt_spp_vfs_acceptor_v5.1' into 'release/v5.1'
fix(bt/bluedroid): fix LoadProhibited error in spp vfs acceptor example (backport v5.1)

See merge request espressif/esp-idf!26861
2023-11-15 14:45:04 +08:00
bfeae3857c feat(rmt): support calling rmt_receive in ISR callback 2023-11-15 05:57:45 +00:00
d260d43168 fix(rmt): a disabled channel may pick up a pending transaction
because in the trans_done interrupt, the driver didn't check the channel FSM
2023-11-15 05:57:45 +00:00
0ce2683d81 feature(MCPWM): Add MCPWM trigger driver and test
Each MCPWM operator has two Trigger (named T0 and T1), and they can be
routed to GPIO fault signal or timer sync event.Generator can be set up
to perform different action on Trigger event.
This commit add a trigger driver and a test for the driver.
2023-11-15 05:57:37 +00:00
dd9da56dfe ci(adc): increase adc performance test threshold on c6 v5.1 2023-11-15 05:53:31 +00:00
6b1a846678 ci: add build unit test apps jobs 2023-11-15 13:43:16 +08:00
b7db75e845 Merge branch 'fix/wifi_prov_mgr_retry_auth_expire_v5.1' into 'release/v5.1'
fix (wifi_prov): Retry provisioning on `WIFI_AUTH_EXPIRE` event (v5.1)

See merge request espressif/esp-idf!26901
2023-11-15 12:32:35 +08:00
230119a9fb Merge branch 'ci/fix_assign_test' into 'release/v5.1'
ci: fix assign test jobs (v5.1)

See merge request espressif/esp-idf!27118
2023-11-15 11:40:25 +08:00
6b4c560d7d Fix(tcp):optimize tcp connection 2023-11-15 11:39:28 +08:00
cc7c93cfaa Merge branch 'fix/netif_sntp_examples_v5.1' into 'release/v5.1'
fix(examples): Fix usage of SNTP netif API in examples (v5.1)

See merge request espressif/esp-idf!26917
2023-11-14 21:57:12 +08:00
c43b66cd35 fix(soc): update SOC_IROM_MASK_HIGH for esp32, c6, h2 for consistency 2023-11-14 14:27:24 +01:00
6fa2080706 fix(soc): correct SOC_IROM_MASK_HIGH for esp32s3
Fixes corrupted backtraces on S3 when a function is in ROM.

Closes https://github.com/espressif/esp-idf/issues/11512
2023-11-14 14:27:23 +01:00
684a0936df Merge branch 'contrib/github_pr_12052_v5.1' into 'release/v5.1'
Two small patches for build system and fatfs (GitHub PR) (v5.1)

See merge request espressif/esp-idf!26431
2023-11-14 17:16:43 +08:00
3d296723f3 Merge branch 'bugfix/fix_freertos_system_task_names_v5.1' into 'release/v5.1'
fix(freertos): Updated IDLE task names for each core to have the coreID as a suffix (v5.1)

See merge request espressif/esp-idf!26118
2023-11-14 16:35:25 +08:00
0f61bd25a2 Merge branch 'bugfix/iperf_improvements_v5.1' into 'release/v5.1'
fix(examples/iperf): Update and rename default TCP/UDP buffer sizes (Backport v5.1)

See merge request espressif/esp-idf!26680
2023-11-14 15:38:23 +08:00
55f5b427ee Merge branch 'bugfix/build_error_when_enable_ag_and_hf_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix build error when both of the HFP roles are enabled (v5.1)

See merge request espressif/esp-idf!27077
2023-11-14 15:36:42 +08:00
87f58d5cd6 Merge branch 'bugfix/move_fe_32m_to_adc_fe_common_clock_v5.1' into 'release/v5.1'
fix(esp_hw_support): move fe_32m to fe/adc common clock (backport v5.1)

See merge request espressif/esp-idf!27058
2023-11-14 15:36:04 +08:00
c46775031e Merge branch 'bugfix/backport_some_ble_bugs_20231020_v5.1' into 'release/v5.1'
Fixed some BLE bugs 20231020 (backport v5.1)

See merge request espressif/esp-idf!26604
2023-11-14 15:35:55 +08:00
5a128c169c Merge branch 'doc/update_espnow_example_v5.1' into 'release/v5.1'
doc(WiFi/Vendor): Update the ESPNOW example for the recv callback function (backport v5.1)

See merge request espressif/esp-idf!26685
2023-11-14 15:35:37 +08:00
9c5b538f05 Merge branch 'bugfix/remove_iram_attr_from_ceva_files_v5.1' into 'release/v5.1'
fix(nimble): remove IRAM_ATTR from npl_os_freertos.c file (v5.1)

See merge request espressif/esp-idf!26839
2023-11-14 15:34:26 +08:00
d1842fa99b Merge branch 'bugfix/ota_fail_on_octal_flash_v5.1' into 'release/v5.1'
fix(ota): Fixed OTA fail on octal flash with 32MB memory (backport v5.1)

See merge request espressif/esp-idf!26811
2023-11-14 15:34:06 +08:00
c21d2b254b Merge branch 'bugfix/increase_esp32h2_slow_clock_calibration_wdt_threshold_v5.1' into 'release/v5.1'
fix(esp_system): increase esp32h2 slow clock calibration timeout watchdog threshold (backport v5.1)

See merge request espressif/esp-idf!26920
2023-11-14 15:33:43 +08:00
cee24a6ce1 Merge branch 'bringup/support_callback_mechanism_in_lightsleep_flow_v5.1' into 'release/v5.1'
feat(pm): support callback mechanism in lightsleep flow(backport v5.1)

See merge request espressif/esp-idf!26365
2023-11-14 15:33:19 +08:00
0172c33818 Merge branch 'bugfix/fix_deinit_init_wifi_scan_fail_issue_v5.1' into 'release/v5.1'
Bugfix/fix deinit init wifi scan fail issue v5.1(Backport v5.1)

See merge request espressif/esp-idf!27064
2023-11-14 15:25:54 +08:00
8f4c9bdc03 Merge branch 'backport/fix_ble_bugs_v5.1' into 'release/v5.1'
Backport/fix ble bugs v5.1(backport v5.1)

See merge request espressif/esp-idf!26762
2023-11-14 15:15:40 +08:00
93a6cb9ddf Merge branch 'bugfix/spi_master_fifo_use_dma_v5.1' into 'release/v5.1'
fix(spi): fixed undesired touching to DMA (v5.1)

See merge request espressif/esp-idf!26769
2023-11-14 15:13:35 +08:00
894cf042f9 Merge branch 'fix/remove_esp_hf_ag_devices_status_indchage_in_example_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Send device status of AG to HF with a different api (backport v5.1)

See merge request espressif/esp-idf!26587
2023-11-14 15:10:50 +08:00
378bb1f0d1 Merge branch 'bugfix/unable_to_load_bonded_ble_devices_from_nvs_v5.1' into 'release/v5.1'
fix(bt&ble): fix BLE unable to load bonded device info after reboot. (backport v5.1)

See merge request espressif/esp-idf!26465
2023-11-14 15:10:38 +08:00
822aa69a4b Merge branch 'feature/support_esp32c2_rom_mbedtls_v5.1' into 'release/v5.1'
feat(mbedtls): support c2 mbedtls can use crypto algorithm in ROM (backport v5.1)

See merge request espressif/esp-idf!26698
2023-11-14 15:10:20 +08:00
84cd6e8691 Merge branch 'bugfix/napt_updatesV5.1' into 'release/v5.1'
feat(lwip): Fixes and Improvements for NAPT and SBOM Support (v5.1)

See merge request espressif/esp-idf!26334
2023-11-14 15:09:57 +08:00
1ed40720d6 Merge branch 'bugfix/lp_active_slow_clock_domain_default_power_down_v5.1' into 'release/v5.1'
backport v5.1: In the LP ACTIVE state, the slow clock power domain is by default in a powered-off state

See merge request espressif/esp-idf!26601
2023-11-14 15:09:02 +08:00
0f15eecd2c Merge branch 'feature/include_hf_and_ag_in_single_build_v5.1' into 'release/v5.1'
Feature/include hf and ag in single build v5.1

See merge request espressif/esp-idf!26841
2023-11-14 15:05:52 +08:00
09310415d4 ci: fix assign test jobs 2023-11-14 14:05:44 +08:00
305e781d0c Merge branch 'fix/ci_autocomplete_v5.1' into 'release/v5.1'
Tools, CI: Improve autocomplete tests (v5.1)

See merge request espressif/esp-idf!27037
2023-11-14 02:44:10 +08:00
e100ffa6c1 Merge branch 'coredump-gdb-timeout_v5.1' into 'release/v5.1'
fix(coredump-info): set default gdb timeout as 3 seconds (v5.1)

See merge request espressif/esp-idf!27105
2023-11-14 01:15:06 +08:00
14241aeb2e fix(coredump-info): set default gdb timeout as 3 seconds 2023-11-13 15:34:52 +01:00
3515fb4eaa Merge branch 'feat/dynamic_integration_pipeline_v5.1' into 'release/v5.1'
CI: dynamic integration pipeline v5.1

See merge request espressif/esp-idf!26654
2023-11-13 19:41:31 +08:00
efafacae40 Merge branch 'feature/mcpwm_timer_change_freq_v5.1' into 'release/v5.1'
feat(mcpwm): support update timer period dynamically (v5.1)

See merge request espressif/esp-idf!26624
2023-11-13 17:55:52 +08:00
d0f84285b7 Merge branch 'bugfix/fix_wrong_adc_attenuation_name_v5.1' into 'release/v5.1'
fix(adc): rename ADC_ATTEN_DB_11 to ADC_ATTEN_DB_12 (v5.1)

See merge request espressif/esp-idf!26967
2023-11-13 16:50:11 +08:00
37fd9f4050 Merge branch 'bugfix/fix_adc_oneshot_do_not_spilt_clk' into 'release/v5.1'
fix(adc): fix ADC oneshot mod don't divide clk (v5.1)

See merge request espressif/esp-idf!26675
2023-11-13 15:18:18 +08:00
0da35bffbc fix(newlib,ci): wrong floating point number handling in tests 2023-11-13 13:51:53 +08:00
df46426321 docs(adc): added adc calibration doc on h2 2023-11-13 03:04:03 +00:00
c5e107c53d feat(adc_cali): Add ADC calibration support for ESP32H2 2023-11-13 03:04:03 +00:00
afd53b0b16 Merge branch 'feature/esp32h2_adds_adc_calib_efuses_v5.1' into 'release/v5.1'
feat(efuse): Adds efuse ADC calibration data for ESP32H2 (v5.1)

See merge request espressif/esp-idf!26977
2023-11-13 11:03:18 +08:00
8f24e2731f fix(bt/bluedroid): Fix build error when both of the HFP roles are enabled and also CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY is set to true 2023-11-10 21:08:08 +08:00
73e5a4cf44 Merge branch 'update/version_5_1_2' into 'release/v5.1'
Update version to 5.1.2

See merge request espressif/esp-idf!27044
2023-11-10 20:17:02 +08:00
51b03d3812 fix(esp_hw_support): move fe_32m to fe/adc common clock 2023-11-10 15:39:08 +08:00
abfd0cbebc change(hal): remove useless code from periph_ll_wifi_bt_module_enable_clk 2023-11-10 11:15:49 +08:00
666ba33829 fix(wifi): fix deinit init wifi scan fail issue 2023-11-10 11:15:38 +08:00
482a8fb2d7 change(version): Update version to 5.1.2 2023-11-10 07:51:59 +05:30
d3b403ff90 ci(fix): Improve the stability of the autocomplete tests 2023-11-09 14:09:47 +01:00
9f2a2dbda6 Merge branch 'bugfix/ble_update_lib_1027_5.1' into 'release/v5.1'
ble: update c6 h2 lib to 5bd7cb83, c2 lib to 1d31e175

See merge request espressif/esp-idf!26711
2023-11-09 16:37:36 +08:00
5b3a8ac503 Merge branch 'bugfix/hal_memcpy_v5.1' into 'release/v5.1'
fix(hal): Fix incorrect behavior of hal_memcpy (v5.1)

See merge request espressif/esp-idf!26910
2023-11-09 14:47:18 +08:00
97aa5781f9 Merge branch 'bugfix/allow_sleep_reject_for_lightsleep' into 'release/v5.1'
bugfix(esp_hw_support): allow reject for lightsleep (backport v5.1)

See merge request espressif/esp-idf!26971
2023-11-09 14:04:07 +08:00
e8dc62913b fix(bt/bluedroid): Fix ble keysize check 2023-11-08 19:46:23 +08:00
253d19bfde fix(bt/bluedroid): Fix ble adv report evt type 2023-11-08 19:46:19 +08:00
287255026e change(ble): update c2 lib to 6ed444f2
update c6 and h2 lib to 77d09ce0
2023-11-08 18:09:39 +08:00
00f51f74e3 ble: update c2 rom.ld 2023-11-08 18:03:48 +08:00
8353ea3a09 change(ble): added option for msys buffer source 2023-11-08 18:03:48 +08:00
88af68f3c1 ble: update c6 h2 lib to 5bd7cb83, c2 lib to 1d31e175 2023-11-08 18:03:48 +08:00
d9b776c59a feat(efuse): Adds efuse ADC calibration data for ESP32H2 2023-11-07 15:41:59 +08:00
6de9757a4b fix(adc): rename ADC_ATTEN_DB_11 to ADC_ATTEN_DB_12
By design, it's 12 dB. There're errors among chips, so the actual
attenuation will be 11dB more or less
2023-11-07 14:09:21 +08:00
263a27b26b bugfix(esp_hw_support): allow reject for lightsleep 2023-11-07 11:10:14 +08:00
bb7544e65a fix(ota): Fixed OTA fail on octal flash with 32MB memory,
Closes https://github.com/espressif/esp-idf/issues/11903
2023-11-06 10:49:06 +08:00
acd503c067 ci: add label rules for integration test
fix typo
2023-11-03 20:48:52 +08:00
d4af3af853 ci: remove unused integration test rules 2023-11-03 20:48:33 +08:00
655ff32ae9 ci: add qa-test-tag rules 2023-11-03 20:48:33 +08:00
537bea27f5 ci: dynamic integration test child pipeline 2023-11-03 20:48:33 +08:00
b31a07bc67 fix(esp_system): increase esp32h2 slow clock calibration timeout watchdog threshold 2023-11-03 19:03:48 +08:00
cda65b73f4 fix(examples): Fix usage of SNTP netif API in examples 2023-11-03 11:23:17 +01:00
4892c481b5 feat(gpio): add a dump API to dump IO configurations
Merges https://github.com/espressif/esp-idf/pull/12511
2023-11-03 16:21:31 +08:00
7e2e82a4a0 fix(hal): Fix incorrect behavior of hal_memcpy
Closes https://github.com/espressif/esp-idf/issues/12489
2023-11-03 15:49:35 +08:00
6dce3d79d6 fix (wifi_prov): Retry provisioning on WIFI_AUTH_EXPIRE event
- Closes https://github.com/espressif/esp-idf/issues/11749
2023-11-03 11:50:13 +05:30
b9528ba4c9 fix(protocomm): added Protocomm BLE Event Structure and Event Handling 2023-11-03 11:42:40 +05:30
zwx
9f8655cdef feat(openthread): Add deep sleep support for SED 2023-11-03 11:02:56 +08:00
zwx
a1ceb251a0 feat(openthread): add config for radio statistic feature 2023-11-03 11:02:56 +08:00
b27b124898 docs(pm): add ext1 wakeup per pin description 2023-11-03 11:02:56 +08:00
9b3e40c9d1 feat(pm/deepsleep): Support EXT1_WAKEUP_MODE_PER_PIN 2023-11-03 11:02:56 +08:00
b6fa48e3b9 Merge branch 'bugfix/fixed_ble_disconnect_under_temp_change_v5.1' into 'release/v5.1'
fix(ble): fixed ble disconnection issue under temperature change

See merge request espressif/esp-idf!26828
2023-11-03 07:21:35 +08:00
9ff25a94d9 doc (nimble): Added the tutorial for bleprph example. 2023-11-02 17:57:22 +05:30
7ac37cccef doc (nimble): Added the tutorial for coc_bleprph example. 2023-11-02 17:53:33 +05:30
42ec7a5e37 change(pm): Change sleep callback implement 2023-11-02 11:05:38 +00:00
925da11115 feat(PowerManagement/lightsleep): Support ESP_SLEEP_EVENT_CALLBACKS 2023-11-02 11:05:38 +00:00
15f66392d3 feat(PowerManagement/lightsleep): Support PM_LIGHT_SLEEP_CALLBACKS 2023-11-02 11:05:38 +00:00
dce3b64411 feat(PowerManagement/lightsleep): Define and export a strong symbol of rv_core_critical_regs_restore 2023-11-02 11:05:38 +00:00
e20f68d773 Merge branch 'backport/bugfix/fix_c6_wrong_reg_offset' into 'release/v5.1'
fix(coex): fix esp32c6 wrong reg offset(backport v5.1)

See merge request espressif/esp-idf!26764
2023-11-02 14:19:53 +08:00
8df1e1ae66 Merge branch 'bugfix/install_key_issue_v5.1' into 'release/v5.1'
WiFI: Fix key install issue in PTK renew (v5.1)

See merge request espressif/esp-idf!26851
2023-11-02 14:18:42 +08:00
358c53e6c2 Merge branch 'bugfix/supplicant_tls_fix_v5.1' into 'release/v5.1'
fix(wpa_supplicant): Correct iv lenght passed in mbedtls_cipher_set_iv() (v5.1)

See merge request espressif/esp-idf!26846
2023-11-02 14:04:38 +08:00
70aedc85a4 fix(bt/bluedroid): fix loadprohibited error in spp vfs acceptor example 2023-11-02 11:47:28 +08:00
zwl
f58e8b3eb4 fix(ble): fixed ble disconnection issue under temperature change 2023-11-02 08:55:33 +08:00
2a96eb9f8f Merge branch 'bugfix/fix_wifi_enabled_macro_v5.1' into 'release/v5.1'
Bugfix/fix wifi enabled macro( v5.1)

See merge request espressif/esp-idf!26774
2023-11-02 08:46:58 +08:00
ed9d5e7db8 fix(wifi): Fix key install issue in PTK renew 2023-11-01 19:49:06 +05:30
095eae5fa3 fix(wpa_supplicant): Correct iv lenght passed in mbedtls_cipher_set_iv() 2023-11-01 18:02:29 +05:30
0e80568bfa Merge branch 'docs/update_nan_docs_v5.1' into 'release/v5.1'
Fix inconsistency in NAN documentation (Backport v5.1)

See merge request espressif/esp-idf!26818
2023-11-01 20:30:50 +08:00
9c44a4e1ec fix(nimble): remove IRAM_ATTR from npl_os_freertos.c file 2023-11-01 17:36:54 +05:30
716a47074a feat(bt/bluedroid): Support to build HID Host and HID Device in single binary 2023-11-01 19:32:13 +08:00
8d9035c202 feat(bt/bluedroid): Support to build HFP Audio Gateway and Hands Free Unit in single binary 2023-11-01 19:31:18 +08:00
8dd9310925 Merge branch 'bugfix/fix_compilation_issue_v5.1' into 'release/v5.1'
fix(wpa_supplicant): Fix compilation issue in EAP disabled (v5.1)

See merge request espressif/esp-idf!26727
2023-11-01 15:40:55 +08:00
8bea4c4f1d docs(esp_wifi): Fix inconsistency in NAN documentation 2023-11-01 12:53:58 +05:30
6f256958d1 fix(tools/docker): set esp-idf repo as safe directory
In our docker docs[1] we recommend to start docker as a non-root user. This has
a side effect, because the esp-idf repo in docker image is owned by
root. Git by default refuses even to parse a config file if the repo is
owned by other than current user. As a result the version detection in
cmake fails[2] and the app version is set to "HEAD-HASH-NOTFOUND".
This adds esp-idf repo to the system git config as a safe one.

[1] https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/
    tools/idf-docker-image.html#building-a-project-with-cmake
[2] https://github.com/espressif/esp-idf/issues/12389#issuecomment-1764268773

Closes https://github.com/espressif/esp-idf/issues/12389

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-10-31 16:24:10 +01:00
5fe418e733 fix(tools/coredump-info): pass non-default partition table offset to esp-coredump
Closes https://github.com/espressif/esp-idf/issues/11564
2023-10-31 15:57:47 +01:00
6c5b3c5d4c fix(wifi): wpa3 softap fix deauth when assoc req recv before sae is finished 2023-10-31 15:47:07 +05:30
7e1b2a2442 fix(phy): Fix ESP32C6 rx pkts fail in light sleep mode 2023-10-31 15:56:54 +08:00
85fbfae5d2 fix(wifi): Fix bug using CONFIG_WIFI_ENABLED macro 2023-10-31 15:56:21 +08:00
653008f4c7 fix(spi): fixed undesired touching to DMA
Closes https://github.com/espressif/esp-idf/issues/12241
2023-10-31 15:52:26 +08:00
b1ba1dbcb1 fix(coex): fix esp32c6 wrong reg offset 2023-10-31 15:28:38 +08:00
b6a66b7d8c Merge branch 'ci/tune_build_jobs_parallel_count' into 'release/v5.1'
ci: tune build jobs parallel count

See merge request espressif/esp-idf!26612
2023-10-31 14:57:35 +08:00
4aa8a733ad feat(bt/bluedroid): Display BLE permission check handle in error trace 2023-10-31 14:38:42 +08:00
c7e82194a4 fix(bt/bluedroid): Fix max BLE gattc notify number to improve compatibility 2023-10-31 14:38:42 +08:00
568919e1c3 feat(bt/bluedroid): Support BLE gattc notify registration number 2023-10-31 14:38:42 +08:00
bb587cd763 fix(bt/bluedroid): Fix key size check in BLE smp 2023-10-31 14:38:42 +08:00
b35c41aee0 fix(bt/bluedroid): Optimize compatibility with Android 10 and later devices 2023-10-31 14:38:42 +08:00
6a94399233 feat(bt/bluedroid): Support hid device control point 2023-10-31 14:38:42 +08:00
35afc37f1a fix(bt/bluedroid): Optimize compatibility with IOS and MACOS devices 2023-10-31 14:38:42 +08:00
179bfaca4d Merge branch 'bugfix/disable_fastpbkdf2_hardwaredisable_v5.1' into 'release/v5.1'
fix(wpa_supplicant): implement sha1_finish for fastpbkdf2

See merge request espressif/esp-idf!26683
2023-10-31 14:32:28 +08:00
2276b07b39 fix(esp-tls): Fix the https_request example build for esp-wolfssl 2023-10-29 19:18:05 +05:30
d9b36afbe6 fix(wpa_supplicant): Fix compilation issue in EAP disabled 2023-10-27 18:08:16 +05:30
f5fec8a720 Merge branch 'bugfix/esp32c6_phy_coex_sleep_issue_v5.1' into 'release/v5.1'
fix(esp_phy): update esp32c6 libphy for coex zb rx and sleep bug (backport v5.1)

See merge request espressif/esp-idf!26668
2023-10-27 20:00:59 +08:00
162e04a641 Merge branch 'backport/support_qa_test_ot_host_config' into 'release/v5.1'
fix(openthread): fix host interface mdoe none(Backport v5.1)

See merge request espressif/esp-idf!26596
2023-10-27 20:00:44 +08:00
76bd3ab832 docs: Update COPYRIGHT.rst since mbedtls supported in C2 ROM 2023-10-26 20:28:03 +08:00
e3a6001284 docs: add the description of CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL 2023-10-26 20:26:19 +08:00
336bb85806 feat(mbedtls): add new option CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL for mbedtls pytest 2023-10-26 20:26:08 +08:00
92b9474a71 feat(mbedtls): support C2 mbedtls can use crypto algorithm in ROM 2023-10-26 20:25:53 +08:00
99e7db4ce5 fix(wpa_supplicant): implement sha1_finish for fastpbkdf2 2023-10-26 13:30:01 +05:30
3a436b0eb2 doc(WiFi/Vendor): Update the ESPNOW example for the recv callback function 2023-10-26 14:14:00 +08:00
d64a29c3b4 fix(examples/iperf): Update and rename default TCP/UDP buffer sizes 2023-10-26 10:35:57 +05:30
b9cdadc5c6 fix(adc): fix adc oneshot mod do not split clk 2023-10-26 11:17:12 +08:00
d6314b44cc fix(esp_phy): update esp32c6 libphy for coex zb rx and sleep bug 2023-10-25 16:18:35 +08:00
9d97513147 change(Power Management): the xpd_xtal32k value depends on system slow clock source config option when pmu initialize 2023-10-24 17:15:10 +08:00
9b4a42e728 feat(mcpwm): support update timer period dynamically
Implement the requirement asked in
https://www.esp32.com/viewtopic.php?f=13&t=35919
2023-10-24 10:11:47 +08:00
1d1939a1e4 Update BLE lib on ESP32-C3 and ESP32-S3
- modify mesh proxy solic uuid to 0x18590303
- Fixed DTM payload length cannot be 0
- Added config to enable Hw recorrect eco
- report the number of packets sent on the TX end
2023-10-20 16:49:15 +08:00
5677692187 feat: add config to disable ble hci uart flow control 2023-10-20 16:48:33 +08:00
51ebdfcbfa change: enable pll track by default on ESP32 2023-10-20 16:47:18 +08:00
95e3dbcffe Add mesh adv type for exception list 2023-10-20 16:43:25 +08:00
74a64755eb Update bt lib for ESP32-C3 and ESP32-S3(c8aa206)
- Fixed extended adv address setting after adv restart
- Fixed scan channel index setting for extended scan
- Add API to set aux channel index for extended adv
2023-10-20 16:24:38 +08:00
0a57fb4183 Update bt lib for ESP32-C3 and ESP32-S3(29996e0)
- Fixed address resolution for directed adv with RPA when scanning
- Fixed resolvable private address renew after timeout
2023-10-20 16:24:09 +08:00
567bf57805 Add new mesh types for exception list on ESP32-C3 and ESP32-S3 2023-10-20 16:23:15 +08:00
15f8e677a2 Fixed bluedroid host build warning when log is disabled 2023-10-20 16:18:00 +08:00
f54e3ebea4 fix(bt/bluedroid): update the newest active device in bluetooth
1: update the newest active device when an ACL link is established and
   the remote device info is not in bond list. This updates will not stored
   into NVRAM until a new device is paired.
2023-10-20 14:44:54 +08:00
zwx
ad75dc5aea fix(openthread): fix host interface mdoe none 2023-10-20 14:09:29 +08:00
4675e34f7e fix(espcoredump): fixed compilation warning
Added conditional compilation for logging stack usage only when CONFIG_ESP_COREDUMP_LOGS is
enabled.

Closes: https://github.com/espressif/esp-idf/issues/12318
2023-10-20 11:23:33 +05:30
ae04d7b61d fix(bt/bluedroid): Send device status of AG to HF with a different api
1: replace api esp_hf_ag_devices_status_indchange with esp_hf_ag_ciev_report in bluetooth
   hfp_ag example to send device status of AG to HF unit.
2: remove the unused codes
2023-10-20 10:03:24 +08:00
8c6114d0d2 Merge branch 'feature/free_bt_memory_v5.1' into release/v5.1
feat(bt): Frees BLE memory when no longer in use

See merge request espressif/esp-idf!26570
2023-10-20 08:41:19 +08:00
89e7a95f6c Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20230921_v5.1' into 'release/v5.1'
Feature/update openocd to v0.12.0 esp32 20230921 (v5.1)

See merge request espressif/esp-idf!26547
2023-10-20 08:16:36 +08:00
be63dddab4 Merge branch 'bugfix/fix_max_cccds_compilation_issue_v5.1' into 'release/v5.1'
fix(nimble): Fix compilation warnings when max bonds or cccd is set to 0 (v5.1)

See merge request espressif/esp-idf!26415
2023-10-20 08:15:48 +08:00
9e2a1b3109 Merge branch 'bugfix/deepfree' into 'release/v5.1'
fix(ble_mesh): fix compilation failure on using scene model.

See merge request espressif/esp-idf!26356
2023-10-20 08:15:20 +08:00
ae3c28fcc4 Merge branch 'bugfix/update_ble_lib_1018_5_1' into 'release/v5.1'
change(ble): update ble lib on c6 h2 and c2 chip

See merge request espressif/esp-idf!26543
2023-10-20 08:13:01 +08:00
90f9e7a193 Merge branch 'backport/phy_pll_track_corner' into 'release/v5.1'
fix(esp_phy): fix pll track corner case(Backport v5.1)

See merge request espressif/esp-idf!26548
2023-10-19 21:33:40 +08:00
fdacde73e9 Merge branch 'bugfix/deep_sleep_force_to_sleep_v5.1' into 'release/v5.1'
fix(esp_hw_support): Return deep sleep APIs to the original behavior (v5.1)

See merge request espressif/esp-idf!26554
2023-10-19 17:48:43 +08:00
066724f75e ci: tune build jobs parallel count 2023-10-19 11:24:23 +02:00
ea06b047c2 feat(bt): Frees BLE memory when no longer in use
It will free libble.a & libbt all txt, data and bss segment memory.
          This memory is combined into one large memory and put into the heap
          pool.
2023-10-19 14:52:29 +08:00
eccf07022e fix(ble): fixed ble connection timeout issue on ESP32H2 2023-10-19 14:29:52 +08:00
55d3bc2d37 Merge branch 'bugfix/wps_condition_chain_v5.1' into 'release/v5.1'
fix(wifi): Fix static analyzer warning for WPS code (v5.1)

See merge request espressif/esp-idf!26494
2023-10-19 13:51:57 +08:00
zwx
99d68570a6 fix(esp_phy): fix pll track corner case 2023-10-19 10:57:38 +08:00
5457c4c0b8 fix(wifi): Fix static analyzer warning for WPS code 2023-10-18 17:54:40 +05:30
315d4864bb fix(esp_hw_support): Return deep sleep APIs to the original behavior
Closes https://github.com/espressif/esp-idf/issues/12359
2023-10-18 18:18:49 +08:00
bacd3f40bb ble: update controller log module for ESP32-C6, ESP32-H2 and ESP32-C2 2023-10-18 18:11:34 +08:00
zwl
f3447f256f fix(ble): fixed ble connection timeout issue on ESP32H2 2023-10-18 17:10:28 +08:00
20533dccce ble: update controller log module for ESP32-C2 2023-10-18 17:10:28 +08:00
85bc272490 ble: update controller log module for ESP32-H2 and ESP32-C6 2023-10-18 17:10:28 +08:00
1d693ee133 change(ble): update ble lib on c6 h2 and c2 chip 2023-10-18 17:10:19 +08:00
ee6ea577e2 Merge branch 'feature/mbedtls_3_5_0_update_v5.1' into 'release/v5.1'
feat(mbedtls): update to 3.5.0 release (v5.1)

See merge request espressif/esp-idf!26475
2023-10-18 17:06:00 +08:00
4fef94cde2 Merge branch 'bugfix/spurious_beacon_timeout_v51' into 'release/v5.1'
Fixes some WiFi issues(v5.1)

See merge request espressif/esp-idf!26529
2023-10-18 17:03:43 +08:00
1ddbc13499 fix(pytest_gcov): properly extract file path from the gcov output 2023-10-18 10:57:05 +02:00
476ae752eb feat(tools): Update OpenOCD version to v0.12.0-esp32-20230921 2023-10-18 10:57:05 +02:00
b07702b6ad feat(panic): send pseudo exccause to openocd 2023-10-18 10:31:42 +02:00
bc87e14695 Merge branch 'fix/xtensa-register-corrupted-after-context-switch' into 'release/v5.1'
fix(xtensa): fix registers curruption on context switch

See merge request espressif/esp-idf!26210
2023-10-18 15:25:03 +08:00
6cc6ece701 Merge branch 'backport/openthread_uart_api_refactor' into 'release/v5.1'
feat(openthread): Host connection logic refactor(Backport V5.1)

See merge request espressif/esp-idf!26486
2023-10-18 14:44:11 +08:00
cf16ab59be Merge branch 'bugfix/dpp_bugs_5.1' into 'release/v5.1'
fix(wpa_supplicant): Fix few dpp bugs(v5.1)

See merge request espressif/esp-idf!26464
2023-10-18 14:37:11 +08:00
bdf54031b6 Merge branch 'revert_tcpip_task_priority_macro_v5.1' into 'release/v5.1'
revert(lwip): Revert changes to LWIP task priority macro from MR 25020 (backport v5.1)

See merge request espressif/esp-idf!26512
2023-10-18 14:31:40 +08:00
1aabb5f0d5 Merge branch 'bugfix/revert_pvt_v5.1' into 'release/v5.1'
Revert "feat(volt): chip auto adjust volt for esp32c6 & esp32h2" (v5.1)

See merge request espressif/esp-idf!26485
2023-10-18 10:44:14 +08:00
fb2076c2e9 Merge branch 'bugfix/use_bt_sdp_bqb_include_macro_for_ertm_mode_flag_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Add correct macro for ertm mode included flag (backport v5.1)

See merge request espressif/esp-idf!26455
2023-10-18 10:42:00 +08:00
5abd1ae847 fix(esp_wifi): Fixes issues in beacon_timeout, PMKSA and AID assignment
- Fixes issue wheere beacon timeout would get triggerred multiple times
  leading to a m f probe req.

- Fix missing PMKSA flush scenarios.

- Fix wrong AID assigned to station when multiple stations try to connect
  simultaneously with mixed order of auth-request and assoc-request frames.
2023-10-17 17:24:56 +05:30
e450ee2bcc Merge branch 'fix_esp32s3_irq_names_v5.1' into 'release/v5.1'
fix(interrupts): reorder esp32s3 irq names to align with the respective irq numbers (v5.1)

See merge request espressif/esp-idf!26503
2023-10-17 18:08:31 +08:00
5d4249ec99 Merge branch 'feat/add_support_to_add_auth_data_v5.1' into 'release/v5.1'
fix(esp_http_client): Call event_handler after header value is received (v5.1)

See merge request espressif/esp-idf!26321
2023-10-17 18:08:12 +08:00
7f879a6c48 Merge branch 'bugfix/security_check_order_in_startup_v5.1' into 'release/v5.1'
fix(startup): flip the security configuration check order (v5.1)

See merge request espressif/esp-idf!26361
2023-10-17 18:07:35 +08:00
f3fc7dd924 Merge branch 'bugfix/uart_vfs_select_threadsafe_v5.1' into 'release/v5.1'
fix(vfs/uart): Add support for multi-task call to uart select (v5.1)

See merge request espressif/esp-idf!26317
2023-10-17 18:04:02 +08:00
82d2cdcf5a fix(mbedtls): remove deprecated MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
This config has been removed in the upstream mbedTLS starting 3.0
release. Please see mbedTLS changelog for more details.
2023-10-17 10:03:39 +00:00
bf59005fe1 fix(mbedtls): dynamic buffer feature issue with mbedtls 3.5.0
Set max TLS version in the SSL context during setup phase. Dynamic
buffer feature overrides the `mbedtls_ssl_setup` API and hence
this change is required per upstream 3.5.0 codebase change.
2023-10-17 10:03:39 +00:00
e813bbc680 feat(mbedtls): update to 3.5.0 release
Changelog:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.5.0
2023-10-17 10:03:39 +00:00
bf1c39bc03 Merge branch 'protocomm/decouple_wifi_prov_v5_1' into 'release/v5.1'
fix(protocomm): Remove the configuration check of wifi_provisioning for protocomm component(v5.1)

See merge request espressif/esp-idf!26354
2023-10-17 18:03:10 +08:00
63eef40b39 Merge branch 'backport/update_openthread_upstream' into 'release/v5.1'
feat(openthread): update openthread upstream(backportv5.1)

See merge request espressif/esp-idf!26377
2023-10-17 18:02:25 +08:00
143079bfd7 fix(wpa_supplicant/dpp): Ensure dpp follows init->bootstrap->listen path
- esp_supp_dpp_init : Ensures that the mode is set to station before
  the API call.
- Ensures that dpp follows the path of init(esp_supp_dpp_init) ->
  bootstrap(esp_supp_dpp_bootstrap_gen) -> listen(esp_supp_dpp_start_listen)
  by returning errors if any of them is invoked out of order.
2023-10-17 14:27:14 +05:30
cc3b0d9f49 fix(wpa_supplicant): Fix few dpp bugs
1) Fix crash in dpp Listen without bootstrap
  2) Fix crash on receiving dpp auth_req from hostapd with dpp akm
2023-10-17 14:27:14 +05:30
6b492690d3 Merge branch 'ble_dev/added_modem_reset_on_ble_v5_1' into 'release/v5.1'
feat(ble): added modem reset on c2 h2 and c6

See merge request espressif/esp-idf!26449
2023-10-17 15:43:35 +08:00
3f470624de fix(xtensa): fix registers curruption on context switch
a6, a7 registers may be corrupted on multicore ESP chips while FreeRTOS
Kernel SMP context switch
2023-10-17 06:55:46 +00:00
bfe6a24c57 revert(lwip): Revert changes to LWIP task priority macro from MR 25020 (backport v5.1) 2023-10-17 14:39:39 +08:00
0f138dad12 Merge branch 'fix/openthread_mtd_config_typo_backport' into 'release/v5.1'
fix(openthread): fix config typo for mtd (backport v5.1)

See merge request espressif/esp-idf!26397
2023-10-17 14:39:26 +08:00
bbbfa65e2c Merge branch 'bugfix/fix_wrong_mem_caps_in_memory_layout_v5.1' into 'release/v5.1'
fix(heap):  fix the issue on esp32c3 where retention memory was exhausted prematurely and preventing the CPU from powering down  (backport v5.1)

See merge request espressif/esp-idf!26087
2023-10-17 14:38:29 +08:00
da79b8aa5a Merge branch 'bugfix/config_tpoll_fail_v5.1' into 'release/v5.1'
Bugfix/config tpoll fail v5.1

See merge request espressif/esp-idf!26451
2023-10-17 14:34:24 +08:00
5bf6e573ea Merge branch 'bugfix/fix_c6_crash_v5.1' into 'release/v5.1'
fix(phy): fix wifi deinit stuck issue for ESP32C6(v5.1)

See merge request espressif/esp-idf!26478
2023-10-17 14:32:56 +08:00
78ae4c3b8e Merge branch 'bugfix/disable_tsf_tbtt_soc_wakeup_after_wifi_disconnected_v5.1' into 'release/v5.1'
fix(wifi):  fix enable psram wapi dhcp fail issue, fix beacon timeout after connected, fix lightsleep failure after disconnected

See merge request espressif/esp-idf!26400
2023-10-17 14:29:41 +08:00
6d33f7af81 Merge branch 'mqtt/update_submodule_e6afdb_v5.1' into 'release/v5.1'
change(mqtt): Update submodule to e6afdb (v5.1)

See merge request espressif/esp-idf!26257
2023-10-17 14:13:25 +08:00
a7a43973f6 Merge branch 'bugfix/ksz8041_model_number_0x13_v5.1' into 'release/v5.1'
esp_eth: Add model number 0x13 to the list of suported ksz80xx models (backport v5.1)

See merge request espressif/esp-idf!26380
2023-10-17 14:13:00 +08:00
ca8d6f3740 Merge branch 'backport_v5.1' into 'release/v5.1'
Fix some BLE bugs in bluedroid host(backport v5.1)

See merge request espressif/esp-idf!26496
2023-10-17 11:01:55 +08:00
754b2a0de1 fix(interrupts): reorder esp32s3 irq names to align with the respective irq numbers 2023-10-16 22:20:45 +02:00
235c82b6ee fix(docs/jtag): Fix hard-coded HW breakpoints/watchpoints number
Closes https://github.com/espressif/esp-idf/pull/11986
2023-10-16 17:30:36 +03:00
042fb7834a fix(bt/bluedroid): Fix hid example stack overflow bugs when using esp32s3 2023-10-16 19:56:42 +08:00
296a6cddee fix(bt/bluedroid): Fix remove resolving list error for esp32 2023-10-16 19:56:31 +08:00
f2c3bd38af fix(bt/bluedroid): Fix bugs in ble service change characteristic 2023-10-16 19:56:21 +08:00
3f69d20d4d feat(bt/bluedroid): Support scan response data length zero in BLE 2023-10-16 19:56:12 +08:00
e92c57c6cc fix(bt/bluedroid): Optimize the description of Scan Duplicate in BLE 2023-10-16 19:56:02 +08:00
3bb89e116a feat(openthread): Host connection logic refactor 2023-10-16 15:02:57 +08:00
zlq
17c2931309 feat(bootloader): adjust dbias of bootloader, change clock of H2 to 64
MHz
2023-10-16 14:35:45 +08:00
81dcc61008 Revert "feat(volt): chip auto adjust volt for esp32c6 & esp32h2"
This reverts commit b221f87e00.
2023-10-16 14:35:41 +08:00
0f51501495 Merge branch 'bugfix/h2_i2c1_no_signal_v5.1' into 'release/v5.1'
fix(i2c): I2C port 1 doesn't work on esp32h2 (backport v5.1)

See merge request espressif/esp-idf!26459
2023-10-16 14:13:23 +08:00
42efaf9794 Merge branch 'bugfix/BLEQABR23-632v51' into 'release/v5.1'
fix(ble_mesh): avoid executing bt_mesh_host_init() more than once when using nimble (v5.1)

See merge request espressif/esp-idf!26240
2023-10-16 12:01:28 +08:00
b7d403ddfe fix(ble_mesh): avoid executing bt_mesh_host_init() more than once when using nimble (v5.1) 2023-10-16 12:01:28 +08:00
0bce4b0b72 fix(phy): fix wifi deinit stuck issue for ESP32C6 2023-10-16 11:56:08 +08:00
7781867fbd Merge branch 'bugfix/0925_update_libble_c6_h2_c2_v5.1' into 'release/v5.1'
Bugfix/0925 update libble c6 h2 c2 v5.1

See merge request espressif/esp-idf!26177
2023-10-16 10:50:27 +08:00
d4b6952328 fix(bt/bluedroid): ble fails to load bonded device info after reboot
1: add a quantity check in bt when writing paired device info into nvs.
2: delete the exceeded device info from NVS when get bonded list during
bluedroid initialization.
3: unify the process of bt and ble to load bonded list during bluedroid
initialization.
2023-10-13 19:20:20 +08:00
21360b9ef3 fix(pm): fix soc wakeup after wifi disconnected, station no respond after m f null, crash when connected to non_trans bssid 2023-10-13 18:17:34 +08:00
7de4e28fdd fix: "erro code" -> "error code" typos 2023-10-13 18:17:34 +08:00
8467bddaea fix(wifi): Fix some wifi issue
1.fix multi antenna issue
2.fix dirty eb when rx HE rate action for C6
3.fix h/w modem state consecutive times when the modem sleep type is modified in runtime
2023-10-13 18:17:34 +08:00
ae604cbbdd fix(i2c): I2C port 1 doesn't work on esp32h2 2023-10-13 15:57:18 +08:00
d62393472c fix(bt/bluedroid): Add correct macro for ertm mode included flag 2023-10-13 14:44:25 +08:00
dc6120ee17 feat(bt/hci): Added Vendor-Specific HCI command to disable DM1 for ACL-U 2023-10-13 14:20:17 +08:00
9fc04635d1 fix(bt/bluedroid): Triggering disconnect event of GAP correctly 2023-10-13 14:20:04 +08:00
fb6a12d24c fix(bt/bluedroid): Fix issue of QoS configuration failure when t_poll is greater than 40 2023-10-13 14:19:47 +08:00
f94b64d820 feat(ble): added modem reset on c2 h2 and c6 2023-10-13 11:42:14 +08:00
CC
9c479e6589 esp_wifi.h typo
typo in esp_wifi_scan_get_ap_num comment
APIs -> APs
2023-10-13 09:29:11 +08:00
c9f7186357 ble: update tx power level index of ESP32-H2 and ESP32-C2 2023-10-12 15:55:29 +08:00
5becfa46bc ble:update c2 libble to 6a8d1f3d, h2 c6 libble to 57ed7949 2023-10-12 15:55:29 +08:00
c1c843f5e2 Merge branch 'bugfix/fix_adc_sar_set_power_mode_no_effect_v5.1' into 'release/v5.1'
ADC: Fixed wrong ADC reading issue caused by ADC and WiFi power conflict on ESP32C6(backport v5.1)

See merge request espressif/esp-idf!26235
2023-10-12 15:18:18 +08:00
46817f4edd Merge branch 'bugfix/parlio_tx_dma_descriptor_v5.1' into 'release/v5.1'
fix(parlio_tx): fix wrong dma descriptor setup (v5.1)

See merge request espressif/esp-idf!26253
2023-10-12 13:39:08 +08:00
f618850370 Merge branch 'change/remove_s3_120_sdr_warning_v5.1' into 'release/v5.1'
mspi: remove s3 120mhz sdr warning (v5.1)

See merge request espressif/esp-idf!26254
2023-10-12 12:36:42 +08:00
1c3b8656d3 Merge branch 'bugfix/rmt_pm_lock_type_v5.1' into 'release/v5.1'
fix(rmt): use ESP_PM_CPU_FREQ_MAX for RMT for non-dma channel (v5.1)

See merge request espressif/esp-idf!26258
2023-10-12 12:31:47 +08:00
2302bc4862 fix(heap): fix memory caps defination in memory_layout
fix the issue on esp32c3 where retention memory was exhausted
prematurely and preventing the CPU from powering down because
all of the last level of RAM is retention dma accessible on
esp32c3.
2023-10-12 11:57:49 +08:00
1f6f5396f4 fatfs: raw diskio: Fixed handling read-only filesystem
ff_ routines incorrectly reported disk state and caused whole fatfs
to lock-up when trying to write to read-only device.

Signed-off-by: Michal Jenikovsky <jendo@jmsystems.sk>
2023-10-12 04:48:47 +02:00
31b4b0a8d4 idf.py: gdb action incorrectly generated EOL gdbinit scripts
GDB on Windows incorrectly reads EOL in the script files causing 'gdb'
action to fail.

(gdb) source .../build/gdbinit/py_extensions
(gdb) source .../build\gdbinit\symbols
add symbol table from file "...\build\bootloader\bootloader.elf"
.../build\gdbinit\symbols:6: Error in sourced command file:
Undefined command: "".  Try "help".

Forcing line separator to '\n' resolved the issue

Signed-off-by: Michal Jenikovsky <jendo@jmsystems.sk>
2023-10-12 04:48:47 +02:00
fa1924f09b fix(app_trace): fix host file write API return value 2023-10-11 15:23:56 +04:00
88093c8618 fix(nimble): Fix compilation issues when max bonds or cccd is set to 0 2023-10-11 14:01:51 +05:30
be79c75b64 feat(tools): Add QEMU 8.0.0_20230522 to tools.json
Process wildcards in the install and download lists of idf_tools
    Fix the install and download handlers to get common behaviour
2023-10-11 12:28:47 +07:00
870d2cac32 (fix)esp_wifi: wifi beacon timeout after connection established 2023-10-11 09:38:51 +08:00
039ef51db5 fix(wifi): fix some wifi issues
1. fix enable psram wapi dhcp fail issue
2. fix c6 esp_wifi_set_max_tx_power fail issue
3. fix wrong wifi mode connect crash issue
4. fix null data sequence number issue
2023-10-10 21:39:56 +08:00
zwx
b0300ed460 fix(openthread): fix config typo for mtd 2023-10-10 20:16:22 +08:00
5a195cdf0a fix(esp_eth): Add model number 0x13 to list of suported models
Add model number 0x13 to KSZ80xx driver's list of supported models
corresonding to KSZ8041RLNI.
2023-10-09 12:42:15 +02:00
zwx
faa2159f06 feat(openthread): update openthread upstream 2023-10-09 16:22:57 +08:00
7745b22cc8 fix(startup): flip the security configuration check order
For cases where the bootloader is not enabled with the security features
ends up receiving an incorrect application with flash encryption enabled
should not really program any security efuses.

In the startup sequence, we first used to program the ROM DL mode
configuration but now we check for the flash encryption related checks
first. If the flash encryption related checks finds that flash
encryption is not enabled on the device then it aborts the boot process.
This is the case with `CONFIG_SECURE_FLASH_CHECK_ENC_EN_IN_APP` enabled.

This would at-least ensure that accidental program of security enabled
application does not really program any ROM DL mode efuses and there is
chance to recover the device.
2023-10-09 03:29:58 +00:00
f75474f359 fix(ble_mesh): fix compilation failure on using scene model. 2023-10-08 16:37:00 +08:00
7bfd475528 fix(protocomm): Remove the configuration check of wifi_provisioning for protocomm component 2023-10-08 16:23:03 +08:00
94730db3d4 feat(lwip): Fixes and Improvements for NAPT and SBOM Support
- napt: restore to the initial state in deinit (espressif/esp-lwip@5c4f899f)
- napt: Fix ip_portmap_add() to keep only one port mapping (espressif/esp-lwip@d65ad241)
- napt: Fix clean compilation (espressif/esp-lwip@7033e26f)
- napt: Fix IP forwarding when forward netif enable NAPT (espressif/esp-lwip@bc78df87)
- napt/stats: Move some napt counters to stats module (espressif/esp-lwip@b55e64ae)
- ip_napt_maint: Fix timestamp overflow handling (2.1.3) (espressif/esp-lwip@a7e0a50c)
- napt: Fixes and improvements (2.1.3) (espressif/esp-lwip@fadb9109)
- Add sbom descripton file for Software BOM (espressif/esp-lwip@f07097d7)
2023-10-06 19:32:25 +11:00
8a6ca94484 fix(vfs/uart): Add support for multi-task call to uart select (v5.1) 2023-10-05 09:46:30 +02:00
9525da0908 fix(esp_http_client): Call event_handler after header value is received 2023-10-05 10:23:27 +05:30
af53431f59 change(mqtt): Update submodule to e6afdb
Update submodule:
git log --oneline
05b347643f6679cc60a50a9664b86a24ebf3ae10..e6afdb4025fe018ae0add44e3c45249ea1974774

Detailed description of the changes:
* fix: using return value of asprintf now
  - See merge request espressif/esp-mqtt!192
  - See commit https://github.com/espressif/esp-mqtt/commit/c0b40b1
* fix: Uses caps allocation for data buffer instead of item struct
  - See merge request espressif/esp-mqtt!193
  - See commit https://github.com/espressif/esp-mqtt/commit/00ee059
2023-10-02 06:23:35 +00:00
be8339215a ci: fix breaking change in idf-build-apps 1.0.0 2023-09-29 09:24:23 +02:00
591984aa5d ci(adc): add a test about adc1 work with wifi on c6 2023-09-28 16:24:39 +00:00
0538a7b138 fix(adc): power settings not taking into effect on H2 2023-09-28 16:24:39 +00:00
49013a0560 feat(modem_clock): separate management of modem_adc_common_fe clock and modem_private_fe 2023-09-28 16:24:39 +00:00
b183b88463 fix(adc): power settings not taking into effect on C6 2023-09-28 16:24:39 +00:00
6b1f40b9bf Merge branch 'bugfix/uart_poll_fails_for_pollout_event_v5.1' into 'release/v5.1'
UART: UART_SELECT_WRITE_NOTIF event added in UART driver (v5.1)

See merge request espressif/esp-idf!26191
2023-09-28 13:37:00 +08:00
d02cfc21b7 Merge branch 'feature/walkthrough_for_spp_client_v5.1' into 'release/v5.1'
doc(nimble): Added the tutorial for spp_client example. (v5.1)

See merge request espressif/esp-idf!26201
2023-09-28 13:35:57 +08:00
1adcaf7f99 Merge branch 'feature/support_7.6.1_soc/pvt_auto_dbias_v5.1' into 'release/v5.1'
rtc: auto adjust HP LDO voltage using pvt function(backport 5.1)

See merge request espressif/esp-idf!25995
2023-09-28 13:35:00 +08:00
f837526a0b Merge branch 'bugfix/revert-commits-causing-breaking-change' into 'release/v5.1'
fix(examples): Reverted: Fix example build errors caused by the deep_sleep funcs are returnable

See merge request espressif/esp-idf!26263
2023-09-28 13:07:37 +08:00
f3ac64840e Merge branch 'backport/esp_phy_init_refactor_c3_bt_fix' into 'release/v5.1'
Backport: esp phy init refactor c3 bt fix

See merge request espressif/esp-idf!26262
2023-09-28 12:53:32 +08:00
0122d6cead Merge branch 'feature/add_support_for_ds_peripheral_on_ota_v5.1' into 'release/v5.1'
feat(esp_http_client): Added support for OTA using ds peripheral for TLS (v5.1)

See merge request espressif/esp-idf!26091
2023-09-28 03:23:12 +08:00
d72f2e1305 Merge branch 'bugfix/post_reattempt_cnt_event_v5.1' into 'release/v5.1'
fix(nimble): Add event for reattempt connection count information (v5.1)

See merge request espressif/esp-idf!26111
2023-09-27 23:09:20 +08:00
ea5e7490f3 Merge branch 'bugfix/usb_serial_jtag_write_return_val_v5.1' into 'release/v5.1'
bugfix(usb_serial_jtag): Fix usb_serial_jtag wrong return value, vfs lose data randomly (backport v5.1)

See merge request espressif/esp-idf!26174
2023-09-27 18:37:36 +08:00
1c21f07139 fix(app_update): Reverted: Fix CI test_switch_ota by increasing deepsleep
This reverts commit 7ac7d43541.
2023-09-27 12:26:29 +02:00
1256e6fd6b fix(examples): Reverted: Fix example build errors caused by the deep_sleep funcs are returnable
This reverts commit d521b7d52a.
2023-09-27 12:25:51 +02:00
4c60d48e5b workaround(phy): workaround c3 BT nimble 2M phy issue 2023-09-27 18:21:09 +08:00
c4b6f0cf41 Merge branch 'feature/walkthrough_for_spp_server_v5.1' into 'release/v5.1'
doc(nimble): Added the tutorial for spp_server example. (v5.1)

See merge request espressif/esp-idf!26216
2023-09-27 17:30:11 +08:00
fd7f8ee8f9 Merge branch 'bugfix/fix_condition_to_verify_when_no_SB_v5.1' into 'release/v5.1'
fix(bootloader_support): Fix condition for checking signature in the application (v5.1)

See merge request espressif/esp-idf!26225
2023-09-27 17:20:50 +08:00
86808a09f7 Merge branch 'bugfix/http_client_tcp_config_v5.1' into 'release/v5.1'
http_client: Set common tcp config to both TCP and SSL transport (v5.1)

See merge request espressif/esp-idf!26205
2023-09-27 17:15:10 +08:00
35f1a02ebf fix(rmt): fixed unstable transfer during DFS
Closes https://github.com/espressif/esp-idf/issues/12292
2023-09-27 16:56:47 +08:00
5a06ceebda Merge branch 'bugfix/fix_hid_congestion_v5.1' into 'release/v5.1'
Fix(bt/bluedroid): Fix the issue for HID congestion checking[backport 5.1]

See merge request espressif/esp-idf!26230
2023-09-27 16:24:56 +08:00
584250aa2d Merge branch 'bugfix/temp_clk_gate_v5.1' into 'release/v5.1'
fix(temperature_snesor): Put clock gate enable/disable in to sar_periph_ctrl together(backport v5.1)

See merge request espressif/esp-idf!26171
2023-09-27 15:11:38 +08:00
deea438c23 change(mspi): remove s3 120mhz sdr warning 2023-09-27 14:57:07 +08:00
30529d3916 fix(wifi): Support ESP32 PHY enabled not enter WiFi RX state by default 2023-09-27 14:55:26 +08:00
e5b4308b9d change(ble/controller): disable pll track by default in BLE controller on ESP32-C3 and ESP32-S3 2023-09-27 14:55:26 +08:00
ee087e91c2 fix(CI): fix CI build 2023-09-27 14:55:26 +08:00
f0a4aa4760 fix(phy): move phy tx power track to IDF 2023-09-27 14:55:26 +08:00
zwl
0bbc2805fc fix(phy): Fix ble phy_enable/disable api invoking issue for esp32c2,esp32h2 and esp32c6 2023-09-27 14:55:26 +08:00
9337525cdc fix(phy): Fix PHY enabled enter WiFi RX state default 2023-09-27 14:55:25 +08:00
d4e0de8a6b feat(phy): Add modem type to phy init 2023-09-27 14:55:25 +08:00
e5c8434c6e fix(parlio_tx): fix wrong dma descriptor setup 2023-09-27 14:53:53 +08:00
zlq
7bbe19d92f feat(volt): chip auto adjust volt for esp32c6 & esp32h2 2023-09-27 06:39:59 +00:00
5b45d359d2 Merge branch 'feature/update_esp32h2_sleep_logic_backport_v5.1' into 'release/v5.1'
feat(pm): remove SOC_PM_RETENTION_HAS_CLOCK_BUG for esp32h2 (backport v5.1)

See merge request espressif/esp-idf!26181
2023-09-27 14:38:47 +08:00
cba086c3a8 Merge branch 'bugfix/fix_sleep_risk_vol_param_to_v5.1' into 'release/v5.1'
fix(sleep): fix inproper sleep vol param for esp32c6 & esp32h2 (v5.1)

See merge request espressif/esp-idf!26074
2023-09-27 14:36:10 +08:00
8008dbe624 Merge branch 'test/bqb_test_bt_classic_hfp_v5.1' into 'release/v5.1'
feat(bt/hfp): Add support for HFP BQB auto test (backport v5.1)

See merge request espressif/esp-idf!26222
2023-09-27 14:15:22 +08:00
67e5366863 Merge branch 'bugfix/fix_pma_bad_backup_v5.1' into 'release/v5.1'
fix(sleep): fix pma cfg csr regs bad retention (backport v5.1)

See merge request espressif/esp-idf!26137
2023-09-27 13:47:51 +08:00
4b3cc2aa02 Merge branch 'feature/eth_iram_optimization_v5.1' into 'release/v5.1'
feat(esp_eth): added IRAM optimization option for internal EMAC (v5.1)

See merge request espressif/esp-idf!25842
2023-09-27 10:34:00 +08:00
b5891b61b6 Merge branch 'feature/walkthrough_for_coc_ble_cent_v5.1' into 'release/v5.1'
doc (nimble): Added the tutorial for coc_blecent example. (v5.1)

See merge request espressif/esp-idf!26204
2023-09-27 10:24:29 +08:00
10793c3f7e Merge branch 'bugfix/shared_intr_memory_location_v5.1' into 'release/v5.1'
fix(intr): always allocate memory from internal ram (v5.1)

See merge request espressif/esp-idf!26187
2023-09-27 10:01:46 +08:00
28e62166a0 Merge branch 'test/bqb_test_bt_classic_l2cap_v5.1' into 'release/v5.1'
feat(bt/bluedroid): Add flags for BQB auto test of L2CAP (backport v5.1)

See merge request espressif/esp-idf!26218
2023-09-27 09:52:15 +08:00
98e2f5b391 Merge branch 'feature/locking_layer_for_ecdsa_v5.1' into 'release/v5.1'
feat(esp_hw_support): Added locking mechanism for the ECDSA and ECC peripherals (v5.1)

See merge request espressif/esp-idf!26194
2023-09-27 06:58:14 +08:00
5d0bdce91d Merge branch 'bugfix/fix_modem_reject_deepsleep_v5.1' into 'release/v5.1'
fix(sleep): fix modem reject the deepsleep request (backport v5.1)

See merge request espressif/esp-idf!26102
2023-09-27 05:23:00 +08:00
3a652b2ce0 Merge branch 'update/micro-ecc_submodule_v5.1' into 'release/v5.1'
feat(bootloader): Update micro-ecc version to v1.1 (v5.1)

See merge request espressif/esp-idf!26139
2023-09-26 20:14:59 +08:00
8c74d2795c Merge branch 'feature/walkthrough_for_ble_multi_adv_v5.1' into 'release/v5.1'
doc (nimble): Added the tutorial for ble_multi_adv example. (v5.1)

See merge request espressif/esp-idf!26178
2023-09-26 19:15:55 +08:00
bb307238b4 Merge branch 'ci/increase_all_adc_performance_test_thersh_on_c6_v5.1' into 'release/v5.1'
ci(adc): increase all adc performance test threshold on c6 (v5.1)

See merge request espressif/esp-idf!26138
2023-09-26 17:37:51 +08:00
af4cb757a2 Merge branch 'backport/support_openthread_feature_on_512' into 'release/v5.1'
Backport/support openthread feature for release v5.1.2(backport5.1)

See merge request espressif/esp-idf!26203
2023-09-26 16:40:47 +08:00
f71eccb546 Merge branch 'bugfix/hfp_api_pkt_stat_nums_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix the judgment condition for packet transmission status statistics (backport v5.1)

See merge request espressif/esp-idf!26169
2023-09-26 16:37:40 +08:00
e565bc5a1b Merge branch 'bugfix/fix_build_error_in_protocol_examples_v5.1' into 'release/v5.1'
fix: Fix protocols example to build without setting target (v5.1)

See merge request espressif/esp-idf!26200
2023-09-26 16:11:38 +08:00
361b6c00dc fix(nimble): Add event for reattempt connection count information 2023-09-26 13:41:29 +05:30
a4c13f156e fix(bootloader): Update kconfig option 2023-09-26 13:31:43 +05:30
c4e6312687 fix(bootloader_support): Fix condition for SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
Fix the condition to verify the image when SECURE_SIGNED_APPS_ECDSA_V2_SCHEME and
SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT are selected.
2023-09-26 13:31:43 +05:30
83a6683006 fix(bt/bluedroid): Modify the operator name to English in hfp_ag example 2023-09-26 15:10:05 +08:00
8e58ffbd16 fix(bt/bluedroid): Revise the description for index in esp_hf_ag_clcc_response and correct the error return in btc_hf_indchange_notification
1: modify the description of param index in function
esp_hf_ag_clcc_response.
2: fix the error code return of function btc_hf_indchange_notification.
2023-09-26 15:10:04 +08:00
928ece17c1 feat(bt/bluedroid): Add flag to control whether to send AT+CLIP cmd for BQB test 2023-09-26 15:10:04 +08:00
8098e3a9ce feat(bt/bluedroid): Add flag to change HFP client features for BQB test 2023-09-26 15:10:04 +08:00
5734d58c6f feat(bt/bluedroid): Add eSCO S1 support for hfp client BQB test 2023-09-26 15:10:04 +08:00
8996222eb9 feat(bt/bluedroid): Add flag to send BRSF features for hfp ag BQB test 2023-09-26 15:10:04 +08:00
d1c701bfaa feat(bt/bluedroid): Modify the btc hf features for AT+NREC cmd in BQB test 2023-09-26 15:10:04 +08:00
768e15afc5 fix(bt/bluedroid): Fix the process of sending OK in ATD and COPS cmds 2023-09-26 15:10:04 +08:00
e989d9eb32 feat(bt/bluedroid): Add supprot for specific indicator sending from AG to Client 2023-09-26 15:10:04 +08:00
e1ead7ae40 feat(bt/bluedroid): Modify AT+CNUM response api and HFP AG example 2023-09-26 15:10:04 +08:00
186ce934ed feat(bt/bluedroid): Add HFP config for BQB test 2023-09-26 15:10:03 +08:00
aaded3fd59 Merge branch 'bugfix/remove_unused_coex_header_v5.1' into 'release/v5.1'
remove(nimble): Removed unused coex header inclusion (v5.1)

See merge request espressif/esp-idf!26179
2023-09-26 14:27:59 +08:00
f8402c7721 fix(bt/bluedroid): Fix the issue for HID congestion checking 2023-09-26 14:13:36 +08:00
19575dbe3c feat(bt/bluedroid): Add flags for BQB auto test of L2CAP
1: add sdp_bqb_disable_flag to avoid running sdpu_build_n_send_error.
2: add sdp_bqb_inact_timeout_flag to set the SDP inactivity timeout to 90 seconds.
3: add l2cap_bqb_bad_cmd_len_rej_flag to reject the C-Frame with invalid PDU length
4: add l2cap_bqb_ertm_mode_included_flag to set L2CAP_FCR_ERTM_MODE for most L2CAP cases
2023-09-26 14:06:14 +08:00
0d2a52491b Merge branch 'bugfix/check_mapping_target_conflict_v5.1' into 'release/v5.1'
fix(ldgen): check target conflict for entries with section aliases (v5.1)

See merge request espressif/esp-idf!26123
2023-09-26 13:56:27 +08:00
face850973 Merge branch 'feature/rename_wpa2_ent_to_eap_client_v5.1' into 'release/v5.1'
WiFi: Rename WPA2 enterprise APIs to EAP Client. (v5.1)

See merge request espressif/esp-idf!26082
2023-09-26 13:30:52 +08:00
3c8d9a0d77 doc(nimble): Added the tutorial for spp_server example. 2023-09-26 10:23:10 +05:30
4ac53c7cd7 Merge branch 'bugfix/add_params_check_for_hci_v5.1' into 'release/v5.1'
Fixed some HCI commands parameter (backport v5.1)

See merge request espressif/esp-idf!26147
2023-09-26 10:37:02 +08:00
a59f65e68f Merge branch 'bugfix/BLEQABR23-414_v51' into 'release/v5.1'
Fix PB-GATT adv is reported to the app layer too frequently (v5.1)

See merge request espressif/esp-idf!25897
2023-09-26 10:26:30 +08:00
d21aa2330a Fix PB-GATT adv is reported to the app layer too frequently (v5.1) 2023-09-26 10:26:30 +08:00
9e0383cc50 fix(sleep): fix pma cfg csr regs bad retention 2023-09-25 23:52:27 +00:00
b17c8aa3d4 fix(sleep): fix modem reject the deepsleep request 2023-09-25 23:52:01 +00:00
1363566b73 fix(http_client): Set common tcp config to both TCP and SSL transport
Foundation transport contained TCP properties for both TCP and SSL
transport, so it was enough to set the TCP connection properties
(keepalive, interface binding) to one transport only. After merging
5778a7c7 we have separate TCP properties for these transports and need
to set the same for both.
This commit also fixes unnecessary allocation of 1 more byte for if_name

Closes https://github.com/espressif/esp-protocols/issues/322
2023-09-25 14:56:55 +02:00
5caf3b566d doc (nimble): Added the tutorial for coc_blecent example. 2023-09-25 17:57:37 +05:30
b46a32cd92 fix(openthread): update openthread_br lib 2023-09-25 19:42:53 +08:00
3f02e5e901 feat(openthread): enable time sync feature 2023-09-25 19:42:36 +08:00
8a565641c2 feat(openthread): Add some configuration for customer using 2023-09-25 19:41:57 +08:00
d38147037d doc(nimble): Added the tutorial for spp_client example. (v5.1) 2023-09-25 17:04:41 +05:30
7decf3e344 fix: Fix protocols example to build without setting target
Protocol examples used to raise an error if the target was not set
and `idf.py build` command was used. This commit fix this error
and when IDF_TARGET is not set, ESP32 is selected as default target
2023-09-25 16:57:22 +05:30
9a2b707e76 fix(ieee802154): using link0/2 for ieee802154 in esp32h2 chip 2023-09-25 17:26:24 +08:00
f6b589e275 feat(esp_hw_support): Added locking mechanism for the ECDSA and ECC peripheral 2023-09-25 14:33:04 +05:30
710b9d228b feat(esp_hw_support): Add esp_crypto_lock layer for esp32c2 2023-09-25 14:31:18 +05:30
1199806d71 docs(esp_eth): added Ethernet to Improving Network Speed section 2023-09-25 10:54:08 +02:00
80f7e913a0 fix(sleep): fix inproper sleep vol param for esp32c6 & esp32h2 2023-09-25 16:39:46 +08:00
199205026e UART: UART_SELECT_WRITE_NOTIF event added in UART driver
Closes https://github.com/espressif/esp-idf/issues/10986
2023-09-25 10:36:44 +02:00
1cbed4e2c1 fix(intr): always allocate memory from internal ram
Closes https://github.com/espressif/esp-idf/issues/12271
2023-09-25 15:41:15 +08:00
179e3293be change: remove has clock bug macro for esp32h2 2023-09-25 13:40:26 +08:00
0e668ddf63 feat(ble): update ble sleep logic for esp32h2 2023-09-25 13:40:10 +08:00
1d02b6c1c6 feat(ieee802154): update ieee802154 sleep logic and support modem sleep 2023-09-25 13:39:59 +08:00
a9714ebe11 change(wifi): Add dependency of group 19 for MbedTLS crypto 2023-09-25 10:55:07 +05:30
52120cde26 change(wifi): Add supplicant's public API header files to doc 2023-09-25 10:54:52 +05:30
d49c020750 remove(nimble): Removed unused coex header inclusion 2023-09-25 10:38:27 +05:30
c542d62d21 doc (nimble): Added the tutorial for ble_multi_adv example. 2023-09-25 10:35:39 +05:30
518212a8f6 fix(usb_serial_jtag): Clean-up usb_serial_jtag lose byte fix, Closes https://github.com/espressif/esp-idf/pull/11344 2023-09-25 11:05:05 +08:00
0ed7093fb2 [Usb Serial JTAG] printing to console could sometimes skip bytes 2023-09-25 11:04:55 +08:00
69d283b9ae fix(usb_serial_jtag): Fix usb_serial_jtag wrong return value, vfs lose data randomly,
Closes https://github.com/espressif/esp-idf/issues/12119,
Closes https://github.com/espressif/esp-idf/pull/11344,
Closes https://github.com/espressif/esp-idf/issues/9318
Closes https://github.com/espressif/esp-idf/issues/11192
2023-09-25 11:04:16 +08:00
73c78c20a6 fix(temperature_snesor): Put clock gate enable/disable in to sar_periph_ctrl together 2023-09-25 10:57:06 +08:00
36563c86be fix(bt/bluedroid): Fix the judgment condition for packet transmission status statistics 2023-09-25 10:29:34 +08:00
09f6dfa2c4 feat(esp_eth): added IRAM optimization option for internal EMAC 2023-09-25 02:10:29 +00:00
7a32d72409 Merge branch 'doc/fix_misleading_vref_to_vdd_in_dac_doc_v5.1' into 'release/v5.1'
docs(dac): added the explanation to Vref (v5.1)

See merge request espressif/esp-idf!26143
2023-09-22 22:36:08 +08:00
22ab7ff325 fix(bt/controller): Fixed some HCI commands parameter
1: add param check for HCI_Recevie_Synchronization_Train.
2: add param check for HCI_Set_Connectionless_Peripheral_Broadcast.
3: fix slave cannot take a secure authentication.
2023-09-22 15:02:17 +08:00
1880ddca9e docs(dac): added the explanation to Vref (v5.1) 2023-09-22 14:24:13 +08:00
85239ce2af feat(bootloader): Update micro-ecc version to v1.1
This fix ensures that https://nvd.nist.gov/vuln/detail/CVE-2020-27209 is not
reported by the ESP-IDF SBOM tool. Please note that, this CVE was anyways not
applicable for ESP32 platform, as the bootloader (user of micro-ecc library)
do not perform signing on the device, its only verification that happens in
secure-boot-v1 case.
2023-09-22 10:49:43 +05:30
d57651b13c ci(adc): increase all adc performance test threshold on c6 (v5.1) 2023-09-22 12:37:44 +08:00
6ff4bb0994 Merge branch 'refactor/esp_timer_etm_test_v5.1' into 'release/v5.1'
test(etm): refactor systimer etm test case (v5.1)

See merge request espressif/esp-idf!26093
2023-09-22 11:09:55 +08:00
cef55b1712 Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/clk_trees.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/clk_tree.rst (Backport v5.1)

See merge request espressif/esp-idf!26108
2023-09-22 10:52:59 +08:00
198ea10c59 docs: provide CN translation for api-reference/peripherals/clk_tree.rst (Backport v5.1) 2023-09-22 10:52:56 +08:00
c395dd3781 Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/spi_slave_hd.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/spi_slave_hd.rst (Backport v5.1)

See merge request espressif/esp-idf!26107
2023-09-22 10:52:31 +08:00
fb969a4411 docs: provide CN translation for api-reference/peripherals/spi_slave_hd.rst (Backport v5.1) 2023-09-22 10:52:31 +08:00
6d9046a64d Merge branch 'docs/add_Chinese_translation_for_api-reference_peripherals_sdspi_host.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/sdspi_host.rst (Backport v5.1)

See merge request espressif/esp-idf!26106
2023-09-22 10:52:18 +08:00
44351d691b docs: provide CN translation for api-reference/peripherals/sdspi_host.rst (Backport v5.1) 2023-09-22 10:52:18 +08:00
d3b6d0ac18 Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/adc_oneshot.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/adc_oneshot.rst (Backport v5.1)

See merge request espressif/esp-idf!26105
2023-09-22 10:52:00 +08:00
c4df51cb66 docs: provide CN translation for api-reference/peripherals/adc_oneshot.rst (Backport v5.1) 2023-09-22 10:52:00 +08:00
687b97d901 Merge branch 'feature/update_h2_wifi_docs_backport_v5.1' into 'release/v5.1'
feat(doc): update wifi sections for H2 (Backport V5.1)

See merge request espressif/esp-idf!26099
2023-09-22 10:12:53 +08:00
5d8433ec56 fix(ldgen): duplicate entries in the generated .ld file 2023-09-21 19:38:49 +08:00
de93968670 fix(ldgen): check target conflict for entries with section alias 2023-09-21 19:38:49 +08:00
77492f3bc5 fix(freertos): Updated IDLE task names for each core to have the coreID as a suffix
This commit updates the IDLE task names for each core by concatenating
the respective coreIDs to the names.

Closes https://github.com/espressif/esp-idf/issues/12204
2023-09-21 13:07:34 +02:00
aececf745f Merge branch 'bugfix/some_wifi_fixes_v5.1' into 'release/v5.1'
fix(esp_wifi): Some Wi-Fi bug fixes

See merge request espressif/esp-idf!26084
2023-09-21 18:46:02 +08:00
02ea722492 Merge branch 'change/optimize_sniff_request_v5.1' into 'release/v5.1'
Change(bt/bluedroid): Limit sniff request when pending mode change event[backport 5.1]

See merge request espressif/esp-idf!26053
2023-09-21 17:19:06 +08:00
9f6fe72a46 Merge branch 'bugfix/coex_ble_scan_rate_v5.1' into 'release/v5.1'
fix(esp_coex): Fix esp32 ble scan not restart when wifi start stop (Backport v5.1)

See merge request espressif/esp-idf!26000
2023-09-21 16:18:57 +08:00
5c3f7ed2fd Merge branch 'feature/support_pd_hp_aon_domain_in_deepsleep_v5.1' into 'release/v5.1'
feat(pm/deepsleep): support pd hp aon domain in deepsleep (backport v5.1)

See merge request espressif/esp-idf!26078
2023-09-21 15:36:19 +08:00
2a0a080c9f feat(doc): update wifi sections for H2 2023-09-21 14:28:12 +08:00
1c15c2aded refactor(etm): systimer etm test case
previously we use the systimer event to toggling a GPIO and assert the GPIO level,
which is not stable in CI.
Now we swicth to clear the GPIO at the systimer event.
2023-09-21 13:03:49 +08:00
5fffeddf79 feat(esp_http_client): Added support for OTA using ds peripheral for TLS 2023-09-21 10:21:02 +05:30
25f031c6e1 Merge branch 'backport/optimize-zb-core-implementation-v5.1' into 'release/v5.1'
feat(zigbee): optimize Zigbee example implementation (backport v5.1)

See merge request espressif/esp-idf!26064
2023-09-21 10:34:51 +08:00
08262e1975 Merge branch 'bugfix/fix_cpu_switches_freq_bug_s2s3_to_v5.1' into 'release/v5.1'
EspS2/S3: fixed the bug of insufficient voltage when the CPU switches frequency(V5.1)

See merge request espressif/esp-idf!26044
2023-09-21 10:22:48 +08:00
af7ce38507 Merge branch 'feat/warn_on_unpulled_mqtt_sub_v5.1' into 'release/v5.1'
feat(mqtt): Stop cmake process if submodule is missing (v5.1)

See merge request espressif/esp-idf!26032
2023-09-21 10:12:18 +08:00
941811a0b5 Merge branch 'feature/docker_image_update_qemu8.0.0_v5.1' into 'release/v5.1'
tools: Docker: update QEMU to 8.0.0 version, with xtensa and riscv32 chip support (v5.1)

See merge request espressif/esp-idf!26009
2023-09-21 10:11:22 +08:00
19d710dd61 Merge branch 'gdb_panic_server_remove_v5.1' into 'release/v5.1'
fix(tools): remove unused gdp_panic_server; replace with new esp-idf-panic-decoder package (v5.1)

See merge request espressif/esp-idf!25878
2023-09-21 10:09:07 +08:00
cb174b0fe1 Merge branch 'remove_monitor_tests_v5.1' into 'release/v5.1'
feat(tools/monitor): move target tests to monitor repo (v5.1)

See merge request espressif/esp-idf!26068
2023-09-21 01:57:35 +08:00
7f9b241f7e fix(wifi): fix some esp32c6 wifi bugs 2023-09-20 19:50:44 +08:00
55fcae23c9 esp_wifi: support connectionless manually pwr mgmt 2023-09-20 19:50:05 +08:00
b439f7568c sleep_modem: split esp_wifi_internal_mac_sleep_configure, add lock for pm functions 2023-09-20 19:49:54 +08:00
f66740362e fix(sleep_modem): fix lightsleep failure if enable lightsleep at phy disabled 2023-09-20 19:49:42 +08:00
ae3f3f7a10 feat(esp_wifi):static buf for management,control,qos null,null data rx packet 2023-09-20 19:48:46 +08:00
3d056fd748 fix(esp_wifi): Fix issues with extended caps IE, scan and HT40 mode
-Merges the addition of extended caps IE for assoc req, probe resp
 and beacons in a single place. This ensures that there are no
 duplicate Extended Caps IE in the frame. Moves the capability
 indication for BTM and HT20/40 from supplicant to wifi libs.

-Fix issue with frequent disconections when scanning for only a single
 channel.

-Prints error message and returns ESP_ERR_NOT_SUPPORTED in case
 esp32c2 tries to set bandwidth to HT40.
2023-09-20 19:44:57 +08:00
6c9692ecef change(example): Update eap-fast example 2023-09-20 17:07:00 +05:30
d490e99f74 change(example): Update wifi enterprise example 2023-09-20 17:06:59 +05:30
981086ba30 change(esp_wifi): Rename WiFi enterprise connection APIs 2023-09-20 17:06:59 +05:30
3dc3ee0817 feat(pm/deepsleep): support pd hp aon domain in deepsleep 2023-09-20 19:26:35 +08:00
41d8715dfe Merge branch 'feat/add_internal_pull_up_or_pull_down_option_for_deepsleep_wakeup_prepare_v5.1' into 'release/v5.1'
feat(pm): add internal pull-up/downs option for gpio used for deepsleep wakeup (backport v5.1)

See merge request espressif/esp-idf!26040
2023-09-20 19:15:48 +08:00
013c52afe4 Merge branch 'test/bqb_test_bt_classic_avdtp_v5.1' into 'release/v5.1'
feat(bt/bqb): Add avdt abort function for BQB test (backport v5.1)

See merge request espressif/esp-idf!26045
2023-09-20 19:12:25 +08:00
f37ac82c2b fix(esp_coex): Fix esp32 ble scan not restart when wifi start stop 2023-09-20 17:02:17 +08:00
013a0d4fab Merge branch 'bugfix/update_ble_phy_example_v5.1' into 'release/v5.1'
fix(nimble): Updated BLE Phy example (v5.1)

See merge request espressif/esp-idf!26015
2023-09-20 16:14:48 +08:00
e3beb8ce26 Merge branch 'contrib/github_pr_12179_v5.1' into 'release/v5.1'
fix(uart): Fix uart_ll_set_baudrate div-by-zero crash due to uint32_t overflow (backport v5.1)

See merge request espressif/esp-idf!26014
2023-09-20 16:13:20 +08:00
732dbe8556 feat(tools/monitor): move target tests to monitor repo 2023-09-20 09:23:42 +02:00
e666df3345 feat(zigbee): optimize Zigbee example implementation 2023-09-20 12:38:51 +08:00
ffc8da6ee1 Merge branch 'backport/rcp_size_opt_config' into 'release/v5.1'
Backport/rcp size opt config

See merge request espressif/esp-idf!26010
2023-09-20 11:36:21 +08:00
b8d3ee9844 Merge branch 'contrib/github_pr_12258_v5.1' into 'release/v5.1'
fix(vfs): Fix event_write may not exit critical section (GitHub PR) (v5.1)

See merge request espressif/esp-idf!26047
2023-09-19 20:40:22 +08:00
fe5734b4f1 change(bt/bluedroid): Limit sniff request when pending mode change event 2023-09-19 20:08:04 +08:00
15c7cf4cab feat(bt/bluedroid): Add avdt abort function for BQB test
1: add new AVDTP abort function for BQB test
2023-09-19 19:02:29 +08:00
614024106e feat(openthread): rcp size optimization configurations 2023-09-19 17:15:03 +08:00
d5f3f73f51 fix(openthread): copy the networkname with a null terminator 2023-09-19 17:15:03 +08:00
35535a6b6e Merge branch 'bugfix/suppress_compiler_warning_silent_reboot_is_enabled_v5.1' into 'release/v5.1'
fix(esp_system): suppress compiler warning if ESP_SYSTEM_PANIC_SILENT_REBOOT is enabled(backport v5.1)

See merge request espressif/esp-idf!26036
2023-09-19 17:13:30 +08:00
20219b8ee6 fix(vfs): Fix event_write may not exit critical section
This commit fixes the event_write() function where the critical section
was unbalanced.

Merges https://github.com/espressif/esp-idf/pull/12258
2023-09-19 08:52:36 +02:00
da6625faae fix(docs): update esp32h2 gpio docs about pin led out 2023-09-19 12:12:05 +08:00
d167087f2d fix(docs): Improve the DFS and Peripheral Drivers section in power_management.rst 2023-09-19 12:12:05 +08:00
b7ed76110c fix(uart): Add 8/16-bit register field access workaround to ESP32C2 2023-09-19 12:12:05 +08:00
9cd0aee51b fix(uart): Fix uart_ll_set_baudrate div-by-zero crash due to uint32_t overflow
Merges https://github.com/espressif/esp-idf/pull/12179
2023-09-19 12:12:05 +08:00
c7132d3f15 Merge branch 'bugfix/error_param_in_BTA_AG_WBS_EVT_v5.1' into 'release/v5.1'
Bugfix/error param in bta ag wbs evt (v5.1)

See merge request espressif/esp-idf!26001
2023-09-19 12:01:11 +08:00
bb33a2bf6b fix cpu switches freq bug s2s3 to v5.1 2023-09-19 11:27:08 +08:00
86e5252d63 feat(pm): add internal pull-up/downs option for gpio used for deepsleep wakeup 2023-09-19 10:59:57 +08:00
a96f2c7674 fix(esp_system): suppress compiler warning if ESP_SYSTEM_PANIC_SILENT_REBOOT is enabled 2023-09-19 10:37:23 +08:00
5badfeefac Merge branch 'bugfix/pthread_cond_var_link_hook_v5.1' into 'release/v5.1'
bugfix(pthread): fixed pthread_condvar linker hook (v5.1)

See merge request espressif/esp-idf!26004
2023-09-19 10:35:57 +08:00
80307247aa feat(mqtt): Stop cmake process if submodule is missing
Closes https://github.com/espressif/esp-idf/issues/12202
2023-09-18 14:34:02 +02:00
783cc77a29 fix(nimble): Updated BLE Phy example
The existing example has some issues which are now fixed.

1. Original example had legacy_pdu set which was not causing
   the PHY to actually change. Fixed this
2. Added a way to initiate connection directly on 2M or Coded Phy.
2023-09-18 13:25:30 +05:30
7fc23046e2 Merge branch 'feat/add_sbom_manifest_file_v5.1' into 'release/v5.1'
feat(nimble): Update nimble submodule pointer for SPDX manifest addition for SBOM tool (v5.1)

See merge request espressif/esp-idf!25994
2023-09-18 15:35:29 +08:00
66c9fb087d Merge branch 'feature/extenal_coexist_slave_support_v5.1' into 'release/v5.1'
feat(esp_coex): add external coex slave support (backport v5.1)

See merge request espressif/esp-idf!25976
2023-09-18 15:06:11 +08:00
8cdc795435 feat(tools/docker): update QEMU to 8.0.0 version, with xtensa and riscv32 chip support 2023-09-18 13:02:36 +07:00
62ad7658ed fix(pthread): fixed pthread_condvar linker hook 2023-09-18 12:31:25 +08:00
8ce86c32d0 Merge branch 'bugfix/fix_some_wifi_bugs_230913_v5.1' into 'release/v5.1'
fix(wifi): fix some wifi bugs 20230913(Backport v5.1)

See merge request espressif/esp-idf!25960
2023-09-18 12:09:31 +08:00
d41661be42 Merge branch 'bugfix/freertos_private_critical_section_macro_v5.1' into 'release/v5.1'
fix(freertos): Fixed bug with prvENTER/EXIT_CRITICAL_OR_MASK_ISR() macro (v5.1)

See merge request espressif/esp-idf!25706
2023-09-18 11:05:21 +08:00
a99bb2e32f Merge branch 'backport/suppport_ot_message_pool_using_PSRAM' into 'release/v5.1'
feat(openthread): support to allocate message pool from PSRAM(backport v5.1)

See merge request espressif/esp-idf!25990
2023-09-18 10:55:41 +08:00
7698a413bc Merge branch 'bugfix/fix_120_ddr_pll_cali_issue_5.1' into 'release/v5.1'
mspi: fixed bbpll calibration issue (v5.1)

See merge request espressif/esp-idf!25980
2023-09-16 00:44:04 +08:00
c546540ef1 feat(nimble): Added SBOM manifest file for SPDX file generation 2023-09-15 17:37:28 +05:30
331cc97d01 feat(openthread): Add support to allocate message pool from PSRAM 2023-09-15 18:30:42 +08:00
7275ae17bd Merge branch 'backport_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix set periodic advertising data error(backport v5.1)

See merge request espressif/esp-idf!25956
2023-09-15 11:59:02 +08:00
0b9748f096 Merge branch 'bugfix/usb/host/urb_check_revert_v5.1' into 'release/v5.1'
[USB Host] Fix transfer determination during argument checking for regular EP transfer (backport v5.1)

See merge request espressif/esp-idf!25965
2023-09-15 11:38:13 +08:00
dcddd48d6a Docs: add CN translation for api-guides/performance/speed.rst 2023-09-15 10:53:07 +08:00
85dd7ed731 Merge branch 'bugfix/esp32h2_sleep_current_issue_v5.1' into 'release/v5.1'
fix(esp_phy): fix esp32h2 tx-power incorrect issue after wakeup (backport v5.1)

See merge request espressif/esp-idf!25977
2023-09-15 10:45:26 +08:00
cd193469f2 fix(mspi): fixed bbpll calibration issue 2023-09-15 10:38:44 +08:00
9e756359cc Merge branch 'bugfix/use_xtal_for_c3_wdt_v5.1' into 'release/v5.1'
fix(wdt): changed ESP32-C3 WDT to use XTAL as clock (v5.1)

See merge request espressif/esp-idf!25946
2023-09-15 10:27:38 +08:00
bb8f10533f Merge branch 'docs/docker_image_flashing_v5.1' into 'release/v5.1'
docs(docker): Update Using Remote Serial Port chapter (backport v5.1)

See merge request espressif/esp-idf!25852
2023-09-15 10:26:37 +08:00
6609e5e785 Merge branch 'bugfix/ulp_i2c_fail_opt_v5.1' into 'release/v5.1'
fix(ulp-i2c): fixed ulp i2c not working from main cpu if compiled with 0S or O2 (v5.1)

See merge request espressif/esp-idf!25947
2023-09-15 08:09:03 +08:00
667b83db0e Merge branch 'mqtt/update_submodule_05b3476_v5.1' into 'release/v5.1'
feat(mqtt): Update submodule to 05b3476(v5.1)

See merge request espressif/esp-idf!25768
2023-09-14 19:56:04 +08:00
e7cf51ebec fix(esp_phy): fix esp32h2 tx-power incorrect issue after wakeup 2023-09-14 18:09:30 +08:00
ca37e4dee6 feat(esp_coex): add external coex slave support 2023-09-14 17:59:30 +08:00
b2b9b904f1 Merge branch 'bugfix/set_eir_when_no_eir_data_v5.1' into 'release/v5.1'
change(bt/bluedroid): Send a name tag with zero length when there is no EIR data

See merge request espressif/esp-idf!25949
2023-09-14 15:55:43 +08:00
a28f50d062 fix(wifi): fix ccmp and gcmp PN became large issue 2023-09-14 11:12:48 +08:00
1c7b1b8db0 Merge branch 'bugfix/bugfix_for_esp32c2_esp32c6_esp32h2_v5.1' into 'release/v5.1'
Bugfix/bugfix for esp32c2 esp32c6 esp32h2 v5.1

See merge request espressif/esp-idf!25836
2023-09-14 10:44:12 +08:00
8f9c2c6891 Merge branch 'bugfix/fix_dhcp_server_address_pool_issue_5.1' into 'release/v5.1'
fix(dhcp server): Fix dhcp server address pool issue 5.1

See merge request espressif/esp-idf!25817
2023-09-14 10:39:21 +08:00
ae6fdffcd7 fix(esp_wifi): WPA3 enterprise 192 bit fix and config modification
1. Added SOC caps dependency for enabling 192 bit security in wifi enterprise example
2. Fixed authmode in log and connected event for WPA3 enterprise 192 bit security
2023-09-14 10:14:13 +08:00
45b22c5ef0 Apply 1 suggestion(s) to 1 file(s) 2023-09-14 10:14:13 +08:00
b74c293505 feat(wifi): optimize esp32c6 iperf performance 2023-09-14 10:14:13 +08:00
71c201617e fix(esp_wifi): Skip PMK cache usage if configured password is incorrect 2023-09-14 10:14:13 +08:00
05915fee6e docs(wifi): Update wifi and wifi security documentation
1. Update documentation for WPA3 Enterprise and WPA3 Enterprise 192-bit
mode
2. Update documentation for WPA3 OWE and OWE transition mode
3. Update documentation related to SAE PK, SAE PWE and Transition Disable
4. Update documnetation for wifi connect API
5. Fix config paramter information for wifi scan start
6. Fix documentation related to scan threshold config setting
7. Replace ESP_ERR_WIFI_ARG error code as ESP_ERR_INVALID_ARG
8. Update documentation for 802.11R Fast transition
2023-09-14 10:14:13 +08:00
554e6880bc fix(wifi): fix some bugs in LR and bandwidth
1. Fix the LR rate set fail for espnow and 80211 tx
2. Check phy bandwidth when setting espnow peer rate

Closes https://github.com/espressif/esp-idf/issues/11751
2023-09-14 10:14:13 +08:00
75b1a135ad bugfix(usb/host): Fix transfer direction determination during argument checking for regular EP transfer 2023-09-13 21:51:24 +02:00
1fa048191a Merge branch 'bugfix/failed_module_import_v5.1' into 'release/v5.1'
fix(tools): extend error message for failed python module import (v5.1)

See merge request espressif/esp-idf!25868
2023-09-14 01:50:22 +08:00
5438cfa49f fix(bt/bluedroid): Fix set periodic advertising data error 2023-09-13 17:28:15 +08:00
fc9ce3b5f4 ci(esp_wifi): unit test for fast PBKDF2 validation 2023-09-13 16:33:19 +08:00
4756c22ffa change(esp_wifi): Port fast_pbkdf2 implementation for mbedlts
Add changes to use fast_pbkdf2 as default for PMK calculations.
fast_pbkdf2 is significantly faster than current implementations
for esp chips.

Also removes unnecessary code for pbkdf-sha256 and pbkdf-sha512.
2023-09-13 16:33:19 +08:00
e62d11ef41 change(esp_wifi): Copy fastpbkdf2 implementation
Copy pbkdf2 implementation from https://github.com/ctz/fastpbkdf2(3c56895)
2023-09-13 16:33:19 +08:00
8f05165284 Merge branch 'test/bqb_test_bt_classic_sdp_v5.1' into 'release/v5.1'
feat(bt/bluedroid): Add language base attr list to SDP record for BQB test (backport v5.1)

See merge request espressif/esp-idf!25929
2023-09-13 14:48:41 +08:00
6e1b968d0a Merge branch 'fix/vtaskdelay_caused_etm_test_failure_v5.1' into 'release/v5.1'
fix(test_etm): fix vTaskDelay caused ci failure (v5.1)

See merge request espressif/esp-idf!25945
2023-09-13 14:39:24 +08:00
a79ba4f1bf change(bt/bluedroid): Send a name tag with zero length when there is no EIR data 2023-09-13 14:09:11 +08:00
da33cd2170 feat(mqtt): Update submodule to 05b3476
* Update submodule:
git log --oneline dffabb067fb3c39f486033d2e47eb4b1416f0c82..05b347643f6679cc60a50a9664b86a24ebf3ae10

Detailed description of the changes:
* Fix: Mock test should include idf_additions.h
  - See merge request espressif/esp-mqtt!191
  - fix: Mock tests include idf_additions.h (espressif/esp-mqtt@f35aaa1)
* Adds missing documentation to outbox configuration.
  - See merge request espressif/esp-mqtt!190
  - docs: Adds missing documentation to outbox configuration. (espressif/esp-mqtt@c355e0b)
* fix: Added missing update to message data
  - See merge request espressif/esp-mqtt!189
  - See commit https://github.com/espressif/esp-mqtt/commit/cc41d1b
* PR: fixing typos in `mqtt5_error_reason_code`
  - See merge request espressif/esp-mqtt!188
  - feat: Add enum definition with typo to keep backwards compatibility (espressif/esp-mqtt@90b4a45)
  - fixing typos in `mqtt5_error_reason_code` (espressif/esp-mqtt@dc775bb)
* docs: Clarify keepalive timeout
  - See merge request espressif/esp-mqtt!186
  - See commit https://github.com/espressif/esp-mqtt/commit/cb1e6cf
* fix: LOG format strings
  - See merge request espressif/esp-mqtt!187
  - See commit https://github.com/espressif/esp-mqtt/commit/a3b04f2
* Fix: Stop client only if it's running.
  - See merge request espressif/esp-mqtt!183
  - See commit https://github.com/espressif/esp-mqtt/commit/36eec6f
* fix: Error on publish message creation was ignored.
  - See merge request espressif/esp-mqtt!185
  - See commit https://github.com/espressif/esp-mqtt/commit/585e3ba
* Fix: Allocation for connection buffer was incorrectly done.
  - See merge request espressif/esp-mqtt!182
  - See commit https://github.com/espressif/esp-mqtt/commit/6c849c6
* Adds mqtt host tests to Ci
  - See merge request espressif/esp-mqtt!181
  - See commit https://github.com/espressif/esp-mqtt/commit/4050df4
* Fix: Outbox was leaked in case of initialization failure
  - See merge request espressif/esp-mqtt!180
  - See commit https://github.com/espressif/esp-mqtt/commit/5d491a4
* feat: Add option to bind interface of use
  - See merge request espressif/esp-mqtt!179
  - Closes https://github.com/espressif/esp-mqtt/issues/253
  - See commit https://github.com/espressif/esp-mqtt/commit/363fbf7
* Add outbox size control feature
  - See merge request espressif/esp-mqtt!141
  - feat: Introduces outbox limit (espressif/esp-mqtt@372ab7b)
  - Removes unused outbox functions. (espressif/esp-mqtt@21a5491)
  - refactor: Group access to output buffer in mqtt_connection_t (espressif/esp-mqtt@122875b)
* Add custom transport configuration
  - See merge request espressif/esp-mqtt!169
  - feat: Add custom transport configuration (espressif/esp-mqtt@a5c1b44)
* Removes leftover calls to event_handler
  - See merge request espressif/esp-mqtt!178
  - See commit https://github.com/espressif/esp-mqtt/commit/a492935
* PR: Added support to set server common name.
  - See merge request espressif/esp-mqtt!173
  - Added support to set server common name. (espressif/esp-mqtt@6195762)
* Merge branch 'bugfix/return_on_qos0_disconnected' into 'master'
  - See merge request espressif/esp-mqtt!175
  - See commit https://github.com/espressif/esp-mqtt/commit/5bd9724
* Merge branch 'bugfix/cpp_compilation' into 'master'
  - See merge request espressif/esp-mqtt!174
  - See commit https://github.com/espressif/esp-mqtt/commit/70cbaca
* bug: Incorrect return on disconnect qos0 publish
  - See merge request espressif/esp-mqtt!172
* Fix: Compilation in C++ with multiple subscribe
  - See merge request espressif/esp-mqtt!171
* ci: Fix qemu build against 5.1
  - See merge request espressif/esp-mqtt!170
  - See commit https://github.com/espressif/esp-mqtt/commit/94defb8
* Minor cleanups on mqtt client
  - See merge request espressif/esp-mqtt!168
  - Removes pending message count (espressif/esp-mqtt@da6d38a)
  - Bugfix: Dispatch transport error on all write operations (espressif/esp-mqtt@5729048)
  - Merge enqueue functions (espressif/esp-mqtt@72833c7)
* Adds a configuration for outbox data destination
  - See merge request espressif/esp-mqtt!166
  - feat: Adds a configuration for outbox data destination (espressif/esp-mqtt@2c71f9e)
* CI: Add configuration for ttfw
  - See merge request espressif/esp-mqtt!167
  - See commit https://github.com/espressif/esp-mqtt/commit/d71dcf3
* mqtt5: Fix flow control will increase count when send fragmented packet
  - See merge request espressif/esp-mqtt!164
  - Closes https://github.com/espressif/esp-mqtt/issues/255
  - See commit https://github.com/espressif/esp-mqtt/commit/5cce2c4
* Add license information to queue
  - See merge request espressif/esp-mqtt!163
  - See commit https://github.com/espressif/esp-mqtt/commit/36f0faa
* MQTTv5: Fixes and additions from GitHub PRs
  - See merge request espressif/esp-mqtt!162
  - Merges https://github.com/espressif/esp-mqtt/pull/250
  - fix: Allow MQTT v5 zero length payload (espressif/esp-mqtt@65a4fda)
  - feature: Include subscribe_id in esp_mqtt5_event_property_t (espressif/esp-mqtt@1011e63)
* Feature:  Enable SUBSCRIBE to multiple topics
  - See merge request espressif/esp-mqtt!156
  - See commit https://github.com/espressif/esp-mqtt/commit/3210255
* Adds Kconfig option to configure poll read timeout
  - See merge request espressif/esp-mqtt!159
  - Closes: https://github.com/espressif/esp-mqtt/issues/245
  - See commit https://github.com/espressif/esp-mqtt/commit/2fa945d
* Fix formatting when using printf nano
  - See merge request espressif/esp-mqtt!160
  - See commit https://github.com/espressif/esp-mqtt/commit/e9b865e
* mqtt5: Fix flow control will regard the DUP packet and not consider PUBCOMP packet
  - See merge request espressif/esp-mqtt!158
  - Closes https://github.com/espressif/esp-mqtt/issues/243
  - See commit https://github.com/espressif/esp-mqtt/commit/ed76036
* Remove possible null pointer dereferences
  - See merge request espressif/esp-mqtt!157
  - Bugfix: Remove Remove possible null pointer dereferences (espressif/esp-mqtt@f80772b)
2023-09-13 06:08:13 +00:00
9d8af9748b Merge branch 'bugfix/fix_compilation_issue_enc_adv_v5.1' into 'release/v5.1'
fix(nimble): Fix compilation issue of unknown MYNEWT_VAL(v5.1)

See merge request espressif/esp-idf!25856
2023-09-13 13:31:36 +08:00
c7532e27fa fix(ulp-i2c): fixed ulp i2c not working from main cpu if compiled with 0S or O2
Compiler would optimize register write to use s8i which do not work for IO registers

Closes https://github.com/espressif/esp-idf/issues/12214
2023-09-13 11:47:36 +08:00
e29d4bd428 fix(dhcp server):fix set dhcp server poll fail issue 2023-09-13 10:49:21 +08:00
41a291fee0 fix(wdt): changed WDT clock source to XTAL for C6/H2
Previously it used PLL, but PLL could potentially be powered down by power-management
when CPU frequency changed.
2023-09-13 10:45:51 +08:00
c192ea478e fix(wdt): changed ESP32-C3 WDT to use XTAL as clock
This clock is unchanged even when CPU/APB frequency changes (e.g. due to esp_pm),
which means timeout period is correct even after such a change.
2023-09-13 10:45:49 +08:00
111779db5a Merge branch 'feature/configurable_wpa2_ent_v5.1' into 'release/v5.1'
Make enterprise support configurable to save binary size.(v5.1)

See merge request espressif/esp-idf!25558
2023-09-13 10:18:05 +08:00
f99b98a0f6 Merge branch 'doc/fix_xts_key_length_256_desc_v5.1' into 'release/v5.1'
fix(doc): Fix incorrect description for xts_key_length_256 efuse (v5.1)

See merge request espressif/esp-idf!25931
2023-09-13 10:06:24 +08:00
25922444a6 fix(test_etm): fix vTaskDelay caused ci failure 2023-09-13 10:04:30 +08:00
09c1bfe6b3 Merge branch 'bugfix/fix_hidd_send_rpt_without_connection_v5.1' into 'release/v5.1'
Change(bt/bluedroid): Optimize HIDD sending interrupt report behavior[backport 5.1]

See merge request espressif/esp-idf!25917
2023-09-13 09:13:33 +08:00
5d7bcdcf82 Merge branch 'bugfix/esp32c6_udp_bc_mc_short_time_cause_packet_loss_v5.1' into 'release/v5.1'
backport v5.1: optimize the retention step of the APM and TEE modules to set only the critical parts to level 2 priority

See merge request espressif/esp-idf!25837
2023-09-12 20:50:12 +08:00
8088c7216e fix(freertos): Fixed bug with prvENTER/EXIT_CRITICAL_OR_MASK_ISR() macro
Fixed an undiscovered bug with prvENTER_CRITICAL_OR_MASK_ISR() and
prvEXIT_CRITICAL_OR_MASK_ISR() where the `uxInterruptStatus` argument was not
used.

However, all calls of this macro provide a local `uxSavedInterruptStatus`
variable, leading to this bug being hidden.
2023-09-12 20:18:23 +08:00
a86522d614 fix(nimble): Fix compilation issue of unknown MYNEWT_VAL 2023-09-12 16:49:57 +05:30
da575a6afa Merge branch 'bugfix/ext_adv_log_v5.1' into 'release/v5.1'
fix(nimble): added log for extended advertisement (v5.1)

See merge request espressif/esp-idf!25928
2023-09-12 19:17:55 +08:00
2c1334ef1c change(ble): update controller log print interface 2023-09-12 15:50:54 +08:00
d612db3bca fix(doc): Fix incorrect description for xts_key_length_256 efuse 2023-09-12 14:52:48 +08:00
393530fb56 feat(bt/bluedroid): Add language base attr list to SDP record for BQB test 2023-09-12 13:04:23 +08:00
fc8d7e7f89 fix(nimble): added log for extended advertisement 2023-09-12 10:26:36 +05:30
5baf0197f0 Merge branch 'feature/modify_mcpwm_clock_pre_scale_v5.1' into 'release/v5.1'
feat(mcpwm): Make the MCPWM capture timer's resolution configurable (v5.1)

See merge request espressif/esp-idf!25904
2023-09-12 11:30:39 +08:00
40c6f1390d Merge branch 'update/docs_api_refs_modbus_esp32h2_v51' into 'release/v5.1'
docs: updated modbus api reference documents for target esp32h2 (Backport v5.1)

See merge request espressif/esp-idf!24972
2023-09-12 10:10:40 +08:00
4c06791a40 docs: updated modbus api reference documents for target esp32h2 2023-09-11 13:41:07 +00:00
1963f75fa7 change(bt/bluedroid): Optimize HIDD sending interrupt report behavior
HID device is allowed to trigger reconnection by sending an interrupt
report. When reconnection is in progress, no more interrupt report can
be sent until the procedure is accomplished.
2023-09-11 20:12:35 +08:00
649b8bc6d5 Merge branch 'feature/support_ot_bugfixing' into 'release/v5.1'
Feature/support ot bugfixing(backport v5.1)

See merge request espressif/esp-idf!25676
2023-09-11 20:07:28 +08:00
a8790378e9 fix(bt/bluedroid): Fixed incorrect arrangement in type esp_hf_dial_type_t 2023-09-11 19:45:30 +08:00
36ba902bfe change(bt/bluedroid): Added line information printing when error occurs CHECK_HF_IDX 2023-09-11 19:45:30 +08:00
ca1ef30aa7 fix(bt/bluedroid): Fixed the issue of uninitialized parameters in event BTA_AG_WBS_EVT 2023-09-11 19:45:29 +08:00
a432b1459e Merge branch 'feature/lp_wdt_h2_5.1' into 'release/v5.1'
LP-WDT: add support for H2 (v5.1)

See merge request espressif/esp-idf!25863
2023-09-11 19:04:00 +08:00
31aa471af8 Merge branch 'contrib/github_pr_11869_v5.1' into 'release/v5.1'
bugfix: avoid warning in espcoredump when log disabled (GitHub PR) (v5.1)

See merge request espressif/esp-idf!25143
2023-09-11 14:42:10 +08:00
be9d8ef709 Merge branch 'feature/freertos_add_sbom_file_v5.1' into 'release/v5.1'
feat(freertos): Added SBOM manifest file for SPDX file generation (v5.1)

See merge request espressif/esp-idf!25891
2023-09-11 13:48:28 +08:00
0c27d2467d Merge branch 'bugfix/pbc_overlap_in_wps_pin_method_v5.1' into 'release/v5.1'
Fix for issue of wps-pbc overlap in wps-pin method(v5.1)

See merge request espressif/esp-idf!25695
2023-09-11 12:12:29 +08:00
d8e5b2ac41 feat(mcpwm): Set group clock prescale dynamically
MCPWM group clock pre scale was originally fixed to 2, which is
inconvenient. Set group clock prescale dynamically. Now the maximum
resolution of the MCPWM timer is up to 160MHz(when the prescale set
to 1). And add a resulotion config for MCPWM capture.
2023-09-11 11:29:28 +08:00
1d91310e0f Merge branch 'bugfix/wps_wpa3_passphrase_v5.1' into 'release/v5.1'
WiFi: get passphrase in WPS if AP support SAE (v5.1)

See merge request espressif/esp-idf!25885
2023-09-11 10:54:18 +08:00
680a254b18 Merge branch 'bugfix/hf_ag_report_event_with_null_bdaddr_v5.1' into 'release/v5.1'
Bugfix/fixed bugs of HFP in BlueDroid (v5.1)

See merge request espressif/esp-idf!25827
2023-09-11 10:54:09 +08:00
123fcbbf36 Merge branch 'fix/spiffs_log_errors_v5.1' into 'release/v5.1'
fix(spiffs): SPIFFS print formatter errors out (v5.1)

See merge request espressif/esp-idf!25392
2023-09-11 10:10:23 +08:00
79cd68f969 Merge branch 'fix/nvs_tool_invalid_entry_none_check_v5.1' into 'release/v5.1'
NVS: nvs_tool.py entry.data None check fix (v5.1)

See merge request espressif/esp-idf!24495
2023-09-11 10:09:08 +08:00
c99a5e6185 Merge branch 'feature/walkthrough_for_ble_periodic_adv_and_ble_periodic_sync_v5.1' into 'release/v5.1'
doc (nimble): Added the tutorial for ble_periodic_adv and ble_periodic_sync_examples. (v5.1)

See merge request espressif/esp-idf!25729
2023-09-11 10:07:54 +08:00
c1e0210285 Merge branch 'feature/walkthrough_for_nimble_examples_v5.1' into 'release/v5.1'
doc (nimble): Added Walkthrough tutorial for phy_cent example (v5.1)

See merge request espressif/esp-idf!24650
2023-09-11 10:07:40 +08:00
da07a096d0 Merge branch 'test/bqb_test_bt_classic_hid_v5.1' into 'release/v5.1'
feat(bt/bqb): Add setting local di record function for specific hid case of bqb auto test (backport v5.1)

See merge request espressif/esp-idf!25833
2023-09-11 07:36:25 +08:00
697e3e8eac Merge branch 'fix/click-port-compl_v5.1' into 'release/v5.1'
fix(tools): fix autocomplete for --port option (v5.1)

See merge request espressif/esp-idf!25874
2023-09-08 23:05:43 +08:00
4afb2a86e2 Merge branch 'backport_v5.1' into 'release/v5.1'
fix(bt/bluedroid): Fix memory no free issue when disconneting for mesh(backport v5.1)

See merge request espressif/esp-idf!25859
2023-09-08 20:39:49 +08:00
b717333177 Merge branch 'bugfix/reduce_bss_logging_v5.1' into 'release/v5.1'
wifi: Reduce BSS logging in wpa_supplicant

See merge request espressif/esp-idf!25825
2023-09-08 19:19:43 +08:00
4d8644bfa8 feat(freertos): Added SBOM manifest file for SPDX file generation
This commit adds the SBOM manifest file for the FreeRTOS-Kernel to aid
SPDX file generation.
2023-09-08 12:55:47 +02:00
797ec25a3f fix(wifi): Get passphrase in WPS if AP support SAE
Also add changes to send NACK if WPS message received twice.
2023-09-08 15:21:56 +05:30
9eceef649b Merge branch 'bugfix/esp32h2_update_desc_ecdsa_workmode_v5.1' into 'release/v5.1'
fix(soc/esp32h2): Update the description of the ECDSA_WORK_MODE (backport v5.1)

See merge request espressif/esp-idf!25818
2023-09-08 16:09:42 +08:00
27f84d88dc ble: support esp32c2 wakeup overhead 2023-09-08 15:52:23 +08:00
3d8c34efd5 feat(tools): remove gdb_panic_server and use just a wrapper for script
gdb_panic_server is now part of esp-idf-panic-decoder
2023-09-08 09:34:12 +02:00
b83a56512a fix(tools): fix autocomplete for --port option
Closes https://github.com/espressif/esp-idf/issues/7970
2023-09-08 09:25:33 +02:00
2c3c4adaa3 docs(docker): Update Using Remote Serial Port chapter
By default some shells such as zsh has NOMATCH option set (https://zsh.sourceforge.io/Doc/Release/Options.html).
The root cause of the problem is that while bash expands the parameter to itself if it does not match any filename, the zsh reports an error. IOW if we do % setopt nonomatch it will work even in zsh.

Closes https://github.com/espressif/esp-idf/issues/12060
2023-09-08 09:15:30 +02:00
9896ee353b ble: update esp32h2 and esp32c6 libble to a9fa2002 2023-09-08 14:27:48 +08:00
dff4ec6fbf fix(tools): extend error message for failed python module import
Currently idf.py reports just "Please use idf.py only in an ESP-IDF shell environment".
Sometimes it may be useful to know for which module the import failed.
Also the problem does not have to be related to shell environment only, but the
python venv can be corrupted. This adds a little bit more verbose error
message.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-09-08 07:29:43 +02:00
5f55496f51 feat(openthread): support BR deinit 2023-09-08 12:24:36 +08:00
0a6d6c085a feat(wdt): add LL functions for WDT on H2 2023-09-08 11:01:25 +08:00
03be63636a fix(bt/bluedroid): Fix memory no free issue when disconneting for mesh 2023-09-08 10:33:42 +08:00
ab7ad8a848 Merge branch 'bugfix/fix_some_ble_bugs_v5.1' into 'release/v5.1'
Fixed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!25776
2023-09-08 10:19:40 +08:00
b3717678c3 Merge branch 'docs/update_multi_antenna_switch_docs_v5.1' into 'release/v5.1'
Docs/update multi antenna switch docs v5.1(Backport v5.1)

See merge request espressif/esp-idf!25822
2023-09-08 10:18:43 +08:00
8d0858060a Merge branch 'feature/management_modem_etm_clock_indepently_v5.1' into 'release/v5.1'
feat(esp_hw_support): manage modem_etm clock in modem_clock for bt/154 indepently (backport v5.1)

See merge request espressif/esp-idf!25793
2023-09-08 10:16:59 +08:00
ef451cab0f Merge branch 'bugfix/sntp_cpp_compat_v5.1' into 'release/v5.1'
esp_netif: Fix invalid conversion from int to enumeration in c++ build (GitHub PR) (v5.1)

See merge request espressif/esp-idf!25041
2023-09-08 10:16:21 +08:00
5aa01470d5 ci(bt/bluedroid): Add CI build test for HFP examples with voice over HCI enabled 2023-09-08 00:52:07 +00:00
7e406acb95 feat(bt/api): Add new apis for hfp to get the numbers of packet status received and sent 2023-09-08 00:52:07 +00:00
26600a8fcf fix(bt/bluedroid): Deleted the redundant 'memset' in btc_hf_cb_handler 2023-09-08 00:52:07 +00:00
c6e62a9817 docs(bt/bluedroid): Changed the description of esp_hf_client_reject_call 2023-09-08 00:52:07 +00:00
2584ab84fc fix(bt/bluedroid): Fixed invalid access to freed semaphore 2023-09-08 00:52:07 +00:00
eed85adaeb fix(bt/bluedroid): Fixed wrong indexes of HF-AG indicators 2023-09-08 00:52:07 +00:00
71ec923e55 fix(bt/bluedroid): Added peer Bluetooth device address into HF callback parameters 2023-09-08 00:52:07 +00:00
7037ee47f9 fix(bt/bluedroid): Changed log level from WARNING to DEBUG in bta_ag_sco_read_cback 2023-09-08 00:52:07 +00:00
0167b14411 fix(bt/bluedroid): Fixed wrong code logic in 'AT+CIND?' of HFP 2023-09-08 00:52:07 +00:00
17d1b66d47 fix(bt/bluedroid): Fixed errors in parsing ATD command in HFP AG 2023-09-08 00:52:07 +00:00
19185a65fd fix(bt/bluedroid): Fixed NULL Bluetooth device address in HF-AG events was reported to application layer 2023-09-08 00:52:07 +00:00
c1d8013330 Merge branch 'bugfix/backport_phy_v5.1' into 'release/v5.1'
fix(phy): backport some phy fix(v5.1)

See merge request espressif/esp-idf!25734
2023-09-08 06:18:58 +08:00
752a99d3d1 Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/temp_sensor.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/temp_sensor.rst (backport v5.1)

See merge request espressif/esp-idf!25821
2023-09-07 18:05:02 +08:00
f0dec1b1a6 docs: provide CN translation for api-reference/peripherals/temp_sensor.rst (backport v5.1) 2023-09-07 18:05:01 +08:00
8254175931 wpa_supplicant: Fix for issue of wps-pbc overlap in wps-pin method 2023-09-07 15:14:35 +05:30
fefa61a7c7 Merge branch 'feature/esp_lcd_st7789_rgb_data_endian_config_v5.1' into 'release/v5.1'
feat(st7789): add data endian config (v5.1)

See merge request espressif/esp-idf!25802
2023-09-07 16:33:49 +08:00
zwl
325bf39c89 feat(ble): enable adv report flow control on esp32c2 2023-09-07 16:27:50 +08:00
zwl
615f9bd602 fix(ble): fixed crash when memory is insufficient on esp32c2 2023-09-07 16:27:42 +08:00
cbb2a3f8fa fix(esp32c6/power save): optimize the retention step of the APM and TEE modules to set only the critical parts that affect wifi data frame receipt to level 2 priority 2023-09-07 14:31:12 +08:00
648bc35612 feat(bt/bluedroid): Add setting local di record function for bt classic hid device bqb test 2023-09-07 14:18:03 +08:00
e29b67c02a fix(bt/bluedroid): Changed HID related copyright automatically 2023-09-07 14:17:42 +08:00
63bc27fb2d Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/adc_calibration.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/adc_calibration.rst (backport v5.1)

See merge request espressif/esp-idf!25820
2023-09-07 14:02:24 +08:00
3c0e72887a docs: provide CN translation for api-reference/peripherals/adc_calibration.rst (backport v5.1) 2023-09-07 14:02:24 +08:00
cbee3f67b2 Merge branch 'docs/add_Chinese_translation_for_api-guides/cplusplus.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-guides/cplusplus.rst (backport v5.1)

See merge request espressif/esp-idf!25755
2023-09-07 13:15:27 +08:00
36376e0eab docs: provide CN translation for api-guides/cplusplus.rst (backport v5.1) 2023-09-07 13:15:27 +08:00
397206d050 change(wifi): Reduce BSS logging in wpa_supplicant 2023-09-07 10:19:02 +05:30
01ebf0775e esp_wifi: update multi antenna switch docs 2023-09-07 11:06:28 +08:00
e0e3bbd042 esp_wifi: the antenna parameter of example is not correct 2023-09-07 11:06:18 +08:00
3874281107 update esp32 bt-lib (7b24543)
- Support BLE RX error packet count record
- Fixed instant setting for LLC procedures with instants
- Fixed adv random delay when adv interval is less than 20ms
2023-09-07 11:05:10 +08:00
c315a246e6 Update bt lib for ESP32-C3 and ESP32-S3(59725b5)
- Support BLE RX error packet count record
- Fixed adv random delay when adv interval is less than 20ms
- Fixed adv random address setting when owner address type is public
2023-09-07 11:05:10 +08:00
5b7fcd80d2 Update bt lib for ESP32-C3 and ESP32-S3(ff6efe7)
- fix(bt/controller): Fixed PHY enable and disable
- feat(bt/controller): Support DAA and LBT mode for BLE CCA
2023-09-07 11:05:10 +08:00
0f6a7ac7b1 fix(bt): Fix bugs about updating connect param 2023-09-07 11:05:10 +08:00
e3c5c4fb7b fix(bt): Fix bug while calculating block cipher using aes-128 2023-09-07 11:05:10 +08:00
98f59569b0 docs(bt): Update comment in ble 2023-09-07 11:05:10 +08:00
cc9c5b78b9 feat(bt/bluedroid): Support periodic adv adi feature 2023-09-07 11:05:09 +08:00
985f6a4892 fix(bt/bluedroid): Fixed BLE disconnect event report when disconnecting 2023-09-07 11:05:09 +08:00
9df464d7bb fix(bt/bluedroid): Fixed GATTC cache address save when list is full 2023-09-07 11:05:09 +08:00
35af1c03e2 feat(bt/bluedroid): Support high duty adv interval setting 2023-09-07 11:05:09 +08:00
52a0a10ef4 fix(bt/bluedroid): Fix address check when using NRPA as random device address 2023-09-07 11:05:09 +08:00
9aeafb006e fix(dhcp server): Fix dhcp server address pool issue 2023-09-07 10:35:52 +08:00
9ed6944c0d fix(soc/esp32h2): Update the description of the ECDSA_WORK_MODE 2023-09-07 10:34:36 +08:00
4a221b0346 Merge branch 'feature/ble_lib_update_h2_c6_v5.1' into 'release/v5.1'
ble: update h2 c6 libble to 5d7af429

See merge request espressif/esp-idf!25692
2023-09-07 10:25:18 +08:00
d22e640579 Merge branch 'bugfix/aes_dma_descriptor_setup_issue_v5.1' into 'release/v5.1'
fix(aes): correct the linking of the DMA descriptors (v5.1)

See merge request espressif/esp-idf!25784
2023-09-07 10:24:09 +08:00
9331e240fc fix(phy): backport some phy fix
1. WIFI RX multipath optimization for all chips
2. BLE TX sideband optimization for C3/S3
3. Optimize ht40 tx side band issue
2023-09-07 02:23:06 +00:00
98f4ce2011 Merge branch 'bugfix/fix_some_hci_cmd_param_check_v5.1' into 'release/v5.1'
fix(bt/controller): Fixed some HCI commands parameter check (Backport v5.1)

See merge request espressif/esp-idf!25712
2023-09-07 07:41:15 +08:00
94ad8f1a6a Merge branch 'feature/dynamic_services_v5.1' into 'release/v5.1'
Nimble: Add support for dynamic service addition / deletion (v5.1)

See merge request espressif/esp-idf!25742
2023-09-06 17:18:27 +08:00
9d535c05f7 feat(st7789): add data endian config
Closes https://github.com/espressif/esp-idf/issues/11416
2023-09-06 16:59:13 +08:00
d3bfaf8f5f feat(esp_hw_support): manage modem_etm clock in modem_clock for bt/154 indepently 2023-09-06 15:48:37 +08:00
8ff8486735 Merge branch 'fix/spi_polling_api_buslock_logic_v5.1' into 'release/v5.1'
fix(spi_master): polling_transmit forgot release bus lock when alloc DMA buffer failed (v5.1)

See merge request espressif/esp-idf!25576
2023-09-06 14:01:25 +08:00
5605189398 fix(aes): correct the linking of the DMA descriptors
For certain data lengths, the last input descriptor was not getting appended
correctly and hence the EOF flag in the DMA descriptor link list was
set at incorrect location. This was resulting in the peripheral being
stalled expecting more data and eventually the code used to timeout
waiting for the AES completion interrupt.

Required configs for this issue:

CONFIG_MBEDTLS_HARDWARE_AES
CONFIG_SOC_AES_SUPPORT_DMA

This observation is similar to the issue reported in:
https://github.com/espressif/esp-idf/issues/10647

To recreate this issue, start the AES-GCM DMA operation with data length
12280 bytes and this should stall the operation forever.

In this fix, we are tracing the entire descriptor list and then appending the
extra bytes descriptor at correct position (as the last node).
2023-09-06 08:28:43 +05:30
2fbe919e4c fix(aes-gcm): correct the DMA completion wait condition for hardware GCM case
DMA operation completion must wait until the last DMA descriptor
ownership has been changed to hardware, that is hardware is completed
the write operation for entire data. Earlier for the hardware GCM case,
the first DMA descriptor was checked and it could have resulted in some
race condition for non interrupt (MBEDTLS_AES_USE_INTERRUPT disabled) case.
2023-09-06 08:28:43 +05:30
c67381dce6 doc (nimble): Added Walkthrough tutorial for phy_cent example 2023-09-05 16:24:21 +05:30
1efe80af9b Merge branch 'feature/esp_lcd_panel_add_data_and_type_v5.1' into 'release/v5.1'
feat(esp_lcd): add user data and init cmd (v5.1)

See merge request espressif/esp-idf!25721
2023-09-05 16:09:39 +08:00
90da6ebfec change: print assert info before dump log 2023-09-05 15:10:54 +08:00
6f89300764 change: changed ble msys init for controller 2023-09-05 15:10:38 +08:00
d94c9d141b feat: added ble wake up overhead support 2023-09-05 15:10:38 +08:00
d3e8242db1 feat: Support esp32c2 BLE power save example 2023-09-05 15:10:38 +08:00
56894b1bca ble: update h2 c6 libble to 5d7af429 2023-09-05 15:10:38 +08:00
0954c0a231 Merge branch 'docs/add_Chinese_translation_for_api-guides/core_dump.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-guides/core_dump.rst and api-guides/core_dump_internals.rst (Backport v5.1)

See merge request espressif/esp-idf!25740
2023-09-05 14:44:29 +08:00
75e176fd21 docs: provide CN translation for api-guides/core_dump.rst and api-guides/core_dump_internals.rst (Backport v5.1) 2023-09-05 14:44:29 +08:00
1520984157 feat(nimble): Added support for dynamic services
Added support for dynamic services
2023-09-05 11:52:17 +05:30
54c81ddfc9 Merge branch 'feature/walkthrough_for_blecent_v5.1' into 'release/v5.1'
doc(nimble): Added the tutorial for blecent example. (v5.1)

See merge request espressif/esp-idf!25667
2023-09-05 14:15:23 +08:00
bf204d4150 Merge branch 'feature/adv_queue_congestion_v5.1' into 'release/v5.1'
feat(nimble): Added adv queue congestion check (v5.1)

See merge request espressif/esp-idf!25726
2023-09-05 14:14:35 +08:00
aec971572f Merge branch 'feature/specify_rmt_intr_priority_v5.1' into 'release/v5.1'
feat(rmt): specify interrupt priority (v5.1)

See merge request espressif/esp-idf!25718
2023-09-05 12:09:44 +08:00
537198b15d Merge branch 'docs/add_Chinese_translation_for_three_short_docs_of_api-guides_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for three short docs of api-guides (backport v5.1)

See merge request espressif/esp-idf!25743
2023-09-05 11:11:27 +08:00
ef5c85158d docs: provide CN translation for three short docs of api-guides (backport v5.1) 2023-09-05 11:11:27 +08:00
cc27c579ad Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/touch_element.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/touch_element.rst (backport v5.1)

See merge request espressif/esp-idf!25746
2023-09-05 10:22:17 +08:00
b93ffc1cb4 docs: provide CN translation for api-reference/peripherals/touch_element.rst (backport v5.1) 2023-09-05 10:22:16 +08:00
c9a51b83a5 Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/etm.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/etm.rst (backport v5.1)

See merge request espressif/esp-idf!25745
2023-09-05 10:21:18 +08:00
1e656013d7 docs: provide CN translation for api-reference/peripherals/etm.rst (backport v5.1) 2023-09-05 10:21:17 +08:00
1b87f35f0f Merge branch 'feature/support_ble_53_host_feat_v5.1' into 'release/v5.1'
Support BLE host feature for PTS (backport v5.1)

See merge request espressif/esp-idf!25645
2023-09-04 15:32:23 +08:00
2264828ae5 (doc) nimble: Added the tutorial for ble_periodic_adv and ble_periodic_syncexamples. 2023-09-04 11:45:29 +05:30
6983b86528 feat(nimble): Added adv queue congestion check 2023-09-04 11:25:20 +05:30
559df9640c feat(esp_lcd): add user data and init cmd 2023-09-04 13:25:39 +08:00
3b9c57ac32 feat(rmt): specify interrupt priority 2023-09-04 13:12:02 +08:00
f629029d4a fix(bt/controller): Fixed some HCI commands parameter check
Fixed HCI_Change_Connection_Packet_Type Command parameter check
Fixed HCI_Accpet_Synchronous_Connection_Request Command parameter check
Fixed HCI_Set_Connectionless_Peripheral_Broadcast_Data Command parameter check
2023-09-04 11:03:33 +08:00
f0437b945f Merge branch 'feature/esp32c2_add_trace_function_v5.1' into 'release/v5.1'
ble: supported trace function and adv report flow control on esp32c2

See merge request espressif/esp-idf!25640
2023-09-01 20:10:45 +08:00
865b48039d Merge branch 'feature/openthread_disable_nd6_timer_v5.1' into 'release/v5.1'
feat(openthread): disable lwip nd6 in openthread sleepy device (backport v5.1)

See merge request espressif/esp-idf!25631
2023-09-01 16:09:31 +08:00
a9aea676e7 Merge branch 'ci/connect_at_different_phase_v5.1' into 'release/v5.1'
ci(wifi): Test connect api at different phase (backports v5.1)

See merge request espressif/esp-idf!25674
2023-09-01 10:24:48 +08:00
9619d85027 Merge branch 'test/bqb_test_bt_classic_a2dp_v5.1' into 'release/v5.1'
feat(bt/bqb): Add setting SBC encoder and reject invalid codec type support for a2dp BQB test (backport v5.1)

See merge request espressif/esp-idf!25684
2023-09-01 10:21:15 +08:00
6aa9086206 fix(spi_master): polling_transmit forgot release bus lock when alloc DMA buffer failed
Close https://github.com/espressif/esp-idf/issues/11845
2023-08-31 21:15:14 +08:00
e10e95282d Merge branch 'fix/bp_wp_in_panic_v5.1' into 'release/v5.1'
fix(breakpoint): fix bp/wp logic when debugger is connected (v5.1)

See merge request espressif/esp-idf!25633
2023-08-31 19:50:11 +08:00
87135459a7 feat(bt/bqb): Set SBC encoder as PTS required for BQB test
1: set SBC encoder as PTS required. The encoder is effective first.
But it changes to default after media start.
2023-08-31 19:11:43 +08:00
4ea52074b4 fix(bt/avdtp): Reject SET CONFIGURATION command with error code INVALID_CODEC_TYPE
1: reset p_scb->avdt_handle in cleanup function.
2: cancel comparing p_scb->codec_type and p_scb->seps[xx].codec_type to
   send the error INVALID_CODEC_TYPE.
2023-08-31 19:11:43 +08:00
9ba0647a8f Merge branch 'dependency_check_fix_v5.1' into 'release/v5.1'
bug(tools): dependency check catch exception when package not installed (v5.1)

See merge request espressif/esp-idf!25656
2023-08-31 18:22:52 +08:00
4988c1a3d1 feat(openthread): add mesh local prefix configuration 2023-08-31 17:08:41 +08:00
f7fd03a79a fix(openthread): fix openthread settings get next empty index 2023-08-31 17:08:27 +08:00
3f2ff9af34 bugfix(esp_phy): fix using wrong macro 2023-08-31 17:08:16 +08:00
23a38f0f6f bug(tools): dependency check catch exception when package not installed 2023-08-31 10:24:06 +02:00
38b0cb6e98 doc(nimble): Added tutorial for the blecent example. 2023-08-31 11:22:08 +05:30
71083039f6 Merge branch 'bugfix/esp32c6_udp_bc_mc_rx_loss_rate_is_high_v5.1' into 'release/v5.1'
backport v5.1: fix esp32c6 UDP BC/MC RX loss rate is high when light sleep is enabled

See merge request espressif/esp-idf!25628
2023-08-31 13:28:48 +08:00
zwl
bd21c215c7 ble: supported trace function and adv report flow control on esp32c2 2023-08-31 12:02:00 +08:00
b58706c1d2 Merge branch 'feature/support_hp_regi2c_for_esp32c6_v5.1' into 'release/v5.1'
feat(esp_rom): support hp regi2c for esp32c6(backport v5.1)

See merge request espressif/esp-idf!25644
2023-08-31 10:49:58 +08:00
b3011ed759 Merge branch 'feature/coredump_panic_details_v5.1' into 'release/v5.1'
feat(coredump): add panic details to the elf file (v5.1)

See merge request espressif/esp-idf!25597
2023-08-30 22:23:41 +08:00
d0c5c2e13a ci(wifi): Test connect api at different phase 2023-08-30 17:04:26 +08:00
61cb60c6af Merge branch 'bugfix/fix_ieee802154_test_issue_v5.1' into 'release/v5.1'
fix(ieee802154): fix ieee802154_test issue(backport 5.1)

See merge request espressif/esp-idf!25630
2023-08-30 15:13:20 +08:00
5fa0d2a83d Merge branch 'contrib/github_pr_9694_v5.1' into 'release/v5.1'
add low power doc and picture (GitHub PR)(backport v5.1)

See merge request espressif/esp-idf!25590
2023-08-30 14:56:31 +08:00
b3860800ae bluedroid: add GATT read multi variable API and evt 2023-08-30 14:50:21 +08:00
e451b967d6 bluedroid: add periodic adv sync transfer API and EVT 2023-08-30 14:50:21 +08:00
97dd2dc88e bluedroid: support gatts show local database 2023-08-30 14:50:21 +08:00
05cd295a28 fix(esp_rom): fix esp32c6, esp32h2 hp_regi2c ops data conflict with phy ops 2023-08-30 14:28:55 +08:00
d2730608d2 feature(esp_rom): support_hp_regi2c_for_esp32c6 2023-08-30 14:28:37 +08:00
be7cf3dffb Merge branch 'bugfix/fix_adc_continuous_driver_isr_flag_issue_v5.1' into 'release/v5.1'
adc: fix continuous hal func not in iram when gdma isr iram (v5.1)

See merge request espressif/esp-idf!25505
2023-08-30 10:51:36 +08:00
1c27df8189 fix(breakpoint): fix bp/wp logic when debugger is connected 2023-08-29 12:32:06 +02:00
0a17c0831e feat(openthread): disable lwip nd6 in openthread sleepy device 2023-08-29 17:35:27 +08:00
b1a946dd60 fix(ieee802154): fix ieee802154_test issue
* pti do not set in ieee802154 test
* ack_time_out do not using in ieee802154 test
2023-08-29 16:49:41 +08:00
6e852f86d9 fix(esp32c6/power save): improve TEE and APM module retention priority to 2 to avoid the wifi fail to read the rxbuf link and trigger the rxbuf overflow error 2023-08-29 16:30:02 +08:00
8e6bf6c3a0 Merge branch 'feat/add_high_duty_adv_interval_v5.1' into 'release/v5.1'
feat(nimble): Added support for high duty adv interval (v5.1)

See merge request espressif/esp-idf!25553
2023-08-29 14:51:45 +08:00
df8a4d3335 Merge branch 'feature/configurable_gcov_task_size_v5.1' into 'release/v5.1'
feat(gcov): make gcov dump task size configurable (v5.1)

See merge request espressif/esp-idf!25600
2023-08-29 09:43:51 +08:00
568c397822 feat(coredump): add panic details to the elf file 2023-08-28 18:48:16 +02:00
8f51aee8fa feat(nimble): Added support for high duty adv interval 2023-08-28 17:53:16 +05:30
81ae481d7f Merge branch 'feat/add_set_data_related_addr_change_cmd_v5.1' into 'release/v5.1'
feat(nimble): Add support for LE Data Set Related Address Change command (v5.1)

See merge request espressif/esp-idf!25583
2023-08-28 20:21:50 +08:00
09954c1d29 Merge branch 'feature/config_device_name_in_eir_v5.1' into 'release/v5.1'
feat(bt/bluedroid): Add option whether to include device name in extended inquiry response

See merge request espressif/esp-idf!25541
2023-08-28 19:02:07 +08:00
261af82d1f Merge branch 'bugfix/ble_hci_issues_chain_mbuf_v5.1' into 'release/v5.1'
fix hci issues when chain mbuf exists

See merge request espressif/esp-idf!25532
2023-08-28 18:39:37 +08:00
c300ef7efa feat(gcov): make gcov dump task size configurable 2023-08-28 12:01:49 +02:00
2fa873408c docs: update power save part 2023-08-28 14:08:02 +08:00
164d5df66a add low power doc and picture
Merges https://github.com/espressif/esp-idf/pull/9694
2023-08-28 14:07:45 +08:00
d3f2e4dab5 Merge branch 'fix/esp_prov_recent_changes_v5.1' into 'release/v5.1'
fix(esp_prov): update devices tuple usage due to API deprecations (v5.1)

See merge request espressif/esp-idf!25536
2023-08-28 14:07:35 +08:00
3eed68cc9c Merge branch 'bugfix/update_supplicant_copyrights_v5.1' into 'release/v5.1'
Update copyright info for wpa_supplicant (v5.1)

See merge request espressif/esp-idf!25526
2023-08-28 13:49:25 +08:00
8da2c57889 Merge branch 'feature/mcpwm_interrupt_prioity_v5.1' into 'release/v5.1'
feat(MCPWM): Support set interrupt priority(v5.1)

See merge request espressif/esp-idf!25573
2023-08-28 11:21:55 +08:00
2a80451b24 Merge branch 'feature/add_mcpwm_carrier_clk_source_v5.1' into 'release/v5.1'
feat(MCPWM): Add mcpwm carrier clk source(v5.1)

See merge request espressif/esp-idf!25572
2023-08-28 11:11:04 +08:00
dabbc8b70e Merge branch 'feature/pcnt_interrupt_prioity_v5.1' into 'release/v5.1'
feat(pcnt): support set interrupt priority(v5.1)

See merge request espressif/esp-idf!25575
2023-08-28 10:58:25 +08:00
4299b9346b Merge branch 'bugfix/supplicant_osi_violation_v5.1' into 'release/v5.1'
Fix abstraction violation in wpa_supplicant (Backport v5.1)

See merge request espressif/esp-idf!25565
2023-08-28 10:30:37 +08:00
b20c3f8a79 Merge branch 'bugfix/remove_deprecated_err_code_v5.1' into 'release/v5.1'
fix(bt): Removed an incorrectly defined HCI error code (5.1)

See merge request espressif/esp-idf!25288
2023-08-28 10:30:00 +08:00
88e436f85a Merge branch 'feature/add_ci_for_esp_wifi_powersave_example_v5.1' into 'release/v5.1'
ci(wifi): add pytest case for wifi powersave example (backport v5.1)

See merge request espressif/esp-idf!25499
2023-08-28 10:28:44 +08:00
99a80eddc3 Merge branch 'ci/fix_example_test_advanced_ota_v5.1' into 'release/v5.1'
ci(fix): example test advanced_https_ota_example_bluedroid_gatts (v5.1)

See merge request espressif/esp-idf!25524
2023-08-28 10:26:31 +08:00
609ac084c5 Merge branch 'feature/esp_lcd_spi_support_quad_mode_v5.1' into 'release/v5.1'
esp_lcd: spi support quad mode (v5.1)

See merge request espressif/esp-idf!25561
2023-08-28 10:26:17 +08:00
4a7cbc9b96 Merge branch 'feat/update_cjson_submodule_v5.1' into 'release/v5.1'
feat: Update cJSON version to v1.7.16 (v5.1)

See merge request espressif/esp-idf!25137
2023-08-28 10:25:14 +08:00
69d0872cd6 Merge branch 'docs/fatfs_add_api_reference_v5.1' into 'release/v5.1'
docs(fatfs): Move mentioned APIs to a separate API reference section (v5.1)

See merge request espressif/esp-idf!25349
2023-08-28 10:24:53 +08:00
de4d72c5b5 Merge branch 'bugfix/ccmp_decrypt_log_v5.1' into 'release/v5.1'
esp_wifi: Move ccmp mgmt enc/decrypt logs to verbose (v5.1)

See merge request espressif/esp-idf!25168
2023-08-28 10:24:20 +08:00
3a34b768a9 Merge branch 'contrib/github_pr_12039_v5.1' into 'release/v5.1'
docs(iperf): Update documentation with console interface details(v5.1)

See merge request espressif/esp-idf!25512
2023-08-28 10:23:59 +08:00
6e403fb140 Merge branch 'docs/add_protocomm_trans_backport_v5.1' into 'release/v5.1'
Docs: add CN translation for api-reference/provisioning/protocomm.rst (backport v5.1)

See merge request espressif/esp-idf!25037
2023-08-28 10:23:21 +08:00
67f59c8ddb Docs: add CN translation for api-reference/provisioning/protocomm.rst (backport v5.1) 2023-08-28 10:23:21 +08:00
fae05ace21 Merge branch 'bugfix/fix_duplicate_disable_compile_issue_backport_5_1' into 'release/v5.1'
bugfix(ble): Fix compile issue when disable duplicate config option in kconfig.

See merge request espressif/esp-idf!25177
2023-08-28 10:22:50 +08:00
d7020c02f4 Merge branch 'backport_v5.1' into 'release/v5.1'
fix(bt): Fix ble periodic advertising data length 0 error(backport v5.1)

See merge request espressif/esp-idf!25005
2023-08-28 10:22:11 +08:00
60143c7f68 Merge branch 'bugfix/fix_idfgh_10045_v5.1' into 'release/v5.1'
Bluedroid: fixed compile warning when optimize for performance (backport v5.1)

See merge request espressif/esp-idf!24844
2023-08-28 10:21:37 +08:00
5a25786a8a Merge branch 'bugfix/lp_i2c_bugfixes_v5.1' into 'release/v5.1'
Fixed multiple LP I2C bugs (v5.1)

See merge request espressif/esp-idf!25277
2023-08-28 10:20:40 +08:00
2baf418119 feat(nimble): Add support for LE Data Set Related Address Change command 2023-08-26 20:42:40 +05:30
ce6d7ba1bb Merge branch 'feature/default_clock_source_can_leave_empty_v5.1' into 'release/v5.1'
feat(mcpwm): default clock source setting can leave empty (v5.1)

See merge request espressif/esp-idf!25548
2023-08-26 17:52:21 +08:00
cd979e293c Merge branch 'bugfix/usb/host/urb_compliance_verification_add_v5.1' into 'release/v5.1'
[USB Host] added URB check args and transfer check compliance for regular EP transfer submit (v5.1)

See merge request espressif/esp-idf!25467
2023-08-25 23:17:32 +08:00
6a859a6cc5 fix(bt): Removed an incorrectly defined HCI error code 2023-08-25 11:54:39 +00:00
92cc9fca07 feat(pcnt): support set interrupt priority 2023-08-25 17:47:52 +08:00
d3aba34baa feat(MCPWM): Support set interrupt priority 2023-08-25 17:41:31 +08:00
c240a1f46b feat(MCPWM): Add mcpwm carrier clk source
The MCPWM carrier is part of the operator and can work independently
without the MCPWM timer being enabled. This commit add the MCPWM
carrier clk source.
2023-08-25 17:34:58 +08:00
c15472b12e fix(supplicant): Fix abstraction violation in wpa_supplicant 2023-08-25 12:30:44 +05:30
06a4943e41 Merge branch 'fix/bin_names_with_dots_v5.1' into 'release/v5.1'
fix(build_system): Allow dots in the name of an app binary (backport v5.1)

See merge request espressif/esp-idf!25276
2023-08-25 14:42:32 +08:00
c8970d8205 Merge branch 'feature/requires_hints_v5.1' into 'release/v5.1'
feat(tools): show hints for component dependencies (v5.1)

See merge request espressif/esp-idf!25386
2023-08-25 14:28:13 +08:00
84e5d91b4e Merge branch 'docs/uninstall_idf_v5.1' into 'release/v5.1'
docs(idf-tools): Add uninstallation instructions (backport v5.1)

See merge request espressif/esp-idf!25494
2023-08-25 14:27:54 +08:00
88c5511503 Merge branch 'bugfix/ps_export_extra_paths_v5.1' into 'release/v5.1'
tools: export.ps1: define functions for helper python tools (v5.1)

See merge request espressif/esp-idf!25139
2023-08-25 14:26:05 +08:00
a1be2f3613 Merge branch 'bugfix/sbom_hash_check_v5.1' into 'release/v5.1'
fix(test_submodules.py): don't rely on submodule init (v5.1)

See merge request espressif/esp-idf!25057
2023-08-25 14:21:18 +08:00
e7722dc79e Merge branch 'bugfix/debug_ext_ctrl_c_v5.1' into 'release/v5.1'
tools: fix waiting on gdb process when interrupted with CTRL+C (v5.1)

See merge request espressif/esp-idf!24933
2023-08-25 14:20:40 +08:00
50e098d5e2 Merge branch 'ci/update_pre_commit_copyright_checker_v5.1' into 'release/v5.1'
ci(pre-commit): Use the newest copyright checker (v5.1)

See merge request espressif/esp-idf!24907
2023-08-25 14:20:04 +08:00
cc380696e4 Merge branch 'docs/monitor_rom_address_decoding_v5.1' into 'release/v5.1'
docs(esp_idf_monitor): ROM ELF address decoding (backport v5.1)

See merge request espressif/esp-idf!24856
2023-08-25 14:19:44 +08:00
3c9f407c1d feat(esp_lcd): spi add support for quad mode 2023-08-25 14:18:31 +08:00
f96a9ad84c feat(esp_lcd): rgb add callback when bounce buffer finish 2023-08-25 14:18:31 +08:00
0624d5e58f esp_wifi: Make enterprise support configurable to save binary size. 2023-08-25 11:20:58 +05:30
6503758ec0 ble: Assert when getting memory fail 2023-08-25 12:25:33 +08:00
01fbc285b0 ble: Fix hci issues when chain mbuf exists 2023-08-25 12:25:11 +08:00
9080a7ac7c Merge branch 'bugfix/fix_legacy_adc_continuous_driver_dma_descriptor_not_internal_issue_v5.1' into 'release/v5.1'
adc: fixed legacy adc continuous driver dma descriptor not in internal ram issue (v5.1)

See merge request espressif/esp-idf!25508
2023-08-25 10:38:09 +08:00
860e0477ee Merge branch 'bugfix/fix_adc_filter_acquire_logic_v5.1' into 'release/v5.1'
adc: fix adc filter driver acquire logic (v5.1)

See merge request espressif/esp-idf!25507
2023-08-25 10:37:05 +08:00
842f5385a3 feat(mcpwm): default clock source setting can leave empty 2023-08-25 10:29:57 +08:00
48052e4d1f Merge branch 'bugfix/fix_current_issue_after_ble_init_5.1' into 'release/v5.1'
ble: move phy enabled/disable to controller enable/disable

See merge request espressif/esp-idf!25081
2023-08-25 10:25:11 +08:00
3d8744476b fix(adc): invalid assertion on the adc_unit 2023-08-25 10:18:03 +08:00
9332a31d27 Merge branch 'bugfix/usb_hcd_interrupt_alloc_error_return_v5.1' into 'release/v5.1'
USB Host: Fix coverity issues with hcd_install() (v5.1)

See merge request espressif/esp-idf!25463
2023-08-24 22:48:00 +08:00
f0cd979746 Merge branch 'lwip/dhcp_client_fix_forwardportV5.1' into 'release/v5.1'
Fix: Added check to ensure safe restart of dhcp fine timer (v5.1)

See merge request espressif/esp-idf!24706
2023-08-24 21:03:17 +08:00
920ca1c882 Merge branch 'contrib/github_pr_11923_v5.1' into 'release/v5.1'
fix(esp-tls): fix pointer cast and condition for CONFIG_ATECC608A_TCUSTOM (GitHub PR) (v5.1)

See merge request espressif/esp-idf!25500
2023-08-24 20:08:48 +08:00
6340713fef feat(bt/bluedroid): Add option whether to include device name in extended inquiry response 2023-08-24 19:37:35 +08:00
9396753e1a Merge branch 'feature/enc_adv_data_v5.1' into 'release/v5.1'
NimBLE: Added support of encrypted advertising data (v5.1)

See merge request espressif/esp-idf!25325
2023-08-24 19:12:55 +08:00
c3987d2163 Merge branch 'test/bqb_test_bt_classic_spp_rfcomm_5.1' into 'release/v5.1'
feat(bt/bqb): Add BQB enabling and rfcomm msc command sending support (backport v5.1)

See merge request espressif/esp-idf!25091
2023-08-24 18:59:15 +08:00
667493584c Merge branch 'bugfix/fix_psram_size_doc_s3_v5.1' into 'release/v5.1'
doc: update s3 psram vaddr max range size (v5.1)

See merge request espressif/esp-idf!25503
2023-08-24 17:36:48 +08:00
7b961d7734 fix(esp_prov): update devices tuple usage due to API deprecations
- a recent commit fixed the API deprecations,
and the BLEDevice object now needs to be accessed through a tuple.
- thus the changes were made in the code wherein the object was used,
but updating the usage in the condition when de
vname is not None got skipped.
2023-08-24 14:48:25 +05:30
2de3e90c21 Merge branch 'feature/periodic_adv_enhancement_v5.1' into 'release/v5.1'
NimBLE : Added periodic Adv Feature Updates in BLE 5.3 (v5.1)

See merge request espressif/esp-idf!25489
2023-08-24 17:14:43 +08:00
eca9a818c5 Merge branch 'feature/add_duplicate_excep_list_vsc_v5.1' into 'release/v5.1'
feat(mesh): Add support for Duplicate Exception list update VSC for Nimble (v5.1)

See merge request espressif/esp-idf!25131
2023-08-24 17:13:57 +08:00
0c4ac54fcf Merge branch 'bugfix/fix_pcl_set_rssi_vsc_v5.1' into 'release/v5.1'
fix(nimble): Add API to send pcl set rssi vsc (v5.1)

See merge request espressif/esp-idf!25434
2023-08-24 17:13:25 +08:00
79d403a713 Merge branch 'bugfix/esp_timer_prevents_delay_for_isr_dispatch_callbacks_v5.1' into 'release/v5.1'
fix(esp_timer): Fix delay in ISR dispatch callbacks (v5.1)

See merge request espressif/esp-idf!25471
2023-08-24 14:54:19 +08:00
4d044ab25d Merge branch 'bugfix/v5.1_ble_issues_bugfix_c2' into 'release/v5.1'
update btlib to f9db7b90, some esp32c2 issues bugfixed

See merge request espressif/esp-idf!25433
2023-08-24 14:13:39 +08:00
ccfa68c827 Merge branch 'feat/psram_support_d2wd_single_clk_u4wdh_v5.1' into 'release/v5.1'
spiram: Add support for U4WDH, and fixed D0WD/D2WD cannot share CLK pins (v5.1)

See merge request espressif/esp-idf!25171
2023-08-24 12:49:46 +08:00
a22ba76f33 change(esp_wifi): Update copyright info for wpa_supplicant 2023-08-24 10:05:39 +05:30
0a3ab5863a ci(fix): example test advanced_https_ota_example_bluedroid_gatts 2023-08-24 12:24:50 +08:00
d42d86b369 bugfix: avoid warning in espcoredump when log disabled 2023-08-24 04:17:33 +00:00
5758b66a9f Merge branch 'ci/fix_test_switch_ota_v5.1' into 'release/v5.1'
fix(app_update): Fix CI test_switch_ota by increasing deepsleep (v5.1)

See merge request espressif/esp-idf!25465
2023-08-24 12:16:51 +08:00
240f420f1a feat: Update cJSON version to v1.7.16
Changelog: https://github.com/DaveGamble/cJSON/releases/tag/v1.7.16
2023-08-24 04:14:08 +00:00
3c41beee68 Merge branch 'bugfix/l2cap_coc_more_one_pkt_v5.1' into 'release/v5.1'
NimBLE: Fixed crash when L2CAP COC sends large amount of data. (v5.1)

See merge request espressif/esp-idf!25059
2023-08-24 12:04:21 +08:00
29a38ceeca usb_host: added URB check args and transfer check compliance for regular EP transfer submit 2023-08-24 12:02:49 +08:00
6b585fe542 usb_host: Fix coverity issues with hcd_install()
- Use single "err_ret" variable for returning errors
- Simplify bail out procedure by using more labels
2023-08-24 12:01:50 +08:00
9dbefdbb41 Merge branch 'refactor/usb_host_usbh_interface_v5.1' into 'release/v5.1'
USB Host: Refactor USBH interface (v5.1)

See merge request espressif/esp-idf!24210
2023-08-24 11:16:02 +08:00
c7a7bb62c6 esp_wifi: Move ccmp mgmt enc/decrypt logs to verbose 2023-08-24 03:11:42 +00:00
8b6957a99c test(adc): continuous driver iram test with gdma iram safe option only 2023-08-24 11:04:43 +08:00
879b5d4401 fix(adc): fix adc continuous hal func not in iram when gdma isr iram 2023-08-24 11:04:43 +08:00
927183e744 Merge branch 'docs/add_CN_trans_for_contribute/index.rst_backport_v5.1' into 'release/v5.1'
docs:Provide CN translation for contribute/index.rst_backport_v5.1

See merge request espressif/esp-idf!25270
2023-08-24 10:52:29 +08:00
a66f61e33f Merge branch 'feature/usb_host_restrict_ahb_errata_workaround_to_esp32s2_eco0_v5.1' into 'release/v5.1'
USB Host: Restrict ESP32-S2 AHB errata workaround to only ECO0 chips (v5.1)

See merge request espressif/esp-idf!25054
2023-08-24 10:12:48 +08:00
3a79e3694c Merge branch 'bugfix/twai_install_returns_error_on_intr_alloc_fail_v5.1' into 'release/v5.1'
TWAI: twai_driver_install() returns error on interrupt allocation failure (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24823
2023-08-24 10:11:57 +08:00
0bd405be7b Merge branch 'feature/modbus_add_support_esp32h2_v51' into 'release/v5.1'
examples: modbus add support for target esp32h2 (Backport v5.1)

See merge request espressif/esp-idf!24970
2023-08-24 10:10:44 +08:00
3cc358102b Merge branch 'bugfix/i80_lcd_reset_gpio_config_v5.1' into 'release/v5.1'
fix(i80_lcd): reset cs gpio on exit (v5.1)

See merge request espressif/esp-idf!25243
2023-08-24 10:08:03 +08:00
ed6e997d4c Merge branch 'feature/gptimer_interrupt_priority_v5.1' into 'release/v5.1'
feat(gptimer): support set interrupt priority (v5.1)

See merge request espressif/esp-idf!25199
2023-08-24 10:07:48 +08:00
54ef954292 Merge branch 'contrib/github_pr_11878_v5.1' into 'release/v5.1'
feat(mcpwm): Allow for pull up/down to be configurable on generators (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24893
2023-08-24 10:07:35 +08:00
fad1874ae2 Merge branch 'docs/add_Chinese_translation_for_api-guides_hardware-abstraction.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN tranlsation for api-guides/hardware-abstraction.rst (backport v5.1)

See merge request espressif/esp-idf!25045
2023-08-24 10:06:39 +08:00
faf5941978 Merge branch 'docs/add_Chinese_translation_for_api-guides/performance/ram-usage.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-guides/performance/ram-usage.rst (backport v5.1)

See merge request espressif/esp-idf!25038
2023-08-24 10:05:57 +08:00
9838675d3b Merge branch 'bugfix/intr_flags_to_level_v5.1' into 'release/v5.1'
fix(intr_flags_to_level): fix value returned one more than correct value (v5.1)

See merge request espressif/esp-idf!25424
2023-08-24 08:34:37 +08:00
36abbe8fc8 Merge branch 'docs/get_started_h2_v5.1' into 'release/v5.1'
docs: add H2 to list of supported series to front page doc (v5.1)

See merge request espressif/esp-idf!25042
2023-08-24 08:10:09 +08:00
f41df5641a Merge branch 'bugfix/gptimer_hal_placement_wrong_condition_v5.1' into 'release/v5.1'
fix(gptimer): hal function placement under wrong condition (v5.1)

See merge request espressif/esp-idf!25280
2023-08-23 23:21:20 +08:00
59a06a8ad2 fix: Added check to ensure safe restart of dhcp fine timer 2023-08-24 00:51:36 +10:00
d57466da3c feat(nimble): Added periodic Adv Feature Updates in BLE 5.3 2023-08-23 18:53:51 +05:30
db5b50af2c NimBLE: Added support of encrypted advertising data 2023-08-23 18:18:23 +05:30
64926fd137 Merge branch 'doc_5.1/c2_h2_c6' into 'release/v5.1'
c2 h2 c6 headfile re-organized

See merge request espressif/esp-idf!25079
2023-08-23 20:18:31 +08:00
4b512c5e7b fix(nimble): Add API to send pcl set rssi vsc 2023-08-23 17:43:22 +05:30
b638cb3335 Merge branch 'bringup/esp32h2_deep_sleep_for_rebase_v5.1' into 'release/v5.1'
esp32h2: support deep_sleep(backport v5.1)

See merge request espressif/esp-idf!24962
2023-08-23 20:12:01 +08:00
acc08b9421 feat(mesh): Add support for Duplicate Exception list update VSC for
Nimble
2023-08-23 17:41:18 +05:30
6e3c700bf6 Merge branch 'bugfix/handle_NULL_data_periodic_adv_v5.1' into 'release/v5.1'
fix(nimble): Add check to set length only if data is valid in periodic adv (v5.1)

See merge request espressif/esp-idf!25178
2023-08-23 20:09:13 +08:00
4fc363546e Merge branch 'bugfix/netif_default_sta_init_v5.1' into 'release/v5.1'
wifi: Fix default wifi-netif creation to assert if no event loop (v5.1)

See merge request espressif/esp-idf!25344
2023-08-23 19:57:06 +08:00
5b3ed2f794 docs(iperf): Update documentation with console interface details
Closes https://github.com/espressif/esp-idf/pull/12039
2023-08-23 19:54:54 +08:00
372a34f6d5 Merge branch 'fix/wifi_wps_pbc_overlap_v5.1' into 'release/v5.1'
fix(wpa_supplicant): Add support to detect PBC overlap in wps registrar mode (Backport v5.1)

See merge request espressif/esp-idf!25440
2023-08-23 19:54:50 +08:00
43d6f90d72 Merge branch 'bugfix/ignore_eapol_nonkey_v5.1' into 'release/v5.1'
Ignore EAPOL non-key frames in EAPOL txdone callback (Backport v5.1)

See merge request espressif/esp-idf!25453
2023-08-23 19:54:14 +08:00
5256c317f9 Merge branch 'bugfix/role_switch_enc_mode_lmp_timeout_v5.1' into 'release/v5.1'
bt: Fix disconnection due to lmp messages not being processed by both sides(v5.1)

See merge request espressif/esp-idf!25202
2023-08-23 19:53:29 +08:00
c57e42471c Merge branch 'bugfix/fix_variable_type_v5.1' into 'release/v5.1'
fix(bt): Fix argument type of ESP_LOGI for spp examples about format error (backport v5.1)

See merge request espressif/esp-idf!25324
2023-08-23 19:52:25 +08:00
d00077e5a9 Merge branch 'bugfix/incr_sdp_max_conns_v5.1' into 'release/v5.1'
fix(bt): Increased SDP maximum connections to avoid connection exhausted (v5.1)

See merge request espressif/esp-idf!25429
2023-08-23 19:51:39 +08:00
71f2f98b60 adc: fixed legacy adc continuous driver dma descriptor not in internal ram issue 2023-08-23 19:44:25 +08:00
888ccfe0cb adc: added adc filter exhausted allocation test 2023-08-23 19:41:15 +08:00
628162d71e adc: fix adc filter acquire logic 2023-08-23 19:41:02 +08:00
1fc5a5a3a4 NimBLE: Fixed crash when L2CAP COC sends large amount of data. 2023-08-23 11:15:12 +00:00
83bab7591e doc: update s3 psram vaddr max range size 2023-08-23 19:10:58 +08:00
13f261a8ea Merge branch 'docs/add_Chinese_translation_for_api-guides/openthread.rst_backport_v5.1' into 'release/v5.1'
provide CN translation for api-guides/openthread.rst (backport v5.1)

See merge request espressif/esp-idf!25048
2023-08-23 19:09:08 +08:00
60164a230c provide CN translation for api-guides/openthread.rst (backport v5.1) 2023-08-23 19:09:07 +08:00
842eb0ffd4 Merge branch 'doc/update_kconfig_example_ext_adv_usage_v5.1' into 'release/v5.1'
doc(nimble): Update Kconfig help section for Example Ext Adv (v5.1)

See merge request espressif/esp-idf!24913
2023-08-23 19:03:37 +08:00
1360b5fa83 fix(esp-tls): fix pointer cast and condition for CONFIG_ATECC608A_TCUSTOM
Closes https://github.com/espressif/esp-idf/pull/11923
2023-08-23 15:49:56 +05:30
a6b5c93ed5 Merge branch 'esp_prov/update_deprecation_warnings_v5.1' into 'release/v5.1'
fix(esp_prov): Fixed the deprecation APIs warnings (v5.1)

See merge request espressif/esp-idf!25150
2023-08-23 18:18:59 +08:00
4d95619595 Merge branch 'fix/mmu_hal_valid_vaddr_check_v5.1' into 'release/v5.1'
fix(hal): Fix the external memory vaddr region validity check (v5.1)

See merge request espressif/esp-idf!25154
2023-08-23 18:17:53 +08:00
10e100f584 Merge branch 'feature/update_mbedtls_v5.1' into 'release/v5.1'
feat(mbedtls): Update to release/v3.4.1 (v5.1)

See merge request espressif/esp-idf!25394
2023-08-23 18:17:20 +08:00
75692c96e2 Merge branch 'feature/support_mbedtls_ecp_fixed_point_configurable_v5.1' into 'release/v5.1'
feat(mbedtls): support ecp fixed-point multiplication configurable (backport v5.1)

See merge request espressif/esp-idf!25286
2023-08-23 18:16:20 +08:00
a1defb4fd9 Merge branch 'feature/wifi_prov_event_security_session_v5.1' into 'release/v5.1'
wifi_prov: Exposed events for secure session establishment and credential mismatch (v5.1)

See merge request espressif/esp-idf!25474
2023-08-23 18:16:07 +08:00
0f849d4c40 Merge branch 'bugfix/secure_ota_without_padding_v5.1' into 'release/v5.1'
fix(secure_ota): secure app verification issue without padding bytes (v5.1)

See merge request espressif/esp-idf!25211
2023-08-23 18:15:30 +08:00
1d0b4ceeef ci(wifi): add wifi powersave pytest case 2023-08-23 18:02:03 +08:00
b9186e7b22 feat(esp_wifi): support get AP info from stdin in wifi powersave example 2023-08-23 18:00:48 +08:00
c517a15dd2 fix(light_sleep): shouldn't backup uart fifo reg in pd_top light sleep 2023-08-23 18:00:48 +08:00
fa806d758a ble: move phy enabled/disable to controller enable/disable 2023-08-23 17:56:33 +08:00
6cca4bddd2 Merge branch 'bugfix/esp32c6_heap_corruption_v5.1' into 'release/v5.1'
Bugfix/esp32c6 heap corruption v5.1

See merge request espressif/esp-idf!25333
2023-08-23 17:52:31 +08:00
3a3c9a73f0 docs: Update CN translation for get-started/index.rst 2023-08-23 11:19:43 +02:00
4e88f767cd docs(idf-tools): Add uninstallation instructions 2023-08-23 11:19:33 +02:00
d710a83982 Merge branch 'bugfix/sha_dma_mode_incorrect_result_v5.1' into 'release/v5.1'
fix(sha): DMA mode iteration calculation issue for certain data lengths (v5.1)

See merge request espressif/esp-idf!25127
2023-08-23 17:11:44 +08:00
99d0cff1ba docs: Provide CN translation for contribute/index.rst 2023-08-23 15:48:42 +08:00
f35959d7d1 ble: update btlib to f9db7b90, some esp32c2 issues bugfixed 2023-08-23 10:21:20 +08:00
a0da805f2b fix(hal): Fix the external memory vaddr region validity check
- For c6 and h2, the vaddr end calculated was off by 1
  byte.
2023-08-22 15:24:02 +05:30
9d905d18bb wifi_prov: Fix build issue when building only for sec1 or sec2 2023-08-22 15:21:48 +05:30
fcb98e5851 wifi_prov: Exposed events for secure session establishment 2023-08-22 15:21:48 +05:30
c93310956a refactor(esp_timer): Remove duplicate code and move it to a common file 2023-08-22 17:22:24 +08:00
eef3a90871 fix(esp_timer): Fix delay in ISR dispatch callbacks
Set the following alarm before calling the alarm handler.

Closes https://github.com/espressif/esp-idf/pull/11637
Closes https://github.com/espressif/esp-idf/issues/11636
2023-08-22 17:22:24 +08:00
d521b7d52a fix(examples): Fix example build errors caused by the deep_sleep funcs are returnable 2023-08-22 16:17:32 +08:00
7ac7d43541 fix(app_update): Fix CI test_switch_ota by increasing deepsleep
It increases the deepsleep time from 2000 to 20000.
2000 is too small for esp32-s3 chip.
2023-08-22 16:10:49 +08:00
d3c99ed3b8 Merge branch 'update/version_5_1_1' into 'release/v5.1'
Update version to 5.1.1

See merge request espressif/esp-idf!25443
2023-08-22 14:40:50 +08:00
c05a0b4c50 fix(supplicant): Ignore EAPOL non-key frames in EAPOL txdone callback 2023-08-21 18:06:32 +05:30
e088c3766b versions: Update version to 5.1.1 2023-08-21 14:24:40 +05:50
2791508094 fix(wpa_supplicant): Add support to detect PBC overlap in wps registrar mode 2023-08-21 12:35:50 +05:30
757bd78247 update btlib to f9db7b90, some esp32c2 issues bugfixed 2023-08-21 11:49:14 +08:00
3638d265ed fix(bt): Increased SDP maximum connections to avoid connection exhausted 2023-08-21 11:21:56 +08:00
e5394440df fix(intr_flags_to_level): fix value returned one more than correct value 2023-08-21 10:08:49 +08:00
62f5905be2 bluedroid: fixed compile warning when optimize for performance 2023-08-19 12:26:19 +08:00
8d2dbd461f Merge branch 'bugfix/eapol_txdone_cb_issue_v5.1' into 'release/v5.1'
Fix EAPOL Key TxDone callback implementation (Backport v5.1)

See merge request espressif/esp-idf!25381
2023-08-18 14:36:25 +08:00
7eae1e4534 feat(mbedtls): Update to release/v3.4.1 2023-08-17 17:33:22 +05:30
c99a036b43 fix(spiffs): SPIFFS print formatter errors out
Closes https://github.com/espressif/esp-idf/issues/11922
2023-08-17 11:46:25 +02:00
96b312ddde soc: Move revision MAX/MIN static assert to esp_hw_support
Previously, "soc/chip_revision.h" contained a static assert to check that the
CONFIG_ESP_REV_MIN_FULL <= CONFIG_ESP_REV_MAX_FULL. There are two issues with
this assert:

- Contained in a header file, so it is only compiled if the "chip_revision.h"
is included somewhere
- CONFIG_ESP_REV_MIN_FULL and CONFIG_ESP_REV_MAX_FULL are defined in
"esp_hw_support", which is a G0 component. This creates a reverse dependency
of G0 on G1.

This commit moves the static assert "revision.c" in "esp_hw_support".
2023-08-17 15:26:23 +08:00
c98aa927f6 usb_host: Restrict ESP32-S2 AHB errata workaround to only ECO0 chips 2023-08-17 15:26:23 +08:00
5d78511eac Merge branch 'bugfix/temperature_get_value_negative_v5.11' into 'release/v5.1'
bugfix(temperature_sensor): Fix issue that get the value is negative (backport v5.1)

See merge request espressif/esp-idf!25251
2023-08-17 15:24:29 +08:00
3e8b1a90cc ci(tools): fix test_hints.py to run on windows
1. The original test, before hint modules support was added, used
tempfile.NamedTemporaryFile in a way which is not supported on windows.
It was having the file open, which the hints tried to read it, leading
the EPERM exception. The docs[1] says this is not supported.
<quote>
Whether the name can be used to open the file a second time, while the
named temporary file is still open, varies across platforms (it can be
so used on Unix; it cannot on Windows)
</quote>

2. The hint module component_requirements test used the idf.py directly,
which is idf.py.exe on windows.Now it's starting idf.py through python.
We could probably used shell=True, but this approach is used in other
tests too.

Anyway the test are now passing on windows.

[1] https://docs.python.org/3/library/tempfile.html

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-08-17 07:57:39 +02:00
41f029d654 ci(tools): add tests for component_requirements.py hints module
Following tests were added.

1. Test for missing header directory in component's INCLUDE_DIRS
2. Test for missing dependency in component's PRIV_REQUIRES
3. Test for missing dependency in component's REQUIRES
4. Test for dependency in PRIV_REQUIRES which should be in REQUIRES

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-08-17 07:57:38 +02:00
0a029f4bf4 feat(tools): idf.py: implement hints for component reqs
Implementation of hint module for component dependency. It can provide
hint about missing header directory in component's INCLUDE_DIRS or
about missing component dependency in REQUIRES or PRIV_REQUIRES.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-08-17 07:57:38 +02:00
924857d0b4 feat(tools): idf_monitor: support for loadable hint provider modules
Currently hints are supported based on hints.yml only, which may be
limiting for some use cases. This introduces a generic plugin approach,
which allows to implement hint module that doesn't require entry in hints.yml.
Such module has the full command output available and it is not limited to
a single regex in hints.yml.

Note that regex in hint.yml expects the output concatenated into a single line,
but hint modules are getting the output unchanged.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-08-17 07:57:38 +02:00
148b7f9a56 feat(tools): add global build context
Introduces get_build_context() helper, which allows to get build context, e.g.
project description, at places where this info is not available. The
build context is set within ensure_build_directory.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-08-17 07:57:38 +02:00
cd2172935d Merge branch 'bugfix/fix_esp32h2_wakeup_pll_enable_access_flash' into 'release/v5.1'
fix(esp_hw_support): fix esp32h2 wakeup process access flash cause stuck on v5.1

See merge request espressif/esp-idf!25379
2023-08-17 11:53:19 +08:00
77b74ab091 Merge branch 'bugfix/spi_bus_unify_defualt_mosi_level_v5.1' into 'release/v5.1'
spi: unify default mosi level on all targets (v5.1)

See merge request espressif/esp-idf!25014
2023-08-17 10:13:05 +08:00
45288496fb bugfix(temperature_sensor): Fix issue that get the value is negative 2023-08-17 10:06:22 +08:00
feecbad7db fix(wifi): Fix EAPOL Key TxDone callback implementation
Fix issues arising due to not distinguishing between M2 and M4
TxDone during 4-way handshake. Also fix EAPOL frame rate to lowest
possible rate.
2023-08-16 19:26:22 +05:30
d5396e1d84 fix(esp_hw_support): fix esp32h2 wakeup process access flash cause crash 2023-08-16 20:44:16 +08:00
zwl
05e44b1021 ble: Added adv report flow control config on ESP32C6 and ESP32H2 2023-08-16 19:37:09 +08:00
zwl
fb6f00158e ble: fixed heap corruption on esp32c6 and esp32h2 2023-08-16 19:37:03 +08:00
461db723f1 Merge branch 'bugfix/fix_disassociation_callback_miss_free_key_lead_memory_leak_issue_v5.1' into 'release/v5.1'
fix(wifi): fix disassociation callback miss free key issue(Backport v5.1)

See merge request espressif/esp-idf!25360
2023-08-16 19:18:28 +08:00
98c39e28c8 fix(wifi): fix disassociation callback miss free key issue 2023-08-15 18:01:43 +08:00
075bbb526c twai: twai_driver_install() returns error on interrupt allocation failure
This commit updates twai_driver_install() so that an error is returned when
esp_intr_alloc() fails, instead of aborting.

Closes https://github.com/espressif/esp-idf/pull/11494

[darian@espressif.com: Refactored object allocation and free procedures]
[darian@espressif.com: Updated commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2023-08-15 03:26:10 +00:00
c623b0701b docs: Provide CN translation for wear-levelling.rst 2023-08-14 12:46:20 +02:00
756c61b628 docs(fatfs): Move mentioned APIs to a separate API reference section 2023-08-14 12:44:53 +02:00
597810bf96 fix(c++): invalid conversion from int to enumeration 2023-08-14 07:49:02 +00:00
67327ed47a fix(wifi): Fix default wifi-netif creation to assert if no event loop
- Added ESP_ERROR_CHECK() checks to `esp_wifi_set_default_wifi_..._handlers()` calls
- Added ESP_ERROR_CHECH() to `esp_netif_attach_wifi_...()` calls
- Updated documentation to reflect the changes

Closes https://github.com/espressif/esp-idf/issues/11580
2023-08-14 09:16:29 +02:00
5e0129c91b fix(secure_ota): secure app verification issue without padding bytes
For the following configuration case:

 - CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME
 - CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
 - CONFIG_SECURE_BOOT_ALLOW_SHORT_APP_PARTITION

verification of the application was failing because the externally
padded bytes were not considered in the hash (checksum) process.

This commit fixes the problem by enabling relevant code for secure OTA
without secure boot case.

Closes https://github.com/espressif/esp-idf/issues/11995
2023-08-14 03:29:44 +00:00
25876e8f49 Merge branch 'bluedroid/memory_full_v5.1' into 'release/v5.1'
fix (Bluedroid) : Fix the memory corruption issue(v5.1)

See merge request espressif/esp-idf!25181
2023-08-14 10:40:50 +08:00
b7aea79cb8 fix(gptimer): hal function placement under wrong condition
timer_hal_capture_and_get_counter_value
should be placed in the IRAM for speed optimization
because the default ISR handler is placed in the IRAM.

Closes https://github.com/espressif/esp-idf/issues/12021
2023-08-14 02:31:16 +00:00
c113507ad7 feat(gptimer): add gptimer linker.lf to control the placement of driver and hal
since the linker placement of the hal functions are controlled by the Kconfig in the driver component,
we should create the linker.lf in the driver component, not in the hal component.
2023-08-14 02:31:16 +00:00
6c0270c788 fix(i80_lcd): reset cs gpio on exit 2023-08-14 02:30:54 +00:00
5d49509969 Fix the mem corruption 2023-08-11 18:22:58 +00:00
6b1292284e fix(lp_i2c): Fixed a bug where the LP_I2C did not send NACK for 16-byte reads
This commit updates the LP_I2C driver used by the LP CPU wherein the
driver did not send out a NACK when we do a read of multiple of the FIFO
depth bytes. This was because the LP I2C controller was configured to
send an ACK when the Rx FIFO reaches the threshold instead of a NACK.
This commit updates the behavior.
2023-08-11 14:43:15 +00:00
a9ef76b031 fix(lp_i2c): Fixed a bug where LP I2C write got stuck
This commit fixes a bug where an I2C write got stuck when using the
lp_core_i2c_master_write_read_device() API. This was because the LP I2C
HW was not programmed with an END condition and therefore did not know
the end of a transaction.

Closes: https://github.com/espressif/esp-idf/issues/11958
2023-08-11 14:43:15 +00:00
ee8adce5ea fix(lp_i2c): Fixed incorrect clock setting for LP_I2C
The LP_I2C clock setting was incorrect and a lower frequency value was
being set during initialization. This commit fixes the behavior.
2023-08-11 14:43:15 +00:00
3fd0eff833 Merge branch 'fix/tools_idf_tools_tests_keep_constraints_v5.1' into 'release/v5.1'
fix(tools): idf_tools.py test improvements (v5.1)

See merge request espressif/esp-idf!25328
2023-08-11 19:44:53 +08:00
fdc8654c55 docs: add new mbedtls configuration option in optimize size 2023-08-11 16:40:38 +08:00
e9a1a7add5 feat(mbedtls): support ecp fixed-point multiplication configurable 2023-08-11 16:40:38 +08:00
8f91dfed12 fix(tools): Increase timeout in idf_tools.py Python tests 2023-08-11 09:25:52 +02:00
951f3300ed fix(tools): Keep the original Python environment when idf_tools.py tests are run 2023-08-11 09:25:52 +02:00
dced82b949 fix(tools): idf_tools.py tests should keep the original constraint file 2023-08-11 09:25:52 +02:00
68ac16c010 Merge branch 'version_check_fix_dev_5.1' into 'release/v5.1'
fix(tools): check_python_version accept dev releases as requirement (v5.1)

See merge request espressif/esp-idf!25186
2023-08-11 15:16:57 +08:00
2708ffece1 fix(bt): Fix argument type of ESP_LOGI for spp examples about format error
Closes https://github.com/espressif/esp-idf/pull/11819
2023-08-11 14:46:53 +08:00
e72cf8c908 fix(build_system): Allow dots in the name of an app binary 2023-08-08 15:13:25 +02:00
0be661f8bf fix(tools): check_python_version accept dev releases as requirement 2023-08-04 14:06:35 +02:00
e5199390a3 Merge branch 'bugfix/manage_i2c_clock_with_modem_clock_driver_v5.1' into 'release/v5.1'
fix(esp_hw_support): manage i2c_ana_mst clock witch modem clock driver (backport v5.1)

See merge request espressif/esp-idf!25164
2023-08-04 17:39:14 +08:00
94d129df76 fix(light_sleep): save vddsdio_config before lightsleep 2023-08-04 12:04:51 +08:00
aaf04f514f fix(esp_hw_support): manage i2c_ana_mst clock witch modem clock driver 2023-08-04 12:04:40 +08:00
3b48ccb343 fix(bt/controller): Fix disconnection due to lmp messages not being processed by both sides
The master sent lmp_enc_mode_req, and the slave sent lmp_switch_req.
However, both sides failed to handle the LMP message, resulting in LMP timeout.
2023-08-04 10:59:25 +08:00
b68519cb17 feat(gptimer): support set interrupt priority
Related forum post: https://esp32.com/viewtopic.php?f=13&t=34959
2023-08-04 10:20:07 +08:00
6ec52679c3 Merge branch 'bugfix/action_tx_sleep_fix_v5.1' into 'release/v5.1'
Trigger null data frame TX before going offchannel.(v5.1)

See merge request espressif/esp-idf!25095
2023-08-04 08:36:16 +08:00
2c196590d3 Merge branch 'bugfix/vtasksteptick_assert_failed_issue_v5.1' into 'release/v5.1'
backport v5.1:  fix the issue of esp32c6 enable light sleep, vTaskStepTick assert failed caused by wifi baseband sleep retention linked list

See merge request espressif/esp-idf!25147
2023-08-04 02:37:01 +08:00
96934613fb fix(wifi): Fix error propagation while initiating FTM 2023-08-03 19:55:55 +08:00
c97181ad5e fix(esp_wifi): Fix some OWE issues
1. Allow flow of traffic after 4 way handshake is completed
2. Fix beacon timeout issue in transition mode
2023-08-03 19:55:15 +08:00
b4df07185c fix (nimble): Add check to set length only if data is valid in periodic adv 2023-08-03 14:44:07 +05:30
de0e027bd1 fix(ble): Fix compile issue when disable duplicate config option in kconfig. 2023-08-03 17:07:02 +08:00
830a627362 remove(pm/deep_sleep): enable CI test for esp32h2 deepsleep 2023-08-03 16:46:55 +08:00
5859b83232 docs(pm/sleep): rewrite_all_low_to_any_low_when_not_esp32 2023-08-03 16:46:55 +08:00
badef66538 change(pm/deepsleep): rewrite the option all low as any low for esp32s2, esp32s3, esp32c6 and esp32h2 2023-08-03 16:46:55 +08:00
7c1e797008 change(pm/deepsleep): remove disable rtcio before hold it when ext1 wakeup 2023-08-03 16:46:55 +08:00
a4dd1b2bb3 feat(pm/deepsleep): Support EXT1 wakeup pin select 2023-08-03 16:46:55 +08:00
b27e57db7b feat(pm/deepsleep): Support EXT1 wakeup for esp32h2 deep_sleep 2023-08-03 16:46:55 +08:00
6768f098dc change(driver/rtcio): Describe RTCIO CAPS with more accurate note 2023-08-03 16:46:55 +08:00
8833c2bc87 change(pm/deepsleep): Update deep_sleep pmu analog parameter for esp32h2 2023-08-03 16:46:54 +08:00
4bc5e24f82 feat(pm/deepsleep): Support deep_sleep example and deep_sleep_wake_stub example for esp32h2 2023-08-03 16:46:54 +08:00
6dab947f68 spiram: Support configure CLK onto the same pin as flash for ESP32-D0WD
When using PSRAM of rev0, the Flash and PSRAM should use different clock pins. But if using newer PSRAM, this is not necesary. This MR fixed the issue that allocating CLK of PSRAM to the same pin as Flash may crash.
2023-08-03 15:44:22 +08:00
602d021263 Merge branch 'ble_mesh/esp32c6_BLEQABR23-266v5.1' into 'release/v5.1'
ble mesh: stack: return error when scanning failed to be enabled(v5.1)

See merge request espressif/esp-idf!24776
2023-08-03 11:15:42 +08:00
d6c18ad4c5 ble mesh: stack: return error when scanning failed to be enabled(v5.1) 2023-08-03 11:15:41 +08:00
a56ea11f91 Merge branch 'bugfix/fix_gpio_driver_calloc_v5.1' into 'release/v5.1'
fix(gpio): fix potential crash when processing gpio isr (v5.1)

See merge request espressif/esp-idf!24901
2023-08-03 11:13:47 +08:00
761af9869f fix(esp_wifi): fix no mac retention at wifi start 2023-08-03 10:54:31 +08:00
d73f61ebc9 fix(wifi): Prevent PMF config overwritten by tx_cb 2023-08-03 10:54:31 +08:00
bba48079a2 Fix(esp_wifi):revert send wake up and sleep null between scaning 2023-08-03 10:54:31 +08:00
6eb872f7d2 fix(wifi): fix some wifi bugs
1. fix the RX error when softAP and ESP-NOW both encrypted
2.Trigger null data frame TX before offchan channel switch.
2023-08-03 10:54:05 +08:00
0169ae545d fix(esp_prov): Fixed the deprecation APIs warnings
- Updated the extraction of service_uuids using AdvertisementData
- Replaced the `get_services()` API with the `services` property
2023-08-02 17:22:04 +05:30
827d863865 fix(wifi/phy): fix the issue of vTaskStepTick assert failed caused by wifi baseband retention linked list 2023-08-02 19:18:22 +08:00
4c7b2cb4e3 feat(tools): add espsecure.py to the Windows export scripts
This is not needed on Linux/macOS where the path to esptool directory
is added to PATH.
2023-08-02 10:43:54 +02:00
e449ec8f8e change(tools): export.ps1: define functions for helper python tools
Follows the approach used in Initialise-Idf.ps1 created by the tools
installer. This is the closes equivalent of "alias" used in export.bat

Closes https://github.com/espressif/esp-idf/issues/9849
2023-08-02 10:43:54 +02:00
bef0eaf2c7 ci(test): add SHA DMA mode test for large data in PSRAM
Covers a test scenario described in following issue:
https://github.com/espressif/esp-idf/issues/11915
2023-08-02 04:48:40 +00:00
b966103800 fix(sha): DMA mode iteration calculation issue for certain data lengths
SHA hardware DMA mode calculation had off-by-one error for specific
input lengths. This was causing last chunk of the input data not being
fed to the hardware accelerator and hence resulting in an incorrect
final result.

Closes: https://github.com/espressif/esp-idf/issues/11915
2023-08-02 04:48:40 +00:00
afcf3e261b Merge branch 'bugfix/fix_cache_data_mem_corrupt_after_sleep_v5.1' into 'release/v5.1'
fix(lightsleep): Suspend cache before goto sleep to avoid cache load wrong data (backport v5.1)

See merge request espressif/esp-idf!25087
2023-08-02 11:21:33 +08:00
01c6fc6511 Merge branch 'bugfix/minor_enterprise_fixes_v5.1' into 'release/v5.1'
Drop Eapol msg if EAP success is not processed (Backport v5.1)

See merge request espressif/esp-idf!25065
2023-08-02 10:48:56 +08:00
4cb955461f Merge branch 'backport/openthread_feature_to_v51' into 'release/v5.1'
Openthread: backport some features

See merge request espressif/esp-idf!25113
2023-08-02 10:47:32 +08:00
adcc697082 Merge branch 'bugfix/neighbour_report_crash_v51' into 'release/v5.1'
Fix crash in RRM neighbour report requests.(v5.1)

See merge request espressif/esp-idf!25114
2023-08-02 10:13:40 +08:00
ffaef9971a Merge branch 'docs/update_bluetooth_power_save_readme_v5.1' into 'release/v5.1'
Docs: update bluetooth power save readme(v5.1)

See merge request espressif/esp-idf!24843
2023-08-02 10:10:38 +08:00
727f7cbb3a Merge branch 'bugfix/sync_master_esp32c6_and_esp32h2_uart_ll_inline_attr' into 'release/v5.1'
fix(hal): sync esp32c6 and esp32h2 uart ll inline attr from master  to v5.1

See merge request espressif/esp-idf!24961
2023-08-01 16:18:16 +08:00
0ba37a2b85 fix(rrm) : Fix crash in RRM neighbour report requests.
Fix crash in sending new RRM neighbour report requests by removing
the call to neighbour report request timeout callback in case of
already ongoing neighbour report request timer.
2023-08-01 13:12:00 +05:30
12f1c165e3 feat(thread): update openthread lib 2023-08-01 14:59:07 +08:00
31212f284a feat(openthread): enable openthread border agent id support 2023-08-01 14:58:57 +08:00
c2681f00aa fix(openthread): Use the existing dataset for autostart 2023-08-01 14:58:35 +08:00
4fc329fc10 Merge branch 'bugfix/mbedtls_sha_test_fail_when_run_twice_v5.1' into 'release/v5.1'
fix(mbedtls): sha test will fail when run twice (backport v5.1)

See merge request espressif/esp-idf!24827
2023-08-01 10:57:25 +08:00
a4d64dab30 Merge branch 'backport/fix_ieee802154_state' into 'release/v5.1'
ieee802154: fix ieee802154 sleep state (backport v5.1)

See merge request espressif/esp-idf!24841
2023-08-01 10:55:51 +08:00
2f9bb7937a Merge branch 'bugfix/remove__warning_for_rc_fast_calibration_h2_v5.1' into 'release/v5.1'
remove(clk): remove warning log if RC_FAST clock calibration is needed on esp32h2 (v5.1)

See merge request espressif/esp-idf!25075
2023-08-01 10:53:46 +08:00
fbfdd97343 Merge branch 'bugfix/esp32h2_revision_config_prompt_v5.1' into 'release/v5.1'
fix(esp32h2): correct typo in chip revision prompt (v5.1)

See merge request espressif/esp-idf!25024
2023-08-01 10:53:26 +08:00
5dfbd1eb8d Merge branch 'bugfix/malloc_free_removal_v5.1' into 'release/v5.1'
change(esp_wifi): Remove direct call of malloc() and free() (v5.1)

See merge request espressif/esp-idf!24932
2023-08-01 10:53:10 +08:00
58a01eb10b fix(hal): sync esp32c6 & esp32h2 uart_ll inline attr from master 2023-08-01 02:32:55 +00:00
c5703cff8d fix(lightsleep): fix access pu_cfg after sleep wake wakeup which is linked to flash 2023-07-31 21:41:56 +08:00
dab45c243a Merge branch 'bugfix/handle_conn_type_and_array_reset_v5.1' into 'release/v5.1'
fix(nimble): Update connection type in reattempt connection code (v5.1)

See merge request espressif/esp-idf!24915
2023-07-31 20:31:00 +08:00
2b8e8e832a fix(bt/bqb): Modify BQB related configurations 2023-07-31 15:28:33 +08:00
f05c0a36e8 feat(bt): Add BQB enabling and rfcomm msc command sending support
1: add the CONFIG_BT_BQB_ENABLED for some functions of bqb test.
2: add bqb_rfc_send_msc_cmd function to send rfcomm msc command with
   only address arg input.
2023-07-31 15:28:20 +08:00
1acc14bf72 fix(lightsleep): suspend cache before goto sleep to avoid cache load wrong data after spi io isolation 2023-07-31 14:52:03 +08:00
bb845e1841 cache: refactor cache_utils into cache_hal instade 2023-07-31 14:52:03 +08:00
45eb0b6271 cache: fix cache suspended/resumed twice on S3 2023-07-31 14:52:03 +08:00
dc4731101d c2 h2 c6 headfile re-organized
c2 c6 h2 cfg_t and addr_t documented

comments for controller_enable
2023-07-31 12:41:52 +08:00
56eef9151f fix(nimble): Update connection type in reattempt connection code
Added change to set connection type correctly and clear array when it is
    full in reattempt connection flow
2023-07-31 09:30:45 +05:30
59672cee17 remove(clk): remove warning log if RC_FAST clock calibration is needed on esp32h2 2023-07-31 10:48:55 +08:00
d83fe16c93 Merge branch 'bugfix/revert_26mhz_esp32c2_bad_apb_clock_fix' into 'release/v5.1'
Revert "fix(soc): fix wrong freq definition for 26Mhz version esp32c2 soc" (v5.1)

See merge request espressif/esp-idf!24983
2023-07-31 10:26:58 +08:00
d026b92c75 Merge branch 'bugfix/fix_c6_wrong_pwdet_register_v5.1' into 'release/v5.1'
pwdet: fix pwdet wrong base address on c6 h2 (v5.1)

See merge request espressif/esp-idf!25025
2023-07-31 10:22:57 +08:00
b98bcd75aa Merge branch 'bugfix/backport_wifi_fixes_v5.1' into 'release/v5.1'
Backport some wifi fixes to v5.1

See merge request espressif/esp-idf!24948
2023-07-31 10:22:14 +08:00
a28ef8df5b Merge branch 'bugfix/cache_writeback_bug_v5.1' into 'release/v5.1'
esp_rom: patch Cache_WriteBack_Addr (backport v5.1)

See merge request espressif/esp-idf!24941
2023-07-31 10:17:10 +08:00
9fa9621a8f Merge branch 'bugfix/enable_i2c_master_clock_in_bbpll_configure_v5.1' into 'release/v5.1'
fix(rtc_clk): fix i2c master clock missing in bbpll configure (backport v5.1)

See merge request espressif/esp-idf!24852
2023-07-31 10:16:20 +08:00
a0d882c25e fix(esp32h2): correct typo in chip revision prompt 2023-07-28 13:45:28 +00:00
bc16331ba0 fix(test_submodules.py): don't rely on submodule init
Current version of the test is using "git-submodule foreach", which
requires submodules to be initialized. Non-initialized submodules are
ignored. Our CI is not performing submodule initialization, but instead
it only downloads the submodule content in tools/ci/ci_fetch_submodule.py
from cache and copies it into the submodule path.

Since we already know the submodule path from .gitconfig, we can use it
as argument to git-ls-tree and avoid calling git-submodule at all. This
allows to perform the test even if the submodules are not initialization
and also it makes the code simpler.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-07-28 12:13:32 +02:00
c612f36786 fix(esp_wifi): Drop Eapol msg if EAP success is not processed 2023-07-28 15:11:44 +05:30
4cf31c3194 Merge branch 'feature/services_health_therm_v5.1' into 'release/v5.1'
NimBLE: Added health thermometer profile (v5.1)

See merge request espressif/esp-idf!24830
2023-07-28 15:37:35 +08:00
6fb014d535 Merge branch 'feature/add_ble_multi_conn_example_with_vs_hci_5.1' into 'release/v5.1'
feat(ble): Added ble examples for multiple connections

See merge request espressif/esp-idf!24814
2023-07-28 15:35:54 +08:00
2e8dea7622 docs: provide CN tranlsation for api-guides/hardware-abstraction.rst 2023-07-28 14:42:03 +08:00
4b8fd7df41 docs: add H2 to list of supported series to front page doc 2023-07-28 14:02:16 +08:00
d5c6719a69 docs: provide CN translation for api-guides/performance/ram-usage.rst 2023-07-28 11:59:21 +08:00
5e60fb9924 docs(bt/example): Updated bluetooth power save readme 2023-07-27 07:54:36 +00:00
ce1a619252 docs(sleep_modes): Updated Wi-Fi/Bluetooth and Sleep Modes in docs 2023-07-27 07:54:36 +00:00
c4b984734f docs(esp_idf_monitor): ROM ELF address decoding 2023-07-27 06:50:36 +00:00
c7654d7c6b Merge branch 'ci/fix_failures_in_esp_http_client_example_v5.1' into 'release/v5.1'
CI: fix esp_http_client example failures in CI. Timeout was observed in the... (v5.1)

See merge request espressif/esp-idf!24949
2023-07-27 12:42:10 +08:00
fcb3ae32cb fix(pwdet): fix pwdet wrong base address on c6 h2 2023-07-27 12:30:44 +08:00
125014d242 fix(gpio): fix potential crash when processing gpio isr
If CONFIG_SPIRAM_USE_MALLOC is enabled, and cache is disabled when GPIO ISR is triggered,
it would lead to Guru Meditation Error due to "Cache disabled but cached memory region accessed".

Closes https://github.com/espressif/esp-idf/issues/11876
2023-07-26 12:42:11 +00:00
7a30edc412 fix(all): unify default mosi level to low on all targets 2023-07-26 20:34:25 +08:00
79b1379662 Merge branch 'bugfix/ble_issues_bugfix_v5.1' into 'release/v5.1'
ble: bugfix for esp32c6 and esp32h2

See merge request espressif/esp-idf!24952
2023-07-26 18:14:28 +08:00
b1799a7042 fix(bt): Fix bug with address resolution enabling during non-connected activities 2023-07-26 16:36:19 +08:00
063e62f30a docs(bt): Organize header files for esp32c3 and esp32s3 2023-07-26 16:36:08 +08:00
d01fa70ba8 fix(bt): Fix ble periodic advertising data length 0 error
- Fixed issues about data length 0 when set ext adv data,ext scan rsp data and periodic adv data
2023-07-26 16:35:57 +08:00
5f6f20ea30 fix(esp_pm): fix bad apb_max_freq for 26mhz esp32c2 2023-07-25 13:54:24 +08:00
e0e4642ff8 Revert "fix(esp_pm): Constrains the minimum frequency of APB_MAX when the modem is working"
This reverts commit 9158cba846.
2023-07-25 13:51:37 +08:00
c64231564a Revert "fix(soc): fix wrong freq definition for 26Mhz version esp32c2 soc"
This reverts commit d2fb32ed70.
2023-07-25 13:51:32 +08:00
c624b0a45e esp_rom_printf 2023-07-24 21:45:11 +08:00
c41579d2d3 examples: modbus add support for target esp32h2 2023-07-24 10:58:02 +02:00
99c0715962 ble update for doc: bugfix for esp32c6 and esp32h2 2023-07-24 10:59:19 +08:00
020eba74c6 change(esp_wifi): Remove direct call of malloc() and free() 2023-07-22 07:13:53 +00:00
87ad40140e docs(nimble): Update Kconfig help section for Example Ext Adv 2023-07-21 14:32:12 +00:00
14819cb409 ble update: bugfix for esp32c6 and esp32h2 2023-07-21 20:25:01 +08:00
de15b6f819 fix(mbedtls): sha test will fail when run twice 2023-07-21 12:06:26 +00:00
b8bbd90ad4 fix(ieee802154): fix ieee802154 sleep state 2023-07-21 11:03:23 +00:00
9df77e015a fix(rtc_clk): fix i2c master clock missing in bbpll configure 2023-07-21 11:01:56 +00:00
6406620712 fix(debug_ext): CTRL+C handling while waiting on gdb process
idf.py spawns gdb process within a thread and uses Thread.join() to wait
for the gdb process to finish. As CTRL+C(SIGINT) is used by gdb to interrupt the
running program, we catch the SIGINT while waiting on the gdb to finish,
and try Thread.join() again.

With cpython's commit

	commit a22be4943c119fecf5433d999227ff78fc2e5741
	Author: Victor Stinner <vstinner@python.org>
	Date:   Mon Sep 27 14:20:31 2021 +0200

	    bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)

this logic doesn't work anymore, because cpython internally marks the
thread as stopped when join() is interrupted with an exception. IMHO
this is broken in cpython and there is a bug report about this
https://github.com/python/cpython/issues/90882. Problem is that
waiting on a thread to finish is based on acquiring a lock. Meaning
join() is waiting on _tstate_lock. If this wait is interrupted, the
above referenced commit adds a logic that checks if the lock is help,
meaning the thread is done and marks the thread as stopped. But there is
no way to tell if the lock was acquired by us running join() or if it's
held by someone else e.g. still by the thread bootstrap code. Meaning
the thread is still running.

I may be missing something, but I don't see any reason why to spawn gdb
process within a thread. This change removes the thread and spawns gdb
directly. Instead waiting on a thread, we wait on the process to finish,
replacing join() with wait() and avoiding this problem.

Closes https://github.com/espressif/esp-idf/issues/11871

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-07-21 12:37:19 +02:00
2aaa5579f0 fix(ci): update HTTP client example tests runner assignment
HTTP client example tests now connect with locally hosted httpbin service
for more stable results across multiple runs
2023-07-21 15:21:41 +05:30
3298a8a483 CI: fix esp_http_client example failures in CI. Timeout was observed in the logs while performing HTTP requests. Changing the endpoint when testing in CI 2023-07-21 15:20:09 +05:30
dbe7c4a78d fix(esp_wifi): Backport some wifi fixes
1. Fix memory leak caused by assoc IE and retry timer
2. Discard commit frame received at confirmed state in SAE
3. Ignore immediate assoc req received from the station while we are
processing the older one. Fix regression caused by 4cb4faa9
2023-07-21 15:06:09 +05:30
aff298be18 fix(cache): no longer use freeze in esp_cache_msync
Writeback and invalidation don't need cache to be frozen first
2023-07-21 17:19:11 +08:00
3b8853b3c0 NimBLE: Added health thermometer profile 2023-07-21 05:36:32 +00:00
c8ec729252 feat(mcpwm): support open drain output for generator IO
Closes https://github.com/espressif/esp-idf/issues/11877
2023-07-21 05:08:20 +00:00
c818ddd282 feat(mcpwm): Allow for pull up/down to be configurable on generators 2023-07-21 05:08:20 +00:00
1b2b046f9a ci(pre-commit): Use the newest copyright checker 2023-07-21 04:41:18 +00:00
3187b8b326 Merge branch 'ci/fix_build_examples_v5.1' into 'release/v5.1'
CI: fix build examples import future

See merge request espressif/esp-idf!24864
2023-07-21 12:40:11 +08:00
38d54b4b62 fix(esp32s3): patch Cache_WriteBack_Addr api
Need to ensure that the cacheline being written back will not be
accessed during the write back process.
2023-07-21 11:44:56 +08:00
c4377e8dcc ci(esp_prov): remove import future usage 2023-07-19 14:03:12 +08:00
ff8c4f79d2 usb_host: Run formatting script 2023-07-15 12:56:45 +02:00
a3e4e9c772 usb_host: Fix spelling errors 2023-07-15 12:56:45 +02:00
b891aa0443 usb_host: Refactor USBH and USB Host Library calls to HCD
This commit refactors the USBH and the USB Host Library in the following ways:

- USBH now presents an abstraction of an endpoint (via usbh_ep_handle_t)
    - Added separate functions to enqueue/dequeue URBs to a particular endpoint
    - USB Host Library no longer calls HCD API directly. Calls USBH endpoint API
      instead.
- Renamed "notif_cb" to "proc_req_cb" (Processing Request Callback)
    - This is to avoid confusion with FreerTOS task notifications and Host
      Library client event notifications.
    - The processing functions of each layer (i.e., "xxx_process()") request
      calls via the "proc_req_cb"
    - The main handling function (i.e., usb_host_lib_handle_events()) is
      responsible for calling the required "xxx_process()" of each layer
2023-07-15 12:56:45 +02:00
b530d768e6 Merge branch 'fix/esp_aes_return_values_v5.1' into 'release/v5.1'
fix(mbedtls): fix return values of esp-aes APIs (v5.1)

See merge request espressif/esp-idf!24804
2023-07-15 12:24:25 +08:00
d84e6c3dda Merge branch 'bugfix/fix_esp32c2_wifi_works_on_too_low_apb_clk_v5.1' into 'release/v5.1'
fix(esp_pm): fix esp32c2 modem works on too low apb clk (backport v5.1)

See merge request espressif/esp-idf!24811
2023-07-15 12:18:09 +08:00
077cb8d150 Merge branch 'feature/usb_host_interface_claim_debug_info_v5.1' into 'release/v5.1'
USB Host: better debugging information during usb_host_interface_claim() (backport v5.1)

See merge request espressif/esp-idf!23456
2023-07-15 08:37:32 +08:00
b21005487d Merge branch 'bugfix/fix_sleep_cache_spi_safe_issues_backport_v5.1' into 'release/v5.1'
Power Management: fix cache spi flash related issues in sleep process (backport v5.1)

See merge request espressif/esp-idf!24812
2023-07-15 08:36:46 +08:00
d2fb32ed70 fix(soc): fix wrong freq definition for 26Mhz version esp32c2 soc 2023-07-15 01:57:07 +08:00
9158cba846 fix(esp_pm): Constrains the minimum frequency of APB_MAX when the modem is working 2023-07-15 01:56:55 +08:00
16d849b95e fix(esp_pm): fix flash access after light sleep wakeup 2023-07-15 01:41:03 +08:00
34dccf840e refactor(mbedtls): refactored the return values check in some esp-aes APIs 2023-07-14 20:51:47 +05:30
77f6f72b83 Merge branch 'fix/mbedtls_internal_shaX_process_api_port_v5.1' into 'release/v5.1'
fix(mbedtls): Fix the port for mbedtls_internal_shaX_process api (v5.1)

See merge request espressif/esp-idf!24809
2023-07-14 22:53:13 +08:00
f447ee35b8 Merge branch 'pkg_res_deprecation_5.1' into 'release/v5.1'
fix(tools/python_dep_check): replace deprecated pkg_resources with importlib (backport v5.1)

See merge request espressif/esp-idf!24817
2023-07-14 22:44:05 +08:00
77429e3ef7 fix(tools/python_dep_check): replace deprecated pkg_resources with importlib
Closes https://github.com/espressif/esp-idf/issues/11712
2023-07-14 14:16:10 +02:00
2d1544b863 feat(ble): Added ble examples for multiple connections 2023-07-14 19:01:11 +08:00
82fde1e823 Merge branch 'backport_v5.1' into 'release/v5.1'
fix(bt): Fix the issue of not printing the Bluetooth MAC address for ESP32(backport v5.1)

See merge request espressif/esp-idf!24780
2023-07-14 18:17:32 +08:00
ec35c2ab60 fix(esp_pm): put vddsdio configure api always in iram if pd_flash is enabled
- Put vddsdio configure api always in iram if pd_flash is enabled to ensure access flash at flash unavailable time
2023-07-14 17:48:27 +08:00
f69ea24d15 fix(esp_pm): wait spi bus idle before hold CS pin
- Wait for spi bus idle before holding CS pin to prevent hold selected state during sleep
2023-07-14 17:48:20 +08:00
bba66a1566 Merge branch 'fix/esp_ptr_check_sign_compare_v5.1' into 'release/v5.1'
fix(esp_hw_support): Fix different signed comparison in `esp_ptr_in_drom` (v5.1)

See merge request espressif/esp-idf!24798
2023-07-14 17:27:54 +08:00
4f37aeb747 Merge branch 'update/ble_mesh_debug_log_level_update_v5.1' into 'release/v5.1'
update(ble_mesh: stack): Update provisioning bearer check debug log to INFO level (v5.1)

See merge request espressif/esp-idf!24769
2023-07-14 16:56:19 +08:00
895d86621b fix(mbedtls): Fixed the transmission of return values of the esp-aes APIs
- Earlier, some intermediate return values were not stored and returned,
thus incorrect return values used to get transmitted to the upper layer of APIs.

- Also, zeroised the output buffer in case of error condition.
2023-07-14 14:20:47 +05:30
8692da51a0 fix(mbedtls): Fix the port for the mbedtls_internal_shaX_process API
- Also added the fix to update intermediate SHA state in the mbedtls_shaX_update API
2023-07-14 14:20:20 +05:30
e9a3a3eeea Merge branch 'bugfix/fix_some_wifi_bugs_24063_to_v5.1' into 'release/v5.1'
fix(wifi): Backport some wifi bugs 24063 to v5.1(Backport v5.1)

See merge request espressif/esp-idf!24794
2023-07-14 16:41:49 +08:00
fa95b46a0d Merge branch 'bugfix/fix_miss_annotate_ld_function_issue_v5.1' into 'release/v5.1'
fix(wifi): missed annotate ld function from txop fix(Backport v5.1)

See merge request espressif/esp-idf!24800
2023-07-14 16:41:04 +08:00
da8b9ad59d Merge branch 'bugfix/esp32c6_eco1_ble_lpclk_main_xtal_v5.1' into 'release/v5.1'
backport v5.1:  support 40 MHz XTAL as BLE low power clock source of esp32c6 eco1

See merge request espressif/esp-idf!24789
2023-07-14 16:34:09 +08:00
1296991b2f Merge branch 'backport/fix_br_issues_of_cert' into 'release/v5.1'
OpenThread: fix issues found in certification(backport v5.1)

See merge request espressif/esp-idf!24079
2023-07-14 15:01:07 +08:00
727a8cdb9e fix(wifi): missed annotate ld function from txop fix 2023-07-14 14:04:14 +08:00
8abdb33072 fix(esp_hw_support): Fix different signed comparison in esp_ptr_in_drom
- Closes https://github.com/espressif/esp-idf/issues/11653
- Closes https://github.com/espressif/esp-idf/issues/11865
2023-07-14 10:52:19 +05:30
fabe338a7a Merge branch 'backport/enrich_ieee802154_assert_info' into 'release/v5.1'
ieee802154: add debug feature for driver (Backport v5.1)

See merge request espressif/esp-idf!24793
2023-07-14 13:17:32 +08:00
7ae116e3b2 Merge branch 'backport/backport_ci_for_zigbee' into 'release/v5.1'
feat(zigbee): Update Zigbee examples based on latest library (Backport v5.1)

See merge request espressif/esp-idf!24792
2023-07-14 12:02:38 +08:00
7148d826eb Merge branch 'bugfix/wifi_bcn_timeout_m_f_probe_req_l0_v5.1' into 'release/v5.1'
backport v5.1: fix bcn_timeout and disconnect with error code 201, m f probe req l=0 issue

See merge request espressif/esp-idf!24781
2023-07-14 11:35:31 +08:00
5ec30e6fc2 ble : remove extra retention cnt upon deinit temporarily 2023-07-14 11:07:56 +08:00
6c62d13550 ble: support eco1 BLE light sleep 2023-07-14 11:07:49 +08:00
ee3452d410 light sleep: enable system clock in PMU HP sleep state when selecting a 40 MHz XTAL as low power clock source of ble 2023-07-14 11:07:41 +08:00
78683c7c33 modem clock: provide a protected wifipwr clock enable/disable interface to fix the bug of selecting xtal as the low power clock source for ble 2023-07-14 11:07:34 +08:00
a98db6dbd3 modem clock: gatable clock interface which can gate or ungate modem clock domain 2023-07-14 11:07:27 +08:00
6a5d4e40d2 Wi-Fi/power save: fix the some mac issues of wifi power save
Some APs are configured to hide the SSID, the length field of the SSID element
in the Beacon frame is set to 0. This can cause incorrect parsing of the Beacon
by the Wi-Fi MAC hardware.

Some APs send two beacon frames with different BSSID in a TBTT cycle. After
correctly parsing the beacon of the associated AP, it continue to receive the
other beacon frame, which will cause the MAC to remain in a wait RX/TXING
state, blocking the Wi-Fi go to sleep.
2023-07-14 10:51:47 +08:00
395ad3edc0 feat(wifi): itwt support itwt wake duration unit 2023-07-14 10:51:26 +08:00
cb6946cf00 feat(zigbee): Update zigbee examples based on latest library 2023-07-14 10:28:43 +08:00
e6ddff69da fix(ci): remove the check of a inexistent host 2023-07-14 10:16:04 +08:00
6585c521b3 feat(openthread): openthread upstream update 2023-07-14 10:15:59 +08:00
cb29bfa6b4 openthread: forbid otPlatUdp to connect to address 0.0.0.0 and port 0 2023-07-14 09:54:52 +08:00
dd0afffde3 openthread cli: set dua feature optional 2023-07-14 09:54:52 +08:00
77c60765ca openthread rcp: set link metrics feature optional 2023-07-14 09:54:52 +08:00
320f8ebe7d Merge branch 'fix/mpi_incorrect_assert_v5.1' into 'release/v5.1'
fix(mbedtls): Fix incorrect assert for H/W MPI operations (v5.1)

See merge request espressif/esp-idf!24784
2023-07-14 09:49:01 +08:00
7d6a86062b Merge branch 'bugfix/multiple_btm_rrm_task_v51' into 'release/v5.1'
Fix race conditions in btm task deletion(v5.1)

See merge request espressif/esp-idf!24764
2023-07-14 08:10:39 +08:00
bf4e212950 Merge branch 'feature/improve_pd_vddsido_help_doc_v5.1' into 'release/v5.1'
Power Management: improve ESP_SLEEP_PSRAM/FLASH_LEAKAGE_WORKAROUND help doc (backport v5.1)

See merge request espressif/esp-idf!24758
2023-07-14 06:38:02 +08:00
d7604b580a Merge branch 'bugfix/fix_some_wifi_bugs_230713_v5.1' into 'release/v5.1'
Wifi: Backport some wifi bugs 230713 to v5.1(Backport v5.1)

See merge request espressif/esp-idf!24753
2023-07-14 03:33:03 +08:00
77876e5bea ieee802154: add debug feature for driver 2023-07-14 03:13:04 +08:00
d0a2424151 Merge branch 'bugfix/sae_crypto_optimization_esp32_v5.1' into 'release/v5.1'
esp_wifi: Optimize sae crypto operations for esp32 (v5.1)

See merge request espressif/esp-idf!24760
2023-07-14 00:12:21 +08:00
aa5b7e0100 Merge branch 'bugfix/fix_some_bluedroid_bugs_v5.1' into 'release/v5.1'
Fixed some bluedroid bugs( backport v5.1)

See merge request espressif/esp-idf!24748
2023-07-14 00:11:43 +08:00
f195d48764 Merge branch 'bugfix/fix_s3_adc1_wrong_clk_div_v5.1' into 'release/v5.1'
adc: fix adc oneshot mode clk div issue on esp32, esp32s2 and esp32s3 (v5.1)

See merge request espressif/esp-idf!24743
2023-07-13 21:40:54 +08:00
8e25eb1e08 fix(mbedtls): Fix incorrect assert for H/W MPI operations
- Closes https://github.com/espressif/esp-idf/issues/11850
2023-07-13 16:24:44 +05:30
aba746cdc2 Merge branch 'refactor/s_adc_tsen_enabled_logic_v5.1' into 'release/v5.1'
refactor(adc): maintain s_adc_tsen_enabled in adc driver (v5.1)

See merge request espressif/esp-idf!24629
2023-07-13 18:49:01 +08:00
b188085ce8 usb_host: better debugging information during hcd_pipe_alloc() when usb_host_interface_claim() is being fulfiled. 2023-07-13 12:42:00 +02:00
9021fab579 Merge branch 'feature/use_esp_rom_delay_us_to_test_the_accuracy_of_gptimer_v5.1' into 'release/v5.1'
refactor(driver/gptimer): replace vTaskDelay with esp_rom_delay_us in test_apps(v5.1)

See merge request espressif/esp-idf!24724
2023-07-13 17:38:40 +08:00
d8db9235ff Merge branch 'backport/update_docs_for_openthread' into 'release/v5.1'
docs(openthread): update openthread README for H2 and C6 (Backport v5.1)

See merge request espressif/esp-idf!24750
2023-07-13 17:10:36 +08:00
ae5f8dc139 Merge branch 'bugfix/fix_sometimes_sta_can_not_get_ip_from_softap_issue_v5.1' into 'release/v5.1'
lower the dhcp discover and request retry backoff time (Backport v5.1)

See merge request espressif/esp-idf!24742
2023-07-13 17:09:04 +08:00
958ae62197 power save: fix bcn_timeout and disconnect with error code 201, m f probe req l=0 issue 2023-07-13 17:02:50 +08:00
2b1269d4fb fix(bt): Fix the issue of not printing the Bluetooth MAC address for ESP32
- Add a log statement to print the Bluetooth MAC address
2023-07-13 16:43:37 +08:00
124cce0de3 fix(bt): Fix ble advertising data length 0 error
- Fixed an issue where the BLE advertisement length of 0 was causing an error
2023-07-13 16:43:37 +08:00
78e641a4b0 Merge branch 'backport/bugfix_openthread_sleep_esp32s3_build' into 'release/v5.1'
fix(openthread): call sleep api only in native radio (Backport v5.1)

See merge request espressif/esp-idf!24754
2023-07-13 16:38:36 +08:00
04b0929d94 Merge branch 'bugfix/fix_idf_monitor_parsing_pc_with_wrong_rom_out_v5.1' into 'release/v5.1'
bugfix: fix idf passing wrong chip revision to idf_monitor  (backport v5.1)

See merge request espressif/esp-idf!24756
2023-07-13 16:35:53 +08:00
f718d26d31 update(ble_mesh: stack): Update provisioning bearer check debug log to INFO level 2023-07-13 14:38:23 +08:00
cfa70abe0e Merge branch 'bugfix/fix_adc_cali_workround_wrong_range_v5.1' into 'release/v5.1'
fix(regi2c): wrong ADC_CALI_PD_WORKAROUND on c6, h2 (v5.1)

See merge request espressif/esp-idf!24747
2023-07-13 14:17:27 +08:00
adc2bf1e93 Merge branch 'bugfix/fix_adc_continuous_driver_conv_frame_issue_v5.1' into 'release/v5.1'
adc: fix adc continuous driver conv_frame_size not bigger than 4092 issue / pr 11500, use circular dma descriptors in adc continuous mode (v5.1)

See merge request espressif/esp-idf!24739
2023-07-13 14:16:15 +08:00
d938559efb Fix(esp_wifi): Fix race conditions in btm task deletion 2023-07-13 10:13:57 +05:30
02aa8e1a89 esp_wifi: Optimize sae crypto operations for esp32 2023-07-13 09:47:09 +05:30
34b4936a7d fix(bt/bluedroid): Fix memory leak of gattc cache upon disconnection 2023-07-13 12:14:16 +08:00
62bd3973f6 bluedroid: fixed gatt tcb free when disconnecting 2023-07-13 12:13:47 +08:00
d4bb163e32 lower the dhcp discover and request retry backoff time 2023-07-13 11:49:12 +08:00
649541e6e3 refactor(driver/gptimer): replace vTaskDelay
with esp_rom_delay_us in test_apps

This commit replaces vTaskDelay with esp_rom_delay_us in the gptimer
driver. The former function can introduce millisecond jitter due to
OS task switching, while the latter has less jitter because of the
polling delay. Therefore this commit reduces the delta values for
various timer tests.

Changes made in this commit include:
- Replacing vTaskDelay with esp_rom_delay_us
- Adjusting delta values for various timer tests
2023-07-13 11:29:39 +08:00
3fc984690f change(Kconfig): improve ESP_SLEEP_PSRAM/FLASH_LEAKAGE_WORKAROUND help doc
Closes https://github.com/espressif/esp-idf/issues/11558
2023-07-13 11:02:44 +08:00
73e380cc3a fix: fix idf passing wrong chip revision to idf_monitor 2023-07-13 10:46:32 +08:00
7c4cd75fe7 feat(external coex): add set tx line flag api 2023-07-13 10:37:53 +08:00
2f56bd8aac external coex: rename coex gpio struct field names 2023-07-13 10:37:53 +08:00
5cd0b6216a external coex: add slave mode support 2023-07-13 10:37:53 +08:00
2c70cda9b6 external_coex: add extern coex wire 4 2023-07-13 10:37:53 +08:00
ef805e64a2 iperf: apply txline 2023-07-13 10:37:53 +08:00
00ef8391af external coex: add txline, apply coex schm and half tx, apply lowest pti 2023-07-13 10:37:53 +08:00
19d8bdbd10 fix(wifi): Add bugfixes and improvements
1. Update wifi security mode
2. Add check for memory allocation in tx buffers
3. Fix association refused temporarily comeback time set to zero issue
2023-07-13 10:37:53 +08:00
8f7829d94e doc: remove WEP as security mode
Signed-off-by: zhangyanjiao <zhangyanjiao@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/10015
2023-07-13 10:37:53 +08:00
1f0982c0fc spelling correction in documentation
Signed-off-by: zhangyanjiao <zhangyanjiao@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/9721
2023-07-13 10:37:53 +08:00
dc46fe5343 fix(esp_wifi): Enable FTM for ESP32C2, fix other FTM issues
Enable FTM for ESP32C2 and update wifi libs with below fixes -

1. Bugfixes in Initiator and Responder mode
2. Fix wrong RTT value in first FTM procedure without connection
3. Update FTM calibration values for ESP32S2, S3, C3 and C2
4. Update distance estimation logic
5. Add some useful command parameters in FTM example
6. Fix bug when number of FTM measurement frames received is more
   than (number_of_brusts * FTMs per brust).

Co-authored-by: Sarvesh Bodakhe <sarvesh.bodakhe@espressif.com>
2023-07-13 10:37:53 +08:00
a2d8225c9d feat(wifi): Add API to get RSSI info after station connects to AP
- Add esp_wifi_sta_get_rssi() function to retrieve RSSI info after station connects to AP
2023-07-13 10:37:53 +08:00
5492f382f9 fix(openthread): call sleep api only in native radio 2023-07-13 10:29:08 +08:00
a300e79589 Merge branch 'backport/openthread_light_sleep' into 'release/v5.1'
Backportv5.1/openthread light sleep

See merge request espressif/esp-idf!24736
2023-07-13 10:20:38 +08:00
9745b7fab0 Merge branch 'bugfix/update_esp_rom_include_v5.1' into 'release/v5.1'
fix(esp_rom): remove unsupported rom headers (backport v5.1)

See merge request espressif/esp-idf!24735
2023-07-13 09:46:42 +08:00
e2e5894bc2 Merge branch 'bugfix/fix_exception_in_wifi_prov_v5.1' into 'release/v5.1'
Nimble: Increase the number of semaphore count for allocation (v5.1)

See merge request espressif/esp-idf!24469
2023-07-13 08:31:53 +08:00
bcd5eea0ea Merge branch 'bugfix/btm_scan_done_crash_v51' into 'release/v5.1'
wpa_supplicant : Fix occasional crash during btm roam.

See merge request espressif/esp-idf!24731
2023-07-13 03:00:30 +08:00
5ed5b83f70 Merge branch 'bufix/update_esp_phy_h_comments_5.1' into 'release/v5.1'
esp_phy:update comments in esp_phy_init.h_5.1

See merge request espressif/esp-idf!24704
2023-07-12 22:36:21 +08:00
7a455c15f7 Merge branch 'bugfix/fix_crash_issue_cause_by_proto_cmd_v5.1' into 'release/v5.1'
fix proto cmd crash problem in iperf example (backport v5.1)

See merge request espressif/esp-idf!24727
2023-07-12 21:36:58 +08:00
30c5638ce6 docs(openthread): update openthread README for H2 and C6 2023-07-12 20:51:58 +08:00
73f16d0af2 Merge branch 'fix/mqtt_esp32h2_examples_v5.1' into 'release/v5.1'
protocols/examples: Disable Wifi connection if not supported (v5.1)

See merge request espressif/esp-idf!24249
2023-07-12 19:00:18 +08:00
cab8159187 Nimble: Increase the number of semaphore count to allow more semaphore
allocation
2023-07-12 15:31:46 +05:30
51cef99b71 Merge branch 'itwt/rename_connect_handler_v5.1' into 'release/v5.1'
Update itwt.c (backport v5.1)

See merge request espressif/esp-idf!24730
2023-07-12 17:29:21 +08:00
6acc155516 fix(regi2c): wrong ADC_CALI_PD_WORKAROUND on c6, h2 2023-07-12 17:28:01 +08:00
d21e332281 fix(adc): fixed esp32, esp32s2,esp32s3 adc oneshot mode clk div issue 2023-07-12 17:10:58 +08:00
e27b44e661 Merge branch 'bugfix/handle_signed_power_level_pcl_v5.1' into 'release/v5.1'
fix(nimble): Fix data type of power level and delta to handle negative values (v5.1)

See merge request espressif/esp-idf!24712
2023-07-12 16:54:23 +08:00
074850e87c wifi: Fix typos and formatting issues with wifi.rst
- Used code-blocks for correct highlighting
- Use inline literals for macros
- Fixed some typos
2023-07-12 16:44:17 +08:00
d8ee45ce08 adc: port gh pr to current adc continuous mode driver
DMA EOF may happens per multiple dma descriptors, instead of only one.

Closes https://github.com/espressif/esp-idf/pull/11500
2023-07-12 16:41:24 +08:00
5da5e1801b Fix #10804 by running continuous ADC DMA in endless loop instead of restarting after each run (descriptor chain) to avoid losing samples. Use descriptor error callback for GDMA to check for DMA buffer overrun.
Signed-off-by: Armando <douyiwen@espressif.com>
2023-07-12 16:41:19 +08:00
f76f3dc83f adc: fix adc continuous driver conv_frame_size not bigger than 4092 issue
Closes https://github.com/espressif/esp-idf/issues/11385
2023-07-12 16:41:11 +08:00
dd9bcef9ea refactor(adc): maintain s_adc_tsen_enabled in adc driver 2023-07-12 16:35:51 +08:00
e1a4d33575 Wifi: Fixed typo in wifi.rst
Closes https://github.com/espressif/esp-idf/pull/11640

[darian@espressif.com: Updated commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2023-07-12 16:23:34 +08:00
6c4c0c0c78 fix(esp_rom): remove unsupported rom headers 2023-07-12 01:06:04 -07:00
cadf80e875 Merge branch 'bugfix/fpu_registers_overwritten_v5.1' into 'release/v5.1'
Xtensa: fix a bug that altered CPU registers in FPU exception handlers (backport v5.1)

See merge request espressif/esp-idf!24607
2023-07-12 14:53:21 +08:00
7f722715b9 fix(openthread): Fixed light sleep lock issue 2023-07-12 14:38:36 +08:00
68910618fc openthread: disable HW AES (IDF-7704) 2023-07-12 14:38:18 +08:00
eb04ccaf0b openthread: change readme about specific target to 802.15.4 Soc 2023-07-12 14:38:08 +08:00
b422504d10 ieee802154: exclude sleep file when do not define CONFIG_FREERTOS_USE_TICKLESS_IDLE 2023-07-12 14:37:53 +08:00
55d30cdf2a openthread sleepy device: remove HW acceleration in sdkconfig 2023-07-12 14:37:40 +08:00
6b1e3924af ieee802154: update radio state in test 2023-07-12 14:37:29 +08:00
043893a49f ieee802154: change light sleep config in ieee802154 2023-07-12 14:37:18 +08:00
aee329de2b ieee802154: change BLE_BB/ieee802154_BB 2023-07-12 14:36:55 +08:00
2ac7558da2 openthread: add openthread autostart for sleep device 2023-07-12 14:36:41 +08:00
b4d951fa6a ieee802154: add sleep state 2023-07-12 14:36:21 +08:00
4f537d3b98 ieee802154: support light sleep 2023-07-12 14:32:28 +08:00
65bf500d29 Merge branch 'backport/openthread_feature' into 'release/v5.1'
Backport some Openthread related MR to 5.1(Backport5.1)

See merge request espressif/esp-idf!24285
2023-07-12 14:25:22 +08:00
cc1526c570 protocols/examples: Disable Wifi connection if not supported
- Disable Kconfig option for Wifi if not supported by the SoC
- Enable building mqtt examples when target is set to esp32h2
2023-07-12 06:19:20 +00:00
9fb1b59054 Merge branch 'bringup/esp32h2_light_sleep_for_rebase_backport_v5.1' into 'release/v5.1'
esp32h2: support light_sleep(backport v5.1)

See merge request espressif/esp-idf!24697
2023-07-12 13:39:49 +08:00
3095888aaf fix(wpa_supplicant) : Fix occasional crash during btm roam.
Fix crash due to premature deallocation of neighbour report elements
by scan_done. Post event to btm_rrm_t task to handle scan_done serially
rather than when btm_rrm_t task is processing btm request rx frame.
2023-07-12 10:39:05 +05:30
0c7e2a9d14 Merge branch 'bugfix/bod_intr__v5.1' into 'release/v5.1'
brownout: Disable the hardware BOD when BOD interrupt is enabled(backportv5.1)

See merge request espressif/esp-idf!24692
2023-07-12 11:17:58 +08:00
a0e8f5aa03 Merge branch 'contrib/github_pr_10811_5.1' into 'release/v5.1'
i2c: introduce chip specific cmd register number(backport v5.1)

See merge request espressif/esp-idf!24694
2023-07-12 11:15:03 +08:00
168c47f896 Update itwt.c
Change name from `connect_handler` to `start_handler`
2023-07-12 10:50:55 +08:00
26046c054e Merge branch 'contrib/github_pr_11810_v5.1' into 'release/v5.1'
ledc.c: Fix frequency calculation. (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24696
2023-07-12 10:46:36 +08:00
a09b89b36d fix proto cmd crash problem in iperf example 2023-07-12 10:44:12 +08:00
196fc559b4 Merge branch 'feature/ble_mesh_example_support_duplicate_scan_v5.1' into 'release/v5.1'
Feature/ble mesh example support duplicate scan(v5.1)

See merge request espressif/esp-idf!24700
2023-07-12 10:38:05 +08:00
7d11517a68 Merge branch 'asyncio_error_v5.1' into 'release/v5.1'
fix(tools/hints): add guide to fix error with unsupported asyncio (v5.1)

See merge request espressif/esp-idf!24701
2023-07-12 10:34:23 +08:00
966312e54f Merge branch 'backport/ieee802154_feature' into 'release/v5.1'
Backport some IEEE802154 related MR to 5.1(Backport 5.1)

See merge request espressif/esp-idf!24678
2023-07-12 07:23:43 +08:00
788f1def16 Merge branch 'bugfix/esp_netif_recieve_returns_v5.1' into 'release/v5.1'
esp_netif: Report error if esp_netif_receive() fails (v5.1)

See merge request espressif/esp-idf!24655
2023-07-12 04:07:17 +08:00
6b2209c41d Merge branch 'backport/phy_track_pll_to_v51' into 'release/v5.1'
Backport: phy track pll logic refactor to V5.1(Backport v5.1)

See merge request espressif/esp-idf!24689
2023-07-12 00:13:50 +08:00
7f69e29bff Merge branch 'docs/h2_timer_docs_v5.1' into 'release/v5.1'
docs: updated misc docs with H2 specific information. (v5.1)

See merge request espressif/esp-idf!24136
2023-07-11 23:44:35 +08:00
fa8f99249c fix (nimble): Fix data type of power level and delta to handle negative values 2023-07-11 17:18:09 +05:30
ba54ce8657 esp_phy:update comments in esp_phy_init.h 2023-07-11 17:37:13 +08:00
174c38ba5c Merge branch 'bugfix/fix-esp-even-compile-error-v5.1' into 'release/v5.1'
esp_event: fix build error related to format (v5.1)

See merge request espressif/esp-idf!24664
2023-07-11 17:08:38 +08:00
819da74d9f Merge branch 'bugfix/improve-git-describe-handling-v5.1' into 'release/v5.1'
build system: more accurate error information for git_describe (v5.1)

See merge request espressif/esp-idf!24665
2023-07-11 17:07:40 +08:00
8e2de1b594 Merge branch 'ble_dev/esp32c6_support_power_save_example_5.1' into 'release/v5.1'
ble: support esp32c6 power save example

See merge request espressif/esp-idf!24386
2023-07-11 16:55:22 +08:00
3fc633e326 fix(tools/hints): add guide to fix error with unsupported asyncio
Closes https://github.com/espressif/esp-idf/issues/11732
2023-07-11 10:53:29 +02:00
7db5541c9f Merge branch 'docs/add_Chinese_translation_for_api-guides/tools/idf-py_backport_v5.1' into 'release/v5.1'
docs: add CN translation for api-guides/tools/idf-py.rst (backport v5.1)

See merge request espressif/esp-idf!24190
2023-07-11 16:34:23 +08:00
6f253e2d37 docs: add CN translation for api-guides/tools/idf-py.rst (backport v5.1) 2023-07-11 16:34:23 +08:00
7e3463768f Merge branch 'bugfix/saving-esp-idf-env-as-utf8-v5.1' into 'release/v5.1'
build system: fix init.bat crash in windows when folder contains unicode characters (v5.1)

See merge request espressif/esp-idf!24666
2023-07-11 16:00:15 +08:00
3603611af1 freertos: add a unit test for FPU context switch 2023-07-11 15:55:40 +08:00
f002aeae3d Xtensa: fix a bug that altered CPU registers in FPU exception handlers
* Fixes https://github.com/espressif/esp-idf/issues/11690
2023-07-11 15:55:35 +08:00
573755a8d2 feat(ble_mesh: stack: esp32c6/h2): update Kconfig file to support duplicate scan. 2023-07-11 15:54:48 +08:00
e5e25c89e7 feat(ble_mesh: example: esp32c6/h2): update config file to support duplicate scan. 2023-07-11 15:54:41 +08:00
1d158ddd10 fix(ledc): fix frequency calculation
ledc.c: Fix frequency calculation.
Round int instead of truncate.

Merges https://github.com/espressif/esp-idf/pull/11810
2023-07-11 15:22:34 +08:00
af5a2fe4fd bugfix: update pm trace io num for esp32h2 2023-07-11 15:06:01 +08:00
28cdaa58bb docs: updated misc docs with H2 specific information. 2023-07-11 07:05:53 +00:00
efc9761ff0 Merge branch 'fix/heap-test-h2_v5.1' into 'release/v5.1'
heap: remove exclusion of esp32h2 as a target for heap pytest (v5.1)

See merge request espressif/esp-idf!24567
2023-07-11 15:05:07 +08:00
ee299b2d53 bugfix: set FORCE_INLINE_ATTR for resume_uart 2023-07-11 15:04:19 +08:00
c2b8a1d95c i2c: introduce chip specific cmd register number
Merges https://github.com/espressif/esp-idf/pull/10811
2023-07-11 14:55:46 +08:00
d191b0c540 Power Management: fix hp xtal wait bug for esp32h2 and esp32c6 2023-07-11 14:53:43 +08:00
60a3e5053e Power Management: support pu xtal in light sleep for esp32h2 2023-07-11 14:53:15 +08:00
7599d07c3f bugfix: remove the workaround implemented in MR 22773 about the lp_timer 2023-07-11 14:53:02 +08:00
6e15f589cc Power Management: move lp_timer_hal.c to upper hal layer for esp32h2 and esp32c6 2023-07-11 14:52:46 +08:00
8aaa256aa9 Power Management: support RC32K or Crystal32K powered down 2023-07-11 14:52:35 +08:00
c15c8664ca codeclean: fix prefix to LP_AON and add LP_AON_STORE8_REG 2023-07-11 14:52:24 +08:00
f44e8a8a8f brownout: Disable the hardware BOD when BOD interrupt is enabled 2023-07-11 14:32:40 +08:00
bdc49fbff4 ieee802154: update test code 2023-07-11 14:28:54 +08:00
91d17e0073 ieee802154: support ieee802154 test 2023-07-11 14:28:54 +08:00
c80ee99c6a ieee802154: add a patch for ieee802154 test 2023-07-11 14:28:54 +08:00
bba902cc46 ieee802154: add CONFIG_IEEE802154_TEST for supporting ieee802154 test 2023-07-11 14:28:54 +08:00
e88adc3401 IEEE802154: match C6 max txpower value with datasheet 2023-07-11 14:28:54 +08:00
b135270e68 ieee802154: add modem reset and fix ieee802154 test app reg command error 2023-07-11 14:28:54 +08:00
181ed29c3a feat(openthread): Add event post for thread role changed and integrate all the thread state change callbacks 2023-07-11 14:27:05 +08:00
bcd99bb58d fix(openthread): fix ot settings out of range issue 2023-07-11 14:21:19 +08:00
a125e8f7ed Merge branch 'feature/services_proximity_v5.1' into 'release/v5.1'
NimBLE : Added proximity sensor as a service (v5.1)

See merge request espressif/esp-idf!24649
2023-07-11 14:04:31 +08:00
2c9a2a76f7 example: bringup light sleep example for esp32h2 2023-07-11 13:58:08 +08:00
2abfeb19c8 Power Management: change the IO hold interface for esp32c6 2023-07-11 12:04:20 +08:00
8ef8459c0d Power Management: update pmu init and sleep parameter 2023-07-11 12:04:09 +08:00
3b40ce4d9b Power Management: fix REGDMA clock issue when wake up form light sleep 2023-07-11 12:03:59 +08:00
e5e0a0918a Power Management: support MODEM domain powered down in light sleep for esp32h2 2023-07-11 12:03:46 +08:00
c39a0cc0b5 Power Management: fix REGDMA power issue when TOP domain powered down during light sleep for esp32h2 2023-07-11 12:03:36 +08:00
113366820b Power Management: support TOP domain powered down in light sleep for esp32h2 2023-07-11 12:03:25 +08:00
24486dd069 Power Management: support PAU REGDMA feature for esp32h2 2023-07-11 12:03:13 +08:00
c12d7f5463 Power Management: support CPU powered down in light sleep for esp32h2 2023-07-11 12:03:02 +08:00
356fa3ab4b Power Management: support DFS and PMU feature for esp32h2 2023-07-11 12:02:39 +08:00
62b20b5518 Merge branch 'bugfix/esp_event_err_docs_v5.1' into 'release/v5.1'
fix(core-system/esp event): Fixed missing error return  documentation for... (v5.1)

See merge request espressif/esp-idf!24573
2023-07-11 11:46:43 +08:00
2bee46a354 esp_phy: phy track pll logic refactor 2023-07-11 10:50:29 +08:00
244be856b2 openthread: enable HW AES in ot_cli example 2023-07-11 10:39:34 +08:00
72cc92578d Openthread: fix dead lock related to ot and lwip 2023-07-11 10:39:34 +08:00
26c0a23598 openthread: change partition table to nvs flash 2023-07-11 10:39:34 +08:00
d4dd3dfa2b openthread: introduce the auto start API 2023-07-11 10:39:34 +08:00
f3924e5aa8 openthread: add source address selection hook 2023-07-11 10:39:34 +08:00
bcb9e6b5eb lwip: add a hook for ip6 source address selection 2023-07-11 10:39:34 +08:00
e9a8456279 Merge branch 'fix/mbedtls_ecdsa_veriy_restartable_v5.1' into 'release/v5.1'
mbedtls: update submodule (v5.1)

See merge request espressif/esp-idf!24636
2023-07-11 10:18:27 +08:00
87426b8fbd Merge branch 'fix/esp32s3_sysview_trace_corrupt_v5.1' into 'release/v5.1'
fix(app_trace): Fix apptrace data corruption on ESP32-S3 (v5.1)

See merge request espressif/esp-idf!24680
2023-07-11 08:37:55 +08:00
37ff7a92bf Merge branch 'bugfix/wps_deauth_sent_before_eap_failure_v5.1' into 'release/v5.1'
Fix for sending deauth before Eap-Failure in WPS (v5.1)

See merge request espressif/esp-idf!24368
2023-07-11 06:43:27 +08:00
18a8f86ecb Merge branch 'bugfix/lwip_dhcps_hook_types_v5.1' into 'release/v5.1'
lwip: Fix incorrect invocation of the hook `LWIP_HOOK_DHCPS_POST_APPEND_OPTS` (v5.1)

See merge request espressif/esp-idf!24658
2023-07-11 03:31:31 +08:00
1dbbd97749 ble: support esp32c6 power save example 2023-07-10 18:08:37 +00:00
0cf0757224 Merge branch 'bugfix/ulp_fsm_ci_v5.1' into 'release/v5.1'
ulp-system/ulp-fsm: clean up test cases (v5.1)

See merge request espressif/esp-idf!24070
2023-07-11 01:46:39 +08:00
6cd4e61149 Merge branch 'bigfix/examples_ping_console_v5.1' into 'release/v5.1'
examples: Fix icmp-echo to auto connect to Ethernet/WiFi if selected (v5.1)

See merge request espressif/esp-idf!24654
2023-07-11 01:45:54 +08:00
cf517e3e39 Merge branch 'bugfix/tempsensor_wifi_conflict_v5.1' into 'release/v5.1'
temperature_sensor: Fix issue that have conflict with phy / Fix phy pwdet and tsens power cannot be set twice issue (v5.1)

See merge request espressif/esp-idf!24064
2023-07-11 01:38:04 +08:00
bdbb717be9 mbedtls: update submodule to include:
fix: mbedtls_ecdsa_can_do was not being defined when ECDSA_SIGN_ALT is defined but ECDSA_VERIFY_ALT is not defined causing mbedtls_ecdsa_verify_restartable to always fail.
feature: initial version of the sbom.yml file
2023-07-10 14:11:51 +00:00
a09a503073 Merge branch 'bugfix/nan_sd_dp_fixes_v5.1' into 'release/v5.1'
NAN Service discovery and datapath bugfixes (Backport v5.1)

See merge request espressif/esp-idf!24383
2023-07-10 21:44:49 +08:00
24011f1e6c Merge branch 'fix/update_doc_for_spi_slave_hd_protocol_v5.1' into 'release/v5.1'
fix(all): update documentaion for spi slave hd protocols (v5.1)

See merge request espressif/esp-idf!24635
2023-07-10 19:39:45 +08:00
3eacf08267 fix(app_trace): Fix apptrace data corruption on ESP32-S3
Close https://github.com/espressif/esp-idf/issues/10604
diff --git a/components/soc/esp32s3/include/soc/tracemem_config.h b/components/soc/esp32s3/include/soc/tracemem_config.h
index 55c9b907dd..75fd87419b 100644
--- a/components/soc/esp32s3/include/soc/tracemem_config.h
+++ b/components/soc/esp32s3/include/soc/tracemem_config.h
@@ -10,7 +10,7 @@ extern "C" {
 #endif

 #define TRACEMEM_MUX_BLK0_NUM                   22
-#define TRACEMEM_MUX_BLK1_NUM                   23
+#define TRACEMEM_MUX_BLK1_NUM                   26

 #if (TRACEMEM_MUX_BLK0_NUM < 6) || (TRACEMEM_MUX_BLK0_NUM > 29)
 #error Invalid TRAX block 0 num!
2023-07-10 13:06:02 +03:00
e21fc0dc50 Merge branch 'feature/update_ble_libs_5.1' into 'release/v5.1'
ble: Added APIs for QA test

See merge request espressif/esp-idf!24651
2023-07-10 17:21:51 +08:00
e68d4a7177 Merge branch 'feature/update_ble_duplicte_vs_hci_lib_fix_5_1' into 'release/v5.1'
Feature/update ble duplicte vs hci lib fix 5 1

See merge request espressif/esp-idf!24638
2023-07-10 15:09:18 +08:00
fed2e21594 Merge branch 'feature/usb/host/hid_example_update_v5.1' into 'release/v5.1'
USB Host (HID): HID Host example update (backport v5.1)

See merge request espressif/esp-idf!24532
2023-07-10 13:31:53 +08:00
7bce53cc0d build system: fix init.bat crash in windows when folder contains unicode characters 2023-07-10 11:33:01 +08:00
d636754e70 build system: more accurate error information for git_describe
Closes https://github.com/espressif/esp-idf/issues/9071

See merge request espressif/esp-idf!23891
2023-07-10 11:31:32 +08:00
e29e39f9d6 esp_event: fix build error related to format
Closes https://github.com/espressif/esp-idf/issues/11428

See merge request !23833
2023-07-10 11:28:03 +08:00
0954babbd6 temperature_sensor: make as a weak link 2023-07-10 11:16:09 +08:00
a33541f036 phy: fix phy pwdet and tsens power cannot be set twice issue
Closes https://github.com/espressif/esp-idf/issues/11627
2023-07-10 11:16:09 +08:00
e493a99da2 temperature_sensor: Apply new-shared interface in temperature sensor driver 2023-07-10 11:16:09 +08:00
acc6d99572 temperature_sensor: Add new interface and reference counts so that phy and driver can use together 2023-07-10 11:16:09 +08:00
4a1c291389 fix(all): update documentaion for spi slave hd protocols 2023-07-10 03:00:45 +00:00
3b7dc69e90 Merge branch 'feature/sync_libphy_v5.1' into 'release/v5.1'
sync libphy to v5.1

See merge request espressif/esp-idf!24588
2023-07-10 10:38:41 +08:00
bd985deee6 Merge branch 'doc/add_timing_diagram_for_bt_l2cap_server_and_client_v5.1' into 'release/v5.1'
docs(examples/bluetooth): Add the sequence diagram for L2CAP connection and the discription for the diagram (backport v5.1)

See merge request espressif/esp-idf!24661
2023-07-10 10:30:27 +08:00
0930b5ca1e Merge branch 'bugfix/fix_spi_flash_api_concurrency_issue_v5.1' into 'release/v5.1'
spi_flash: fix concurrency issue when concurrently calling esp_flash apis (v5.1)

See merge request espressif/esp-idf!24508
2023-07-10 10:24:51 +08:00
c558904661 Merge branch 'bugfix/handle_correct_return_value_v5.1' into 'release/v5.1'
Nimble: Corrected conditional check during connection to handle failure case (v5.1)

See merge request espressif/esp-idf!24644
2023-07-10 10:24:18 +08:00
28860655af Merge branch 'bugfix/update_esp_rom_layout_v5.1' into 'release/v5.1'
esp_rom: fix rom layout issues (backport v5.1)

See merge request espressif/esp-idf!24639
2023-07-10 10:23:16 +08:00
33aff4c5a0 Fix for sending deauth before Eap-Failure in WPS 2023-07-10 02:20:51 +00:00
59f91c5f37 Merge branch 'bugfix/fix_deepsleep_wakestub_example_ci_failure_v5.1' into 'release/v5.1'
ci: fix deepsleep wakestub example ci failure (backort v5.1)

See merge request espressif/esp-idf!24465
2023-07-10 10:19:40 +08:00
625ebbf829 docs(examples/bluetooth): Add the sequence diagram of L2CAP connection and the discription for the sequence diagram
1: add the sequence diagram for the bluetooth example projects,bt_l2cap_server and bt_l2cap_client, which implenment the L2CAP connection.
2: add the discription for the sequence diagram.
2023-07-08 12:38:42 +08:00
575a433c98 Fix incorrect invocation of the hook LWIP_HOOK_DHCPS_POST_APPEND_OPTS
Fix https://github.com/espressif/esp-idf/issues/11373
2023-07-07 14:14:02 +02:00
cf4c39a225 esp_netif: Make esp_netif_receive() return value configurable 2023-07-07 13:56:13 +02:00
39b8218750 esp_netif: Report error if esp_netif_receive() fails
Closes https://github.com/espressif/esp-idf/issues/10770
2023-07-07 13:56:13 +02:00
7865676159 examples: Fix icmp-echo to auto connect to Ethernet/WiFi if selected
Closes https://github.com/espressif/esp-idf/issues/10655
2023-07-07 13:53:47 +02:00
a7b62bbcaf Merge branch 'bufix/fix_assert_while_stack_deinit_v5.1' into 'release/v5.1'
NimBLE :  Fix assert due to controller event while stack deinit (v5.1)

See merge request espressif/esp-idf!24620
2023-07-07 19:41:52 +08:00
027e6ecab9 ble: Added APIs for QA test 2023-07-07 19:40:48 +08:00
5c11366e01 Merge branch 'feature/support_adc_calibration_on_c6_v5.1' into 'release/v5.1'
adc_cali: supported adc calibration on esp32c6 (v5.1)

See merge request espressif/esp-idf!23936
2023-07-07 18:29:11 +08:00
18ffa02b72 esp_wifi : Fix collection of issues during sta scan and roam.
1) Fix issue during split scan to allow for data tx.
2) Fix issue when parsing wpa_ie to set correct authmode when AP
   supports both WPA_EAP and WPA_EAP_SHA256 authmode.
   Closes https://github.com/espressif/esp-idf/issues/11202
3) Fix an occasional crash during sta roam.
4) Add home_channel_dwell_time to wifi_scan_config_t. This allows
   configuration of the time spent between scanning consecutive
   channels for tx.
2023-07-07 18:11:38 +08:00
43604dffbe esp_wifi: fix ret when setting channel at wifi not started, fix timer callback 2023-07-07 18:09:29 +08:00
6cb39b4485 Merge branch 'bugfix/concurrency_while_eloop_register_v5.1' into 'release/v5.1'
esp_wifi: Bugfix concurrency observed while doing eloop register (v5.1)

See merge request espressif/esp-idf!24570
2023-07-07 18:00:49 +08:00
8592f19a95 esp_phy: fix rtc_printf and libbtbb version print 2023-07-07 17:39:25 +08:00
044baf90e5 sync libphy to v5.1 2023-07-07 17:38:01 +08:00
66f384cad0 Merge branch 'bugfix/added_chip_based_cca_config_v5.1' into 'release/v5.1'
ble: fix cca for esp32c2

See merge request espressif/esp-idf!24426
2023-07-07 17:31:00 +08:00
893967f596 feat (NimBLE): Add proximity sensor as a service 2023-07-07 14:59:22 +05:30
64ba835d05 Merge branch 'feat/improve_wifi_rx_in_high_interference_v5.1' into 'release/v5.1'
esp_phy: update esp32c2 phy lib to fix some issues(v5.1)

See merge request espressif/esp-idf!24163
2023-07-07 17:19:27 +08:00
a787b927c7 Nimble: Corrected conditional check during connection to handle failure case 2023-07-07 14:33:44 +05:30
a8c9665ae2 Merge branch 'ble_dev/support_esp32h2_modem_clock_selection_5.1' into 'release/v5.1'
ble: support esp32h2 modem clock selection

See merge request espressif/esp-idf!24388
2023-07-07 16:57:22 +08:00
68654bfd5f Merge branch 'feature/add_support_pcl_vsc_v5.1' into 'release/v5.1'
fix(Nimble): Add VSC / VSE handling code and structure for PCL Set RSSI (v5.1)

See merge request espressif/esp-idf!24608
2023-07-07 16:27:26 +08:00
fc7d4488bf esp_rom: fix rom layout issues 2023-07-07 01:02:07 -07:00
730d8e18d8 fix(ble): Fix duplicate var length issue 2023-07-07 14:29:21 +08:00
1398605873 fix(ci): Fix declaration isn't a prototype issue 2023-07-07 14:29:21 +08:00
0359d0df5d feat(ble): Update ble lib to 6f9ef119 2023-07-07 14:29:21 +08:00
eea7df273c change(ble): Enable pdu type trig in duplicate in default mode as before 2023-07-07 14:29:21 +08:00
a5f127ec88 feat(ble): Add duplicate refersh function support for esp32h2 2023-07-07 14:29:21 +08:00
2b195191b3 feat(ble): Add support to scan period refresh duplicate cache list 2023-07-07 14:29:21 +08:00
a357fd17c2 feat(ble): Add duplicate filter feature enable on ble for h2. 2023-07-07 14:29:21 +08:00
6dc7d9b63f feat(ble): Add duplicate filter feature enable on ble for c6. 2023-07-07 14:29:21 +08:00
a7f00f503a spi_flash: rename spi_flash_os_func_app: spi_start, spi_end
spi_start -> s_acquire_spi_bus_lock
spi_end -> s_release_spi_bus_lock
2023-07-07 10:13:28 +08:00
f142415475 spiflash: added esp_flash API concurrency pressure test 2023-07-07 10:13:28 +08:00
faa8c2bc8f spi_flash: fix concurrency issue when calling esp_flash apis under xip_psram or auto_suspen 2023-07-07 10:13:28 +08:00
d2e8dccd40 spiflash: fix not calling on_spi_acquired when CONFIG_SPI_FLASH_SHARE_SPI1_BUS issue 2023-07-07 10:13:28 +08:00
7c6ab05f50 feat(nimble): Add support for PCL Set RSSI VSC and example code for its usage
This commit adds support for sending Vendor Specific HCI commands and handling Vendor Specific HCI
Events in the Nimble stack. It also includes the necessary configuration options and APIs to handle
these commands and events.

The following changes were made:
- Added configuration option to enable support for VSC and VSE
- Added API to send Vendor Specific HCI commands
- Added example code for using the Set RSSI VSC for Power Control

This commit also includes some minor code improvements and bug fixes
2023-07-06 19:54:19 +05:30
022ce314c3 Nimble: Add APIs to handle vs HCI commands and events 2023-07-06 19:54:19 +05:30
bb3bd09b93 esp_phy: update esp32c2 phy lib to fix some issues
1. improve Wi-Fi rx 11b pkts for AC-DC power supply modules.
2. fix Wi-Fi disconnect in low temperature.
3. fix RTC_SW_CPU_RST occur in Wi-Fi start and stop process.
2023-07-06 17:09:09 +08:00
f1b9af72fd Merge branch 'bugfix/sync_reporting_files_v5.1' into 'release/v5.1'
NimBLE : Sync common porting and nimble submodule files (v5.1)

See merge request espressif/esp-idf!24277
2023-07-06 15:05:54 +08:00
d25df894fa Merge branch 'bugfix/host_flw_ctrl_v5.1' into 'release/v5.1'
NimBLE: Fixed mismatch of number of completed packtes in host flow control (v5.1)

See merge request espressif/esp-idf!23854
2023-07-06 14:33:06 +08:00
7b70e2eb34 ble: fix cca for esp32c2 2023-07-06 14:05:43 +08:00
fe05003a8f fix(nimble): Fix assert due to controller event while stack deinit 2023-07-06 10:30:36 +05:30
57312e6e3e adc_calib: support calibration v2 on esp32c6 2023-07-06 10:36:29 +08:00
5e3488396a Merge branch 'bugfix/fix_some_bt_controller_bug_v5.1' into 'release/v5.1'
component_bt:Fixed some bluetooth bugs(v5.1)

See merge request espressif/esp-idf!24579
2023-07-06 00:54:40 +08:00
16ff61b36e Merge branch 'ble_dev/support_ble_light_sleep_using_extra_link_5.1' into 'release/v5.1'
Ble dev/support ble light sleep using extra link 5.1

See merge request espressif/esp-idf!24192
2023-07-05 20:32:56 +08:00
71a5663786 Merge branch 'bugfix/hfp_packet_type_err_v5.1' into 'release/v5.1'
Revised (e)SCO configuration parameter sets (v5.1)

See merge request espressif/esp-idf!24346
2023-07-05 20:05:59 +08:00
d682fbeb07 Merge branch 'bugfix/alarm_not_free_when_a2dp_deinit_v5.1' into 'release/v5.1'
bugfix/Fixed the issue of alarm leak (v5.1)

See merge request espressif/esp-idf!24351
2023-07-05 19:53:09 +08:00
425b660583 Merge branch 'feature/update_avrcp_v1.5_v5.1' into 'release/v5.1'
change(bt/Bluedroid): Update AVRCP version to 1.5 (v5.1)

See merge request espressif/esp-idf!24582
2023-07-05 19:52:09 +08:00
4474b0ac8c Merge branch 'bugfix/resume_ext_scan_pti_in_time_v5.1' into 'release/v5.1'
bt: fix the issue that BLE scan uses high priority incorrectly and causes Wi-Fi unable to work normally on ESP32-C3 and ESP32-S3(backport v5.1)

See merge request espressif/esp-idf!24403
2023-07-05 19:49:05 +08:00
51ed7ef9f1 Merge branch 'bugfix/fix_hang_during_sleep_process_v5.1' into 'release/v5.1'
Power Management: fix hang on pd_top sleep process (backport v5.1)

See merge request espressif/esp-idf!24459
2023-07-05 19:48:19 +08:00
60163c3b0f Merge branch 'bugfix/memory_cleanup_optimization_v5.1' into 'release/v5.1'
Nimble: Fixes for memory leak / optimization (v5.1)

See merge request espressif/esp-idf!24139
2023-07-05 19:42:58 +08:00
97b0cb9d14 Merge branch 'contrib/github_pr_11337_v5.1' into 'release/v5.1'
w5500: mac: poll VERSIONR to ensure the chip is initialised (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24551
2023-07-05 19:34:10 +08:00
87b960121a Merge branch 'contrib/github_pr_10987_v5.1' into 'release/v5.1'
Allow to config the maximum number of VFS entries. (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23871
2023-07-05 19:32:32 +08:00
40f93bcc41 Merge branch 'ci/tcp_transport_test_app_v5.1' into 'release/v5.1'
ci: Migrate unit test for tcp_transport to unit test app (v5.1)

See merge request espressif/esp-idf!24248
2023-07-05 19:30:44 +08:00
aa434942c1 Merge branch 'backport/fix_multipan_api_error_and_coex_delay_reg' into 'release/v5.1'
ieee802154: fix multipan api error and update coex_arb_delay reg(Backport v5.1)

See merge request espressif/esp-idf!24399
2023-07-05 19:30:07 +08:00
9658469de2 Merge branch 'backport/modification_when_154_stop_tx_rx_ack' into 'release/v5.1'
Fix OpenThread/IEEE802.15.4 bugs found in test(backport v5.1)

See merge request espressif/esp-idf!24060
2023-07-05 19:28:43 +08:00
b8cfb56c43 Merge branch 'bugfix/tx_only_link_up_v5.1' into 'release/v5.1'
Ethernet minor fixes (v5.1)

See merge request espressif/esp-idf!23968
2023-07-05 19:25:46 +08:00
46396d7c16 Merge branch 'bugfix/usb_serial_jtag_select_poll_crash_v5.1' into 'release/v5.1'
vfs: select sanity NULL check (v5.1)

See merge request espressif/esp-idf!23946
2023-07-05 19:25:25 +08:00
5d05aa9942 fix(esp_wifi): NAN Service discovery and datapath bugfixes
1. Increase timeout value for NDP Accepted/Rejected events
2. Update publisher ID incase publisher restarts(service)
3. Ignore service discovery frames with invalid/inactive service ID
4. Update NAN documentation
2023-07-05 14:33:56 +05:30
f3e2681766 Merge branch 'contrib/github_pr_11743_v5.1' into 'release/v5.1'
docs(jtag): Update chip revisions to follow ESP32-C3 errata (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24589
2023-07-05 15:26:26 +08:00
1e7d3425e5 bt-coexist: fix the issue for BLE scan in using whitelist that scan PTI keeps high and not resumes after reception of ADV_EXT_IND but no AUX_ADV_IND followed on ESP32-C3 and ESP32-S3, which causes Wi-Fi unable to work normally 2023-07-05 12:54:59 +08:00
6f673e95c9 adc_oneshot: move power acquire back to adc_oneshot_new_unit
Revert and fix of d197c59eaa in !23575

adc_cali: fix the condition of ocode calibration
2023-07-05 12:48:11 +08:00
e90a2d50c4 adc_cali: supported channel compensation of adc calibration on esp32c6 2023-07-05 12:48:11 +08:00
0b7485db02 efuse(c6): Adds adc calib efuses 2023-07-05 12:48:11 +08:00
6336a9e2b5 adc_cali: supported adc calibration on esp32c6 2023-07-05 12:48:11 +08:00
a41f5387c1 NimBLE : Sync porting files 2023-07-05 10:02:58 +05:30
a2a674a107 NimBLE: Fixed mismatch of number of completed packtes in host flow control 2023-07-05 10:01:46 +05:30
e0b98b75e7 Merge branch 'docs/add_provisioning_CN_trans_backport_v5.1' into 'release/v5.1'
Docs: add CN translation for api-reference/provisioning/provisioning.rst (backport v5.1)

See merge request espressif/esp-idf!24486
2023-07-05 12:29:45 +08:00
deca1e79ba Docs: add CN translation for api-reference/provisioning/provisioning.rst (backport v5.1) 2023-07-05 12:29:45 +08:00
bcde9d944e Merge branch 'docs/add_Chinese_translation_for_linux-host-requirements.rst_and_external-ram-esp32-notes.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for linux-host-requirements.rst and external-ram-esp32-notes.rst (backport v5.1)

See merge request espressif/esp-idf!24491
2023-07-05 12:29:08 +08:00
4e2acf1af7 docs: provide CN translation for linux-host-requirements.rst and external-ram-esp32-notes.rst (backport v5.1) 2023-07-05 12:29:08 +08:00
2cffd23655 Merge branch 'bugfix/pmu_wait_xtal_stable_time_issue' into 'release/v5.1'
fix PMU wait xtal stable time issue for esp32c6

See merge request espressif/esp-idf!24259
2023-07-05 12:27:26 +08:00
7c696fcb71 Merge branch 'bugfix/rtc_clk_int_rc32k_miss_calib_cycles_config_v5.1' into 'release/v5.1'
backport v5.1: fix the issue of missing configuration for calibration cycles of the internal 32 kHz RC

See merge request espressif/esp-idf!24584
2023-07-05 12:27:08 +08:00
9d47a58750 Merge branch 'bugfix/macro_changes_in_nimble-1.5_v5.1' into 'release/v5.1'
NimBLE : Update macro name changes in nimble-1.5 (v5.1)

See merge request espressif/esp-idf!23745
2023-07-05 12:24:52 +08:00
8051cb704c Merge branch 'bugfix/fix_bootloader_wrong_spi_freq_print_v5.1' into 'release/v5.1'
bugfix: fix esp32c6 bootloader print wrong spi speed mode (backport v5.1)

See merge request espressif/esp-idf!24460
2023-07-05 12:24:16 +08:00
bd0343c9c3 Merge branch 'bugfix/fix_config_option_v5.1' into 'release/v5.1'
Nimble: Fixed setting macro values based on selected configuration (v5.1)

See merge request espressif/esp-idf!24137
2023-07-05 12:16:36 +08:00
bcef59f33c Merge branch 'bugfix/mbedtls_dyanmic_buffer_with_dhm_build_v5.1' into 'release/v5.1'
fix(mbedtls): Build issue in dynamic buffer feature (v5.1)

See merge request espressif/esp-idf!24537
2023-07-05 12:04:00 +08:00
051965af52 Merge branch 'bugfix/fix_pcl_enh_rsp_v5.1' into 'release/v5.1'
Nimble: Removed the extra status field in the enh read transmit power level (v5.1)

See merge request espressif/esp-idf!23883
2023-07-05 12:00:25 +08:00
4b761af41b Merge branch 'docs/walkthrough_for_multi_adv_examples_v5.1' into 'release/v5.1'
Nimble: Added Example Walkthrough tutorial for Multi Adv example (v5.1)

See merge request espressif/esp-idf!24509
2023-07-05 11:58:46 +08:00
4ea182eaa2 Merge branch 'docs/add_a_note_about_RMT_preipheral_in_the_programming_guide_v5.1' into 'release/v5.1'
rmt: add a note about binding channels to the same GPIO (v5.1)

See merge request espressif/esp-idf!24566
2023-07-05 10:08:33 +08:00
b875331c31 Merge branch 'bugfix/remove_python_examples_ttfw_v5.1' into 'release/v5.1'
Nimble:Removed files referring to old TTFW framework (v5.1)

See merge request espressif/esp-idf!23497
2023-07-05 10:08:03 +08:00
c6bc222d54 Merge branch 'feature/walkthrough_for_htp_examples_v5.1' into 'release/v5.1'
Nimble: Added Example Walkthrough tutorial for HTP example in nimble (v5.1)

See merge request espressif/esp-idf!24534
2023-07-05 10:07:37 +08:00
c66e4a8a50 Merge branch 'bugfix/ringbuf_static_object_size_v5.1' into 'release/v5.1'
Ringbuf: Fix ordering of StaticRingbuffer_t (v5.1)

See merge request espressif/esp-idf!24593
2023-07-05 09:45:02 +08:00
163f0721dd feat(usb): update HID Host example 2023-07-05 00:52:13 +00:00
09808b7fb4 Merge branch 'doc/updata_adc_migration_guide_v5.1' into 'release/v5.1'
migration_guide: update adc calibration api part (v5.1)

See merge request espressif/esp-idf!24257
2023-07-05 08:49:26 +08:00
8cb70f0d12 ringbuf: Fix ordering of StaticRingbuffer_t
When building on linux/host compilers (e.g., GCC), the compiler may add padding
depending on the size and order of the member types.

This commit fixes the ordering or the StaticRingbuffer_t such that it matches
the internal Ringbuffer_t. The "_Static_assert" is always enabled for all
compilers.

Closes https://github.com/espressif/esp-idf/issues/11726
2023-07-04 21:30:43 +01:00
c81bc8c819 Merge branch 'bugfix/aes_dma_align_issue_v5.1' into 'release/v5.1'
aes: fix DMA descriptor calculation for the alignment case (v5.1)

See merge request espressif/esp-idf!24093
2023-07-04 19:57:10 +08:00
8f0d41d02b docs(jtag): Update CN translation of 'api-guides/jtag-debugging/index.rst' 2023-07-04 19:29:24 +08:00
1737366af7 docs(jtag): Update chip revisions to follow ESP32-C3 errata (GitHub PR) 2023-07-04 19:29:24 +08:00
7b6af86814 docs(rmt): add a note about binding channels to the same GPIO
Added a note about RX Channel and TX Channel initialization order when
bound RX and TX to the same gpio.

Closes https://github.com/espressif/esp-idf/issues/11768
2023-07-04 19:26:33 +08:00
3ded61323d Nimble: Added Example Walkthrough tutorial for Multi Adv example 2023-07-04 15:55:04 +05:30
3345092a44 Nimble: Added Example Walkthrough tutorial for HTP example in nimble 2023-07-04 15:54:34 +05:30
40bf1ed65e Merge branch 'bugfix/add_event_cb_for_pcl_v5.1' into 'release/v5.1'
Nimble: Add support to send power control event in registered callback (v5.1)

See merge request espressif/esp-idf!23583
2023-07-04 18:18:59 +08:00
1ed419e23c Nimble: Removed the extra status field in the enh read transmit power level 2023-07-04 15:48:38 +05:30
4e1ec90525 Nimble: Fixed setting macro values based on selected configuration 2023-07-04 15:48:16 +05:30
73639cf0b4 Nimble: Fixes for memory leak / optimization 2023-07-04 15:45:22 +05:30
d39b4d849e Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/rmt.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/rmt.rst (backport v5.1)

See merge request espressif/esp-idf!24540
2023-07-04 18:12:46 +08:00
9216bdc078 Power Management: fix PMU wait xtal stable time issue 2023-07-04 16:22:00 +08:00
94a10372cc feature: skip console uart flush and sleep when estimated uart flush time exceeds the sleep duration to avoid rtos tick jump failed 2023-07-04 16:14:20 +08:00
963fac95d7 fix(rtc_clk): fix the issue of missing configuration for calibration cycles of the internal 32 kHz RC 2023-07-04 16:06:37 +08:00
015555c6fb change(bt/Bluedroid): Update AVRCP version to 1.5 2023-07-04 15:52:29 +08:00
6e9dabe659 bt: Fixed some bluetooth bugs
1. Fixed LC_AFH_UPDATE_IND  has not benn processed causing memory exhaustion
2. Fixed no free elt in prog push
3. Fixed disconnect due to sniff with error Dsniff
4. Fixed the problem that the host continued to send ACL data to the controller after disconnection, which caused the connection to fail again
2023-07-04 15:03:10 +08:00
4bf8f8895c Update bt-lib for esp32
- Fixed memory leak when setting adv data
2023-07-04 15:03:05 +08:00
50904e9353 components/bt: Fix crash due to NULL point 2023-07-04 14:55:04 +08:00
b5cab579fe fix(core-system/esp event): Fixed missing error return documentation for esp_event_loop_create_default
ESP_ERR_INVALID_STATE was not listed as a possible return error code.

Closes https://github.com/espressif/esp-idf/issues/11745
2023-07-04 13:41:51 +08:00
0e1bcddd70 Merge branch 'bugfix/throughput_watchdog_on_c6_v5.1' into 'release/v5.1'
Nimble: Fix watchdog timer issue in throughput app (v5.1)

See merge request espressif/esp-idf!24266
2023-07-04 13:35:12 +08:00
d9426fc255 Merge branch 'contrib/github_pr_11652_v5.1' into 'release/v5.1'
Fix ULP FSM register macros with addr[9:0] > 0xFF (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24268
2023-07-04 13:27:52 +08:00
29f52acbfe Merge branch 'bugfix/increase_pm_dump_time_field_length_v5.1' into 'release/v5.1'
Power Management: increase pm_dump time field width (backport v5.1)

See merge request espressif/esp-idf!24450
2023-07-04 12:16:38 +08:00
b0717c6852 Merge branch 'feature/enable_sleep_reject_for_deep_sleep_v5.1' into 'release/v5.1'
sleep: enable sleep reject when entering deepsleep (backport v5.1)

See merge request espressif/esp-idf!24440
2023-07-04 12:16:11 +08:00
159e80246b Merge branch 'feature/add_modem_module_rst_api_v5.1' into 'release/v5.1'
modem_clock: add modem module mac reset api (backport v5.1)

See merge request espressif/esp-idf!24441
2023-07-04 12:15:33 +08:00
11d34b143f Merge branch 'bugfix/sdp_32_and_128_bit_UUID_v5.1' into 'release/v5.1'
bt:Fixed SDP not being able to configure 32-bit and 128-bit UUID(v5.1)

See merge request espressif/esp-idf!24442
2023-07-04 12:15:01 +08:00
09f2ab841f Merge branch 'docs/update_esp_hid_host_v5.1' into 'release/v5.1'
[docs] fix documents for Bluetooth HID Host API reference (backport v5.1)

See merge request espressif/esp-idf!24389
2023-07-04 12:14:22 +08:00
c020194656 Revised (e)SCO configuration parameter sets 2023-07-04 04:12:35 +00:00
4ce9023cd4 Fixed the issue of alarm leak in hf-ag 2023-07-04 04:12:24 +00:00
ced0a5747b Fixed the issue of alarm leak in A2DP 2023-07-04 04:12:24 +00:00
38e2a6fce6 esp_wifi: Bugfix concurrency observed while doing eloop register 2023-07-04 09:42:18 +05:30
56bb50b85e Merge branch 'bugfix/fix_some_ble_bugs_v5.1' into 'release/v5.1'
FIxed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!24275
2023-07-04 12:11:35 +08:00
207e589917 Merge branch 'bugfix/support_esp32c6_sleep_retention_extra_link_v5.1' into 'release/v5.1'
backport v5.1: support extra linked list retention for BLE and 15.4

See merge request espressif/esp-idf!24220
2023-07-04 12:11:04 +08:00
54360507f3 Merge branch 'bugfix/malloc_free_removal_v5.1' into 'release/v5.1'
Backport some wifi fixes (backport v5.1)

See merge request espressif/esp-idf!24264
2023-07-04 12:10:21 +08:00
f93f08bcd2 Merge branch 'bugfix/fix_wps_with_sae_enabled_ap_v5.1' into 'release/v5.1'
esp_wifi: Fix WPS issue for WPA3+WPA2 mode (v5.1)

See merge request espressif/esp-idf!24152
2023-07-04 12:09:50 +08:00
30a67ed72c btbb: support register retention in esp32c6 2023-07-04 12:09:22 +08:00
e72359fc66 ble:added esp32c6 light sleep support 2023-07-04 12:09:22 +08:00
b2b0940516 Merge branch 'bugfix/fix_Cache_Count_Flash_bug_v5.1' into 'release/v5.1'
cache: patch some rom cache api, rename those apis in ld (backport v5.1)

See merge request espressif/esp-idf!24289
2023-07-04 12:07:25 +08:00
27a5a6fcae Merge branch 'bugfix/fix_esp32s3_psram_access_failed_in_dfs_v5.1' into 'release/v5.1'
esp_pm: fix esp32s3 psram access failed when dfs is enabled (backport v5.1)

See merge request espressif/esp-idf!24202
2023-07-04 12:06:42 +08:00
4647045388 Merge branch 'bugfix/support_esp326_xtal_xpd_v5.1' into 'release/v5.1'
esp32c6: support xtal xpd (backport v5.1)

See merge request espressif/esp-idf!24253
2023-07-04 12:04:51 +08:00
d4bfed373e Merge branch 'rebase/add_ble_version_support_for_c6_eco1' into 'release/v5.1'
ble:add version num support for esp32c6 chip v5.1

See merge request espressif/esp-idf!23610
2023-07-04 12:03:36 +08:00
8181da4fee heap: remove exclusion of esp32h2 as a target for no/light/comprehensive_poisoning tests 2023-07-04 11:08:59 +08:00
e70c174643 Merge branch 'contrib/github_pr_11405_v5.1' into 'release/v5.1'
Fix initialization macros for twai_timing_config_t not setting .clk_src and .brp (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23983
2023-07-04 11:04:22 +08:00
0e4c071519 Merge branch 'bugfix/fix_i2s_ll_cpp_compilation_failure_v5.1' into 'release/v5.1'
i2s: fixed i2s_ll compiling failure under C++ environment (v5.1)

See merge request espressif/esp-idf!24401
2023-07-04 11:03:35 +08:00
934bdca370 Merge branch 'feature/add_log_when_mspi_timing_tuning_is_enabled_v5.1' into 'release/v5.1'
mspi: added timing tuning start, and success log (v5.1)

See merge request espressif/esp-idf!24053
2023-07-04 11:02:20 +08:00
ee91a42a33 ulp-system/ulp-fsm: clean up test cases 2023-07-04 02:59:15 +00:00
0f0b77b192 Merge branch 'refactor/pump_up_dependency_version_of_es8311_example_v5.1' into 'release/v5.1'
feati(example): bump up dependency version of examples (v5.1)

See merge request espressif/esp-idf!24554
2023-07-04 10:34:18 +08:00
1bf26b2def Merge branch 'bugfix/incorrect_time_after_ota_v5.1' into 'release/v5.1'
esp_hw_support: Fix invalid system time if s_esp_rtc_time_us & s_rtc_last_ticks were moved around (v5.1)

See merge request espressif/esp-idf!24408
2023-07-03 20:37:40 +08:00
0a3fc51ae0 Merge branch 'feature/esp_ipc_isr_fix_v5.1' into 'release/v5.1'
esp_system: Fix a race-condition in esp_ipc_isr (in QEMU env) (v5.1)

See merge request espressif/esp-idf!23991
2023-07-03 20:35:33 +08:00
7d72773d88 Merge branch 'bugfix/systick_loop_v5.1' into 'release/v5.1'
freertos: Fix Systick stuck when systimer was not reset (v5.1)

See merge request espressif/esp-idf!24321
2023-07-03 20:34:58 +08:00
bac32e9c43 feat(example): bump up version of es8311 lvgl in the example 2023-07-03 16:33:42 +08:00
3d181f5346 ble:add version num support for esp32c6 chip 2023-07-03 16:16:06 +08:00
f963c7c009 Merge branch 'bugfix/vfs_uart_outof_bounds_read_v5.1' into 'release/v5.1'
vfs_uart: fix out-of-bounds read (v5.1)

See merge request espressif/esp-idf!24312
2023-07-03 16:13:06 +08:00
4f0f317d54 Merge branch 'bugfix/mcpwm_legacy_typo_v5.1' into 'release/v5.1'
mcpwm: fix typo in backward compatible macro name (v5.1)

See merge request espressif/esp-idf!24227
2023-07-03 16:11:20 +08:00
098e559d46 w5500: rework version check to avoid a false alarm on fault detection
See: https://github.com/espressif/esp-idf/issues/11331
2023-07-03 06:51:15 +00:00
cacb45d450 Merge branch 'bugfix/coverity_scan_fix_driver_v5.1' into 'release/v5.1'
ADC: Fixed potential multiply overflow in the calibration code (v5.1)

See merge request espressif/esp-idf!24091
2023-07-03 13:40:22 +08:00
a17bdbd3ef Merge branch 'bugfix/rgb_pixel_copy_bpp8_v5.1' into 'release/v5.1'
rgb_lcd: Support LCD rotation for LCD whose pixel size is one byte (v5.1)

See merge request espressif/esp-idf!24208
2023-07-03 13:40:07 +08:00
fb0cc7189a NimBLE : Update macro name changes in nimble-1.5 2023-07-03 04:58:43 +00:00
81b03f6d32 Nimble: Add support to send power control event in registered callback 2023-07-03 09:52:59 +05:30
4a27fde8e4 Merge branch 'docs/trans_wifi_provisioning_backport_v5.1' into 'release/v5.1'
Docs: add CN translation for api-reference/provisioning/wifi_provisioning.rst (backport v5.1)

See merge request espressif/esp-idf!24479
2023-07-03 12:18:35 +08:00
1e3f330130 Docs: add CN translation for api-reference/provisioning/wifi_provisioning.rst (backport v5.1) 2023-07-03 12:18:34 +08:00
ec8268d863 fix(mbedtls): Build issue in dynamic buffer feature
Fix build issue in mbedTLS dynamic buffer feature with
`CONFIG_MBEDTLS_DHM_C` enabled case.

Closes https://github.com/espressif/esp-idf/issues/11770
2023-07-03 04:01:19 +00:00
ebb5fb9e88 ble:support esp32h2 power save example 2023-07-03 11:45:16 +08:00
1eb43094c5 phy: update phy enable/disable for h2 light sleep 2023-07-03 11:45:16 +08:00
06c6281add ble: support esp32h2 modem clock selection 2023-07-03 11:45:16 +08:00
c44624c056 Merge branch 'feature/esp_rom_update_cpu_freq_v5.1' into 'release/v5.1'
bootloader_support: add missing esp_rom_sys.h to bootloader_flash.c bootloader build (v5.1)

See merge request espressif/esp-idf!24014
2023-07-03 11:38:38 +08:00
cd4845e431 Merge branch 'bugfix/fixed_ble_create_sync_fail_v5.1' into 'release/v5.1'
Bugfix/fixed ble create sync fail v5.1

See merge request espressif/esp-idf!24305
2023-07-03 10:59:49 +08:00
952998aacd Merge branch 'bugfix/spi_master_assert_failure_v5.1' into 'release/v5.1'
spi_master: fix the assertion on a NULL desired_dev (v5.1)

See merge request espressif/esp-idf!24004
2023-07-03 10:50:28 +08:00
32928e630d Merge branch 'bugfix/led_strip_potential_buffer_overwrite_v5.1' into 'release/v5.1'
example: fix led strip memory overwrite before trans done (v5.1)

See merge request espressif/esp-idf!23938
2023-07-03 10:49:24 +08:00
657586e6ba docs: provide CN translation for api-reference/peripherals/rmt.rst 2023-07-03 10:34:00 +08:00
423931c2fa Merge branch 'bugfix/linux_heap_realloc_v5.1' into 'release/v5.1'
core-system/linux-target: fixed heap_caps_realloc not correctly allocating the... (v5.1)

See merge request espressif/esp-idf!23976
2023-07-03 10:31:40 +08:00
61524a2675 Merge branch 'bugfix/esp32c2_slave_report_address_error_v5.1' into 'release/v5.1'
Bugfix/esp32c2 slave report address error v5.1

See merge request espressif/esp-idf!23923
2023-07-03 10:31:20 +08:00
8c5e1c1d49 Merge branch 'docs/fix_typo_in_api-reference_system_ota_v5.1' into 'release/v5.1'
fix a typo in api-reference/system/ota (v5.1)

See merge request espressif/esp-idf!24444
2023-07-03 09:27:20 +08:00
a4bf7dd65c Merge branch 'docs/update_installation_prerequisites_for_ubuntu_debian_v5.1' into 'release/v5.1'
docs: update installation prerequisites for Ubuntu and Debian system (v5.1)

See merge request espressif/esp-idf!24451
2023-07-03 09:27:07 +08:00
cc74be8dbb Merge branch 'docs/update_code_how_to_configure_multiple_antennas_of_wifi_v5.1' into 'release/v5.1'
docs: update code of how to configure multiple antennas of wifi (v5.1)

See merge request espressif/esp-idf!24456
2023-07-03 09:26:50 +08:00
679ac08d77 Merge branch 'docs/fix_typo_in_api_guides_usb_otg_console_v5.1' into 'release/v5.1'
docs: fix a typo in api-guides/usb-otg-console (v5.1)

See merge request espressif/esp-idf!24453
2023-07-03 09:26:37 +08:00
d7986f9b22 Merge branch 'docs/update_interrupt_number_esp32h2_v5.1' into 'release/v5.1'
docs: update the number of interrupts for esp32h2 (v5.1)

See merge request espressif/esp-idf!24458
2023-07-03 09:26:17 +08:00
f34139e379 Merge branch 'support/esp_coredump_logs_config_v5.1' into 'release/v5.1'
Optionally disable logs in espcoredump component (v5.1)

See merge request espressif/esp-idf!24482
2023-07-02 22:04:59 +08:00
0bf93134f4 Merge branch 'feature/anti_dpa_configuration_c6_h2_v5.1' into 'release/v5.1'
esp32c6/esp32h2: crypto: add support for DPA protection configuration (v5.1)

See merge request espressif/esp-idf!24128
2023-06-30 23:50:44 +08:00
86eb7862ec Merge branch 'bugfix/fix_memory_leak_in_ws_server_example_v5.1' into 'release/v5.1'
example: Fix memory leak in ws_echo_server when httpd_queue_work failed (backport v5.1)

See merge request espressif/esp-idf!23955
2023-06-30 23:49:30 +08:00
d93007b44a Merge branch 'fix/xts_aes_register_prefix_discrepancy_c6_h2_v5.1' into 'release/v5.1'
fix: xts aes register prefix discrepancy for ESP32H2 and ESP32C6 (v5.1)

See merge request espressif/esp-idf!24263
2023-06-30 23:48:57 +08:00
9bf3bfe85c Merge branch 'bugfix/add_esp32h2_chip_id_v5.1' into 'release/v5.1'
Add ESP32-H2 chip id in `esp_chip_id_t` enum in esp_app_format.h header file (v5.1)

See merge request espressif/esp-idf!24111
2023-06-30 23:48:28 +08:00
633d072d05 Merge branch 'bugfix/expose_clear_all_wl_api_v5.1' into 'release/v5.1'
fix(Nimble): Expose API to clear all addresses in whitelist out of stack (v5.1)

See merge request espressif/esp-idf!24307
2023-06-30 22:10:04 +08:00
5d35a45a53 Merge branch 'feature/extend_proj_desc_json_v5.1' into 'release/v5.1'
extend information in project_description.json (v5.1)

See merge request espressif/esp-idf!24125
2023-06-30 21:17:05 +08:00
d4652daec6 Merge branch 'fix/idf_tools_certificate_v5.1' into 'release/v5.1'
Tools: Update the certificate of idf_tools.py (v5.1)

See merge request espressif/esp-idf!23928
2023-06-30 21:16:32 +08:00
df7ab11865 Merge branch 'fix/hints-print-control-characters_v5.1' into 'release/v5.1'
tools: fix control characters print if hints enabled (v5.1)

See merge request espressif/esp-idf!23889
2023-06-30 21:15:48 +08:00
c8ea97984f Merge branch 'bugfix/removed_working_directory_error_v5.1' into 'release/v5.1'
Tools bugfix: Removed working directory when using idf.py (v5.1)

See merge request espressif/esp-idf!24150
2023-06-30 21:06:34 +08:00
b48beba60f Merge branch 'feature/tools_add_ulp_linux_i686_toolchain_v5.1' into 'release/v5.1'
tools: add ULP toolchain for linux-i686 platform (v5.1)

See merge request espressif/esp-idf!24194
2023-06-30 21:05:29 +08:00
9ceed8a0c9 Merge branch 'feature/submodules_sbom_v5.1' into 'release/v5.1'
tools: add sbom information for submodules (v5.1)

See merge request espressif/esp-idf!24240
2023-06-30 21:05:02 +08:00
7985943ec2 Merge branch 'bugfix/bump_check_copyright_v5.1' into 'release/v5.1'
tools: bump check-copyright in .pre-commit-config.yaml (v5.1)

See merge request espressif/esp-idf!24341
2023-06-30 21:04:09 +08:00
e0fff7b2cc Merge branch 'fix/pyparsing_3.1.0_compatibility_v5.1' into 'release/v5.1'
fix: Compatibility with pyparsing>=3.1.0 (backport v5.1)

See merge request espressif/esp-idf!24369
2023-06-30 21:03:50 +08:00
d4efb0e369 Merge branch 'docs/fix_error_in_esp32-s2-devkitc-1_pin_layout_diagram_v5.1' into 'release/v5.1'
Docs/Fix error in esp32-s2-devkitc-1 pin layout diagram (v5.1)

See merge request espressif/esp-idf!24122
2023-06-30 20:10:12 +08:00
152055933d Merge branch 'docs/update_cn_for_api-conventions_backport_v5.1' into 'release/v5.1'
Docs: Translate api-conventions.rst (backport v5.1)

See merge request espressif/esp-idf!24121
2023-06-30 20:08:14 +08:00
f84139451a NVS: nvs_tool.py entry.data None check fix 2023-06-29 11:07:03 +02:00
7687c5200c Added description to disable coredump logs to ram_usage.rst
Signed-off-by: Vikram <vikram.dattu@espressif.com>
2023-06-29 11:50:48 +05:30
207ac93d43 Optionally disable logs in espcoredump component
Early log strings used by this component are placed in DRAM.
Disabling these logs saves ~5KB of internal memory

Signed-off-by: Vikram <vikram.dattu@espressif.com>
2023-06-29 11:50:48 +05:30
3381782661 ci: increase timeout threshold to solve deepsleep wakestub example ci failure 2023-06-28 18:15:57 +08:00
cbce221e88 Merge branch 'bugfix/mac_ext_order_for_c6_h2_v5.1' into 'release/v5.1'
efuse: Fix byte order in MAC_EXT (for C6 and H2) (v5.1)

See merge request espressif/esp-idf!23990
2023-06-28 17:33:53 +08:00
88289c3fda bugfix: fix bootloader print wrong spi speed mode 2023-06-28 16:12:09 +08:00
13e546fa20 docs: update the number of interrupts for esp32h2 2023-06-28 15:07:46 +08:00
09d8803687 docs: update code of how to configure multiple antennas of wifi 2023-06-28 14:43:37 +08:00
c820d8181c docs: fix a typo in api-guides/usb-otg-console 2023-06-28 14:40:44 +08:00
790b6a2ad8 docs: update installation prerequisites for Ubuntu and Debian system 2023-06-28 14:38:41 +08:00
171544ded4 bugfix: increase pm_dump time field width
Closes https://github.com/espressif/esp-idf/issues/11704
2023-06-28 14:37:27 +08:00
58ee786bfd fix a typo in api-reference/system/ota 2023-06-28 14:25:01 +08:00
0b7e61b95a btc_sdp: add_raw_sdp: fix 32 and 128-bit uuid configuration
Added proper conversion of 4 and 16-byte UUIDs values to binary streams.
UUIDs now set with SDP_AddAttribute() instead of
SDP_AddServiceClassIdList().
2023-06-28 14:11:34 +08:00
afc889e934 esp_wifi: implement wifi_reset_mac_wrapper 2023-06-28 14:01:43 +08:00
2e5a194f62 esp_hw_support: add modem module mac reset api 2023-06-28 14:01:29 +08:00
981701755d ci: fix failed ci test jobs 2023-06-28 13:55:26 +08:00
1c12743d44 sleep: enable sleep reject when entering deep sleep and return err if sleep request is rejected 2023-06-28 13:55:16 +08:00
bb6d154f11 freertos: Fix Systick stuck when systimer was not reset
Relates to OTA update for C3/S3 chips from IDF version 4.3 to v5.0 and above
2023-06-26 12:21:28 +00:00
6d0d2366f7 esp_hw_support: Fix invalid system time if s_esp_rtc_time_us & s_rtc_last_ticks were moved around
The commit fixes the case:
If variables in RTC RAM have been moved around by the linker,
they will be filled with garbage data. Any reset other than OTA would work fine
because the variables would still be initialized from the initial bootup.

So now system time will be valid even after OTA.

Closes https://github.com/espressif/esp-idf/issues/9448
2023-06-26 18:12:30 +08:00
13e74d5573 i2s: fixed i2s_ll compiling failure under C++ evironment
Closes: https://github.com/espressif/esp-idf/issues/11625
2023-06-26 15:42:36 +08:00
b615fd7f8f touch_element: fix unintended integer division 2023-06-26 07:07:52 +00:00
0e68d6fb29 usbh: fix invalid assert on desc_status 2023-06-26 07:07:52 +00:00
641a07950d vfs_uart: fix out-of-bounds read
when open uart device "/2" on chips only have 2 UART peripherals
2023-06-26 07:07:52 +00:00
fc49f10bb4 ieee802154: fix multipan api error and update coex_arb_delay reg 2023-06-26 10:57:17 +08:00
8ed82f11ae fix: Compatibility with pyparsing>=3.1.0 2023-06-25 19:59:13 +02:00
zwl
503de45dd8 ble: Fixed the issue of occasional failure to create sync on ESP32-H2 2023-06-25 21:46:41 +08:00
zwl
5d00fd4d60 ble: Fixed the issue of occasional failure to create sync on ESP32-C6 2023-06-25 21:46:13 +08:00
5fa5f7b2fe component/docs: enable generation of API-reference documents for Bluetooth HID host 2023-06-25 15:37:41 +08:00
e5899f6a70 resolve the conflicts 2023-06-25 15:37:41 +08:00
3a9762ce57 Nimble: Removed files referring to old TTFW framework 2023-06-25 11:43:30 +05:30
a2daceb791 Nimble: Expose API to clear all addresses in whitelist out of stack 2023-06-25 10:13:39 +05:30
c570f67461 Merge branch 'ci/fix_extra_backslash' into 'release/v5.1'
build_template_app: Remove extra backslash

See merge request espressif/esp-idf!24374
2023-06-23 19:39:05 +08:00
2fb799c52e build_template_app: Remove extra backslash 2023-06-23 15:01:53 +05:30
79e12a1840 Merge branch 'ci/ignore_pkg_resources_deprecation_warning_v5.1' into 'release/v5.1'
ci: ignore pkg_resources deprecation warning (v5.1)

See merge request espressif/esp-idf!24339
2023-06-21 15:37:40 +08:00
fbbc548e7f tools: bump check-copyright in .pre-commit-config.yaml
Newer check-copyright version 1.0.2 contains fixes for copyrights
with single year and also the proposed date update is applied only
if number of changed lines is greater or equal to a limit. The default
limit is 5 and can be changed with the --lines-changed option if needed.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-21 07:06:01 +02:00
3cad4ca937 ci: ignore pkg_resources deprecation warning 2023-06-21 07:27:15 +08:00
4ba10243f4 cache: patch some rom cache api, rename those apis in ld
1. Cache_Count_Flash_Pages, fix this api return enexpected + 1
2. Cache_Suspend_I/DCache, add wait cache idle after suspend cache
3. Cache_Freeze_I/DCache_Enable, add wait cache idle after freeze
2023-06-19 10:53:51 +08:00
f0860ac590 ci: add access psram with DFS unity test 2023-06-19 10:21:46 +08:00
96a1de0af8 bugfix: use avaliable gpio for esp32s3 pm_trace 2023-06-19 10:21:46 +08:00
ad1605a464 bugfix: fix esp32s3 psram access failed when dfs is enabled 2023-06-19 10:21:42 +08:00
b4dcd3bf21 Update bt-lib for esp32
1 Fixed disconnection delay on peripheral when slave latency is not zero
2 Fixed LLCP info init for central and peripheral
3 Fixed sent cmd status evt twice when process disconnect cmd
2023-06-16 11:06:12 +08:00
db68d45702 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed crash when controller initialization fails due to insufficient memory
2023-06-16 11:05:49 +08:00
3758e37024 bluedroid: fixed default extended connection params 2023-06-16 11:02:17 +08:00
4001888e69 esp_hid: fixed ble hid battery level setting 2023-06-16 11:01:40 +08:00
0602ed3b4c esp_wifi: Remove direct call of malloc() and free() 2023-06-15 22:38:48 +05:30
b20922c6d5 esp_wifi: fix some txop issues 2023-06-15 22:38:44 +05:30
e707ad166d fix ULP FSM reg ops with addr > 0xFF 2023-06-15 14:00:45 +02:00
dbb6fddcbc Introduced delay to avoid watchdog timer in throughput app 2023-06-15 15:15:25 +05:30
96767058df esp32c6: xts-aes register preefix discrepency 2023-06-15 13:53:35 +05:30
2fb7d32cd3 esp32h2: xts-aes register prefix discrepency 2023-06-15 13:53:35 +05:30
3edc3e9b48 migration_guide: update adc calibration api part 2023-06-15 11:46:31 +08:00
896b382015 mcpwm: fix typo in backward compatible macro name 2023-06-15 10:58:15 +08:00
8aa7e85e31 sleep: Fix domain power down status cannot get updated accordingly with the allowance of retention in runtime 2023-06-15 10:26:59 +08:00
f0b6e8f37e feature: support xtal_xpd pmu parameters 2023-06-15 10:22:33 +08:00
e1f2e656e2 ci: Migrate unit test for tcp_transport to unit test app 2023-06-14 16:01:00 +02:00
18969310e2 tools: do not disable pytest-embedded
As pointed out by Fu Hanxi, the pytest_build_system job is currently
using --parallel-index and --parallel-count, which are provided by
pytest-embedded, so we should not disable it. Moreover to properly
disable pytest-embedded we should use "no:pytest_embedded". Meaning
this probably was not working as indented anyway.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-14 12:42:50 +02:00
dbff74bee4 tools: add sbom information for submodules
This adds SBOM information for submodules, which are not managed
by Espressif. Meaning there is no fork for them in the espressif
namespace. Other submodules should add sbom.yml manifest file to
the root of their git repository.

The SBOM information for submodules is stored in the .gitmodules file.
Each SBOM related variable has the "sbom-" prefix and the following
variables may be used:

sbom-version:
   submodule version

sbom-cpe:
   CPE record if available in NVD. This will be used by the SBOM
   tool to check for possible submodule vulnerabilities. The
   version in the CPE can be replaced with the "{}" placeholder,
   which will be replaced by the "sbom-version" value from above.

sbom-supplier:
   Person or organization who is providing the submodule.
   It has to start with "Person:" or "Organization:" prefix
   as required by the SPDX-2.2 standard.

sbom-url:
   URL to the project if exists, e.g. github.

sbom-description:
   Project description.

sbom-hash:
   Submodule SHA as recorded in the git-tree. This field is used by
   CI to check that the submodule checkout hash and info in .gitmodules
   are in sync. IOW if submodule is updated and it has SBOM info in
   .gitmodules, the .gitmodules has to be updated too. The test is
   part of this commit. The checkout has of the submodule can be found
   by using "git submodule status".

Example for micro-ecc submodule
---8<---
[submodule "components/bootloader/subproject/components/micro-ecc/micro-ecc"]
	path = components/bootloader/subproject/components/micro-ecc/micro-ecc
	url = ../../kmackay/micro-ecc.git
	sbom-version = 1.0
	sbom-cpe = cpe:2.3🅰️micro-ecc_project:micro-ecc:{}:*:*:*:*:*:*:*
	sbom-supplier = Person: Ken MacKay
	sbom-url = https://github.com/kmackay/micro-ecc
	sbom-description = A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors
	sbom-hash = d037ec89546fad14b5c4d5456c2e23a71e554966
---8<---

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-14 12:38:12 +02:00
ec51060d45 pau: fix logic error in extra link retention 2023-06-13 21:06:29 +08:00
ccd4ff2945 sleep retention: implement the extra linked list retention for modules with retention clock bugs 2023-06-13 21:05:36 +08:00
ef4c0a7753 sleep retention: fix crash issue caused by destroying the module after the module node creation fails 2023-06-13 21:04:38 +08:00
8b18591982 rgb_lcd: support pixel copy for 8bpp
Closes https://github.com/espressif/esp-idf/issues/11581
2023-06-13 18:21:21 +08:00
e44a6888ea mac_addr(C6 and H2): Fix byte order of MAC_EXT and change format of IEEE802154 MAC
The changes only related to C6 and H2 chips where CONFIG_SOC_IEEE802154_SUPPORTED=y.
For this case these APIs return 8 bytes
    esp_efuse_mac_get_default() -> 8 bytes
    esp_efuse_mac_get_custom() -> 8 bytes
    esp_read_mac(..., ESP_MAC_IEEE802154) -> 8 bytes
The rest cases len is 6 bytes
2023-06-13 16:56:13 +08:00
ee7554c1c4 esp_system: Fix a race-condition in esp_ipc_isr (in QEMU env)
The race condition is very unlikely on real hardware but can be observed with
qemu under heavy load.
Also add missing `memw` instructions which are generated by the C compiler but
absent in the assembly code.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Signed-off-by: KonstantinKondrashov <konstantin@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/11447
Closes https://github.com/espressif/esp-idf/issues/11433
2023-06-13 08:10:00 +00:00
9538dc203d tools: add ULP toolchain for linux-i686 platform
Closes https://github.com/espressif/esp-idf/issues/11561
2023-06-13 12:50:04 +07:00
3d7f7c32e3 adc: fix out of bound read
when SOC_ADC_PERIPH_NUM==1, the adc_unit should only be assigned with 0
2023-06-12 15:19:17 +08:00
778a045e66 mspi: added timing tuning start, and success log 2023-06-12 11:49:05 +08:00
7c2743f379 esp_wifi: Fix WPS issue for WPA3+WPA2 mode 2023-06-09 18:22:59 +05:30
8a9f12eaa4 Tools bugfix: Removed working directory when using idf.py
Added check for existence of current working directory when using idf.py

Closes https://github.com/espressif/esp-idf/issues/11476
2023-06-09 14:24:29 +02:00
1764a0bd28 crypto: add support for DPA protection configuration in C6/H2
- Technical details covered in section "15.3.2 Anti-DPA Attack Security
Control" chapter of the ESP32-C6 TRM
- Default configuration sets the security level low for the DPA
protection
- This change applies to all the crypto peripherals where the clock
frequency is dynamically adjusted to create randomness in the power
consumption trajectory
- This configuration helps to make the SCA attacks difficult on the
crypto peripherals
2023-06-08 20:37:03 +05:30
03162bb276 tools: extend information in project_description.json
This extends information provided in the project_description.json file.
Newly added information can be used in the SBOM generating tool and
also to improve hints regarding the the component dependency issues.

Added fields

version:
   This adds versioning to the project_description.json file,
   so it's easy to identify if it contains the required information.

project_version:
   Can be used as a version for the resulting binary e.g. `hello_world.bin`.

idf_path:
   This one is probably not necessary, but it allows tools to run even without
   esp-idf environment exported(e.g. export.sh).

c_compiler:
   The `CMAKE_C_COMPILER` value with full path to the compiler binary. This can
   be used to get information about toolchain, which was used to build the project.

common_component_reqs:
   List of common components as presented in cmake's __COMPONENT_REQUIRES_COMMON
   and set in tools/cmake/build.cmake:__build_init().

build_component_info:
   Detailed information about components used during build. It's a
   dictionary with the component name as a key and each component has
   a dictionary with detailed information. Following is an example for
   the efuse component.

   "efuse": {
       "alias": "idf::efuse",
       "target": "___idf_efuse",
       "prefix": "idf",
       "dir": "/home/fhrbata/work/esp-idf/components/efuse",
       "type": "LIBRARY",
       "lib": "__idf_efuse",
       "reqs": [],
       "priv_reqs": [ "bootloader_support", "soc", "spi_flash" ],
       "managed_reqs": [],
       "managed_priv_reqs": [],
       "file": "/home/fhrbata/work/blink/build/esp-idf/efuse/libefuse.a",
       "sources": [ "/home/fhrbata/work/esp-idf/components/efuse/esp32s3/esp_efuse_table.c", ... ],
       "include_dirs": [ "include", "esp32s3/include" ]
   }

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-08 14:29:53 +02:00
0f781c718c tools: fix make_json_list to return empty json list for empty cmake list
Currently make_json_list() returns '[ "" ]' for empty cmake list. Fix this
so empty json list is returned instead.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-08 14:29:53 +02:00
ae86d26f7e openthread: fix assert when parsing security key failed 2023-06-08 17:15:16 +08:00
7cb730a6e8 fix_error_in_esp32-s2-devkitc-1_pin_layout_diagram 2023-06-08 16:51:09 +08:00
66c3265a26 Docs: Translate api-conventions.rst 2023-06-08 16:32:26 +08:00
4866e7c6d0 Add ESP32-H2 chip id in esp_chip_id_t enum in esp_app_format.h header file 2023-06-08 10:34:23 +05:30
69bcbe97f4 aes: fix DMA descriptor calculation for the alignment case
The number of the DMA descriptors allocated for certain length (e.g.,
8176) were not sufficient (off by 1 error). This used to result in the
dynamic memory corruption as the region was modified beyond the
allocated range.

This change fixes the DMA descriptor calculation part and allocates
sufficient DMA descriptors based on the data length alignment considerations.

Test has also been added to cover the specific scenario in the CI.

Closes https://github.com/espressif/esp-idf/issues/11310
2023-06-07 04:29:32 +00:00
f9cf8db97e drivers: fix issue reported by coverity 2023-06-07 11:42:11 +08:00
a9d12c0fe9 adc: fixed the issue that multiply overflow before type expand 2023-06-07 11:40:56 +08:00
e74a2565e4 Fix initialization macros for twai_timing_config_t not setting .clk_src and .brp 2023-06-07 01:45:26 +00:00
57e70c0d2c IEEE802154: modification of the action when stop tx/rx ack 2023-06-05 17:56:01 +08:00
zwl
50d30f7ff1 esp_phy:Update phy lib for ESP32-C2 2023-06-05 16:49:48 +08:00
zwl
80f3ad1f1b ble:fixed the issue that slave reports the wrong address for master when address resolution disable 2023-06-05 16:49:48 +08:00
4bc762621d Merge branch 'bugfix/fix_bleqabr23_222_v5.1' into 'release/v5.1'
Revert "bluedroid: report disconnect event after BLE link closed" (backport 5.1)

See merge request espressif/esp-idf!24036
2023-06-03 08:43:09 +08:00
42592552b5 Merge branch 'feature/itwt_add_setup_timeout_timer_backport_v5.1' into 'release/v5.1'
esp_wifi: itwt add setup timeout timer to track response frame (backport v5.1)

See merge request espressif/esp-idf!24040
2023-06-03 08:40:41 +08:00
5a21bea309 esp_wifi: itwt add setup timeout timer to track response frame 2023-06-02 19:46:15 +08:00
cb88d20f9e Merge branch 'bugfix/fix_wakeup_failed_if_powerdown_flash_in_lightsleep_v5.1' into 'release/v5.1'
Power Management: fixed flash funcs called in sleep wakeup process (backport v5.1)

See merge request espressif/esp-idf!24009
2023-06-02 19:18:36 +08:00
d28cb4a954 esp_wifi:
1. mesh: layer2 node will scan all channels when fixed root leave
2. show warning info when setting max connection num for softAP
2023-06-02 17:27:28 +08:00
c5e580e522 Revert "bluedroid: report disconnect event after BLE link closed"
This reverts commit d751960b27.
2023-06-02 16:51:07 +08:00
ddc16a47fe Merge branch 'bugfix/wpsreg_ap_assoc_respone_v5.1' into 'release/v5.1'
esp_wifi: Bugfix wpsreg AP not responding to assoc req (v5.1)

See merge request espressif/esp-idf!24027
2023-06-02 13:30:22 +08:00
03832dbd5e bugfix: fix some flash funcs called in sleep wakeup process 2023-06-02 02:53:51 +00:00
ecf46dd5da Merge branch 'docs/update_esp32c6_wifi_api_guides_backport_v5.1' into 'release/v5.1'
docs: update esp32c6 api guides about wifi part (backport v5.1)

See merge request espressif/esp-idf!24020
2023-06-01 19:24:50 +08:00
e8d9104953 esp_wifi: Bugfix wpsreg AP not responding to assoc req
Fixed regression caused by 2b8e40e7
2023-06-01 15:36:54 +05:30
6cd76ba321 docs: update for esp32c6 2023-06-01 14:27:19 +08:00
5a9cff0d34 docs: update esp32c6 api guides about wifi part 2023-06-01 14:26:37 +08:00
aa741b90ad Merge branch 'docs/c6_misc_updates_v5.1' into 'release/v5.1'
Docs: c6 misc updates (v5.1)

See merge request espressif/esp-idf!23999
2023-06-01 11:03:42 +08:00
4b20d27caf bootloader_support: add missing esp_rom_sys.h to bootloader_flash.c bootloader build
Missing esp_rom_sys.h header could cause declaration issues.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2023-06-01 10:57:16 +08:00
d5fb4ff7c8 esp_rom: add common ROM API to update CPU tick rate 2023-06-01 10:57:13 +08:00
b845c66748 spi_master: fix the assertion on a NULL desired_dev
Closes https://github.com/espressif/esp-idf/issues/11536
2023-06-01 02:50:45 +00:00
22adf838c9 Merge branch 'bugfix/c6_h2_decrease_rng_frequency_v5.1' into 'release/v5.1'
esp_hw_support: decrease RNG read frequency for C6 and H2 (v5.1)

See merge request espressif/esp-idf!24001
2023-06-01 00:54:49 +08:00
f4f45345ee esp_hw_support: decrease RNG read frequency on C6 and H2
* The RNG reading frequency of 200 KHz has been too high for
  C6 and H2 since on these chips the RNG output is combined
  with the RTC slow clock which is only 150KHz. Reduced the max
  reading frequency via esp_random() from 200KHz to 62.5KHz,
  which show best results in tests.
  Also updated the bootloader_fill_random() max frequency to the
  same value to be in line, even though it was just 83KHz.
2023-05-31 16:16:25 +00:00
7b09d12c89 Merge branch 'bugfix/efuse_summary_v5.1' into 'release/v5.1'
system-hardware/efuse: fixed efuse summary description containing ; breaking efuse-summary (v5.1)

See merge request espressif/esp-idf!23979
2023-05-31 22:57:37 +08:00
30f8f83d52 Merge branch 'bugfix/add_warning_for_rc_fast_calibration_h2_v5.1' into 'release/v5.1'
clk: Add warning log if RC_FAST clock calibration is needed on esp32h2 (v5.1)

See merge request espressif/esp-idf!23935
2023-05-31 20:21:11 +08:00
5cd24826bb Merge branch 'bugfix/fix_rc_fast_calibration_v5.1' into 'release/v5.1'
rtc_clk: fix esp32c6/esp32h2 eco chip `RC_FAST` bad calibration value (backport v5.1)

See merge request espressif/esp-idf!23940
2023-05-31 17:40:28 +08:00
0d13f6f09d Merge branch 'bugfix/fix_hang_during_sleep_process_v5.1' into 'release/v5.1'
bugfix: fix hang on pd_top sleep process (backport v5.1)

See merge request espressif/esp-idf!23852
2023-05-31 17:40:02 +08:00
871dd9e21a docs: updated misc C6 programming guide docs with minor changes. 2023-05-31 15:47:26 +08:00
273d973489 idocs: updated Storage API reference documents for ESP32H2 2023-05-31 15:46:42 +08:00
8df4a852f5 docs: updated Storage API reference documents for ESP32C6 2023-05-31 15:46:41 +08:00
bb4218285b system-hardware/efuse: fixed efuse summary description containing ; breaking efuse-summary
If the efuse description from esptool contained semi-colons it would be interpretted as
a list delimiter in CMake. Summary is now passed as in quotes to escape this behavior.
2023-05-30 14:07:50 +08:00
c337759e24 core-system/linux-target: fixed heap_caps_realloc not correctly allocating the requested number of bytes
Closes https://github.com/espressif/esp-idf/issues/11523
2023-05-30 13:27:46 +08:00
888e4339f9 esp_eth: fixed esp_eth_transmit_vargs to transmit only when link is up
esp_eth test: clear unicast Rx event before wait
2023-05-29 11:22:11 +00:00
997f9dd183 example: Fix memory leak in ws_echo_server when httpd_queue_work failed
Closes https://github.com/espressif/esp-idf/issues/11507
2023-05-26 20:02:58 +08:00
3da76d4bd7 vfs: select sanity NULL check
https://github.com/espressif/esp-idf/issues/9964
2023-05-26 13:46:11 +02:00
ea5e0ff298 Merge branch 'backport/fix_matter_commissioning_ble_disconnect_issue' into 'release/v5.1'
openthread: Add some backports related to openthread(Backport v5.1)

See merge request espressif/esp-idf!23893
2023-05-26 15:37:14 +08:00
125d00c0f7 Merge branch 'feature/c6_bootloader_rng_v5.1' into 'release/v5.1'
Feature/c6 bootloader rng (v5.1)

See merge request espressif/esp-idf!23896
2023-05-26 15:36:45 +08:00
8c714acfb5 bugfix: fix rc_fast bad calibration value 2023-05-26 13:59:25 +08:00
1a68d8ddd5 example: fix led strip memory overwrite before trans done
Closes https://github.com/espressif/esp-idf/issues/11487
2023-05-26 13:28:31 +08:00
702afbb0f7 clk: Add warning log if RC_FAST clock calibration is needed on esp32h2 2023-05-26 11:45:00 +08:00
41047c16c9 Tools: Update the certificate of idf_tools.py 2023-05-25 16:29:56 +02:00
b0e2f33082 esp_hw_support/bootloader: made ESP32-C6 and ESP32-H2 RNG available 2023-05-24 09:43:21 +05:30
7eb9af5806 openthread: fix frame counter when re-transmition 2023-05-24 10:43:16 +08:00
2016bddbda openthread: add kconfig for enabling mac filter 2023-05-24 10:42:52 +08:00
d9e289a5fb esp_phy: updating lib phy to adapt the voltage changes 2023-05-24 10:35:39 +08:00
71f1bc4453 tools: fix control characters print if hints enabled
Closes https://github.com/espressif/esp-idf/issues/11351
2023-05-23 18:30:22 +08:00
6ad6fb9755 Merge branch 'feature/update_ble_doc_for_esp32c6_esp32h2_v5.1' into 'release/v5.1'
ble docs: Update ble doc for esp32c6 and esp32h2

See merge request espressif/esp-idf!23801
2023-05-23 15:33:51 +08:00
aea087b793 vfs: VFS_MAX_COUNT should be non-zero even without IO support 2023-05-22 12:30:24 +02:00
de4e003256 Allow to config the maximum number of VFS entries. 2023-05-22 12:30:24 +02:00
56677dabe8 Merge branch 'add_c6_in_supported_targets_in_prov_example_v5.1' into 'release/v5.1'
Add ESP32-C6 in supported targets (v5.1)

See merge request espressif/esp-idf!23846
2023-05-20 07:41:54 +08:00
9310ed608e Merge branch 'contrib/github_pr_10532_v5.1' into 'release/v5.1'
[SDMMC Mount] fix infinite loop when SD card is not responsive (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23527
2023-05-20 07:35:38 +08:00
057cf2b8ee Merge branch 'bugfix/wifi_backport_v5.1' into 'release/v5.1'
esp_wifi: backport some wifi fixes to v5.1

See merge request espressif/esp-idf!23847
2023-05-20 07:34:41 +08:00
829fdd172c Merge branch 'feature/add_support_for_lp_i2c_v5.1' into 'release/v5.1'
lp-i2c: Added support for LP I2C peripheral to LP core (v5.1)

See merge request espressif/esp-idf!23850
2023-05-20 04:38:59 +08:00
8cecbafe18 Merge branch 'bugfix/close_phy_tsens_before_sleep_v5.1' into 'release/v5.1'
sleep: fix deepsleep current leakage caused by phy_tsens (backport v5.1)

See merge request espressif/esp-idf!23843
2023-05-19 20:29:22 +08:00
786faa3cac Merge branch 'doc/update_efuse_info_v5.1' into 'release/v5.1'
doc: Update all efuse info files (v5.1)

See merge request espressif/esp-idf!23853
2023-05-19 20:28:15 +08:00
6477500cf1 sdmmc: incrementally increase delay of vTaskDelay
Prevents unnecessary slowdown in polling functions
2023-05-19 14:01:43 +02:00
3ef8c77588 esp_dpp: Fix retry with esp_supp_dpp_start_listen after failure
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would
call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag
to true.  Subsequent attempts to restart listening with
esp_supp_dpp_start_listen then only attempt to listen once more for
500ms before reading the s_dpp_stop_listening flag again and giving up.

This contributes greatly to #10615, but the fix here is still largely
a work-around as it sometimes requires manually retrying a couple times
before it works.  Without this fix, any number of retries by
deinit/init again will seemingly not work as the retries for currently
unknown reasons.

Signed-off-by: Shreyas Sheth <shreyas.sheth@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/10865
2023-05-19 17:17:18 +08:00
9aedb4bd83 wpa_supplicant : Fix scan results for GCMP and GCMP-256 cipher.
Add support for recognising GCMP and GCMP-256 ciphers if used by AP.
Update the scan example to show the correct cipher.
2023-05-19 16:58:51 +08:00
576489f8cf wpa_supplicant : Add MBO ie in probe request.
Adds the MBO information element in the probe request frame by resetting
scan_ie after set_config is done.
2023-05-19 16:58:40 +08:00
a32201f6ec Merge branch 'bugfix/fix_compilation_error_optimization_v5.1' into 'release/v5.1'
Nimble: Fix compilation issues seen while enabling -O2 optimization (v5.1)

See merge request espressif/esp-idf!23717
2023-05-19 16:48:18 +08:00
774696285d Merge branch 'bugfix/fix_lp_bod_if_bt_i154_init_phy_before_wifi_v5.1' into 'release/v5.1'
fix(phy): fix lp_bod reset if bt/i154 init phy before wifi

See merge request espressif/esp-idf!23831
2023-05-19 16:25:11 +08:00
d345beb02a Merge branch 'contrib/github_pr_11402_v5.1' into 'release/v5.1'
esp_ds: ignore releasing mutex if not called from same task (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23840
2023-05-19 16:11:15 +08:00
cb6b14a0f8 doc: Update efuse info files 2023-05-19 15:17:16 +08:00
eccb5318f9 Kconfig: add more help info for pm related options help 2023-05-19 13:51:29 +08:00
1df2dcc9fe bugfix: treat too short sleep duration as sleep reject by software 2023-05-19 13:51:24 +08:00
00e777aff9 bugfix: fix pmp retention and add pma retention 2023-05-19 13:51:20 +08:00
267c5e37a2 lp-i2c: Added support for LP I2C peripheral to LP core
This commit adds support for the LP I2C peripheral driver to be used by
the LP core. An example is also added to demonstrate the usage of the LP
I2C peripheral from the LP core.
2023-05-19 07:33:01 +02:00
2220a07ec1 1. Support NAN ifx for API's esp_wifi_internal_set_fix_rate and esp_wifi_set_protocol
2. Remove user configurable flag fsd_reqd from NAN publish config
3. Fix issue wherein NDL of previously cancelled service is obtained in peer record of new service with no NDL
2023-05-19 12:46:39 +08:00
a3ecb8fe93 Add esp32c6 in supported target for ota examples 2023-05-19 10:03:45 +05:30
d9de899ed7 Add ESP32-C6 in supported targets for wifi_prov_mgr example 2023-05-19 10:03:45 +05:30
871bbdcec3 netdb:fixed bug for getaddrinfo returns null when IPV4 mapped address
Closes https://github.com/espressif/esp-idf/issues/9693
2023-05-19 12:26:07 +08:00
050367ea37 esp_wifi: fix softap nvs <ssid,password,pmk> not match issue
Closes FCS-1196
2023-05-19 12:23:20 +08:00
8bfb5c837e esp_wifi: Fix tx_callback issue for ESP32C6 2023-05-19 12:19:54 +08:00
7412d1a1a9 wpa_supplicant: Use 'mbedtls_pk_parse_public_key' to parse compressed EC public key and remove unnecessary code
Support to parse compressed EC public key is added from 'mbedtls-3.4.0'
2023-05-19 12:19:08 +08:00
edf9f9eff7 esp-wifi: add station SAE-PK (Public Key) configuration note 2023-05-19 12:18:49 +08:00
fc5fe1132a bugfix: close phy_tsens before deepsleep 2023-05-19 11:04:17 +08:00
ed32d7a267 Merge branch 'bugfix/move_adc_onshot_power_management_to_shot_read_func_v5.1' into 'release/v5.1'
Sleep: Fixed abnormal deepsleep base current of ULP ADC on esp32s2/esp32s3 chips (backport v5.1)

See merge request espressif/esp-idf!23828
2023-05-19 11:03:54 +08:00
0d12613ab9 ble docs: Update the ble docs for esp32c6 and esp32h2 2023-05-19 11:03:11 +08:00
cc7c851cb2 Merge branch 'feature/use_api_to_enable_modem_on_esp32h2_v5.1' into 'release/v5.1'
ble: use modem_clock api to set clocks on ESP32-H2

See merge request espressif/esp-idf!23806
2023-05-19 11:01:44 +08:00
501c7d1101 esp_ds: ignore releasing mutex if not called from same task 2023-05-19 08:31:34 +05:30
05c98d8b53 Merge branch 'bugfix/sync-contribution-guide_v5.1' into 'release/v5.1'
docs: updated contribution agreement (v5.1)

See merge request espressif/esp-idf!23839
2023-05-19 10:54:51 +08:00
19f300fa24 Merge branch 'bugfix/use_safe_noreturn_attr_v5.1' into 'release/v5.1'
compiler: replaced noreturn by __noreturn__ in header files (v5.1)

See merge request espressif/esp-idf!23811
2023-05-19 09:37:50 +08:00
c58915842e Merge branch 'bugfix/eth-start-spi-initialize-failure-v5.1' into 'release/v5.1'
Fix eth_start initializes spi bus with SPI_DMA_CH_AUTO (backport v5.1)

See merge request espressif/esp-idf!23815
2023-05-19 09:12:22 +08:00
6cc4ab56e4 docs: updated contribution agreement 2023-05-18 16:27:45 +02:00
bd0f9b8512 fix(phy): fix lp_bod reset if bt/i154 init phy before wifi 2023-05-18 20:57:57 +08:00
43a67a5da3 Merge branch 'feature/esp32c2_enable_rf_temp_compensation_v5.1' into 'release/v5.1'
Feature/esp32c2 enable rf temp compensation v5.1

See merge request espressif/esp-idf!23730
2023-05-18 20:34:30 +08:00
ed076c2bc8 bugfix: move adc_oneshot_power_acquire/release to adc_oneshot_read
Closes https://github.com/espressif/esp-idf/issues/10595
Closes https://github.com/espressif/esp-idf/issues/11386
2023-05-18 20:08:47 +08:00
7fcba0fbf8 Merge branch 'bugfix/fix_some_ble_bug_v5.1' into 'release/v5.1'
Fixed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!23699
2023-05-18 20:08:25 +08:00
8b7cd4dc08 Merge branch 'bugfix/hfp_ag_idx_invalid_v5.1' into 'release/v5.1'
bt: Fixed out of bounds access due to variable length array(v5.1)

See merge request espressif/esp-idf!23665
2023-05-18 20:07:21 +08:00
57b31ed545 Merge branch 'feature/add_bluetooth_nimble_lightsleep_example_v5.1' into 'release/v5.1'
bt: Added an example of Bluetooth using light sleep(v5.1)

See merge request espressif/esp-idf!23686
2023-05-18 20:06:16 +08:00
2010d70892 Merge branch 'bugfix/a2dp_source_app_state_error_v5.1' into 'release/v5.1'
bt: Fixed the issue that the a2dp source would not send the media start command due to the connection initiated by the peer device(v5.1)

See merge request espressif/esp-idf!23557
2023-05-18 20:04:45 +08:00
f503b0f621 Merge branch 'fix/sdcard_example_blocker_v5.1' into 'release/v5.1'
CI: fix sdcard examples timeout (v5.1)

See merge request espressif/esp-idf!23477
2023-05-18 20:03:59 +08:00
5b4c95c50f Merge branch 'bugfix/update_esp32c6eco1_sleep_fosc_cal_cycles_backport_v5.1' into 'release/v5.1'
bugfix: update esp32c6 eco1 fosc calibration cycles during sleep(backport v5.1)

See merge request espressif/esp-idf!23490
2023-05-18 19:52:05 +08:00
79fab2eb92 Merge branch 'backport/fix_ieee802154_typo' into 'release/v5.1'
ieee802154: fix a typo in set_channel API(Backport v5.1)

See merge request espressif/esp-idf!23809
2023-05-18 17:07:06 +08:00
f79088f115 Merge branch 'bugfix/add_len_check_per_spi_master_transaction_v5.1' into 'release/v5.1'
spi master: added transaction length check to refuse longer than hardware supported length (v5.1)

See merge request espressif/esp-idf!23747
2023-05-18 16:47:18 +08:00
38a1cfe59c Nimble: Fix compilation issues seen while enabling -O2 optimization 2023-05-18 14:00:33 +05:30
0814386710 Merge branch 'refactor/driver_ut_to_test_app_v5.1' into 'release/v5.1'
CI: Move all UT in driver to test_app(backport v5.1)

See merge request espressif/esp-idf!23708
2023-05-18 16:18:26 +08:00
431f5b81a2 Merge branch 'bugfix/fix_doc_blufi_eror_v5.1' into 'release/v5.1'
fix blufi doc error (backport v5.1)

See merge request espressif/esp-idf!23724
2023-05-18 15:04:17 +08:00
e8dba711ff Merge branch 'bugfix/fix_iphone_disconnects_immediately_after_connecting_when_BLE_wifi_coexist_v5.1' into 'release/v5.1'
Fix the bug that the iPhone disconnects immediately after connecting when BLE and wifi coexist(backport v5.1)

See merge request espressif/esp-idf!23786
2023-05-18 15:04:14 +08:00
bd5b1008de comm_components: eth_start initializes spi bus with SPI_DMA_CH_AUTO
Close https://github.com/espressif/esp-idf/issues/11083
2023-05-18 14:46:09 +08:00
9f7475dd98 Merge branch 'contrib/github_pr_11215_v5.1' into 'release/v5.1'
improve thread safety in esp_timer (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23539
2023-05-18 13:06:46 +08:00
a6cbf68991 compiler: replaced noreturn by __noreturn__ in header files
* noreturn may be replaced by third-party macros,
  rendering it ineffective

* Closes https://github.com/espressif/esp-idf/issues/11339
2023-05-18 12:49:40 +08:00
6ba1c6c44f ieee802154: fix a typo in set_channel API 2023-05-18 10:39:51 +08:00
82c6c8149c Merge branch 'bug/interactive_hints_v5.1' into 'release/v5.1'
tools: fix hints processing in interactive mode (v5.1)

See merge request espressif/esp-idf!23795
2023-05-18 00:09:16 +08:00
b3bde42d8c Merge branch 'bugfix/update_test_dl_esp_cert_v5.1' into 'release/v5.1'
tests: update Root certificate for the test endpoints (v5.1)

See merge request espressif/esp-idf!23797
2023-05-17 21:39:09 +08:00
83ac726851 ble: use modem_clock api to set clock on ESP32-C6 2023-05-17 20:04:07 +08:00
133e19d6ee tests: update Root certificate for the test endpoints
Use Root certificate (`DigiCert Global Root G2`) for the
`dl.espressif.com` and `espressif.com` test endpoints.

This fixes the test failure introduced due to renewal of
the intermediate certificate.
2023-05-17 15:27:24 +05:30
8702e49057 spi: added an API to get max transaction length and use in spi lcd driver 2023-05-17 09:03:26 +00:00
4943844764 spi: added transaction length check to refuse longer than hardware supported length 2023-05-17 09:03:26 +00:00
b525e273ce tools: fix hints processing in interactive mode
Currently hints are processed only once the process is finished and
exits with non-error exit code. In interactive mode, e.g. for monitor,
we want to process ouput lines for hints right away.

This adds a simple buffer, which keeps the last line and once EOL is
reached, it is processed for hints.

Since the original hints processing was file based, a new helper
function was added to allow processing hints in string.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-05-17 10:56:39 +02:00
0ed8499898 Merge branch 'bugfix/a2dp_source_crash_connect_to_Bose_speaker_v5.1' into 'release/v5.1'
Bugfix/a2dp source crash connect to bose speaker (v5.1)

See merge request espressif/esp-idf!23574
2023-05-17 15:10:34 +08:00
0122794a4e Merge branch 'bugfix/deinit_ble_v5.1' into 'release/v5.1'
bugfix: deinit ble for specifies ESP_BT_MODE_BTDM (backport v5.1)

See merge request espressif/esp-idf!23068
2023-05-17 15:09:29 +08:00
c92ddbbf6f Merge branch 'bugfix/reduce_logging_for_SAE' into 'release/v5.1'
Modify log level for SAE (Backport v5.1)

See merge request espressif/esp-idf!23547
2023-05-17 14:02:39 +08:00
5bd2b5bc41 fix blufi doc error 2023-05-17 04:06:11 +00:00
b311a3ffc2 Merge branch 'contrib/github_pr_11388_v5.1' into 'release/v5.1'
Update esp_cpu.h to include esp_attr.h (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23738
2023-05-17 09:24:38 +08:00
8adb48cbfd Merge branch 'fix/console-build-error_v5.1' into 'release/v5.1'
console: Fix building issue when serial JTAG is set (v5.1)

See merge request espressif/esp-idf!23735
2023-05-17 08:39:03 +08:00
e86b8136bd Merge branch 'bugfix/c2_wdt_reset_reason_v5.1' into 'release/v5.1'
wdt: fix IWDT reset reason for esp32c2 (v5.1)

See merge request espressif/esp-idf!23740
2023-05-17 08:38:45 +08:00
9b73003628 Fix the bug that the iPhone disconnects immediately after connecting when BLE and wifi coexist 2023-05-16 17:54:06 +08:00
3bdbad6aa7 Merge branch 'feature/remove_coredump_tests_v5.1' into 'release/v5.1'
coredump: remove tests (moved to esp-coredump repo) (v5.1)

See merge request espressif/esp-idf!23767
2023-05-16 17:40:26 +08:00
df7a27e36d CI: Move all UT in driver to test_app 2023-05-16 16:42:28 +08:00
b62cbebb81 Merge branch 'feature/expose_addr_resolv_out_stack_v5.1' into 'release/v5.1'
Nimble:Added change to expose addr resolution API outside stack (v5.1)

See merge request espressif/esp-idf!23491
2023-05-16 16:34:11 +08:00
zwl
c907f489d6 ble:fixed build error when disable smp 2023-05-16 16:08:54 +08:00
zwl
9b61156746 ble:esp32c2 add rf temperature compensation 2023-05-16 16:08:54 +08:00
b8bd147466 ci: re-enable reset reason tests for all targets except H2. 2023-05-16 05:22:07 +00:00
e0b91b748e esp-system: fixed int WDT reset reason being reported as task WDT on C2 2023-05-16 05:22:07 +00:00
726ed144e4 coredump: remove tests (moved to esp-coredump repo) 2023-05-16 12:43:04 +08:00
accb45f466 Update esp_cpu.h
If esp_attr.h is not included then there are no definitions for the symbol 'FORCE_INLINE_ATTR'.
2023-05-16 04:37:17 +00:00
c5003e6220 console: Fix building issue when serial JTAG is set
Closes https://github.com/espressif/esp-idf/issues/10707
2023-05-16 04:37:09 +00:00
96e1f6e7a2 Merge branch 'openthread/default_dnsserver_address_v5_1' into 'release/v5.1'
openthread: Add menuconfig to set the default dns server address(v5.1)

See merge request espressif/esp-idf!23757
2023-05-16 12:36:20 +08:00
d17ab36645 Merge branch 'feature/c6_ulp_timer_v5.1' into 'release/v5.1'
ulp: lp timer support for lp core (v5.1)

See merge request espressif/esp-idf!23659
2023-05-16 09:19:56 +08:00
a056e655d8 openthread: Add menuconfig to set the default dns server address 2023-05-15 19:30:14 +08:00
aed737b351 Merge branch 'feature/efuse_settings_v5.1' into 'release/v5.1'
hal: Explicit setting of efuse time settings (v5.1)

See merge request espressif/esp-idf!23725
2023-05-15 19:16:30 +08:00
0edb7ee43a Merge branch 'bugfix/ulp_i2c_timeout_config_v5.1' into 'release/v5.1'
ulp-riscv-i2c: Add ULP RISC-V I2C read/write timeout config option (v5.1)

See merge request espressif/esp-idf!23657
2023-05-15 16:03:15 +08:00
689db30956 Merge branch 'contrib/github_pr_11025_v5.1' into 'release/v5.1'
Enable support for C++23 in esp-idf (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23421
2023-05-15 16:02:54 +08:00
59b6634a9a Merge branch 'feature/add_missed_settings_for_bootloader_reserve_rtc_mem_for_c6_h2_v5.1' into 'release/v5.1'
esp_system (C6 & H2): Enables BOOTLOADER_RESERVE_RTC_MEM feature for bootloader (v5.1)

See merge request espressif/esp-idf!23402
2023-05-15 16:02:35 +08:00
24ae831b3d Merge branch 'contrib/github_pr_11394_v5.1' into 'release/v5.1'
docs: Fix typo in Linux/macOS getting started docs (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23732
2023-05-15 10:50:34 +08:00
78d88afbef Merge branch 'bugfix/i2c_timing_wrong_v5.1' into 'release/v5.1'
i2c: fix a bug in sda sample timing (backport v5.1)

See merge request espressif/esp-idf!23379
2023-05-15 10:47:35 +08:00
b8365dced6 Merge branch 'Bugfix/fix_tsen_issue_v5.1' into 'release/v5.1'
Temperature sensor: fix return value issue @low temp on H2(backport v5.1)

See merge request espressif/esp-idf!23719
2023-05-15 10:46:11 +08:00
b7199e88b7 Merge branch 'bugfix/mcpwm_bldc_example_v5.1' into 'release/v5.1'
mcpwm: test generator force level with dead time module (v5.1)

See merge request espressif/esp-idf!23714
2023-05-15 10:00:00 +08:00
2701677eb6 Fix typo in Linux/macOS getting started docs
`hello_word` -> `hello_world`
2023-05-15 09:34:48 +08:00
2165ff386e hal: Explicit setting of efuse time settings
EFUSE_PWR_ON_NUM in C3 has default value = 0x2880, now = 0x3000
2023-05-12 21:42:38 +08:00
zlq
79a2cc224c H2:fix temp sensor issue @low temp 2023-05-12 17:00:58 +08:00
6cfc6f53be Merge branch 'bugfix/enable_i_pdm_example_pytest_on_h2_v5.1' into 'release/v5.1'
i2s_pdm: enable example pytest on h2 (v5.1)

See merge request espressif/esp-idf!23642
2023-05-12 16:47:25 +08:00
e35897db33 Merge branch 'feature/heap-in-flash_v5.1' into 'release/v5.1'
heap: Add a configuration that places all the heap component in flash (v5.1)

See merge request espressif/esp-idf!23377
2023-05-12 15:57:31 +08:00
7e49268933 bugfix: deinit ble for specifies ESP_BT_MODE_BTDM 2023-05-12 14:53:56 +08:00
a7021c3e44 mcpwm: fix bldc example force output level inverted
set_force_level can only set the generator level before the deadtime module.
if the deadtime module enables the inverter, then the real output level is inverted accordingly
2023-05-12 14:40:10 +08:00
190e9e7212 Merge branch 'bugfix/fix_several_bugs_in_i2s_v5.1' into 'release/v5.1'
i2s: fix several bugs in std and tdm mode (v5.1)

See merge request espressif/esp-idf!23669
2023-05-12 11:05:34 +08:00
fc69e53e40 Merge branch 'ci/fix_system_invalid_kconfigs_v5.1' into 'release/v5.1'
ci: fix invalid kconfig options in system test apps (v5.1)

See merge request espressif/esp-idf!23660
2023-05-12 11:04:08 +08:00
6f459d4ea8 Merge branch 'feature/reset_mcpwm_in_restart_v5.1' into 'release/v5.1'
mcpwm: reset peripheral in restart, panic and halt (v5.1)

See merge request espressif/esp-idf!23651
2023-05-12 10:12:58 +08:00
1d89e24199 Merge branch 'bugfix/fix_mspi_octal_psram_timing_tuning_point_fallback_id_v5.1' into 'release/v5.1'
mspi: modified mspi 80mhz octal psram timing tuning point fallback id on s3 (v5.1)

See merge request espressif/esp-idf!23689
2023-05-11 21:24:44 +08:00
2379ee36ab cxx: gnu++23 -> gnu++2b for clang compatibility, added docs and test
* Using -std=gnu++2b now for both gcc and clang as clang
  does not recognize gnu++23 yet
* Added a build test app to check the C++ standard in IDF
* Updated english docs to reflect the change to C++23
2023-05-11 17:48:38 +08:00
58fa57af93 Enable support for C++23 in esp-idf 2023-05-11 17:45:20 +08:00
b1c85cc1d5 Merge branch 'contrib/github_pr_10895_v5.1' into 'release/v5.1'
Fix possible conversion errors by using __builtin_ffsll (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23690
2023-05-11 16:45:44 +08:00
cf5e2c3962 Merge branch 'doc/update_mcpwm_deadtime_v5.1' into 'release/v5.1'
MCPWM: don't allow to apply the same delay module to multiple generators (v5.1)

See merge request espressif/esp-idf!23663
2023-05-11 16:13:23 +08:00
b77479df39 bluedroid: fix ble ext adv rand addr setting for NRPA 2023-05-11 14:36:39 +08:00
ac42a8f2c7 bluedroid: fix ble adv data construct for device name 2023-05-11 14:36:39 +08:00
e6f018a309 bluedroid: fix ble smp key distribution setting 2023-05-11 14:36:39 +08:00
2afb56d189 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed remote mic error during encryption procedure
2023-05-11 14:36:39 +08:00
d751960b27 bluedroid: report disconnect event after BLE link closed 2023-05-11 14:36:39 +08:00
7ddb440384 bt: Deleted some redundant variables in HFP_AG 2023-05-11 06:09:06 +00:00
a891aa7e4d bt: Fixed the problem of out-of-bounds access caused by the variable-length array introduced in 3268075231
Closes https://github.com/espressif/esp-idf/issues/11264
2023-05-11 06:09:06 +00:00
d3d73ed8b2 bt: Fixed codec mode error in ESP_HF_WBS_RESPONSE_EVT 2023-05-11 06:09:06 +00:00
a498871111 Merge branch 'bugfix/fix_wrong_hp_ldo_h2_to_v5.1' into 'release/v5.1'
ESP32H2: Fix too low hp ldo dbias (v5.1)

See merge request espressif/esp-idf!23598
2023-05-11 11:59:26 +08:00
5d6b59109b Merge branch 'ci/newlib_pytest_v5.1' into 'release/v5.1'
ci: move newlib tests to pytest (v5.1)

See merge request espressif/esp-idf!23685
2023-05-11 11:49:48 +08:00
48ab527148 cxx/esp_hw_support: added build test, changed parameter types
Changed rv_utils_intr_edge_ack and esp_cpu_intr_edge_ack to
take uint32_t instead of int to avoid build errors.

The test is to test in particular that __builtin_ffsll, used in
xt_utils.h, which is included via esp_cpu.h, compiles fine
in C++20 with -Wsign-conversion enabled.

Closes https://github.com/espressif/esp-idf/pull/10895
2023-05-11 11:16:45 +08:00
51a9057d9e Fix possible conversion errors by using __builtin_ffsll instead of __builtin_ffs
Signed-off-by: term_est <62337595+term-est@users.noreply.github.com>
2023-05-11 11:16:45 +08:00
6ae2c3c240 mspi: modified mspi 80mhz octal psram timing tuning point fallback id on s3 2023-05-11 11:13:32 +08:00
8b8a6a4450 bt: Added an example of Bluetooth using light sleep 2023-05-11 10:24:00 +08:00
6b0d93efd4 ci: misc fixes for newlib test app
Enabled additional tests for C2, added config for testing with newlib nano
as well as cleaned up old configs
2023-05-11 09:27:09 +08:00
d795abeb03 newlib: move test to pytest 2023-05-11 09:26:39 +08:00
70feed14dd Merge branch 'feature/update-OpenOCD-to-v0.12.0-esp32-20230419_v5.1' into 'release/v5.1'
tools: update OpenOCD version to v0.12.0-esp32-20230419 (v5.1)

See merge request espressif/esp-idf!23677
2023-05-11 01:55:34 +08:00
ae4d1c1f81 Merge branch 'feature/esp32c6_esp32h2_enable_panic_tests_v5.1' into 'release/v5.1'
tests: panic: esp32c6/esp32h2 enable (v5.1)

See merge request espressif/esp-idf!23683
2023-05-11 00:27:22 +08:00
eec03e6a32 Merge branch 'feature/freertos_add_create_task_with_caps_v5.1' into 'release/v5.1'
FreeRTOS: Add xTaskCreateWithCaps() (v5.1)

See merge request espressif/esp-idf!23382
2023-05-10 22:34:17 +08:00
6b31235f3f tests: panic: add esp32c6 esp32h2 2023-05-10 19:19:47 +08:00
2744e6ce07 Merge branch 'feature/refactor_gdbstub_v5.1' into 'release/v5.1'
esp_gdbstub: refactor code (v5.1)

See merge request espressif/esp-idf!23513
2023-05-10 19:11:39 +08:00
b3c5ee767a tools: update OpenOCD version to v0.12.0-esp32-20230419 2023-05-10 13:15:19 +03:00
ad5044c5f6 freertos: Add task creation with caps functions
This commit adds the corresponding CreateWithCaps functions for tasks:

- xTaskCreatePinnedToCoreWithCaps()
- xTaskCreateWithCaps()
- vTaskDeleteWithCaps()

Documentation and migraiton guide have been updated accordingly.

Closes https://github.com/espressif/esp-idf/issues/11216
2023-05-10 17:55:49 +08:00
4a35536244 Merge branch 'feature/freertos_get_static_buffers_v5.1' into 'release/v5.1'
FreeRTOS: Add GetStaticBuffer and CreateWithCaps functions (v5.1)

See merge request espressif/esp-idf!23381
2023-05-10 17:53:26 +08:00
670996f484 Merge branch 'bugfix/make_clean_files_v5.1' into 'release/v5.1'
build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES (v5.1)

See merge request espressif/esp-idf!23661
2023-05-10 13:46:56 +08:00
8bb8c144c7 i2s_doc: fixed the data of stereo left/right state 2023-05-10 12:36:00 +08:00
653ba59b23 i2s_tdm: fixed half sample bit calculation and added check for slot mask 2023-05-10 12:34:14 +08:00
319e0689a5 i2s_std: fixed mclk check for 24-bit data and enable left alignment as default 2023-05-10 12:32:38 +08:00
6b86fc7ad7 Merge branch 'test/enlarge_gptimer_test_threshold_v5.1' into 'release/v5.1'
gptimer: enlarge test threshold (v5.1)

See merge request espressif/esp-idf!23622
2023-05-10 10:39:45 +08:00
f4c5fdbd1a Merge branch 'ci/migrate_peripherals_examples_v5.1' into 'release/v5.1'
ci: migrate peripherals ttfw test scripts (v5.1)

See merge request espressif/esp-idf!23403
2023-05-10 10:25:40 +08:00
7b93cf91aa mcpwm: can't apply the same delay module to multiple generators
This is a hardware limitation, one delay module can only be used by one generator at one time.

Closes https://github.com/espressif/esp-idf/issues/11327
2023-05-10 10:09:48 +08:00
63153794c9 build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES
ADDITIONAL_MAKE_CLEAN_FILES is deprecated and only worked with make.
Replaced with the new ADDITIONAL_CLEAN_FILES (CMake 3.15) which also works with ninja.
2023-05-10 09:53:55 +08:00
19a2e42770 ci: fix invalid kconfig options in system test apps 2023-05-10 09:42:12 +08:00
45fd8feba3 ulp: add support for using lp timer with lp core on C6 2023-05-10 09:39:24 +08:00
f5020d3f1b Merge branch 'bugfix/freertos_nested_sched_suspension_v5.1' into 'release/v5.1'
freertos-idf: Fixed incorrect scheduler suspension check in xTaskRemoveFromEventList() (v5.1)

See merge request espressif/esp-idf!23650
2023-05-10 01:41:34 +08:00
08600cb1a3 ulp-riscv-i2c: Add ULP RISC-V I2C read/write timeout config option
The commit 88e4c06028 introduced a loop timeout for all ULP RISC-V I2C
transactions to avoid getting stuck in a forever loop. The loop timeout
was set to 500 msec by default. This commit improves on the concept by
making the loop timeout configurable via a Kconfig option in terms of
CPU ticks. If the timeout is set to -1 value then the transaction loops
will never timeout, therefore restoring the driver behavior before the
timeout was introduced.

The commit also updates the I2C Fast mode timings for esp32s2 which need
to be adjusted due to bus timing constraints.

Closes https://github.com/espressif/esp-idf/issues/11154
2023-05-09 15:07:50 +02:00
236d601e98 mcpwm: reset peripheral in restart, panic and halt
mcpwm is commonly used in power eletronic area, when restart happens,
make sure the mcpwm generator is not working.

closes https://github.com/espressif/esp-idf/issues/11324
2023-05-09 18:30:46 +08:00
ee18b19b8f freertos-idf: Fixed incorrect scheduler suspension check in xTaskRemoveFromEventList()
This commit fixes a bug in xTaskRemoveFromEvenetList() where in the
check for scheduler suspension did not account for nested suspensions.
Additionally, this commit updates all checks for scheduler
suspension to follow a uniform way.
2023-05-09 12:25:09 +02:00
27f044bd7f i2s_pdm: enable example pytest on h2 (v5.1) 2023-05-09 17:30:40 +08:00
5a353ab1ca Merge branch 'docs/add_cn_trans_i2s_v5.1' into 'release/v5.1'
Docs: add CN translation for i2s.rst (backport v5.1)

See merge request espressif/esp-idf!23625
2023-05-09 15:13:45 +08:00
bac34f23bc Docs: add CN translation for i2s.rst (backport v5.1) 2023-05-09 15:13:44 +08:00
8a08cfe7d1 Merge branch 'bugfix/fix_own_addr_is_rap_random_err_v5.1' into 'release/v5.1'
Fixed no error report when own address type is rpa_random and no random address setting(backport v5.1)

See merge request espressif/esp-idf!23623
2023-05-08 20:20:53 +08:00
242713ceee Merge branch 'bugfix/ana_cmpr_negative_enum_v5.1' into 'release/v5.1'
driver: Fix ana_cmpr negative enum comparison and bad test (v5.1)

See merge request espressif/esp-idf!23630
2023-05-08 19:44:56 +08:00
1d3a08d06f Merge branch 'docs/provide_CN_trans_for_22939_backport_v5.1' into 'release/v5.1'
docs: update links in mdns.rst (backport_v5.1)

See merge request espressif/esp-idf!23633
2023-05-08 19:43:31 +08:00
e6de764ca1 docs: update links in mdns.rst_backport_v5.1 2023-05-08 17:46:58 +08:00
3948949019 driver: Fix ana_cmpr negative enum comparison
The C17 standard (sec 6.7.2.2) indicates that the underlying type of an enum is
implementation defined (i.e., can be signed or unsigned). Thus, comparing
"-1 >= some_enum" where "some_enum" is always 0 or largert can return true if
the compiler uses unsigned for enums.

This commit fixes the following issues with ana_cmpr:

- Fixed incorrect comparison in ana_cmpr_del_unit() that relied on enums being
signed, thus would always return true.
- Fixed incorrect expected argument in the "ana_cmpr_unit_install_uninstall"
test. This was not picked up due to the incorrect enum comparison above.
2023-05-08 17:11:52 +08:00
24cc2d714e Fixed BLE disconnection failure on ESP32 2023-05-08 12:17:09 +08:00
16696d98c1 Fixed battery profile wrong condition 2023-05-08 11:31:22 +08:00
zwj
daf2622a5b Fixed no error report when own address type is rpa_random and no random address setting 2023-05-08 11:31:06 +08:00
864f5532fa gptimer: enlarge test threshold 2023-05-08 10:18:58 +08:00
d4a3427eaf Merge branch 'bugfix/gdma_log_nano_v5.1' into 'release/v5.1'
gdma: fixed crash from logging when using newlib nano (v5.1)

See merge request espressif/esp-idf!23585
2023-05-08 10:13:55 +08:00
94d6614c88 Merge branch 'ci/fix_overwrite_pytest_configs_v5.1' into 'release/v5.1'
ci: fixed test apps overriding pytest configs (v5.1)

See merge request espressif/esp-idf!23495
2023-05-06 17:40:58 +08:00
de5a9ac1f3 Merge branch 'bugfix/check_filter_range_v5.1' into 'release/v5.1'
rmt: check filter and idle threashold (v5.1)

See merge request espressif/esp-idf!23604
2023-05-06 14:00:20 +08:00
46f104b3ae gdma: fixed crash from logging when using newlib nano
Newlib nano printf formatting do not support %z, and will crash if such an identifier
is followed by a %s indentifier.

Closes https://github.com/espressif/esp-idf/issues/9631
2023-05-06 13:47:51 +08:00
dd747bd54d Merge branch 'contrib/github_pr_11326_v5.1' into 'release/v5.1'
correct typo in reference to ESP-IDF repo (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23551
2023-05-06 13:09:33 +08:00
7d96d9e306 Merge branch 'backport/fix_openthread_ci' into 'release/v5.1'
OpenThread CI: add a function for executing commands(backport v5.1)

See merge request espressif/esp-idf!23602
2023-05-06 10:34:06 +08:00
1111fd2630 Merge branch 'contrib/github_pr_11296_v5.1' into 'release/v5.1'
Fix references to IDF_ADD_PATHS_EXTRAS before being assigned (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23599
2023-05-05 21:12:11 +08:00
d12ad17373 rmt: check filter and idle threashold
Closes https://github.com/espressif/esp-idf/issues/11262
2023-05-05 19:07:59 +08:00
4db113a2eb Merge branch 'bugfix/hf_cind_ind_index_v5.1' into 'release/v5.1'
bt: Fixed the inconsistency between the indicator event received by the HF application layer and the actually received indicator(v5.1)

See merge request espressif/esp-idf!23559
2023-05-05 18:47:45 +08:00
bba2581f1a Merge branch 'bugfix/fatfs_open_O_CREAT_fails_v5.1' into 'release/v5.1'
fatfs: fix "open("xx",O_CREAT|O_WRONLY,0666)" call failure (v5.1)

See merge request espressif/esp-idf!23561
2023-05-05 18:13:51 +08:00
938bcc0337 OpenThread CI: add a function for executing commands 2023-05-05 18:05:02 +08:00
845efafc76 Fix references to IDF_ADD_PATHS_EXTRAS before being declared 2023-05-05 11:17:24 +02:00
cje
78b9f5e151 fix too low hp ldo dbias bug for h2 2023-05-05 17:04:18 +08:00
8dbe966d89 fix a2dp source crash when connect to Bose speaker 2023-05-04 19:00:20 +08:00
38570b052b pm: fix invalid trace pins for C6 and H2 2023-05-04 14:42:17 +08:00
4477f3e559 bugfix: fix for fatfs "open("xx",O_CREAT|O_WRONLY,0666)" call failure
fatfs 'open' with only O_CREAT flag fails to creat new file

Closes https://github.com/espressif/esp-idf/issues/1817
2023-05-04 11:45:37 +05:30
25e8069532 bt: Fixed the inconsistency between the indicator event received by the HF application layer and the actually received indicator.
Closes https://github.com/espressif/esp-idf/issues/6486
2023-05-04 14:08:30 +08:00
90e354a723 wpa_supplicant: Reduce logging for SAE 2023-05-04 11:23:55 +05:30
2004bf4e11 Merge branch 'bugfix/rmt_one-wire_v5.1' into 'release/v5.1'
rmt_onewire: refactor example with component registry (v5.1)

See merge request espressif/esp-idf!23509
2023-05-04 13:32:18 +08:00
a0a6e34f4f docs: fix wrong link to esp-adf github issues in migration guide 2023-05-04 12:57:08 +08:00
6b5b7f09f9 i2c: fix a bug in sda sample timing
* Closes https://github.com/espressif/esp-idf/issues/9777

This bug prevented SCL line to work properly after a NACK was received in master mode.
2023-05-04 12:14:43 +08:00
42d5b865dd Fixed the issue that the a2dp source would not send the media start command due to the connection initiated by the peer device
Closes https://github.com/espressif/esp-idf/issues/11170
2023-05-04 12:13:27 +08:00
123da6baa7 bugfix: fix esp32c6eco1 fosc calibration cycles during sleep 2023-05-04 11:47:54 +08:00
2654d29bc5 correct typo in reference to ESP-IDF repo
There's a reference to the ESP-ADF repo that looks like it was intended to be a reference to the ESP-IDF repo. This branch fixes the reference.
2023-05-04 11:43:08 +08:00
b3b85cafb1 Merge branch 'bugfix/fix_ble_hop_sel_v5.1' into 'release/v5.1'
Fixed BLE connection failed to be established when disabled 5.0 feature (backport 5.1)

See merge request espressif/esp-idf!23530
2023-05-04 11:38:06 +08:00
21fd9aaee8 ci: small cleanup for the dependencies.yml 2023-05-04 11:21:40 +08:00
8fd3b342aa ci: add pattern ccs811 2023-05-04 11:21:39 +08:00
1c1c6d59b3 ci: migrate peripherals ttfw test scripts 2023-05-04 11:21:29 +08:00
f2d144166a sdio_example: fix meaningless print in host, make shared reg access more readable in slave 2023-05-04 11:21:10 +08:00
e704f72356 Merge branch 'backport/ble_bugfix_5_1' into 'release/v5.1'
ble: [ESP32C6][ESP32H2][ESP32C2] updata libble

See merge request espressif/esp-idf!23523
2023-05-04 10:52:01 +08:00
4f1fc73fc2 Merge branch 'bugfix/eth_driver_cleanup_v5.1' into 'release/v5.1'
Ethernet driver and documentation clean-up (v5.1)

See merge request espressif/esp-idf!23545
2023-05-04 10:05:25 +08:00
2508350137 Merge branch 'bugfix/eth_l2_test_switch_v5.1' into 'release/v5.1'
LAN8720 & IP101 L2 Test Fix (v5.1)

See merge request espressif/esp-idf!23535
2023-05-04 10:04:46 +08:00
058bb0edd0 docs: update translation for esp_eth 2023-05-03 07:39:24 +00:00
71d19fa9c9 Ethernet driver and documentation clean-up 2023-05-03 07:39:24 +00:00
07d1e19107 improve thread safety in esp_timer
Inadequate locking in the esp_timer component allowed corruption
of the s_timers linked list:

1. timer_armed(timer) returns false
2. another task arms the timer and adds it to s_timers
3. the list is locked
4. the timer is inserted into s_timers again

The last step results in a loop in the s_timers list, which causes
an infinite loop when iterated. This change always locks the
list before checking if the timer is already armed avoiding
the data race.
2023-05-02 20:22:24 +02:00
1042115566 esp_eth pytest: increased robustness of the L2 test
Added filtering frames based on MAC address
2023-05-02 10:25:58 +02:00
b97cf6ca7c Merge branch 'fix/ecdsa_hal_v5.1' into 'release/v5.1'
ecdsa: Support multiple ECDSA keys (v5.1)

See merge request espressif/esp-idf!23444
2023-05-02 11:48:17 +08:00
5775e1d3b7 esp_system (C6 & H2): Enables BOOTLOADER_RESERVE_RTC_MEM feature for bootloader
This option reserves an area in RTC FAST memory for the following features:
- "Skip image validation when exiting deep sleep"
- "Reserve RTC FAST memory for custom purposes"
- "GPIO triggers factory reset"
2023-05-01 06:27:11 +00:00
4a74ae4921 ci: Add patterns and target-tests for ecdsa_efuse runner 2023-04-30 11:48:46 +05:30
5fac5b0191 mbedtls/ecdsa: Add ECDSA signature generation test 2023-04-30 11:47:35 +05:30
abc099ce9f ecdsa: Support multiple ECDSA keys
Add provision to choose which efuse block should be used as ECDSA
private key
2023-04-30 11:47:35 +05:30
174ef6c4a3 ecdsa_hal.c: Add missing configuration for signature generation 2023-04-30 11:47:35 +05:30
89c06b3c51 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed ble hopping selection for connection when disabled 5.0 feature
2023-04-28 19:30:45 +08:00
62a5ad5fc1 sdmmc: add vTaskDelay to loops to prevent potential WDT trigger
Also change timeout to 120 seconds in fatfs sdcard pytest to prevent failing during formatting.
2023-04-28 12:39:08 +02:00
c7ca30e62f [SDMMC] add reasonable timeouts to all while loops
Closes: https://github.com/espressif/esp-idf/pull/10532
2023-04-28 12:39:06 +02:00
6ff1059da7 [SDMMC Mount] fix infinite loop when SD card is not responsive
Closes: https://github.com/espressif/esp-idf/pull/10532
2023-04-28 12:37:27 +02:00
d6a1ccb27f ble: [ESP32C6][ESP32H2][ESP32C2] updata libble
Fixed the occasional mic error caused by wrong tx cnt
Fixed the BLE connection timeout issue
2023-04-28 17:27:36 +08:00
zwl
e575e0b44a Ble: bugfix for packet loss issue during connection on ESP32C6 2023-04-28 17:27:08 +08:00
cbd210b431 Merge branch 'refactor/rename_to_esp_clk_tree_prefix_v5.1' into 'release/v5.1'
esp_clk_tree: Rename clk_tree_xxx to esp_clk_tree_xxx (v5.1)

See merge request espressif/esp-idf!23449
2023-04-28 17:11:46 +08:00
14dac35540 rmt_onewire: refactor example with component manager
Closes https://github.com/espressif/esp-idf/issues/10790
2023-04-28 13:38:33 +08:00
71a19d238c esp_gdbstub: refactor code 2023-04-28 12:38:26 +08:00
961018d882 Merge branch 'bugfix/pmkid_sha256_bug_v5.1' into 'release/v5.1'
wpa_supplicant: Fix PMKID SHA-256 related regression (Backport v5.1)

See merge request espressif/esp-idf!23494
2023-04-28 07:52:52 +08:00
c710a69952 Merge branch 'bugfix/fix_softap_pairwise_cipher_issue_v5.1' into 'release/v5.1'
esp_wifi: update pairwise cipher in softAP(Backport v5.1)

See merge request espressif/esp-idf!23503
2023-04-28 04:45:59 +08:00
eeea0a7ea8 Merge branch 'feature/esp_tls_add_getter_setter_v5.1' into 'release/v5.1'
esp-tls: Added getter/setter function for the conn_state. (v5.1)

See merge request espressif/esp-idf!23408
2023-04-28 04:36:25 +08:00
5fdb9b00c5 CI: fix sdcard examples timeout 2023-04-27 17:47:12 +02:00
310e5e71ed Merge branch 'bugfix/spp_notify_v5.1' into 'release/v5.1'
NimBLE: Removed indicate flag from gatt db and added subscription case in spp_server example (v5.1)

See merge request espressif/esp-idf!23458
2023-04-27 23:36:24 +08:00
9a58988bae Merge branch 'test/removed_emmc_esp32_ut_v5.1' into 'release/v5.1'
emmc: removed esp32 emmc ut_017 (v5.1)

See merge request espressif/esp-idf!23485
2023-04-27 23:34:24 +08:00
d89db7e4a7 Merge branch 'feature/spi_hal_move_out_iram_v5.1' into 'release/v5.1'
spi: change linker file to move spi hal out from iram (v5.1)

See merge request espressif/esp-idf!23448
2023-04-27 23:31:16 +08:00
c0c9227883 Merge branch 'fix/sdio_sd_cards_not_detected_correctly_v5.1' into 'release/v5.1'
sdmmc: sdio combination cards correct setup (v5.1)

See merge request espressif/esp-idf!23478
2023-04-27 23:28:28 +08:00
c49dce48eb Merge branch 'fix/esp32s3_ununsed_dcache_as_dram_v5.1' into 'release/v5.1'
esp_hw_support: Update the memory ptr location/property checks to include the unused DCACHE added to DRAM (v5.1)

See merge request espressif/esp-idf!23303
2023-04-27 22:09:55 +08:00
1a03cb02c2 Merge branch 'feature/support_fosc_calibration_c6_eco1_to_v5.1' into 'release/v5.1'
ESP32C6: Fix fosc calibration fail bug for ECO1 & Above (v5.1)

See merge request espressif/esp-idf!23467
2023-04-27 20:38:31 +08:00
193f581cec esp_wifi: update pairwise cipher in softAP 2023-04-27 20:07:48 +08:00
f03e3c164e esp_supplicant: When the softAP authentication mode is set to WPA2_PSK, WPA2_WPA3_PSK, or WPA3_PSK, the pairwise cipher will be overwritten with WIFI_CIPHER_TYPE_CCMP 2023-04-27 20:07:39 +08:00
8d383980a1 esp_supplicant: wpa pmf should be disabled 2023-04-27 20:07:30 +08:00
202b18b5fa esp_clk_tree: Rename clk_tree_xxx to esp_clk_tree_xxx, add compilation warning to clk_tree.h 2023-04-27 11:11:18 +00:00
3048251be0 Merge branch 'ci/pytest_case_tester_script_fix_v5.1' into 'release/v5.1'
ci: pytest automation script increase timeout time (v5.1)

See merge request espressif/esp-idf!23447
2023-04-27 17:35:51 +08:00
c35f7cad45 Merge branch 'feature/c6_ulp_sleep_v5.1' into 'release/v5.1'
ulp: added sleep support for lp core (v5.1)

See merge request espressif/esp-idf!23484
2023-04-27 17:07:24 +08:00
1b4e46428d Merge branch 'bugfix/reject_tkip_in_owe_v5.1' into 'release/v5.1'
Reject TKIP cipher incase of OWE connection (Backport v5.1)

See merge request espressif/esp-idf!23462
2023-04-27 16:51:15 +08:00
5bba395bc8 Merge branch 'bugfix/wifi_prov_deinit_github_v5.1' into 'release/v5.1'
wifi_prov_mgr: Fixed memory leak after bluetooth stack was stopping. (v5.1)

See merge request espressif/esp-idf!23436
2023-04-27 16:33:53 +08:00
8719a45d97 Merge branch 'ci/fix_no_test_script_corner_case_v5.1' into 'release/v5.1'
ci: fix build script when no test script found (v5.1)

See merge request espressif/esp-idf!23404
2023-04-27 16:10:10 +08:00
0e484e1daa Merge branch 'feature/bt_uses_creationg_with_caps_functions_v5.1' into 'release/v5.1'
BT: Remove "create static" calls from OSI (v5.1)

See merge request espressif/esp-idf!23337
2023-04-27 16:06:10 +08:00
0be6802198 Merge branch 'backport/ieee802154_open_src' into 'release/v5.1'
ieee802154: drive code open source (backport v5.1)

See merge request espressif/esp-idf!23461
2023-04-27 16:02:09 +08:00
9f80af3770 Merge branch 'bugfix/ble_mesh_fix_heartbeat_set_v5.1' into 'release/v5.1'
ble_mesh: stack: Update the heartbeat filter entry add/remove handling (v5.1)

See merge request espressif/esp-idf!23460
2023-04-27 14:38:27 +08:00
411c392d97 Merge branch 'feature/support_fosc_calibration_h2_eco2_to_v5.1' into 'release/v5.1'
ESP32H2: Fix fosc calibration fail bug for ECO2 & Above (v5.1)

See merge request espressif/esp-idf!23469
2023-04-27 14:38:01 +08:00
3724bf6256 ci: fixed test apps overriding pytest configs 2023-04-27 14:29:06 +08:00
a64cbdea10 wpa_supplicant: Fix PMKID SHA-256 related regression
Fixed regression caused by commit 38e9c8b4
2023-04-27 11:35:20 +05:30
728c1ffe59 Merge branch 'backport/openthread_ci_fix' into 'release/v5.1'
Openthread: add delay to ensure that the dut can receive input command(BackportV5.1)

See merge request espressif/esp-idf!23486
2023-04-27 13:56:46 +08:00
2bc721739c Merge branch 'bugfix/i2s_tdm_multi_dev_on_h2_v5.1' into 'release/v5.1'
i2s: fixed tdm multi dev test on h2 (v5.1)

See merge request espressif/esp-idf!23475
2023-04-27 13:20:03 +08:00
34e0ed613a Nimble:Added change to expose addr resolution API outside stack 2023-04-27 10:33:47 +05:30
7492e0a2c7 Merge branch 'support/backport_154_related_feature' into 'release/v5.1'
openthread: backport Thread related fixes (backport v5.1)

See merge request espressif/esp-idf!23427
2023-04-27 11:57:47 +08:00
ea65b1fefb esp_phy: remove esp32h4 phylib 2023-04-27 11:28:12 +08:00
a33c60a36f ieee802154: remove libieee802154.a for target esp32h4 2023-04-27 11:28:12 +08:00
3178718a3d ieee802154: support driver opensrc 2023-04-27 11:27:57 +08:00
deedc51cf1 Merge branch 'ci/chip_support_network_invalid_kconfig_v5.1' into 'release/v5.1'
ci: remove redundent ci configs for chip support and network components (v5.1)

See merge request espressif/esp-idf!23471
2023-04-27 11:10:54 +08:00
f7e3f76899 openthread CI: add delay to ensure that the dut can receive input command 2023-04-27 10:54:19 +08:00
46511c8fd1 Merge branch 'bugfix/fix_wrong_frame_ptr_after_wake_restore_backportv5.1' into 'release/v5.1'
bugfix: fix wrong RvCoreCriticalSleepFrame ptr value after wake restore (backport v5.1)

See merge request espressif/esp-idf!23473
2023-04-27 10:45:04 +08:00
96b3f52c4e emmc: temporarily removed esp32 emmc ut_017 2023-04-27 10:30:38 +08:00
2117b7a1dc Merge branch 'contrib/github_pr_11113_v5.1' into 'release/v5.1'
Fix usb enumeration stage error for some device (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23332
2023-04-27 10:12:12 +08:00
3ae079ac12 Merge branch 'bugfix/fix_duplicate_scan_cycle_refresh_not_accurate_v5.1' into 'release/v5.1'
Fixed duplicate scan refresh cycle is not accurate after restarting scan on ESP32(backport v5.1)

See merge request espressif/esp-idf!23405
2023-04-27 10:02:17 +08:00
0bac174058 ulp: added sleep support for lp core
Added support for running LP core while hp core sleeps, as well
as waking up the hp core.
2023-04-27 09:51:41 +08:00
856cfa4ae2 Merge branch 'refactor/remove_esp32h4_target_v5.1' into 'release/v5.1'
esp32h4: remove esp32h4 target (v5.1)

See merge request espressif/esp-idf!23422
2023-04-27 09:37:51 +08:00
0d13dbbb1f OpenThread border router: support border router to connect with SSED 2023-04-27 09:16:10 +08:00
51c058d80f ieee802154: increase the timeout for ieee802.15.4 CI test 2023-04-27 09:16:10 +08:00
aea120b98b openthread: fix the spi conflict between ot-spinel and ethernet 2023-04-27 09:16:10 +08:00
7909394274 openthread: fix platform udp send rules for OT netif 2023-04-27 09:16:10 +08:00
6bfa2b7078 openthread port: set ipv6 address zone with netif index when udp joining or leaving group 2023-04-27 09:16:10 +08:00
86a673946c openthread: Add check for lock acquire and release 2023-04-27 09:16:10 +08:00
aedcec9be5 Merge branch 'feature/emmc_example_v5.1' into 'release/v5.1'
SDMMC Host: added an example to communicate with an eMMC chip and also a bugfix for Host timing (v5.1)

See merge request espressif/esp-idf!23283
2023-04-26 22:41:15 +08:00
934f0477a4 Merge branch 'bugfix/allow_no_specify_uart_clk_src_v5.1' into 'release/v5.1'
uart: Allow omitting source_clk parameter to uart_param_config (v5.1)

See merge request espressif/esp-idf!23451
2023-04-26 20:32:35 +08:00
81988b0007 Merge branch 'docs/add_Chinese_translation_for_api-reference/error-codes_backport_v5.1' into 'release/v5.1'
docs: provide translation for docs/zh_CN/api-reference/error-codes.rst (backport v5.1)

See merge request espressif/esp-idf!23397
2023-04-26 19:47:13 +08:00
de45fb1c33 docs: provide translation for docs/zh_CN/api-reference/error-codes.rst (backport v5.1) 2023-04-26 19:47:13 +08:00
29be39086f Merge branch 'docs/update_out_of_sync_api-reference_docs_backport_v5.1' into 'release/v5.1'
docs: update out-of-sync api reference docs (backport v5.1)

See merge request espressif/esp-idf!23399
2023-04-26 19:45:23 +08:00
934c2c3a58 sdmmc: sdio combination cards correct setup
Co-authored-by: Mau Abata <mauabata@gmail.com>
Closes https://github.com/espressif/esp-idf/issues/9822
Closes https://github.com/espressif/esp-idf/issues/10280
2023-04-26 13:27:59 +02:00
0aad1efe15 i2s: fixed tdm multi dev test on h2 2023-04-26 18:55:36 +08:00
87328d594f esp32h4: checked all the corner stuffs of the removal 2023-04-26 18:53:12 +08:00
954a6a2cff esp32h4: removed esp32h4 related codes 2023-04-26 18:53:12 +08:00
cae47ce37e esp32h4: removed esp32h4 related files 2023-04-26 18:53:12 +08:00
8f24b34f21 esp32h4: remove esp32h4 target from ci 2023-04-26 18:53:12 +08:00
804a9ea1f6 esp32h4: remove esp32h4 target from peripherals 2023-04-26 18:53:10 +08:00
46deef434f esp_pm: check sleep retention frame integrity in ci UT 2023-04-26 17:36:46 +08:00
5ccf93d788 bugfix: fix wrong RvCoreCriticalSleepFrame ptr value after wake restore 2023-04-26 17:36:42 +08:00
4c3c6b7f99 ci: remove redundent ci configs for chip support and network components
CI would build psram config test apps even for target with no psram.
2023-04-26 17:29:51 +08:00
70fc0bde01 support h2 eco2 fosc calibration for v5.1 2023-04-26 17:08:09 +08:00
1564884cc1 support c6 eco1 fosc calibration for v5.1 2023-04-26 16:32:28 +08:00
86226770b8 esp_wifi: Reject TKIP cipher incase of OWE connection 2023-04-26 12:10:33 +05:30
e121775d6c ble_mesh: stack: Update the heartbeat filter entry add/remove handling 2023-04-26 14:17:11 +08:00
ef3da6b372 NimBLE: Removed indicate flag from gatt db, added subscription case and corrected indentation
in spp_server example.
2023-04-26 11:39:09 +05:30
1b6461b9f8 Merge branch 'bugfix/bod_glitch_reset_c6_v5.1' into 'release/v5.1'
bootloader: fix BOD and glitch reset on C6 and H2 (v5.1)

See merge request espressif/esp-idf!23380
2023-04-26 13:09:32 +08:00
16f3317496 soc/esp32s3: Fix the SOC_MEM_INTERNAL_HIGH value
- As per the memory block diagram for ESP32-S3, the
  internal memory address ranges as follows:
  DRAM: 0x3FC88000 (== SOC_MEM_INTERNAL_LOW) <-> 0x3FCF0000
  IRAM: 0x40378000 <-> 0x403E0000 (== SOC_MEM_INTERNAL_HIGH)
2023-04-26 04:01:38 +00:00
3118120659 esp_hw_support: Update memory ptr location/property checks
- to acknowledge the unused DCACHE added to DRAM for ESP32-S3

- For ESP32-S3, when the DCACHE size is set to 16 kB, the unused 48 kB is added to
  the heap in 2 blocks of 32 kB (from 0x3FCF0000) and 16 kB (from 0x3C000000).
- But, if we try allocating memory from the 16 kB block and run an `esp_ptr_internal`
  check on that memory pointer, it fails as the address block from 0x3C000000
  corresponds to the external memory symbols SOC_DROM_LOW and SOC_EXTRAM_DATA_LOW.
  (E.g. freertos - If the IDLE task stack buffer gets allocated from this region,
  the firmware will abort due to this failure).
- Thus, the checks `esp_ptr_internal`, `esp_ptr_in_drom` and `esp_ptr_byte_accessible`
  have been updated to acknowledge this memory as a part of the DRAM.

Co-authored-by: Mahavir Jain <mahavir@espressif.com>
2023-04-26 04:01:38 +00:00
e1b89eeae0 Merge branch 'feature/s2_ulp_riscv_adc_v5.1' into 'release/v5.1'
ulp-riscv: enable ULP-RISCV ADC example for esp32s2 (v5.1)

See merge request espressif/esp-idf!23371
2023-04-26 11:59:20 +08:00
cfcb57333b Merge branch 'bugfix/fix_chip_broken_bug_in_monitor_mode_S2_v5.1' into 'release/v5.1'
ESP32S2/C3/C2: fixed S2 dangerous power parameters in sleep modes and support S2/C3/C2 different sleep mode (v5.1)

See merge request espressif/esp-idf!23378
2023-04-26 11:41:09 +08:00
24bfb8a8e5 uart: Allow the users to not specify the source_clk in uart_config_t when calling uart_param_config 2023-04-26 11:24:16 +08:00
f61e219667 spi: change linker file let spi hal able to out from iram 2023-04-26 11:15:30 +08:00
40b0dbae10 spi_flash: fix config SPI_FLASH_SHARE_SPI1_BUS dependency 2023-04-26 11:15:30 +08:00
ee4e5c014a sdio: test_sdio add unity sync signals 2023-04-26 11:11:59 +08:00
4dcd055612 ci: pytest automation script increase timeout time 2023-04-26 11:11:59 +08:00
6b28967b64 Merge branch 'bugfix/fix_adc_continuouus_example_pytest_potential_failure_v5.1' into 'release/v5.1'
adc: fix adc_continuous example pytest potential failure (v5.1)

See merge request espressif/esp-idf!23425
2023-04-25 19:59:43 +08:00
f6e0867eb8 wifi_prov_mgr: Fixed memory leak after bluetooth stack was stopping. 2023-04-25 15:48:09 +05:30
30cc0769ac Merge branch 'refactor/remove_esp_mm_kconfig_as_no_kconfig_option_now_v5.1' into 'release/v5.1'
esp_mm: removed empty kconfig files (v5.1)

See merge request espressif/esp-idf!23284
2023-04-25 17:52:35 +08:00
f793584c68 Merge branch 'docs/update_cn_trans_api_guides' into 'release/v5.1'
Docs: Update cn trans api guides (backport v5.1)

See merge request espressif/esp-idf!23384
2023-04-25 17:16:43 +08:00
3a34660d54 Docs: Update cn trans api guides (backport v5.1) 2023-04-25 17:16:43 +08:00
d54af90022 Merge branch 'ci/disable_test_dram_reg2_execute_violation_v5.1' into 'release/v5.1'
ci: disable test_dram_reg2_execute_violation on esp32s2 (v5.1)

See merge request espressif/esp-idf!23420
2023-04-25 14:28:16 +08:00
a0df46d342 Merge branch 'bugfix/wifi_backport_v5.1' into 'release/v5.1'
esp_wifi: backport some wifi fixes to v5.1

See merge request espressif/esp-idf!23389
2023-04-25 13:52:44 +08:00
959f92e744 Merge branch 'docs/esp_protocols_docs_migration_v5.1' into 'release/v5.1'
docs: migrated documentation from github.io to docs.espressif.com (v5.1)

See merge request espressif/esp-idf!23319
2023-04-25 13:49:13 +08:00
e23ce8209d fix adc_continuous example pytest potential failure 2023-04-25 12:26:34 +08:00
92965cd124 Merge branch 'feature/sram1_iram_v5.1' into 'release/v5.1'
system: add kconfig option for using parts of SRAM1 for IRAM (v5.1)

See merge request espressif/esp-idf!23370
2023-04-25 11:35:08 +08:00
8c11edb852 Merge branch 'feature/update_mbedtls_v5.1' into 'release/v5.1'
mbedtls: Update to release/v3.4.0 (v5.1)

See merge request espressif/esp-idf!23398
2023-04-25 11:04:44 +08:00
f67a860cf0 ci: disable test_dram_reg2_execute_violation on esp32s2 2023-04-25 10:02:00 +08:00
9d114e30b5 Merge branch 'feature/esp_sys_iram_cleanup_v5.1' into 'release/v5.1'
esp-system: move uncessary IRAM functions to flash (v5.1)

See merge request espressif/esp-idf!23376
2023-04-25 09:51:25 +08:00
e104fa1904 Merge branch 'bugfix/esp32_pico_v3_2_chip_info_v5.1' into 'release/v5.1'
system: fix esp32 chip info not listing esp32 pico v3-02 as having embedded spiram (v5.1)

See merge request espressif/esp-idf!23393
2023-04-25 09:46:25 +08:00
d7b344c97a heap: Add a configuration that places all the heap component and related functionalities in flash when enabled
Add test configuration to run all tests with heap component in the flash.
Add reference to this new configuration in performance section of the documentation.
2023-04-25 01:12:10 +00:00
5bea8592d9 Merge branch 'ci/run_readme_checks_not_in_parallel' into 'release/v5.1'
ci: run readme check when constants.py or check script updated (v5.1)

See merge request espressif/esp-idf!23386
2023-04-25 09:00:59 +08:00
0f8bf38913 ci: run readme check when constants.py or check script updated 2023-04-25 08:51:22 +08:00
e24e674e2f esp-tls: Added getter/setter function for the conn_state.
* Added the setter function to set the connection sockfd value
Closes https://github.com/espressif/esp-idf/issues/10871
2023-04-24 14:49:26 +05:30
zwj
52ca53746f Fixed disconnection due to consecutive CRC errors in first 6 intervals 2023-04-24 15:49:36 +08:00
zwj
a26449844f Fixed duplicate scan refresh cycle is not accurate after restarting scan on ESP32 2023-04-24 15:49:12 +08:00
d020a58be1 Merge branch 'ci/soc_caps_docs_build_v5.1' into 'release/v5.1'
ci: build all docs if soc_caps.h changed (v5.1)

See merge request espressif/esp-idf!23374
2023-04-24 15:48:15 +08:00
4f40bfd864 ci: fix build script when no test script found 2023-04-24 15:47:58 +08:00
75002dce56 Merge branch 'contrib/github_pr_11163_v5.1' into 'release/v5.1'
Make custom bootloader message match actual output (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23375
2023-04-24 15:46:58 +08:00
b8718506cd mbedtls: fix ci failures for update v3.4.0
- While updating to mbedtls release/v3.4.0, building mbedtls/library/psa_crypto.c,
clang produced an unreachable-code warning, so added `-Wno-unreachable-code` compile option for clang.
- In `mbedtls/v3.4.0`, the ECDSA restartable sign and verify functions (`ecdsa.c`) were made public.
- But the `mbedtls_ecdsa_sign_det_restartable` function prototype was declared in the file `ecdsa.h`,
only when `MBEDTLS_ECDSA_SIGN_ALT` was not defined.
- added a patch in mbedtls library to fix it.
2023-04-24 11:56:56 +05:30
0116dcb578 mbedtls: replace low-level sha apis with md apis in esp_ssl_tls 2023-04-24 11:56:56 +05:30
3152dea192 mbedtls: Update config options as per release/v3.4.0
- Added a Kconfig option for the newly added mbedtls option MBEDTLS_PKCS7_C
2023-04-24 11:56:56 +05:30
31e42e77de mbedtls: Update to release/v3.4.0
- Release Notes: https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.4.0
2023-04-24 11:56:56 +05:30
f0b2bd5c81 docs: update out-of-sync api reference docs 2023-04-24 14:23:35 +08:00
83a682ca1a Merge branch 'monitor_win_color-v5.1' into 'release/v5.1'
bug(idf_monitor): fix color on windows with hints (v5.1)

See merge request espressif/esp-idf!23346
2023-04-24 14:00:05 +08:00
9ddd08c502 system: fix esp32 chip info not listing esp32 pico v3-02 as having embedded spiram
Closes https://github.com/espressif/esp-idf/issues/11233
2023-04-24 13:53:26 +08:00
4e73cb77e5 Merge branch 'esptool_extra-v5.1' into 'release/v5.1'
feat(esptool): allow to set force for write_flash (v5.1)

See merge request espressif/esp-idf!23338
2023-04-24 13:44:41 +08:00
f9ebbdf6ea esp_wifi:Enable wpsreg to initialize in APSTA mode 2023-04-24 12:32:47 +08:00
39caffc592 esp_wifi: espnow support using 11ax rate to send frame 2023-04-24 12:32:27 +08:00
ce5444d349 esp_wifi: Bugfix store authmode security in NVS 2023-04-24 12:32:08 +08:00
79dabf50b0 esp_wifi: Install keys after successful transmission of EAPOL 4/4 Message 2023-04-24 12:31:21 +08:00
a4dbb3a0a1 esp_wifi: Update wifi libs
Fix some NAN issues related to followup and matching filters
2023-04-24 12:30:54 +08:00
8438887cb4 esp_wifi: update phy_init_data.h for c6 mcs 8 9 power issue 2023-04-24 12:30:30 +08:00
7a410499f3 esp_wifi: Validate softap interface when sending beacon frame 2023-04-24 12:30:04 +08:00
c020a68e1e Update the ESP-NOW frame length in docs 2023-04-24 12:29:32 +08:00
55d44e0bee wifi_mesh: fix the heap corrupt issue in MTXON task 2023-04-24 12:29:19 +08:00
5736694dbc Merge branch 'bugfix/adds_iram_attr_for_some_esp_timer_apis_v5.1' into 'release/v5.1'
esp_timer: Adds IRAM_ATTR for esp_timer_restart and esp_timer_is_active (v5.1)

See merge request espressif/esp-idf!23309
2023-04-24 11:48:02 +08:00
6102cfdd27 sdmmc: in/out phase adapted to esp32 and esp32s3 2023-04-24 03:45:29 +00:00
5b18007d92 sdmmc: I/O phase adjustments
1. Fix incorrect meaning of SDMMC.clock bits, synchronize the names
   with the TRM.
2. Choose input and output phases to satisfy typical timing
   requirements.
3. Move use_hold_reg setting into the host driver, since it is related
   to timing.

Closes https://github.com/espressif/esp-idf/issues/8521
Related to https://github.com/espressif/esp-idf/issues/8257
2023-04-24 03:45:29 +00:00
bead0d741b sdmmc: add an example communicating with eMMC chip on S3 2023-04-24 03:45:29 +00:00
a218144f4c esp_mm: removed empty kconfig files
- MMU configuration related kconfig options will be in soc, or
esp_hw_support
- Cache configuration related kconfig options will be in soc, or
esp_hw_support
- mmap driver and msync driver kconfig options will be still in esp_mm.
As there's no kconfig options for them yet, removed kconfig files
2023-04-24 03:45:00 +00:00
46fe70fb46 freertos: Add unit tests for ...WithCaps() functions 2023-04-24 11:44:46 +08:00
c5fe3ec05d freertos: Add wrapper functions to create objects with capabilities
This commit adds various ...WithCaps() functions to create FreeRTOS objects
with specific memory capabilities.
2023-04-24 11:44:46 +08:00
3562cb8051 freertos: Add GetStaticBuffer functions
This commit adds the various ...GetStaticBuffer() functions from upstream
FreeRTOS. See https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/641 for more
details.
2023-04-24 11:44:46 +08:00
7b41d6004a freertos: Fix idf_additions.h include order error
When building for CONFIG_FREERTOS_SMP, "idf_additions.h" was previously
implicitly included by "task.h" so that other ESP-IDF components still have
access to IDF API additions without needing to include "idf_additions.h"
directly.

However, some FreeRTOS headers (e.g., queue.h) will include task.h before
declaring any types (e.g., QueueHandle_t). Thus if any of those types are used
in idf_additions.h, we get a missing type error.

This commit moves the implicity include of idf_additions.h to FreeRTOS.h
2023-04-24 11:44:46 +08:00
5c88e0d801 bootloader: enable super WDT and BOD reset on C2 2023-04-24 11:32:23 +08:00
c6559a9b64 bootloader: cleanup ana reset config code 2023-04-24 11:32:23 +08:00
ca3d871a21 bootloader: fixed super watchdog not enabled issue on C3, S3, H4 2023-04-24 11:32:23 +08:00
113e4dc520 bootloader: removed unavailable rtc features 2023-04-24 11:32:23 +08:00
80315b77a0 bootloader: fix analog reset on C6 and H2 2023-04-24 11:32:23 +08:00
aeabe8d742 Merge branch 'feature/hfp_ag_hints_v5.1' into 'release/v5.1'
tools: Update idf-py hints with Bluedroid HFP AG info[backport 5.1]

See merge request espressif/esp-idf!23289
2023-04-24 10:42:24 +08:00
1644050652 Merge branch 'bugfix/fix_some_ble_bug_v5.1' into 'release/v5.1'
Fixed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!23324
2023-04-24 10:41:59 +08:00
a12e124410 Merge branch 'bugfix/bt_diable_enbale_crash_v5.1' into 'release/v5.1'
bt:Fixed esp32 controller bug (v5.1)

See merge request espressif/esp-idf!23365
2023-04-24 10:39:58 +08:00
36d6a927d1 Merge branch 'bugfix/fix_some_esp32c3_s3_ble_bugs_230422' into 'release/v5.1'
Fixed some ESP32C3/S3 BLE bugs 23-04-22(backport v5.1)

See merge request espressif/esp-idf!23353
2023-04-24 10:38:34 +08:00
cje
93eeb4265c fix chip broken bug when run in monitor mode of S2 and modify voltage param to fit all sleep mode of S2/C2/C3 2023-04-24 10:37:57 +08:00
f608431421 Merge branch 'bugfix/spi_lcd_max_trans_size_v5.1' into 'release/v5.1'
spi_lcd: maximum transfer size should respect bus configuration (v5.1)

See merge request espressif/esp-idf!23229
2023-04-24 10:31:51 +08:00
21c536c563 Merge branch 'bugfix/lcd_align_before_cache_write_back_v5.1' into 'release/v5.1'
manually align the color buffer before cache write back (v5.1)

See merge request espressif/esp-idf!23243
2023-04-24 10:28:16 +08:00
de33225c31 riscv: moved some interrupt functions from IRAM to flash
These functions dont need to be in IRAM.
2023-04-24 10:27:31 +08:00
b07a534984 esp-system: move uncessary IRAM functions to flash 2023-04-24 10:27:31 +08:00
b0a1c0d045 Make custom bootloader message match actual output
Fixes the custom bootloader README.md so that the example output matches
what will actually be output by default in the custom bootloader.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2023-04-24 10:25:22 +08:00
73f895217b ci: build all docs if soc_caps.h changed
soc_caps.h is thightly coupled with the docs build. Should build all docs
after changing it to make sure nothing broke.
2023-04-24 10:18:11 +08:00
0fb6316888 Merge branch 'bugfix/rmt_encode_state_init_v5.1' into 'release/v5.1'
rmt: define RMT_ENCODING_RESET in rmt_encode_state_t (v5.1)

See merge request espressif/esp-idf!23239
2023-04-24 10:18:08 +08:00
be8727cf88 Merge branch 'bugfix/i2s_fix_intr_flag_for_pdm_rx_v5.1' into 'release/v5.1'
i2s: fix interrupt flag of pdm rx mode (v5.1)

See merge request espressif/esp-idf!23125
2023-04-24 10:13:41 +08:00
8b0860ef95 ulp-riscv: enable ULP-RISCV ADC example for esp32s2
ADC can now be used from the ULP-RISCV on S2 after the RTC power parameters were
fixed in a624d8d061

Closes https://github.com/espressif/esp-idf/issues/11052
Closes https://github.com/espressif/esp-idf/issues/11040
2023-04-24 10:12:00 +08:00
6bb4dc35ab docs: update CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM docs to better reflect the limitations 2023-04-24 09:55:00 +08:00
34fea0d38f system: add kconfig option for using parts of SRAM1 for IRAM
Using parts of SRAM1 for IRAM allows apps with more statically allocated IRAM

Closes https://github.com/espressif/esp-idf/issues/9824
2023-04-24 09:54:47 +08:00
a6b1ebce31 Merge branch 'maint/release_v5.1_codeowners' into 'release/v5.1'
gitlab: simplify approvals for backports (v5.1)

See merge request espressif/esp-idf!23285
2023-04-24 05:19:37 +08:00
b5357e8b01 bt:Fixed esp32 controller bug
1. Fixed crash after controller disable and re-enable
2. Fixed the crash caused by processing the HCI_Read_Remote_Extented_Features command in the non-connected state

Closes https://github.com/espressif/esp-idf/issues/11164
Closes https://github.com/espressif/esp-idf/issues/10835
2023-04-23 20:26:56 +08:00
59666637bc Disable controller 5.0 feature bits if host 5.0 feature is not enabled 2023-04-22 20:49:30 +08:00
zwj
48c5f74cbc improve scan performance when scan and sync coexist on ESP32-C3 and ESP32-S3 2023-04-22 20:49:10 +08:00
8e41186ac8 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed non-connectable and non-scannable directed adv can't be scanned
2023-04-22 20:48:38 +08:00
49718b20a5 bug(idf_monitor): fix color on windows with hints
Closes https://github.com/espressif/esp-idf/issues/9610
2023-04-21 14:42:26 +02:00
f1a2bc777e usb_host: Use up-to-date syntax in pytest 2023-04-21 15:45:42 +08:00
0ed6610212 feat(esptool): allow to set force for write_flash 2023-04-21 09:36:18 +02:00
51405fd9d4 bt: Remove FreeRTOS static allocation from OSI functions
Previously, the BT OSI would use various FreeRTOS "create static" functions to
ensure that semaphores and queues were always allocated to internal memory.
However, from commit e21ab0332b onwards, all
dynamic memory allocated by FreeRTOS will default to internal RAM.

Thus, the extra "create static" calls can be removed to simply the code.
2023-04-21 15:19:29 +08:00
71786a7413 usb_host: Update docs and comments regarding first configuration enumeration
This commit updates some comments and documentation regarding changes made in
PR https://github.com/espressif/esp-idf/pull/11113.
2023-04-21 12:49:18 +08:00
4102628a3b Fix usb enumeration stage error for some device 2023-04-21 12:49:18 +08:00
d0011b778a bluedroid: report status after clearing the BLE white list 2023-04-20 18:58:38 +08:00
c2fe7be50e bluedroid: fix GATTC cache address save 2023-04-20 18:57:23 +08:00
13e3480f03 docs: migrated documentetation from github.io to docs.espressif.com 2023-04-20 13:38:16 +04:00
024e201097 esp_timer: Adds IRAM_ATTR for esp_timer_restart and esp_timer_is_active
Closes https://github.com/espressif/esp-idf/issues/10522
Closes https://github.com/espressif/esp-idf/issues/10859
2023-04-20 15:14:52 +08:00
62467fbca5 tools: Update idf-py hints with Bluedroid HFP AG info 2023-04-19 19:10:00 +08:00
84f81437a3 gitlab: simplify approvals for backports (v5.1) 2023-04-19 12:19:55 +02:00
c00759ad34 lcd: test send color buffers in multiple steps 2023-04-18 10:08:38 +08:00
472cc06f6c i80_lcd: align before cache sync 2023-04-18 10:08:38 +08:00
b5572b1db0 rmt: define RMT_ENCODING_RESET in rmt_encode_state_t
Closes https://github.com/espressif/esp-idf/issues/11200
2023-04-17 21:28:45 +08:00
2b461df8a8 spi_lcd: test spi lcd io can transfer color data to a fixed window region
also test the io tx_param and tx_color can skip the command phase
2023-04-17 16:25:14 +08:00
7a716377a3 spi_lcd: maximum transfer size should respect bus configuration
Also this commit added the SPI_TRANS_CS_KEEP_ACTIVE flag for io_tx_color
2023-04-17 16:25:14 +08:00
965e9abd7b i2s: fixed the test case I2S_thread_concurrent_safety_test 2023-04-10 15:29:22 +08:00
a47169f450 i2s: fix interrupt flag of pdm rx mode
Forgot to update in PR https://github.com/espressif/esp-idf/pull/10997
2023-04-10 15:29:22 +08:00
3390 changed files with 114629 additions and 163718 deletions

View File

@ -13,7 +13,7 @@ stages:
workflow:
rules:
# Disable those non-protected push triggered pipelines
- if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_PIPELINE_SOURCE == "push"'
- if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && $CI_PIPELINE_SOURCE == "push"'
when: never
# when running merged result pipelines, it would create a temp commit id. use $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA instead of $CI_COMMIT_SHA.
# Please use PIPELINE_COMMIT_SHA at all places that require a commit sha
@ -72,9 +72,6 @@ variables:
PRE_COMMIT_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-pre-commit:1"
# target test config file, used by assign test job
CI_TARGET_TEST_CONFIG_FILE: "$CI_PROJECT_DIR/.gitlab/ci/target-test.yml"
# target test repo parameters
TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git"
@ -98,6 +95,9 @@ variables:
# This is used only if CI_PYTHON_TOOL_REPO is not empty.
CI_PYTHON_TOOL_BRANCH: ""
# Set this variable to specify the file name for the known failure cases.
KNOWN_FAILURE_CASES_FILE_NAME: "5.1.txt"
IDF_CI_BUILD: 1
cache:
@ -131,8 +131,8 @@ cache:
export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/esp_app_trace:$IDF_PATH/components/partition_table:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
.setup_tools_and_idf_python_venv: &setup_tools_and_idf_python_venv |
# must use after setup_tools_except_target_test
# otherwise the export.sh won't work properly
# Since the version 3.21 CMake passes source files and include dirs to ninja using absolute paths.
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
# download constraint file for dev
if [[ -n "$CI_PYTHON_CONSTRAINT_BRANCH" ]]; then
@ -236,6 +236,7 @@ include:
- '.gitlab/ci/pre_check.yml'
- '.gitlab/ci/build.yml'
- '.gitlab/ci/assign-test.yml'
- '.gitlab/ci/integration_test.yml'
- '.gitlab/ci/host-test.yml'
- '.gitlab/ci/target-test.yml'
- '.gitlab/ci/deploy.yml'

View File

@ -2,214 +2,5 @@
#
# https://docs.gitlab.com/ee/user/project/code_owners.html#the-syntax-of-code-owners-files
#
# If more than one rule matches a given file, the latest rule is used.
# The file should be generally kept sorted, except when it is necessary
# to use a different order due to the fact above. In that case, use
# '# sort-order-reset' comment line to reset the sort order.
#
# Recipes for a few common cases:
#
# 1. Specific directory with all its contents:
#
# /components/app_trace/
#
# Note the trailing slash!
#
# 2. File with certain extension in any subdirectory of a certain directory:
#
# /examples/**/*.py
#
# This includes an *.py files in /examples/ directory as well.
#
# 3. Contents of a directory with a certain name, anywhere in the tree:
#
# test_*_host/
#
# Will match everything under components/efuse/test_efuse_host/,
# components/heap/test_multi_heap_host/, components/lwip/test_afl_host/, etc.
#
# 4. Same as above, except limited to a specific place in the tree:
#
# /components/esp32*/
#
# Matches everything under /components/esp32, /components/esp32s2, etc.
# Doesn't match /tools/some-test/components/esp32s5.
#
# 5. Specific file:
#
# /tools/tools.json
#
# 6. File with a certain name anywhere in the tree
#
# .gitignore
#
* @esp-idf-codeowners/other
/.* @esp-idf-codeowners/tools
/.github/workflows/ @esp-idf-codeowners/ci
/.gitlab-ci.yml @esp-idf-codeowners/ci
/.gitlab/ci/ @esp-idf-codeowners/ci
/.gitlab/dangerjs/ @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/.pre-commit-config.yaml @esp-idf-codeowners/ci
/.readthedocs.yml @esp-idf-codeowners/docs
/CMakeLists.txt @esp-idf-codeowners/build-config
/CONTRIBUTING.md @esp-idf-codeowners/docs
/Kconfig @esp-idf-codeowners/build-config
/README*.md @esp-idf-codeowners/docs
/SUPPORT_POLICY*.md @esp-idf-codeowners/docs
/add_path.sh @esp-idf-codeowners/tools
/conftest.py @esp-idf-codeowners/ci
/export.* @esp-idf-codeowners/tools
/install.* @esp-idf-codeowners/tools
/pytest.ini @esp-idf-codeowners/ci
/sdkconfig.rename @esp-idf-codeowners/build-config
/sonar-project.properties @esp-idf-codeowners/ci
# sort-order-reset
/components/app_trace/ @esp-idf-codeowners/tools
/components/app_update/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities
/components/bootloader*/ @esp-idf-codeowners/system @esp-idf-codeowners/security
/components/bootloader_support/bootloader_flash/ @esp-idf-codeowners/peripherals
/components/bt/ @esp-idf-codeowners/bluetooth
/components/cmock/ @esp-idf-codeowners/system
/components/console/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities/console
/components/cxx/ @esp-idf-codeowners/system
/components/driver/ @esp-idf-codeowners/peripherals
/components/efuse/ @esp-idf-codeowners/system
/components/esp_adc/ @esp-idf-codeowners/peripherals
/components/esp_app_format/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities
/components/esp_coex/ @esp-idf-codeowners/wifi @esp-idf-codeowners/bluetooth @esp-idf-codeowners/ieee802154
/components/esp_common/ @esp-idf-codeowners/system
/components/esp_eth/ @esp-idf-codeowners/network
/components/esp_event/ @esp-idf-codeowners/system
/components/esp_gdbstub/ @esp-idf-codeowners/tools
/components/esp_hid/ @esp-idf-codeowners/bluetooth
/components/esp_http_client/ @esp-idf-codeowners/app-utilities
/components/esp_http_server/ @esp-idf-codeowners/app-utilities
/components/esp_https_ota/ @esp-idf-codeowners/app-utilities
/components/esp_https_server/ @esp-idf-codeowners/app-utilities
/components/esp_hw_support/ @esp-idf-codeowners/system @esp-idf-codeowners/peripherals
/components/esp_lcd/ @esp-idf-codeowners/peripherals
/components/esp_local_ctrl/ @esp-idf-codeowners/app-utilities
/components/esp_mm/ @esp-idf-codeowners/peripherals
/components/esp_netif/ @esp-idf-codeowners/network
/components/esp_netif_stack/ @esp-idf-codeowners/network
/components/esp_partition/ @esp-idf-codeowners/storage
/components/esp_phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/components/esp_pm/ @esp-idf-codeowners/power-management @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/system
/components/esp_psram/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/esp_ringbuf/ @esp-idf-codeowners/system
/components/esp_rom/ @esp-idf-codeowners/system @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi
/components/esp_system/ @esp-idf-codeowners/system
/components/esp_timer/ @esp-idf-codeowners/system
/components/esp-tls/ @esp-idf-codeowners/app-utilities
/components/esp_wifi/ @esp-idf-codeowners/wifi
/components/espcoredump/ @esp-idf-codeowners/tools
/components/esptool_py/ @esp-idf-codeowners/tools
/components/fatfs/ @esp-idf-codeowners/storage
/components/fatfs/**/*.py @esp-idf-codeowners/tools
/components/freertos/ @esp-idf-codeowners/system
/components/hal/ @esp-idf-codeowners/peripherals
/components/heap/ @esp-idf-codeowners/system
/components/http_parser/ @esp-idf-codeowners/app-utilities
/components/idf_test/ @esp-idf-codeowners/ci
/components/ieee802154/ @esp-idf-codeowners/ieee802154
/components/json/ @esp-idf-codeowners/app-utilities
/components/linux/ @esp-idf-codeowners/system
/components/log/ @esp-idf-codeowners/system
/components/lwip/ @esp-idf-codeowners/lwip
/components/mbedtls/ @esp-idf-codeowners/app-utilities/mbedtls @esp-idf-codeowners/security
/components/mqtt/ @esp-idf-codeowners/network
/components/newlib/ @esp-idf-codeowners/system @esp-idf-codeowners/tools
/components/nvs_flash/ @esp-idf-codeowners/storage
/components/openthread/ @esp-idf-codeowners/ieee802154
/components/partition_table/ @esp-idf-codeowners/system
/components/perfmon/ @esp-idf-codeowners/tools
/components/protobuf-c/ @esp-idf-codeowners/app-utilities
/components/protocomm/ @esp-idf-codeowners/app-utilities/provisioning
/components/pthread/ @esp-idf-codeowners/system
/components/riscv/ @esp-idf-codeowners/system
/components/sdmmc/ @esp-idf-codeowners/storage
/components/soc/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/spi_flash/ @esp-idf-codeowners/peripherals
/components/spiffs/ @esp-idf-codeowners/storage
/components/tcp_transport/ @esp-idf-codeowners/network
/components/touch_element/ @esp-idf-codeowners/peripherals
/components/ulp/ @esp-idf-codeowners/system
/components/unity/ @esp-idf-codeowners/ci
/components/usb/ @esp-idf-codeowners/peripherals/usb
/components/vfs/ @esp-idf-codeowners/storage
/components/wear_levelling/ @esp-idf-codeowners/storage
/components/wifi_provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/components/wpa_supplicant/ @esp-idf-codeowners/wifi @esp-idf-codeowners/app-utilities/mbedtls
/components/xtensa/ @esp-idf-codeowners/system
/docs/ @esp-idf-codeowners/docs
/docs/**/api-reference/bluetooth/ @esp-idf-codeowners/bluetooth
/docs/**/api-reference/network/ @esp-idf-codeowners/network
/docs/**/api-reference/peripherals/ @esp-idf-codeowners/peripherals
/docs/**/api-reference/peripherals/usb* @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
/docs/**/api-reference/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/docs/**/api-reference/provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/docs/**/api-reference/storage/ @esp-idf-codeowners/storage
/docs/**/api-reference/system/ @esp-idf-codeowners/system
/docs/**/security/ @esp-idf-codeowners/security
/docs/**/migration-guides/ @esp-idf-codeowners/docs @esp-idf-codeowners/all-maintainers
/examples/README.md @esp-idf-codeowners/docs @esp-idf-codeowners/ci
/examples/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/examples/bluetooth/ @esp-idf-codeowners/bluetooth
/examples/build_system/ @esp-idf-codeowners/build-config
/examples/common_components/ @esp-idf-codeowners/system
/examples/custom_bootloader/ @esp-idf-codeowners/system
/examples/cxx/ @esp-idf-codeowners/system
/examples/ethernet/ @esp-idf-codeowners/network
/examples/get-started/ @esp-idf-codeowners/system
/examples/mesh/ @esp-idf-codeowners/wifi
/examples/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi
/examples/openthread/ @esp-idf-codeowners/ieee802154
/examples/peripherals/ @esp-idf-codeowners/peripherals
/examples/peripherals/usb/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
/examples/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/examples/provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/examples/security/ @esp-idf-codeowners/security
/examples/storage/ @esp-idf-codeowners/storage
/examples/system/ @esp-idf-codeowners/system
/examples/system/ota/ @esp-idf-codeowners/app-utilities
/examples/wifi/ @esp-idf-codeowners/wifi
/examples/zigbee/ @esp-idf-codeowners/ieee802154
/tools/ @esp-idf-codeowners/tools
/tools/ble/ @esp-idf-codeowners/app-utilities
/tools/catch/ @esp-idf-codeowners/ci
/tools/ci/ @esp-idf-codeowners/ci
/tools/cmake/ @esp-idf-codeowners/build-config
/tools/esp_prov/ @esp-idf-codeowners/app-utilities
/tools/kconfig*/ @esp-idf-codeowners/build-config
/tools/ldgen/ @esp-idf-codeowners/build-config
/tools/mass_mfg/ @esp-idf-codeowners/app-utilities
/tools/mocks/ @esp-idf-codeowners/system
/tools/test_apps/README.md @esp-idf-codeowners/docs @esp-idf-codeowners/ci
## Note: owners here should be the same as the owners for the same example subdir, above
/tools/test_apps/build_system/ @esp-idf-codeowners/build-config
/tools/test_apps/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/tools/test_apps/security/ @esp-idf-codeowners/security
/tools/test_apps/system/ @esp-idf-codeowners/system
/tools/test_apps/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/tools/test_build_system/ @esp-idf-codeowners/tools @esp-idf-codeowners/build-config
/tools/unit-test-app/ @esp-idf-codeowners/system @esp-idf-codeowners/tools
# sort-order-reset
/components/**/test_apps/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
# ignore lists
/tools/ci/check_copyright_config.yaml @esp-idf-codeowners/all-maintainers
/tools/ci/check_copyright_ignore.txt @esp-idf-codeowners/all-maintainers
/tools/ci/mypy_ignore_list.txt @esp-idf-codeowners/tools
* @esp-idf-codeowners/all-maintainers

View File

@ -21,11 +21,6 @@
- [Shell Script Related](#shell-script-related)
- [Manifest File to Control the Build/Test apps](#manifest-file-to-control-the-buildtest-apps)
- [Grammar](#grammar)
- [Operands](#operands)
- [Operators](#operators)
- [Limitation:](#limitation)
- [How does it work?](#how-does-it-work)
- [Example](#example)
## General Workflow
@ -56,7 +51,7 @@
- `example_test[_esp32/esp32s2/...]`
- `fuzzer_test`
- `host_test`
- `integration_test[_wifi/ble]`
- `integration_test`
- `iperf_stress_test`
- `macos`
- `macos_test`
@ -144,10 +139,11 @@ check if there's a suitable `.if-<if-anchor-you-need>` anchor
1. if there is, create a rule following [`rules` Template Naming Rules](#rules-template-naming-rules).For detail information, please refer to [GitLab Documentation `rules-if`](https://docs.gitlab.com/ee/ci/yaml/README.html#rulesif). Here's an example.
```yaml
.rules:dev:
.rules:patterns:python-files:
rules:
- <<: *if-trigger
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-python-files
```
2. if there isn't

View File

@ -5,6 +5,7 @@
- assign_test
variables:
SUBMODULES_TO_FETCH: "none"
CI_TARGET_TEST_CONFIG_FILE: "$CI_PROJECT_DIR/.gitlab/ci/target-test.yml"
artifacts:
paths:
- ${TEST_DIR}/test_configs/
@ -66,34 +67,3 @@ assign_unit_test:
variables:
TEST_TYPE: unit_test
TEST_DIR: components/idf_test/unit_test
assign_integration_test:
extends:
- .assign_test_template
- .rules:test:integration_test
- .before_script_minimal
image: ${CI_INTEGRATION_TEST_ENV_IMAGE}
needs:
- build_ssc_esp32
- build_ssc_esp32c3
- build_ssc_esp32c2
artifacts:
paths:
- $TEST_DIR/test_configs
expire_in: 1 week
variables:
TEST_DIR: ${CI_PROJECT_DIR}/tools/ci/integration_test
BUILD_DIR: ${CI_PROJECT_DIR}/SSC/ssc_bin
INTEGRATION_TEST_CASE_PATH: "${CI_PROJECT_DIR}/auto_test_script/TestCaseFiles"
ASSIGN_TEST_CASE_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/bin/CIAssignTestCases.py"
PYTHONPATH: ${CI_PROJECT_DIR}/auto_test_script/packages
GIT_LFS_SKIP_SMUDGE: 1
script:
- add_gitlab_ssh_keys
# clone test script to assign tests
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} auto_test_script
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script
- cd auto_test_script
- ./tools/ci/setup_idfci.sh
# assign integration test cases
- python ${ASSIGN_TEST_CASE_SCRIPT} -t ${INTEGRATION_TEST_CASE_PATH} -c $CI_TARGET_TEST_CONFIG_FILE -b ${BUILD_DIR} -o $TEST_DIR/test_configs

View File

@ -215,14 +215,6 @@ build_pytest_examples_esp32c2:
IDF_TARGET: esp32c2
TEST_DIR: examples
build_pytest_examples_esp32h4:
extends:
- .build_pytest_no_jtag_template
- .rules:build:example_test-esp32h4
variables:
IDF_TARGET: esp32h4
TEST_DIR: examples
build_pytest_examples_jtag: # for all targets
extends:
- .build_pytest_jtag_template
@ -244,6 +236,7 @@ build_pytest_examples_esp32h2:
extends:
- .build_pytest_template
- .rules:build:example_test-esp32h2
parallel: 2
variables:
IDF_TARGET: esp32h2
TEST_DIR: examples
@ -410,7 +403,7 @@ build_only_tools_test_apps:
extends:
- .build_cmake_template
- .rules:build:custom_test
parallel: 9
parallel: 8
script:
# CI specific options start from "--collect-size-info xxx". could ignore when running locally
- run_cmd python tools/ci/ci_build_apps.py tools/test_apps -v
@ -458,66 +451,6 @@ fast_template_app:
variables:
BUILD_COMMAND_ARGS: "-p"
#------------------------------------------------------------------------------
.build_ssc_template:
extends:
- .build_template
- .rules:build:integration_test
needs:
- job: fast_template_app
artifacts: false
artifacts:
paths:
- SSC/ssc_bin
expire_in: 1 week
script:
- retry_failed git clone $SSC_REPOSITORY
- python $CHECKOUT_REF_SCRIPT SSC SSC
- cd SSC
- MAKEFLAGS= ./ci_build_ssc.sh $TARGET_NAME
build_ssc_esp32:
extends: .build_ssc_template
parallel: 3
variables:
TARGET_NAME: "ESP32"
build_ssc_esp32s2:
extends: .build_ssc_template
parallel: 2
variables:
TARGET_NAME: "ESP32S2"
build_ssc_esp32c2:
extends: .build_ssc_template
parallel: 2
variables:
TARGET_NAME: "ESP32C2"
build_ssc_esp32c3:
extends: .build_ssc_template
parallel: 3
variables:
TARGET_NAME: "ESP32C3"
build_ssc_esp32s3:
extends: .build_ssc_template
parallel: 3
variables:
TARGET_NAME: "ESP32S3"
build_ssc_esp32c6:
extends: .build_ssc_template
parallel: 3
variables:
TARGET_NAME: "ESP32C6"
build_ssc_esp32h2:
extends: .build_ssc_template
parallel: 2
variables:
TARGET_NAME: "ESP32H2"
.build_esp_idf_tests_cmake_template:
extends:
- .build_cmake_template
@ -644,24 +577,16 @@ build_examples_cmake_esp32c3:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32c3
parallel: 6
parallel: 8
variables:
IDF_TARGET: esp32c3
TEST_DIR: examples
build_examples_cmake_esp32h4:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32h4
variables:
IDF_TARGET: esp32h4
TEST_DIR: examples
build_examples_cmake_esp32c6:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32c6
parallel: 6
parallel: 10
variables:
IDF_TARGET: esp32c6
TEST_DIR: examples
@ -670,7 +595,7 @@ build_examples_cmake_esp32h2:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32h2
parallel: 2
parallel: 6
variables:
IDF_TARGET: esp32h2
TEST_DIR: examples
@ -729,13 +654,6 @@ build_clang_test_apps_esp32c6:
variables:
IDF_TARGET: esp32c6
build_clang_test_apps_esp32h4:
extends:
- .build_clang_test_apps_riscv
- .rules:build:custom_test-esp32h4
variables:
IDF_TARGET: esp32h4
.test_build_system_template:
stage: host_test
extends:

View File

@ -3,7 +3,6 @@
- esp32s2
- esp32s3
- esp32c3
- esp32h4
- esp32c2
- esp32c6
- esp32h2
@ -76,16 +75,6 @@
- "build:{0}"
- build:target_test
build:integration_test:
labels:
- build
patterns:
- build_components
- build_system
included_in:
- build:target_test
####################
# Target Test Jobs #
####################
@ -133,13 +122,15 @@ build:integration_test:
- *target_test
- *all_targets
- - bt # example_test_005
- wifi # example_test_002, example_test*wifi*
- ethernet # example_test*ethernet*
- sdio # component_ut_pytest_esp32_sdio
- wifi # pytest*wifi*
- ethernet # pytest*ethernet*
- sdio # pytest*sdio*
- usb # USB Device & Host tests
- adc # component_ut_pytest_esp32x_adc
- adc # pytest*adc*
- i154
- flash_multi
- ecdsa
- ccs811 # pytest*ccs811*
patterns:
- "{0}-{1}-{2}"
- "{0}-{2}"
@ -181,21 +172,18 @@ build:integration_test:
- "build:example_test"
- build:target_test
"test:integration_test_{0}":
matrix:
- - wifi
- ble
labels:
- integration_test_{0}
- integration_test
- target_test
# For openthread sleepy
"test:example_test-otsleepy":
patterns:
- integration_test-{0}
- target_test-{0}
# - maybe others
- "example_test-otsleepy"
- "target_test-i154"
labels:
- target_test
- example_test
included_in:
- test:integration_test
- build:integration_test
- "build:example_test-esp32c6"
- "build:example_test-esp32h2"
- "build:example_test"
- build:target_test
"test:host_test":
@ -213,37 +201,6 @@ build:integration_test:
#################################
# Triggered Only By Labels Jobs #
#################################
"labels:iperf_stress_test": # example_test
labels:
- iperf_stress_test
included_in:
- build:example_test
- build:example_test-esp32
- build:target_test
"labels:weekend_test": # custom test
labels:
- weekend_test
included_in:
- build:custom_test
- build:custom_test-esp32
- build:target_test
"labels:nvs_coverage": # host_test
labels:
- nvs_coverage
"labels:fuzzer_test-weekend_test": # host test
labels:
- fuzzer_test
- weekend_test
"labels-protected:lan8720": # UT # FIXME: IDFCI-1176 temporary run this on master/release or with label
labels:
- lan8720
included_in:
- build:unit_test
- build:unit_test-esp32
- build:target_test
- build:component_ut
- build:component_ut-esp32

View File

@ -32,50 +32,25 @@ push_to_github:
extends:
- .deploy_job_template
- .before_script_minimal
- .rules:protected-no_label
dependencies: []
- .rules:push_to_github
needs:
- check_submodule_sync
script:
- add_github_ssh_keys
- git remote remove github &>/dev/null || true
- git remote add github git@github.com:espressif/esp-idf.git
- tools/ci/push_to_github.sh
deploy_test_result:
deploy_update_SHA_in_esp-dockerfiles:
extends:
- .deploy_job_template
- .before_script_minimal
- .rules:ref:master-always
image: $CI_DOCKER_REGISTRY/bot-env:1
- .rules:protected-no_label-always
dependencies: []
tags:
- deploy_test
artifacts:
when: always
paths:
- ${CI_PROJECT_DIR}/test-management/*.log
expire_in: 1 week
variables:
BOT_ACCOUNT_CONFIG_FILE: "${CI_PROJECT_DIR}/test-management/Config/Account.local.yml"
TEST_RESULTS_PATH: "${CI_PROJECT_DIR}/TEST_RESULTS"
GIT_DEPTH: 2
tags: [ shiny, build ]
script:
- add_gitlab_ssh_keys
- export GIT_SHA=$(echo ${CI_COMMIT_SHA} | cut -c 1-8)
- export REV_COUNT=$(git rev-list --count ${GIT_SHA} --)
- export SUMMARY="IDF CI test result for $GIT_SHA (r${REV_COUNT})"
# Download test result
- export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
- python3 ${IDF_PATH}/tools/ci/get_all_test_results.py --path ${TEST_RESULTS_PATH} --include_retried
- if [[ -z $(find ${TEST_RESULTS_PATH} -name "*.xml") ]]; then exit 0; fi
# Clone test-management repo
- retry_failed git clone $TEST_MANAGEMENT_REPO
- python3 $CHECKOUT_REF_SCRIPT test-management test-management
- cd test-management
- echo $BOT_JIRA_ACCOUNT > ${BOT_ACCOUNT_CONFIG_FILE}
# Make sure all requirements are installed
- pip3 install -r requirements.txt
# Update test cases
- python3 ImportTestCase.py $JIRA_TEST_MANAGEMENT_PROJECT from_xml -d ${TEST_RESULTS_PATH} -r $GIT_SHA -l IDFCI
# update test results
- python3 ImportTestResult.py -r "$GIT_SHA (r${REV_COUNT})" -j $JIRA_TEST_MANAGEMENT_PROJECT -s "$SUMMARY" -l IDFCI -p ${TEST_RESULTS_PATH} --pipeline_url ${CI_PIPELINE_URL}
# May need a long time to upload all test results.
timeout: 4 hours
- 'curl --header "PRIVATE-TOKEN: ${ESPCI_SCRIPTS_TOKEN}" -o create_MR_in_esp_dockerfile.sh $GITLAB_HTTP_SERVER/api/v4/projects/1260/repository/files/create_MR_in_esp_dockerfile%2Fcreate_MR_in_esp_dockerfile.sh/raw\?ref\=master'
- chmod +x create_MR_in_esp_dockerfile.sh
- ./create_MR_in_esp_dockerfile.sh

View File

@ -3,6 +3,7 @@
- "docs/**/*"
- "**/*.rst"
- "CONTRIBUTING.rst"
- "**/soc_caps.h"
.patterns-docs-partial: &patterns-docs-partial
- "components/**/*.h"
@ -24,6 +25,9 @@
.if-protected-no_label: &if-protected-no_label
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null'
.if-qa-test-tag: &if-qa-test-tag
if: '$CI_COMMIT_TAG =~ /^qa-test/'
.if-label-build_docs: &if-label-build_docs
if: '$BOT_LABEL_BUILD_DOCS || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build_docs(?:,[^,\n\r]+)*$/i'
@ -31,10 +35,12 @@
if: '$BOT_LABEL_DOCS_FULL || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*docs_full(?:,[^,\n\r]+)*$/i'
.if-dev-push: &if-dev-push
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
.doc-rules:build:docs-full:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected
- <<: *if-label-build_docs
- <<: *if-label-docs_full
@ -43,6 +49,11 @@
.doc-rules:build:docs-partial:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-dev-push
changes: *patterns-docs-full
when: never
- <<: *if-dev-push
changes: *patterns-docs-partial

View File

@ -135,10 +135,10 @@ test_idf_tools:
entrypoint: [""] # use system python3. no extra pip package installed
script:
# Tools must be downloaded for testing
- python3 ${IDF_PATH}/tools/idf_tools.py download
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa
- cd ${IDF_PATH}/tools/test_idf_tools
- python3 -m pip install jsonschema
- python3 ./test_idf_tools.py
- python3 ./test_idf_tools.py -v
- python3 ./test_idf_tools_python_env.py
.test_efuse_table_on_host_template:
@ -185,30 +185,6 @@ test_efuse_table_on_host_esp32c6:
variables:
IDF_TARGET: esp32c6
test_efuse_table_on_host_esp32h4:
extends: .test_efuse_table_on_host_template
variables:
IDF_TARGET: esp32h4
test_espcoredump:
extends: .host_test_template
artifacts:
when: always
paths:
- components/espcoredump/test/**/.coverage
- components/espcoredump/test/**/output
expire_in: 1 week
variables:
IDF_COREDUMP_ELF_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/idf/idf-coredump-elf.git"
IDF_COREDUMP_ELF_TAG: idf-20220928
# install CMake version specified in tools.json
SETUP_TOOLS_LIST: "all"
script:
- eval $($IDF_PATH/tools/idf_tools.py export)
- retry_failed git clone ${IDF_COREDUMP_ELF_REPO} -b $IDF_COREDUMP_ELF_TAG
- cd ${IDF_PATH}/components/espcoredump/test/
- ./test_espcoredump.sh ${CI_PROJECT_DIR}/idf-coredump-elf
test_logtrace_proc:
extends: .host_test_template
artifacts:
@ -340,13 +316,13 @@ test_pytest_qemu:
--target esp32
--pytest-apps
-m qemu
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
- python tools/ci/get_known_failure_cases_file.py
- pytest
--target esp32
-m qemu
--embedded-services idf,qemu
--junitxml=XUNIT_RESULT.xml
--known-failure-cases-file known_failure_cases/known_failure_cases.txt
--known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
test_pytest_linux:
extends:
@ -365,6 +341,6 @@ test_pytest_linux:
--target linux
--pytest-apps
-m host_test
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
- python tools/ci/get_known_failure_cases_file.py
- run_cmd pytest --target linux -m host_test --junitxml=XUNIT_RESULT.xml
--known-failure-cases-file known_failure_cases/known_failure_cases.txt
--known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}

View File

@ -0,0 +1,69 @@
# generate dynamic integration pipeline by `idf-integration-ci` project
.patterns-integration_test: &patterns-integration_test
# add all possible patterns to make sure `gen_integration_pipeline` can be triggered.
# fine-grained control will be done while generating the pipeline
# find `patterns` in `idf-integration-ci` project
- "components/**/*"
- "tools/**/*"
- ".gitlab-ci.yml"
- ".gitlab/ci/common.yml"
- ".gitlab/ci/integration_test.yml"
- ".gitmodules"
- "CMakeLists.txt"
- "install.sh"
- "export.sh"
- "Kconfig"
- "sdkconfig.rename"
# Simplify the rules
.integration_test_rules:
rules:
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: *patterns-integration_test
# support trigger by ci labels
- if: '$CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*target_test(?:,[^,\n\r]+)*$/i'
- if: '$CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test(?:,[^,\n\r]+)*$/i'
- if: '$CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build(?:,[^,\n\r]+)*$/i'
gen_integration_pipeline:
extends:
- .before_script_minimal
- .integration_test_rules
image: ${CI_INTEGRATION_ASSIGN_ENV}
stage: assign_test
cache: []
tags:
- assign_test
variables:
SUBMODULES_TO_FETCH: "none"
GIT_LFS_SKIP_SMUDGE: 1
needs:
- job: fast_template_app
artifacts: false
optional: true
artifacts:
paths:
- idf-integration-ci/child_pipeline/
expire_in: 2 weeks
script:
- add_gitlab_ssh_keys
- retry_failed git clone ${CI_GEN_INTEGRATION_PIPELINE_REPO} idf-integration-ci
- python $CHECKOUT_REF_SCRIPT idf-integration-ci idf-integration-ci
- cd idf-integration-ci
- python tools/generate_child_pipeline.py -o child_pipeline/
child_integration_test_pipeline:
extends:
- .integration_test_rules
stage: assign_test
needs:
- gen_integration_pipeline
trigger:
include:
- artifact: idf-integration-ci/child_pipeline/pipeline.yml
job: gen_integration_pipeline
forward:
yaml_variables: false
strategy: depend

View File

@ -17,13 +17,15 @@ check_pre_commit_master_release:
- .rules:protected
script:
- git diff-tree --no-commit-id --name-only -r $PIPELINE_COMMIT_SHA | xargs pre-commit run --files
- pre-commit run --hook-stage post-commit validate-sbom-manifest
check_pre_commit_MR:
extends:
- .check_pre_commit_template
- .rules:dev
- .rules:mr
script:
- python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | xargs pre-commit run --files
- pre-commit run --hook-stage post-commit validate-sbom-manifest
check_MR_style_dangerjs:
extends:

View File

@ -55,8 +55,6 @@
- "tools/test_build_system/**/*"
.patterns-custom_test: &patterns-custom_test
- "components/espcoredump/**/*"
- "tools/ci/python_packages/gitlab_api.py"
- "tools/ci/python_packages/tiny_test_fw/**/*"
- "tools/ci/python_packages/ttfw_idf/**/*"
@ -95,6 +93,13 @@
- "examples/common_components/iperf/**/*"
- "examples/openthread/**/*"
.patterns-example_test-otsleepy: &patterns-example_test-otsleepy
- "components/esp_hw_support/**/*"
- "components/esp_netif/**/*"
- "components/lwip/**/*"
- "components/openthread/**/*"
- "examples/openthread/**/*"
.patterns-target_test-wifi: &patterns-target_test-wifi
- "components/esp_netif/**/*"
- "components/lwip/**/*"
@ -103,20 +108,6 @@
- "components/wpa_supplicant/**/*"
- "components/esp_coex/**/*"
.patterns-integration_test-ble: &patterns-integration_test-ble
- "tools/ci/python_packages/gitlab_api.py"
- "tools/ci/integration_test/**/*"
- "components/bt/controller/lib_esp32"
- "components/bt/controller/lib_esp32c3_family"
- "components/bt/controller/lib_esp32h2/esp32h2-bt-lib"
- "components/bt/host/nimble/nimble"
- "components/esp_phy/lib"
- "components/esp_coex/**/*"
.patterns-integration_test-wifi: &patterns-integration_test-wifi
- "tools/ci/python_packages/gitlab_api.py"
- "tools/ci/integration_test/**/*"
.patterns-host_test: &patterns-host_test
- ".gitlab/ci/host-test.yml"
@ -168,6 +159,8 @@
- "tools/split_paths_by_spaces.py"
- "tools/check_python_dependencies.py"
.patterns-windows: &patterns-windows
- "tools/windows/**/*"
@ -185,7 +178,6 @@
- "components/esp_phy/lib"
- "components/esp_wifi/lib"
- "components/esp_coex/lib"
- "components/ieee802154/lib"
- "components/json/cJSON"
- "components/lwip/lwip"
- "components/mbedtls/mbedtls"
@ -246,6 +238,7 @@
- "components/driver/include/driver/sdio*.h"
- "components/driver/include/driver/sdmmc*.h"
- "components/sdmmc/**/*"
- "examples/peripherals/sdio/**/*"
# for jobs: component_ut_pytest_sdio related
.patterns-component_ut-sdio: &patterns-component_ut-sdio
@ -259,6 +252,13 @@
- "components/driver/include/driver/sdmmc*.h"
- "components/sdmmc/**/*"
.patterns-example_test-ccs811: &patterns-example_test-ccs811
# components
- "examples/system/console/advanced/components/**/*"
- "components/driver/i2c/**/*"
# tests
- "examples/peripherals/i2c/i2c_tools/**/*"
# for jobs: UT_xx_SDSPI related
.patterns-unit_test-sdio: &patterns-unit_test-sdio
- "components/hal/sdio*.c"
@ -306,6 +306,11 @@
- "components/efuse/**/*"
- "examples/peripherals/adc/**/*"
.patterns-target_test-ecdsa: &patterns-target_test-ecdsa
- "components/hal/**/*"
- "components/efuse/**/*"
- "components/mbedtls/port/ecdsa/*"
##############
# if anchors #
##############
@ -316,13 +321,19 @@
if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/'
.if-protected: &if-protected
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)'
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) || $CI_COMMIT_TAG =~ /^qa-test/'
.if-protected-no_label: &if-protected-no_label
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null'
.if-qa-test-tag: &if-qa-test-tag
if: '$CI_COMMIT_TAG =~ /^qa-test/'
.if-dev-push: &if-dev-push
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
.if-merge_request: &if-merge_request
if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
.if-schedule: &if-schedule
if: '$CI_PIPELINE_SOURCE == "schedule"'
@ -355,10 +366,24 @@
rules:
- <<: *if-protected
.rules:protected-no_label:
.rules:push_to_github:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-no_label
.rules:protected-no_label-always:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-no_label
when: always
.rules:mr:
rules:
- <<: *if-merge_request
### Patterns ###
.rules:patterns:python-cache:
rules:
- *if-schedule
@ -447,9 +472,6 @@
.if-label-component_ut_esp32h2: &if-label-component_ut_esp32h2
if: '$BOT_LABEL_COMPONENT_UT_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-component_ut_esp32h4: &if-label-component_ut_esp32h4
if: '$BOT_LABEL_COMPONENT_UT_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-component_ut_esp32s2: &if-label-component_ut_esp32s2
if: '$BOT_LABEL_COMPONENT_UT_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32s2(?:,[^,\n\r]+)*$/i'
@ -474,9 +496,6 @@
.if-label-custom_test_esp32h2: &if-label-custom_test_esp32h2
if: '$BOT_LABEL_CUSTOM_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-custom_test_esp32h4: &if-label-custom_test_esp32h4
if: '$BOT_LABEL_CUSTOM_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-custom_test_esp32s2: &if-label-custom_test_esp32s2
if: '$BOT_LABEL_CUSTOM_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32s2(?:,[^,\n\r]+)*$/i'
@ -504,36 +523,15 @@
.if-label-example_test_esp32h2: &if-label-example_test_esp32h2
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32h4: &if-label-example_test_esp32h4
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32s2: &if-label-example_test_esp32s2
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32s2(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32s3: &if-label-example_test_esp32s3
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32s3(?:,[^,\n\r]+)*$/i'
.if-label-fuzzer_test: &if-label-fuzzer_test
if: '$BOT_LABEL_FUZZER_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*fuzzer_test(?:,[^,\n\r]+)*$/i'
.if-label-host_test: &if-label-host_test
if: '$BOT_LABEL_HOST_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*host_test(?:,[^,\n\r]+)*$/i'
.if-label-integration_test: &if-label-integration_test
if: '$BOT_LABEL_INTEGRATION_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test(?:,[^,\n\r]+)*$/i'
.if-label-integration_test_ble: &if-label-integration_test_ble
if: '$BOT_LABEL_INTEGRATION_TEST_BLE || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test_ble(?:,[^,\n\r]+)*$/i'
.if-label-integration_test_wifi: &if-label-integration_test_wifi
if: '$BOT_LABEL_INTEGRATION_TEST_WIFI || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test_wifi(?:,[^,\n\r]+)*$/i'
.if-label-iperf_stress_test: &if-label-iperf_stress_test
if: '$BOT_LABEL_IPERF_STRESS_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*iperf_stress_test(?:,[^,\n\r]+)*$/i'
.if-label-lan8720: &if-label-lan8720
if: '$BOT_LABEL_LAN8720 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*lan8720(?:,[^,\n\r]+)*$/i'
.if-label-macos: &if-label-macos
if: '$BOT_LABEL_MACOS || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*macos(?:,[^,\n\r]+)*$/i'
@ -567,18 +565,12 @@
.if-label-unit_test_esp32h2: &if-label-unit_test_esp32h2
if: '$BOT_LABEL_UNIT_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32h4: &if-label-unit_test_esp32h4
if: '$BOT_LABEL_UNIT_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32s2: &if-label-unit_test_esp32s2
if: '$BOT_LABEL_UNIT_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32s2(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32s3: &if-label-unit_test_esp32s3
if: '$BOT_LABEL_UNIT_TEST_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32s3(?:,[^,\n\r]+)*$/i'
.if-label-weekend_test: &if-label-weekend_test
if: '$BOT_LABEL_WEEKEND_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*weekend_test(?:,[^,\n\r]+)*$/i'
.if-label-windows: &if-label-windows
if: '$BOT_LABEL_WINDOWS || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*windows(?:,[^,\n\r]+)*$/i'
@ -607,10 +599,8 @@
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32h4
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-lan8720
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
@ -618,7 +608,6 @@
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
@ -637,6 +626,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -650,7 +641,6 @@
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-lan8720
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
@ -670,6 +660,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -702,6 +694,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -734,6 +728,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -766,6 +762,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -798,6 +796,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -830,6 +830,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -862,6 +864,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -879,11 +883,9 @@
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-target_test
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
@ -894,6 +896,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -908,7 +912,6 @@
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-target_test
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
@ -919,6 +922,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -943,6 +948,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -967,6 +974,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -991,6 +1000,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1016,29 +1027,7 @@
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:build:custom_test-esp32h4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-custom_test
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1063,6 +1052,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1087,6 +1078,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1121,10 +1114,8 @@
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32h4
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-iperf_stress_test
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
@ -1138,10 +1129,14 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
changes: *patterns-example_test-i154
- <<: *if-dev-push
changes: *patterns-example_test-otsleepy
- <<: *if-dev-push
changes: *patterns-example_test-sdio
- <<: *if-dev-push
@ -1150,6 +1145,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1164,7 +1161,6 @@
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-iperf_stress_test
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
@ -1178,6 +1174,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1190,6 +1188,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1216,6 +1216,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1228,6 +1230,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1255,6 +1259,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1267,6 +1273,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1293,10 +1301,14 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
changes: *patterns-example_test-i154
- <<: *if-dev-push
changes: *patterns-example_test-otsleepy
- <<: *if-dev-push
changes: *patterns-example_test-sdio
- <<: *if-dev-push
@ -1305,6 +1317,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1331,10 +1345,14 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
changes: *patterns-example_test-i154
- <<: *if-dev-push
changes: *patterns-example_test-otsleepy
- <<: *if-dev-push
changes: *patterns-example_test-sdio
- <<: *if-dev-push
@ -1344,43 +1362,7 @@
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:build:example_test-esp32h4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32h4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
changes: *patterns-example_test-i154
- <<: *if-dev-push
changes: *patterns-example_test-sdio
- <<: *if-dev-push
changes: *patterns-example_test-usb
- <<: *if-dev-push
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1407,6 +1389,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1419,6 +1403,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1445,6 +1431,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1457,32 +1445,13 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:build:integration_test:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-integration_test_wifi
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-integration_test-ble
- <<: *if-dev-push
changes: *patterns-integration_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:build:macos:
rules:
- <<: *if-revert-branch
@ -1509,7 +1478,6 @@
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32h4
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-custom_test
@ -1518,7 +1486,6 @@
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-example_test
@ -1527,14 +1494,8 @@
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32h4
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-integration_test_wifi
- <<: *if-label-iperf_stress_test
- <<: *if-label-lan8720
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
@ -1542,10 +1503,8 @@
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -1568,22 +1527,24 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
changes: *patterns-example_test-i154
- <<: *if-dev-push
changes: *patterns-example_test-otsleepy
- <<: *if-dev-push
changes: *patterns-example_test-sdio
- <<: *if-dev-push
changes: *patterns-example_test-usb
- <<: *if-dev-push
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-integration_test-ble
- <<: *if-dev-push
changes: *patterns-integration_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1601,7 +1562,6 @@
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-lan8720
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
@ -1609,7 +1569,6 @@
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
@ -1620,6 +1579,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1637,7 +1598,6 @@
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-lan8720
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
@ -1649,6 +1609,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1677,6 +1639,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1705,6 +1669,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1733,6 +1699,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1761,6 +1729,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1789,6 +1759,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1817,6 +1789,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1828,13 +1802,6 @@
- <<: *if-dev-push
changes: *patterns-unit_test-sdio
.rules:labels-protected:lan8720:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-lan8720
.rules:labels:nvs_coverage:
rules:
- <<: *if-revert-branch
@ -2085,6 +2052,19 @@
- <<: *if-dev-push
changes: *patterns-target_test-adc
.rules:test:component_ut-esp32h2-ecdsa:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
.rules:test:component_ut-esp32s2:
rules:
- <<: *if-revert-branch
@ -2338,6 +2318,19 @@
- <<: *if-dev-push
changes: *patterns-example_test-bt
.rules:test:example_test-esp32-ccs811:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
.rules:test:example_test-esp32-ethernet:
rules:
- <<: *if-revert-branch
@ -2663,6 +2656,20 @@
- <<: *if-dev-push
changes: *patterns-target_test-i154
.rules:test:example_test-otsleepy:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-example_test-otsleepy
- <<: *if-dev-push
changes: *patterns-target_test-i154
.rules:test:host_test:
rules:
- <<: *if-revert-branch
@ -2674,52 +2681,6 @@
- <<: *if-dev-push
changes: *patterns-host_test
.rules:test:integration_test:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-integration_test_wifi
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-integration_test-ble
- <<: *if-dev-push
changes: *patterns-integration_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:test:integration_test_ble:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-integration_test-ble
.rules:test:integration_test_wifi:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-integration_test
- <<: *if-label-integration_test_wifi
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-integration_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:test:submodule:
rules:
- <<: *if-revert-branch

View File

@ -24,7 +24,7 @@
junit: XUNIT_RESULT.xml
expire_in: 1 week
script:
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
- python tools/ci/get_known_failure_cases_file.py
# get runner env config file
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
@ -35,7 +35,7 @@
- run_cmd pytest $TEST_DIR
-m \"${markers}\"
--junitxml=XUNIT_RESULT.xml
--known-failure-cases-file known_failure_cases/known_failure_cases.txt
--known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
${PYTEST_EXTRA_FLAGS}
@ -97,6 +97,22 @@ pytest_examples_esp32_jtag:
SETUP_TOOLS: "1" # need gdb openocd
PYTEST_EXTRA_FLAGS: "--log-cli-level DEBUG"
pytest_examples_esp32_ccs811:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32-ccs811
needs:
- build_pytest_examples_esp32
tags: [ esp32, ccs811 ]
pytest_examples_esp32_sdio:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32-sdio
needs:
- build_pytest_examples_esp32
tags: [ esp32, sdio_master_slave ]
pytest_examples_esp32s2_generic:
extends:
- .pytest_examples_dir_template
@ -249,6 +265,14 @@ pytest_examples_esp32_ethernet:
- build_pytest_examples_esp32
tags: [ esp32, ethernet]
pytest_examples_esp32_ethernet_httpbin:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32-ethernet
needs:
- build_pytest_examples_esp32
tags: [ esp32, httpbin]
pytest_examples_esp32_8mb_flash:
extends:
- .pytest_examples_dir_template
@ -334,7 +358,7 @@ pytest_examples_esp32_ethernet_ip101:
- .rules:test:example_test-esp32
needs:
- build_pytest_examples_esp32
tags: [ esp32, ip101 ]
tags: [ esp32, eth_ip101 ]
pytest_examples_esp32_flash_encryption:
extends:
@ -488,6 +512,14 @@ pytest_examples_esp32h2_adc:
- build_pytest_examples_esp32h2
tags: [ esp32h2, adc ]
example_test_pytest_esp32s3_emmc:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32s3
needs:
- build_pytest_examples_esp32s3
tags: [ esp32s3, emmc ]
.pytest_components_dir_template:
extends: .pytest_template
variables:
@ -540,15 +572,63 @@ pytest_components_esp32_ip101:
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, ip101 ]
tags: [ esp32, eth_ip101 ]
pytest_components_esp32_lan8720:
extends:
- .pytest_components_dir_template
- .rules:labels-protected:lan8720 # FIXME: IDFCI-1176
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, lan8720 ]
tags: [ esp32, eth_lan8720 ]
pytest_components_esp32_rtl8201:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, eth_rtl8201 ]
pytest_components_esp32_w5500:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, eth_w5500 ]
pytest_components_esp32_ksz8851snl:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, eth_ksz8851snl ]
pytest_components_esp32_dm9051:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, eth_dm9051 ]
pytest_components_esp32_ksz8041:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, eth_ksz8041 ]
pytest_components_esp32_dp83848:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32
needs:
- build_pytest_components_esp32
tags: [ esp32, eth_dp83848 ]
pytest_components_esp32_ethernet:
extends:
@ -884,6 +964,14 @@ pytest_components_esp32h2_adc:
- build_pytest_components_esp32h2
tags: [ esp32h2, adc ]
component_ut_pytest_esp32h2_ecdsa:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32h2-ecdsa
needs:
- build_pytest_components_esp32h2
tags: [ esp32h2, ecdsa_efuse ]
pytest_components_esp32c6_generic_multi_device:
extends:
- .pytest_components_dir_template
@ -920,6 +1008,17 @@ pytest_examples_openthread_br:
- esp32c6
- openthread_br
pytest_examples_openthread_sleep:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-otsleepy
needs:
- build_pytest_examples_esp32c6
- build_pytest_examples_esp32h2
tags:
- esp32c6
- openthread_sleep
pytest_components_esp32s3_usb_host:
extends:
- .pytest_components_dir_template
@ -1061,10 +1160,10 @@ pytest_test_apps_esp32s3_mspi_f4r4:
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
# git clone the known failure cases repo, run test
- retry_failed git clone $KNOWN_FAILURE_CASES_REPO known_failure_cases
- python tools/ci/get_known_failure_cases_file.py
# run test
- cd tools/ci/python_packages/tiny_test_fw/bin
- run_cmd python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/known_failure_cases/known_failure_cases.txt
- run_cmd python Runner.py $TEST_CASE_PATH -c $CONFIG_FILE -e $ENV_FILE --known_failure_cases_file $CI_PROJECT_DIR/${KNOWN_FAILURE_CASES_FILE_NAME}
.example_test_template:
extends: .target_test_job_template
@ -1090,12 +1189,6 @@ example_test_001C:
- ESP32
- Example_GENERIC
.example_test_003:
extends: .example_test_esp32_template
tags:
- ESP32
- Example_SDIO
example_test_005:
extends:
- .example_test_esp32_template
@ -1104,12 +1197,6 @@ example_test_005:
- ESP32
- Example_WIFI_BT
example_test_007:
extends: .example_test_esp32_template
tags:
- ESP32
- Example_I2C_CCS811_SENSOR
example_test_C3_GENERIC:
extends: .example_test_esp32c3_template
tags:
@ -1203,19 +1290,12 @@ UT_006:
- UT_T1_SPIMODE
- psram
UT_017:
.UT_017:
extends: .unit_test_esp32_template
tags:
- ESP32_IDF
- EMMC
UT_022:
extends: .unit_test_esp32_template
tags:
- ESP32_IDF
- UT_T2_I2C
- psram
UT_028:
extends: .unit_test_esp32_template
tags:
@ -1288,12 +1368,6 @@ UT_C3_FLASH:
- ESP32C3_IDF
- UT_T1_ESP_FLASH
UT_C3_I2C:
extends: .unit_test_esp32c3_template
tags:
- ESP32C3_IDF
- UT_T2_I2C
UT_C3_SDSPI:
extends:
- .unit_test_esp32c3_template
@ -1337,301 +1411,3 @@ UT_S3_QUAD_PSRAM:
- ESP32S3_IDF
- UT_T1_1
- quad_psram
.integration_test_template:
extends:
- .target_test_job_template
- .rules:test:integration_test
- .before_script_minimal
image: ${CI_INTEGRATION_TEST_ENV_IMAGE}
cache: []
needs: # the assign already needs all the build jobs
- assign_integration_test
variables:
LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32_IDF"
LOG_PATH: "${CI_PROJECT_DIR}/TEST_LOGS"
TEST_CASE_FILE_PATH: "$CI_PROJECT_DIR/auto_test_script/TestCaseFiles"
CONFIG_FILE_PATH: "${CI_PROJECT_DIR}/tools/ci/integration_test/test_configs"
KNOWN_ISSUE_FILE: "${CI_PROJECT_DIR}/tools/ci/integration_test/KnownIssues"
CI_RUNNER_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/bin/CIRunner.py"
PREPARE_TEST_BIN_SCRIPT: "${CI_PROJECT_DIR}/auto_test_script/tools/ci/idf_prepare_test_bins.py"
PYTHONPATH: "${CI_PROJECT_DIR}/auto_test_script/packages:${CI_PROJECT_DIR}/tools/ci/python_packages:${PYTHONPATH}"
INITIAL_CONDITION_RETRY_COUNT: "1"
GIT_LFS_SKIP_SMUDGE: 1
script:
- *define_config_file_name
# first test if config file exists, if not exist, exit 0
- test -e $CONFIG_FILE || exit 0
# clone local test env configs
- add_gitlab_ssh_keys
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
# clone test bench
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} auto_test_script
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script
- cd auto_test_script
- ./tools/ci/setup_idfci.sh
# Merge known issues
- cat ${KNOWN_ISSUE_FILE} >> ${TEST_CASE_FILE_PATH}/KnownIssues
# run test
- python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
- python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
.integration_test_esp32c3_template:
extends:
- .integration_test_template
variables:
LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32C3_IDF"
.integration_test_esp32c2_template:
extends:
- .integration_test_template
variables:
LOCAL_ENV_CONFIG_PATH: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/ESP32C2_IDF"
nvs_compatible_test:
extends:
- .integration_test_template
- .rules:test:integration_test
artifacts:
when: always
paths:
- $LOG_PATH
- nvs_wifi.bin
expire_in: 1 mos
tags:
- ESP32_IDF
- NVS_Compatible
script:
- *define_config_file_name
# first test if config file exists, if not exist, exit 0
- test -e $CONFIG_FILE || exit 0
# clone local test env configs
- add_gitlab_ssh_keys
- retry_failed git clone $TEST_ENV_CONFIG_REPO
- python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs
# clone test bench
- retry_failed git clone ${CI_AUTO_TEST_SCRIPT_REPO_URL} auto_test_script
- python $CHECKOUT_REF_SCRIPT auto_test_script auto_test_script
- cd auto_test_script
- ./tools/ci/setup_idfci.sh
# prepare nvs bins
- ./tools/prepare_nvs_bin.sh
# run test
- python ${PREPARE_TEST_BIN_SCRIPT} $CONFIG_FILE
- python ${CI_RUNNER_SCRIPT} -l "$LOG_PATH/$JOB_FULL_NAME" -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH
IT_T1_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 2
tags:
- ESP32_IDF
- SSC_T1_Simple
IT_T1_WAP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_WAP
IT_T2_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 9
tags:
- ESP32_IDF
- SSC_T2_Simple
IT_T5_BT_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_ble
parallel: 3
tags:
- ESP32_IDF
- SSC_T5_BT_Simple
IT_T2_BT_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_ble
parallel: 6
tags:
- ESP32_IDF
- SSC_T2_BT_Simple
IT_T1_BT_Dongle:
extends:
- .integration_test_template
- .rules:test:integration_test_ble
parallel: 2
tags:
- ESP32_IDF
- SSC_T1_BT_Dongle
IT_T1_AP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_AP
IT_T1_AP_E:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 5
tags:
- ESP32_IDF
- SSC_T1_AP_E
IT_T1_WNIC_AP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_WNIC_AP
IT_T1_WNIC_AP_E:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_WNIC_AP_E
IT_T1_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_MESH1
IT_T2_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
parallel: 2
tags:
- ESP32_IDF
- SSC_T2_MESH1
IT_T3_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T3_MESH1
IT_T6_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T6_MESH1
IT_T12_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T12_MESH1
IT_T50_MESH1:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
allow_failure: true
tags:
- ESP32_IDF
- SSC_T50_MESH1
IT_T1_MESH2:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T1_MESH2
IT_T2_WNIC:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T2_WNIC
IT_T2_AP:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T2_AP
IT_T3_Simple:
extends:
- .integration_test_template
- .rules:test:integration_test_wifi
tags:
- ESP32_IDF
- SSC_T3_Simple
IT_C3_T2_BT_Simple:
extends:
- .integration_test_esp32c3_template
- .rules:test:integration_test_ble
parallel: 11
tags:
- ESP32C3_IDF
- SSC_T2_BT_Simple
IT_C3_T5_BT_Simple:
extends:
- .integration_test_esp32c3_template
- .rules:test:integration_test_ble
parallel: 5
tags:
- ESP32C3_IDF
- SSC_T5_BT_Simple
IT_C3_T1_BT_Dongle:
extends:
- .integration_test_esp32c3_template
- .rules:test:integration_test_ble
image: gitlab.espressif.cn:5050/qa/dockerfiles/integration-test-env-dbg:1
parallel: 2
tags:
- ESP32C3_IDF
- SSC_T1_BT_Dongle
IT_C2_T2_BT_Simple:
extends:
- .integration_test_esp32c2_template
- .rules:test:integration_test_ble
parallel: 9
tags:
- ESP32C2_IDF
- SSC_T2_BT_Simple
IT_C2_T1_BT_Dongle:
extends:
- .integration_test_esp32c2_template
- .rules:test:integration_test_ble
image: gitlab.espressif.cn:5050/qa/dockerfiles/integration-test-env-dbg:1
parallel: 2
tags:
- ESP32C2_IDF
- SSC_T1_BT_Dongle

57
.gitmodules vendored
View File

@ -2,6 +2,26 @@
# All the relative URL paths are intended to be GitHub ones
# For Espressif's public projects please use '../../espressif/proj', not a '../proj'
#
# Submodules SBOM information
# ---------------------------
# Submodules, which are used directly and not forked into espressif namespace should
# contain SBOM information here. Other submodules should have the SBOM manifest file
# included in the root of their project's repository.
#
# The sbom-hash entry records the submodule's checkout SHA as presented in git-tree
# commit object. For example spiffs submodule
#
# $ git ls-tree HEAD components/spiffs/spiffs
# 160000 commit 0dbb3f71c5f6fae3747a9d935372773762baf852 components/spiffs/spiffs
#
# The hash can be also obtained with git submodule command
#
# $ git submodule status components/spiffs/spiffs
# 0dbb3f71c5f6fae3747a9d935372773762baf852 components/spiffs/spiffs (0.2-255-g0dbb3f71c5f6)
#
# The submodule SHA recorded here has to match with SHA, which is presented in git-tree.
# This is checked by CI. Also please don't forget to update the submodule version
# if you are changing the sbom-hash. This is important for SBOM generation.
[submodule "components/bt/controller/lib_esp32"]
path = components/bt/controller/lib_esp32
@ -10,14 +30,31 @@
[submodule "components/bootloader/subproject/components/micro-ecc/micro-ecc"]
path = components/bootloader/subproject/components/micro-ecc/micro-ecc
url = ../../kmackay/micro-ecc.git
sbom-version = 1.1
sbom-cpe = cpe:2.3:a:micro-ecc_project:micro-ecc:{}:*:*:*:*:*:*:*
sbom-supplier = Person: Ken MacKay
sbom-url = https://github.com/kmackay/micro-ecc
sbom-description = A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors
sbom-hash = 24c60e243580c7868f4334a1ba3123481fe1aa48
[submodule "components/spiffs/spiffs"]
path = components/spiffs/spiffs
url = ../../pellepl/spiffs.git
sbom-version = 0.2-255-g0dbb3f71c5f6
sbom-supplier = Person: Peter Andersson
sbom-url = https://github.com/pellepl/spiffs
sbom-description = Wear-leveled SPI flash file system for embedded devices
sbom-hash = 0dbb3f71c5f6fae3747a9d935372773762baf852
[submodule "components/json/cJSON"]
path = components/json/cJSON
url = ../../DaveGamble/cJSON.git
sbom-version = 1.7.17
sbom-cpe = cpe:2.3:a:cjson_project:cjson:{}:*:*:*:*:*:*:*
sbom-supplier = Person: Dave Gamble
sbom-url = https://github.com/DaveGamble/cJSON
sbom-description = Ultralightweight JSON parser in ANSI C
sbom-hash = 87d8f0961a01bf09bef98ff89bae9fdec42181ee
[submodule "components/mbedtls/mbedtls"]
path = components/mbedtls/mbedtls
@ -34,10 +71,21 @@
[submodule "components/protobuf-c/protobuf-c"]
path = components/protobuf-c/protobuf-c
url = ../../protobuf-c/protobuf-c.git
sbom-version = 1.4.1
sbom-cpe = cpe:2.3:a:protobuf-c_project:protobuf-c:{}:*:*:*:*:*:*:*
sbom-supplier = Organization: protobuf-c community <https://groups.google.com/g/protobuf-c>
sbom-url = https://github.com/protobuf-c/protobuf-c
sbom-description = Protocol Buffers implementation in C
sbom-hash = abc67a11c6db271bedbb9f58be85d6f4e2ea8389
[submodule "components/unity/unity"]
path = components/unity/unity
url = ../../ThrowTheSwitch/Unity.git
sbom-version = v2.4.3-51-g7d2bf62b7e6a
sbom-supplier = Organization: ThrowTheSwitch community <http://www.throwtheswitch.org>
sbom-url = https://github.com/ThrowTheSwitch/Unity
sbom-description = Simple Unit Testing for C
sbom-hash = 7d2bf62b7e6afaf38153041a9d53c21aeeca9a25
[submodule "components/bt/host/nimble/nimble"]
path = components/bt/host/nimble/nimble
@ -50,6 +98,11 @@
[submodule "components/cmock/CMock"]
path = components/cmock/CMock
url = ../../ThrowTheSwitch/CMock.git
sbom-version = v2.5.2-2-geeecc49ce8af
sbom-supplier = Organization: ThrowTheSwitch community <http://www.throwtheswitch.org>
sbom-url = https://github.com/ThrowTheSwitch/CMock
sbom-description = CMock - Mock/stub generator for C
sbom-hash = eeecc49ce8af123cf8ad40efdb9673e37b56230f
[submodule "components/openthread/openthread"]
path = components/openthread/openthread
@ -67,10 +120,6 @@
path = components/openthread/lib
url = ../../espressif/esp-thread-lib.git
[submodule "components/ieee802154/lib"]
path = components/ieee802154/lib
url = ../../espressif/esp-ieee802154-lib.git
[submodule "components/bt/controller/lib_esp32h2/esp32h2-bt-lib"]
path = components/bt/controller/lib_esp32h2/esp32h2-bt-lib
url = ../../espressif/esp32h2-bt-lib.git

View File

@ -1,9 +1,11 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.5.0
hooks:
- id: trailing-whitespace
# note: whitespace exclusions use multiline regex, see https://pre-commit.com/#regular-expressions
@ -33,11 +35,12 @@ repos:
hooks:
- id: flake8
args: ['--config=.flake8', '--tee', '--benchmark']
- repo: https://github.com/pycqa/isort
rev: 5.11.5 # python 3.7 compatible
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: isort
name: isort (python)
- id: reorder-python-imports
name: Reorder Python imports
args: [--py37-plus]
exclude: >
(?x)^(
.*_pb2.py
@ -139,10 +142,11 @@ repos:
name: Check if all apps readme files match given .build-test-rules.yml files. Modify the supported target tables
entry: tools/ci/check_build_test_rules.py check-readmes
language: python
files: 'tools/test_apps/.+|examples/.+|components/.+'
files: 'tools/test_apps/.+|examples/.+|components/.+|tools/idf_py_actions/constants.py|tools/ci/check_build_test_rules.py'
require_serial: true
additional_dependencies:
- PyYAML == 5.3.1
- idf_build_apps
- idf_build_apps~=1.0
- id: sort-build-test-rules-ymls
name: sort .build-test-rules.yml files
entry: tools/ci/check_build_test_rules.py sort-yaml
@ -157,7 +161,12 @@ repos:
- id: file-contents-sorter
files: 'tools\/ci\/(executable-list\.txt|mypy_ignore_list\.txt|check_copyright_ignore\.txt)'
- repo: https://github.com/espressif/check-copyright/
rev: v1.0.1
rev: v1.0.3
hooks:
- id: check-copyright
args: ['--ignore', 'tools/ci/check_copyright_ignore.txt', '--config', 'tools/ci/check_copyright_config.yaml']
- repo: https://github.com/espressif/esp-idf-sbom.git
rev: v0.13.0
hooks:
- id: validate-sbom-manifest
stages: [post-commit]

24
Kconfig
View File

@ -66,28 +66,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
config IDF_TARGET_ESP32H4
bool
default "y" if IDF_TARGET="esp32h4"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
choice IDF_TARGET_ESP32H4_BETA_VERSION
prompt "ESP32-H4 beta version"
depends on IDF_TARGET_ESP32H4
default IDF_TARGET_ESP32H4_BETA_VERSION_2
help
Currently ESP32-H4 has several beta versions for internal use only.
Select the one that matches your chip model.
config IDF_TARGET_ESP32H4_BETA_VERSION_1
bool
prompt "ESP32-H4 beta1"
config IDF_TARGET_ESP32H4_BETA_VERSION_2
bool
prompt "ESP32-H4 beta2"
endchoice
config IDF_TARGET_ESP32C2
bool
default "y" if IDF_TARGET="esp32c2"
@ -116,10 +94,8 @@ mainmenu "Espressif IoT Development Framework Configuration"
default 0x0002 if IDF_TARGET_ESP32S2
default 0x0005 if IDF_TARGET_ESP32C3
default 0x0009 if IDF_TARGET_ESP32S3
default 0x000A if IDF_TARGET_ESP32H4_BETA_VERSION_1
default 0x000C if IDF_TARGET_ESP32C2
default 0x000D if IDF_TARGET_ESP32C6
default 0x000E if IDF_TARGET_ESP32H4_BETA_VERSION_2 # ESP32-TODO: IDF-3475
default 0x0010 if IDF_TARGET_ESP32H2
default 0xFFFF

View File

@ -389,4 +389,11 @@ menu "Application Level Tracing"
help
Enables support for GCOV data transfer to host.
config APPTRACE_GCOV_DUMP_TASK_STACK_SIZE
int "Gcov dump task stack size"
depends on APPTRACE_GCOV_ENABLE
default 2048
help
Configures stack size of Gcov dump task
endmenu

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -76,7 +76,8 @@ gcov_exit:
void gcov_create_task(void *arg)
{
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
xTaskCreatePinnedToCore(&gcov_dump_task, "gcov_dump_task", 2048, (void *)&s_gcov_task_running, configMAX_PRIORITIES - 1, NULL, 0);
xTaskCreatePinnedToCore(&gcov_dump_task, "gcov_dump_task", CONFIG_APPTRACE_GCOV_DUMP_TASK_STACK_SIZE,
(void *)&s_gcov_task_running, configMAX_PRIORITIES - 1, NULL, 0);
}
void gcov_create_task_tick_hook(void)
@ -105,12 +106,16 @@ static int esp_dbg_stub_gcov_entry(void)
void gcov_rtio_init(void)
{
uint32_t capabilities = 0;
uint32_t stub_entry = 0;
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
esp_dbg_stub_entry_set(ESP_DBG_STUB_ENTRY_GCOV, (uint32_t)&esp_dbg_stub_gcov_entry);
if (esp_dbg_stub_entry_get(ESP_DBG_STUB_ENTRY_CAPABILITIES, &capabilities) == ESP_OK) {
esp_dbg_stub_entry_set(ESP_DBG_STUB_ENTRY_CAPABILITIES, capabilities | ESP_DBG_STUB_CAP_GCOV_TASK);
assert(esp_dbg_stub_entry_get(ESP_DBG_STUB_ENTRY_GCOV, &stub_entry) == ESP_OK);
if (stub_entry != 0) {
/* "__gcov_init()" can be called several times. We must avoid multiple tick hook registration */
return;
}
esp_dbg_stub_entry_set(ESP_DBG_STUB_ENTRY_GCOV, (uint32_t)&esp_dbg_stub_gcov_entry);
assert(esp_dbg_stub_entry_get(ESP_DBG_STUB_ENTRY_CAPABILITIES, &stub_entry) == ESP_OK);
esp_dbg_stub_entry_set(ESP_DBG_STUB_ENTRY_CAPABILITIES, stub_entry | ESP_DBG_STUB_CAP_GCOV_TASK);
esp_register_freertos_tick_hook(gcov_create_task_tick_hook);
}

View File

@ -8,7 +8,7 @@
#define HEAP_TRACE_SRCFILE /* don't warn on inclusion here */
#include "esp_heap_trace.h"
#undef HEAP_TRACE_SRCFILE
#include "esp_heap_caps.h"
#if CONFIG_APPTRACE_SV_ENABLE
#include "esp_app_trace.h"
#include "esp_sysview_trace.h"
@ -85,7 +85,7 @@ void heap_trace_dump_caps(__attribute__((unused)) const uint32_t caps)
}
/* Add a new allocation to the heap trace records */
static IRAM_ATTR void record_allocation(const heap_trace_record_t *record)
static HEAP_IRAM_ATTR void record_allocation(const heap_trace_record_t *record)
{
if (!s_tracing) {
return;
@ -100,7 +100,7 @@ static IRAM_ATTR void record_allocation(const heap_trace_record_t *record)
For HEAP_TRACE_ALL, this means filling in the freed_by pointer.
For HEAP_TRACE_LEAKS, this means removing the record from the log.
*/
static IRAM_ATTR void record_free(void *p, void **callers)
static HEAP_IRAM_ATTR void record_free(void *p, void **callers)
{
if (!s_tracing) {
return;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -228,8 +228,11 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return 0;
}
return resp/size; // return the number of items written
/* OpenOCD writes it like that:
* fwrite(buf, size, 1, file);
* So, if 1 was returned that means fwrite succeed
*/
return resp == 1 ? nmemb : 0;
}
static void esp_apptrace_fread_args_prepare(uint8_t *buf, void *priv)
@ -275,6 +278,10 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
ESP_EARLY_LOGE(TAG, "Failed to read file data (%d)!", ret);
return 0;
}
/* OpenOCD reads it like that:
* fread(buf, 1 ,size, file);
* So, total read bytes count returns
*/
return resp/size; // return the number of items read
}

View File

@ -167,8 +167,8 @@ unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pBuffer, u
(event_id == SYSVIEW_EVTID_TASK_STOP_EXEC) ||
(event_id == SYSVIEW_EVTID_TASK_START_READY) ||
(event_id == SYSVIEW_EVTID_TASK_STOP_READY) ||
(event_id == SYSVIEW_EVTID_USER_START) ||
(event_id == SYSVIEW_EVTID_USER_STOP) ||
(event_id == SYSVIEW_EVTID_MARK_START) ||
(event_id == SYSVIEW_EVTID_MARK_STOP) ||
(event_id == SYSVIEW_EVTID_TIMER_ENTER) ||
(event_id == SYSVIEW_EVTID_TIMER_EXIT) ||
(event_id == SYSVIEW_EVTID_STACK_INFO) ||

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -37,8 +37,6 @@
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C6
@ -197,13 +195,18 @@ esp_err_t esp_ota_write(esp_ota_handle_t handle, const void *data, size_t size)
return ESP_ERR_INVALID_ARG;
}
if (size == 0) {
ESP_LOGD(TAG, "write data size is 0");
return ESP_OK;
}
// find ota handle in linked list
for (it = LIST_FIRST(&s_ota_ops_entries_head); it != NULL; it = LIST_NEXT(it, entries)) {
if (it->handle == handle) {
if (it->need_erase) {
// must erase the partition before writing to it
uint32_t first_sector = it->wrote_size / SPI_FLASH_SEC_SIZE;
uint32_t last_sector = (it->wrote_size + size) / SPI_FLASH_SEC_SIZE;
uint32_t first_sector = it->wrote_size / SPI_FLASH_SEC_SIZE; // first affected sector
uint32_t last_sector = (it->wrote_size + size - 1) / SPI_FLASH_SEC_SIZE; // last affected sector
ret = ESP_OK;
if ((it->wrote_size % SPI_FLASH_SEC_SIZE) == 0) {
@ -898,9 +901,27 @@ esp_err_t esp_ota_erase_last_boot_app_partition(void)
return ESP_OK;
}
#if SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS > 1 && CONFIG_SECURE_BOOT_V2_ENABLED
esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_index_t index) {
#if SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
// Validates the image at "app_pos" with the secure boot digests other than "revoked_key_index"
static bool validate_img(esp_ota_secure_boot_public_key_index_t revoked_key_index, esp_partition_pos_t *app_pos)
{
bool verified = false;
for (int i = 0; i < SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS; i++) {
if (i == revoked_key_index) {
continue;
}
if (esp_secure_boot_verify_with_efuse_digest_index(i, app_pos) == ESP_OK) {
verified = true;
ESP_LOGI(TAG, "Application successfully verified with public key digest %d", i);
break;
}
}
return verified;
}
esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_index_t index)
{
if (!esp_secure_boot_enabled()) {
ESP_LOGE(TAG, "Secure boot v2 has not been enabled.");
return ESP_FAIL;
@ -913,14 +934,21 @@ esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_i
return ESP_ERR_INVALID_ARG;
}
esp_image_sig_public_key_digests_t app_digests = { 0 };
esp_err_t err = esp_secure_boot_get_signature_blocks_for_running_app(true, &app_digests);
if (err != ESP_OK || app_digests.num_digests == 0) {
ESP_LOGE(TAG, "This app is not signed, but check signature on update is enabled in config. It won't be possible to verify any update.");
const esp_partition_t *running_app_part = esp_ota_get_running_partition();
esp_err_t ret = ESP_FAIL;
#ifdef CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
esp_ota_img_states_t running_app_state;
ret = esp_ota_get_state_partition(running_app_part, &running_app_state);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "esp_ota_get_state_partition returned: %s", esp_err_to_name(ret));
return ESP_FAIL;
}
if (running_app_state != ESP_OTA_IMG_VALID) {
ESP_LOGE(TAG, "The current running application is not marked as a valid image. Aborting..");
return ESP_FAIL;
}
#endif
esp_err_t ret;
esp_secure_boot_key_digests_t trusted_keys;
ret = esp_secure_boot_read_key_digests(&trusted_keys);
if (ret != ESP_OK) {
@ -929,55 +957,38 @@ esp_err_t esp_ota_revoke_secure_boot_public_key(esp_ota_secure_boot_public_key_i
}
if (trusted_keys.key_digests[index] == NULL) {
ESP_LOGI(TAG, "Trusted Key block(%d) already revoked.", index);
ESP_LOGI(TAG, "Given public key digest(%d) is already revoked.", index);
return ESP_OK;
}
esp_image_sig_public_key_digests_t trusted_digests = { 0 };
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
if (i == index) {
continue; // omitting - to find if there is a valid key after revoking this digest
}
/* Check if the application can be verified with a key other than the one being revoked */
esp_partition_pos_t running_app_pos = {
.offset = running_app_part->address,
.size = running_app_part->size,
};
if (trusted_keys.key_digests[i] != NULL) {
bool all_zeroes = true;
for (unsigned j = 0; j < ESP_SECURE_BOOT_DIGEST_LEN; j++) {
all_zeroes = all_zeroes && (*(uint8_t *)(trusted_keys.key_digests[i] + j) == 0);
}
if (!all_zeroes) {
memcpy(trusted_digests.key_digests[trusted_digests.num_digests++], (uint8_t *)trusted_keys.key_digests[i], ESP_SECURE_BOOT_DIGEST_LEN);
} else {
ESP_LOGD(TAG, "Empty trusted key block (%d).", i);
}
}
}
bool match = false;
for (unsigned i = 0; i < trusted_digests.num_digests; i++) {
if (match == true) {
break;
}
for (unsigned j = 0; j < app_digests.num_digests; j++) {
if (memcmp(trusted_digests.key_digests[i], app_digests.key_digests[j], ESP_SECURE_BOOT_DIGEST_LEN) == 0) {
ESP_LOGI(TAG, "App key block(%d) matches Trusted key block(%d)[%d -> Next active trusted key block].", j, i, i);
esp_err_t err = esp_efuse_set_digest_revoke(index);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to revoke digest (0x%x).", err);
return ESP_FAIL;
}
ESP_LOGI(TAG, "Revoked signature block %d.", index);
match = true;
break;
}
}
}
if (match == false) {
ESP_LOGE(TAG, "Running app doesn't have another valid secure boot key. Cannot revoke current key(%d).", index);
if (!validate_img(index, &running_app_pos)) {
ESP_LOGE(TAG, "Application cannot be verified with any key other than the one being revoked");
return ESP_FAIL;
}
/* Check if bootloder can be verified with any key other than the one being revoked */
esp_partition_pos_t bootloader_pos = {
.offset = ESP_BOOTLOADER_OFFSET,
.size = (ESP_PARTITION_TABLE_OFFSET - ESP_BOOTLOADER_OFFSET),
};
if (!validate_img(index, &bootloader_pos)) {
ESP_LOGE(TAG, "Bootloader cannot be verified with any key other than the one being revoked");
return ESP_FAIL;
}
esp_err_t err = esp_efuse_set_digest_revoke(index);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to revoke digest (0x%x).", err);
return ESP_FAIL;
}
ESP_LOGI(TAG, "Revoked signature block %d.", index);
return ESP_OK;
}
#endif

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -110,7 +110,7 @@ esp_err_t esp_ota_begin(const esp_partition_t* partition, size_t image_size, esp
* @param size Size of data buffer in bytes.
*
* @return
* - ESP_OK: Data was written to flash successfully.
* - ESP_OK: Data was written to flash successfully, or size = 0
* - ESP_ERR_INVALID_ARG: handle is invalid.
* - ESP_ERR_OTA_VALIDATE_FAILED: First byte of image contains invalid app image magic byte.
* - ESP_ERR_FLASH_OP_TIMEOUT or ESP_ERR_FLASH_OP_FAIL: Flash write failed.
@ -332,10 +332,10 @@ typedef enum {
} esp_ota_secure_boot_public_key_index_t;
/**
* @brief Revokes the old signature digest. To be called in the application after the rollback logic.
* @brief Revokes the signature digest denoted by the given index. This should be called in the application only after the rollback logic otherwise the device may end up in unrecoverable state.
*
* Relevant for Secure boot v2 on ESP32-S2, ESP32-S3, ESP32-C3, ESP32-H4 where upto 3 key digests can be stored (Key \#N-1, Key \#N, Key \#N+1).
* When key \#N-1 used to sign an app is invalidated, an OTA update is to be sent with an app signed with key \#N-1 & Key \#N.
* Relevant for Secure boot v2 on ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2 where up to 3 key digests can be stored (Key \#N-1, Key \#N, Key \#N+1).
* When a key used to sign an app is invalidated, an OTA update is to be sent with an app signed with at least one of the other two keys which has not been revoked already.
* After successfully booting the OTA app should call this function to revoke Key \#N-1.
*
* @param index - The index of the signature block to be revoked

View File

@ -62,34 +62,66 @@ menu "Bootloader config"
default 4 if BOOTLOADER_LOG_LEVEL_DEBUG
default 5 if BOOTLOADER_LOG_LEVEL_VERBOSE
config BOOTLOADER_SPI_CUSTOM_WP_PIN
bool "Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)"
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
default y if BOOTLOADER_SPI_WP_PIN != 7 # backwards compatibility, can remove in IDF 5
default n
help
This setting is only used if the SPI flash pins have been overridden by setting the eFuses
SPI_PAD_CONFIG_xxx, and the SPI flash mode is QIO or QOUT.
menu "Serial Flash Configurations"
config BOOTLOADER_SPI_CUSTOM_WP_PIN
bool "Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)"
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
default y if BOOTLOADER_SPI_WP_PIN != 7 # backwards compatibility, can remove in IDF 5
default n
help
This setting is only used if the SPI flash pins have been overridden by setting the eFuses
SPI_PAD_CONFIG_xxx, and the SPI flash mode is QIO or QOUT.
When this is the case, the eFuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka
ESP32 pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in eFuse. The same pin is also used
for external SPIRAM if it is enabled.
When this is the case, the eFuse config only defines 3 of the 4 Quad I/O data pins. The WP pin (aka
ESP32 pin "SD_DATA_3" or SPI flash pin "IO2") is not specified in eFuse. The same pin is also used
for external SPIRAM if it is enabled.
If this config item is set to N (default), the correct WP pin will be automatically used for any
Espressif chip or module with integrated flash. If a custom setting is needed, set this config item to
Y and specify the GPIO number connected to the WP.
If this config item is set to N (default), the correct WP pin will be automatically used for any
Espressif chip or module with integrated flash. If a custom setting is needed, set this config item to
Y and specify the GPIO number connected to the WP.
config BOOTLOADER_SPI_WP_PIN
int "Custom SPI Flash WP Pin"
range 0 33
default 7
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
#depends on BOOTLOADER_SPI_CUSTOM_WP_PIN # backwards compatibility, can uncomment in IDF 5
help
The option "Use custom SPI Flash WP Pin" must be set or this value is ignored
config BOOTLOADER_SPI_WP_PIN
int "Custom SPI Flash WP Pin"
range 0 33
default 7
depends on IDF_TARGET_ESP32 && (ESPTOOLPY_FLASHMODE_QIO || ESPTOOLPY_FLASHMODE_QOUT)
#depends on BOOTLOADER_SPI_CUSTOM_WP_PIN # backwards compatibility, can uncomment in IDF 5
help
The option "Use custom SPI Flash WP Pin" must be set or this value is ignored
If burning a customized set of SPI flash pins in eFuse and using QIO or QOUT mode for flash, set this
value to the GPIO number of the SPI flash WP pin.
If burning a customized set of SPI flash pins in eFuse and using QIO or QOUT mode for flash, set this
value to the GPIO number of the SPI flash WP pin.
config BOOTLOADER_FLASH_DC_AWARE
bool "Allow app adjust Dummy Cycle bits in SPI Flash for higher frequency (READ HELP FIRST)"
help
This will force 2nd bootloader to be loaded by DOUT mode, and will restore Dummy Cycle setting by
resetting the Flash
config BOOTLOADER_FLASH_XMC_SUPPORT
bool "Enable the support for flash chips of XMC (READ DOCS FIRST)"
default y
help
Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow.
XMC chips will be forbidden to be used, when this option is disabled.
DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
comment "Features below require specific hardware (READ DOCS FIRST!)"
config BOOTLOADER_FLASH_32BIT_ADDR
bool
default y if ESPTOOLPY_FLASHSIZE_32MB || ESPTOOLPY_FLASHSIZE_64MB || ESPTOOLPY_FLASHSIZE_128MB
default n
help
This is a helper config for 32bits address flash. Invisible for users.
config BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
bool
default y if ESPTOOLPY_OCT_FLASH && BOOTLOADER_FLASH_32BIT_ADDR
default n
endmenu
choice BOOTLOADER_VDDSDIO_BOOST
bool "VDDSDIO LDO voltage"
@ -405,6 +437,21 @@ menu "Bootloader config"
(The application and bootoloader must be compiled with the same option).
The RTC FAST memory has access only through PRO_CPU.
config BOOTLOADER_CUSTOM_RESERVE_RTC_IN_CRC
bool "Include custom memory in the CRC calculation"
depends on BOOTLOADER_CUSTOM_RESERVE_RTC
default n
help
This option allows the customer to use the legacy bootloader behavior when the
RTC FAST memory CRC calculation takes place. When this option is enabled, the
allocated user custom data will be taken into account in the CRC calculcation.
This means that any change to the custom data would need a CRC update to prevent
the bootloader from marking this data as corrupted.
If this option is disabled, the custom data will not be taken into account when
calculating the RTC FAST memory CRC. The user custom data can be changed freely,
without the need to update the CRC.
THIS OPTION MUST BE THE SAME FOR BOTH THE BOOTLOADER AND THE APPLICATION BUILDS.
config BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE
hex "Size in bytes for custom purposes"
default 0
@ -424,15 +471,6 @@ menu "Bootloader config"
- "Reserve RTC FAST memory for custom purposes"
- "GPIO triggers factory reset"
config BOOTLOADER_FLASH_XMC_SUPPORT
bool "Enable the support for flash chips of XMC (READ HELP FIRST)"
default y
help
Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow.
XMC chips will be forbidden to be used, when this option is disabled.
DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU ARE DOING.
endmenu # Bootloader
@ -704,14 +742,12 @@ menu "Security features"
config SECURE_BOOT_VERIFICATION_KEY
string "Secure boot public signature verification key"
depends on SECURE_SIGNED_APPS && !SECURE_BOOT_BUILD_SIGNED_BINARIES && !SECURE_SIGNED_APPS_RSA_SCHEME
depends on SECURE_SIGNED_APPS && SECURE_SIGNED_APPS_ECDSA_SCHEME && !SECURE_BOOT_BUILD_SIGNED_BINARIES
default "signature_verification_key.bin"
help
Path to a public key file used to verify signed images.
Secure Boot V1: This ECDSA public key is compiled into the bootloader and/or
app, to verify app images.
Secure Boot V2: This RSA public key is compiled into the signature block at
the end of the bootloader/app.
Key file is in raw binary format, and can be extracted from a
PEM formatted private key using the espsecure.py
@ -1009,6 +1045,22 @@ menu "Security features"
DIS_DOWNLOAD_MANUAL_ENCRYPT, DIS_USB_JTAG, DIS_USB_SERIAL_JTAG, STRAP_JTAG_SEL, USB_PHY_SEL.
endmenu # Potentially Insecure
config SECURE_FLASH_ENCRYPT_ONLY_IMAGE_LEN_IN_APP_PART
bool "Encrypt only the app image that is present in the partition of type app"
depends on SECURE_FLASH_ENC_ENABLED && !SECURE_FLASH_REQUIRE_ALREADY_ENABLED
default n
help
If set, optimise encryption time for the partition of type APP,
by only encrypting the app image that is present in the partition,
instead of the whole partition.
The image length used for encryption is derived from the image metadata, which
includes the size of the app image, checksum, hash and also the signature sector
when secure boot is enabled.
If not set (default), the whole partition of type APP would be encrypted,
which increases the encryption time but might be useful if there
is any custom data appended to the firmware image.
config SECURE_FLASH_CHECK_ENC_EN_IN_APP
bool "Check Flash Encryption enabled on app startup"
depends on SECURE_FLASH_ENC_ENABLED

View File

@ -148,5 +148,5 @@ endif()
#
# So for now we just have the top-level build remove the final build products...
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
ADDITIONAL_CLEAN_FILES
${bootloader_binary_files})

View File

@ -23,3 +23,5 @@ CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE CONFIG_SECURE_FLASH_
# Secure Boot Scheme
CONFIG_SECURE_BOOT_ENABLED CONFIG_SECURE_BOOT_V1_ENABLED
CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH

View File

@ -25,7 +25,7 @@ MEMORY
*/
iram_seg (RWX) : org = 0x40080400, len = 0xfc00
/* 64k at the end of DRAM, after ROM bootloader stack */
dram_seg (RW) : org = 0x3FFF0000, len = 0x10000
dram_seg (RW) : org = 0x3FFF0000, len = 0x6000
}
/* Default entry point: */

View File

@ -1,9 +0,0 @@
PROVIDE ( ets_update_cpu_frequency = 0x40008550 ); /* Updates g_ticks_per_us on the current CPU only; not on the other core */
PROVIDE ( MD5Final = 0x4005db1c );
PROVIDE ( MD5Init = 0x4005da7c );
PROVIDE ( MD5Update = 0x4005da9c );
/* bootloader will use following functions from xtensa hal library */
xthal_get_ccount = 0x4000c050;
xthal_get_ccompare = 0x4000c078;
xthal_set_ccompare = 0x4000c058;

View File

@ -1,240 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
*
* ESP32-H4 ROM static data usage is as follows:
* - 0x3fccb900 - 0x3fcdd210: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdd210 - 0x3fcdf210: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcdf210 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fce9704). For alignment purpose we shall use value (0x3fce9700).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x700000;
/* We consider 0x3fce9700 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdd120;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2000;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
*libgcc.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_enable .text.bootloader_random_enable)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.data :
{
_data_start = ABSOLUTE(.);
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} > dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} > dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* 0x3fccb81c ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdd120 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcdf120 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdfa6c ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdfe40 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdfe4c ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/

View File

@ -1,6 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* No definition for ESP32-H4 target */

View File

@ -1,13 +0,0 @@
/*
* ESP32S2 ROM address table
* Generated for ROM with MD5sum: 0a2c7ec5109c17884606d23b47045796
*/
PROVIDE (ets_update_cpu_frequency = 0x4000d8a4);
PROVIDE (MD5Final = 0x4000530c);
PROVIDE (MD5Init = 0x4000526c);
PROVIDE (MD5Update = 0x4000528c);
/* bootloader will use following functions from xtensa hal library */
xthal_get_ccount = 0x4001aa90;
xthal_get_ccompare = 0x4001aabc;
xthal_set_ccompare = 0x4001aa98;

View File

@ -1,6 +0,0 @@
/**
* ESP32S3 ROM address table
* Generated for ROM with MD5sum: d20fb231463ce337432b1fa9cba0b3c9
*/
PROVIDE ( ets_update_cpu_frequency = 0x40043164 );

View File

@ -5,7 +5,3 @@ components/bootloader_support/test_apps/rtc_custom_section:
- if: IDF_TARGET == "esp32c2"
temporary: false
reason: esp32c2 does not have RTC memory
disable_test:
- if: IDF_TARGET == "esp32h2"
temporary: true
reason: target esp32h2 is not supported yet

View File

@ -164,7 +164,7 @@ if(CONFIG_SECURE_SIGNED_APPS AND (CONFIG_SECURE_BOOT_V1_ENABLED OR CONFIG_SECURE
target_add_binary_data(${COMPONENT_LIB} "${secure_boot_verification_key}" "BINARY"
RENAME_TO signature_verification_key_bin)
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
APPEND PROPERTY ADDITIONAL_CLEAN_FILES
"${secure_boot_verification_key}")
endif()

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -54,6 +54,13 @@ esp_err_t bootloader_flash_reset_chip(void);
*/
bool bootloader_flash_is_octal_mode_enabled(void);
/**
* @brief Get the spi flash working mode.
*
* @return The mode of flash working mode, see `esp_rom_spiflash_read_mode_t`
*/
esp_rom_spiflash_read_mode_t bootloader_flash_get_spi_mode(void);
#ifdef __cplusplus
}
#endif

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -109,6 +109,17 @@ extern const bootloader_qio_info_t __attribute__((weak)) bootloader_flash_qe_sup
*/
esp_err_t __attribute__((weak)) bootloader_flash_unlock(void);
#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
/**
* @brief Enable 32bits address flash(larger than 16MB) can map to cache.
*
* @param flash_mode SPI flash working mode.
*
* @note This can be overridden because it's attribute weak.
*/
void __attribute__((weak)) bootloader_flash_32bits_address_map_enable(esp_rom_spiflash_read_mode_t flash_mode);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -52,6 +52,8 @@ extern "C" {
#define CMD_RESUME 0x7A /* Resume command to clear flash suspend bit */
#define CMD_RESETEN 0x66
#define CMD_RESET 0x99
#define CMD_FASTRD_4B 0x0C
#define CMD_SLOWRD_4B 0x13
/* Provide a Flash API for bootloader_support code,

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -120,9 +120,13 @@ esp_err_t bootloader_flash_erase_range(uint32_t start_addr, uint32_t size)
#include "esp32/rom/cache.h"
#endif
#include "esp_rom_spiflash.h"
#include "esp_rom_sys.h"
#include "hal/mmu_hal.h"
#include "hal/mmu_ll.h"
#include "hal/cache_hal.h"
#if CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/opi_flash.h"
#endif
static const char *TAG = "bootloader_flash";
#if CONFIG_IDF_TARGET_ESP32
@ -409,6 +413,33 @@ esp_err_t bootloader_flash_erase_range(uint32_t start_addr, uint32_t size)
return spi_to_esp_err(rc);
}
#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
void bootloader_flash_32bits_address_map_enable(esp_rom_spiflash_read_mode_t flash_mode)
{
esp_rom_opiflash_spi0rd_t cache_rd = {};
switch (flash_mode) {
case ESP_ROM_SPIFLASH_FASTRD_MODE:
cache_rd.addr_bit_len = 32;
cache_rd.dummy_bit_len = 8;
cache_rd.cmd = CMD_FASTRD_4B;
cache_rd.cmd_bit_len = 8;
break;
case ESP_ROM_SPIFLASH_SLOWRD_MODE:
cache_rd.addr_bit_len = 32;
cache_rd.dummy_bit_len = 0;
cache_rd.cmd = CMD_SLOWRD_4B;
cache_rd.cmd_bit_len = 8;
break;
default:
assert(false);
break;
}
cache_hal_disable(CACHE_TYPE_ALL);
esp_rom_opiflash_cache_mode_config(flash_mode, &cache_rd);
cache_hal_enable(CACHE_TYPE_ALL);
}
#endif
#endif // BOOTLOADER_BUILD
@ -755,3 +786,40 @@ bool IRAM_ATTR bootloader_flash_is_octal_mode_enabled(void)
return false;
#endif
}
esp_rom_spiflash_read_mode_t bootloader_flash_get_spi_mode(void)
{
esp_rom_spiflash_read_mode_t spi_mode = ESP_ROM_SPIFLASH_FASTRD_MODE;
#if CONFIG_IDF_TARGET_ESP32
uint32_t spi_ctrl = REG_READ(SPI_CTRL_REG(0));
if (spi_ctrl & SPI_FREAD_QIO) {
spi_mode = ESP_ROM_SPIFLASH_QIO_MODE;
} else if (spi_ctrl & SPI_FREAD_QUAD) {
spi_mode = ESP_ROM_SPIFLASH_QOUT_MODE;
} else if (spi_ctrl & SPI_FREAD_DIO) {
spi_mode = ESP_ROM_SPIFLASH_DIO_MODE;
} else if (spi_ctrl & SPI_FREAD_DUAL) {
spi_mode = ESP_ROM_SPIFLASH_DOUT_MODE;
} else if (spi_ctrl & SPI_FASTRD_MODE) {
spi_mode = ESP_ROM_SPIFLASH_FASTRD_MODE;
} else {
spi_mode = ESP_ROM_SPIFLASH_SLOWRD_MODE;
}
#else
uint32_t spi_ctrl = REG_READ(SPI_MEM_CTRL_REG(0));
if (spi_ctrl & SPI_MEM_FREAD_QIO) {
spi_mode = ESP_ROM_SPIFLASH_QIO_MODE;
} else if (spi_ctrl & SPI_MEM_FREAD_QUAD) {
spi_mode = ESP_ROM_SPIFLASH_QOUT_MODE;
} else if (spi_ctrl & SPI_MEM_FREAD_DIO) {
spi_mode = ESP_ROM_SPIFLASH_DIO_MODE;
} else if (spi_ctrl & SPI_MEM_FREAD_DUAL) {
spi_mode = ESP_ROM_SPIFLASH_DOUT_MODE;
} else if (spi_ctrl & SPI_MEM_FASTRD_MODE) {
spi_mode = ESP_ROM_SPIFLASH_FASTRD_MODE;
} else {
spi_mode = ESP_ROM_SPIFLASH_SLOWRD_MODE;
}
#endif
return spi_mode;
}

View File

@ -200,6 +200,12 @@ esp_err_t bootloader_init_spi_flash(void)
bootloader_enable_qio_mode();
#endif
// Since the workaround in IDF-6709, the spi_speed value in the bootloader header
// is not the real value, overwrite it.
#if CONFIG_ESPTOOLPY_FLASHFREQ_80M
bootloader_image_hdr.spi_speed = ESP_IMAGE_SPI_SPEED_DIV_1;
#endif
print_flash_info(&bootloader_image_hdr);
update_flash_config(&bootloader_image_hdr);
//ensure the flash is write-protected

View File

@ -1,250 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <assert.h>
#include "string.h"
#include "sdkconfig.h"
#include "esp_err.h"
#include "esp_log.h"
#include "esp_rom_gpio.h"
#include "esp_rom_efuse.h"
#include "esp32h4/rom/gpio.h"
#include "esp32h4/rom/spi_flash.h"
#include "esp32h4/rom/efuse.h"
#include "soc/gpio_periph.h"
#include "soc/efuse_reg.h"
#include "soc/spi_reg.h"
#include "soc/spi_mem_reg.h"
#include "soc/soc_caps.h"
#include "flash_qio_mode.h"
#include "bootloader_flash_config.h"
#include "bootloader_common.h"
#include "bootloader_flash_priv.h"
#include "bootloader_init.h"
#include "hal/mmu_hal.h"
#include "hal/cache_hal.h"
#include "hal/mmu_ll.h"
#define FLASH_IO_MATRIX_DUMMY_40M 0
#define FLASH_IO_MATRIX_DUMMY_80M 0
void bootloader_flash_update_id()
{
esp_rom_spiflash_chip_t *chip = &rom_spiflash_legacy_data->chip;
chip->device_id = bootloader_read_flash_id();
}
void IRAM_ATTR bootloader_flash_cs_timing_config()
{
SET_PERI_REG_MASK(SPI_MEM_USER_REG(0), SPI_MEM_CS_HOLD_M | SPI_MEM_CS_SETUP_M);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(0), SPI_MEM_CS_HOLD_TIME_V, 0, SPI_MEM_CS_HOLD_TIME_S);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(0), SPI_MEM_CS_SETUP_TIME_V, 0, SPI_MEM_CS_SETUP_TIME_S);
SET_PERI_REG_MASK(SPI_MEM_USER_REG(1), SPI_MEM_CS_HOLD_M | SPI_MEM_CS_SETUP_M);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(1), SPI_MEM_CS_HOLD_TIME_V, 1, SPI_MEM_CS_HOLD_TIME_S);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(1), SPI_MEM_CS_SETUP_TIME_V, 0, SPI_MEM_CS_SETUP_TIME_S);
}
void IRAM_ATTR bootloader_flash_clock_config(const esp_image_header_t *pfhdr)
{
uint32_t spi_clk_div = 0;
switch (pfhdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_1:
spi_clk_div = 1;
break;
case ESP_IMAGE_SPI_SPEED_DIV_2:
spi_clk_div = 2;
break;
case ESP_IMAGE_SPI_SPEED_DIV_3:
spi_clk_div = 3;
break;
case ESP_IMAGE_SPI_SPEED_DIV_4:
spi_clk_div = 4;
break;
default:
break;
}
esp_rom_spiflash_config_clk(spi_clk_div, 0);
}
void IRAM_ATTR bootloader_flash_set_dummy_out(void)
{
REG_SET_BIT(SPI_MEM_CTRL_REG(0), SPI_MEM_FDUMMY_OUT | SPI_MEM_D_POL | SPI_MEM_Q_POL);
REG_SET_BIT(SPI_MEM_CTRL_REG(1), SPI_MEM_FDUMMY_OUT | SPI_MEM_D_POL | SPI_MEM_Q_POL);
}
void IRAM_ATTR bootloader_flash_dummy_config(const esp_image_header_t *pfhdr)
{
bootloader_configure_spi_pins(1);
bootloader_flash_set_dummy_out();
}
static const char *TAG = "boot.esp32h4";
void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{
const uint32_t spiconfig = esp_rom_efuse_get_flash_gpio_info();
uint8_t wp_pin = esp_rom_efuse_get_flash_wp_gpio();
uint8_t clk_gpio_num = SPI_CLK_GPIO_NUM;
uint8_t q_gpio_num = SPI_Q_GPIO_NUM;
uint8_t d_gpio_num = SPI_D_GPIO_NUM;
uint8_t cs0_gpio_num = SPI_CS0_GPIO_NUM;
uint8_t hd_gpio_num = SPI_HD_GPIO_NUM;
uint8_t wp_gpio_num = SPI_WP_GPIO_NUM;
if (spiconfig == 0) {
} else {
clk_gpio_num = spiconfig & 0x3f;
q_gpio_num = (spiconfig >> 6) & 0x3f;
d_gpio_num = (spiconfig >> 12) & 0x3f;
cs0_gpio_num = (spiconfig >> 18) & 0x3f;
hd_gpio_num = (spiconfig >> 24) & 0x3f;
wp_gpio_num = wp_pin;
}
esp_rom_gpio_pad_set_drv(clk_gpio_num, drv);
esp_rom_gpio_pad_set_drv(q_gpio_num, drv);
esp_rom_gpio_pad_set_drv(d_gpio_num, drv);
esp_rom_gpio_pad_set_drv(cs0_gpio_num, drv);
if (hd_gpio_num <= MAX_PAD_GPIO_NUM) {
esp_rom_gpio_pad_set_drv(hd_gpio_num, drv);
}
if (wp_gpio_num <= MAX_PAD_GPIO_NUM) {
esp_rom_gpio_pad_set_drv(wp_gpio_num, drv);
}
}
static void update_flash_config(const esp_image_header_t *bootloader_hdr)
{
uint32_t size;
switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB:
size = 1;
break;
case ESP_IMAGE_FLASH_SIZE_2MB:
size = 2;
break;
case ESP_IMAGE_FLASH_SIZE_4MB:
size = 4;
break;
case ESP_IMAGE_FLASH_SIZE_8MB:
size = 8;
break;
case ESP_IMAGE_FLASH_SIZE_16MB:
size = 16;
break;
default:
size = 2;
}
cache_hal_disable(CACHE_TYPE_ALL);
// Set flash chip size
esp_rom_spiflash_config_param(rom_spiflash_legacy_data->chip.device_id, size * 0x100000, 0x10000, 0x1000, 0x100, 0xffff); // TODO: set mode
cache_hal_enable(CACHE_TYPE_ALL);
}
static void print_flash_info(const esp_image_header_t *bootloader_hdr)
{
ESP_EARLY_LOGD(TAG, "magic %02x", bootloader_hdr->magic);
ESP_EARLY_LOGD(TAG, "segments %02x", bootloader_hdr->segment_count);
ESP_EARLY_LOGD(TAG, "spi_mode %02x", bootloader_hdr->spi_mode);
ESP_EARLY_LOGD(TAG, "spi_speed %02x", bootloader_hdr->spi_speed);
ESP_EARLY_LOGD(TAG, "spi_size %02x", bootloader_hdr->spi_size);
const char *str;
switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "24MHz";
break;
case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "16MHz";
break;
case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "12MHz";
break;
case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "48MHz";
break;
default:
str = "12MHz";
break;
}
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
/* SPI mode could have been set to QIO during boot already,
so test the SPI registers not the flash header */
uint32_t spi_ctrl = REG_READ(SPI_MEM_CTRL_REG(0));
if (spi_ctrl & SPI_MEM_FREAD_QIO) {
str = "QIO";
} else if (spi_ctrl & SPI_MEM_FREAD_QUAD) {
str = "QOUT";
} else if (spi_ctrl & SPI_MEM_FREAD_DIO) {
str = "DIO";
} else if (spi_ctrl & SPI_MEM_FREAD_DUAL) {
str = "DOUT";
} else if (spi_ctrl & SPI_MEM_FASTRD_MODE) {
str = "FAST READ";
} else {
str = "SLOW READ";
}
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB";
break;
case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB";
break;
case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB";
break;
case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB";
break;
case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB";
break;
default:
str = "2MB";
break;
}
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);
}
static void IRAM_ATTR bootloader_init_flash_configure(void)
{
bootloader_flash_dummy_config(&bootloader_image_hdr);
bootloader_flash_cs_timing_config();
}
static void bootloader_spi_flash_resume(void)
{
bootloader_execute_flash_command(CMD_RESUME, 0, 0, 0);
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
}
esp_err_t bootloader_init_spi_flash(void)
{
bootloader_init_flash_configure();
#ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
const uint32_t spiconfig = esp_rom_efuse_get_flash_gpio_info();
if (spiconfig != ESP_ROM_EFUSE_FLASH_DEFAULT_SPI && spiconfig != ESP_ROM_EFUSE_FLASH_DEFAULT_HSPI) {
ESP_EARLY_LOGE(TAG, "SPI flash pins are overridden. Enable CONFIG_SPI_FLASH_ROM_DRIVER_PATCH in menuconfig");
return ESP_FAIL;
}
#endif
bootloader_spi_flash_resume();
bootloader_flash_unlock();
#if CONFIG_ESPTOOLPY_FLASHMODE_QIO || CONFIG_ESPTOOLPY_FLASHMODE_QOUT
bootloader_enable_qio_mode();
#endif
print_flash_info(&bootloader_image_hdr);
update_flash_config(&bootloader_image_hdr);
//ensure the flash is write-protected
bootloader_enable_wp();
return ESP_OK;
}

View File

@ -260,7 +260,7 @@ esp_err_t bootloader_init_spi_flash(void)
}
#endif
#if CONFIG_SPI_FLASH_HPM_ENABLE
#if CONFIG_BOOTLOADER_FLASH_DC_AWARE
// Reset flash, clear volatile bits DC[0:1]. Make it work under default mode to boot.
bootloader_spi_flash_reset();
#endif
@ -272,7 +272,9 @@ esp_err_t bootloader_init_spi_flash(void)
bootloader_enable_qio_mode();
}
#endif
#if CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
bootloader_flash_32bits_address_map_enable(bootloader_flash_get_spi_mode());
#endif
print_flash_info(&bootloader_image_hdr);
update_flash_config(&bootloader_image_hdr);
//ensure the flash is write-protected

View File

@ -18,12 +18,8 @@ typedef enum {
ESP_CHIP_ID_ESP32C3 = 0x0005, /*!< chip ID: ESP32-C3 */
ESP_CHIP_ID_ESP32S3 = 0x0009, /*!< chip ID: ESP32-S3 */
ESP_CHIP_ID_ESP32C2 = 0x000C, /*!< chip ID: ESP32-C2 */
#if CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2
ESP_CHIP_ID_ESP32H4 = 0x000E, /*!< chip ID: ESP32-H4 Beta2*/ // ESP32H4-TODO: IDF-3475
#elif CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_1
ESP_CHIP_ID_ESP32H4 = 0x000A, /*!< chip ID: ESP32-H4 Beta1 */
#endif
ESP_CHIP_ID_ESP32C6 = 0x000D, /*!< chip ID: ESP32-C6 */
ESP_CHIP_ID_ESP32H2 = 0x0010, /*!< chip ID: ESP32-H2 */
ESP_CHIP_ID_INVALID = 0xFFFF /*!< Invalid chip ID (we defined it to make sure the esp_chip_id_t is 2 bytes size) */
} __attribute__((packed)) esp_chip_id_t;

View File

@ -33,6 +33,7 @@ typedef struct {
uint32_t segment_data[ESP_IMAGE_MAX_SEGMENTS]; /* Data offsets for each segment */
uint32_t image_len; /* Length of image on flash, in bytes */
uint8_t image_digest[32]; /* appended SHA-256 digest */
uint32_t secure_version; /* secure version for anti-rollback, it is covered by sha256 (set if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK=y) */
} esp_image_metadata_t;
typedef enum {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -282,6 +282,23 @@ esp_err_t esp_secure_boot_enable_secure_features(void);
*/
bool esp_secure_boot_cfg_verify_release_mode(void);
#if !defined(BOOTLOADER_BUILD) && SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
/** @brief Returns the verification status of the image pointed by the part_pos argument against the public key digest present at index `efuse_digest_index`
*
* @param index[in] Index of public key digest present in efuse against which the image is to be verified
* @param part_pos[in] It is a pointer to the bootloader/app partition.
*
* @return
* - ESP_OK - if the image can be verified by the key at efuse_index.
* - ESP_FAIL - if the image cannot be verified by the key at efuse_index.
* - ESP_ERR_INVALID_ARG: Error in the passed arguments.
*/
esp_err_t esp_secure_boot_verify_with_efuse_digest_index(int efuse_digest_index, esp_partition_pos_t *part_pos);
#endif // !defined(BOOTLOADER_BUILD) && SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
#ifdef __cplusplus
}
#endif

View File

@ -17,8 +17,6 @@
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C6

View File

@ -45,7 +45,7 @@ int bootloader_utility_get_selected_boot_partition(const bootloader_state_t *bs)
* @param[in] bs Bootloader state structure.
* @param[in] start_index The index from which the search for images begins.
*/
__attribute__((noreturn)) void bootloader_utility_load_boot_image(const bootloader_state_t *bs, int start_index);
__attribute__((__noreturn__)) void bootloader_utility_load_boot_image(const bootloader_state_t *bs, int start_index);
#ifdef CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP
/**
@ -65,7 +65,7 @@ void bootloader_utility_load_boot_image_from_deep_sleep(void);
*
* It is not recommended to call this function from an app (if called, the app will abort).
*/
__attribute__((noreturn)) void bootloader_reset(void);
__attribute__((__noreturn__)) void bootloader_reset(void);
/**
* @brief Do any cleanup before exiting the bootloader, before starting the app or resetting

View File

@ -121,52 +121,38 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata,
#if CONFIG_BOOTLOADER_RESERVE_RTC_MEM
#define RTC_RETAIN_MEM_ADDR (SOC_RTC_DRAM_HIGH - sizeof(rtc_retain_mem_t))
_Static_assert(RTC_RETAIN_MEM_ADDR >= SOC_RTC_DRAM_LOW, "rtc_retain_mem_t structure size is bigger than the RTC memory size. Consider reducing RTC reserved memory size.");
rtc_retain_mem_t *const rtc_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR;
#ifndef BOOTLOADER_BUILD
#include "heap_memory_layout.h"
/* The app needs to be told this memory is reserved, important if configured to use RTC memory as heap.
Note that keeping this macro here only works when other symbols in this file are referenced by the app, as
this feature is otherwise 100% part of the bootloader. However this seems to happen in all apps.
*/
SOC_RESERVE_MEMORY_REGION(RTC_RETAIN_MEM_ADDR, RTC_RETAIN_MEM_ADDR + sizeof(rtc_retain_mem_t), rtc_retain_mem);
#endif
static uint32_t rtc_retain_mem_size(void) {
#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
#if CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC && !CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_IN_CRC
/* A custom memory has been reserved by the user, do not consider this memory into CRC calculation as it may change without
* the have the user updating the CRC. Return the offset of the custom field, which is equivalent to size of the structure
* minus the size of everything after (including) `custom` */
return offsetof(rtc_retain_mem_t, custom);
#else
return sizeof(rtc_retain_mem_t) - sizeof(rtc_retain_mem->crc);
return sizeof(rtc_retain_mem_t) - sizeof(bootloader_common_get_rtc_retain_mem()->crc);
#endif
}
static bool is_retain_mem_valid(void)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
return esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, rtc_retain_mem_size()) == rtc_retain_mem->crc && rtc_retain_mem->crc != UINT32_MAX;
}
static void update_rtc_retain_mem_crc(void)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
rtc_retain_mem->crc = esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, rtc_retain_mem_size());
}
NOINLINE_ATTR void bootloader_common_reset_rtc_retain_mem(void)
{
hal_memset(rtc_retain_mem, 0, sizeof(rtc_retain_mem_t));
hal_memset(bootloader_common_get_rtc_retain_mem(), 0, sizeof(rtc_retain_mem_t));
}
uint16_t bootloader_common_get_rtc_retain_mem_reboot_counter(void)
{
if (is_retain_mem_valid()) {
return rtc_retain_mem->reboot_counter;
return bootloader_common_get_rtc_retain_mem()->reboot_counter;
}
return 0;
}
@ -176,12 +162,13 @@ void bootloader_common_set_rtc_retain_mem_factory_reset_state(void)
if (!is_retain_mem_valid()) {
bootloader_common_reset_rtc_retain_mem();
}
rtc_retain_mem->flags.factory_reset_state = true;
bootloader_common_get_rtc_retain_mem()->flags.factory_reset_state = true;
update_rtc_retain_mem_crc();
}
bool bootloader_common_get_rtc_retain_mem_factory_reset_state(void)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
if (is_retain_mem_valid()) {
bool factory_reset_state = rtc_retain_mem->flags.factory_reset_state;
if (factory_reset_state == true) {
@ -196,13 +183,14 @@ bool bootloader_common_get_rtc_retain_mem_factory_reset_state(void)
esp_partition_pos_t* bootloader_common_get_rtc_retain_mem_partition(void)
{
if (is_retain_mem_valid()) {
return &rtc_retain_mem->partition;
return &bootloader_common_get_rtc_retain_mem()->partition;
}
return NULL;
}
void bootloader_common_update_rtc_retain_mem(esp_partition_pos_t* partition, bool reboot_counter)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
if (reboot_counter) {
if (!is_retain_mem_valid()) {
bootloader_common_reset_rtc_retain_mem();
@ -224,7 +212,14 @@ void bootloader_common_update_rtc_retain_mem(esp_partition_pos_t* partition, boo
rtc_retain_mem_t* bootloader_common_get_rtc_retain_mem(void)
{
return rtc_retain_mem;
#ifdef BOOTLOADER_BUILD
#define RTC_RETAIN_MEM_ADDR (SOC_RTC_DRAM_HIGH - sizeof(rtc_retain_mem_t))
static rtc_retain_mem_t *const s_bootloader_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR;
return s_bootloader_retain_mem;
#else
static __attribute__((section(".bootloader_data_rtc_mem"))) rtc_retain_mem_t s_bootloader_retain_mem;
return &s_bootloader_retain_mem;
#endif // !BOOTLOADER_BUILD
}
#endif // CONFIG_BOOTLOADER_RESERVE_RTC_MEM

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -18,6 +18,9 @@
#include "esp32s2/rom/usb/cdc_acm.h"
#include "esp32s2/rom/usb/usb_common.h"
#endif
#if SOC_USB_SERIAL_JTAG_SUPPORTED
#include "hal/usb_fsls_phy_ll.h"
#endif
#include "esp_rom_gpio.h"
#include "esp_rom_uart.h"
#include "esp_rom_sys.h"
@ -95,8 +98,12 @@ void bootloader_console_init(void)
#endif
esp_rom_uart_usb_acm_init(s_usb_cdc_buf, sizeof(s_usb_cdc_buf));
esp_rom_uart_set_as_console(ESP_ROM_UART_USB);
esp_rom_uart_set_as_console(ESP_ROM_USB_OTG_NUM);
esp_rom_install_channel_putc(1, bootloader_console_write_char_usb);
#if SOC_USB_SERIAL_JTAG_SUPPORTED
usb_fsls_phy_ll_usb_wrap_pad_enable(&USB_WRAP, true);
usb_fsls_phy_ll_int_otg_enable(&USB_WRAP);
#endif
}
#endif //CONFIG_ESP_CONSOLE_USB_CDC

View File

@ -27,9 +27,6 @@ int bootloader_clock_get_rated_freq_mhz(void)
#elif CONFIG_IDF_TARGET_ESP32C3
return 160;
#elif CONFIG_IDF_TARGET_ESP32H4
return 96;
#elif CONFIG_IDF_TARGET_ESP32C6
return 160;

View File

@ -26,9 +26,11 @@ void abort(void)
#if !CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT
esp_rom_printf("abort() was called at PC 0x%08x\r\n", (intptr_t)__builtin_return_address(0) - 3);
#endif
#if CONFIG_ESP_DEBUG_OCDAWARE
if (esp_cpu_dbgr_is_attached()) {
esp_cpu_dbgr_break();
}
#endif
while (1) {
}
}

View File

@ -8,6 +8,10 @@
#include "esp_cpu.h"
#include "soc/wdev_reg.h"
#if SOC_LP_TIMER_SUPPORTED
#include "hal/lp_timer_hal.h"
#endif
#ifndef BOOTLOADER_BUILD
#include "esp_random.h"
#include "esp_private/periph_ctrl.h"
@ -20,9 +24,14 @@
#else
#if !defined CONFIG_IDF_TARGET_ESP32S3
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 32 * 2) /* extra factor of 2 is precautionary */
#if (defined CONFIG_IDF_TARGET_ESP32C6 || defined CONFIG_IDF_TARGET_ESP32H2)
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 16) // Keep the byte sampling frequency in the ~62KHz range which has been
// tested.
#else
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 32 * 2) /* extra factor of 2 is precautionary */
#endif
#else
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 23) /* 45 KHz reading frequency is the maximum we have tested so far on S3 */
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 23) /* 45 KHz reading frequency is the maximum we have tested so far on S3 */
#endif
__attribute__((weak)) void bootloader_fill_random(void *buffer, size_t length)
@ -34,6 +43,21 @@
assert(buffer != NULL);
for (size_t i = 0; i < length; i++) {
#if SOC_LP_TIMER_SUPPORTED
random = REG_READ(WDEV_RND_REG);
start = esp_cpu_get_cycle_count();
do {
random ^= REG_READ(WDEV_RND_REG);
now = esp_cpu_get_cycle_count();
} while (now - start < RNG_CPU_WAIT_CYCLE_NUM);
// XOR the RT slow clock, which is asynchronous, to add some entropy and improve
// the distribution
uint32_t current_rtc_timer_counter = (lp_timer_hal_get_cycle_count() & 0xFF);
random = random ^ current_rtc_timer_counter;
buffer_bytes[i] = random & 0xFF;
#else
if (i == 0 || i % 4 == 0) { /* redundant check is for a compiler warning */
/* in bootloader with ADC feeding HWRNG, we accumulate 1
bit of entropy per 40 APB cycles (==80 CPU cycles.)
@ -50,6 +74,7 @@
} while (now - start < RNG_CPU_WAIT_CYCLE_NUM);
}
buffer_bytes[i] = random >> ((i % 4) * 8);
#endif
}
}

View File

@ -1,22 +1,99 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "bootloader_random.h"
#include "soc/soc.h"
#include "soc/pcr_reg.h"
#include "soc/apb_saradc_reg.h"
#include "soc/pmu_reg.h"
#include "hal/regi2c_ctrl.h"
#include "soc/regi2c_saradc.h"
#include "esp_log.h"
static const char *TAG = "bootloader_random";
static const uint32_t SAR2_CHANNEL = 9;
static const uint32_t PATTERN_BIT_WIDTH = 6;
static const uint32_t SAR1_ATTEN = 1;
static const uint32_t SAR2_ATTEN = 1;
void bootloader_random_enable(void)
{
// TODO: IDF-5352
ESP_EARLY_LOGW(TAG, "bootloader_random_enable() has not been implemented yet");
// pull SAR ADC out of reset
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
REG_CLR_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
// enable SAR ADC APB clock
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_REG_CLK_EN);
// enable ADC_CTRL_CLK (SAR ADC function clock)
REG_SET_BIT(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_EN);
// select XTAL clock (40 MHz) source for ADC_CTRL_CLK
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_SEL, 0);
// set the clock divider for ADC_CTRL_CLK to default value (in case it has been changed)
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_DIV_NUM, 0);
// some ADC sensor registers are in power group PERIF_I2C and need to be enabled via PMU
SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_PERIF_I2C_RSTB);
SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_PERIF_I2C);
// Config ADC circuit (Analog part) with I2C(HOST ID 0x69) and chose internal voltage as sampling source
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_DTEST_RTC_ADDR , 2);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_RTC_ADDR , 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC1_ENCAL_REF_ADDR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC2_ENCAL_REF_ADDR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_HIGH_ADDR, 0x08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_LOW_ADDR, 0x66);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_HIGH_ADDR, 0x08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_LOW_ADDR, 0x66);
// create patterns and set them in pattern table
uint32_t pattern_one = (SAR2_CHANNEL << 2) | SAR2_ATTEN; // we want channel 9 with max attenuation
uint32_t pattern_two = SAR1_ATTEN; // we want channel 0 with max attenuation, channel doesn't really matter here
uint32_t pattern_table = 0 | (pattern_two << 3 * PATTERN_BIT_WIDTH) | pattern_one << 2 * PATTERN_BIT_WIDTH;
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, pattern_table);
// set pattern length to 2 (APB_SARADC_SAR_PATT_LEN counts from 0)
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_PATT_LEN, 1);
// Same as in C3
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_CLK_DIV, 15);
// set timer expiry (timer is ADC_CTRL_CLK)
REG_SET_FIELD(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_TARGET, 200);
// enable timer
REG_SET_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
}
void bootloader_random_disable(void)
{
// TODO: IDF-5352
ESP_EARLY_LOGW(TAG, "bootloader_random_enable() has not been implemented yet");
// disable timer
REG_CLR_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
// Write reset value of this register
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, 0xFFFFFF);
// Revert ADC I2C configuration and initial voltage source setting
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_HIGH_ADDR, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_LOW_ADDR, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_HIGH_ADDR, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_LOW_ADDR, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_DTEST_RTC_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_RTC_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC1_ENCAL_REF_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC2_ENCAL_REF_ADDR, 0);
// Revert PMU_RF_PWC_REG to it's initial value
CLEAR_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_PERIF_I2C_RSTB);
// disable ADC_CTRL_CLK (SAR ADC function clock)
REG_WRITE(PCR_SARADC_CLKM_CONF_REG, 0x00404000);
// Set PCR_SARADC_CONF_REG to initial state
REG_WRITE(PCR_SARADC_CONF_REG, 0x5);
}

View File

@ -1,21 +1,88 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "bootloader_random.h"
#include "soc/soc.h"
#include "soc/pcr_reg.h"
#include "soc/apb_saradc_reg.h"
#include "soc/pmu_reg.h"
#include "hal/regi2c_ctrl.h"
#include "soc/regi2c_saradc.h"
#include "esp_log.h"
static const char *TAG = "bootloader_random";
static const uint32_t SAR2_CHANNEL = 9;
static const uint32_t PATTERN_BIT_WIDTH = 6;
static const uint32_t SAR1_ATTEN = 1;
static const uint32_t SAR2_ATTEN = 1;
void bootloader_random_enable(void)
{
// ESP32H2-TODO: IDF-6274
ESP_EARLY_LOGW(TAG, "bootloader_random_enable() has not been implemented yet");
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
REG_CLR_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_REG_CLK_EN);
REG_SET_BIT(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_EN);
// select XTAL clock (40 MHz) source for ADC_CTRL_CLK
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_SEL, 0);
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_DIV_NUM, 0);
// some ADC sensor registers are in power group PERIF_I2C and need to be enabled via PMU
SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_PERIF_I2C);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_DTEST, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_ENT_SAR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_EN_TOUT_SAR1_BUS, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_MSB, 0X08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_LSB, 0X66);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_MSB, 0X08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_LSB, 0X66);
// create patterns and set them in pattern table
uint32_t pattern_one = (SAR2_CHANNEL << 2) | SAR2_ATTEN;
uint32_t pattern_two = SAR1_ATTEN; // we want channel 0 with max attenuation, channel doesn't really matter here
uint32_t pattern_table = 0 | (pattern_two << 3 * PATTERN_BIT_WIDTH) | pattern_one << 2 * PATTERN_BIT_WIDTH;
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, pattern_table);
// set pattern length to 2 (APB_SARADC_SAR_PATT_LEN counts from 0)
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_PATT_LEN, 0);
// Same as in C3
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_CLK_DIV, 15);
// set timer expiry (timer is ADC_CTRL_CLK)
REG_SET_FIELD(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_TARGET, 200);
// ENABLE_TIMER
REG_SET_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
}
void bootloader_random_disable(void)
{
// ESP32H2-TODO: IDF-6274
ESP_EARLY_LOGW(TAG, "bootloader_random_disable() has not been implemented yet");
// disable timer
REG_CLR_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
// Write reset value of this register
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, 0xFFFFFF);
// Revert ADC I2C configuration and initial voltage source setting
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_MSB, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_LSB, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_MSB, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_LSB, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_DTEST, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_ENT_SAR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_EN_TOUT_SAR1_BUS, 0);
// disable ADC_CTRL_CLK (SAR ADC function clock)
REG_WRITE(PCR_SARADC_CLKM_CONF_REG, 0x00404000);
// Set PCR_SARADC_CONF_REG to initial state
REG_WRITE(PCR_SARADC_CONF_REG, 0x5);
}

View File

@ -1,24 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "bootloader_random.h"
#include "esp_log.h"
#include "soc/syscon_reg.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/apb_saradc_reg.h"
#include "soc/system_reg.h"
#include "esp_private/regi2c_ctrl.h"
// ESP32H4-TODO: IDF-3381
void bootloader_random_enable(void)
{
}
void bootloader_random_disable(void)
{
}

View File

@ -28,12 +28,6 @@
#include "esp32c3/rom/uart.h"
#include "esp32c3/rom/gpio.h"
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/efuse.h"
#include "esp32h4/rom/crc.h"
#include "esp32h4/rom/uart.h"
#include "esp32h4/rom/gpio.h"
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/efuse.h"
#include "esp32c2/rom/crc.h"

View File

@ -3,18 +3,10 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
void bootloader_ana_super_wdt_reset_config(bool enable)
{
(void)enable;
}
void bootloader_ana_bod_reset_config(bool enable)
{
(void)enable;
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
(void)enable;

View File

@ -34,6 +34,7 @@
#include "bootloader_mem.h"
#include "bootloader_console.h"
#include "bootloader_flash_priv.h"
#include "bootloader_soc.h"
#include "esp_private/bootloader_flash_internal.h"
#include "esp_efuse.h"
#include "hal/mmu_hal.h"
@ -78,10 +79,19 @@ static void bootloader_super_wdt_auto_feed(void)
REG_WRITE(RTC_CNTL_SWD_WPROTECT_REG, 0);
}
static inline void bootloader_ana_reset_config(void)
{
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset
bootloader_ana_bod_reset_config(true);
}
esp_err_t bootloader_init(void)
{
esp_err_t ret = ESP_OK;
bootloader_ana_reset_config();
bootloader_super_wdt_auto_feed();
// In RAM_APP, memory will be initialized in `call_start_cpu0`

View File

@ -3,19 +3,34 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include "soc/rtc_cntl_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
(void)enable; // ESP32-C2 has none of these features.
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
(void)enable; // ESP32-C2 has none of these features.
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
} else {
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
}
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
(void)enable; // ESP32-C2 has none of these features.
(void)enable;
}

View File

@ -96,29 +96,29 @@ static inline void bootloader_hardware_init(void)
static inline void bootloader_ana_reset_config(void)
{
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
/*
For origin chip & ECO1: only support swt reset;
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
For origin chip & ECO1: brownout & clock glitch reset not available
For ECO2: fix brownout reset bug
For ECO3: fix clock glitch reset bug
*/
switch (efuse_hal_chip_revision()) {
case 0:
case 1:
//Enable WDT reset. Disable BOR and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
//Disable BOD and GLITCH reset
bootloader_ana_bod_reset_config(false);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 2:
//Enable WDT and BOR reset. Disable GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset. Disable GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 3:
default:
//Enable WDT, BOR, and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD, and GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
break;

View File

@ -12,15 +12,15 @@ void bootloader_ana_super_wdt_reset_config(bool enable)
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOR_RST);
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);

View File

@ -103,33 +103,10 @@ static inline void bootloader_hardware_init(void)
static inline void bootloader_ana_reset_config(void)
{
// TODO: IDF-5990 copied from C3, need update
// Have removed bootloader_ana_super_wdt_reset_config for now; can be evaluated later to see whether needs to add it back
/*
For origin chip & ECO1: only support swt reset;
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
*/
uint8_t chip_version = efuse_hal_get_minor_chip_version();
switch (chip_version) {
case 0:
case 1:
//Disable BOR and GLITCH reset
bootloader_ana_bod_reset_config(false);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 2:
//Enable BOR reset. Disable GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 3:
default:
//Enable BOR, and GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
break;
}
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset
bootloader_ana_bod_reset_config(true);
}
esp_err_t bootloader_init(void)

View File

@ -1,15 +1,24 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <assert.h>
#include "soc/soc.h"
#include "soc/lp_analog_peri_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
//C6 doesn't support bypass super WDT reset
assert(enable);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_SUPER_WDT_RST);
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOR_RST);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_BOD_MODE1_CNTL_REG, LP_ANALOG_PERI_LP_ANA_BOD_MODE1_RESET_ENA);
} else {
@ -17,12 +26,8 @@ void bootloader_ana_bod_reset_config(bool enable)
}
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_GLITCH_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
} else {
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
}
(void)enable;
}

View File

@ -86,40 +86,16 @@ static void bootloader_super_wdt_auto_feed(void)
static inline void bootloader_hardware_init(void)
{
// TODO: IDF-6267
/* Enable analog i2c master clock */
SET_PERI_REG_MASK(MODEM_LPCON_CLK_CONF_REG, MODEM_LPCON_CLK_I2C_MST_EN);
}
static inline void bootloader_ana_reset_config(void)
{
// TODO: IDF-5990 copied from C6, need update
// Have removed bootloader_ana_super_wdt_reset_config for now; can be evaluated later to see whether needs to add it back
/*
For origin chip & ECO1: only support swt reset;
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
*/
uint8_t chip_version = efuse_hal_get_minor_chip_version();
switch (chip_version) {
case 0:
case 1:
//Disable BOR and GLITCH reset
bootloader_ana_bod_reset_config(false);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 2:
//Enable BOR reset. Disable GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 3:
default:
//Enable BOR, and GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
break;
}
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset
bootloader_ana_bod_reset_config(true);
}
esp_err_t bootloader_init(void)

View File

@ -1,20 +1,22 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include "soc/soc.h"
#include "soc/lp_analog_peri_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
// ESP32H2 has removed the super wdt
//H2 doesn't support bypass super WDT reset
assert(enable);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_SUPER_WDT_RST);
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOR_RST);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_BOD_MODE1_CNTL_REG, LP_ANALOG_PERI_LP_ANA_BOD_MODE1_RESET_ENA);
} else {
@ -22,12 +24,8 @@ void bootloader_ana_bod_reset_config(bool enable)
}
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_GLITCH_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
} else {
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
}
(void)enable;
}

View File

@ -1,155 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include "sdkconfig.h"
#include "esp_attr.h"
#include "esp_log.h"
#include "esp_image_format.h"
#include "flash_qio_mode.h"
#include "esp_rom_gpio.h"
#include "esp_rom_efuse.h"
#include "esp_rom_uart.h"
#include "esp_rom_sys.h"
#include "esp_rom_spiflash.h"
#include "soc/efuse_reg.h"
#include "soc/gpio_sig_map.h"
#include "soc/io_mux_reg.h"
#include "soc/assist_debug_reg.h"
#include "esp_cpu.h"
#include "soc/rtc.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/spi_periph.h"
#include "soc/extmem_reg.h"
#include "soc/io_mux_reg.h"
#include "soc/system_reg.h"
#include "esp32h4/rom/efuse.h"
#include "esp32h4/rom/ets_sys.h"
#include "bootloader_common.h"
#include "bootloader_init.h"
#include "bootloader_clock.h"
#include "bootloader_flash_config.h"
#include "bootloader_mem.h"
#include "bootloader_console.h"
#include "bootloader_flash_priv.h"
#include "bootloader_soc.h"
#include "esp_private/bootloader_flash_internal.h"
#include "hal/mmu_hal.h"
#include "hal/cache_hal.h"
static const char *TAG = "boot.esp32h4";
static void wdt_reset_cpu0_info_enable(void)
{
REG_SET_BIT(SYSTEM_CPU_PERI_CLK_EN_REG, SYSTEM_CLK_EN_ASSIST_DEBUG);
REG_CLR_BIT(SYSTEM_CPU_PERI_RST_EN_REG, SYSTEM_RST_EN_ASSIST_DEBUG);
REG_WRITE(ASSIST_DEBUG_CORE_0_RCD_EN_REG, ASSIST_DEBUG_CORE_0_RCD_PDEBUGEN | ASSIST_DEBUG_CORE_0_RCD_RECORDEN);
}
static void wdt_reset_info_dump(int cpu)
{
(void) cpu;
// saved PC was already printed by the ROM bootloader.
// nothing to do here.
}
static void bootloader_check_wdt_reset(void)
{
int wdt_rst = 0;
soc_reset_reason_t rst_reason = esp_rom_get_reset_reason(0);
if (rst_reason == RESET_REASON_CORE_RTC_WDT || rst_reason == RESET_REASON_CORE_MWDT0 || rst_reason == RESET_REASON_CORE_MWDT1 ||
rst_reason == RESET_REASON_CPU0_MWDT0 || rst_reason == RESET_REASON_CPU0_MWDT1 || rst_reason == RESET_REASON_CPU0_RTC_WDT) {
ESP_LOGW(TAG, "PRO CPU has been reset by WDT.");
wdt_rst = 1;
}
if (wdt_rst) {
// if reset by WDT dump info from trace port
wdt_reset_info_dump(0);
}
wdt_reset_cpu0_info_enable();
}
static void bootloader_super_wdt_auto_feed(void)
{
REG_WRITE(RTC_CNTL_SWD_WPROTECT_REG, RTC_CNTL_SWD_WKEY_VALUE);
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_AUTO_FEED_EN);
REG_WRITE(RTC_CNTL_SWD_WPROTECT_REG, 0);
}
static inline void bootloader_hardware_init(void)
{
}
static inline void bootloader_ana_reset_config(void)
{
//Enable WDT, BOR, and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
}
esp_err_t bootloader_init(void)
{
esp_err_t ret = ESP_OK;
bootloader_hardware_init();
bootloader_ana_reset_config();
bootloader_super_wdt_auto_feed();
// In RAM_APP, memory will be initialized in `call_start_cpu0`
#if !CONFIG_APP_BUILD_TYPE_RAM
// protect memory region
bootloader_init_mem();
/* check that static RAM is after the stack */
assert(&_bss_start <= &_bss_end);
assert(&_data_start <= &_data_end);
// clear bss section
bootloader_clear_bss_section();
#endif // !CONFIG_APP_BUILD_TYPE_RAM
// config clock
bootloader_clock_configure();
// initialize console, from now on, we can use esp_log
bootloader_console_init();
/* print 2nd bootloader banner */
bootloader_print_banner();
#if !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
//init cache hal
cache_hal_init(); //TODO IDF-4649
//init mmu
mmu_hal_init();
// update flash ID
bootloader_flash_update_id();
// Check and run XMC startup flow
if ((ret = bootloader_flash_xmc_startup()) != ESP_OK) {
ESP_LOGE(TAG, "failed when running XMC startup flow, reboot!");
return ret;
}
#if !CONFIG_APP_BUILD_TYPE_RAM
// read bootloader header
if ((ret = bootloader_read_bootloader_header()) != ESP_OK) {
return ret;
}
// read chip revision and check if it's compatible to bootloader
if ((ret = bootloader_check_bootloader_validity()) != ESP_OK) {
return ret;
}
#endif // !CONFIG_APP_BUILD_TYPE_RAM
// initialize spi flash
if ((ret = bootloader_init_spi_flash()) != ESP_OK) {
return ret;
}
#endif // #if !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
// check whether a WDT reset happend
bootloader_check_wdt_reset();
// config WDT
bootloader_config_wdt();
// enable RNG early entropy source
bootloader_enable_random();
return ret;
}

View File

@ -1,40 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "bootloader_sha.h"
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <sys/param.h>
#include "esp32h4/rom/sha.h"
static SHA_CTX ctx;
bootloader_sha256_handle_t bootloader_sha256_start()
{
// Enable SHA hardware
ets_sha_enable();
ets_sha_init(&ctx, SHA2_256);
return &ctx; // Meaningless non-NULL value
}
void bootloader_sha256_data(bootloader_sha256_handle_t handle, const void *data, size_t data_len)
{
assert(handle != NULL);
assert(data_len % 4 == 0);
ets_sha_update(&ctx, data, data_len, false);
}
void bootloader_sha256_finish(bootloader_sha256_handle_t handle, uint8_t *digest)
{
assert(handle != NULL);
if (digest == NULL) {
bzero(&ctx, sizeof(ctx));
return;
}
ets_sha_finish(&ctx, digest);
}

View File

@ -1,41 +0,0 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOR_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
} else {
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
}
}
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_GLITCH_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_GLITCH_RST_EN);
} else {
REG_CLR_BIT(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_GLITCH_RST_EN);
}
}

View File

@ -1,59 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <strings.h>
#include "esp_flash_encrypt.h"
#include "esp_secure_boot.h"
#include "esp_efuse.h"
#include "esp_efuse_table.h"
#include "esp_log.h"
#include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt";
esp_err_t esp_flash_encryption_enable_secure_features(void)
{
#ifndef CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_ENC
ESP_LOGI(TAG, "Disable UART bootloader encryption...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT);
#else
ESP_LOGW(TAG, "Not disabling UART bootloader encryption");
#endif
#ifndef CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_CACHE
ESP_LOGI(TAG, "Disable UART bootloader cache...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DOWNLOAD_ICACHE);
#else
ESP_LOGW(TAG, "Not disabling UART bootloader cache - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG
ESP_LOGI(TAG, "Disable JTAG...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_PAD_JTAG);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_USB_JTAG);
#else
ESP_LOGW(TAG, "Not disabling JTAG - SECURITY COMPROMISED");
#endif
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#if defined(CONFIG_SECURE_BOOT_V2_ENABLED) && !defined(CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS)
// This bit is set when enabling Secure Boot V2, but we can't enable it until this later point in the first boot
// otherwise the Flash Encryption key cannot be read protected
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_RD_DIS);
#endif
#ifndef CONFIG_SECURE_FLASH_SKIP_WRITE_PROTECTION_CACHE
// Set write-protection for DIS_ICACHE to prevent bricking chip in case it will be set accidentally.
// esp32h4 has DIS_ICACHE. Write-protection bit = 2.
// List of eFuses with the same write protection bit:
// DIS_ICACHE, DIS_USB_JTAG, POWERGLITCH_EN, DIS_FORCE_DOWNLOAD, SPI_DOWNLOAD_MSPI_DIS,
// DIS_TWAI, JTAG_SEL_ENABLE, DIS_PAD_JTAG, DIS_DOWNLOAD_MANUAL_ENCRYPT
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_DIS_ICACHE);
#endif
return ESP_OK;
}

View File

@ -1,70 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <strings.h>
#include "esp_flash_encrypt.h"
#include "esp_secure_boot.h"
#include "esp_efuse.h"
#include "esp_efuse_table.h"
#include "esp_log.h"
#include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot";
esp_err_t esp_secure_boot_enable_secure_features(void)
{
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#ifdef CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE
ESP_LOGI(TAG, "Enabling Security download mode...");
esp_err_t err = esp_efuse_enable_rom_secure_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not enable Security download mode...");
return err;
}
#elif CONFIG_SECURE_DISABLE_ROM_DL_MODE
ESP_LOGI(TAG, "Disable ROM Download mode...");
esp_err_t err = esp_efuse_disable_rom_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not disable ROM Download mode...");
return err;
}
#else
ESP_LOGW(TAG, "UART ROM Download mode kept enabled - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG
ESP_LOGI(TAG, "Disable hardware & software JTAG...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_PAD_JTAG);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_USB_JTAG);
esp_efuse_write_field_cnt(ESP_EFUSE_SOFT_DIS_JTAG, ESP_EFUSE_SOFT_DIS_JTAG[0]->bit_count);
#else
ESP_LOGW(TAG, "Not disabling JTAG - SECURITY COMPROMISED");
#endif
#ifdef CONFIG_SECURE_BOOT_ENABLE_AGGRESSIVE_KEY_REVOKE
esp_efuse_write_field_bit(ESP_EFUSE_SECURE_BOOT_AGGRESSIVE_REVOKE);
#endif
esp_efuse_write_field_bit(ESP_EFUSE_SECURE_BOOT_EN);
#ifndef CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS
bool rd_dis_now = true;
#ifdef CONFIG_SECURE_FLASH_ENC_ENABLED
/* If flash encryption is not enabled yet then don't read-disable efuses yet, do it later in the boot
when Flash Encryption is being enabled */
rd_dis_now = esp_flash_encryption_enabled();
#endif
if (rd_dis_now) {
ESP_LOGI(TAG, "Prevent read disabling of additional efuses...");
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_RD_DIS);
}
#else
ESP_LOGW(TAG, "Allowing read disabling of additional efuses - SECURITY COMPROMISED");
#endif
return ESP_OK;
}

View File

@ -3,18 +3,10 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
void bootloader_ana_super_wdt_reset_config(bool enable)
{
(void)enable;
}
void bootloader_ana_bod_reset_config(bool enable)
{
(void)enable;
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
(void)enable;

View File

@ -130,7 +130,7 @@ static void bootloader_super_wdt_auto_feed(void)
static inline void bootloader_ana_reset_config(void)
{
//Enable WDT, BOR, and GLITCH reset
//Enable WDT, BOD, and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);

View File

@ -12,15 +12,15 @@ void bootloader_ana_super_wdt_reset_config(bool enable)
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOR_RST);
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -19,6 +19,8 @@
#include "bootloader_util.h"
#include "bootloader_common.h"
#include "esp_rom_sys.h"
#include "esp_efuse.h"
#include "esp_app_desc.h"
#include "bootloader_memory_utils.h"
#include "soc/soc_caps.h"
#if CONFIG_IDF_TARGET_ESP32
@ -29,8 +31,6 @@
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/rtc.h"
#include "esp32c2/rom/secure_boot.h"
@ -87,10 +87,10 @@ static bool should_map(uint32_t load_addr);
static esp_err_t process_segments(esp_image_metadata_t *data, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum);
/* Load or verify a segment */
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum);
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata);
/* split segment and verify if data_len is too long */
static esp_err_t process_segment_data(intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum);
static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata);
/* Verify the main image header */
static esp_err_t verify_image_header(uint32_t src_addr, const esp_image_header_t *image, bool silent);
@ -235,6 +235,21 @@ static esp_err_t image_load(esp_image_load_mode_t mode, const esp_partition_pos_
}
}
}
#if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
/* For anti-rollback case, reconfirm security version of the application to prevent FI attacks */
bool sec_ver = false;
if (do_load) {
sec_ver = esp_efuse_check_secure_version(data->secure_version);
if (!sec_ver) {
err = ESP_FAIL;
goto err;
}
}
/* Ensure that the security version check passes for image loading scenario */
ESP_FAULT_ASSERT(!do_load || sec_ver == true);
#endif // CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
#endif // BOOTLOADER_BUILD
// Success!
@ -511,7 +526,7 @@ static esp_err_t process_segments(esp_image_metadata_t *data, bool silent, bool
for (int i = 0; i < data->image.segment_count; i++) {
esp_image_segment_header_t *header = &data->segments[i];
ESP_LOGV(TAG, "loading segment header %d at offset 0x%"PRIx32, i, next_addr);
CHECK_ERR(process_segment(i, next_addr, header, silent, do_load, sha_handle, checksum));
CHECK_ERR(process_segment(i, next_addr, header, silent, do_load, sha_handle, checksum, data));
next_addr += sizeof(esp_image_segment_header_t);
data->segment_data[i] = next_addr;
next_addr += header->data_len;
@ -532,7 +547,7 @@ err:
return err;
}
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum)
static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segment_header_t *header, bool silent, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata)
{
esp_err_t err;
@ -590,7 +605,7 @@ static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segme
uint32_t offset_page = ((data_addr & MMAP_ALIGNED_MASK) != 0) ? 1 : 0;
/* Data we could map in case we are not aligned to PAGE boundary is one page size lesser. */
data_len = MIN(data_len_remain, ((free_page_count - offset_page) * SPI_FLASH_MMU_PAGE_SIZE));
CHECK_ERR(process_segment_data(load_addr, data_addr, data_len, do_load, sha_handle, checksum));
CHECK_ERR(process_segment_data(index, load_addr, data_addr, data_len, do_load, sha_handle, checksum, metadata));
data_addr += data_len;
data_len_remain -= data_len;
}
@ -605,7 +620,42 @@ err:
return err;
}
static esp_err_t process_segment_data(intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum)
#if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
/* The __attribute__((optimize("O0"))) is used to disable optimizations for this function,
* preventing the compiler from potentially optimizing data_buffer and reading data directly from src.
* This is crucial as we want to read from Flash only once, ensuring the integrity of the data.
*/
__attribute__((optimize("O0")))
static size_t process_esp_app_desc_data(const uint32_t *src, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata)
{
/* Using data_buffer here helps to securely read secure_version
* (for anti-rollback) from esp_app_desc_t, preventing FI attack.
* We read data from Flash into this buffer, which is covered by sha256.
* Therefore, if the flash is under attackers control and contents are modified
* the sha256 comparison will fail.
*
* The esp_app_desc_t structure is located in DROM and is always in segment #0.
*
* esp_app_desc_t is always at #0 segment (index==0).
* secure_version field of esp_app_desc_t is located at #2 word (w_i==1).
*/
uint32_t data_buffer[2];
memcpy(data_buffer, src, sizeof(data_buffer));
assert(data_buffer[0] == ESP_APP_DESC_MAGIC_WORD);
metadata->secure_version = data_buffer[1];
if (checksum != NULL) {
*checksum ^= data_buffer[0] ^ data_buffer[1];
}
if (sha_handle != NULL) {
bootloader_sha256_data(sha_handle, data_buffer, sizeof(data_buffer));
}
ESP_FAULT_ASSERT(memcmp(data_buffer, src, sizeof(data_buffer)) == 0);
ESP_FAULT_ASSERT(memcmp(&metadata->secure_version, &src[1], sizeof(uint32_t)) == 0);
return sizeof(data_buffer);
}
#endif // CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t data_addr, uint32_t data_len, bool do_load, bootloader_sha256_handle_t sha_handle, uint32_t *checksum, esp_image_metadata_t *metadata)
{
// If we are not loading, and the checksum is empty, skip processing this
// segment for data
@ -638,10 +688,24 @@ static esp_err_t process_segment_data(intptr_t load_addr, uint32_t data_addr, ui
#endif
}
uint32_t *dest = (uint32_t *)load_addr;
#endif
#endif // BOOTLOADER_BUILD
const uint32_t *src = data;
#if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
// Case I: Bootloader verifying application
// Case II: Bootloader verifying bootloader
// Anti-rollback check should handle only Case I from above.
if (segment == 0 && metadata->start_addr != ESP_BOOTLOADER_OFFSET) {
ESP_LOGD(TAG, "additional anti-rollback check 0x%"PRIx32, data_addr);
// The esp_app_desc_t structure is located in DROM and is always in segment #0.
size_t len = process_esp_app_desc_data(src, sha_handle, checksum, metadata);
data_len -= len;
src += len / 4;
// In BOOTLOADER_BUILD, for DROM (segment #0) we do not load it into dest (only map it), do_load = false.
}
#endif // CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK
for (size_t i = 0; i < data_len; i += 4) {
int w_i = i / 4; // Word index
uint32_t w = src[w_i];
@ -866,7 +930,7 @@ static esp_err_t verify_secure_boot_signature(bootloader_sha256_handle_t sha_han
bootloader_munmap(simple_hash);
}
#if CONFIG_SECURE_BOOT_V2_ENABLED
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
// End of the image needs to be padded all the way to a 4KB boundary, after the simple hash
// (for apps they are usually already padded due to --secure-pad-v2, only a problem if this option was not used.)
uint32_t padded_end = ALIGN_UP(end, FLASH_SECTOR_SIZE);
@ -876,7 +940,7 @@ static esp_err_t verify_secure_boot_signature(bootloader_sha256_handle_t sha_han
bootloader_munmap(padding);
end = padded_end;
}
#endif
#endif // CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
bootloader_sha256_finish(sha_handle, image_digest);
@ -916,9 +980,13 @@ static esp_err_t verify_secure_boot_signature(bootloader_sha256_handle_t sha_han
return ESP_ERR_IMAGE_INVALID;
}
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
// Adjust image length result to include the appended signature
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
data->image_len = end - data->start_addr + sizeof(ets_secure_boot_signature_t);
#elif defined(CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME)
if (data->start_addr != ESP_BOOTLOADER_OFFSET) {
data->image_len = end - data->start_addr + sizeof(esp_secure_boot_sig_block_t);
}
#endif
#endif // SECURE_BOOT_CHECK_SIGNATURE

View File

@ -393,14 +393,21 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
{
esp_err_t err;
bool should_encrypt = (partition->flags & PART_FLAG_ENCRYPTED);
uint32_t size = partition->pos.size;
if (partition->type == PART_TYPE_APP) {
/* check if the partition holds a valid unencrypted app */
esp_image_metadata_t data_ignored;
esp_image_metadata_t image_data = {};
err = esp_image_verify(ESP_IMAGE_VERIFY,
&partition->pos,
&data_ignored);
&image_data);
should_encrypt = (err == ESP_OK);
#ifdef SECURE_FLASH_ENCRYPT_ONLY_IMAGE_LEN_IN_APP_PART
if (should_encrypt) {
// Encrypt only the app image instead of encrypting the whole partition
size = image_data.image_len;
}
#endif
} else if ((partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_OTA)
|| (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_NVS_KEYS)) {
/* check if we have ota data partition and the partition should be encrypted unconditionally */
@ -411,9 +418,9 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
return ESP_OK;
} else {
/* should_encrypt */
ESP_LOGI(TAG, "Encrypting partition %d at offset 0x%x (length 0x%x)...", index, partition->pos.offset, partition->pos.size);
ESP_LOGI(TAG, "Encrypting partition %d at offset 0x%x (length 0x%x)...", index, partition->pos.offset, size);
err = esp_flash_encrypt_region(partition->pos.offset, partition->pos.size);
err = esp_flash_encrypt_region(partition->pos.offset, size);
ESP_LOGI(TAG, "Done encrypting");
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to encrypt partition %d", index);

View File

@ -144,9 +144,9 @@ static esp_err_t secure_boot_v2_check(bool *need_fix)
#endif
#endif // CONFIG_SECURE_BOOT
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
#if (CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME) && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
static void rsa_check_signature_on_update_check(void)
static void check_signature_on_update_check(void)
{
// We rely on the keys used to sign this app to verify the next app on OTA, so make sure there is at
// least one to avoid a stuck firmware
@ -164,7 +164,7 @@ static void rsa_check_signature_on_update_check(void)
}
#endif
}
#endif // CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
#endif // (CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME) && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
void esp_secure_boot_init_checks(void)
{
@ -184,9 +184,9 @@ void esp_secure_boot_init_checks(void)
#endif // CONFIG_SECURE_BOOT
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
rsa_check_signature_on_update_check();
#endif // CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
#if (CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME) && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
check_signature_on_update_check();
#endif // (CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME) && CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
}

View File

@ -13,8 +13,6 @@
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C6

View File

@ -22,6 +22,7 @@
#include "esp_secure_boot.h"
#include "esp_ota_ops.h"
#include "esp_efuse.h"
#include "esp_efuse_chip.h"
#include "secure_boot_signature_priv.h"
@ -46,31 +47,32 @@ static esp_err_t validate_signature_block(const ets_secure_boot_sig_block_t *blo
return ESP_OK;
}
esp_err_t esp_secure_boot_get_signature_blocks_for_running_app(bool digest_public_keys, esp_image_sig_public_key_digests_t *public_key_digests)
static esp_err_t calculate_image_public_key_digests(bool verify_image_digest, bool digest_public_keys, esp_image_sig_public_key_digests_t *public_key_digests, esp_partition_pos_t *part_pos)
{
esp_image_metadata_t metadata;
const esp_partition_t* running_app_part = esp_ota_get_running_partition();
if (running_app_part == NULL) {
ESP_LOGE(TAG, "Cannot get running partition");
return ESP_FAIL;
}
const esp_partition_pos_t part_pos = {
.offset = running_app_part->address,
.size = running_app_part->size,
};
esp_err_t err = esp_image_get_metadata(&part_pos, &metadata);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Error reading metadata from running app (err=0x%x)", err);
esp_image_metadata_t img_metadata = {0};
esp_err_t ret = esp_image_get_metadata(part_pos, &img_metadata);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Error reading metadata from running app (err=0x%x)", ret);
return ESP_FAIL;
}
memset(public_key_digests, 0, sizeof(esp_image_sig_public_key_digests_t));
uint8_t image_digest[ESP_SECURE_BOOT_DIGEST_LEN] = {0};
uint8_t __attribute__((aligned(4))) key_digest[ESP_SECURE_BOOT_DIGEST_LEN] = {0};
size_t sig_block_addr = img_metadata.start_addr + ALIGN_UP(img_metadata.image_len, FLASH_SECTOR_SIZE);
// Generating the SHA of the public key components in the signature block
ESP_LOGD(TAG, "calculating public key digests for sig blocks of image offset 0x%"PRIu32" (sig block offset 0x%u)", img_metadata.start_addr, sig_block_addr);
// metadata.image_len doesn't include any padding to start of the signature sector, so pad it here
size_t sig_block_addr = metadata.start_addr + ALIGN_UP(metadata.image_len, FLASH_SECTOR_SIZE);
ESP_LOGD(TAG, "reading signatures for app address 0x%"PRIx32" sig block address 0x%x", part_pos.offset, sig_block_addr);
bzero(public_key_digests, sizeof(esp_image_sig_public_key_digests_t));
if (verify_image_digest) {
ret = bootloader_sha256_flash_contents(img_metadata.start_addr, sig_block_addr - img_metadata.start_addr, image_digest);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "error generating image digest, %d", ret);
return ret;
}
}
ESP_LOGD(TAG, "reading signature(s)");
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
ets_secure_boot_sig_block_t block;
size_t addr = sig_block_addr + sizeof(ets_secure_boot_sig_block_t) * i;
@ -84,20 +86,59 @@ esp_err_t esp_secure_boot_get_signature_blocks_for_running_app(bool digest_publi
#elif CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
bootloader_sha256_data(sig_block_sha, &block.ecdsa.key, sizeof(block.ecdsa.key));
#endif
bootloader_sha256_finish(sig_block_sha, public_key_digests->key_digests[i]);
bootloader_sha256_finish(sig_block_sha, key_digest);
if (verify_image_digest) {
// Check we can verify the image using this signature and this key
uint8_t temp_verified_digest[ESP_SECURE_BOOT_DIGEST_LEN];
#if CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME
bool verified = ets_rsa_pss_verify(&block.key, block.signature, image_digest, temp_verified_digest);
#elif CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
bool verified = ets_ecdsa_verify(&block.ecdsa.key.point[0], block.ecdsa.signature, block.ecdsa.key.curve_id, image_digest, temp_verified_digest);
#endif
if (!verified) {
ESP_LOGE(TAG, "Secure boot key (%d) verification failed.", i);
continue;
}
ESP_LOGD(TAG, "Signature block (%d) is verified", i);
}
/* Copy the key digest to the buffer provided by the caller */
memcpy((void *)public_key_digests->key_digests[public_key_digests->num_digests], key_digest, ESP_SECURE_BOOT_DIGEST_LEN);
}
public_key_digests->num_digests++;
}
} else {
ESP_LOGE(TAG, "Secure boot sign blocks cannot be read from a running app (err=0x%x)", err);
ESP_LOGE(TAG, "Secure boot sign blocks cannot be read from image at %lx (err=0x%x)", part_pos->offset, err);
return ESP_FAIL;
}
}
if (public_key_digests->num_digests > 0) {
return ESP_OK;
if (ret == ESP_OK && public_key_digests->num_digests > 0) {
ESP_LOGD(TAG, "Digests successfully calculated, %d valid signatures (image offset 0x%"PRIu32")",
public_key_digests->num_digests, img_metadata.start_addr);
}
ESP_LOGE(TAG, "No signatures were found for the running app");
return ESP_ERR_NOT_FOUND;
if (public_key_digests->num_digests == 0) {
return ESP_ERR_NOT_FOUND;
}
return ret;
}
esp_err_t esp_secure_boot_get_signature_blocks_for_running_app(bool digest_public_keys, esp_image_sig_public_key_digests_t *public_key_digests)
{
esp_partition_pos_t part_pos;
const esp_partition_t* running_app_part = esp_ota_get_running_partition();
if (running_app_part == NULL) {
ESP_LOGE(TAG, "Cannot get running partition");
return ESP_FAIL;
}
part_pos.offset = running_app_part->address;
part_pos.size = running_app_part->size;
esp_err_t err = calculate_image_public_key_digests(false, digest_public_keys, public_key_digests, &part_pos);
if (public_key_digests->num_digests == 0) {
ESP_LOGE(TAG, "No signatures were found for the running app");
}
return err;
}
static esp_err_t get_secure_boot_key_digests(esp_image_sig_public_key_digests_t *public_key_digests)
@ -236,3 +277,33 @@ esp_err_t esp_secure_boot_verify_rsa_signature_block(const ets_secure_boot_signa
#endif
#endif // CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME || CONFIG_SECURE_SIGNED_APPS_ECDSA_V2_SCHEME || CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
#if SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED
esp_err_t esp_secure_boot_verify_with_efuse_digest_index(int efuse_digest_index, esp_partition_pos_t *part_pos)
{
if (!part_pos || (efuse_digest_index < 0 || efuse_digest_index >= SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS)) {
return ESP_ERR_INVALID_ARG;
}
esp_image_sig_public_key_digests_t img_key_digests = {0};
esp_err_t ret = calculate_image_public_key_digests(true, true, &img_key_digests, part_pos);
if (ret != ESP_OK) {
return ESP_FAIL;
}
if (esp_efuse_get_digest_revoke(efuse_digest_index)) {
return ESP_FAIL;
}
// Read key digests from efuse
esp_secure_boot_key_digests_t efuse_key_digests;
memset(&efuse_key_digests, 0, sizeof(esp_secure_boot_key_digests_t));
esp_secure_boot_read_key_digests(&efuse_key_digests);
for (int i = 0; i < img_key_digests.num_digests; i++) {
if (!memcmp(img_key_digests.key_digests[i], efuse_key_digests.key_digests[efuse_digest_index], ESP_SECURE_BOOT_KEY_DIGEST_LEN)) {
return ESP_OK;
}
}
return ESP_FAIL;
}
#endif // SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY && CONFIG_SECURE_BOOT_V2_ENABLED

View File

@ -4,8 +4,7 @@ cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers")
list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults")
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults")
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
set(COMPONENTS main)

View File

@ -4,8 +4,7 @@ cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers")
list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults")
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults")
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
set(COMPONENTS main)

View File

@ -9,6 +9,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
def test_rtc_reserved_memory(dut: Dut) -> None:

View File

@ -2,36 +2,36 @@ if(CONFIG_BT_ENABLED)
set(srcs "")
set(include_dirs "")
set(ldfragments "linker.lf")
if(CONFIG_BT_CONTROLLER_ENABLED)
if(CONFIG_IDF_TARGET_ESP32)
list(APPEND srcs "controller/esp32/bt.c"
"controller/esp32/hli_api.c"
"controller/esp32/hli_vectors.S")
list(APPEND include_dirs include/esp32/include)
if(CONFIG_IDF_TARGET_ESP32)
list(APPEND srcs "controller/esp32/bt.c"
"controller/esp32/hli_api.c"
"controller/esp32/hli_vectors.S")
list(APPEND include_dirs include/esp32/include)
elseif(CONFIG_IDF_TARGET_ESP32C3)
list(APPEND srcs "controller/esp32c3/bt.c")
list(APPEND include_dirs include/esp32c3/include)
elseif(CONFIG_IDF_TARGET_ESP32C3)
list(APPEND srcs "controller/esp32c3/bt.c")
list(APPEND include_dirs include/esp32c3/include)
elseif(CONFIG_IDF_TARGET_ESP32S3)
list(APPEND srcs "controller/esp32c3/bt.c")
list(APPEND include_dirs include/esp32c3/include)
elseif(CONFIG_IDF_TARGET_ESP32S3)
list(APPEND srcs "controller/esp32c3/bt.c")
list(APPEND include_dirs include/esp32c3/include)
elseif(CONFIG_IDF_TARGET_ESP32C2)
set(ldfragments "linker.lf.esp32c2")
list(APPEND srcs "controller/esp32c2/bt.c")
list(APPEND include_dirs include/esp32c2/include)
elseif(CONFIG_IDF_TARGET_ESP32H4)
list(APPEND srcs "controller/esp32h4/bt.c")
list(APPEND include_dirs include/esp32h4/include)
elseif(CONFIG_IDF_TARGET_ESP32C6)
list(APPEND srcs "controller/esp32c6/bt.c")
list(APPEND include_dirs include/esp32c6/include)
elseif(CONFIG_IDF_TARGET_ESP32C2)
list(APPEND srcs "controller/esp32c2/bt.c")
list(APPEND include_dirs include/esp32c2/include)
elseif(CONFIG_IDF_TARGET_ESP32H2)
list(APPEND srcs "controller/esp32h2/bt.c")
list(APPEND include_dirs include/esp32h2/include)
endif()
elseif(CONFIG_IDF_TARGET_ESP32C6)
list(APPEND srcs "controller/esp32c6/bt.c")
list(APPEND include_dirs include/esp32c6/include)
elseif(CONFIG_IDF_TARGET_ESP32H2)
list(APPEND srcs "controller/esp32h2/bt.c")
list(APPEND include_dirs include/esp32h2/include)
endif()
@ -485,6 +485,11 @@ if(CONFIG_BT_ENABLED)
"porting/nimble/src/os_msys_init.c"
)
if(CONFIG_BT_CONTROLLER_DISABLED)
list(APPEND srcs
"host/nimble/nimble/porting/nimble/src/hal_uart.c"
)
endif()
list(APPEND include_dirs
porting/include
porting/nimble/include
@ -526,16 +531,22 @@ if(CONFIG_BT_ENABLED)
list(APPEND include_dirs
host/nimble/nimble/nimble/host/include
host/nimble/nimble/nimble/include
host/nimble/nimble/nimble/host/services/ans/include
host/nimble/nimble/nimble/host/services/bas/include
host/nimble/nimble/nimble/host/services/dis/include
host/nimble/nimble/nimble/host/services/gap/include
host/nimble/nimble/nimble/host/services/gatt/include
host/nimble/nimble/nimble/host/services/hr/include
host/nimble/nimble/nimble/host/services/htp/include
host/nimble/nimble/nimble/host/services/ias/include
host/nimble/nimble/nimble/host/services/ipss/include
host/nimble/nimble/nimble/host/services/lls/include
host/nimble/nimble/nimble/host/services/prox/include
host/nimble/nimble/nimble/host/services/cts/include
host/nimble/nimble/nimble/host/services/tps/include
host/nimble/nimble/nimble/host/services/hid/include
host/nimble/nimble/nimble/host/services/sps/include
host/nimble/nimble/nimble/host/util/include
host/nimble/nimble/nimble/host/store/ram/include
host/nimble/nimble/nimble/host/store/config/include
@ -549,10 +560,15 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/services/ipss/src/ble_svc_ipss.c"
"host/nimble/nimble/nimble/host/services/ans/src/ble_svc_ans.c"
"host/nimble/nimble/nimble/host/services/hr/src/ble_svc_hr.c"
"host/nimble/nimble/nimble/host/services/htp/src/ble_svc_htp.c"
"host/nimble/nimble/nimble/host/services/gap/src/ble_svc_gap.c"
"host/nimble/nimble/nimble/host/services/bas/src/ble_svc_bas.c"
"host/nimble/nimble/nimble/host/services/dis/src/ble_svc_dis.c"
"host/nimble/nimble/nimble/host/services/lls/src/ble_svc_lls.c"
"host/nimble/nimble/nimble/host/services/prox/src/ble_svc_prox.c"
"host/nimble/nimble/nimble/host/services/cts/src/ble_svc_cts.c"
"host/nimble/nimble/nimble/host/services/hid/src/ble_svc_hid.c"
"host/nimble/nimble/nimble/host/services/sps/src/ble_svc_sps.c"
"host/nimble/nimble/nimble/host/src/ble_hs_conn.c"
"host/nimble/nimble/nimble/host/src/ble_store_util.c"
"host/nimble/nimble/nimble/host/src/ble_sm.c"
@ -571,6 +587,8 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/src/ble_hs_mqueue.c"
"host/nimble/nimble/nimble/host/src/ble_hs_periodic_sync.c"
"host/nimble/nimble/nimble/host/src/ble_att.c"
"host/nimble/nimble/nimble/host/src/ble_ead.c"
"host/nimble/nimble/nimble/host/src/ble_aes_ccm.c"
"host/nimble/nimble/nimble/host/src/ble_gattc.c"
"host/nimble/nimble/nimble/host/src/ble_store.c"
"host/nimble/nimble/nimble/host/src/ble_sm_lgcy.c"
@ -599,11 +617,21 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/store/ram/src/ble_store_ram.c"
"host/nimble/nimble/nimble/host/store/config/src/ble_store_config.c"
"host/nimble/nimble/nimble/host/store/config/src/ble_store_nvs.c"
"host/nimble/nimble/nimble/host/src/ble_gattc_cache.c"
"host/nimble/nimble/nimble/host/src/ble_gattc_cache_conn.c"
)
if(CONFIG_BT_CONTROLLER_DISABLED AND CONFIG_BT_NIMBLE_TRANSPORT_UART)
list(APPEND srcs
"host/nimble/nimble/nimble/transport/uart_ll/src/hci_uart.c"
"host/nimble/nimble/nimble/transport/common/hci_h4/src/hci_h4.c"
)
endif()
list(APPEND srcs
"host/nimble/nimble/porting/nimble/src/nimble_port.c"
"host/nimble/nimble/porting/npl/freertos/src/nimble_port_freertos.c"
"host/nimble/port/src/nvs_port.c"
)
list(APPEND include_dirs
porting/include
@ -612,6 +640,12 @@ if(CONFIG_BT_ENABLED)
host/nimble/nimble/nimble/transport/include
)
if(CONFIG_BT_CONTROLLER_DISABLED)
list(APPEND include_dirs
host/nimble/nimble/nimble/transport/common/hci_h4/include
)
endif()
if(NOT CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT)
list(APPEND srcs
"host/nimble/nimble/porting/nimble/src/endian.c"
@ -621,6 +655,13 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/porting/nimble/src/os_msys_init.c"
"host/nimble/nimble/porting/npl/freertos/src/npl_os_freertos.c"
)
if(CONFIG_BT_CONTROLLER_DISABLED AND CONFIG_BT_NIMBLE_TRANSPORT_UART)
list(APPEND srcs
"host/nimble/nimble/porting/nimble/src/hal_uart.c"
)
endif()
list(APPEND include_dirs
host/nimble/nimble/porting/npl/freertos/include
host/nimble/nimble/porting/nimble/include
@ -628,7 +669,7 @@ if(CONFIG_BT_ENABLED)
)
endif()
if(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE)
if(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE AND CONFIG_BT_CONTROLLER_ENABLED)
list(APPEND srcs
"host/nimble/esp-hci/src/esp_nimble_hci.c"
)
@ -693,13 +734,12 @@ if(CONFIG_BT_ENABLED)
endif()
# requirements can't depend on config
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
REQUIRES esp_timer esp_wifi
PRIV_REQUIRES nvs_flash soc esp_pm esp_phy esp_coex mbedtls driver vfs
LDFRAGMENTS "linker.lf")
INCLUDE_DIRS "${include_dirs}"
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
REQUIRES esp_timer esp_wifi
PRIV_REQUIRES nvs_flash soc esp_pm esp_phy esp_coex mbedtls driver vfs
LDFRAGMENTS "${ldfragments}")
if(CONFIG_BT_ENABLED)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-implicit-fallthrough -Wno-unused-const-variable)
@ -716,22 +756,13 @@ if(CONFIG_BT_ENABLED)
target_link_directories(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32s3")
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
elseif(CONFIG_IDF_TARGET_ESP32H4)
if(CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_1)
# TODO: rename esp32h2 to esp32h4 [BT-2875]
add_prebuilt_library(libble_app "controller/lib_esp32h2/esp32h2-bt-lib/beta1/libble_app.a")
elseif(CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2)
# TODO: rename esp32h2 to esp32h4 [BT-2875]
add_prebuilt_library(libble_app "controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a")
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)
elseif(CONFIG_IDF_TARGET_ESP32C2)
elseif(CONFIG_IDF_TARGET_ESP32C2 AND CONFIG_BT_CONTROLLER_ENABLED)
add_prebuilt_library(libble_app "controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a")
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)
elseif(CONFIG_IDF_TARGET_ESP32C6)
elseif(CONFIG_IDF_TARGET_ESP32C6 AND CONFIG_BT_CONTROLLER_ENABLED)
add_prebuilt_library(libble_app "controller/lib_esp32c6/esp32c6-bt-lib/libble_app.a")
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)
elseif(CONFIG_IDF_TARGET_ESP32H2)
elseif(CONFIG_IDF_TARGET_ESP32H2 AND CONFIG_BT_CONTROLLER_ENABLED)
add_prebuilt_library(libble_app "controller/lib_esp32h2/esp32h2-bt-lib/libble_app.a")
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)
endif()

View File

@ -1,9 +1,8 @@
menu "Bluetooth"
visible if SOC_BT_SUPPORTED
config BT_ENABLED
bool "Bluetooth"
depends on SOC_BT_SUPPORTED && !APP_NO_BLOBS
depends on !APP_NO_BLOBS
help
Select this option to enable Bluetooth and show the submenu with Bluetooth configuration choices.
@ -15,6 +14,7 @@ menu "Bluetooth"
This helps to choose Bluetooth host stack
config BT_BLUEDROID_ENABLED
depends on BT_CONTROLLER_ENABLED
bool "Bluedroid - Dual-mode"
help
This option is recommended for classic Bluetooth or for dual-mode
@ -26,6 +26,7 @@ menu "Bluetooth"
This option is recommended for BLE only usecases to save on memory
config BT_CONTROLLER_ONLY
depends on SOC_BT_SUPPORTED
bool "Disabled"
help
This option is recommended when you want to communicate directly with the
@ -42,6 +43,7 @@ menu "Bluetooth"
This helps to choose Bluetooth controller stack
config BT_CONTROLLER_ENABLED
depends on SOC_BT_SUPPORTED
bool "Enabled"
help
This option is recommended for Bluetooth controller usecases
@ -68,6 +70,17 @@ menu "Bluetooth"
source "$IDF_PATH/components/bt/controller/$IDF_TARGET/Kconfig.in"
endmenu
config BT_RELEASE_IRAM
depends on BT_ENABLED && BT_LE_RELEASE_IRAM_SUPPORTED
bool "Release Bluetooth text (READ DOCS FIRST)"
default n
help
This option release Bluetooth text section and merge Bluetooth data, bss & text into
a large free heap region when esp_bt_mem_release is called, total saving ~21kB or more of IRAM.
ESP32-C2 only 3 configurable PMP entries available, rest of them are hard-coded.
We cannot split the memory into 3 different regions (IRAM, BLE-IRAM, DRAM).
So this option will disable the PMP (ESP_SYSTEM_PMP_IDRAM_SPLIT)
endmenu
menuconfig BLE_MESH

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -335,6 +335,13 @@ static void btc_deinit_mem(void) {
#endif
#endif
#if BTC_HF_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if (hf_local_param_ptr) {
osi_free(hf_local_param_ptr);
hf_local_param_ptr = NULL;
}
#endif
#if BTC_HF_CLIENT_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if (hf_client_local_param_ptr) {
osi_free(hf_client_local_param_ptr);
@ -390,6 +397,13 @@ static bt_status_t btc_init_mem(void) {
#endif
#endif
#if BTC_HF_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if ((hf_local_param_ptr = (hf_local_param_t *)osi_malloc(BTC_HF_NUM_CB * sizeof(hf_local_param_t))) == NULL) {
goto error_exit;
}
memset((void *)hf_local_param_ptr, 0, BTC_HF_NUM_CB * sizeof(hf_local_param_t));
#endif
#if BTC_HF_CLIENT_INCLUDED == TRUE && HFP_DYNAMIC_MEMORY == TRUE
if ((hf_client_local_param_ptr = (hf_client_local_param_t *)osi_malloc(sizeof(hf_client_local_param_t))) == NULL) {
goto error_exit;

View File

@ -366,7 +366,7 @@ void btc_blufi_send_wifi_list(uint16_t apCount, esp_blufi_ap_record_t *list)
int data_len;
uint8_t *p;
// malloc size: (len + RSSI + ssid buffer) * apCount;
uint malloc_size = (1 + 1 + sizeof(list->ssid)) * apCount;
uint32_t malloc_size = (1 + 1 + sizeof(list->ssid)) * apCount;
p = data = osi_malloc(malloc_size);
if (data == NULL) {
BTC_TRACE_ERROR("malloc error\n");
@ -375,7 +375,7 @@ void btc_blufi_send_wifi_list(uint16_t apCount, esp_blufi_ap_record_t *list)
type = BLUFI_BUILD_TYPE(BLUFI_TYPE_DATA, BLUFI_TYPE_DATA_SUBTYPE_WIFI_LIST);
for (int i = 0; i < apCount; ++i)
{
uint len = strlen((const char *)list[i].ssid);
uint32_t len = strlen((const char *)list[i].ssid);
data_len = (p - data);
//current_len + ssid + rssi + total_len_value
if((data_len + len + 1 + 1) > malloc_size) {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -9,6 +9,11 @@
#include "btc/btc_task.h"
#include "esp_blufi_api.h"
#ifdef __cplusplus
extern "C" {
#endif
#if (BLUFI_INCLUDED == TRUE)
#define BTC_BLUFI_GREAT_VER 0x01 //Version + Subversion
@ -193,5 +198,10 @@ void btc_blufi_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
void btc_blufi_cb_deep_free(btc_msg_t *msg);
#endif /* __BLUFI_INT_H__ */
#endif ///BLUFI_INCLUDED == TRUE
#endif ///BLUFI_INCLUDED == TRUE
#ifdef __cplusplus
}
#endif
#endif /* __BLUFI_INT_H__ */

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -20,6 +20,10 @@
#include "esp_gap_ble_api.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define BLUFI_APP_UUID 0xFFFF
#define BLUFI_DEVICE_NAME "BLUFI_DEVICE"
@ -96,4 +100,7 @@ void esp_blufi_send_encap(void *arg);
int esp_blufi_handle_gap_events(struct ble_gap_event *event, void *arg);
#endif
#ifdef __cplusplus
}
#endif
#endif/* _ESP_BLUFI_ */

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -21,6 +21,11 @@
#define ESP_BLUFI_SUCCESS 0x00
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define BT_BD_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x"
#define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
@ -100,4 +105,7 @@ void btc_blufi_call_deep_free(btc_msg_t *msg);
uint16_t btc_blufi_get_version(void);
#ifdef __cplusplus
}
#endif
#endif /* __BTC_BLUFI_PRF_H__ */

View File

@ -254,6 +254,32 @@ bool config_remove_section(config_t *config, const char *section)
return list_remove(config->sections, sec);
}
bool config_update_newest_section(config_t *config, const char *section)
{
assert(config != NULL);
assert(section != NULL);
list_node_t *first_node = list_begin(config->sections);
if (first_node == NULL) {
return false;
}
section_t *first_sec = list_node(first_node);
if (strcmp(first_sec->name, section) == 0) {
return true;
}
for (const list_node_t *node = list_begin(config->sections); node != list_end(config->sections); node = list_next(node)) {
section_t *sec = list_node(node);
if (strcmp(sec->name, section) == 0) {
list_delete(config->sections, sec);
list_prepend(config->sections, sec);
return true;
}
}
return false;
}
bool config_remove_key(config_t *config, const char *section, const char *key)
{
assert(config != NULL);

View File

@ -99,6 +99,11 @@ void config_set_string(config_t *config, const char *section, const char *key, c
// Neither |config| nor |section| may be NULL.
bool config_remove_section(config_t *config, const char *section);
// Updates |section| to be the first section in |config|. Return true if |section| is in
// |config| and updated successfully, false otherwise.
// Neither |config| nor |section| may be NULL.
bool config_update_newest_section(config_t *config, const char *section);
// Removes one specific |key| residing in |section| of the |config|. Returns true
// if the section and key were found and the key was removed, false otherwise.
// None of |config|, |section|, or |key| may be NULL.

View File

@ -205,6 +205,11 @@ menu "HCI UART(H4) Options"
help
UART Baudrate for HCI. Please use standard baudrate.
config BTDM_CTRL_HCI_UART_FLOW_CTRL_EN
bool "Enable UART flow control"
depends on BTDM_CTRL_HCI_MODE_UART_H4
default y
endmenu
menu "MODEM SLEEP Options"
@ -351,7 +356,7 @@ config BTDM_SCAN_DUPL_CACHE_SIZE
default 100
help
Maximum number of devices which can be recorded in scan duplicate filter.
When the maximum amount of device in the filter is reached, the cache will be refreshed.
When the maximum amount of device in the filter is reached, the oldest device will be refreshed.
config BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD
int "Duplicate scan list refresh period (seconds)"

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -35,7 +35,7 @@
#include "soc/rtc.h"
#include "soc/soc_memory_layout.h"
#include "soc/dport_reg.h"
#include "esp_coexist_internal.h"
#include "private/esp_coexist_internal.h"
#include "esp_timer.h"
#if !CONFIG_FREERTOS_UNICORE
#include "esp_ipc.h"
@ -89,7 +89,7 @@ do{\
} while(0)
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
#define OSI_VERSION 0x00010004
#define OSI_VERSION 0x00010005
#define OSI_MAGIC_VALUE 0xFADEBEAD
/* Types definition
@ -111,7 +111,6 @@ typedef struct {
typedef struct {
void *handle;
void *storage;
} btdm_queue_item_t;
/* OSI function */
@ -177,6 +176,7 @@ struct osi_funcs_t {
void (*_interrupt_l3_restore)(void);
void *(* _customer_queue_create)(uint32_t queue_len, uint32_t item_size);
int (* _coex_version_get)(unsigned int *major, unsigned int *minor, unsigned int *patch);
void (* _patch_apply)(void);
uint32_t _magic;
};
@ -221,6 +221,8 @@ extern void bredr_sco_datapath_set(uint8_t data_path);
extern void btdm_controller_scan_duplicate_list_clear(void);
/* Shutdown */
extern void esp_bt_controller_shutdown(void);
extern void sdk_config_set_bt_pll_track_enable(bool enable);
extern void sdk_config_set_uart_flow_ctrl_enable(bool enable);
extern char _bss_start_btdm;
extern char _bss_end_btdm;
@ -242,6 +244,10 @@ extern uint32_t _nimble_data_end;
extern uint32_t _btdm_data_start;
extern uint32_t _btdm_data_end;
extern void config_bt_funcs_reset(void);
extern void config_ble_funcs_reset(void);
extern void config_btdm_funcs_reset(void);
/* Local Function Declare
*********************************************************************
*/
@ -314,6 +320,7 @@ static void *customer_queue_create_hlevel_wrapper(uint32_t queue_len, uint32_t i
static void interrupt_l3_disable(void);
static void interrupt_l3_restore(void);
static void bt_controller_deinit_internal(void);
static void patch_apply(void);
/* Local variable definition
***************************************************************************
@ -401,6 +408,7 @@ static const struct osi_funcs_t osi_funcs_ro = {
._customer_queue_create = NULL,
#endif /* CONFIG_BTDM_CTRL_HLI */
._coex_version_get = coex_version_get_wrapper,
._patch_apply = patch_apply,
._magic = OSI_MAGIC_VALUE,
};
@ -555,17 +563,8 @@ static void *semphr_create_wrapper(uint32_t max, uint32_t init)
void *handle = NULL;
#if !CONFIG_SPIRAM_USE_MALLOC
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
handle = (void *)xSemaphoreCreateCounting(max, init);
#else
StaticQueue_t *queue_buffer = NULL;
queue_buffer = heap_caps_malloc(sizeof(StaticQueue_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue_buffer);
semphr->storage = queue_buffer;
handle = (void *)xSemaphoreCreateCountingStatic(max, init, queue_buffer);
#endif
assert(handle);
#if CONFIG_BTDM_CTRL_HLI
@ -601,11 +600,6 @@ static void semphr_delete_wrapper(void *semphr)
if (handle) {
vSemaphoreDelete(handle);
}
#ifdef CONFIG_SPIRAM_USE_MALLOC
if (semphr_item->storage) {
free(semphr_item->storage);
}
#endif
free(semphr);
}
@ -691,18 +685,9 @@ static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size)
queue = (btdm_queue_item_t*)heap_caps_malloc(sizeof(btdm_queue_item_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue);
#if CONFIG_SPIRAM_USE_MALLOC
queue->storage = heap_caps_calloc(1, sizeof(StaticQueue_t) + (queue_len*item_size), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue->storage);
queue->handle = xQueueCreateStatic( queue_len, item_size, ((uint8_t*)(queue->storage)) + sizeof(StaticQueue_t), (StaticQueue_t*)(queue->storage));
assert(queue->handle);
#else
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
queue->handle = xQueueCreate( queue_len, item_size);
assert(queue->handle);
#endif
return queue;
}
@ -714,13 +699,6 @@ static void queue_delete_wrapper(void *queue)
if(queue_item->handle){
vQueueDelete(queue_item->handle);
}
#if CONFIG_SPIRAM_USE_MALLOC
if (queue_item->storage) {
free(queue_item->storage);
}
#endif
free(queue_item);
}
}
@ -895,7 +873,11 @@ static void *malloc_internal_wrapper(size_t size)
static int32_t IRAM_ATTR read_mac_wrapper(uint8_t mac[6])
{
return esp_read_mac(mac, ESP_MAC_BT);
int ret = esp_read_mac(mac, ESP_MAC_BT);
ESP_LOGI(BTDM_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
return ret;
}
static void IRAM_ATTR srand_wrapper(unsigned int seed)
@ -964,7 +946,7 @@ static void btdm_sleep_enter_phase1_wrapper(uint32_t lpcycles)
static void btdm_sleep_enter_phase2_wrapper(void)
{
if (btdm_controller_get_sleep_mode() == BTDM_MODEM_SLEEP_MODE_ORIG) {
esp_phy_disable();
esp_phy_disable(PHY_MODEM_BT);
#ifdef CONFIG_PM_ENABLE
if (s_pm_lock_acquired) {
esp_pm_lock_release(s_pm_lock);
@ -972,7 +954,7 @@ static void btdm_sleep_enter_phase2_wrapper(void)
}
#endif
} else if (btdm_controller_get_sleep_mode() == BTDM_MODEM_SLEEP_MODE_EVED) {
esp_phy_disable();
esp_phy_disable(PHY_MODEM_BT);
// pause bluetooth baseband
periph_module_disable(PERIPH_BT_BASEBAND_MODULE);
}
@ -988,7 +970,7 @@ static void btdm_sleep_exit_phase3_wrapper(void)
#endif
if (btdm_controller_get_sleep_mode() == BTDM_MODEM_SLEEP_MODE_ORIG) {
esp_phy_enable();
esp_phy_enable(PHY_MODEM_BT);
btdm_check_and_init_bb();
#ifdef CONFIG_PM_ENABLE
esp_timer_stop(s_btdm_slp_tmr);
@ -996,7 +978,7 @@ static void btdm_sleep_exit_phase3_wrapper(void)
} else if (btdm_controller_get_sleep_mode() == BTDM_MODEM_SLEEP_MODE_EVED) {
// resume bluetooth baseband
periph_module_enable(PERIPH_BT_BASEBAND_MODULE);
esp_phy_enable();
esp_phy_enable(PHY_MODEM_BT);
}
}
@ -1222,23 +1204,12 @@ static int coex_register_wifi_channel_change_callback_wrapper(void *cb)
static int coex_version_get_wrapper(unsigned int *major, unsigned int *minor, unsigned int *patch)
{
#if CONFIG_SW_COEXIST_ENABLE
const char *ver_str = esp_coex_version_get();
if (ver_str != NULL) {
unsigned int _major = 0, _minor = 0, _patch = 0;
if (sscanf(ver_str, "%u.%u.%u", &_major, &_minor, &_patch) != 3) {
return -1;
}
if (major != NULL) {
*major = _major;
}
if (minor != NULL) {
*minor = _minor;
}
if (patch != NULL) {
*patch = _patch;
}
return 0;
}
coex_version_t version;
ESP_ERROR_CHECK(coex_version_get_value(&version));
*major = (unsigned int)version.major;
*minor = (unsigned int)version.minor;
*patch = (unsigned int)version.patch;
return 0;
#endif
return -1;
}
@ -1553,6 +1524,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
btdm_controller_set_sleep_mode(BTDM_MODEM_SLEEP_MODE_NONE);
#endif
#if CONFIG_BTDM_CTRL_HCI_UART_FLOW_CTRL_EN
sdk_config_set_uart_flow_ctrl_enable(true);
#else
sdk_config_set_uart_flow_ctrl_enable(false);
#endif
#ifdef CONFIG_PM_ENABLE
if (!s_btdm_allow_light_sleep) {
if ((err = esp_pm_lock_create(ESP_PM_NO_LIGHT_SLEEP, 0, "btLS", &s_light_sleep_pm_lock)) != ESP_OK) {
@ -1668,11 +1645,23 @@ static void bt_shutdown(void)
#else
bt_controller_shutdown(NULL);
#endif
esp_phy_disable();
esp_phy_disable(PHY_MODEM_BT);
return;
}
static void patch_apply(void)
{
config_btdm_funcs_reset();
#ifndef CONFIG_BTDM_CTRL_MODE_BLE_ONLY
config_bt_funcs_reset();
#endif
#ifndef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY
config_ble_funcs_reset();
#endif
}
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
{
@ -1694,7 +1683,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
esp_pm_lock_acquire(s_pm_lock);
#endif
esp_phy_enable();
esp_phy_enable(PHY_MODEM_BT);
#if CONFIG_SW_COEXIST_ENABLE
coex_enable();
@ -1704,6 +1693,8 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
btdm_controller_enable_sleep(true);
}
sdk_config_set_bt_pll_track_enable(true);
// inititalize bluetooth baseband
btdm_check_and_init_bb();
@ -1712,7 +1703,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
esp_phy_disable();
esp_phy_disable(PHY_MODEM_BT);
#ifdef CONFIG_PM_ENABLE
if (!s_btdm_allow_light_sleep) {
esp_pm_lock_release(s_light_sleep_pm_lock);
@ -1752,7 +1743,7 @@ esp_err_t esp_bt_controller_disable(void)
coex_disable();
#endif
esp_phy_disable();
esp_phy_disable(PHY_MODEM_BT);
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
esp_unregister_shutdown_handler(bt_shutdown);

View File

@ -147,7 +147,7 @@ if BT_LE_EXT_ADV
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transer Sync Events"
bool "Enable Transfer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
default y
help
@ -253,6 +253,54 @@ config BT_LE_CONTROLLER_TASK_STACK_SIZE
help
This configures stack size of NimBLE controller task
menuconfig BT_LE_CONTROLLER_LOG_ENABLED
bool "Controller log enable"
default n
help
Enable controller log
config BT_LE_CONTROLLER_LOG_CTRL_ENABLED
bool "enable controller log module"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Enable controller log module
config BT_LE_CONTROLLER_LOG_HCI_ENABLED
bool "enable HCI log module"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Enable hci log module
config BT_LE_CONTROLLER_LOG_DUMP_ONLY
bool "Controller log dump mode only"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Only operate in dump mode
config BT_LE_LOG_CTRL_BUF1_SIZE
int "size of the first BLE controller LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 4096
help
Configure the size of the first BLE controller LOG buffer.
config BT_LE_LOG_CTRL_BUF2_SIZE
int "size of the second BLE controller LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 1024
help
Configure the size of the second BLE controller LOG buffer.
config BT_LE_LOG_HCI_BUF_SIZE
int "size of the BLE HCI LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 4096
help
Configure the size of the BLE HCI LOG buffer.
config BT_LE_LL_RESOLV_LIST_SIZE
int "BLE LL Resolving list size"
range 1 5
@ -345,7 +393,7 @@ config BT_LE_MAX_CONNECTIONS
choice BT_LE_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on !BT_NIMBLE_ENABLED
depends on ESP_COEX_SW_COEXIST_ENABLE
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
@ -363,7 +411,7 @@ endchoice
config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
depends on !BT_NIMBLE_ENABLED
default 0 if !ESP_COEX_SW_COEXIST_ENABLE
default 1 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
@ -373,19 +421,24 @@ config BT_LE_SLEEP_ENABLE
help
Enable BLE sleep
choice BT_LE_WAKEUP_SOURCE
prompt "BLE light sleep wakeup source"
depends on BT_LE_SLEEP_ENABLE
default BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
config BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
bool "Use ESP timer to wakeup CPU"
choice BT_LE_LP_CLK_SRC
prompt "BLE low power clock source"
default BT_LE_LP_CLK_SRC_MAIN_XTAL
config BT_LE_LP_CLK_SRC_MAIN_XTAL
bool "Use main XTAL as RTC clock source"
help
Use esp timer to wakeup CPU
User main XTAL as RTC clock source.
This option is recommended if external 32.768k XTAL is not available.
Using the external 32.768 kHz XTAL will have lower current consumption
in light sleep compared to using the main XTAL.
config BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
bool "Use BLE rtc timer to wakeup CPU"
config BT_LE_LP_CLK_SRC_DEFAULT
bool "Use system RTC slow clock source"
help
Use BLE rtc timer to wakeup CPU
Use the same slow clock source as system RTC
Using any clock source other than external 32.768 kHz XTAL at pin0 supports only
legacy ADV and SCAN due to low clock accuracy.
endchoice
config BT_LE_USE_ESP_TIMER
@ -394,3 +447,53 @@ config BT_LE_USE_ESP_TIMER
default y
help
Set this option to use Esp Timer which has higher priority timer instead of FreeRTOS timer
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
default y
help
The function is mainly used to enable flow control for advertising reports. When it is enabled,
advertising reports will be discarded by the controller if the number of unprocessed advertising
reports exceeds the size of BLE adv report flow control.
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM
int "BLE adv report flow control number"
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
range 50 1000
default 100
help
The number of unprocessed advertising report that bluetooth host can save.If you set
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a small value, this may cause adv packets lost.
If you set `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a large value, bluetooth host may cache a
lot of adv packets and this may cause system memory run out. For example, if you set
it to 50, the maximum memory consumed by host is 35 * 50 bytes. Please set
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` according to your system free memory and handle adv
packets as fast as possible, otherwise it will cause adv packets lost.
config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
int "BLE adv lost event threshold value"
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
range 1 1000
default 20
help
When adv report flow control is enabled, The ADV lost event will be generated when the number
of ADV packets lost in the controller reaches this threshold. It is better to set a larger value.
If you set `BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
may cause adv packets lost more.
config BT_LE_RELEASE_IRAM_SUPPORTED
bool
default y
config BT_LE_TX_CCA_ENABLED
bool "Enable TX CCA feature"
default n
help
Enable CCA feature to cancel sending the packet if the signal power is stronger than CCA threshold.
config BT_LE_CCA_RSSI_THRESH
int "CCA RSSI threshold value"
depends on BT_LE_TX_CCA_ENABLED
range 20 100
default 20
help
Power threshold of CCA in unit of -1 dBm.

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -24,7 +24,7 @@
#endif
#if CONFIG_SW_COEXIST_ENABLE
#include "esp_coexist_internal.h"
#include "private/esp_coexist_internal.h"
#endif
#include "nimble/nimble_npl_os.h"
@ -46,14 +46,22 @@
#include "hci/hci_hal.h"
#endif
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#include "esp_private/sleep_modem.h"
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "esp_sleep.h"
#include "soc/syscon_reg.h"
#include "soc/dport_access.h"
#include "hal/efuse_ll.h"
#include "soc/rtc.h"
/* Macro definition
************************************************************************
*/
@ -70,12 +78,16 @@
#ifdef CONFIG_BT_BLUEDROID_ENABLED
/* ACL_DATA_MBUF_LEADINGSPCAE: The leadingspace in user info header for ACL data */
#define ACL_DATA_MBUF_LEADINGSPCAE 4
#endif
#endif // CONFIG_BT_BLUEDROID_ENABLED
typedef enum ble_rtc_slow_clk_src {
BT_SLOW_CLK_SRC_MAIN_XTAL,
BT_SLOW_CLK_SRC_32K_XTAL_ON_PIN0,
} ble_rtc_slow_clk_src_t;
/* Types definition
************************************************************************
*/
struct osi_coex_funcs_t {
uint32_t _magic;
uint32_t _version;
@ -108,13 +120,21 @@ struct ext_funcs_t {
uint32_t magic;
};
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* External functions or variables
************************************************************************
*/
extern int ble_osi_coex_funcs_register(struct osi_coex_funcs_t *coex_funcs);
extern int ble_controller_init(esp_bt_controller_config_t *cfg);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int ble_log_init_async(interface_func_t bt_controller_log_interface, bool task_create, uint8_t buffers, uint32_t *bufs_size);
extern int ble_log_deinit_async(void);
extern void ble_log_async_output_dump_all(bool output);
extern void esp_panic_handler_reconfigure_wdts(uint32_t timeout_ms);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int ble_controller_deinit(void);
extern int ble_controller_enable(uint8_t mode);
extern int ble_controller_disable(void);
@ -130,6 +150,9 @@ extern uint32_t r_os_cputime_get32(void);
extern uint32_t r_os_cputime_ticks_to_usecs(uint32_t ticks);
extern void r_ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg, void *w_arg, uint32_t us_to_enabled);
extern void r_ble_rtc_wake_up_state_clr(void);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
extern void esp_ble_set_wakeup_overhead(uint32_t overhead);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
extern int os_msys_init(void);
extern void os_msys_buf_free(void);
extern int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x,
@ -139,14 +162,16 @@ extern int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv);
extern int ble_txpwr_set(esp_ble_enhanced_power_type_t power_type, uint16_t handle, int power_level);
extern int ble_txpwr_get(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
extern int ble_get_npl_element_info(esp_bt_controller_config_t *cfg, ble_npl_count_info_t * npl_info);
extern uint32_t _bt_bss_start;
extern void bt_track_pll_cap(void);
extern char *ble_controller_get_compile_version(void);
extern const char *r_ble_controller_get_rom_compile_version(void);
#if CONFIG_BT_RELEASE_IRAM
extern uint32_t _iram_bt_text_start;
extern uint32_t _bss_bt_end;
#else
extern uint32_t _bt_bss_end;
extern uint32_t _nimble_bss_start;
extern uint32_t _nimble_bss_end;
extern uint32_t _nimble_data_start;
extern uint32_t _nimble_data_end;
extern uint32_t _bt_data_start;
extern uint32_t _bt_data_end;
extern uint32_t _bt_controller_data_start;
#endif
/* Local Function Declaration
*********************************************************************
@ -164,36 +189,37 @@ static int hci_uart_config_wrapper(int uart_no, int32_t speed, uint8_t databits,
static int hci_uart_close_wrapper(int uart_no);
static void hci_uart_blocking_tx_wrapper(int port, uint8_t data);
static int hci_uart_init_wrapper(int uart_no, void *cfg);
#endif
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler, void *arg, void **ret_handle_in);
#endif // CONFIG_BT_LE_HCI_INTERFACE_USE_UART
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler,
void *arg, void **ret_handle_in);
static int esp_intr_free_wrapper(void **ret_handle);
static void osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2);
static uint32_t osi_random_wrapper(void);
static void esp_reset_rpa_moudle(void);
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv);
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* Local variable definition
***************************************************************************
*/
/* Static variable declare */
static DRAM_ATTR esp_bt_controller_status_t ble_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
const static uint32_t log_bufs_size[] = {CONFIG_BT_LE_LOG_CTRL_BUF1_SIZE, CONFIG_BT_LE_LOG_HCI_BUF_SIZE, CONFIG_BT_LE_LOG_CTRL_BUF2_SIZE};
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* This variable tells if BLE is running */
static bool s_ble_active = false;
#ifdef CONFIG_PM_ENABLE
static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#define BTDM_MIN_TIMER_UNCERTAINTY_US (200)
#endif /* #ifdef CONFIG_PM_ENABLE */
#endif // CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#define BLE_RTC_DELAY_US (1800)
#endif
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#define BLE_RTC_DELAY_US (0)
static void ble_sleep_timer_callback(void *arg);
static DRAM_ATTR esp_timer_handle_t s_ble_sleep_timer = NULL;
#endif
static const struct osi_coex_funcs_t s_osi_coex_funcs_ro = {
@ -223,9 +249,10 @@ struct ext_funcs_t ext_funcs_ro = {
._task_delete = task_delete_wrapper,
._osi_assert = osi_assert_wrapper,
._os_random = osi_random_wrapper,
._ecc_gen_key_pair = ble_sm_alg_gen_key_pair,
._ecc_gen_dh_key = ble_sm_alg_gen_dhkey,
._ecc_gen_key_pair = esp_ecc_gen_key_pair,
._ecc_gen_dh_key = esp_ecc_gen_dh_key,
._esp_reset_rpa_moudle = esp_reset_rpa_moudle,
._esp_bt_track_pll_cap = NULL,
.magic = EXT_FUNC_MAGIC_VALUE,
};
@ -235,9 +262,13 @@ static void IRAM_ATTR esp_reset_rpa_moudle(void)
DPORT_CLEAR_PERI_REG_MASK(SYSTEM_CORE_RST_EN_REG, BLE_RPA_REST_BIT);
}
static void IRAM_ATTR osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2)
static void IRAM_ATTR osi_assert_wrapper(const uint32_t ln, const char *fn,
uint32_t param1, uint32_t param2)
{
BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
esp_ble_controller_log_dump_all(true);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
assert(0);
}
@ -250,17 +281,17 @@ static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
{
#if CONFIG_SW_COEXIST_ENABLE
coex_schm_status_bit_set(type, status);
#endif
#endif // CONFIG_SW_COEXIST_ENABLE
}
static void coex_schm_status_bit_clear_wrapper(uint32_t type, uint32_t status)
{
#if CONFIG_SW_COEXIST_ENABLE
coex_schm_status_bit_clear(type, status);
#endif
#endif // CONFIG_SW_COEXIST_ENABLE
}
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#ifdef CONFIG_BT_BLUEDROID_ENABLED
bool esp_vhci_host_check_send_available(void)
{
if (ble_controller_status != ESP_BT_CONTROLLER_STATUS_ENABLED) {
@ -313,6 +344,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
if (*(data) == DATA_TYPE_COMMAND) {
struct ble_hci_cmd *cmd = NULL;
cmd = (struct ble_hci_cmd *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
assert(cmd);
memcpy((uint8_t *)cmd, data + 1, len - 1);
ble_hci_trans_hs_cmd_tx((uint8_t *)cmd);
}
@ -323,7 +355,6 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
assert(os_mbuf_append(om, &data[1], len - 1) == 0);
ble_hci_trans_hs_acl_tx(om);
}
}
esp_err_t esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callback)
@ -336,8 +367,7 @@ esp_err_t esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callba
return ESP_OK;
}
#endif
#endif // CONFIG_BT_BLUEDROID_ENABLED
static int task_create_wrapper(void *task_func, const char *name, uint32_t stack_depth, void *param, uint32_t prio, void *task_handle, uint32_t core_id)
{
return (uint32_t)xTaskCreatePinnedToCore(task_func, name, stack_depth, param, prio, task_handle, (core_id < portNUM_PROCESSORS ? core_id : tskNO_AFFINITY));
@ -348,6 +378,25 @@ static void task_delete_wrapper(void *task_handle)
vTaskDelete(task_handle);
}
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_key_pair(pub, priv);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_dhkey(peer_pub_key_x, peer_pub_key_y, our_priv_key, out_dhkey);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
static void hci_uart_start_tx_wrapper(int uart_no)
{
@ -363,8 +412,9 @@ static int hci_uart_init_cbs_wrapper(int uart_no, hci_uart_tx_char tx_func,
}
static int hci_uart_config_wrapper(int port_num, int32_t baud_rate, uint8_t data_bits, uint8_t stop_bits,
uart_parity_t parity, uart_hw_flowcontrol_t flow_ctl)
static int hci_uart_config_wrapper(int port_num, int32_t baud_rate, uint8_t data_bits,
uint8_t stop_bits,uart_parity_t parity,
uart_hw_flowcontrol_t flow_ctl)
{
int rc = -1;
rc = hci_uart_config(port_num, baud_rate, data_bits, stop_bits, parity, flow_ctl);
@ -411,43 +461,23 @@ static int esp_intr_free_wrapper(void **ret_handle)
return rc;
}
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
void sleep_modem_light_sleep_overhead_set(uint32_t overhead)
{
esp_ble_set_wakeup_overhead(overhead);
}
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
{
if (!s_ble_active) {
return;
}
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
uint32_t delta_tick;
uint32_t us_to_sleep;
uint32_t sleep_tick;
uint32_t tick_invalid = *(uint32_t*)(arg);
assert(arg != NULL);
if (!tick_invalid) {
sleep_tick = r_os_cputime_get32();
// start a timer to wake up and acquire the pm_lock before modem_sleep awakes
delta_tick = enable_tick - sleep_tick;
if (delta_tick & 0x80000000) {
return;
}
us_to_sleep = r_os_cputime_ticks_to_usecs(delta_tick);
if (us_to_sleep <= BTDM_MIN_TIMER_UNCERTAINTY_US) {
return;
}
esp_err_t err = esp_timer_start_once(s_ble_sleep_timer, us_to_sleep - BTDM_MIN_TIMER_UNCERTAINTY_US);
if (err != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed\n");
return;
}
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
r_ble_rtc_wake_up_state_clr();
#endif
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
esp_phy_disable();
esp_phy_disable(PHY_MODEM_BT);
s_ble_active = false;
}
@ -456,7 +486,7 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
if (s_ble_active) {
return;
}
esp_phy_enable();
esp_phy_enable(PHY_MODEM_BT);
// need to check if need to call pm lock here
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_acquire(s_pm_lock);
@ -464,17 +494,7 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
s_ble_active = true;
}
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
static void ble_sleep_timer_callback(void * arg)
{
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif // CONFIG_PM_ENABLE
esp_err_t controller_sleep_init(void)
esp_err_t controller_sleep_init(ble_rtc_slow_clk_src_t slow_clk_src)
{
esp_err_t rc = 0;
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
@ -482,7 +502,11 @@ esp_err_t controller_sleep_init(void)
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0, 500 + BLE_RTC_DELAY_US);
#ifdef CONFIG_PM_ENABLE
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_ON);
if (slow_clk_src == BT_SLOW_CLK_SRC_MAIN_XTAL) {
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_ON);
} else {
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_AUTO);
}
#endif // CONFIG_PM_ENABLE
#endif // CONFIG_BT_LE_SLEEP_ENABLE
@ -493,107 +517,114 @@ esp_err_t controller_sleep_init(void)
if (rc != ESP_OK) {
goto error;
}
esp_pm_lock_acquire(s_pm_lock);
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
esp_timer_create_args_t create_args = {
.callback = ble_sleep_timer_callback,
.arg = NULL,
.name = "btSlp"
};
rc = esp_timer_create(&create_args, &s_ble_sleep_timer);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
rc = esp_pm_register_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
if (rc != ESP_OK) {
goto error;
}
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is ESP timer");
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
return rc;
error:
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
esp_sleep_disable_bt_wakeup();
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
}
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
esp_timer_delete(s_ble_sleep_timer);
s_ble_sleep_timer = NULL;
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_disable_bt_wakeup();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif //CONFIG_PM_ENABLE
return rc;
}
void controller_sleep_deinit(void)
{
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#ifdef CONFIG_FREERTOS_USE_TICKLESS_IDLE
r_ble_rtc_wake_up_state_clr();
esp_sleep_disable_bt_wakeup();
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_AUTO);
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_PM_ENABLE
/*lock should release first and then delete*/
if (s_ble_active) {
esp_pm_lock_release(s_pm_lock);
}
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
esp_timer_delete(s_ble_sleep_timer);
s_ble_sleep_timer = NULL;
}
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif //CONFIG_PM_ENABLE
}
void ble_rtc_clk_init(void)
static void esp_bt_rtc_slow_clk_select(ble_rtc_slow_clk_src_t slow_clk_src)
{
// modem_clkrst_reg
// LP_TIMER_SEL_XTAL32K -> 0
// LP_TIMER_SEL_XTAL -> 1
// LP_TIMER_SEL_8M -> 0
// LP_TIMER_SEL_RTC_SLOW -> 0
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_XTAL32K_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 1, MODEM_CLKRST_LP_TIMER_SEL_XTAL_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_8M_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_RTC_SLOW_S);
/* Select slow clock source for BT momdule */
switch (slow_clk_src) {
case BT_SLOW_CLK_SRC_MAIN_XTAL:
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using main XTAL as clock source");
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_XTAL32K_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 1, MODEM_CLKRST_LP_TIMER_SEL_XTAL_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_8M_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_RTC_SLOW_S);
#ifdef CONFIG_XTAL_FREQ_26
// LP_TIMER_CLK_DIV_NUM -> 130
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM, 129, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM, 129, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM_S);
#else
// LP_TIMER_CLK_DIV_NUM -> 250
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM, 249, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM, 249, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM_S);
#endif // CONFIG_XTAL_FREQ_26
// MODEM_CLKRST_ETM_CLK_ACTIVE -> 1
// MODEM_CLKRST_ETM_CLK_SEL -> 0
break;
case BT_SLOW_CLK_SRC_32K_XTAL_ON_PIN0:
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using external 32.768 kHz XTAL as clock source");
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 1, MODEM_CLKRST_LP_TIMER_SEL_XTAL32K_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_XTAL_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_8M_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, 1, 0, MODEM_CLKRST_LP_TIMER_SEL_RTC_SLOW_S);
SET_PERI_REG_BITS(MODEM_CLKRST_MODEM_LP_TIMER_CONF_REG, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM, 0, MODEM_CLKRST_LP_TIMER_CLK_DIV_NUM_S);
break;
default:
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "Unsupported slow clock");
assert(0);
break;
}
SET_PERI_REG_BITS(MODEM_CLKRST_ETM_CLK_CONF_REG, 1, 1, MODEM_CLKRST_ETM_CLK_ACTIVE_S);
SET_PERI_REG_BITS(MODEM_CLKRST_ETM_CLK_CONF_REG, 1, 0, MODEM_CLKRST_ETM_CLK_SEL_S);
}
static ble_rtc_slow_clk_src_t ble_rtc_clk_init(esp_bt_controller_config_t *cfg)
{
ble_rtc_slow_clk_src_t slow_clk_src;
#if CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL
#ifdef CONFIG_XTAL_FREQ_26
cfg->rtc_freq = 40000;
#else
cfg->rtc_freq = 32000;
#endif // CONFIG_XTAL_FREQ_26
slow_clk_src = BT_SLOW_CLK_SRC_MAIN_XTAL;
#else
if (rtc_clk_slow_src_get() == SOC_RTC_SLOW_CLK_SRC_OSC_SLOW) {
cfg->rtc_freq = 32768;
slow_clk_src = BT_SLOW_CLK_SRC_32K_XTAL_ON_PIN0;
} else {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "32.768kHz XTAL not detected, fall back to main XTAL as Bluetooth sleep clock");
#ifdef CONFIG_XTAL_FREQ_26
cfg->rtc_freq = 40000;
#else
cfg->rtc_freq = 32000;
#endif // CONFIG_XTAL_FREQ_26
slow_clk_src = BT_SLOW_CLK_SRC_MAIN_XTAL;
}
#endif /* CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL */
esp_bt_rtc_slow_clk_select(slow_clk_src);
return slow_clk_src;
}
esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
{
esp_err_t ret = ESP_OK;
ble_npl_count_info_t npl_info;
ble_rtc_slow_clk_src_t rtc_clk_src;
memset(&npl_info, 0, sizeof(ble_npl_count_info_t));
if (ble_controller_status != ESP_BT_CONTROLLER_STATUS_IDLE) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "invalid controller state");
@ -605,7 +636,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
return ESP_ERR_INVALID_ARG;
}
ble_rtc_clk_init();
rtc_clk_src = ble_rtc_clk_init(cfg);
ret = esp_register_ext_funcs(&ext_funcs_ro);
if (ret != ESP_OK) {
@ -650,18 +681,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
#endif
esp_phy_modem_init();
periph_module_enable(PERIPH_BT_MODULE);
// init phy
esp_phy_enable();
s_ble_active = true;
// init bb
bt_bb_v2_init_cmplx(1);
periph_module_reset(PERIPH_BT_MODULE);
if (ble_osi_coex_funcs_register((struct osi_coex_funcs_t *)&s_osi_coex_funcs_ro) != 0) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "osi coex funcs reg failed");
ret = ESP_ERR_INVALID_ARG;
goto free_controller;
goto modem_deint;
}
#if CONFIG_SW_COEXIST_ENABLE
@ -670,10 +695,34 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
ret = ble_controller_init(cfg);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
goto free_controller;
goto modem_deint;
}
ret = controller_sleep_init();
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble controller commit:[%s]", ble_controller_get_compile_version());
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble rom commit:[%s]", r_ble_controller_get_rom_compile_version());
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
interface_func_t bt_controller_log_interface;
bt_controller_log_interface = esp_bt_controller_log_interface;
uint8_t buffers = 0;
#if CONFIG_BT_LE_CONTROLLER_LOG_CTRL_ENABLED
buffers |= ESP_BLE_LOG_BUF_CONTROLLER;
#endif // CONFIG_BT_LE_CONTROLLER_LOG_CTRL_ENABLED
#if CONFIG_BT_LE_CONTROLLER_LOG_HCI_ENABLED
buffers |= ESP_BLE_LOG_BUF_HCI;
#endif // CONFIG_BT_LE_CONTROLLER_LOG_HCI_ENABLED
#if CONFIG_BT_LE_CONTROLLER_LOG_DUMP_ONLY
ret = ble_log_init_async(bt_controller_log_interface, false, buffers, (uint32_t *)log_bufs_size);
#else
ret = ble_log_init_async(bt_controller_log_interface, true, buffers, (uint32_t *)log_bufs_size);
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
goto controller_init_err;
}
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
ret = controller_sleep_init(rtc_clk_src);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "controller_sleep_init failed %d", ret);
goto free_controller;
@ -693,9 +742,14 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
return ESP_OK;
free_controller:
controller_sleep_deinit();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
controller_init_err:
ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_controller_deinit();
esp_phy_disable();
modem_deint:
esp_phy_modem_deinit();
periph_module_disable(PERIPH_BT_MODULE);
#if CONFIG_BT_NIMBLE_ENABLED
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
@ -717,13 +771,13 @@ esp_err_t esp_bt_controller_deinit(void)
controller_sleep_deinit();
if (s_ble_active) {
esp_phy_disable();
s_ble_active = false;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_controller_deinit();
periph_module_disable(PERIPH_BT_MODULE);
#if CONFIG_BT_NIMBLE_ENABLED
/* De-initialize default event queue */
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
@ -758,6 +812,17 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "invalid controller state");
return ESP_FAIL;
}
if (!s_ble_active) {
#if CONFIG_PM_ENABLE
esp_pm_lock_acquire(s_pm_lock);
#endif // CONFIG_PM_ENABLE
// init phy
esp_phy_enable(PHY_MODEM_BT);
s_ble_active = true;
}
// init bb
bt_bb_v2_init_cmplx(1);
#if CONFIG_SW_COEXIST_ENABLE
coex_enable();
#endif
@ -773,6 +838,13 @@ error:
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
if (s_ble_active) {
esp_phy_disable(PHY_MODEM_BT);
#if CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
s_ble_active = false;
}
return ret;
}
@ -785,6 +857,14 @@ esp_err_t esp_bt_controller_disable(void)
if (ble_controller_disable() != 0) {
return ESP_FAIL;
}
if (s_ble_active) {
esp_phy_disable(PHY_MODEM_BT);
#if CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
s_ble_active = false;
}
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
@ -815,34 +895,30 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
{
intptr_t mem_start, mem_end;
if (mode == ESP_BT_MODE_BLE) {
mem_start = (intptr_t)&_bt_bss_start;
#if CONFIG_BT_RELEASE_IRAM && CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT
/* Release Bluetooth text section and merge Bluetooth data, bss & text into a large free heap
* region when esp_bt_mem_release is called, total saving ~21kB or more of IRAM. ESP32-C2 has
* only 3 configurable PMP entries available, rest of them are hard-coded. We cannot split the
* memory into 3 different regions (IRAM, BLE-IRAM, DRAM). So `ESP_SYSTEM_PMP_IDRAM_SPLIT` needs
* to be disabled.
*/
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "`ESP_SYSTEM_PMP_IDRAM_SPLIT` should be disabled!");
assert(0);
#endif // CONFIG_BT_RELEASE_IRAM && CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT
if (mode & ESP_BT_MODE_BLE) {
#if CONFIG_BT_RELEASE_IRAM
mem_start = (intptr_t)MAP_IRAM_TO_DRAM((intptr_t)&_iram_bt_text_start);
mem_end = (intptr_t)&_bss_bt_end;
#else
mem_start = (intptr_t)&_bt_controller_data_start;
mem_end = (intptr_t)&_bt_bss_end;
#endif // CONFIG_BT_RELEASE_IRAM
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release BT BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Release BLE [0x%08x] - [0x%08x], len %d", mem_start,
mem_end, mem_end - mem_start);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_bt_data_start;
mem_end = (intptr_t)&_bt_data_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release BT Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_nimble_bss_start;
mem_end = (intptr_t)&_nimble_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_nimble_data_start;
mem_end = (intptr_t)&_nimble_data_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
}
return ESP_OK;
@ -970,14 +1046,40 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
return (esp_power_level_t)tx_level;
}
uint8_t esp_ble_get_chip_rev_version(void)
{
return efuse_ll_get_chip_wafer_version_minor();
}
#if (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED == true)
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end)
{
for (int i = 0; i < len; i++) {
esp_rom_printf("%02x ", addr[i]);
}
if (end) {
esp_rom_printf("\n");
}
}
void esp_ble_controller_log_dump_all(bool output)
{
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
portENTER_CRITICAL_SAFE(&spinlock);
esp_panic_handler_reconfigure_wdts(5000);
BT_ASSERT_PRINT("\r\n[DUMP_START:");
ble_log_async_output_dump_all(output);
BT_ASSERT_PRINT(":DUMP_END]\r\n");
portEXIT_CRITICAL_SAFE(&spinlock);
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#if (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED)
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
#define BLE_SM_KEY_ERR 0x17
#if CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#include "mbedtls/aes.h"
#if CONFIG_BT_LE_SM_SC
#include "mbedtls/cipher.h"
#include "mbedtls/entropy.h"
@ -985,7 +1087,9 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
#include "mbedtls/cmac.h"
#include "mbedtls/ecdh.h"
#include "mbedtls/ecp.h"
#endif
static mbedtls_ecp_keypair keypair;
#endif // CONFIG_BT_LE_SM_SC
#else
#include "tinycrypt/aes.h"
@ -995,15 +1099,15 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
#if CONFIG_BT_LE_SM_SC
#include "tinycrypt/cmac_mode.h"
#include "tinycrypt/ecc_dh.h"
#endif
#endif // CONFIG_BT_LE_SM_SC
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#endif
#if CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#if CONFIG_BT_LE_SM_SC
static mbedtls_ecp_keypair keypair;
#endif
#endif
/* Based on Core Specification 4.2 Vol 3. Part H 2.3.5.6.1 */
static const uint8_t ble_sm_alg_dbg_priv_key[32] = {
0x3f, 0x49, 0xf6, 0xd4, 0xa3, 0xc5, 0x5f, 0x38, 0x74, 0xc9, 0xb3, 0xe3,
0xd2, 0x10, 0x3f, 0x50, 0x4a, 0xff, 0x60, 0x7b, 0xeb, 0x40, 0xb7, 0x99,
0x58, 0x99, 0xb8, 0xa6, 0xcd, 0x3c, 0x1a, 0xbd
};
int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey)
@ -1050,8 +1154,7 @@ int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_
}
/* Set PRNG */
if ((rc = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
NULL, 0)) != 0) {
if ((rc = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0)) != 0) {
goto exit;
}
@ -1095,19 +1198,12 @@ exit:
if (rc == TC_CRYPTO_FAIL) {
return BLE_SM_KEY_ERR;
}
#endif
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
swap_buf(out_dhkey, dh, 32);
return 0;
}
/* based on Core Specification 4.2 Vol 3. Part H 2.3.5.6.1 */
static const uint8_t ble_sm_alg_dbg_priv_key[32] = {
0x3f, 0x49, 0xf6, 0xd4, 0xa3, 0xc5, 0x5f, 0x38, 0x74, 0xc9, 0xb3, 0xe3,
0xd2, 0x10, 0x3f, 0x50, 0x4a, 0xff, 0x60, 0x7b, 0xeb, 0x40, 0xb7, 0x99,
0x58, 0x99, 0xb8, 0xa6, 0xcd, 0x3c, 0x1a, 0xbd
};
#if CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
static int mbedtls_gen_keypair(uint8_t *public_key, uint8_t *private_key)
{
@ -1153,7 +1249,7 @@ exit:
return 0;
}
#endif
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
/**
* pub: 64 bytes
@ -1169,7 +1265,6 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv)
uint8_t pk[64];
do {
#if CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
if (mbedtls_gen_keypair(pk, priv) != 0) {
return BLE_SM_KEY_ERR;
@ -1178,17 +1273,16 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv)
if (uECC_make_key(pk, priv, &curve_secp256r1) != TC_CRYPTO_SUCCESS) {
return BLE_SM_KEY_ERR;
}
#endif
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
/* Make sure generated key isn't debug key. */
} while (memcmp(priv, ble_sm_alg_dbg_priv_key, 32) == 0);
swap_buf(pub, pk, 32);
swap_buf(&pub[32], &pk[32], 32);
swap_in_place(priv, 32);
#endif
#endif // CONFIG_BT_LE_SM_SC_DEBUG_KEYS
return 0;
}
#endif
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
#endif // (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED)

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -40,7 +40,11 @@ extern "C" {
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#if defined(CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#else
@ -115,12 +119,15 @@ extern "C" {
#else
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#endif
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART

View File

@ -78,15 +78,29 @@ config BT_CTRL_ADV_DUP_FILT_MAX
help
The maxinum number of suplicate scan filter
config BT_CTRL_HW_CCA
bool "HW CCA check enable"
default n
choice BT_BLE_CCA_MODE
prompt "BLE CCA mode"
default BT_BLE_CCA_MODE_NONE
help
It enables HW CCA feature in controller
Define BT BLE CCA mode
config BT_BLE_CCA_MODE_NONE
bool "NONE"
config BT_BLE_CCA_MODE_HW
bool "Hardware"
config BT_BLE_CCA_MODE_SW
bool "Software"
endchoice
config BT_BLE_CCA_MODE
int
default 0 if BT_BLE_CCA_MODE_NONE
default 1 if BT_BLE_CCA_MODE_HW
default 2 if BT_BLE_CCA_MODE_SW
config BT_CTRL_HW_CCA_VAL
int "CCA threshold value"
range 20 60
range 20 100
default 20
help
It is the threshold value of HW CCA, if the value is 30, it means CCA threshold is -30 dBm.
@ -265,20 +279,19 @@ choice BT_CTRL_SCAN_DUPL_TYPE
config BT_CTRL_SCAN_DUPL_TYPE_DEVICE
bool "Scan Duplicate By Device Address"
help
This way is to use advertiser address filtering. The adv packet of the same address is only
allowed to be reported once
Advertising packets with the same address, address type, and advertising type are reported once.
config BT_CTRL_SCAN_DUPL_TYPE_DATA
bool "Scan Duplicate By Advertising Data"
help
This way is to use advertising data filtering. All same advertising data only allow to be reported
once even though they are from different devices.
Advertising packets with identical advertising data, address type, and advertising type
are reported only once, even if they originate from different devices.
config BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE
bool "Scan Duplicate By Device Address And Advertising Data"
help
This way is to use advertising data and device address filtering. All different adv packets with
the same address are allowed to be reported.
Advertising packets with the same address, advertising data, address type,
and advertising type are reported only once.
endchoice
config BT_CTRL_SCAN_DUPL_TYPE
@ -333,7 +346,7 @@ config BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE
choice BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on ESP_WIFI_SW_COEXIST_ENABLE
depends on ESP_COEX_SW_COEXIST_ENABLE
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
@ -351,7 +364,7 @@ endchoice
config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
default 0 if (!ESP_WIFI_SW_COEXIST_ENABLE)
default 0 if !ESP_COEX_SW_COEXIST_ENABLE
default 1 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
@ -454,3 +467,11 @@ config BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
Disable active scan backoff. The bluetooth spec requires that scanners should run a backoff procedure to
minimize collision of scan request PDUs from nultiple scanners. If scan backoff is disabled, in active
scanning, scan request PDU will be sent every time when HW receives scannable ADV PDU.
config BT_BLE_ADV_DATA_LENGTH_ZERO_AUX
bool "Enable aux packet when ext adv data length is zero"
default n
help
When this option is enabled, auxiliary packets will be present in the events of
'Non-Connectable and Non-Scannable' regardless of whether the advertising length is 0.
If this option is not enabled, auxiliary packets will only be present when the advertising length is not 0.

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -34,7 +34,7 @@
#include "soc/rtc.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/soc_memory_layout.h"
#include "esp_coexist_internal.h"
#include "private/esp_coexist_internal.h"
#include "esp_timer.h"
#include "esp_sleep.h"
#include "esp_rom_sys.h"
@ -112,7 +112,7 @@ do{\
} while(0)
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
#define OSI_VERSION 0x00010006
#define OSI_VERSION 0x00010007
#define OSI_MAGIC_VALUE 0xFADEBEAD
/* Types definition
@ -135,7 +135,6 @@ typedef struct vhci_host_callback {
typedef struct {
void *handle;
void *storage;
} btdm_queue_item_t;
typedef void (* osi_intr_handler)(void);
@ -194,6 +193,8 @@ struct osi_funcs_t {
void (* _esp_hw_power_down)(void);
void (* _esp_hw_power_up)(void);
void (* _ets_backup_dma_copy)(uint32_t reg, uint32_t mem_addr, uint32_t num, bool to_rem);
void (* _ets_delay_us)(uint32_t us);
void (* _btdm_rom_table_ready)(void);
};
@ -245,6 +246,7 @@ extern bool btdm_deep_sleep_mem_init(void);
extern void btdm_deep_sleep_mem_deinit(void);
extern void btdm_ble_power_down_dma_copy(bool copy);
extern uint8_t btdm_sleep_clock_sync(void);
extern void sdk_config_extend_set_pll_track(bool enable);
#if CONFIG_MAC_BB_PD
extern void esp_mac_bb_power_down(void);
@ -252,6 +254,8 @@ extern void esp_mac_bb_power_up(void);
extern void ets_backup_dma_copy(uint32_t reg, uint32_t mem_addr, uint32_t num, bool to_mem);
#endif
extern void btdm_cca_feature_enable(void);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _btdm_bss_start;
@ -311,6 +315,7 @@ static void interrupt_off_wrapper(int intr_num);
static void btdm_hw_mac_power_up_wrapper(void);
static void btdm_hw_mac_power_down_wrapper(void);
static void btdm_backup_dma_copy_wrapper(uint32_t reg, uint32_t mem_addr, uint32_t num, bool to_mem);
static void btdm_funcs_table_ready_wrapper(void);
static void btdm_slp_tmr_callback(void *arg);
@ -375,6 +380,8 @@ static const struct osi_funcs_t osi_funcs_ro = {
._esp_hw_power_down = btdm_hw_mac_power_down_wrapper,
._esp_hw_power_up = btdm_hw_mac_power_up_wrapper,
._ets_backup_dma_copy = btdm_backup_dma_copy_wrapper,
._ets_delay_us = esp_rom_delay_us,
._btdm_rom_table_ready = btdm_funcs_table_ready_wrapper,
};
static DRAM_ATTR struct osi_funcs_t *osi_funcs_p;
@ -511,16 +518,10 @@ static void *semphr_create_wrapper(uint32_t max, uint32_t init)
btdm_queue_item_t *semphr = heap_caps_calloc(1, sizeof(btdm_queue_item_t), MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL);
assert(semphr);
#if !CONFIG_SPIRAM_USE_MALLOC
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
semphr->handle = (void *)xSemaphoreCreateCounting(max, init);
#else
semphr->storage = heap_caps_malloc(sizeof(StaticQueue_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(semphr->storage);
semphr->handle = (void *)xSemaphoreCreateCountingStatic(max, init, semphr->storage);
#endif
assert(semphr->handle);
return semphr;
}
@ -535,11 +536,6 @@ static void semphr_delete_wrapper(void *semphr)
if (semphr_item->handle) {
vSemaphoreDelete(semphr_item->handle);
}
#ifdef CONFIG_SPIRAM_USE_MALLOC
if (semphr_item->storage) {
free(semphr_item->storage);
}
#endif
free(semphr);
}
@ -595,18 +591,9 @@ static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size)
queue = (btdm_queue_item_t*)heap_caps_malloc(sizeof(btdm_queue_item_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue);
#if CONFIG_SPIRAM_USE_MALLOC
queue->storage = heap_caps_calloc(1, sizeof(StaticQueue_t) + (queue_len*item_size), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue->storage);
queue->handle = xQueueCreateStatic( queue_len, item_size, ((uint8_t*)(queue->storage)) + sizeof(StaticQueue_t), (StaticQueue_t*)(queue->storage));
assert(queue->handle);
#else
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
queue->handle = xQueueCreate( queue_len, item_size);
assert(queue->handle);
#endif
return queue;
}
@ -618,13 +605,6 @@ static void queue_delete_wrapper(void *queue)
if(queue_item->handle){
vQueueDelete(queue_item->handle);
}
#if CONFIG_SPIRAM_USE_MALLOC
if (queue_item->storage) {
free(queue_item->storage);
}
#endif
free(queue_item);
}
}
@ -674,7 +654,7 @@ static bool IRAM_ATTR is_in_isr_wrapper(void)
static void *malloc_internal_wrapper(size_t size)
{
void *p = heap_caps_malloc(size, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL|MALLOC_CAP_DMA);
void *p = heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_DMA);
if(p == NULL) {
ESP_LOGE(BT_LOG_TAG, "Malloc failed");
}
@ -743,19 +723,26 @@ static void btdm_sleep_enter_phase1_wrapper(uint32_t lpcycles)
return;
}
// start a timer to wake up and acquire the pm_lock before modem_sleep awakes
uint32_t us_to_sleep = btdm_lpcycles_2_hus(lpcycles, NULL) >> 1;
#define BTDM_MIN_TIMER_UNCERTAINTY_US (1800)
#define BTDM_RTC_SLOW_CLK_RC_DRIFT_PERCENT 7
assert(us_to_sleep > BTDM_MIN_TIMER_UNCERTAINTY_US);
// allow a maximum time uncertainty to be about 488ppm(1/2048) at least as clock drift
// and set the timer in advance
uint32_t uncertainty = (us_to_sleep >> 11);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
if (rtc_clk_slow_src_get() == SOC_RTC_SLOW_CLK_SRC_RC_SLOW) {
uncertainty = us_to_sleep * BTDM_RTC_SLOW_CLK_RC_DRIFT_PERCENT / 100;
}
#endif
if (uncertainty < BTDM_MIN_TIMER_UNCERTAINTY_US) {
uncertainty = BTDM_MIN_TIMER_UNCERTAINTY_US;
}
assert (s_lp_stat.wakeup_timer_started == 0);
// start a timer to wake up and acquire the pm_lock before modem_sleep awakes
if (esp_timer_start_once(s_btdm_slp_tmr, us_to_sleep - uncertainty) == ESP_OK) {
s_lp_stat.wakeup_timer_started = 1;
} else {
@ -768,18 +755,18 @@ static void btdm_sleep_enter_phase2_wrapper(void)
{
if (btdm_controller_get_sleep_mode() == ESP_BT_SLEEP_MODE_1) {
if (s_lp_stat.phy_enabled) {
esp_phy_disable();
esp_phy_disable(PHY_MODEM_BT);
s_lp_stat.phy_enabled = 0;
} else {
assert(0);
}
if (s_lp_stat.pm_lock_released == 0) {
#ifdef CONFIG_PM_ENABLE
if (s_lp_stat.pm_lock_released == 0) {
esp_pm_lock_release(s_pm_lock);
#endif
s_lp_stat.pm_lock_released = 1;
}
#endif
}
}
@ -797,7 +784,7 @@ static void btdm_sleep_exit_phase3_wrapper(void)
if (btdm_controller_get_sleep_mode() == ESP_BT_SLEEP_MODE_1) {
if (s_lp_stat.phy_enabled == 0) {
esp_phy_enable();
esp_phy_enable(PHY_MODEM_BT);
s_lp_stat.phy_enabled = 1;
}
}
@ -899,6 +886,13 @@ static void async_wakeup_request_end(int event)
return;
}
static void btdm_funcs_table_ready_wrapper(void)
{
#if BT_BLE_CCA_MODE == 2
btdm_cca_feature_enable();
#endif
}
static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
{
#if CONFIG_SW_COEXIST_ENABLE
@ -1168,18 +1162,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
btdm_controller_mem_init();
#if CONFIG_MAC_BB_PD
if (esp_register_mac_bb_pd_callback(btdm_mac_bb_power_down_cb) != 0) {
err = ESP_ERR_INVALID_ARG;
goto error;
}
if (esp_register_mac_bb_pu_callback(btdm_mac_bb_power_up_cb) != 0) {
err = ESP_ERR_INVALID_ARG;
goto error;
}
#endif
osi_funcs_p = (struct osi_funcs_t *)malloc_internal_wrapper(sizeof(struct osi_funcs_t));
if (osi_funcs_p == NULL) {
return ESP_ERR_NO_MEM;
@ -1327,14 +1309,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
periph_module_enable(PERIPH_BT_MODULE);
periph_module_reset(PERIPH_BT_MODULE);
esp_phy_enable();
s_lp_stat.phy_enabled = 1;
if (btdm_controller_init(cfg) != 0) {
err = ESP_ERR_NO_MEM;
goto error;
}
coex_pti_v2();
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
@ -1364,11 +1342,6 @@ static void bt_controller_deinit_internal(void)
{
periph_module_disable(PERIPH_BT_MODULE);
if (s_lp_stat.phy_enabled) {
esp_phy_disable();
s_lp_stat.phy_enabled = 0;
}
// deinit low power control resources
do {
@ -1429,11 +1402,6 @@ static void bt_controller_deinit_internal(void)
btdm_lpcycle_us = 0;
} while (0);
#if CONFIG_MAC_BB_PD
esp_unregister_mac_bb_pd_callback(btdm_mac_bb_power_down_cb);
esp_unregister_mac_bb_pu_callback(btdm_mac_bb_power_up_cb);
#endif
esp_bt_power_domain_off();
#if CONFIG_MAC_BB_PD
esp_mac_bb_pd_mem_deinit();
@ -1462,6 +1430,12 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
return ESP_ERR_INVALID_ARG;
}
/* Enable PHY when enabling controller to reduce power dissipation after controller init
* Notice the init order: esp_phy_enable() -> bt_bb_v2_init_cmplx() -> coex_pti_v2()
*/
esp_phy_enable(PHY_MODEM_BT);
s_lp_stat.phy_enabled = 1;
#if CONFIG_SW_COEXIST_ENABLE
coex_enable();
#endif
@ -1476,16 +1450,33 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
s_lp_stat.pm_lock_released = 0;
#endif
#if CONFIG_MAC_BB_PD
if (esp_register_mac_bb_pd_callback(btdm_mac_bb_power_down_cb) != 0) {
ret = ESP_ERR_INVALID_ARG;
goto error;
}
if (esp_register_mac_bb_pu_callback(btdm_mac_bb_power_up_cb) != 0) {
ret = ESP_ERR_INVALID_ARG;
goto error;
}
#endif
if (s_lp_cntl.enable) {
btdm_controller_enable_sleep(true);
}
} while (0);
// Disable pll track by default in BLE controller on ESP32-C3 and ESP32-S3
sdk_config_extend_set_pll_track(false);
if (btdm_controller_enable(mode) != 0) {
ret = ESP_ERR_INVALID_STATE;
goto error;
}
coex_pti_v2();
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_ENABLED;
return ret;
@ -1493,6 +1484,11 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
error:
// disable low power mode
do {
#if CONFIG_MAC_BB_PD
esp_unregister_mac_bb_pd_callback(btdm_mac_bb_power_down_cb);
esp_unregister_mac_bb_pu_callback(btdm_mac_bb_power_up_cb);
#endif
btdm_controller_enable_sleep(false);
#ifdef CONFIG_PM_ENABLE
if (s_lp_cntl.no_light_sleep) {
@ -1508,6 +1504,10 @@ error:
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
if (s_lp_stat.phy_enabled) {
esp_phy_disable(PHY_MODEM_BT);
s_lp_stat.phy_enabled = 0;
}
return ret;
}
@ -1526,11 +1526,20 @@ esp_err_t esp_bt_controller_disable(void)
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
if (s_lp_stat.phy_enabled) {
esp_phy_disable(PHY_MODEM_BT);
s_lp_stat.phy_enabled = 0;
}
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
// disable low power mode
do {
#if CONFIG_MAC_BB_PD
esp_unregister_mac_bb_pd_callback(btdm_mac_bb_power_down_cb);
esp_unregister_mac_bb_pu_callback(btdm_mac_bb_power_up_cb);
#endif
#ifdef CONFIG_PM_ENABLE
if (s_lp_cntl.no_light_sleep) {
esp_pm_lock_release(s_light_sleep_pm_lock);

View File

@ -147,7 +147,7 @@ if BT_LE_EXT_ADV
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transer Sync Events"
bool "Enable Transfer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
default y
help
@ -212,6 +212,15 @@ menu "Memory Settings"
help
Dynamic memory size of block 2
config BT_LE_MSYS_BUF_FROM_HEAP
bool "Get Msys Mbuf from heap"
default y
depends on BT_LE_MSYS_INIT_IN_CONTROLLER
help
This option sets the source of the shared msys mbuf memory between
the Host and the Controller. Allocate the memory from the heap if
this option is sets, from the mempool otherwise.
config BT_LE_ACL_BUF_COUNT
int "ACL Buffer count"
default 10
@ -260,6 +269,54 @@ config BT_LE_CONTROLLER_TASK_STACK_SIZE
help
This configures stack size of NimBLE controller task
menuconfig BT_LE_CONTROLLER_LOG_ENABLED
bool "Controller log enable"
default n
help
Enable controller log
config BT_LE_CONTROLLER_LOG_CTRL_ENABLED
bool "enable controller log module"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Enable controller log module
config BT_LE_CONTROLLER_LOG_HCI_ENABLED
bool "enable HCI log module"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Enable hci log module
config BT_LE_CONTROLLER_LOG_DUMP_ONLY
bool "Controller log dump mode only"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Only operate in dump mode
config BT_LE_LOG_CTRL_BUF1_SIZE
int "size of the first BLE controller LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 4096
help
Configure the size of the first BLE controller LOG buffer.
config BT_LE_LOG_CTRL_BUF2_SIZE
int "size of the second BLE controller LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 1024
help
Configure the size of the second BLE controller LOG buffer.
config BT_LE_LOG_HCI_BUF_SIZE
int "size of the BLE HCI LOG buffer"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default 4096
help
Configure the size of the BLE HCI LOG buffer.
config BT_LE_LL_RESOLV_LIST_SIZE
int "BLE LL Resolving list size"
range 1 5
@ -325,7 +382,7 @@ config BT_LE_WHITELIST_SIZE
config BT_LE_LL_DUP_SCAN_LIST_COUNT
int "BLE duplicate scan list count"
range 1 100
range 5 100
default 20
help
config the max count of duplicate scan list
@ -340,7 +397,7 @@ config BT_LE_LL_SCA
config BT_LE_MAX_CONNECTIONS
int "Maximum number of concurrent connections"
depends on !BT_NIMBLE_ENABLED
range 1 9
range 1 70
default 3
help
Defines maximum number of concurrent BLE connections. For ESP32, user
@ -352,7 +409,7 @@ config BT_LE_MAX_CONNECTIONS
choice BT_LE_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on !BT_NIMBLE_ENABLED
depends on ESP_COEX_SW_COEXIST_ENABLE
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
@ -370,7 +427,7 @@ endchoice
config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
depends on !BT_NIMBLE_ENABLED
default 0 if !ESP_COEX_SW_COEXIST_ENABLE
default 1 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
@ -380,19 +437,24 @@ config BT_LE_SLEEP_ENABLE
help
Enable BLE sleep
choice BT_LE_WAKEUP_SOURCE
prompt "BLE light sleep wakeup source"
depends on BT_LE_SLEEP_ENABLE
default BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
config BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
bool "Use ESP timer to wakeup CPU"
choice BT_LE_LP_CLK_SRC
prompt "BLE low power clock source"
default BT_LE_LP_CLK_SRC_MAIN_XTAL
config BT_LE_LP_CLK_SRC_MAIN_XTAL
bool "Use main XTAL as RTC clock source"
help
Use esp timer to wakeup CPU
User main XTAL as RTC clock source.
This option is recommended if external 32.768k XTAL is not available.
Using the external 32.768 kHz XTAL will have lower current consumption
in light sleep compared to using the main XTAL.
config BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
bool "Use BLE rtc timer to wakeup CPU"
config BT_LE_LP_CLK_SRC_DEFAULT
bool "Use system RTC slow clock source"
help
Use BLE rtc timer to wakeup CPU
Use the same slow clock source as system RTC
Using any clock source other than external 32.768 kHz XTAL supports only
legacy ADV and SCAN due to low clock accuracy.
endchoice
config BT_LE_USE_ESP_TIMER
@ -402,3 +464,115 @@ config BT_LE_USE_ESP_TIMER
help
Set this option to use Esp Timer which has higher priority timer
instead of FreeRTOS timer
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
default y
help
The function is mainly used to enable flow control for advertising reports. When it is enabled,
advertising reports will be discarded by the controller if the number of unprocessed advertising
reports exceeds the size of BLE adv report flow control.
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM
int "BLE adv report flow control number"
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
range 50 1000
default 100
help
The number of unprocessed advertising report that bluetooth host can save.If you set
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a small value, this may cause adv packets lost.
If you set `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a large value, bluetooth host may cache a
lot of adv packets and this may cause system memory run out. For example, if you set
it to 50, the maximum memory consumed by host is 35 * 50 bytes. Please set
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` according to your system free memory and handle adv
packets as fast as possible, otherwise it will cause adv packets lost.
config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
int "BLE adv lost event threshold value"
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
range 1 1000
default 20
help
When adv report flow control is enabled, The ADV lost event will be generated when the number
of ADV packets lost in the controller reaches this threshold. It is better to set a larger value.
If you set `BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
may cause adv packets lost more.
config BT_LE_SCAN_DUPL
bool "BLE Scan Duplicate Options"
default y
help
This select enables parameters setting of BLE scan duplicate.
choice BT_LE_SCAN_DUPL_TYPE
prompt "Scan Duplicate Type"
default BT_LE_SCAN_DUPL_TYPE_DEVICE
depends on BT_LE_SCAN_DUPL
help
Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use
advertiser address filtering. The adv packet of the same address is only allowed to be reported once.
Another way is "Scan Duplicate By Device Address And Advertising Data". This way is to use advertising
data and device address filtering. All different adv packets with the same address are allowed to be
reported. The last way is "Scan Duplicate By Advertising Data". This way is to use advertising data
filtering. All same advertising data only allow to be reported once even though they are from
different devices.
config BT_LE_SCAN_DUPL_TYPE_DEVICE
bool "Scan Duplicate By Device Address"
help
This way is to use advertiser address filtering. The adv packet of the same address is only
allowed to be reported once
config BT_LE_SCAN_DUPL_TYPE_DATA
bool "Scan Duplicate By Advertising Data"
help
This way is to use advertising data filtering. All same advertising data only allow to be reported
once even though they are from different devices.
config BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE
bool "Scan Duplicate By Device Address And Advertising Data"
help
This way is to use advertising data and device address filtering. All different adv packets with
the same address are allowed to be reported.
endchoice
config BT_LE_SCAN_DUPL_TYPE
int
depends on BT_LE_SCAN_DUPL
default 0 if BT_LE_SCAN_DUPL_TYPE_DEVICE
default 1 if BT_LE_SCAN_DUPL_TYPE_DATA
default 2 if BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE
default 0
config BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD
int "Duplicate scan list refresh period (seconds)"
depends on BT_LE_SCAN_DUPL
range 0 1000
default 0
help
If the period value is non-zero, the controller will periodically clear the device information
stored in the scan duuplicate filter. If it is 0, the scan duuplicate filter will not be cleared
until the scanning is disabled. Duplicate advertisements for this period should not be sent to the
Host in advertising report events.
There are two scenarios where the ADV packet will be repeatedly reported:
1. The duplicate scan cache is full, the controller will delete the oldest device information and
add new device information.
2. When the refresh period is up, the controller will clear all device information and start filtering
again.
config BT_LE_MSYS_INIT_IN_CONTROLLER
bool "Msys Mbuf Init in Controller"
default y
config BT_LE_TX_CCA_ENABLED
bool "Enable TX CCA feature"
default n
help
Enable CCA feature to cancel sending the packet if the signal power is stronger than CCA threshold.
config BT_LE_CCA_RSSI_THRESH
int "CCA RSSI threshold value"
depends on BT_LE_TX_CCA_ENABLED
range 20 100
default 20
help
Power threshold of CCA in unit of -1 dBm.

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -24,7 +24,7 @@
#endif // ESP_PLATFORM
#if CONFIG_SW_COEXIST_ENABLE
#include "esp_coexist_internal.h"
#include "private/esp_coexist_internal.h"
#endif // CONFIG_SW_COEXIST_ENABLE
#include "nimble/nimble_npl_os.h"
@ -40,6 +40,14 @@
#include "hci_uart.h"
#include "bt_osi_mem.h"
#if SOC_PM_RETENTION_HAS_CLOCK_BUG
#include "esp_private/sleep_retention.h"
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#include "esp_private/sleep_modem.h"
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#include "hci/hci_hal.h"
#endif // CONFIG_BT_BLUEDROID_ENABLED
@ -50,6 +58,8 @@
#include "esp_private/periph_ctrl.h"
#include "esp_sleep.h"
#include "hal/efuse_hal.h"
#include "soc/rtc.h"
/* Macro definition
************************************************************************
*/
@ -67,7 +77,6 @@
#define ACL_DATA_MBUF_LEADINGSPCAE 4
#endif // CONFIG_BT_BLUEDROID_ENABLED
/* Types definition
************************************************************************
*/
@ -104,12 +113,22 @@ struct ext_funcs_t {
uint32_t magic;
};
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* External functions or variables
************************************************************************
*/
extern int ble_osi_coex_funcs_register(struct osi_coex_funcs_t *coex_funcs);
extern int ble_controller_init(esp_bt_controller_config_t *cfg);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int r_ble_log_init_async(interface_func_t bt_controller_log_interface, bool task_create, uint8_t buffers, uint32_t *bufs_size);
extern int r_ble_log_deinit_async(void);
extern void r_ble_log_async_select_dump_buffers(uint8_t buffers);
extern void r_ble_log_async_output_dump_all(bool output);
extern void esp_panic_handler_reconfigure_wdts(uint32_t timeout_ms);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int ble_controller_deinit(void);
extern int ble_controller_enable(uint8_t mode);
extern int ble_controller_disable(void);
@ -119,14 +138,18 @@ extern int esp_ble_ll_set_public_addr(const uint8_t *addr);
extern int esp_register_npl_funcs (struct npl_funcs_t *p_npl_func);
extern void esp_unregister_npl_funcs (void);
extern void npl_freertos_mempool_deinit(void);
extern int os_msys_buf_alloc(void);
extern uint32_t r_os_cputime_get32(void);
extern uint32_t r_os_cputime_ticks_to_usecs(uint32_t ticks);
extern void ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
void *w_arg, uint32_t us_to_enabled);
extern void ble_rtc_wake_up_state_clr(void);
extern void r_ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
void *w_arg, uint32_t us_to_enabled);
extern void r_ble_rtc_wake_up_state_clr(void);
extern int os_msys_init(void);
extern void os_msys_buf_free(void);
extern void os_msys_deinit(void);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
extern const sleep_retention_entries_config_t *esp_ble_mac_retention_link_get(uint8_t *size, uint8_t extra);
extern void esp_ble_set_wakeup_overhead(uint32_t overhead);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
extern void esp_ble_change_rtc_freq(uint32_t freq);
extern int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x,
const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey);
@ -134,6 +157,7 @@ extern int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv);
extern int ble_txpwr_set(esp_ble_enhanced_power_type_t power_type, uint16_t handle, int power_level);
extern int ble_txpwr_get(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
extern int ble_get_npl_element_info(esp_bt_controller_config_t *cfg, ble_npl_count_info_t * npl_info);
extern char *ble_controller_get_compile_version(void);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _bt_controller_bss_start;
@ -167,13 +191,22 @@ static int esp_intr_free_wrapper(void **ret_handle);
static void osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2);
static uint32_t osi_random_wrapper(void);
static void esp_reset_rpa_moudle(void);
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv);
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* Local variable definition
***************************************************************************
*/
/* Static variable declare */
static DRAM_ATTR esp_bt_controller_status_t ble_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
const static uint32_t log_bufs_size[] = {CONFIG_BT_LE_LOG_CTRL_BUF1_SIZE, CONFIG_BT_LE_LOG_HCI_BUF_SIZE, CONFIG_BT_LE_LOG_CTRL_BUF2_SIZE};
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* This variable tells if BLE is running */
static bool s_ble_active = false;
#ifdef CONFIG_PM_ENABLE
@ -181,15 +214,8 @@ static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#define BTDM_MIN_TIMER_UNCERTAINTY_US (200)
#endif // CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#define BLE_RTC_DELAY_US (1100)
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#define BLE_RTC_DELAY_US (0)
static void ble_sleep_timer_callback(void *arg);
static DRAM_ATTR esp_timer_handle_t s_ble_sleep_timer = NULL;
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (2500)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (500)
static const struct osi_coex_funcs_t s_osi_coex_funcs_ro = {
._magic = OSI_COEX_MAGIC_VALUE,
@ -218,8 +244,8 @@ struct ext_funcs_t ext_funcs_ro = {
._task_delete = task_delete_wrapper,
._osi_assert = osi_assert_wrapper,
._os_random = osi_random_wrapper,
._ecc_gen_key_pair = ble_sm_alg_gen_key_pair,
._ecc_gen_dh_key = ble_sm_alg_gen_dhkey,
._ecc_gen_key_pair = esp_ecc_gen_key_pair,
._ecc_gen_dh_key = esp_ecc_gen_dh_key,
._esp_reset_rpa_moudle = esp_reset_rpa_moudle,
.magic = EXT_FUNC_MAGIC_VALUE,
};
@ -233,6 +259,9 @@ static void IRAM_ATTR osi_assert_wrapper(const uint32_t ln, const char *fn,
uint32_t param1, uint32_t param2)
{
BT_ASSERT_PRINT("BLE assert: line %d in function %s, param: 0x%x, 0x%x", ln, fn, param1, param2);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
esp_ble_controller_log_dump_all(true);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
assert(0);
}
@ -299,6 +328,7 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len)
if (*(data) == DATA_TYPE_COMMAND) {
struct ble_hci_cmd *cmd = NULL;
cmd = (struct ble_hci_cmd *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
assert(cmd);
memcpy((uint8_t *)cmd, data + 1, len - 1);
ble_hci_trans_hs_cmd_tx((uint8_t *)cmd);
}
@ -335,6 +365,25 @@ static void task_delete_wrapper(void *task_handle)
vTaskDelete(task_handle);
}
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_key_pair(pub, priv);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_dhkey(peer_pub_key_x, peer_pub_key_y, our_priv_key, out_dhkey);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
static void hci_uart_start_tx_wrapper(int uart_no)
{
@ -401,47 +450,51 @@ static int esp_intr_free_wrapper(void **ret_handle)
return rc;
}
void esp_bt_rtc_slow_clk_select(uint8_t slow_clk_src)
{
/* Select slow clock source for BT momdule */
switch (slow_clk_src) {
case MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL:
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using main XTAL as clock source");
uint32_t chip_version = efuse_hal_chip_revision();
if (chip_version == 0) {
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, slow_clk_src, (400 - 1));
} else{
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, slow_clk_src, (5 - 1));
}
break;
case MODEM_CLOCK_LPCLK_SRC_RC_SLOW:
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 136 kHz RC as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, slow_clk_src, (5 - 1));
break;
case MODEM_CLOCK_LPCLK_SRC_XTAL32K:
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using external 32.768 kHz XTAL as clock source");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, slow_clk_src, (1 - 1));
break;
case MODEM_CLOCK_LPCLK_SRC_RC32K:
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 32 kHz RC as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, slow_clk_src, (1 - 1));
break;
case MODEM_CLOCK_LPCLK_SRC_EXT32K:
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 32 kHz oscillator as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, slow_clk_src, (1 - 1));
break;
default:
}
}
IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
{
if (!s_ble_active) {
return;
}
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
uint32_t delta_tick;
uint32_t us_to_sleep;
uint32_t sleep_tick;
uint32_t tick_invalid = *(uint32_t*)(arg);
assert(arg != NULL);
if (!tick_invalid) {
sleep_tick = r_os_cputime_get32();
/* start a timer to wake up and acquire the pm_lock before modem_sleep awakes */
delta_tick = enable_tick - sleep_tick;
if (delta_tick & 0x80000000) {
return;
}
us_to_sleep = r_os_cputime_ticks_to_usecs(delta_tick);
if (us_to_sleep <= BTDM_MIN_TIMER_UNCERTAINTY_US) {
return;
}
esp_err_t err = esp_timer_start_once(s_ble_sleep_timer,
us_to_sleep - BTDM_MIN_TIMER_UNCERTAINTY_US);
if (err != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed\n");
return;
}
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
r_ble_rtc_wake_up_state_clr();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
esp_phy_disable(PHY_MODEM_BT);
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
esp_phy_disable();
s_ble_active = false;
}
@ -450,37 +503,51 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
if (s_ble_active) {
return;
}
esp_phy_enable();
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_acquire(s_pm_lock);
r_ble_rtc_wake_up_state_clr();
#endif //CONFIG_PM_ENABLE
esp_phy_enable(PHY_MODEM_BT);
s_ble_active = true;
}
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
static void ble_sleep_timer_callback(void * arg)
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
static esp_err_t sleep_modem_ble_mac_modem_state_init(uint8_t extra)
{
uint8_t size;
const sleep_retention_entries_config_t *ble_mac_modem_config = esp_ble_mac_retention_link_get(&size, extra);
esp_err_t err = sleep_retention_entries_create(ble_mac_modem_config, size, REGDMA_LINK_PRI_5, SLEEP_RETENTION_MODULE_BLE_MAC);
if (err == ESP_OK) {
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Modem BLE MAC retention initialization");
}
return err;
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif // CONFIG_PM_ENABLE
static void sleep_modem_ble_mac_modem_state_deinit(void)
{
sleep_retention_entries_destroy(SLEEP_RETENTION_MODULE_BLE_MAC);
}
void sleep_modem_light_sleep_overhead_set(uint32_t overhead)
{
esp_ble_set_wakeup_overhead(overhead);
}
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
esp_err_t controller_sleep_init(void)
{
esp_err_t rc = 0;
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled\n");
ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
500 + BLE_RTC_DELAY_US);
#ifdef CONFIG_PM_ENABLE
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_ON);
#endif // CONFIG_PM_ENABLE
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
BLE_RTC_DELAY_US_LIGHT_SLEEP);
#else
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
BLE_RTC_DELAY_US_MODEM_SLEEP);
#endif /* FREERTOS_USE_TICKLESS_IDLE */
#endif // CONFIG_BT_LE_SLEEP_ENABLE
#ifdef CONFIG_PM_ENABLE
@ -488,85 +555,141 @@ esp_err_t controller_sleep_init(void)
if (rc != ESP_OK) {
goto error;
}
esp_pm_lock_acquire(s_pm_lock);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
/* Create a new regdma link for BLE related register restoration */
rc = sleep_modem_ble_mac_modem_state_init(1);
assert(rc == 0);
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
esp_timer_create_args_t create_args = {
.callback = ble_sleep_timer_callback,
.arg = NULL,
.name = "btSlp"
};
rc = esp_timer_create(&create_args, &s_ble_sleep_timer);
rc = esp_pm_register_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
if (rc != ESP_OK) {
goto error;
}
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is ESP timer");
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#if SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
sleep_modem_register_mac_bb_module_prepare_callback(sleep_modem_mac_bb_power_down_prepare,
sleep_modem_mac_bb_power_up_prepare);
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
return rc;
error:
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
sleep_modem_unregister_mac_bb_module_prepare_callback(sleep_modem_mac_bb_power_down_prepare,
sleep_modem_mac_bb_power_up_prepare);
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
esp_sleep_disable_bt_wakeup();
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
}
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
esp_timer_delete(s_ble_sleep_timer);
s_ble_sleep_timer = NULL;
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_disable_bt_wakeup();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif //CONFIG_PM_ENABLE
#endif // CONFIG_PM_ENABLE
return rc;
}
void controller_sleep_deinit(void)
{
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
sleep_modem_unregister_mac_bb_module_prepare_callback(sleep_modem_mac_bb_power_down_prepare,
sleep_modem_mac_bb_power_up_prepare);
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
r_ble_rtc_wake_up_state_clr();
esp_sleep_disable_bt_wakeup();
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_AUTO);
sleep_modem_ble_mac_modem_state_deinit();
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#ifdef CONFIG_PM_ENABLE
/* lock should be released first */
if (s_ble_active) {
esp_pm_lock_release(s_pm_lock);
}
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
esp_timer_delete(s_ble_sleep_timer);
s_ble_sleep_timer = NULL;
}
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif //CONFIG_PM_ENABLE
}
typedef enum {
FILTER_DUPLICATE_PDUTYPE = BIT(0),
FILTER_DUPLICATE_LENGTH = BIT(1),
FILTER_DUPLICATE_ADDRESS = BIT(2),
FILTER_DUPLICATE_ADVDATA = BIT(3),
FILTER_DUPLICATE_DEFAULT = FILTER_DUPLICATE_PDUTYPE | FILTER_DUPLICATE_ADDRESS,
FILTER_DUPLICATE_PDU_ALL = 0xF,
FILTER_DUPLICATE_EXCEPTION_FOR_MESH = BIT(4),
FILTER_DUPLICATE_AD_TYPE = BIT(5),
}disc_duplicate_mode_t;
extern void r_filter_duplicate_mode_enable(disc_duplicate_mode_t mode);
extern void r_filter_duplicate_mode_disable(disc_duplicate_mode_t mode);
extern void r_filter_duplicate_set_ring_list_max_num(uint32_t max_num);
extern void r_scan_duplicate_cache_refresh_set_time(uint32_t period_time);
int
ble_vhci_disc_duplicate_mode_enable(int mode)
{
// TODO: use vendor hci to update
r_filter_duplicate_mode_enable(mode);
return true;
}
int
ble_vhci_disc_duplicate_mode_disable(int mode)
{
// TODO: use vendor hci to update
r_filter_duplicate_mode_disable(mode);
return true;
}
int ble_vhci_disc_duplicate_set_max_cache_size(int max_cache_size){
// TODO: use vendor hci to update
r_filter_duplicate_set_ring_list_max_num(max_cache_size);
return true;
}
int ble_vhci_disc_duplicate_set_period_refresh_time(int refresh_period_time){
// TODO: use vendor hci to update
r_scan_duplicate_cache_refresh_set_time(refresh_period_time);
return true;
}
/**
* @brief Config scan duplicate option mode from menuconfig (Adapt to the old configuration method.)
*/
void ble_controller_scan_duplicate_config(void)
{
uint32_t duplicate_mode = FILTER_DUPLICATE_DEFAULT;
uint32_t cache_size = 100;
#if CONFIG_BT_LE_SCAN_DUPL == true
cache_size = CONFIG_BT_LE_LL_DUP_SCAN_LIST_COUNT;
if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 0) {
duplicate_mode = FILTER_DUPLICATE_ADDRESS | FILTER_DUPLICATE_PDUTYPE;
} else if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 1) {
duplicate_mode = FILTER_DUPLICATE_ADVDATA;
} else if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 2) {
duplicate_mode = FILTER_DUPLICATE_ADDRESS | FILTER_DUPLICATE_ADVDATA;
}
duplicate_mode |= FILTER_DUPLICATE_EXCEPTION_FOR_MESH;
ble_vhci_disc_duplicate_set_period_refresh_time(CONFIG_BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD);
#endif
ble_vhci_disc_duplicate_mode_disable(0xFFFFFFFF);
ble_vhci_disc_duplicate_mode_enable(duplicate_mode);
ble_vhci_disc_duplicate_set_max_cache_size(cache_size);
}
esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
{
uint8_t mac[6];
esp_err_t ret = ESP_OK;
ble_npl_count_info_t npl_info;
uint32_t slow_clk_freq = 0;
memset(&npl_info, 0, sizeof(ble_npl_count_info_t));
@ -608,43 +731,89 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto free_mem;
}
/* Initialize the global memory pool */
ret = os_msys_buf_alloc();
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "os msys alloc failed");
goto free_mem;
}
os_msys_init();
#if CONFIG_BT_NIMBLE_ENABLED
/* ble_npl_eventq_init() needs to use npl functions in rom and
* must be called after esp_bt_controller_init().
*/
ble_npl_eventq_init(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
/* Enable BT-related clocks */
modem_clock_module_enable(PERIPH_BT_MODULE);
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL, 249);
modem_clock_module_mac_reset(PERIPH_BT_MODULE);
/* Select slow clock source for BT momdule */
#if CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL
esp_bt_rtc_slow_clk_select(MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL);
slow_clk_freq = 100000;
#else
#if CONFIG_RTC_CLK_SRC_INT_RC
esp_bt_rtc_slow_clk_select(MODEM_CLOCK_LPCLK_SRC_RC_SLOW);
slow_clk_freq = 30000;
#elif CONFIG_RTC_CLK_SRC_EXT_CRYS
if (rtc_clk_slow_src_get() == SOC_RTC_SLOW_CLK_SRC_XTAL32K) {
esp_bt_rtc_slow_clk_select(MODEM_CLOCK_LPCLK_SRC_XTAL32K);
slow_clk_freq = 32768;
} else {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "32.768kHz XTAL not detected, fall back to main XTAL as Bluetooth sleep clock");
esp_bt_rtc_slow_clk_select(MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL);
slow_clk_freq = 100000;
}
#elif CONFIG_RTC_CLK_SRC_INT_RC32K
esp_bt_rtc_slow_clk_select(MODEM_CLOCK_LPCLK_SRC_RC32K);
slow_clk_freq = 32000;
#elif CONFIG_RTC_CLK_SRC_EXT_OSC
esp_bt_rtc_slow_clk_select(MODEM_CLOCK_LPCLK_SRC_EXT32K);
slow_clk_freq = 32000;
#else
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "Unsupported clock source");
assert(0);
#endif
#endif /* CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL */
esp_phy_modem_init();
esp_phy_enable();
esp_btbb_enable();
s_ble_active = true;
if (ble_osi_coex_funcs_register((struct osi_coex_funcs_t *)&s_osi_coex_funcs_ro) != 0) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "osi coex funcs reg failed");
ret = ESP_ERR_INVALID_ARG;
goto free_controller;
goto modem_deint;
}
#if CONFIG_SW_COEXIST_ENABLE
coex_init();
#endif // CONFIG_SW_COEXIST_ENABLE
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
interface_func_t bt_controller_log_interface;
bt_controller_log_interface = esp_bt_controller_log_interface;
uint8_t buffers = 0;
#if CONFIG_BT_LE_CONTROLLER_LOG_CTRL_ENABLED
buffers |= ESP_BLE_LOG_BUF_CONTROLLER;
#endif // CONFIG_BT_LE_CONTROLLER_LOG_CTRL_ENABLED
#if CONFIG_BT_LE_CONTROLLER_LOG_HCI_ENABLED
buffers |= ESP_BLE_LOG_BUF_HCI;
#endif // CONFIG_BT_LE_CONTROLLER_LOG_HCI_ENABLED
#if CONFIG_BT_LE_CONTROLLER_LOG_DUMP_ONLY
ret = r_ble_log_init_async(bt_controller_log_interface, false, buffers, (uint32_t *)log_bufs_size);
#else
ret = r_ble_log_init_async(bt_controller_log_interface, true, buffers, (uint32_t *)log_bufs_size);
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
goto modem_deint;
}
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
ret = ble_controller_init(cfg);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
goto modem_deint;
}
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble controller commit:[%s]", ble_controller_get_compile_version());
esp_ble_change_rtc_freq(slow_clk_freq);
ble_controller_scan_duplicate_config();
ret = os_msys_init();
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "msys_init failed %d", ret);
goto free_controller;
}
@ -653,7 +822,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "controller_sleep_init failed %d", ret);
goto free_controller;
}
ESP_ERROR_CHECK(esp_read_mac((uint8_t *)mac, ESP_MAC_BT));
swap_in_place(mac, 6);
esp_ble_ll_set_public_addr(mac);
@ -666,9 +834,12 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
free_controller:
controller_sleep_deinit();
os_msys_deinit();
ble_controller_deinit();
esp_btbb_disable();
esp_phy_disable();
modem_deint:
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
esp_phy_modem_deinit();
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
@ -676,7 +847,6 @@ free_controller:
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
free_mem:
os_msys_buf_free();
npl_freertos_mempool_deinit();
esp_unregister_npl_funcs();
npl_freertos_funcs_deinit();
@ -694,25 +864,22 @@ esp_err_t esp_bt_controller_deinit(void)
controller_sleep_deinit();
esp_btbb_disable();
os_msys_deinit();
if (s_ble_active) {
esp_phy_disable();
s_ble_active = false;
}
esp_phy_modem_deinit();
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
ble_controller_deinit();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#if CONFIG_BT_NIMBLE_ENABLED
/* De-initialize default event queue */
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
os_msys_buf_free();
esp_unregister_npl_funcs();
esp_unregister_ext_funcs();
@ -739,7 +906,14 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "invalid controller state");
return ESP_FAIL;
}
if (!s_ble_active) {
#if CONFIG_PM_ENABLE
esp_pm_lock_acquire(s_pm_lock);
#endif // CONFIG_PM_ENABLE
esp_phy_enable(PHY_MODEM_BT);
s_ble_active = true;
}
esp_btbb_enable();
#if CONFIG_SW_COEXIST_ENABLE
coex_enable();
#endif // CONFIG_SW_COEXIST_ENABLE
@ -755,6 +929,14 @@ error:
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
esp_btbb_disable();
if (s_ble_active) {
esp_phy_disable(PHY_MODEM_BT);
#if CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
s_ble_active = false;
}
return ret;
}
@ -770,6 +952,14 @@ esp_err_t esp_bt_controller_disable(void)
#if CONFIG_SW_COEXIST_ENABLE
coex_disable();
#endif
esp_btbb_disable();
if (s_ble_active) {
esp_phy_disable(PHY_MODEM_BT);
#if CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
s_ble_active = false;
}
ble_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
return ESP_OK;
}
@ -983,10 +1173,33 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
return (esp_power_level_t)tx_level;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end)
{
for (int i = 0; i < len; i++) {
esp_rom_printf("%02x ", addr[i]);
}
if (end) {
esp_rom_printf("\n");
}
}
#if (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED == true)
void esp_ble_controller_log_dump_all(bool output)
{
portMUX_TYPE spinlock = portMUX_INITIALIZER_UNLOCKED;
portENTER_CRITICAL_SAFE(&spinlock);
esp_panic_handler_reconfigure_wdts(5000);
BT_ASSERT_PRINT("\r\n[DUMP_START:");
r_ble_log_async_output_dump_all(output);
BT_ASSERT_PRINT(":DUMP_END]\r\n");
portEXIT_CRITICAL_SAFE(&spinlock);
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#if (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED)
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
#define BLE_SM_KEY_ERR 0x17
#if CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#include "mbedtls/aes.h"
#if CONFIG_BT_LE_SM_SC
@ -996,22 +1209,27 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
#include "mbedtls/cmac.h"
#include "mbedtls/ecdh.h"
#include "mbedtls/ecp.h"
static mbedtls_ecp_keypair keypair;
#endif // CONFIG_BT_LE_SM_SC
#else
#include "tinycrypt/aes.h"
#include "tinycrypt/constants.h"
#include "tinycrypt/utils.h"
#if CONFIG_BT_LE_SM_SC
#include "tinycrypt/cmac_mode.h"
#include "tinycrypt/ecc_dh.h"
#endif // CONFIG_BT_LE_SM_SC
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#if CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#if CONFIG_BT_LE_SM_SC
static mbedtls_ecp_keypair keypair;
#endif // CONFIG_BT_LE_SM_SC
#endif// CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
/* Based on Core Specification 4.2 Vol 3. Part H 2.3.5.6.1 */
static const uint8_t ble_sm_alg_dbg_priv_key[32] = {
0x3f, 0x49, 0xf6, 0xd4, 0xa3, 0xc5, 0x5f, 0x38, 0x74, 0xc9, 0xb3, 0xe3,
0xd2, 0x10, 0x3f, 0x50, 0x4a, 0xff, 0x60, 0x7b, 0xeb, 0x40, 0xb7, 0x99,
0x58, 0x99, 0xb8, 0xa6, 0xcd, 0x3c, 0x1a, 0xbd
};
int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey)
@ -1058,8 +1276,7 @@ int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_
}
/* Set PRNG */
if ((rc = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
NULL, 0)) != 0) {
if ((rc = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0)) != 0) {
goto exit;
}
@ -1109,19 +1326,10 @@ exit:
return 0;
}
/* based on Core Specification 4.2 Vol 3. Part H 2.3.5.6.1 */
static const uint8_t ble_sm_alg_dbg_priv_key[32] = {
0x3f, 0x49, 0xf6, 0xd4, 0xa3, 0xc5, 0x5f, 0x38, 0x74, 0xc9, 0xb3, 0xe3,
0xd2, 0x10, 0x3f, 0x50, 0x4a, 0xff, 0x60, 0x7b, 0xeb, 0x40, 0xb7, 0x99,
0x58, 0x99, 0xb8, 0xa6, 0xcd, 0x3c, 0x1a, 0xbd
};
#if CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
static int mbedtls_gen_keypair(uint8_t *public_key, uint8_t *private_key)
{
int rc = BLE_SM_KEY_ERR;
size_t olen = 0;
uint8_t pub[65] = {0};
mbedtls_entropy_context entropy = {0};
mbedtls_ctr_drbg_context ctr_drbg = {0};
@ -1143,11 +1351,11 @@ static int mbedtls_gen_keypair(uint8_t *public_key, uint8_t *private_key)
goto exit;
}
size_t olen = 0;
uint8_t pub[65] = {0};
if ((rc = mbedtls_ecp_point_write_binary(&keypair.MBEDTLS_PRIVATE(grp),
&keypair.MBEDTLS_PRIVATE(Q),
MBEDTLS_ECP_PF_UNCOMPRESSED,
&olen, pub, 65)) != 0) {
if ((rc = mbedtls_ecp_point_write_binary(&keypair.MBEDTLS_PRIVATE(grp), &keypair.MBEDTLS_PRIVATE(Q), MBEDTLS_ECP_PF_UNCOMPRESSED,
&olen, pub, 65)) != 0) {
goto exit;
}
@ -1163,7 +1371,7 @@ exit:
return 0;
}
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
/**
* pub: 64 bytes
@ -1187,7 +1395,7 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv)
if (uECC_make_key(pk, priv, &curve_secp256r1) != TC_CRYPTO_SUCCESS) {
return BLE_SM_KEY_ERR;
}
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
#endif // CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS
/* Make sure generated key isn't debug key. */
} while (memcmp(priv, ble_sm_alg_dbg_priv_key, 32) == 0);
@ -1195,7 +1403,8 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv)
swap_buf(&pub[32], &pk[32], 32);
swap_in_place(priv, 32);
#endif // CONFIG_BT_LE_SM_SC_DEBUG_KEYS
return 0;
}
#endif // (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED == true)
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
#endif // (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED)

View File

@ -39,8 +39,12 @@ extern "C" {
#define DEFAULT_BT_NIMBLE_WHITELIST_SIZE MYNEWT_VAL(BLE_LL_WHITELIST_SIZE)
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_NIMBLE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
#if defined(CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#else
#if CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY
@ -115,16 +119,19 @@ extern "C" {
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#if defined(CONFIG_BT_LE_POWER_CONTROL_ENABLED)
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (CONFIG_BT_LE_POWER_CONTROL_ENABLED)
#else
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED (0)
#endif
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#endif
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
@ -196,7 +203,7 @@ extern "C" {
#define BLE_LL_CONN_DEF_AUTH_PYLD_TMO_N (3000)
#define RTC_FREQ_N (160000) /* in Hz */
#define RTC_FREQ_N (32768) /* in Hz */
#define BLE_LL_TX_PWR_DBM_N (9)

Some files were not shown because too many files have changed in this diff Show More