Compare commits

...

484 Commits
fixes ... v5.3

Author SHA1 Message Date
e0991facf5 Merge branch 'bugfix/fix_esp32p4_deepsleep_gpio_wakeup_support_v5.3' into 'release/v5.3'
feat(esp_hw_support): support esp32p4 gpio/ext1 wakeup deepsleep (v5.3)

See merge request espressif/esp-idf!32164
2024-07-17 11:03:25 +08:00
c2cf3d7a0b Merge branch 'fix/stall_other_core_in_cpu_freq_switching_v5.3' into 'release/v5.3'
fix(esp_hw_support): stall another core during cpu/mem/apb freq switching (v5.3)

See merge request espressif/esp-idf!32163
2024-07-17 10:42:44 +08:00
51a102a467 feat(example): update gpio/ext1 wakeup avaliable IO num in example Kconfig 2024-07-16 22:00:40 +08:00
603ad059a3 fix(esp_hw_support): hold LP_IO mode if LP_PERI domain powerdown in sleep 2024-07-16 22:00:40 +08:00
074035aac5 feat(esp_hw_support): support esp32p4 gpio wakeup deepsleep 2024-07-16 21:58:45 +08:00
4c2b86f5fe fix(esp_hw_support): stall another core during cpu/mem/apb freq switching 2024-07-16 21:47:04 +08:00
02e19c4f9a Merge branch 'bugfix/wrong_ic_parameters_in_connect_v5.3' into 'release/v5.3'
fix(wifi): Fix issue of supplicant using wrong parameters to configure bss (Backport v5.3)

See merge request espressif/esp-idf!32068
2024-07-15 19:37:58 +08:00
28c124d210 Merge branch 'fix/fix_stuck_in_bootloader_random_enable_v5.3' into 'release/v5.3'
fix(esp_system): fix stuck in bootloader_random_enable after lightsleep (v5.3)

See merge request espressif/esp-idf!32021
2024-07-15 19:37:40 +08:00
5c180bf3b6 Merge branch 'feat/esp32p4eco_sleep_feature_update_v5.3' into 'release/v5.3'
feat(esp_hw_support): esp32p4eco1 sleep feature update (v5.3)

See merge request espressif/esp-idf!31682
2024-07-15 19:35:56 +08:00
172784733c Merge branch 'feat/wifi_remote_examples_v5.3' into 'release/v5.3'
fix(esp_wifi_remote): Using remote wifi on standard (protocol) examples (v5.3)

See merge request espressif/esp-idf!31903
2024-07-12 16:06:59 +08:00
8a0a093cd1 fix(wifi): fix esp32 host lack of lmac api issue 2024-07-12 13:59:32 +08:00
5deaedfab1 fix(wifi): Fix issue of supplicant using wrong parameters to configure bss
- Ensure that wpa_supplicant's state machine registers the requirement for rsnxe
  before deciding to add rsnxe to a assoc request.

Co-authored-by: jgujarathi <jash.gujarathi@espressif.com>
2024-07-12 10:16:15 +05:30
64ace5b6d8 fix(esp_hw_support): fix cpu_retention cache invalidate mask 2024-07-11 22:01:49 +08:00
edf14a1de1 fix(esp_hw_support): disable mpll clock after L1 dcache writeback 2024-07-11 13:59:42 +08:00
ed7dd46687 Merge branch 'feat/sdmmc_spi_no_crc_v5.3' into 'release/v5.3'
feat(sdmmc_io): support sending CMD53 with fixed address, bypass sdspi crc check (v5.3)

See merge request espressif/esp-idf!31075
2024-07-10 17:15:24 +08:00
108123d50c fix(esp_system): fix stuck in bootloader_random_enable after lightsleep 2024-07-10 14:22:39 +08:00
44f58ecb51 Merge branch 'fix/c6_bootloader_rng_enable_v5.3' into 'release/v5.3'
fix(bootloader_support): Fixed pattern in RNG enable function to avoid output on IO0 (v5.3)

See merge request espressif/esp-idf!31905
2024-07-05 16:22:06 +08:00
4e0d5c923d fix(sdmmc_io): fixed fixed_addr mode will still increase addr when splitting 2024-07-05 14:47:50 +08:00
42cf452da3 Merge branch 'fix/disable_ecdsa_key_manager_for_p4_v5.3' into 'release/v5.3'
fix(soc): Disable key manager and ECDSA peripheral support for esp32p4 (v5.3)

See merge request espressif/esp-idf!31768
2024-07-05 13:59:20 +08:00
33c3d327c5 Merge branch 'feat/esp32p4_default_rev_0.1_v5.3' into 'release/v5.3'
feat(esp32p4): make revision v0.1 the default version (v5.3)

See merge request espressif/esp-idf!31601
2024-07-05 10:52:02 +08:00
083db8a169 fix(bootloader_support): Fixed pattern in RNG enable function on C6 to avoid output on IO0 2024-07-04 11:36:31 +02:00
d9e4ec6c0a fix(examples): Add wifi_remote option to common connect example
* Add MQTT test configuration with WiFi on ESP32-P4
* Document esp_wifi_remote workflow in the example's README
2024-07-04 11:14:46 +02:00
ffe0de9607 Merge branch 'bugfix/fix_idfgh_12600_v5.3' into 'release/v5.3'
fix(coex): fix ESP32 Wi-Fi cant tx after sw_reset with BLE scan

See merge request espressif/esp-idf!31788
2024-07-04 10:56:30 +08:00
32334c7a25 Merge branch 'bugfix/fixed_hci_uart_error_on_esp32c6_esp32h2_v5.3' into 'release/v5.3'
feat(bluetooth/controller): Fixed the issue of unresponsiveness when using hci... (v5.3)

See merge request espressif/esp-idf!31750
2024-07-03 17:21:18 +08:00
a56a4b8980 fix(soc): Disable key manager and ECDSA peripheral support for esp32p4
The support is disabled only for ECO1 and below
2024-07-03 15:28:41 +08:00
9417e857a8 fix(coex): fix ESP32 Wi-Fi cant tx after sw_reset with BLE scan
Closes https://github.com/espressif/esp-idf/issues/13598
2024-06-28 14:33:40 +08:00
0291269573 fix(esp_hw_support): wait eFuse controller idle after sleep wakeup 2024-06-28 13:58:44 +08:00
6e1d598703 fix(esp_hw_support): reset smp core state if the sleep request is rejected by hardware 2024-06-28 13:58:44 +08:00
eb45491d00 feat(esp_hw_support): bypass rst_reason override for esp32p4eco1 2024-06-28 13:58:44 +08:00
fdb0dd23ca feat(esp_hw_support): support LP_Peripheral & CNNT power domain auto powerdown on esp32p4eco1 2024-06-28 13:58:44 +08:00
6b1a173030 Merge branch 'docs/fix_ulp_doxygen_comment_v5.3' into 'release/v5.3'
docs(ulp): fix doxygen comment formatting (v5.3)

See merge request espressif/esp-idf!31767
2024-06-28 12:27:57 +08:00
350d4c03da docs(ulp): fix doxygen comment formatting 2024-06-27 17:08:25 +08:00
zwl
2543313f80 feat(bluetooth/controller): Fixed the issue of unresponsiveness when using hci uart mode on ESP32-C5 2024-06-26 17:33:24 +08:00
zwl
d617f8d5b0 feat(bluetooth/controller): Fixed the issue of unresponsiveness when using hci uart mode on ESP32-C6 and ESP32-H2 2024-06-26 17:33:24 +08:00
91aab8e6fd Merge branch 'docs/update_c5_esp_timer_docs_v5.3' into 'release/v5.3'
docs(sys-time): add esp32c5 info into programming guide docs (v5.3)

See merge request espressif/esp-idf!31561
2024-06-25 16:59:37 +08:00
8cabe4380b docs(sys-time): add esp32c5 info into programming guide docs 2024-06-25 15:35:11 +08:00
4cfea9e864 Merge branch 'feat/put_bt_interface_code_to_rom_v5.3' into 'release/v5.3'
Feat/put bt interface code to rom (v5.3)

See merge request espressif/esp-idf!31549
2024-06-25 13:57:29 +08:00
e7b6fb75d4 Merge branch 'bugfix/fix_phy_cal_data_v5.3' into 'release/v5.3'
fix(phy): add phy calibration data check when mode is not none calibration(v5.3)

See merge request espressif/esp-idf!31480
2024-06-25 11:36:50 +08:00
d83e4bcfbe Merge branch 'fix/trigger_system_reset_in_brownout_isr_v5.3' into 'release/v5.3'
change(esp_system): trigger digital system reset in brownout isr  (v5.3)

See merge request espressif/esp-idf!31683
2024-06-25 09:40:51 +08:00
92c239d9b0 Merge branch 'docs/add_signature_verification_numbers_esp32p4_v5.3' into 'release/v5.3'
docs(secure_boot): Add secure boot signature verification time for esp32p4 (v5.3)

See merge request espressif/esp-idf!31688
2024-06-25 09:40:03 +08:00
e722672fcc Merge branch 'doc/p4_rng_v5.3' into 'release/v5.3'
docs(esp_hw_support): Adjusted RNG docs to reflect P4 changes (v5.3)

See merge request espressif/esp-idf!31658
2024-06-25 09:26:43 +08:00
2d397782d8 Merge branch 'docs/freertos_docs_for_c5_c61_v5.3' into 'release/v5.3'
docs(freertos): Enabled FreeRTOS docs for esp32c5 (v5.3)

See merge request espressif/esp-idf!31538
2024-06-25 01:01:00 +08:00
397b1e51a5 Merge branch 'fix/docs_wifi_get_sta_list_v5.3' into 'release/v5.3'
fix(docs): tcpip_adapter: Document replacement of tcpip_adapter_get_sta_list (v5.3)

See merge request espressif/esp-idf!31170
2024-06-25 00:58:33 +08:00
6c7c212f98 Merge branch 'feat/update-memory-layout-c5-mp_v5.3' into 'release/v5.3'
feat(heap): support heap and update memory layout on esp32c5-mp target (backport v5.3)

See merge request espressif/esp-idf!31040
2024-06-25 00:55:00 +08:00
c56b21bbd5 Merge branch 'bugfix/wifi-6570_v5.3' into 'release/v5.3'
backport v5.3: fix the issue of wifipwr losing its clock during sleep on the esp32c6 eco1

See merge request espressif/esp-idf!31602
2024-06-25 00:29:10 +08:00
8f9467dc2b Merge branch 'feature/support_esp32p4_dcdc_always_on_v5.3' into 'release/v5.3'
feat(esp_hw_support): support esp32p4 dcdc always on during lightsleep (v5.3)

See merge request espressif/esp-idf!31681
2024-06-24 20:12:51 +08:00
3105644642 feat(esp32p4): make revision v0.1 the default version 2024-06-24 20:11:02 +08:00
872319ac5e fix(phy): add phy calibration data check when mode is not none calibration 2024-06-24 20:05:09 +08:00
34e5669b7b Merge branch 'bugfix/wpa3_init_crash_v5.3' into 'release/v5.3'
fix(wpa_supplicant): Fix wpa3 AP crash because of dangling pointer (v5.3)

See merge request espressif/esp-idf!31540
2024-06-24 19:58:27 +08:00
11d946582c Merge branch 'bugfix/revert_c5_threshold_changes_v5.3' into 'release/v5.3'
Revert "fix(rom): fixed esprv_int_set_threshold on C5" (v5.3)

See merge request espressif/esp-idf!31507
2024-06-24 19:58:03 +08:00
0a1dc07248 Merge branch 'bugfix/fix_dhcp_pool_issue_on_dhcp_server_v5.3' into 'release/v5.3'
fix(lwip): fixed the dhcp pool error on dhcp server (v5.3)

See merge request espressif/esp-idf!31264
2024-06-24 19:43:41 +08:00
1ae89b72cb fix(wifi): fix the issue of wifipwr losing its clock during sleep on the esp32c6 eco1 2024-06-24 16:46:17 +08:00
18470061ab docs(secure_boot): Add secure boot signature verification time for esp32p4 2024-06-24 12:25:42 +05:30
31439dfd77 Merge branch 'ci/do_not_build_rmt_examples_when_not_supported' into 'release/v5.3'
fix(ci): build rmt examples as long as it's driver support is finished

See merge request espressif/esp-idf!31672
2024-06-24 14:39:37 +08:00
561146f52b fix(lwip): fixed the dhcp pool error on dhcp server 2024-06-24 14:21:28 +08:00
32c12e57da Merge branch 'contrib/github_pr_13951_v5.3' into 'release/v5.3'
Fix stack overflow bug for `examples/bluetooth/esp_hid_device` when using esp32s3 with nimble (GitHub PR) (v5.3)

See merge request espressif/esp-idf!31515
2024-06-24 14:05:08 +08:00
d6eedc04bf Revert "fix(intr): fixed intr threshhold min level on C5"
This reverts commit a6c2c4149d.
2024-06-24 13:57:57 +08:00
69ab9d7a17 Revert "fix(rom): fixed esprv_int_set_threshold on C5"
This reverts commit 171e0a21a1.
2024-06-24 13:57:57 +08:00
33e6eaaabf fix(wpa_supplicant): Fix wpa3 AP crash because of dangling pointer 2024-06-24 13:54:30 +08:00
04429c9042 change(esp_hw_support): update xtal_freq after assume to avoid mass print in DFS 2024-06-24 11:56:39 +08:00
6eae7bc996 change(esp_system): trigger digital system reset in brownout isr 2024-06-24 11:56:38 +08:00
dd5a5f1cf2 feat(esp_hw_support): support DCDC always on 2024-06-24 11:48:23 +08:00
79c48b4707 feat(esp_pm): add DCDC always on config 2024-06-24 11:48:18 +08:00
ce7393f67b Merge branch 'docs/esp32p4_storage_v5.3' into 'release/v5.3'
docs(storage): update esp32p4 storage programming guide (v5.3)

See merge request espressif/esp-idf!31600
2024-06-24 11:35:33 +08:00
fd6720c2e4 Merge branch 'fix/sdsdpi_example_esp32p4_add_ldo_config_v5.3' into 'release/v5.3'
fix(storage): Fix and update storage examples using SD cards for SoCs with SOC_SDMMC_IO_POWER_EXTERNAL 1 (ESP32-P4) (v5.3)

See merge request espressif/esp-idf!31029
2024-06-24 11:35:03 +08:00
8562e3be12 fix(ci): build rmt examples as long as it's driver support is finished 2024-06-24 10:50:11 +08:00
f7baa7feb2 fix(ble): added c6 config check for ble light sleep 2024-06-24 10:40:46 +08:00
zwl
a21f65cb5b feat(bluetooth/controller): adjust bt/porting code structure and delete redundant code 2024-06-24 10:40:33 +08:00
zwl
430d65225e feat(bluetooth/controller): update controller api name on ESP32-C5 2024-06-24 10:39:28 +08:00
zwl
064fa71277 feat(bluetooth/controller): update controller api name on ESP32-C2 2024-06-24 10:39:28 +08:00
zwl
9fbec0a819 feat(bluetooth/controller): update controller api name on ESP32-C6 and ESP32-H2 2024-06-24 10:39:28 +08:00
cabf41c1c6 Merge branch 'ci/disable_c5_build_v5.3' into 'release/v5.3'
ci: disable failing esp32c5 builds (v5.3)

See merge request espressif/esp-idf!31571
2024-06-21 16:45:17 +08:00
357e0f9bf1 docs(esp_hw_support): Adjusted RNG docs to reflect P4 changes 2024-06-21 09:58:08 +02:00
1b8bae3e15 Merge branch 'bugfix/wpa3_sta_mem_leak_v5.3' into 'release/v5.3'
Fix memory leak in wpa3 station mode (Backport v5.3)

See merge request espressif/esp-idf!31636
2024-06-21 13:38:55 +08:00
5d480b9e89 Merge branch 'ci/fix_misc_c5_ci_errors' into 'release/v5.3'
misc c5 ci errors (v5.3)

See merge request espressif/esp-idf!31625
2024-06-21 10:46:01 +08:00
9e95b9b29c fix(esp_wifi): Backport some fixes to v5.3
1. Fix issue of station PMF not getting reset when disconnecing from PMF connection
2. Fix a memory leak that occurs when the SAE connection is interrupted
3. Drop any received auth responses that use a different algorithm than the one currently in use
2024-06-20 15:29:05 +05:30
14d93dea75 feat(soc): Update efuse related soc_caps for c61 and c5 (MP/beta3) 2024-06-20 12:23:05 +08:00
7e5ab45fbb ci(rom): disable rom wdt test on C5 2024-06-20 12:22:56 +08:00
1056a02ba9 Merge branch 'feat/esp32c5_mp_uart_support_v5.3' into 'release/v5.3'
feat(uart): support HP/LP uart on ESP32C5 MP (backport v5.3)

See merge request espressif/esp-idf!31445
2024-06-20 10:31:05 +08:00
8bcedab874 Merge branch 'bugfix/free_memory_before_reattempt_v5.3' into 'release/v5.3'
fix(nimble): Clear resource before re-starting advertising (v5.3)

See merge request espressif/esp-idf!31570
2024-06-19 18:42:40 +08:00
dbe5a59412 docs(storage): update esp32p4 storage programming guide 2024-06-19 10:44:58 +02:00
8a668d6c03 ci: disable failing esp32c5 builds 2024-06-18 08:27:00 +02:00
81b43829a2 fix(nimble): Clear resource before re-starting advertising 2024-06-18 11:11:29 +05:30
ceb6ec92b3 docs(freertos): Enabled FreeRTOS docs for esp32c5
This commit enables the FreeRTOS doc build for esp32c5.
2024-06-17 08:53:48 +02:00
8887599119 Fix stack overflow bug for examples/bluetooth/esp_hid_device when using esp32s3 with nimble
Related to 60354c39a9
2024-06-14 14:28:59 +05:30
32c6ee8532 change(heap): Remove todo of closed ticket in memory_layout.c files
Leftover closed ticket removed from memory_layout.c on
the following targets:
- esp32c5
- esp32c6
- esp32h2
2024-06-14 08:20:02 +02:00
2ac0fc1f6a change(heap): Update soc_memory_regions on esp32c5
The array of memory regions is simplyfied by using the
macro defined in soc.h (for beta3 and mp respectively).
2024-06-14 08:20:02 +02:00
79b7e2cd97 fix(soc): Fix ROM stack start for esp32c5-mp
Update the value SOC_ROM_STACK_START to the expected
value from bootloader.ld memory map.
2024-06-14 08:20:02 +02:00
7d47aecaa8 Merge branch 'bugfix/wifi-5610_v5.3' into 'release/v5.3'
backport v5.3: fix the issue of tbtt interrupt miss caused by beacon monitor

See merge request espressif/esp-idf!31498
2024-06-14 06:51:17 +08:00
e2c042da21 Merge branch 'bugfix/esp32c6_update_ld_v5.3' into 'release/v5.3'
fix(wifi):esp32c6 update ld(Backport v5.3)

See merge request espressif/esp-idf!31499
2024-06-14 06:14:19 +08:00
ce145a2c92 fix(wifi):esp32c6 update ld 2024-06-13 20:18:59 +08:00
a3a9624ca2 fix(esp_wifi): fix the issue of tbtt interrupt miss caused by beacon monitor 2024-06-13 20:17:11 +08:00
e6230e49cb Merge branch 'feat/support_tg_retention_v5.3' into 'release/v5.3'
change(esp_hw_support): do TG WDT/Timer retention by needs (v5.3)

See merge request espressif/esp-idf!31486
2024-06-13 19:55:02 +08:00
9ddf01407f Merge branch 'bugfix/fix_ble_evt_time_v5.3' into 'release/v5.3'
fix(ble/controller): Update esp32 bt-lib (1e63e23) (v5.3)

See merge request espressif/esp-idf!31481
2024-06-13 19:54:30 +08:00
edc2bd8aab Merge branch 'bugfix/esp_rom_clic_thresh_bug_v5.3' into 'release/v5.3'
fix(rom): fixed esprv_int_set_threshold on C5/C61 (v5.3)

See merge request espressif/esp-idf!31490
2024-06-13 18:57:18 +08:00
a70355be55 Merge branch 'fix/fix_not_necessary_public_require_from_esp_system_to_btld_support_v5.3' into 'release/v5.3'
esp_system: fixed not necessary public require to bootloader_support (v5.3)

See merge request espressif/esp-idf!31453
2024-06-13 17:41:59 +08:00
02b60f59db Merge branch 'fix/backport_wifi_fixes_v5.3' into 'release/v5.3'
fix(wifi): backport some wifi fixes to v5.3

See merge request espressif/esp-idf!31476
2024-06-13 17:40:36 +08:00
aaf371027d fix(bt/controller): Fixed assert issue caused by DPORT access 2024-06-13 17:37:39 +08:00
171e0a21a1 fix(rom): fixed esprv_int_set_threshold on C5 2024-06-13 16:47:48 +08:00
f6348050e4 fix(ble/controller): Update esp32 bt-lib (1e63e23)
- Optimized GATT write and notify throughput on ESP32
- Fixed BLE connect timeout after using DTM on ESP32
- Added ke memory debug tools on ESP32
- Fixed memory leak issue when BLE SCAN and other event coexist on ESP32
2024-06-13 16:42:17 +08:00
2ab144dc3a fix(esp_hw_support): set pau entry backup configuration with link update 2024-06-13 14:08:37 +08:00
1854036f92 change(esp_hw_support): use union retention link priority definiation 2024-06-13 14:08:37 +08:00
26cb10acbf feat(esp_hw_support): optimize retention link info dump 2024-06-13 14:08:36 +08:00
a27aa02fa3 fix(esp_hw_support): use iterator for regdma_link_stats to save stack consume
Closes https://github.com/espressif/esp-idf/issues/13288
2024-06-13 14:08:36 +08:00
a641428941 fix(ci): use esp_rom_crc32_le in sleep retention frame check 2024-06-13 14:08:35 +08:00
d917f0fa1b ci(esp_driver_gptimer): add gptimer pd_top sleep retention test case 2024-06-13 14:08:35 +08:00
8093516420 ci(esp_system): add task watchdog pd_top sleep retention test case 2024-06-13 14:08:35 +08:00
3785506ec1 change(esp_driver_gptimer): do gptimer timer target retention by needs 2024-06-13 14:08:34 +08:00
ea142bb6d1 change(esp_hw_support): do timergroup watchdogs retention by needs 2024-06-13 14:08:26 +08:00
e282468502 Merge branch 'refactor/avoid_using_git_v5.3' into 'release/v5.3'
fix(tools): Avoiding crashing when Git is not present in system when acquiring IDF version (v5.3)

See merge request espressif/esp-idf!31432
2024-06-13 14:04:49 +08:00
3db95e4f0e Merge branch 'fix/cleanup_unaccessible_sha3_regs_v5.3' into 'release/v5.3'
fix(soc): Cleanup inaccessible SHA_3 registers from the header files (v5.3)

See merge request espressif/esp-idf!31440
2024-06-13 14:04:06 +08:00
ca36dff148 Merge branch 'docs/c5_core_docs_v5.3' into 'release/v5.3'
docs(core): update misc docs for C5 (v5.3)

See merge request espressif/esp-idf!31452
2024-06-13 14:03:45 +08:00
fea0f0cf26 Merge branch 'docs/fix_broken_links_v5.3' into 'release/v5.3'
docs(links): fix broken links found in CI (v5.3)

See merge request espressif/esp-idf!31271
2024-06-13 14:00:26 +08:00
c8264eb519 Merge branch 'docs/fix_doxygen_1_9_8_failure_v5.3' into 'release/v5.3'
docs(doxygen): fix misc issues with new version of doxygen (v5.3)

See merge request espressif/esp-idf!31186
2024-06-13 13:58:40 +08:00
7ac551b870 Merge branch 'docs/esp32p4_apptrace_v5.3' into 'release/v5.3'
docs(app_trace): Update docs for ESP32-P4 (v5.3)

See merge request espressif/esp-idf!31169
2024-06-13 13:58:00 +08:00
c48f84e0ac Merge branch 'fix/gdbgui_version_check_v5.3' into 'release/v5.3'
fix(tools): Use GDGBUI arguments based on its version (v5.3)

See merge request espressif/esp-idf!31037
2024-06-13 13:57:14 +08:00
4641392375 Merge branch 'feature/console_add_sbom_file_v5.3' into 'release/v5.3'
feat(system/console): Added argtable3 SBOM manifest file for SPDX file generation for console component (v5.3)

See merge request espressif/esp-idf!30943
2024-06-13 13:55:39 +08:00
7f0248f39a Merge branch 'docs/add_missing_usb_functions_to_esp32-c3_devkit_user_guides_v5.3' into 'release/v5.3'
Docs: Added missing USB functions to ESP32-C3 DevKit User Guides (v5.3)

See merge request espressif/esp-idf!30860
2024-06-13 13:54:43 +08:00
3ccffd46f1 fix(esp_wifi): Fix for issue in changing opmode when wps is enabled 2024-06-13 11:51:25 +08:00
c4bda59c31 fix(wifi): fix sta scan when connected cause bcn timeout loop issue 2024-06-13 11:50:45 +08:00
c3a47bf365 fix(wifi): fix configure gcmp failure issue 2024-06-13 11:50:01 +08:00
687a40df4e fix(wifi): do not send null data when scan start/done for mesh
Closes https://github.com/espressif/esp-idf/issues/13786
2024-06-13 11:49:21 +08:00
3b0e048f0e fix(wifi): fixed disable gcmp choose pairwise cipher wrong issue 2024-06-13 11:48:27 +08:00
bbf0d76ac3 fix(wifi):fix data len not correct in he actions 2024-06-13 11:47:52 +08:00
cb8670e2bc ci(flash): temp disable SOC_SPI_MEM_SUPPORT_WRAP 2024-06-13 11:26:35 +08:00
d83e7ea505 fix(esp_system): fixed not necessary public require to bootloader_support 2024-06-13 11:26:35 +08:00
f750f4c6f7 Merge branch 'feature/p4_lcdcam_dvp_cam_driver_v5.3' into 'release/v5.3'
feat(cam): add esp32-p4 lcd_cam dvp driver (v5.3)

See merge request espressif/esp-idf!31454
2024-06-13 11:04:54 +08:00
10f8cc42fb Merge branch 'esp32p4/add_adc_support_v5.3' into 'release/v5.3'
feat(adc): support ADC oneshot/continuous mode on ESP32P4(v5.3)

See merge request espressif/esp-idf!31367
2024-06-13 11:00:59 +08:00
321f51d416 Merge branch 'feat/add_hci_log_record_for_nimble_v5.3' into 'release/v5.3'
feat(bt/nimble): support hci log for nimble (backport v5.3)

See merge request espressif/esp-idf!31424
2024-06-13 10:44:16 +08:00
e819b8c0b9 Merge branch 'fix/incorrect_pma_config_esp32p4_v5.3' into 'release/v5.3'
fix(esp_hw_support): Fix incorrect PMA configuration for ESP32-P4 (v5.3)

See merge request espressif/esp-idf!31431
2024-06-13 00:06:26 +08:00
679df9ec6f feat(bt/nimble): support hci log for nimble 2024-06-12 19:24:36 +08:00
a326f15120 feat(adc): support ADC continuous mode on ESP32P4 2024-06-12 18:34:04 +08:00
cfc5da167d feat(soc): rename lp_adc and ahb_dma reg base on p4 2024-06-12 18:16:48 +08:00
e63d6582cc feat(adc): move adc periph enable/reset functions to ll layer 2024-06-12 18:16:45 +08:00
3f5037866b fix(dma): feat(adc): support ADC oneshot mod on ESP32P4 2024-06-12 18:16:41 +08:00
cf123b3626 feat(uart): support HP/LP uart on ESP32C5 MP v5.3 2024-06-12 18:15:22 +08:00
7f0673f634 Merge branch 'refactor/emac_alloc_dma_buffer_v5.3' into 'release/v5.3'
refactor(emac): use heap component API to allocate cached aligned DMA buffer (v5.3)

See merge request espressif/esp-idf!31457
2024-06-12 17:27:30 +08:00
54f30cc94b Merge branch 'feature/esp32c5mp_gdma_support_v5.3' into 'release/v5.3'
feat(gdma): add GDMA support for ESP32C5 MP (v5.3)

See merge request espressif/esp-idf!30897
2024-06-12 17:26:16 +08:00
fd7c809282 Merge branch 'fix/stray_sections_v5.3' into 'release/v5.3'
fix(system): print warning if stray section is found while linking (v5.3)

See merge request espressif/esp-idf!30948
2024-06-12 16:42:12 +08:00
ddbf9936d6 Merge branch 'feature/update-toolchain-to-esp-13.2.0_20240530_v5.3' into 'release/v5.3'
feat(tools): update toolchain version to esp-13.2.0_20240530 (v5.3)

See merge request espressif/esp-idf!31217
2024-06-12 16:35:50 +08:00
bbc44b486e feat(gdma): add GDMA support for ESP32C5 MP 2024-06-12 15:28:40 +08:00
b4dc51b873 Merge branch 'bugfix/fix_no_mem_coex_issue_v5.3' into 'release/v5.3'
fix(nimble): Added change to handle extra memory for ext adv reattempt (v5.3)

See merge request espressif/esp-idf!31444
2024-06-12 14:10:14 +08:00
46677555ed Merge branch 'bugfix/fix_ble_pktlen_change_v5.3' into 'release/v5.3'
Bugfix/fix ble pktlen change (v5.3)

See merge request espressif/esp-idf!31250
2024-06-12 14:06:39 +08:00
6e2950dde2 Merge branch 'backport/openthread_feature_53' into 'release/v5.3'
Backport some openthread related features (Backport v5.3)

See merge request espressif/esp-idf!30973
2024-06-12 14:03:18 +08:00
c349247236 refactor(emac): use heap component API to allocate cached aligned DMA buffer 2024-06-12 13:51:17 +08:00
367b0c16f1 Merge branch 'refactor/i2s_dma_buffer_allocation_v5.3' into 'release/v5.3'
refactor(i2s): clean up DMA buffer allocation (v5.3)

See merge request espressif/esp-idf!31451
2024-06-12 13:49:38 +08:00
de0990e58c feat(cam): add esp32-p4 lcd_cam dvp driver 2024-06-12 11:35:51 +08:00
f1df3eb99b docs(core): update misc docs for C5 2024-06-12 10:24:33 +08:00
7c62ad5434 Merge branch 'feature/ppa_add_test_cases_v5.3' into 'release/v5.3'
feat(ppa): add test cases to test PPA data correctness (v5.3)

See merge request espressif/esp-idf!31448
2024-06-12 10:22:17 +08:00
8ae12473b5 refactor(i2s): clean up DMA buffer allocation 2024-06-12 10:16:24 +08:00
f215c2fd41 Merge branch 'refactor/async_memcpy_allocate_dma_memory_v5.3' into 'release/v5.3'
refactor(async_memcpy): clean up memory allocation code (v5.3)

See merge request espressif/esp-idf!31429
2024-06-12 10:10:11 +08:00
07d53ad11a Merge branch 'bugfix/sdmmc_psram_esp32s3_v5.3' into 'release/v5.3'
fix(sdmmc): fix invalid data when reading/writing PSRAM buffers (v5.3)

See merge request espressif/esp-idf!31362
2024-06-12 03:02:38 +08:00
8377fe746a Merge branch 'fix/spi_sct_fix_descripter_oob_when_lager_then_4092_v5.3' into 'release/v5.3'
fix(spi_master): fix sct mode descripter oob when data lager then 4092 bytes (v5.3)

See merge request espressif/esp-idf!31089
2024-06-12 03:00:58 +08:00
e38e1a0389 Merge branch 'bugfix/check_i2s_intr_alloc_failure_v5.3' into 'release/v5.3'
fix(i2s): check gdma callback register state and add missed port2 on p4 (v5.3)

See merge request espressif/esp-idf!31426
2024-06-12 02:21:20 +08:00
0ef2599e3c Merge branch 'csi/add_no_backup_buffer_usage_verify_v5.3' into 'release/v5.3'
feat(csi): add verify to no backup buffer usage (v5.3)

See merge request espressif/esp-idf!30863
2024-06-12 02:07:32 +08:00
98e99e712f Merge branch 'feature/esp32c5_mp_gpio_support_v5.3' into 'release/v5.3'
Feature/esp32c5 mp gpio support (v5.3)

See merge request espressif/esp-idf!30884
2024-06-12 00:51:06 +08:00
943dd72da0 Merge branch 'feature/esp_emac_improvements_v5.3' into 'release/v5.3'
Feature/esp emac improvements (v5.3)

See merge request espressif/esp-idf!31368
2024-06-11 23:44:01 +08:00
39d0f4b650 feat(ppa): add test cases to test PPA data correctness 2024-06-11 21:59:05 +08:00
5c618745fe Merge branch 'feat/brownout_support_p4_v5.3' into 'release/v5.3'
feat(brownout): Add brownout detector support on esp32p4 (backport v5.3)

See merge request espressif/esp-idf!31094
2024-06-11 21:21:10 +08:00
dbf8726b47 Merge branch 'feat/esp32p4_xip_psram_v5.3' into 'release/v5.3'
psram: support xip_psram on esp32p4 (v5.3)

See merge request espressif/esp-idf!31044
2024-06-11 21:07:41 +08:00
32a2ddceaa fix(nimble): Added change to handle extra memory for ext adv reattempt 2024-06-11 17:43:32 +05:30
8445486303 fix(soc): Cleanup inaccessible SHA registers from the header files 2024-06-11 14:24:09 +05:30
e207b08e28 Merge branch 'change/rm_esp_dma_x_usage_in_doc_v5_3' into 'release/v5.3'
change(dma): remove esp_dma_x usage in programming guide

See merge request espressif/esp-idf!31430
2024-06-11 16:41:07 +08:00
4f11dd7e21 fix(tools): Avoid crashing when Git is used to acquire IDF version
Closes https://github.com/espressif/esp-idf/issues/13345
2024-06-11 09:39:09 +02:00
1c6a8b4521 Merge branch 'refactor/esp_lcd_io_header_files_v5.3' into 'release/v5.3'
i80_lcd: add help function to allocate draw buffer with proper alignment (v5.3)

See merge request espressif/esp-idf!31428
2024-06-11 15:27:08 +08:00
ffbb1aba5e Merge branch 'feat/isp_dvp_driver_v5.3' into 'release/v5.3'
isp: dvp driver (v5.3)

See merge request espressif/esp-idf!31261
2024-06-11 15:05:26 +08:00
3ffea37812 Merge branch 'bugfix/esp32c2_fixed_some_ble_issues_master_v5.3' into 'release/v5.3'
Bugfix/esp32c2 fixed some ble issues master (v5.3)

See merge request espressif/esp-idf!31232
2024-06-11 14:55:43 +08:00
0868604664 fix(esp_hw_support): Fix incorrect PMA configuration for ESP32-P4
- As the PMA entry that made some memory regions cacheable was
assigned the highest priority, some intermediate inaccessible
memory regions bypassed protection.

- Added tests for the same

- Verified that even after changing the priority of the PMA entry,
a write operation at SOC_IRAM_LOW + 0x40 (a random RAM cached address)
still needs the same number (29) of CPU cycles.
2024-06-11 12:23:06 +05:30
0b8952dc2e change(dma): remove esp_dma_x usage in programming guide 2024-06-11 14:35:57 +08:00
zwx
1de232fb98 feat(openthread): update BR lib 2024-06-11 14:25:45 +08:00
15512f4170 fix(openthread): remove the empty task for openthread tasklets 2024-06-11 14:25:45 +08:00
zwx
fd0ea43496 fix(802.15.4): fixed ieee802154 will sleep when only pm enabled 2024-06-11 14:25:02 +08:00
zwx
5887426bad feat(802154): log buffer full message in debug mode only 2024-06-11 14:25:02 +08:00
3860cc8dac feat(openthread): update openthread br lib 2024-06-11 14:25:01 +08:00
3efe49f26a feat(openthread): support openthread ephemeral key 2024-06-11 14:25:01 +08:00
zwx
01e02aec6c fix(802.15.4): fix a risk for receive_at and ignore bit8 for the frame length 2024-06-11 14:25:01 +08:00
zwx
d6a3ed0637 feat(openthread): remove the range for some configurations 2024-06-11 14:25:01 +08:00
zwx
784abd1ae0 feat(openthread): move iperf dependency into cli extension 2024-06-11 14:25:01 +08:00
b8122ec6b3 refactor(async_memcpy): clean up memory allocation code 2024-06-11 13:54:31 +08:00
b6bc597903 feat(i80_lcd): add help function to allocate draw buffer with proper alignment 2024-06-11 13:50:38 +08:00
33ac88cd31 change(esp_lcd): split header files by different IO interface 2024-06-11 13:50:37 +08:00
dafc3b3cd5 Merge branch 'feat/gdma_set_burst_size_v5.3' into 'release/v5.3'
feat(gdma): return alignment constraints required by the GDMA channel (v5.3)

See merge request espressif/esp-idf!31113
2024-06-11 11:59:03 +08:00
bee6044a24 Merge branch 'doc/update_readme_enc_adv_v5.3' into 'release/v5.3'
docs(nimble): Added chip information in enc_adv example README file (v5.3)

See merge request espressif/esp-idf!30773
2024-06-11 11:01:02 +08:00
84660a822a Merge branch 'bugfix/ble_gap_unpair_error_code_v5.3' into 'release/v5.3'
fix(nimble): Added return code in ble_gap_unpair error logs (v5.3)

See merge request espressif/esp-idf!31307
2024-06-11 11:00:49 +08:00
bde502ed27 Merge branch 'bugfix/bleqabr24-549_v5.3' into 'release/v5.3'
fix(ble_mesh): fix issues in mesh deinit_v5.3

See merge request espressif/esp-idf!30540
2024-06-11 11:00:10 +08:00
5634a3260e Merge branch 'feat/add_api_to_set_privacy_mode_v5.3' into 'release/v5.3'
feat(bt/bluedroid): support BLE set privacy mode (v5.3)

See merge request espressif/esp-idf!30906
2024-06-11 10:59:54 +08:00
cd4c71e20f fix(i2s): add the missed port2 for p4 2024-06-11 10:59:05 +08:00
ab81888705 fix(i2s): add check to gdma callback register 2024-06-11 10:55:22 +08:00
67f0bfa8bc Merge branch 'fix/ble_mesh_sar_bugfix_v5.3' into 'release/v5.3'
BLE Mesh SAR bugfix (v5.3)

See merge request espressif/esp-idf!30881
2024-06-11 10:49:52 +08:00
421c94ded5 Merge branch 'fix/ble_mesh_gatts_bugfix_v5.3' into 'release/v5.3'
BLE Mesh Gatts bugfix (v5.3)

See merge request espressif/esp-idf!30872
2024-06-11 10:49:09 +08:00
a31806d076 Merge branch 'feature/esp32c6_pu8m_in_sleep_support_v5.3' into 'release/v5.3'
feat(sleep): support 8m force pu in sleep for esp32c6 & esp32h2 (v5.3)

See merge request espressif/esp-idf!30999
2024-06-11 10:48:05 +08:00
da43ec0425 Merge branch 'fix/assert_in_bt_controller_v5.3' into 'release/v5.3'
fix(bt): fix some issues in bluetooth controller(backport v5.3)

See merge request espressif/esp-idf!31321
2024-06-11 10:45:17 +08:00
832337bdee Merge branch 'fix/support_union_lp_io_clk_control_v5.3' into 'release/v5.3'
fix(esp_driver_gpio): manage lp_io module clock by driver (v5.3)

See merge request espressif/esp-idf!31359
2024-06-11 10:45:00 +08:00
9230a25140 Merge branch 'bugfix/fix_lp_half_world_access_v5.3' into 'release/v5.3'
fix(hal): fix LP timer / PMU LL half word access (v5.3)

See merge request espressif/esp-idf!31386
2024-06-11 10:44:34 +08:00
f20f0ae8d1 Merge branch 'doc/update_esp32c6_power_statics_5.3' into 'release/v5.3'
docs(lowpower): updating low-power statistics in Wi-Fi scenarios (v5.3)

See merge request espressif/esp-idf!31209
2024-06-11 10:43:49 +08:00
726ed08ee2 Merge branch 'bugfix/mldv6_report_memory_leak_v5.3' into 'release/v5.3'
fix(esp_netif): Fix mldv6 report memory leak in esp_netif(v5.3)

See merge request espressif/esp-idf!31064
2024-06-11 10:43:14 +08:00
5feffad9a1 Merge branch 'bugfix/pm-108_v5.3' into 'release/v5.3'
backport v5.3: fix the issue of tg0 watchdog reset caused by wifi module retention

See merge request espressif/esp-idf!31011
2024-06-11 10:42:38 +08:00
eac00e82d1 Merge branch 'bugfix/loadprohibited_after_bt_deinit_v5.3' into 'release/v5.3'
Fixed some coexist issues

See merge request espressif/esp-idf!31003
2024-06-11 10:42:16 +08:00
dbccfbb2e7 change(isp): don't init unnecessary isp pipeline items when doing isp_new_processor 2024-06-11 10:18:16 +08:00
be9c4ebf44 fix(isp): reverted only raw8 input limits 2024-06-11 10:18:16 +08:00
de1d006ba3 change(isp): change isp_af_window_t to isp_window_t 2024-06-11 10:18:16 +08:00
f58b63d31e test(isp_dvp): added isp_dvp test 2024-06-11 10:18:16 +08:00
9713bd63a4 fix(csi): fixed csi wrong state machine settings 2024-06-11 10:18:16 +08:00
05f44bddf0 feat(isp): added isp dvp driver 2024-06-11 10:18:16 +08:00
65d9300b5c Merge branch 'bugfix/esp32h2_iomux_retention_v5.3' into 'release/v5.3'
fix(gpio): fix IO 21-27 IOMUX registers not being backed up on ESP32H2 (v5.3)

See merge request espressif/esp-idf!31190
2024-06-11 10:01:07 +08:00
0a3d59a4fa Merge branch 'docs/update_getting_started_for_esp32p4_support_v5.3' into 'release/v5.3'
Docs/update getting started for esp32p4 support (v5.3)

See merge request espressif/esp-idf!31114
2024-06-11 09:44:13 +08:00
45c7eb4d4b Merge branch 'feature/make_heap_alloc_caps_align_memory2_v5.3' into 'release/v5.3'
Align memory requested from heap component to hw requirements (v5.3)

See merge request espressif/esp-idf!31195
2024-06-11 09:42:04 +08:00
a71f265d25 Merge branch 'feature/lp_core_intr_panic_v5_3' into 'release/v5.3'
feat(ulp): support interrupts and panic for C6/P4 LP core (v5.3)

See merge request espressif/esp-idf!31189
2024-06-11 09:41:51 +08:00
b2dcc24335 Merge branch 'bugfix/clic_intr_thresh_v5.3' into 'release/v5.3'
fix(intr): fixed intr threshhold min level on C5 (v5.3)

See merge request espressif/esp-idf!31272
2024-06-11 09:41:31 +08:00
88c0ea49e3 Merge branch 'feat/ai_coproc_support_esp32p4_v5.3' into 'release/v5.3'
feat(riscv): add support for PIE coprocessor and HWLP feature (backport v5.3)

See merge request espressif/esp-idf!31020
2024-06-11 09:41:06 +08:00
cc869c6ab5 Merge branch 'refactor/usb_mock_classes_v5.3' into 'release/v5.3'
refactor(usb): Split test device descriptors from mock classes (v5.3)

See merge request espressif/esp-idf!31413
2024-06-11 00:41:53 +08:00
87fd8b41d8 Merge branch 'bugfix/jpeg_error_handle_v5.3' into 'release/v5.3'
fix(jpeg): Modify jpeg deocde/encode error handling logic (backport v5.3)

See merge request espressif/esp-idf!31159
2024-06-10 03:28:52 +08:00
fccc309499 fix(jpeg): Modify jpeg deocde/encode error handling logic (backport v5.3) 2024-06-10 03:28:52 +08:00
9aea2d3395 Merge branch 'fix/peripheral_driver_kconfig_inconsistence_v5.3' into 'release/v5.3'
fix(kconfig): fixed peripheral driver kconfig inconsistencies (v5.3)

See merge request espressif/esp-idf!31294
2024-06-10 03:27:38 +08:00
6192507987 fix(usb): Make string descriptor checks in unit tests optional
Checking for an exact match for product or serial and string descriptors can
lead to test failures if the USB devices connected to the runner is changed. This
commit adds some kconfig options to make the string descriptor checks optional,
with the product and serial string checks being disabled by default.
2024-06-09 12:34:37 +08:00
7f61f74aa0 refactor(usb): Split test device descriptors from mock class files
Previously, descriptors of the test devices were stored direclty in the mock
device files (e.g., "mock_[hid|msc].[h|c]"). This commit splits out the device
descriptors to separate files (e.g., "dev_[hid|msc].c") along with getter
functions.

Users that want to run the tests locally on a different device simply need to
update the "dev_[hid|msc].c" file for their device.
2024-06-09 10:43:25 +08:00
7474a450c2 refactor(usb): Rename mock class files
- Rename "test_usb_mock_..." class files to "mock_..."
- Fixed some codespell issues
- Fixed comment spacing
2024-06-09 10:43:20 +08:00
41515a9086 Merge branch 'feature/parlio_rx_driver_p4_v5.3' into 'release/v5.3'
feat(parlio_rx): supported parlio rx on p4 (v5.3)

See merge request espressif/esp-idf!31096
2024-06-07 22:54:08 +08:00
4787e928a2 Merge branch 'feat/isp_bf_feature_v5.3' into 'release/v5.3'
feat(isp): added isp bf driver (v5.3)

See merge request espressif/esp-idf!31067
2024-06-07 22:52:17 +08:00
c9f8fc0405 Merge branch 'fix/example_blink_esp32h2_v5.3' into 'release/v5.3'
fix(blink): fix sdkconfig defaults name for esp32h2 (v5.3)

See merge request espressif/esp-idf!31340
2024-06-07 22:50:31 +08:00
12d480423b Merge branch 'feature/esp32p4_ppa_driver_support_v5.3' into 'release/v5.3'
feat(ppa): add PPA driver support for ESP32P4 (v5.3)

See merge request espressif/esp-idf!31074
2024-06-07 22:48:49 +08:00
e148263565 Merge branch 'bugfix/mipi_dsi_rgb666_color_pixel_v5.3' into 'release/v5.3'
fix(dsi): fixed wrong RGB666 pixel size (v5.3)

See merge request espressif/esp-idf!31152
2024-06-07 22:47:47 +08:00
5d844e57ed change(rgb_lcd): set DMA transfer burst size 2024-06-07 22:44:18 +08:00
b2ff20d94c change(i80_lcd): set DMA transfer burst size 2024-06-07 22:44:18 +08:00
e8852d5c38 change(async_memcpy): set DMA transfer burst size 2024-06-07 22:44:18 +08:00
2f0c9b3584 feat(gdma): set burst size and return alignment constraint
burst size can affect the buffer alignment
2024-06-07 22:44:18 +08:00
09cbbaaf7c fix(esp_eth): Fixed another memory leak ESP MAC 2024-06-07 15:26:18 +02:00
dab7fdd6f0 fix(esp_eth): fixing memory leak and invalid bit shift 2024-06-07 15:26:18 +02:00
d6b3b8feeb feat(esp_eth): added example to deinit Ethernet 2024-06-07 15:26:18 +02:00
f6420436eb feat(esp_eth): a new folder structure of the driver and other improvements
Fixed memory leak in emac_esp_new_dma function.

Polished ESP EMAC cache management.

Added emac_periph definitions based on SoC features and improved(generalized) ESP EMAC GPIO
initialization.

Added ESP EMAC GPIO reservation.

Added check for frame error condition indicated by EMAC DMA and created a target test.
2024-06-07 15:26:18 +02:00
23cfe0826b Merge branch 'fix/aes_operation_using_psram_memory_with_psram_enc_v5.3' into 'release/v5.3'
Enable AXI-DMA AES-ECC mean access when external memory encryption is enabled (v5.3)

See merge request espressif/esp-idf!30822
2024-06-07 19:17:38 +08:00
30ea848335 Merge branch 'feature/update_cjson_version_to_1.7.18_v5.3' into 'release/v5.3'
feat(cjson): update submodule to v1.7.18 (v5.3)

See merge request espressif/esp-idf!31014
2024-06-07 19:17:23 +08:00
6a86351373 fix(hal): fix PMU LL half word and byte access 2024-06-07 14:13:40 +08:00
e5429b256a fix(hal): fix LP timer LL half word access 2024-06-07 14:13:39 +08:00
4daaa9c587 fix(bod): Disable fib in bootloader so that interrupt can be triggered properly 2024-06-07 10:38:14 +08:00
091da3d631 fix(esp_driver_gpio): manage lp_io module clock by driver
Closes https://github.com/espressif/esp-idf/issues/13683
2024-06-06 19:27:57 +08:00
c8474d48f8 fix(sdmmc): fix invalid data when reading/writing PSRAM buffers
Previous commit has enabled buffers in PSRAM for ESP32-P4. But this
also caused a regression for ESP32-S3, where PSRAM is not DMA capable.
This commit re-introduces the check for esp_ptr_external_ram in case
SOC_SDMMC_PSRAM_DMA_CAPABLE is not set.
2024-06-06 10:44:53 +02:00
6e7a9de65e fix(blink): fix sdkconfig defaults name 2024-06-05 16:30:23 +07:00
6cd960928a fix(bt): fix some issues in bluetooth controller
1: fix return incorrect link key with hci command rd_stored_link_key
2: fix the assert triggered during APB TX
3: fix role switch LMP collision bug
2024-06-05 09:05:29 +08:00
b07a1470c5 feat(tools): update toolchain version to esp-13.2.0_20240530 2024-06-04 18:35:17 +04:00
737b5edd5b fix(nimble): Added return code in ble_gap_unpair error logs 2024-06-04 14:46:13 +05:30
d9f9f79270 fix(kconfig): fixed peripheral driver kconfig inconsistencies 2024-06-04 10:19:31 +08:00
a6c2c4149d fix(intr): fixed intr threshhold min level on C5 2024-06-03 12:44:32 +08:00
fe32b34b20 docs(links): fix broken links found in CI 2024-06-03 12:42:25 +08:00
ae876915ec Merge branch 'fix/backport_wifi_fixes_v5.3' into 'release/v5.3'
fix(wifi): Add back WIFI_AUTH_WPA3_EXT_PSK and WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE

See merge request espressif/esp-idf!31218
2024-06-03 10:36:46 +08:00
1542b768fd fix(ble/bluedroid): Optimize BLE stack connect callback name 2024-06-02 17:36:35 +08:00
e10c977834 fix(ble/bluedroid): Fixed BLE no data length change event 2024-06-02 17:36:35 +08:00
zwl
9ab7f325cc ble: fixed ble some issues on esp32c6 and esp32h2 2024-05-31 17:13:31 +08:00
zwl
bbe96641b1 ble: fixed ble some issues on esp32c2 2024-05-31 17:13:31 +08:00
e22c101034 fix(wifi): Add back WIFI_AUTH_WPA3_EXT_PSK and WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE
Add back above authmodes instead of removing and merging them with WIFI_AUTH_WPA3_PSK
in minor releases during v5.x.

These authmodes will be removed from v6.0
2024-05-31 13:50:54 +08:00
63f019565b fix(wifi): fix send mgmt err when eapol process 2024-05-31 13:50:12 +08:00
3a5ba85419 docs(lowpower): updating low-power statistics in Wi-Fi scenarios 2024-05-30 21:54:32 +08:00
a168f4cc9b fix(ble_mesh): fix issues in mesh deinit 2024-05-30 20:37:31 +08:00
df4195062d change(system): heap_caps_alloc returns aligned memory if caps indicate a need for it
The implicit promise of heap_alloc_caps() and friends is that the memory it
returns is fit for the purpose as requested in the caps field. Before
this commit, that did not happen; e.g. DMA-capable memory wass returned
from a correct region, but not aligned/sized to something the DMA subsystem
can handle.

This commit adds an API to the esp_mm component that is then used by the
heap component to adjust allocation alignment, caps and size dependent on
the hardware requirement of the requested allocation caps.
2024-05-30 16:02:03 +08:00
8800e9d0e5 fix(gpio): fix IO 21-27 IOMUX registers not being backed up on ESP32H2 2024-05-30 15:13:58 +08:00
2f1b81cd14 feat(ulp): add pulse counter example for lp core 2024-05-30 14:41:47 +08:00
87d4172ee5 feat(ulp): add lp core panic handler 2024-05-30 14:41:31 +08:00
7f9b5deae1 feat(ulp): support interrupts for C6/P4 LP core
Closes https://github.com/espressif/esp-idf/issues/13059
2024-05-30 14:40:23 +08:00
3d959421b1 docs(doxygen): fix misc issues with new version of doxygen 2024-05-30 13:42:06 +08:00
52a922f953 fix(wifi): fixed the issue of tg0 watchdog reset caused by wifi module retention 2024-05-29 20:50:53 +08:00
baf6028974 fix(docs): tcpip_adapter: Document replacement of tcpip_adapter_get_sta_list 2024-05-29 13:44:26 +02:00
60c2068fef docs(app_trace): Update docs for ESP32-P4 2024-05-29 14:31:34 +03:00
10f89fe52e fix(ppa): fix mismatching writeback and invalidate data size on the same buffer 2024-05-29 14:35:26 +08:00
b1b182f258 change(dsi): use DW_GDMA as the flow controller
previously the DSI_Bridge was set as the flow controller
2024-05-29 12:32:03 +08:00
1129f0834e fix(dsi): fixed wrong RGB666 pixel size 2024-05-29 12:32:03 +08:00
58ebdb7ae3 change(image): move image_process driver from bootloader_support to esp_system 2024-05-29 10:02:44 +08:00
48e06fafea feat(xip_psram): support xip psram feature on esp32p4 2024-05-29 10:02:44 +08:00
6bb35c551c docs: Updated Getting Started for ESP32-P4 support 2024-05-28 11:52:06 +08:00
0be44b6ccc feat(gpio): fix gpio matrix const input addr on C5 MP 2024-05-27 18:13:58 +08:00
bf604e91a6 feat(gpio): remove io_mux_reg array in gpio_periph.c from c5 2024-05-27 18:13:42 +08:00
dcc7cf9379 feat(parlio_rx): support parlio rx on p4 2024-05-27 17:20:15 +08:00
5a7a9c0638 test(esp_intr_dump): Fix the esp intr dump expected output because the changes happened in brownout 2024-05-27 16:41:18 +08:00
91cedfe89d feat(brownout): Add brownout detector support on esp32p4 2024-05-27 16:40:45 +08:00
0d94b1cd89 fix(spi_master): fix sct mode descripter oob when data lager then 4092 bytes 2024-05-27 15:01:38 +08:00
1b1005a1d8 feat(ppa): add PPA driver support for ESP32P4 2024-05-27 11:34:47 +08:00
096db7521b feat(sdmmc_io): support sending CMD53 with fixed address 2024-05-24 20:27:57 +08:00
cc48efc6ec feat(isp): added isp bf driver 2024-05-24 16:46:00 +08:00
88b300d064 fix(esp_netif): Fix mldv6 report memory leak in esp_netif 2024-05-24 15:33:55 +08:00
f9b58b0c73 change(mmu): fix spell issue 2024-05-23 15:42:04 +08:00
3a7aafe7d6 fix(ble_mesh): change tx/rx lock to recursive mutex to avoid dead lock 2024-05-23 15:41:58 +08:00
e23d24a65d fix(ble_mesh): reference net_buf on correct positions 2024-05-23 15:41:58 +08:00
687064b2f8 change(cpu_start): added note about internal ram only stage 2024-05-23 15:41:35 +08:00
168ff6e268 bugfix(cpu_start): check c3 efuse error log on ram app condition
Prior to this commit, esp_efuse_check_errors() is only called when it's
2nd stage btld app.

This commit moves this error check so under all conditions (including
ram app, pure ram app) will check this efuse error
2024-05-23 15:41:30 +08:00
8e66d38959 refactor(cpu_start): move uni/multi core log later 2024-05-23 15:41:25 +08:00
5890c7450d fix(tools): Use GDGBUI arguments based on its version
Closes https://github.com/espressif/esp-idf/issues/13665
2024-05-23 07:35:55 +02:00
2c96e097c9 fix(ble_mesh): Create service after service register success 2024-05-23 12:16:46 +08:00
f3b7e0502a ci(examples/storage): Enable perf_benchmark spiflash example and build others 2024-05-22 17:00:53 +02:00
2f10ca582b fix(storage): Fix SD card examples for SoCs with SOC_SDMMC_IO_POWER_EXTERNAL 1 2024-05-22 17:00:53 +02:00
0928ff027b fix(riscv): make HWLP feature use direct saving of lazy saving 2024-05-22 16:58:31 +08:00
6eba7a536a feat(riscv): add support for PIE coprocessor and HWLP feature
FreeRTOS tasks may now freely use the PIE coprocessor and HWLP feature.
Just like the FPU, usiing these coprocessors result in the task being pinned
to the core it is currently running on.
2024-05-22 16:58:31 +08:00
75faae29a8 feat(cjson): update submodule to v1.7.18
Changelog: https://github.com/DaveGamble/cJSON/releases/tag/v1.7.18
2024-05-22 13:34:31 +05:30
0c3a0d6c9a fix(coex): Fixed some coexist issues
- Fixed crash issue in coexist callback
- Fixed coexist scheme status update issue
2024-05-22 11:51:44 +08:00
9f04d1ac36 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(a771b7c)
- Fixed assert when starting advertising due to preemption
- Fixed RPA generation after each reboot
- Fixed RPA renew timer start and stop
2024-05-22 11:51:44 +08:00
b8d9da5c03 feat(sleep): support 8m force pu in sleep for esp32c6/esp32h2 2024-05-22 11:35:00 +08:00
52b9c5d666 feat(bt/bluedroid): support BLE set privacy mode 2024-05-22 10:43:37 +08:00
3f632df143 Merge branch 'ci/update-known-failed-cases-file-name(v5.3)' into 'release/v5.3'
ci: add 5.3 known failed cases file

See merge request espressif/esp-idf!30978
2024-05-22 07:42:26 +08:00
5ec2be4ba3 Merge branch 'fix/websocket_first_packet_v5.3' into 'release/v5.3'
fix(ws_transport): fixed `server-key` corruption (backport v5.3)

See merge request espressif/esp-idf!30963
2024-05-22 07:41:55 +08:00
1d3d63c438 Merge branch 'bugfix/fix_resetting_redirect_counter_v5.3' into 'release/v5.3'
fix: reset redirect counter for using same handler (v5.3)

See merge request espressif/esp-idf!30935
2024-05-22 07:41:24 +08:00
e7ba614a04 Merge branch 'set_gdb_remotetimeout_v5.3' into 'release/v5.3'
tools(gdbinit): set remote timeout for the gdb connection (v5.3)

See merge request espressif/esp-idf!30804
2024-05-22 07:40:07 +08:00
dbf757118a Merge branch 'bugfix/free_controlle_memory_in_init_fail_v5.3' into 'release/v5.3'
fix(nimble): Free controller memory if init fails (v5.3)

See merge request espressif/esp-idf!30749
2024-05-22 07:39:47 +08:00
0c2c962b19 Merge branch 'coredump_sanity_check_v5.3' into 'release/v5.3'
fix(coredump): increase sanity check before get summary (v5.3)

See merge request espressif/esp-idf!30527
2024-05-22 07:39:23 +08:00
1f0d27a2c6 Merge branch 'fix/pytest_session_dir_v5.3' into 'release/v5.3'
ci: apply new fix in pytest-embedded 1.10 (v5.3)

See merge request espressif/esp-idf!30676
2024-05-22 07:38:23 +08:00
1aaae85ad2 Merge branch 'bugfix/esp32c6eco1_coex_ble_deinit_wifi_bcn_timeout_v5.3' into 'release/v5.3'
backport v5.3: fix the issue where deinit ble in a coexist scenario causes the wifi mac tsf counter to stop

See merge request espressif/esp-idf!30981
2024-05-22 07:37:41 +08:00
85048f35e3 Merge branch 'bugfix/stop_tg_wdt_in_xpd_xtal_lightsleep_v5.3' into 'release/v5.3'
fix(esp_hw_support): stop tg wdt in xpd xtal lightsleep (v5.3)

See merge request espressif/esp-idf!30992
2024-05-22 07:37:32 +08:00
1a7c782905 Merge branch 'fix/backport_wifi_fixes_v5.3' into 'release/v5.3'
Fix(wifi):backport wifi fixes v5.3

See merge request espressif/esp-idf!30994
2024-05-22 07:37:14 +08:00
cf4cf23741 Merge branch 'contrib/github_pr_13560_v5.3' into 'release/v5.3'
esp_eth: DP83848: correct link detection to use BMSR (GitHub PR) (v5.3)

See merge request espressif/esp-idf!30450
2024-05-21 23:42:21 +08:00
236556d1ea Merge branch 'contrib/github_pr_13669_v5.3' into 'release/v5.3'
docs: clarify ESP_RETURN_ON_ERROR result (GitHub PR) (v5.3)

See merge request espressif/esp-idf!30405
2024-05-21 23:41:51 +08:00
07669b8012 Merge branch 'fix/core1_access_cache_when_core0_close_cache_during_sleep_v5.3' into 'release/v5.3'
fix(esp_system): fix core1 access cache when core0 close cache during sleep(backport v5.3)

See merge request espressif/esp-idf!30942
2024-05-21 23:41:17 +08:00
e13bb3d734 fix(esp32c6): fix the issue of except wifi state caused by the missing mac retention config 2024-05-21 21:34:30 +08:00
bb4ba96545 Merge branch 'feat/axi_icm_qos_v5.3' into 'release/v5.3'
feat(axi_icm): AXI interconnect QoS (v5.3)

See merge request espressif/esp-idf!30980
2024-05-21 21:24:36 +08:00
1bf9c822f9 feat(wifi): support coex pwr 2024-05-21 20:57:46 +08:00
bb466097e5 feat(wifi): add softap csa&dtim&wait_bcast_data setting and ignore err nodata 2024-05-21 20:57:06 +08:00
8b369072f9 fix(esp_hw_support/sleep): stop TG0/TG1 watchdog if XTAL not power down in lightsleep 2024-05-21 20:30:28 +08:00
d91dfe3510 change(esp_hw_support/sleep): improve esp32c3 systimer stall bug workaround 2024-05-21 20:30:24 +08:00
2396dc5ff7 fix(wifi): fix the issue where deinit ble in a coexist scenario causes the wifi mac tsf counter to stop 2024-05-21 16:39:20 +08:00
ce7ceb8d9d feat(csi): add verify to no backup buffer usage 2024-05-21 15:36:34 +08:00
5ec85c0bfd feat(axi_icm): AXI interconnect QoS configuration functions 2024-05-21 14:38:34 +08:00
7c49b1da55 ci: add 5.3 known failed cases filename 2024-05-21 14:01:08 +08:00
8805685f72 Merge branch 'bugfix/fixed_issues_on_esp32c6_and_esp32h2_v5.3' into 'release/v5.3'
fixed some ble issues on esp32c6 and esp32h2 (v5.3)

See merge request espressif/esp-idf!30891
2024-05-21 11:52:32 +08:00
a3d77114b6 fix(ws_transport): utility functions minor improvments 2024-05-20 17:54:43 +04:00
021dc8747c fix(ws_transport): fixed server-key corruption
When first fragment is sent over HTTP during websocket
connection, defer buffering of fragment until after the
websocket server-key is validated.

This order is required because the first fragment buffering
overwrites the memory holding the server-key headers.

Fixes 2267d4b
Fixes https://github.com/espressif/esp-protocols/issues/396
PR https://github.com/espressif/esp-idf/pull/13724
2024-05-20 17:54:31 +04:00
c7f146b671 Merge branch 'fix/backport_wifi_fixes_v5.3' into 'release/v5.3'
fix(esp_wifi): backport some wifi fixes to v5.3

See merge request espressif/esp-idf!30933
2024-05-20 20:52:18 +08:00
86a49de1eb Merge branch 'fix/fix_esp32p4_kconfig_pd_cpu_dependcy_error_v5.3' into 'release/v5.3'
fix(esp_pm): fix esp32p4 kconfig pd cpu dependency error (v5.3)

See merge request espressif/esp-idf!30794
2024-05-20 20:12:05 +08:00
89218b35e4 fix(system): place idf's stray sections while linking 2024-05-20 13:31:04 +04:00
51b6d16b43 Merge branch 'doc/update-performance-guides-p4-c5_v5.3' into 'release/v5.3'
docs(performance): Add P4 and C5 information in the performance guides (backport v5.3)

See merge request espressif/esp-idf!30492
2024-05-20 16:16:48 +08:00
9e74564ba5 docs: Update the CN Translation for ram-usage and speed 2024-05-20 09:34:12 +02:00
9ebc8f02a9 feat(system/console): Added argtable3 SBOM manifest file in console component for SPDX file generation 2024-05-20 15:04:27 +08:00
7b10c2421f fix(esp_system): fix core1 access cache when core0 close cache during sleep 2024-05-20 15:01:08 +08:00
0c5bce6918 fix(bootloader_support): Make esp_flash_encrypt.h independent of spi_flash_mmap.h header 2024-05-20 14:40:49 +08:00
bef1fba3bc fix(mbedtls/crypto_shared_gdma): Enable AXI-DMA enable external memory AES-ECC access
- When external memory encryption is enabled, set the aes_ecc bit of AXI-DMA to enable memory access
2024-05-20 14:40:49 +08:00
64c062047f fix(esp_hw_support): invalidate L1DCache before enter hardware sleep 2024-05-20 14:02:04 +08:00
157c5b52e3 change(esp_hw_support): put more code into TCM to speed up the sleep and wake-up process 2024-05-20 14:01:01 +08:00
c97ab134ef ci(esp_pm): add pd_top auto lightsleep test case for esp_pm 2024-05-20 14:01:00 +08:00
5899701b68 feat(esp_pm): fix esp32p4 cpu powerdown kconfig dependency error 2024-05-20 14:01:00 +08:00
4ec0065d74 Merge branch 'docs/p4_hw_design_v5.3' into 'release/v5.3'
docs(sys-time): update link to hw design guidelines (v5.3)

See merge request espressif/esp-idf!30934
2024-05-20 13:57:29 +08:00
fe92d9ee60 Merge branch 'doc/update_bt_sleep_process_v5.3' into 'release/v5.3'
docs: Update the process of Bluetooth entering sleep in the sleep_modes.rst(v5.3)

See merge request espressif/esp-idf!30729
2024-05-20 13:50:59 +08:00
4c6cf06838 Merge branch 'fix/fix_esp_pm_case_high_fail_ratio_v5.3' into 'release/v5.3'
fix(esp_pm): fix esp_pm test cases high fail ratio (v5.3)

See merge request espressif/esp-idf!30672
2024-05-20 13:44:53 +08:00
464f4c9cc6 Merge branch 'fix/assert_1024_in_rwbt_isr_v5.3' into 'release/v5.3'
fix(bt/ble): fix some issues in bluetooth controller(backport v5.3)

See merge request espressif/esp-idf!30813
2024-05-20 13:43:43 +08:00
eb8dad2fa6 fix: Add warning to enable LWIP_NETIF_LOOPBACK to use control socket API
Closes https://github.com/espressif/esp-idf/issues/13659
2024-05-20 10:43:41 +05:30
856a299ba8 fix: reset redirect counter for using same handler
Closes https://github.com/espressif/esp-idf/issues/13633
2024-05-20 10:43:41 +05:30
be9c7145f9 Merge branch 'feat/enable_app_update_test_p4_v5.3' into 'release/v5.3'
feat: Enable app_update test app for ESP32P4 (v5.3)

See merge request espressif/esp-idf!30821
2024-05-20 12:32:42 +08:00
d638267741 Merge branch 'fix/fix_flash_encryption_esp32p4_v5.3' into 'release/v5.3'
fix(bootloader_support): Fix flash encryption for esp32p4 (v5.3)

See merge request espressif/esp-idf!30921
2024-05-20 12:29:18 +08:00
f3a73cbce3 docs(sys-time): update link to hw design guidelines 2024-05-20 12:16:19 +08:00
41ff5a2f43 Merge branch 'fix/brownout_crash_v5.3' into 'release/v5.3'
fix(brownout): fixed brownout isr crashing if cache disabled (v5.3)

See merge request espressif/esp-idf!30831
2024-05-20 12:13:17 +08:00
95cfd3987b Merge branch 'bugfix/lp_core_tests_race_condition_v5.3' into 'release/v5.3'
fix(lp_core_test): fixed race-condition in lp core tests (v5.3)

See merge request espressif/esp-idf!30931
2024-05-20 12:12:49 +08:00
520beb865c Merge branch 'bugfix/c5_isr_masking_v5.3' into 'release/v5.3'
fix(interrupt): fixed interrupt thresholds not working on C5 (v5.3)

See merge request espressif/esp-idf!30843
2024-05-20 12:12:36 +08:00
e53ca8e018 fix(lp_core_test): fixed race-condition in lp core tests 2024-05-20 11:59:10 +08:00
68be49d2cf fix(wifi): fixed scan get ap number issue 2024-05-20 11:58:16 +08:00
686878497e docs: update wifi iperf README 2024-05-20 11:56:44 +08:00
c046d87561 docs(wifi): update the docmentation for mesh API 2024-05-20 11:55:27 +08:00
fdb4197d02 fix(esp_wifi): Add some bugfixes and cleanup in softAP
1. Fix wrong reason code in 'WIFI_EVENT_AP_STADISCONNECTED' event
2. cleanup in softAP for disconnecting connected station
3. Update examples to display reason while processing WIFI_EVENT_AP_STADISCONNECTED event
2024-05-20 11:50:09 +08:00
e11f030427 feat(wifi): add itwt teardown status 2024-05-20 11:49:54 +08:00
beebbada64 fix(wifi):esp32c6 wifi rx statistics is always zero 2024-05-20 11:47:43 +08:00
6da7a46bfa fix(bss_color):fix bss color issues 2024-05-20 11:46:50 +08:00
d2551d6e4b fix(wifi): fix esp32 unrecoverable m f issue 2024-05-20 11:46:08 +08:00
4cf29dfcef fix(wifi): fixed sniffer and espnow issue
1. fix(wifi): fixed sniffer dump fcs error packets fail

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

2. fix(wifi): fixed the espnow priv parameter get error

Closes https://github.com/espressif/esp-idf/issues/13693
2024-05-20 11:44:48 +08:00
3dbba47d8c fix(esp_wifi): Fix issues in NAN datapath establishment
1. Resolve indefinite waiting while stopping NAN
2. Increase NDP response timeout to 8 DW's
3. Set NAN discovery beacon interval to 100 TU's as per Section 9.2
   of Wi-Fi Aware Specification v4.0
2024-05-20 11:43:58 +08:00
02c2356cb1 fix(esp_wifi): Fix issue in selecting FTM compensation with external AP 2024-05-20 11:43:18 +08:00
8639f69ed7 fix(wifi): fix the tx issue when mesh packet lifetime remain equal to zero 2024-05-20 11:42:34 +08:00
19ab395364 Merge branch 'feat/csi_dsi_example_v5.3' into 'release/v5.3'
example: csi dsi example and isp af dsi example(v5.3)

See merge request espressif/esp-idf!30913
2024-05-20 11:12:30 +08:00
a7266400be Merge branch 'fix/freertos_scheduler_suspend_crit_v5.3' into 'release/v5.3'
fix(freertos/idf): Add missing critical sections to vTaskSuspendAll() (v5.3)

See merge request espressif/esp-idf!30922
2024-05-20 10:53:35 +08:00
1847e53909 Merge branch 'bugfix/fix_isp_input_data_type_limit_v5.3' into 'release/v5.3'
fix(isp): updated to only support input data type as raw8 (v5.3)

See merge request espressif/esp-idf!30857
2024-05-20 10:15:21 +08:00
285ba1fcf2 Merge branch 'fix/reduce-binary-size_v5.3' into 'release/v5.3'
Reduce binary size (v5.3)

See merge request espressif/esp-idf!30654
2024-05-20 01:09:17 +08:00
5c9392d177 Merge branch 'bugfix/free_memory_if_failed_to_strart_http_server_v5.3' into 'release/v5.3'
fix(esp_https_server): fix memory leak during configuring http server (v5.3)

See merge request espressif/esp-idf!30662
2024-05-20 01:08:21 +08:00
6a92c1485a Merge branch 'fix/pytest_server_start_command_failed_v5.3' into 'release/v5.3'
fix: Refactored script for initiating Python-based HTTPS server (v5.3)

See merge request espressif/esp-idf!30667
2024-05-20 01:07:55 +08:00
c91bdda9f3 Merge branch 'refactor/isp_af_interrupt_and_callback_v5.3' into 'release/v5.3'
refactor(isp): refactor the interrupt and callback solution (v5.3)

See merge request espressif/esp-idf!30565
2024-05-20 00:51:38 +08:00
f63e544dc3 Merge branch 'feature/support_chip912_cpll_spll_eco1_v5.3' into 'release/v5.3'
feat: support(esp32p4_eco1): modify cpll and spll config (v5.3)

See merge request espressif/esp-idf!30783
2024-05-20 00:48:27 +08:00
0680af1269 Merge branch 'feature/usj_support_p4_v5.3' into 'release/v5.3'
feature(usb_serial_jtag): add usb serial jtag support for esp32p4 (backport v5.3)

See merge request espressif/esp-idf!30793
2024-05-20 00:48:22 +08:00
2decfbc007 Merge branch 'fix/hello_world_linux_target_on_macos_v5.3' into 'release/v5.3'
fix(esp-tls): Fix compilation for linux target on macos (v5.3)

See merge request espressif/esp-idf!30808
2024-05-20 00:48:11 +08:00
3640c1ecba fix(bootloader_support): Fix flash encryption for esp32p4 2024-05-17 21:19:14 +05:30
cbb43bb4c4 refactor(freertos/idf): Add critical section requirements to function description
This commit adds a note regarding the critical section calling requires of some
internal functions.
2024-05-17 22:43:35 +08:00
0dc29caf4a fix(freertos/idf): Add missing critical sections to vTaskSuspendAll()
vTaskSuspendAll() requires critical sections when building for SMP. Otherwise,
it is possible for a task to switch cores in between getting the core ID and
before incremented uxSchedulerSuspended.
2024-05-17 22:43:34 +08:00
5f07f64802 example(isp): added isp af example 2024-05-17 15:29:17 +08:00
e4f1c01197 fix(csi): fixed wrong assert when there's new transaction 2024-05-17 15:26:58 +08:00
2ed780b686 fix(isp): fixed af environment detector lack of configuration issue 2024-05-17 15:26:46 +08:00
a9383cb433 example(camera): added new camera dsi example 2024-05-17 15:26:39 +08:00
5e817df25f fix(coredump): don't allow mapping of non-encrypted coredump partition 2024-05-16 21:31:40 +02:00
bd8d7ea76a fix(coredump): increase sanity check before get summary
Closes https://github.com/espressif/esp-idf/issues/13594
2024-05-16 21:17:24 +02:00
zwl
352ee6fc26 ble: fixed some issues on ESP32C6 and ESP32H2 2024-05-16 17:46:07 +08:00
7403b8d68d feat(rom): update c5 mp verison rom ld file 2024-05-16 15:03:21 +08:00
f27e117b5b feat(gpio): update gpio docs on ESP32C5 MP version 2024-05-16 15:02:55 +08:00
a621402e1f feat(pm): add SOC_PM_SUPPORTED in soc caps 2024-05-16 15:00:22 +08:00
a08558a853 feat(coredump): replace fun sel function 2024-05-16 14:58:52 +08:00
2cad39aee5 feat(gpio): add gpio support on ESP32C5 MP version 2024-05-16 14:54:27 +08:00
173bb82f45 docs(esp32c3): Added missing USB functions to esp32-c3 devkit user guides 2024-05-16 10:56:53 +08:00
8472467721 fix(isp): updated to only support input data type as raw8 2024-05-16 10:40:26 +08:00
2f6fb59b6b docs(nimble): Added chip information in ble_enc_adv README file 2024-05-15 15:35:33 +05:30
f324e75c64 fix(interrupt): fixed interrupt thresholds not working on C5 2024-05-15 16:02:48 +08:00
1a1a708699 fix(brownout): fixed brownout isr crashing if cache disabled
If a brownout ISR was triggered while cache was disabled the system would panic.

This was due to a print accessing a string stored in flash
2024-05-15 09:13:53 +08:00
24e5e3aef1 feat: Enable app_update test app for ESP32P4 2024-05-14 10:27:32 +05:30
d8bc05c5d0 fix(bt/controller): Parse out the correct packet types from Host parameters
- For HCI command HCI_Enhanced_Setup_Synchronous_Connection
2024-05-14 11:52:58 +08:00
bfa95cdd75 fix(bt/ble): fix some issues in bluetooth controller
1: fix assert 1024 issue when bt tx and wifi coexist on esp32
2: fix ble scan backoff
3: parse out the correct packet types from host parameters for
   hci command hci_enhanced_setup_synchronous_connection
2024-05-14 10:09:37 +08:00
199dc389cc fix(esp-tls): Fix compilation for linux target on macos
This commit fixes compilation errors for the esp-tls component for the
linux target on a MacOS system.
2024-05-13 13:44:25 +02:00
b400a8cd72 change(gdbinit): set remote timeout for the gdb connection 2024-05-13 13:34:13 +02:00
4dc565b7d0 feature(usb_serial_jtag): add usb serial jtag support for esp32p4 2024-05-13 12:19:14 +08:00
cbcd346171 feat(esp32p4): add eco1 revision config option 2024-05-11 11:46:08 +08:00
f1d1dfd1ef feat(esp32p4_eco1): modify cpll and spll config 2024-05-11 11:43:24 +08:00
dd20d1f2b5 refactor(isp): refactor the interrupt and callback solution
- Added async API
- Replaced the polling API
- Supported one more callback and event data
2024-05-11 11:11:49 +08:00
4e850f158e ci: move log dir from pytest_embedded_log to pytest-embedded 2024-05-10 10:29:21 +02:00
ea010f84ef Merge branch 'fix/freertos_vtasklist_param_order_v5.3' into 'release/v5.3'
fix(freertos): Fix vTaskList() parameter print order (v5.3)

See merge request espressif/esp-idf!30476
2024-05-09 16:48:24 +08:00
68a9c09c49 Merge branch 'bugfix/gcmp_mr_regression_v5.3' into 'release/v5.3'
fix(wifi): Fix issue of wrong Rx control information of espnow packets (Backport v5.3)

See merge request espressif/esp-idf!30739
2024-05-09 16:37:30 +08:00
53c4c08283 Merge branch 'bugfix/libphy_chips_20240430_v5.3' into 'release/v5.3'
update c3 s3 c6 libphy fix coex reset and bug

See merge request espressif/esp-idf!30725
2024-05-09 15:55:08 +08:00
89a612aea0 fix(nimble): Free controller memory if init fails 2024-05-09 12:20:11 +05:30
a9dcc3964d fix(wifi): Fix issue of wrong Rx control information of espnow packets
Only for esp32 and esp32s2
2024-05-09 13:57:12 +08:00
8503709d85 Merge branch 'feature/update_mbedtls_to_3.6.0_v5.3' into 'release/v5.3'
feat(mbedtls): updated mbedtls version from 3.5.2 to 3.6.0 (v5.3)

See merge request espressif/esp-idf!30668
2024-05-09 12:16:22 +08:00
4eacfd6ee1 update c3 s3 c6 libphy fix coex reset and bug 2024-05-09 11:57:56 +08:00
9eb61ef5a7 docs: Update the process of Bluetooth entering sleep in the sleep_modes.rst 2024-05-09 11:01:31 +08:00
7165a3bdbb Merge branch 'feat/mipi_dsi_draw_pixel_round_boundary_v5.3' into 'release/v5.3'
feat(mipi_dsi): round to boundary when draw pixel (v5.3)

See merge request espressif/esp-idf!30694
2024-05-09 09:44:21 +08:00
1b331d24b3 Merge branch 'fix/idf_size_python_compat_v5.3' into 'release/v5.3'
fix: make idf_size.py compatible with python3.8 (v5.3)

See merge request espressif/esp-idf!30727
2024-05-09 02:01:36 +08:00
fe4b401ab2 ci: add simple test for idf_size.py python compatibility
This adds a simple test that tries to run idf_size.py help and check
if the process does not exit with error. This is just to make sure
that idf_size.py can be used with minimum required python version.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-05-08 19:48:52 +02:00
ebc9d02146 fix: make idf_size.py compatible with python3.8
Previous 6caa4a17ac ("fix: display correct help in the idf_size.py wrapper")
introduced a regression, because it uses exit_on_error parameter for
argparse.ArgumentParser, which was added in python3.9, making
idf_size.py incompatible with idf.py minimal required python3.8.

The objective is to inspect the arguments of idf_size.py using a wrapper
argparse to determine whether the legacy or refactored version should be
initiated, while always displaying help for the underlying version. The
exit_on_error function was previously utilized to prevent argparse from
exiting and displaying help/usage. This replaces exit_on_error with a
workaround that makes the --format argument optional. Since this is the
sole instance where the wrapper argparse might fail, it achieves the
same outcome as using exit_on_error.

Fixes: 6caa4a17ac ("fix: display correct help in the idf_size.py wrapper")
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-05-08 19:48:51 +02:00
ec50cd7d7e Merge branch 'fix/backport_wifi_fixes_v5.3' into 'release/v5.3'
fix(wifi): backport wifi fixes to v5.3

See merge request espressif/esp-idf!30689
2024-05-08 19:16:26 +08:00
0cf4889f22 Merge branch 'change/rename_csi_api_v5.3' into 'release/v5.3'
change(camera): change esp_cam_del_ctlr to esp_cam_ctlr_del (v5.3)

See merge request espressif/esp-idf!30692
2024-05-08 17:23:04 +08:00
b9f15ba3ab feat(mipi_dsi): round to boundary when draw pixel 2024-05-08 16:31:51 +08:00
d22f9a97aa change(camera): change esp_cam_del_ctlr to esp_cam_ctlr_del 2024-05-08 15:29:20 +08:00
90188040fb fix(esp_wifi): clear soc wakeup request signal at tbtt process 2024-05-08 13:44:54 +08:00
ea1a10da17 fix(wifi): Fix issue in scan when AP advertises WPA and WPA2 with SAE AKM 2024-05-08 13:44:51 +08:00
7c54373146 feat(esp_wifi): Update FTM PHY Compensation with calibration 2024-05-08 13:42:23 +08:00
209fbfc18b fix(wifi): fix trc_ampdu_stop_rateidx value errors when DUT under softap + sta mode 2024-05-08 13:42:10 +08:00
8545eeb4ef fix(wifi): clear wifi buffer to fix ampdu compatibility issue 2024-05-08 13:41:58 +08:00
a22d0df155 fix(wifi): fix esp32c6 wdt issues when recv/send tcp packages 2024-05-08 13:41:36 +08:00
c706096f45 Merge branch 'test/gdma_fetch_data_in_flash_v5.3' into 'release/v5.3'
test(gdma): can read data from flash rodata (v5.3)

See merge request espressif/esp-idf!30655
2024-05-08 10:50:53 +08:00
b8ed93eec0 ci: apply new fix in pytest-embedded 1.10 2024-05-07 12:17:10 +02:00
840ec6579f ci: update mypy check for python 3.12, check under python 3.8 rules 2024-05-07 12:17:10 +02:00
7aed3eb3bc fix(esp_pm): fix esp_pm test cases high fail ratio 2024-05-07 17:08:28 +08:00
fe628d5951 feat(mbedtls): updated mbedtls version from 3.5.2 to 3.6.0
This MR updated MbedTLS version to latest version 3.6.0.
2024-05-07 14:16:21 +05:30
855d1eb170 fix: Refactored script for initiating Python-based HTTPS server
This commit refactors the script responsible for starting a Python-based HTTPS server
to align with the latest Python version's requirements and best practices.

Closes https://github.com/espressif/esp-idf/issues/13575
2024-05-07 14:15:05 +05:30
8ed42582fe Merge branch 'fix/jpeg_dri_issue_v5.3' into 'release/v5.3'
fix(jpeg): Fix several issues reported recently, (backport v5.3)

See merge request espressif/esp-idf!30657
2024-05-07 16:22:09 +08:00
5428555092 fix(esp_https_server): fix memory leak during configuring http server
This MR This restructured code to prevent memory leak during the starting HTTP server.

Closes https://github.com/espressif/esp-idf/issues/13526
2024-05-07 13:51:38 +05:30
8f091de9c2 Merge branch 'fix/idf_size_help_v5.3' into 'release/v5.3'
fix: display correct help in the idf_size.py wrapper (v5.3)

See merge request espressif/esp-idf!30661
2024-05-07 16:01:12 +08:00
ae0eabec53 fix: display correct help in the idf_size.py wrapper
Currently the wrapper tries to figure out which version of
the esp-idf-size should be started. The legacy version is
used if explicitly requested by the -l/--legacy option or
if json format is specified. This works fine, but if help
is requested, it is printed for the wrapper as shown bellow

$ idf_size.py -h
usage: idf_size.py [-h] [--format FORMAT] [-l]

options:
  -h, --help       show this help message and exit
  --format FORMAT
  -l, --legacy

This is not convenient and the full help from the underlying
version should be displayed.

Fix this by only peeking into the args to figure out if legacy or
refactored version should be started and always spawn the underlying
esp_idf_size python module. This is done by using exit_on_error=False and
add_help=False for the ArgumentParser. When help for refactored version
is requested a note as following is printed to notify users that the
legacy version can still be used.

$ idf_size.py -h
Note: legacy esp_idf_size version can be invoked by specifying the -l/--legacy
option or by setting the ESP_IDF_SIZE_LEGACY environment variable.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-05-07 09:42:19 +02:00
6b0a815b78 fix(jpeg): Fix several issues reported recently,
1. Fix decode images with dri marker failed,
2. Fix encode sometimes get length error
2024-05-07 13:58:18 +08:00
a04f786380 test(gdma): can read data from flash rodata 2024-05-07 13:01:11 +08:00
a6d8251366 feat(gdma): set default valid memory range for gdma 2024-05-07 13:00:39 +08:00
9fd92e8bf4 fix(cxx): use __cxa_throw() stub in case exceptions disabled
Reduces binary size since the linker will drop some code due to --gc-sections.
2024-05-07 08:52:36 +04:00
d42e894a74 fix(system): discard eh_frame sections if disabled in sdkconfig 2024-05-07 08:52:36 +04:00
bf415f580f Merge branch 'bugfix/disable_mbedtls_options_v5.3' into 'release/v5.3'
fix(nimble): Deselect MBEDTLS_ECP_RESTARTABLE when mbedTLS is used (v5.3)

See merge request espressif/esp-idf!30618
2024-05-07 12:38:05 +08:00
55a8a18fb7 Merge branch 'bugfix/fix_hid_connection_failed_bug_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fix HID Device connection failed bug[backport 5.3]

See merge request espressif/esp-idf!30586
2024-05-06 17:57:27 +08:00
a61a367bc4 fix(nimble): Deselect MBEDTLS_ECP_RESTARTABLE when mbedTLS is used 2024-05-06 15:17:57 +05:30
c19e762c89 Merge branch 'doc/ringbuffer_v5.3' into 'release/v5.3'
docs(esp_ringbuf): Corrected example code block (v5.3)

See merge request espressif/esp-idf!30631
2024-05-06 17:11:41 +08:00
6fea6aae8c docs(esp_ringbuf): Corrected example code block
* Closes https://github.com/espressif/esp-idf/issues/13730
2024-05-06 10:15:03 +02:00
027193ca07 fix(freertos): Fix vTaskList() parameter print order
xCoreID was previously printed as the last parameter priority to IDF v5.1, but
was changed to the third paramtere from v5.2 onwards. This commit restores the
correct ordering.

Closes https://github.com/espressif/esp-idf/issues/13675
2024-05-06 16:05:31 +08:00
8bd2287233 Merge branch 'fix/increase_26mhz_esp32c2_slow_clock_calibration_wdt_threshold_v5.3' into 'release/v5.3'
fix(esp_system): increase 26Mhz esp32c2 slow clock calibration timeout watchdog threshold (v5.3)

See merge request espressif/esp-idf!30575
2024-05-06 14:04:39 +08:00
aa1c3af4c4 Merge branch 'bugfix/nvs_enc_test_v5.3' into 'release/v5.3'
fix(tests): correct the flash write length for NVS encrypted test (v5.3)

See merge request espressif/esp-idf!30602
2024-05-06 13:31:26 +08:00
577a50b02a Merge branch 'bugfix/get_random_inside_assert_v5.3' into 'release/v5.3'
fix(linux): calling getrandom() outside assert() (v5.3)

See merge request espressif/esp-idf!30613
2024-05-06 10:29:02 +08:00
b11014a7c6 Merge branch 'bugfix/mipi_dsi_1_data_lane_v5.3' into 'release/v5.3'
fix(mipi_dsi): only wait ready for enabled data lane (v5.3)

See merge request espressif/esp-idf!30580
2024-05-06 10:22:52 +08:00
901f937698 Merge branch 'fix/esp_tls_use_64_bit_variable_for_time_v5.3' into 'release/v5.3'
fix(esp-tls): Use 64 bit variable for time instead of 32 bit (v5.3)

See merge request espressif/esp-idf!30615
2024-05-03 21:33:17 +08:00
39771b6c81 fix(esp-tls): Use 64 bit variable for time instead of 32 bit
Use appropriate API available on respective platform for obtaining
    time
    Closes https://github.com/espressif/esp-idf/issues/13593
2024-05-03 09:03:05 +05:30
b026a7c915 fix(linux): calling getrandom() outside assert()
* Expressions inside assert are completely removed in release builds
2024-05-02 16:56:39 +02:00
f82fea4c1b fix(tests): correct the flash write length for NVS encrypted test
Write only till the embedded file size in the NVS partition. Earlier
the length was kept as the whole partition size and it could result
in accessing embedded rodata beyond the MMU mapped range.
2024-05-02 16:48:57 +05:30
60ab9631d7 fix(tests): remove unused partition NVS bin file 2024-05-02 16:48:54 +05:30
91c4a94f61 fix(bt/bluedroid): Fix HID Device connection failed bug
Closes https://github.com/espressif/esp-idf/issues/13671
2024-04-30 17:56:00 +08:00
df211933ff fix(mipi_dsi): only wait ready for enabled data lane 2024-04-30 16:46:03 +08:00
e486f3b944 Merge branch 'fix/error_reg_base_name_on_p4_v5.3' into 'release/v5.3'
fix(soc): fixed redefined soc reg names on P4 (v5.3)

See merge request espressif/esp-idf!30564
2024-04-30 12:09:21 +08:00
ccca8b74eb fix(esp_system): increase 26Mhz esp32c2 slow clock calibration timeout watchdog threshold 2024-04-30 11:48:42 +08:00
7d7d9d7090 Merge branch 'docs/p4_cleanup_v5.3' into 'release/v5.3'
docs(programming-guide): clean up misc leftover doc updates for P4 (v5.3)

See merge request espressif/esp-idf!30568
2024-04-30 10:31:20 +08:00
0ee7d4d17a docs(programming-guide): clean up misc leftover doc updates for P4 2024-04-30 09:46:25 +08:00
a246aa2973 fix(soc): fixed redefined soc reg names on P4 2024-04-29 19:33:04 +08:00
2508d3f23b Merge branch 'fix/ci_cli_installer_cmake_v5.3' into 'release/v5.3'
ci(tools): Fix IDF_MIRROR_PREFIX_MAP for including all tools from local (v5.3)

See merge request espressif/esp-idf!30552
2024-04-29 17:45:50 +08:00
b494330381 Merge branch 'fix/docs_p4_tools_v5.3' into 'release/v5.3'
change(docs): Update checked tools doc pages for ESP32-P4 programming guide (v5.3)

See merge request espressif/esp-idf!30558
2024-04-29 17:45:24 +08:00
ddc357fcca change(docs): Update checked tools doc pages for ESP32-P4 programming guide 2024-04-29 09:54:00 +02:00
6a5ab20489 ci(tools): Fix IDF_MIRROR_PREFIX_MAP for including all tools from local 2024-04-29 09:00:55 +02:00
30fce03e35 Merge branch 'bugfix/fix_ble_coex_assert_v5.3' into 'release/v5.3'
Update esp32 bt-lib (4012cfb)(backport v5.3)

See merge request espressif/esp-idf!30521
2024-04-28 10:48:02 +08:00
212f316f24 feat(ble/bluedroid): Support BLE command status debug log 2024-04-26 17:13:39 +08:00
0fcc940bc1 fix(ble/controller): Update esp32 bt-lib (4012cfb)
- Fixed BLE coex assert
- Fixed BLE DTM status and tx count
2024-04-26 16:53:39 +08:00
b43fc4d63a Merge branch 'feat/dsi_lcd_iram_safe_v5.3' into 'release/v5.3'
MIPI DSI IRAM Safe (v5.3)

See merge request espressif/esp-idf!30510
2024-04-26 15:57:01 +08:00
7fb317655d Merge branch 'ci/fix-url-quote-v5.3' into 'release/v5.3'
ci: quote spec character in url

See merge request espressif/esp-idf!30500
2024-04-26 13:53:55 +08:00
49aaac0013 feat(mipi_dsi): support isr iram safe 2024-04-26 10:41:04 +08:00
d910ca7fa8 feat(mipi_dsi): add pm lock for clock source 2024-04-26 10:41:04 +08:00
935da554c9 Merge branch 'refactor/dma_test_p4_v5.3' into 'release/v5.3'
change(gdma): improve the test cases to be target agnostic (v5.3)

See merge request espressif/esp-idf!30486
2024-04-26 10:33:14 +08:00
5b3996885c ci: quote spec character in url 2024-04-25 18:35:56 +08:00
7c57624b66 Merge branch 'ci/fix_app_size_json_path_v5.3' into 'release/v5.3'
CI: fix app size json path (v5.3)

See merge request espressif/esp-idf!30494
2024-04-25 16:37:00 +08:00
e56f92aab4 Merge branch 'bugfix/fix_gpio_etm_multi_task_v5.3' into 'release/v5.3'
fix(gpio_etm): allow one GPIO binds to multiple ETM tasks (v5.3)

See merge request espressif/esp-idf!30455
2024-04-25 15:43:16 +08:00
3386c594b4 ci: fix size.json path for app 2024-04-25 08:49:16 +02:00
0440d582dc docs(performance): Add esp32p4/c5 relevant information to the performance guides
in speed.rst:
- add startup time increase info when spiram test is enabled
- add startup time increase info when spiram is enabled and
  poisoning comprehensive is enabled
- add L2 cache variable size info to optimize IRAM space / cache misses
- update sections refencing bluetooth/wifi built-in tasks to not show
  related info for p4 targets.
- Add IDF_TARGET_RF_TYPE for esp32c5

in ram-usage.rst:
- add L2 cache variable size info to maximize RAM space

Remove the files from esp32c5.txt and esp32p4.txt
that are no longer in need of update.
2024-04-25 08:05:46 +02:00
4fb58d56b4 change(gdma): improve the test cases to be target agnostic 2024-04-25 11:07:16 +08:00
665883229e fix(gpio_etm): allow one GPIO binds to multiple ETM tasks 2024-04-24 15:58:49 +08:00
a85d1e1eca fix(esp_eth): dp83848: correct link detection to use BMSR
Reading the link state via PHYSTS was incorrect, as it only reflects the
link state bit from BMSR.  BMSR latches link down events, and are not
cleared without being read.  (See 802.3-2008 section 2, section 22.2.4.2.13)
This leads to the original DP828xx code only supporting link up, then a
single link down event.

Switch to reading the link state via BMSR, but continuing to read the
negotiation results via PHYSTS and ANLPAR.  This is inline with
LAN8720x, RTL8201, KSZ80xx phy drivers, and other opensource drivers for
the DP838xx family of devices.

Tested on a private board with a DP83825i PHY.  No publically available
boards using the original DP83848 are known of for testing.

Signed-off-by: Karl Palsson <karl.palsson@marel.com>
2024-04-24 09:34:58 +02:00
14315bb751 Merge branch 'bugfix/rpa_timeout_api_v5.3' into 'release/v5.3'
fix(nimble): Expose API to set RPA Timeout (v5.3)

See merge request espressif/esp-idf!30407
2024-04-23 20:06:14 +08:00
fa866b49ca docs(esp_common): Fix formatting issues in error-handling.rst
This commit fixes the following formatting issues in error-handling.rst:

- Incorrect indentation (3 spaces to 4 spaces)
- Fixed some italics that were supposed to be inline literals
- Used code-block directive for language highlighting
2024-04-23 14:49:48 +08:00
ebe1141b25 docs: clarify ESP_RETURN_ON_ERROR result 2024-04-23 14:49:47 +08:00
cb5bc35f2e fix(nimble): Expose API to set RPA Timeout 2024-04-23 11:22:21 +05:30
55658d4c36 Merge branch 'maint/release_v5.3_codeowners' into 'release/v5.3'
change(gitlab): simplify approvals for backports (v5.3)

See merge request espressif/esp-idf!30398
2024-04-23 10:35:14 +08:00
f1b9b357e4 change(gitlab): simplify approvals for backports (v5.3) 2024-04-23 01:33:44 +02:00
1061 changed files with 37925 additions and 22499 deletions

View File

@ -1,4 +1,4 @@
[codespell]
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,ot
write-changes = true

2
.gitignore vendored
View File

@ -96,6 +96,8 @@ dependencies.lock
managed_components
# pytest log
pytest-embedded/
# legacy one
pytest_embedded_log/
list_job*.txt
size_info*.txt

View File

@ -2,239 +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
/.codespellrc @esp-idf-codeowners/ci
/.github/workflows/ @esp-idf-codeowners/ci
/.gitlab-ci.yml @esp-idf-codeowners/ci
/.gitlab/ci/ @esp-idf-codeowners/ci
/.pre-commit-config.yaml @esp-idf-codeowners/ci
/.readthedocs.yml @esp-idf-codeowners/docs
/.vale.ini @esp-idf-codeowners/docs
/CMakeLists.txt @esp-idf-codeowners/build-config
/COMPATIBILITY*.md @esp-idf-codeowners/peripherals
/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/debugging
/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_bootloader_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_driver_*/ @esp-idf-codeowners/peripherals
/components/esp_driver_sdmmc/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/storage
/components/esp_eth/ @esp-idf-codeowners/network
/components/esp_event/ @esp-idf-codeowners/system
/components/esp_gdbstub/ @esp-idf-codeowners/debugging
/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_hw_support/lowpower/ @esp-idf-codeowners/power-management
/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_vfs_*/ @esp-idf-codeowners/storage
/components/esp_vfs_console/ @esp-idf-codeowners/storage @esp-idf-codeowners/system
/components/esp_wifi/ @esp-idf-codeowners/wifi
/components/espcoredump/ @esp-idf-codeowners/debugging
/components/esptool_py/ @esp-idf-codeowners/tools
/components/fatfs/ @esp-idf-codeowners/storage
/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/toolchain
/components/nvs_flash/ @esp-idf-codeowners/storage
/components/nvs_sec_provider/ @esp-idf-codeowners/storage @esp-idf-codeowners/security
/components/openthread/ @esp-idf-codeowners/ieee802154
/components/partition_table/ @esp-idf-codeowners/system
/components/perfmon/ @esp-idf-codeowners/debugging
/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-guides/tools/ @esp-idf-codeowners/tools
/docs/en/api-guides/core_dump.rst @esp-idf-codeowners/debugging
/docs/en/api-guides/jtag-debugging/ @esp-idf-codeowners/debugging
/docs/**/api-reference/bluetooth/ @esp-idf-codeowners/bluetooth
/docs/**/api-reference/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi
/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 @esp-idf-codeowners/wifi @esp-idf-codeowners/lwip @esp-idf-codeowners/network
/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/ieee802154/ @esp-idf-codeowners/ieee802154
/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/phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/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/cmake/toolchain-*.cmake @esp-idf-codeowners/toolchain
/tools/esp_app_trace/ @esp-idf-codeowners/debugging
/tools/esp_prov/ @esp-idf-codeowners/app-utilities
/tools/gdb_panic_server.py @esp-idf-codeowners/debugging
/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/ @esp-idf-codeowners/ci
/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/configs/ @esp-idf-codeowners/system
/tools/test_apps/linux_compatible/ @esp-idf-codeowners/system
/tools/test_apps/peripherals/ @esp-idf-codeowners/peripherals
/tools/test_apps/phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/tools/test_apps/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/tools/test_apps/security/ @esp-idf-codeowners/security
/tools/test_apps/storage/ @esp-idf-codeowners/storage
/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/tools.json @esp-idf-codeowners/tools @esp-idf-codeowners/toolchain @esp-idf-codeowners/debugging
/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

@ -84,7 +84,7 @@ variables:
CI_PYTHON_TOOL_BRANCH: ""
# Set this variable to specify the file name for the known failure cases.
KNOWN_FAILURE_CASES_FILE_NAME: "master.txt"
KNOWN_FAILURE_CASES_FILE_NAME: "5.3.txt"
IDF_CI_BUILD: 1

View File

@ -133,7 +133,7 @@ test_cli_installer:
script:
# Tools must be downloaded for testing
# We could use "idf_tools.py download all", but we don't want to install clang because of its huge size
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa cmake
- cd ${IDF_PATH}/tools/test_idf_tools
- python3 -m pip install jsonschema
- python3 ./test_idf_tools.py -v
@ -228,6 +228,8 @@ test_tools:
- pytest --noconftest test_idf_qemu.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY_QEMU.xml || stat=1
- cd ${IDF_PATH}/tools/test_mkdfu
- pytest --noconftest test_mkdfu.py --junitxml=${IDF_PATH}/XUNIT_MKDFU.xml || stat=1
- cd ${IDF_PATH}/tools/test_idf_size
- pytest --noconftest test_idf_size.py --junitxml=${IDF_PATH}/XUNIT_IDF_SIZE.xml || stat=1
- cd ${IDF_PATH}
- shellcheck -s sh tools/detect_python.sh || stat=1
- shellcheck -s bash tools/detect_python.sh || stat=1
@ -296,7 +298,7 @@ test_pytest_qemu:
artifacts:
paths:
- XUNIT_RESULT.xml
- pytest_embedded_log/
- pytest-embedded/
reports:
junit: XUNIT_RESULT.xml
allow_failure: true # IDFCI-1752
@ -330,7 +332,7 @@ test_pytest_linux:
artifacts:
paths:
- XUNIT_RESULT.xml
- pytest_embedded_log/
- pytest-embedded/
- "**/build*/build_log.txt"
reports:
junit: XUNIT_RESULT.xml

View File

@ -86,6 +86,7 @@
- "tools/test_idf_py/**/*"
- "tools/idf_size.py"
- "tools/test_idf_size/**/*"
- "tools/tools.json"
- "tools/tools_schema.json"

View File

@ -31,7 +31,7 @@ test_cli_installer_win:
IDF_PATH: "$CI_PROJECT_DIR"
script:
# Tools must be downloaded for testing
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake
- cd ${IDF_PATH}\tools\test_idf_tools
- python -m pip install jsonschema
- python .\test_idf_tools.py

4
.gitmodules vendored
View File

@ -49,12 +49,12 @@
[submodule "components/json/cJSON"]
path = components/json/cJSON
url = ../../DaveGamble/cJSON.git
sbom-version = 1.7.17
sbom-version = 1.7.18
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
sbom-hash = acc76239bee01d8e9c858ae2cab296704e52d916
[submodule "components/mbedtls/mbedtls"]
path = components/mbedtls/mbedtls

View File

@ -103,10 +103,10 @@ repos:
name: Check type annotations in python files
entry: tools/ci/check_type_comments.py
additional_dependencies:
- 'mypy==0.940'
- 'mypy-extensions==0.4.3'
- 'types-setuptools==57.4.14'
- 'types-PyYAML==0.1.9'
- 'mypy'
- 'mypy-extensions'
- 'types-setuptools'
- 'types-PyYAML'
- 'types-requests'
exclude: >
(?x)^(

21
Kconfig
View File

@ -607,6 +607,27 @@ mainmenu "Espressif IoT Development Framework Configuration"
default "gcc" if COMPILER_RT_LIB_GCCLIB
default "" if COMPILER_RT_LIB_HOST
choice COMPILER_ORPHAN_SECTIONS
prompt "Orphan sections handling"
default COMPILER_ORPHAN_SECTIONS_PLACE
depends on !IDF_TARGET_LINUX
help
If the linker finds orphan sections, it attempts to place orphan sections after sections of the same
attribute such as code vs data, loadable vs non-loadable, etc.
That means that orphan sections could placed between sections defined in IDF linker scripts.
This could lead to corruption of the binary image. Configure the linker action here.
config COMPILER_ORPHAN_SECTIONS_WARNING
bool "Place with warning"
help
Places orphan sections without a warning message.
config COMPILER_ORPHAN_SECTIONS_PLACE
bool "Place silently"
help
Places orphan sections without a warning/error message.
endchoice
endmenu # Compiler Options
menu "Component config"

View File

@ -17,6 +17,7 @@
#include "esp_image_format.h"
#include "esp_secure_boot.h"
#include "esp_flash_encrypt.h"
#include "spi_flash_mmap.h"
#include "sdkconfig.h"
#include "esp_ota_ops.h"

View File

@ -2,6 +2,6 @@
components/app_update/test_apps:
disable:
- if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32p4", "esp32c5"]
- if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32c5"]
temporary: true
reason: target esp32c6, esp32h2, esp32p4, esp32c5 is not supported yet # TODO: IDF-8068, [ESP32C5] IDF-8638
reason: target esp32c6, esp32h2 esp32c5 is not supported yet # TODO: [ESP32C5] IDF-8638

View File

@ -1,2 +1,2 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |

View File

@ -19,7 +19,7 @@ def run_multiple_stages(dut: Dut, test_case_num: int, stages: int) -> None:
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2', 'esp32p4'], reason='c6/h2/p4 support TBD') # TODO: IDF-8959
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')
@pytest.mark.generic
def test_app_update(dut: Dut) -> None:
extra_data = dut.parse_test_menu()

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -119,6 +119,7 @@ SECTIONS
.dram0.data : ALIGN(0x10)
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -144,6 +145,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -208,12 +210,55 @@ SECTIONS
*/
.xt.prop 0 :
{
KEEP (*(.xt.prop .gnu.linkonce.prop.*))
KEEP (*(.xt.prop .xt.prop.* .gnu.linkonce.prop.*))
}
.xt.lit 0 :
{
KEEP (*(.xt.lit .gnu.linkonce.p.*))
KEEP (*(.xt.lit .xt.lit.* .gnu.linkonce.p.*))
}
.xtensa.info 0: { *(.xtensa.info) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -140,6 +140,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -165,6 +166,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -218,6 +220,57 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}
/**

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -140,6 +140,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -165,6 +166,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -218,6 +220,58 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}

View File

@ -139,6 +139,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -164,6 +165,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -217,6 +219,58 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}

View File

@ -138,6 +138,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -163,6 +164,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -216,6 +218,58 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -138,6 +138,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -163,6 +164,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -216,6 +218,58 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}

View File

@ -138,6 +138,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -163,6 +164,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -216,6 +218,58 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -138,7 +138,7 @@ SECTIONS
.dram0.data :
{
_data_start = ABSOLUTE(.);
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -164,6 +164,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -217,6 +218,58 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}
/**

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -131,9 +131,15 @@ SECTIONS
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.data :
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -159,6 +165,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -212,6 +219,58 @@ SECTIONS
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -108,6 +108,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -133,6 +134,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -205,4 +207,48 @@ SECTIONS
KEEP (*(.xt.lit .gnu.linkonce.p.*))
}
.xtensa.info 0: { *(.xtensa.info) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -142,6 +142,7 @@ SECTIONS
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
@ -167,6 +168,7 @@ SECTIONS
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
@ -239,6 +241,50 @@ SECTIONS
KEEP (*(.xt.lit .gnu.linkonce.p.*))
}
.xtensa.info 0: { *(.xtensa.info) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
}
/**

View File

@ -13,6 +13,9 @@
#include "hal/efuse_ll.h"
#include "hal/efuse_hal.h"
#ifndef BOOTLOADER_BUILD
#include "spi_flash_mmap.h"
#endif
#include "hal/spi_flash_ll.h"
#include "rom/spi_flash.h"
#if CONFIG_IDF_TARGET_ESP32

View File

@ -22,7 +22,7 @@
#include "hal/cache_hal.h"
#include "hal/cache_ll.h"
void bootloader_flash_update_id()
void IRAM_ATTR bootloader_flash_update_id()
{
esp_rom_spiflash_chip_t *chip = &rom_spiflash_legacy_data->chip;
chip->device_id = bootloader_read_flash_id();

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2010-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2010-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -10,6 +10,7 @@
#include <stdbool.h>
#include "soc/soc.h"
#include "soc/ext_mem_defs.h"
#include "soc/soc_caps.h"
#include "sdkconfig.h"
#include "esp_attr.h"
@ -179,6 +180,31 @@ inline static bool esp_ptr_in_tcm(const void *p) {
#endif //#if SOC_MEM_TCM_SUPPORTED
/** End of the common section that has to be in sync with esp_memory_utils.h **/
/**
* @brief Check if the pointer is in PSRAM vaddr space
*
* @note This function is only used when in bootloader, where the PSRAM isn't initialised.
* This function simply check if the pointer is the in the PSRAM vaddr space.
* The PSRAM vaddr space is not always the same as the actual PSRAM vaddr range used in APP
*
* @param p pointer
*
* @return true: is in PSRAM; false: not in PSRAM
*/
__attribute__((always_inline))
inline static bool esp_ptr_in_extram(const void *p) {
bool valid = false;
#if SOC_IRAM_PSRAM_ADDRESS_LOW
valid |= ((intptr_t)p >= SOC_IRAM_PSRAM_ADDRESS_LOW && (intptr_t)p < SOC_IRAM_PSRAM_ADDRESS_HIGH);
#endif
#if SOC_DRAM_PSRAM_ADDRESS_LOW
valid |= ((intptr_t)p >= SOC_DRAM_PSRAM_ADDRESS_LOW && (intptr_t)p < SOC_DRAM_PSRAM_ADDRESS_HIGH);
#endif
return valid;
}
/** Don't add new functions below **/
#ifdef __cplusplus

View File

@ -9,9 +9,6 @@
#include "esp_attr.h"
#include "esp_err.h"
#include "soc/soc_caps.h"
#ifndef BOOTLOADER_BUILD
#include "spi_flash_mmap.h"
#endif
#include "hal/efuse_ll.h"
#include "sdkconfig.h"

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -37,8 +37,8 @@ esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio(uint32_t num_pin, ui
esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio_level(uint32_t num_pin, uint32_t delay_sec, bool level)
{
esp_rom_gpio_pad_select_gpio(num_pin);
if (GPIO_PIN_MUX_REG[num_pin]) {
PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[num_pin]);
if (((1ULL << num_pin) & SOC_GPIO_VALID_GPIO_MASK) != 0) {
gpio_ll_input_enable(&GPIO, num_pin);
}
esp_rom_gpio_pad_pullup_only(num_pin);
uint32_t tm_start = esp_log_early_timestamp();

View File

@ -13,7 +13,7 @@
#include "soc/gpio_periph.h"
#include "soc/gpio_sig_map.h"
#include "soc/rtc.h"
#include "hal/gpio_hal.h"
#include "hal/gpio_ll.h"
#if CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/usb/cdc_acm.h"
#include "esp32s2/rom/usb/usb_common.h"
@ -63,17 +63,17 @@ void bootloader_console_init(void)
uart_tx_gpio != UART_NUM_0_TXD_DIRECT_GPIO_NUM ||
uart_rx_gpio != UART_NUM_0_RXD_DIRECT_GPIO_NUM) {
// Change default UART pins back to GPIOs
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[UART_NUM_0_RXD_DIRECT_GPIO_NUM], PIN_FUNC_GPIO);
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[UART_NUM_0_TXD_DIRECT_GPIO_NUM], PIN_FUNC_GPIO);
gpio_ll_func_sel(&GPIO, UART_NUM_0_RXD_DIRECT_GPIO_NUM, PIN_FUNC_GPIO);
gpio_ll_func_sel(&GPIO, UART_NUM_0_TXD_DIRECT_GPIO_NUM, PIN_FUNC_GPIO);
// Route GPIO signals to/from pins
const uint32_t tx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_TX_PIN_IDX);
const uint32_t rx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_RX_PIN_IDX);
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[uart_rx_gpio], PIN_FUNC_GPIO);
PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[uart_rx_gpio]);
gpio_ll_func_sel(&GPIO, uart_rx_gpio, PIN_FUNC_GPIO);
gpio_ll_input_enable(&GPIO, uart_rx_gpio);
esp_rom_gpio_pad_pullup_only(uart_rx_gpio);
esp_rom_gpio_connect_out_signal(uart_tx_gpio, tx_idx, 0, 0);
esp_rom_gpio_connect_in_signal(uart_rx_gpio, rx_idx, 0);
gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[uart_tx_gpio], PIN_FUNC_GPIO);
gpio_ll_func_sel(&GPIO, uart_tx_gpio, PIN_FUNC_GPIO);
// Enable the peripheral
uart_ll_enable_bus_clock(uart_num, true);
uart_ll_reset_register(uart_num);

View File

@ -14,7 +14,6 @@
#include "bootloader_random.h"
#include "bootloader_clock.h"
#include "bootloader_common.h"
#include "esp_flash_encrypt.h"
#include "esp_cpu.h"
#include "soc/rtc.h"
#include "hal/wdt_hal.h"

View File

@ -16,7 +16,7 @@
#include "hal/apm_hal.h"
#endif
#if CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION // TODO: IDF-8615 Remove the workaround when APM supported on C5!
#if CONFIG_IDF_TARGET_ESP32C5 // TODO: IDF-8615 Remove the workaround when APM supported on C5!
#include "soc/hp_apm_reg.h"
#include "soc/lp_apm_reg.h"
#include "soc/lp_apm0_reg.h"
@ -36,7 +36,7 @@ void bootloader_init_mem(void)
apm_hal_apm_ctrl_filter_enable_all(false);
#endif
#if CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION // TODO: IDF-8615 Remove the workaround when APM supported on C5!
#if CONFIG_IDF_TARGET_ESP32C5 // TODO: IDF-8615 Remove the workaround when APM supported on C5!
// disable apm filter
REG_WRITE(LP_APM_FUNC_CTRL_REG, 0);
REG_WRITE(LP_APM0_FUNC_CTRL_REG, 0);

View File

@ -53,7 +53,7 @@ void bootloader_random_enable(void)
// 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_two = (SAR2_CHANNEL << 2) | SAR1_ATTEN; // we want channel 9 with max attenuation
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);

View File

@ -9,7 +9,7 @@
#include "soc/pmu_reg.h"
#include "soc/regi2c_saradc.h"
#include "soc/hp_sys_clkrst_reg.h"
#include "soc/rtcadc_reg.h"
#include "soc/lp_adc_reg.h"
#include "esp_private/regi2c_ctrl.h"
#include "esp_rom_regi2c.h"

View File

@ -25,6 +25,7 @@
#include "soc/rtc_periph.h"
#include "soc/timer_periph.h"
#include "hal/mmu_hal.h"
#include "hal/mmu_ll.h"
#include "hal/cache_types.h"
#include "hal/cache_ll.h"
#include "hal/cache_hal.h"
@ -34,6 +35,9 @@
#include "esp_app_desc.h"
#include "esp_secure_boot.h"
#include "esp_flash_encrypt.h"
#ifndef BOOTLOADER_BUILD
#include "spi_flash_mmap.h"
#endif
#include "esp_flash_partitions.h"
#include "bootloader_flash_priv.h"
#include "bootloader_random.h"
@ -43,6 +47,7 @@
#include "bootloader_sha.h"
#include "bootloader_console.h"
#include "bootloader_soc.h"
#include "bootloader_memory_utils.h"
#include "esp_efuse.h"
#include "esp_fault.h"
@ -715,10 +720,20 @@ static void unpack_load_app(const esp_image_metadata_t *data)
// Find DROM & IROM addresses, to configure MMU mappings
for (int i = 0; i < data->image.segment_count; i++) {
const esp_image_segment_header_t *header = &data->segments[i];
bool text_or_rodata = false;
//`SOC_DROM_LOW` and `SOC_DROM_HIGH` are the same as `SOC_IROM_LOW` and `SOC_IROM_HIGH`, reasons are in above `note`
if (header->load_addr >= SOC_DROM_LOW && header->load_addr < SOC_DROM_HIGH) {
text_or_rodata = true;
}
#if SOC_MMU_PER_EXT_MEM_TARGET
if (header->load_addr >= SOC_EXTRAM_LOW && header->load_addr < SOC_EXTRAM_HIGH) {
text_or_rodata = true;
}
#endif
if (text_or_rodata) {
/**
* D/I are shared, but there should not be a third segment on flash
* D/I are shared, but there should not be a third segment on flash/psram
*/
assert(rom_index < 2);
rom_addr[rom_index] = data->segment_data[i];
@ -785,6 +800,20 @@ static void unpack_load_app(const esp_image_metadata_t *data)
}
#endif //#if SOC_MMU_DI_VADDR_SHARED
//unused for esp32
__attribute__((unused))
static bool s_flash_seg_needs_map(uint32_t vaddr)
{
#if SOC_MMU_PER_EXT_MEM_TARGET
//For these chips, segments on PSRAM will be mapped in app
bool is_psram = esp_ptr_in_extram((void *)vaddr);
return !is_psram;
#else
//For these chips, segments on Flash always need to be mapped
return true;
#endif
}
static void set_cache_and_start_app(
uint32_t drom_addr,
uint32_t drom_load_addr,
@ -822,8 +851,13 @@ static void set_cache_and_start_app(
ESP_EARLY_LOGV(TAG, "after mapping rodata, starting from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", drom_addr_aligned, drom_load_addr_aligned, drom_page_count * SPI_FLASH_MMU_PAGE_SIZE);
#else
uint32_t actual_mapped_len = 0;
mmu_hal_map_region(0, MMU_TARGET_FLASH0, drom_load_addr_aligned, drom_addr_aligned, drom_size, &actual_mapped_len);
ESP_EARLY_LOGV(TAG, "after mapping rodata, starting from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", drom_addr_aligned, drom_load_addr_aligned, actual_mapped_len);
if (s_flash_seg_needs_map(drom_load_addr_aligned)) {
mmu_hal_map_region(0, MMU_TARGET_FLASH0, drom_load_addr_aligned, drom_addr_aligned, drom_size, &actual_mapped_len);
ESP_EARLY_LOGV(TAG, "after mapping rodata, starting from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", drom_addr_aligned, drom_load_addr_aligned, actual_mapped_len);
}
//we use the MMU_LL_END_DROM_ENTRY_ID mmu entry as a map page for app to find the boot partition
mmu_hal_map_region(0, MMU_TARGET_FLASH0, MMU_LL_END_DROM_ENTRY_VADDR, drom_addr_aligned, CONFIG_MMU_PAGE_SIZE, &actual_mapped_len);
ESP_EARLY_LOGV(TAG, "mapped one page of the rodata, from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", drom_addr_aligned, drom_load_addr_aligned, actual_mapped_len);
#endif
//-----------------------MAP IROM--------------------------
@ -840,8 +874,10 @@ static void set_cache_and_start_app(
ESP_LOGV(TAG, "rc=%d", rc);
ESP_EARLY_LOGV(TAG, "after mapping text, starting from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", irom_addr_aligned, irom_load_addr_aligned, irom_page_count * SPI_FLASH_MMU_PAGE_SIZE);
#else
mmu_hal_map_region(0, MMU_TARGET_FLASH0, irom_load_addr_aligned, irom_addr_aligned, irom_size, &actual_mapped_len);
ESP_EARLY_LOGV(TAG, "after mapping text, starting from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", irom_addr_aligned, irom_load_addr_aligned, actual_mapped_len);
if (s_flash_seg_needs_map(irom_load_addr_aligned)) {
mmu_hal_map_region(0, MMU_TARGET_FLASH0, irom_load_addr_aligned, irom_addr_aligned, irom_size, &actual_mapped_len);
ESP_EARLY_LOGV(TAG, "after mapping text, starting from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", irom_addr_aligned, irom_load_addr_aligned, actual_mapped_len);
}
#endif
//----------------------Enable corresponding buses----------------

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -29,6 +29,7 @@
#include "bootloader_flash_config.h"
#include "bootloader_mem.h"
#include "esp_private/regi2c_ctrl.h"
#include "soc/chip_revision.h"
#include "soc/regi2c_lp_bias.h"
#include "soc/regi2c_bias.h"
#include "bootloader_console.h"
@ -90,14 +91,14 @@ static void bootloader_super_wdt_auto_feed(void)
static inline void bootloader_hardware_init(void)
{
// regi2c is enabled by default on ESP32P4, do nothing
// On ESP32P4 ECO0, the default (power on reset) CPLL and SPLL frequencies are very high, lower them to avoid bias may not be enough in bootloader
// And we are fixing SPLL to be 480MHz at all runtime
// Suppose to fix the issue on ECO1, will check when chip comes back
// TODO: IDF-8939
REGI2C_WRITE_MASK(I2C_CPLL, I2C_CPLL_OC_DIV_7_0, 6); // lower default cpu_pll freq to 400M
REGI2C_WRITE_MASK(I2C_SYSPLL, I2C_SYSPLL_OC_DIV_7_0, 8); // lower default sys_pll freq to 480M
esp_rom_delay_us(100);
unsigned chip_version = efuse_hal_chip_revision();
if (!ESP_CHIP_REV_ABOVE(chip_version, 1)) {
// On ESP32P4 ECO0, the default (power on reset) CPLL and SPLL frequencies are very high, lower them to avoid bias may not be enough in bootloader
// And we are fixing SPLL to be 480MHz after app is up
REGI2C_WRITE_MASK(I2C_CPLL, I2C_CPLL_OC_DIV_7_0, 6); // lower default cpu_pll freq to 400M
REGI2C_WRITE_MASK(I2C_SYSPLL, I2C_SYSPLL_OC_DIV_7_0, 8); // lower default sys_pll freq to 480M
esp_rom_delay_us(100);
}
REGI2C_WRITE_MASK(I2C_BIAS, I2C_BIAS_DREG_1P1, 10);
REGI2C_WRITE_MASK(I2C_BIAS, I2C_BIAS_DREG_1P1_PVT, 10);
}
@ -170,7 +171,7 @@ esp_err_t bootloader_init(void)
}
#endif // !CONFIG_APP_BUILD_TYPE_RAM
// check whether a WDT reset happend
// check whether a WDT reset happened
bootloader_check_wdt_reset();
// config WDT
bootloader_config_wdt();

View File

@ -1,9 +1,12 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include "soc/lp_analog_peri_reg.h"
#include "soc/soc.h"
#include "hal/brownout_ll.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
@ -12,7 +15,9 @@ void bootloader_ana_super_wdt_reset_config(bool enable)
void bootloader_ana_bod_reset_config(bool enable)
{
//TODO: IDF-7514
REG_CLR_BIT(LP_ANALOG_PERI_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOD_RST);
brownout_ll_ana_reset_enable(enable);
}
void bootloader_ana_clock_glitch_reset_config(bool enable)

View File

@ -771,8 +771,14 @@ static esp_err_t verify_segment_header(int index, const esp_image_segment_header
static bool should_map(uint32_t load_addr)
{
return (load_addr >= SOC_IROM_LOW && load_addr < SOC_IROM_HIGH)
|| (load_addr >= SOC_DROM_LOW && load_addr < SOC_DROM_HIGH);
bool is_irom = (load_addr >= SOC_IROM_LOW) && (load_addr < SOC_IROM_HIGH);
bool is_drom = (load_addr >= SOC_DROM_LOW) && (load_addr < SOC_DROM_HIGH);
bool is_psram = false;
#if SOC_MMU_PER_EXT_MEM_TARGET
is_psram = (load_addr >= SOC_EXTRAM_LOW) && (load_addr < SOC_EXTRAM_HIGH);
#endif
return (is_irom || is_drom || is_psram);
}
static bool should_load(uint32_t load_addr)
@ -857,7 +863,7 @@ static esp_err_t process_appended_hash_and_sig(esp_image_metadata_t *data, uint3
// Case I: Bootloader part
if (part_offset == ESP_BOOTLOADER_OFFSET) {
// For bootloader with secure boot v1, signature stays in an independant flash
// For bootloader with secure boot v1, signature stays in an independent flash
// sector (offset 0x0) and does not get appended to the image.
#if CONFIG_SECURE_BOOT_V2_ENABLED
// Sanity check - secure boot v2 signature block starts on 4K boundary

View File

@ -18,6 +18,7 @@
#if SOC_KEY_MANAGER_SUPPORTED
#include "hal/key_mgr_hal.h"
#include "hal/mspi_timing_tuning_ll.h"
#include "soc/keymng_reg.h"
#endif
@ -217,8 +218,15 @@ static esp_err_t check_and_generate_encryption_keys(void)
}
#if SOC_KEY_MANAGER_SUPPORTED
#if CONFIG_IDF_TARGET_ESP32C5 && SOC_KEY_MANAGER_SUPPORTED
// TODO: [ESP32C5] IDF-8622 find a more proper place for these codes
REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH);
REG_SET_BIT(PCR_MSPI_CLK_CONF_REG, PCR_MSPI_AXI_RST_EN);
REG_CLR_BIT(PCR_MSPI_CLK_CONF_REG, PCR_MSPI_AXI_RST_EN);
#endif
// Force Key Manager to use eFuse key for XTS-AES operation
key_mgr_hal_set_key_usage(ESP_KEY_MGR_XTS_AES_128_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
_mspi_timing_ll_reset_mspi();
#endif
return ESP_OK;
@ -263,13 +271,6 @@ esp_err_t esp_flash_encrypt_contents(void)
esp_partition_info_t partition_table[ESP_PARTITION_TABLE_MAX_ENTRIES];
int num_partitions;
#if CONFIG_IDF_TARGET_ESP32C5 && SOC_KEY_MANAGER_SUPPORTED
// TODO: [ESP32C5] IDF-8622 find a more proper place for these codes
REG_SET_BIT(KEYMNG_STATIC_REG, KEYMNG_USE_EFUSE_KEY_FLASH);
REG_SET_BIT(PCR_MSPI_CLK_CONF_REG, PCR_MSPI_AXI_RST_EN);
REG_CLR_BIT(PCR_MSPI_CLK_CONF_REG, PCR_MSPI_AXI_RST_EN);
#endif
#ifdef CONFIG_SOC_EFUSE_CONSISTS_OF_ONE_KEY_BLOCK
REG_WRITE(SENSITIVE_XTS_AES_KEY_UPDATE_REG, 1);
#endif

View File

@ -575,7 +575,7 @@ if(CONFIG_BT_ENABLED)
if(CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT)
list(APPEND srcs
"porting/npl/freertos/src/npl_os_freertos.c"
"porting/nimble/src/os_msys_init.c"
"porting/mem/os_msys_init.c"
)
if(CONFIG_BT_CONTROLLER_DISABLED)
@ -585,7 +585,6 @@ if(CONFIG_BT_ENABLED)
endif()
list(APPEND include_dirs
porting/include
porting/nimble/include
porting/npl/freertos/include
porting/transport/include
)
@ -727,7 +726,6 @@ if(CONFIG_BT_ENABLED)
"host/nimble/port/src/nvs_port.c"
)
list(APPEND include_dirs
porting/include
host/nimble/nimble/porting/nimble/include
host/nimble/port/include
host/nimble/nimble/nimble/transport/include
@ -756,9 +754,8 @@ if(CONFIG_BT_ENABLED)
endif()
list(APPEND include_dirs
porting/include
host/nimble/nimble/porting/npl/freertos/include
host/nimble/nimble/porting/nimble/include
host/nimble/nimble/nimble/include
)
endif()

View File

@ -31,8 +31,8 @@ static const char s_hex_to_char_mapping[16] = {
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
};
bt_hci_log_t g_bt_hci_log_data_ctl = {0};
bt_hci_log_t g_bt_hci_log_adv_ctl = {0};
static bt_hci_log_t g_bt_hci_log_data_ctl = {0};
static bt_hci_log_t g_bt_hci_log_adv_ctl = {0};
esp_err_t bt_hci_log_init(void)
{
@ -98,35 +98,35 @@ static char IRAM_ATTR *bt_data_type_to_str(uint8_t data_type)
{
case HCI_LOG_DATA_TYPE_COMMAND:
// hci cmd data
tag = "CMD";
tag = "C";
break;
case HCI_LOG_DATA_TYPE_H2C_ACL:
// host to controller hci acl data
tag = "HAL";
tag = "H";
break;
case HCI_LOG_DATA_TYPE_SCO:
// hci sco data
tag = "SCO";
tag = "S";
break;
case HCI_LOG_DATA_TYPE_EVENT:
// hci event
tag = "EVT";
tag = "E";
break;
case HCI_LOG_DATA_TYPE_ADV:
// controller adv report data
tag = "ADV";
tag = NULL;
break;
case HCI_LOG_DATA_TYPE_C2H_ACL:
// controller to host hci acl data
tag = "CAL";
tag = "D";
break;
case HCI_LOG_DATA_TYPE_SELF_DEFINE:
// self-defining data
tag = "ST";
tag = "S";
break;
default:
// unknown data type
tag = "UK";
tag = "U";
break;
}

View File

@ -349,7 +349,6 @@ config BT_LE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on !BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto

View File

@ -16,7 +16,10 @@
#include "sdkconfig.h"
#if CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port.h"
#endif // CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port_freertos.h"
#ifdef ESP_PLATFORM
@ -28,7 +31,7 @@
#endif
#include "nimble/nimble_npl_os.h"
#include "nimble/ble_hci_trans.h"
#include "ble_hci_trans.h"
#include "os/endian.h"
#include "esp_bt.h"

View File

@ -365,7 +365,6 @@ config BT_LE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on !BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto

View File

@ -15,7 +15,9 @@
#include "sdkconfig.h"
#if CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port.h"
#endif // CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port_freertos.h"
#include "esp_private/esp_modem_clock.h"
@ -28,7 +30,7 @@
#endif // CONFIG_SW_COEXIST_ENABLE
#include "nimble/nimble_npl_os.h"
#include "nimble/ble_hci_trans.h"
#include "ble_hci_trans.h"
#include "os/endian.h"
#include "esp_bt.h"
@ -121,7 +123,7 @@ typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end);
************************************************************************
*/
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);
extern int r_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);
@ -129,12 +131,12 @@ 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);
extern int r_ble_controller_deinit(void);
extern int r_ble_controller_enable(uint8_t mode);
extern int r_ble_controller_disable(void);
extern int esp_register_ext_funcs (struct ext_funcs_t *);
extern void esp_unregister_ext_funcs (void);
extern int esp_ble_ll_set_public_addr(const uint8_t *addr);
extern int r_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);
@ -149,15 +151,17 @@ extern void os_msys_deinit(void);
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 void r_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);
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 int r_ble_txpwr_set(esp_ble_enhanced_power_type_t power_type, uint16_t handle, int power_level);
extern int r_ble_txpwr_get(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
extern int r_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 int esp_ble_register_bb_funcs(void);
extern void esp_ble_unregister_bb_funcs(void);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _bt_controller_bss_start;
@ -723,7 +727,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto free_mem;
}
ble_get_npl_element_info(cfg, &npl_info);
r_ble_get_npl_element_info(cfg, &npl_info);
npl_freertos_set_controller_npl_info(&npl_info);
if (npl_freertos_mempool_init() != 0) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "npl mempool init failed");
@ -780,13 +784,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
coex_init();
#endif // CONFIG_SW_COEXIST_ENABLE
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());
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
interface_func_t bt_controller_log_interface;
bt_controller_log_interface = esp_bt_controller_log_interface;
@ -804,11 +801,23 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
#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;
goto modem_deint;
}
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
ret = esp_ble_register_bb_funcs();
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "esp_ble_register_bb_funcs failed %d", ret);
goto modem_deint;
}
esp_ble_change_rtc_freq(slow_clk_freq);
ret = r_ble_controller_init(cfg);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "r_ble_controller_init failed %d", ret);
goto modem_deint;
}
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "ble controller commit:[%s]", ble_controller_get_compile_version());
r_esp_ble_change_rtc_freq(slow_clk_freq);
ble_controller_scan_duplicate_config();
@ -825,7 +834,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
}
ESP_ERROR_CHECK(esp_read_mac((uint8_t *)mac, ESP_MAC_BT));
swap_in_place(mac, 6);
esp_ble_ll_set_public_addr(mac);
r_esp_ble_ll_set_public_addr(mac);
ble_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
@ -835,13 +844,13 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
free_controller:
controller_sleep_deinit();
os_msys_deinit();
r_ble_controller_deinit();
modem_deint:
esp_ble_unregister_bb_funcs();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
controller_init_err:
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
os_msys_deinit();
ble_controller_deinit();
modem_deint:
esp_phy_modem_deinit();
// modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
@ -872,10 +881,11 @@ esp_err_t esp_bt_controller_deinit(void)
// modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
r_ble_controller_deinit();
esp_ble_unregister_bb_funcs();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_controller_deinit();
#if CONFIG_BT_NIMBLE_ENABLED
/* De-initialize default event queue */
@ -920,7 +930,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
coex_enable();
#endif // CONFIG_SW_COEXIST_ENABLE
if (ble_controller_enable(mode) != 0) {
if (r_ble_controller_enable(mode) != 0) {
ret = ESP_FAIL;
goto error;
}
@ -948,7 +958,7 @@ esp_err_t esp_bt_controller_disable(void)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "invalid controller state");
return ESP_FAIL;
}
if (ble_controller_disable() != 0) {
if (r_ble_controller_disable() != 0) {
return ESP_FAIL;
}
#if CONFIG_SW_COEXIST_ENABLE
@ -1082,7 +1092,7 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
case ESP_BLE_PWR_TYPE_DEFAULT:
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1095,7 +1105,7 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
case ESP_BLE_PWR_TYPE_CONN_HDL6:
case ESP_BLE_PWR_TYPE_CONN_HDL7:
case ESP_BLE_PWR_TYPE_CONN_HDL8:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1115,13 +1125,13 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:
if (ble_txpwr_set(power_type, handle, power_level) == 0) {
if (r_ble_txpwr_set(power_type, handle, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1141,7 +1151,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
case ESP_BLE_PWR_TYPE_DEFAULT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
@ -1152,7 +1162,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
case ESP_BLE_PWR_TYPE_CONN_HDL6:
case ESP_BLE_PWR_TYPE_CONN_HDL7:
case ESP_BLE_PWR_TYPE_CONN_HDL8:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type);
break;
default:
return ESP_PWR_LVL_INVALID;
@ -1174,11 +1184,11 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:
tx_level = ble_txpwr_get(power_type, handle);
tx_level = r_ble_txpwr_get(power_type, handle);
break;
default:
return ESP_PWR_LVL_INVALID;

View File

@ -365,7 +365,6 @@ config BT_LE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on !BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto

View File

@ -15,7 +15,9 @@
#include "sdkconfig.h"
#if CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port.h"
#endif // CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port_freertos.h"
#include "esp_private/esp_modem_clock.h"
@ -28,7 +30,7 @@
#endif // CONFIG_ESP_COEX_ENABLED
#include "nimble/nimble_npl_os.h"
#include "nimble/ble_hci_trans.h"
#include "ble_hci_trans.h"
#include "os/endian.h"
#include "esp_bt.h"
@ -123,7 +125,7 @@ typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end);
************************************************************************
*/
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);
extern int r_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);
@ -131,12 +133,12 @@ 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);
extern int r_ble_controller_deinit(void);
extern int r_ble_controller_enable(uint8_t mode);
extern int r_ble_controller_disable(void);
extern int esp_register_ext_funcs (struct ext_funcs_t *);
extern void esp_unregister_ext_funcs (void);
extern int esp_ble_ll_set_public_addr(const uint8_t *addr);
extern int r_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);
@ -149,17 +151,19 @@ extern int os_msys_init(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);
extern void r_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 void r_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);
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 int r_ble_txpwr_set(esp_ble_enhanced_power_type_t power_type, uint16_t handle, int power_level);
extern int r_ble_txpwr_get(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
extern int r_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 int esp_ble_register_bb_funcs(void);
extern void esp_ble_unregister_bb_funcs(void);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _bt_controller_bss_start;
@ -551,7 +555,7 @@ static void sleep_modem_ble_mac_modem_state_deinit(void)
void sleep_modem_light_sleep_overhead_set(uint32_t overhead)
{
esp_ble_set_wakeup_overhead(overhead);
r_esp_ble_set_wakeup_overhead(overhead);
}
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
@ -577,6 +581,9 @@ esp_err_t controller_sleep_init(void)
goto error;
}
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if CONFIG_BT_LE_SLEEP_ENABLE && !CONFIG_MAC_BB_PD
#error "CONFIG_MAC_BB_PD required for BLE light sleep to run properly"
#endif // CONFIG_BT_LE_SLEEP_ENABLE && !CONFIG_MAC_BB_PD
/* Create a new regdma link for BLE related register restoration */
rc = sleep_modem_ble_mac_modem_state_init(1);
assert(rc == 0);
@ -744,7 +751,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto free_mem;
}
ble_get_npl_element_info(cfg, &npl_info);
r_ble_get_npl_element_info(cfg, &npl_info);
npl_freertos_set_controller_npl_info(&npl_info);
if (npl_freertos_mempool_init() != 0) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "npl mempool init failed");
@ -821,14 +828,20 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto modem_deint;
}
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
ret = ble_controller_init(cfg);
ret = esp_ble_register_bb_funcs();
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "esp_ble_register_bb_funcs failed %d", ret);
goto modem_deint;
}
ret = r_ble_controller_init(cfg);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "r_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);
r_esp_ble_change_rtc_freq(slow_clk_freq);
ble_controller_scan_duplicate_config();
@ -845,7 +858,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
}
ESP_ERROR_CHECK(esp_read_mac((uint8_t *)mac, ESP_MAC_BT));
swap_in_place(mac, 6);
esp_ble_ll_set_public_addr(mac);
r_esp_ble_ll_set_public_addr(mac);
ble_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
@ -856,8 +869,9 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
free_controller:
controller_sleep_deinit();
os_msys_deinit();
ble_controller_deinit();
r_ble_controller_deinit();
modem_deint:
esp_ble_unregister_bb_funcs();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
@ -891,7 +905,8 @@ esp_err_t esp_bt_controller_deinit(void)
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
ble_controller_deinit();
r_ble_controller_deinit();
esp_ble_unregister_bb_funcs();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
@ -939,7 +954,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
coex_enable();
#endif // CONFIG_SW_COEXIST_ENABLE
if (ble_controller_enable(mode) != 0) {
if (r_ble_controller_enable(mode) != 0) {
ret = ESP_FAIL;
goto error;
}
@ -967,7 +982,7 @@ esp_err_t esp_bt_controller_disable(void)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "invalid controller state");
return ESP_FAIL;
}
if (ble_controller_disable() != 0) {
if (r_ble_controller_disable() != 0) {
return ESP_FAIL;
}
#if CONFIG_SW_COEXIST_ENABLE
@ -1101,7 +1116,7 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
case ESP_BLE_PWR_TYPE_DEFAULT:
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1114,7 +1129,7 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
case ESP_BLE_PWR_TYPE_CONN_HDL6:
case ESP_BLE_PWR_TYPE_CONN_HDL7:
case ESP_BLE_PWR_TYPE_CONN_HDL8:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1134,13 +1149,13 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:
if (ble_txpwr_set(power_type, handle, power_level) == 0) {
if (r_ble_txpwr_set(power_type, handle, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1160,7 +1175,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
case ESP_BLE_PWR_TYPE_DEFAULT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
@ -1171,7 +1186,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
case ESP_BLE_PWR_TYPE_CONN_HDL6:
case ESP_BLE_PWR_TYPE_CONN_HDL7:
case ESP_BLE_PWR_TYPE_CONN_HDL8:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type);
break;
default:
return ESP_PWR_LVL_INVALID;
@ -1193,11 +1208,11 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:
tx_level = ble_txpwr_get(power_type, handle);
tx_level = r_ble_txpwr_get(power_type, handle);
break;
default:
return ESP_PWR_LVL_INVALID;

View File

@ -356,7 +356,6 @@ config BT_LE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on !BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto

View File

@ -15,7 +15,9 @@
#include "sdkconfig.h"
#if CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port.h"
#endif // CONFIG_BT_NIMBLE_ENABLED
#include "nimble/nimble_port_freertos.h"
#include "esp_private/esp_modem_clock.h"
@ -28,7 +30,7 @@
#endif // CONFIG_ESP_COEX_ENABLED
#include "nimble/nimble_npl_os.h"
#include "nimble/ble_hci_trans.h"
#include "ble_hci_trans.h"
#include "os/endian.h"
#include "esp_bt.h"
@ -59,8 +61,8 @@
************************************************************************
*/
#define NIMBLE_PORT_LOG_TAG "BLE_INIT"
#define OSI_COEX_VERSION 0x00010006
#define OSI_COEX_MAGIC_VALUE 0xFADEBEAD
#define OSI_COEX_VERSION 0x00010006
#define OSI_COEX_MAGIC_VALUE 0xFADEBEAD
#define EXT_FUNC_VERSION 0x20221122
#define EXT_FUNC_MAGIC_VALUE 0xA5A5A5A5
@ -115,7 +117,7 @@ typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end);
************************************************************************
*/
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);
extern int r_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);
@ -123,35 +125,37 @@ 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);
extern int r_ble_controller_deinit(void);
extern int r_ble_controller_enable(uint8_t mode);
extern int r_ble_controller_disable(void);
extern int esp_register_ext_funcs (struct ext_funcs_t *);
extern void esp_unregister_ext_funcs (void);
extern int esp_ble_ll_set_public_addr(const uint8_t *addr);
extern int r_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 uint32_t r_os_cputime_get32(void);
extern uint32_t r_os_cputime_ticks_to_usecs(uint32_t ticks);
#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 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_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 r_esp_ble_set_wakeup_overhead(uint32_t overhead);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
extern void r_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);
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 int r_ble_txpwr_set(esp_ble_enhanced_power_type_t power_type, uint16_t handle, int power_level);
extern int r_ble_txpwr_get(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
extern int r_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 int esp_ble_register_bb_funcs(void);
extern void esp_ble_unregister_bb_funcs(void);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _bt_controller_bss_start;
@ -538,9 +542,10 @@ static void sleep_modem_ble_mac_modem_state_deinit(void)
void sleep_modem_light_sleep_overhead_set(uint32_t overhead)
{
esp_ble_set_wakeup_overhead(overhead);
r_esp_ble_set_wakeup_overhead(overhead);
}
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
esp_err_t controller_sleep_init(void)
{
@ -716,7 +721,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto free_mem;
}
ble_get_npl_element_info(cfg, &npl_info);
r_ble_get_npl_element_info(cfg, &npl_info);
npl_freertos_set_controller_npl_info(&npl_info);
if (npl_freertos_mempool_init() != 0) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "npl mempool init failed");
@ -730,10 +735,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
*/
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_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;
@ -771,6 +776,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
#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;
@ -791,16 +797,20 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto modem_deint;
}
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
ret = ble_controller_init(cfg);
ret = esp_ble_register_bb_funcs();
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "esp_ble_register_bb_funcs failed %d", ret);
goto modem_deint;
}
ret = r_ble_controller_init(cfg);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "r_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);
r_esp_ble_change_rtc_freq(slow_clk_freq);
ble_controller_scan_duplicate_config();
@ -815,10 +825,9 @@ 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);
r_esp_ble_ll_set_public_addr(mac);
ble_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
@ -829,8 +838,9 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
free_controller:
controller_sleep_deinit();
os_msys_deinit();
ble_controller_deinit();
r_ble_controller_deinit();
modem_deint:
esp_ble_unregister_bb_funcs();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
@ -862,7 +872,8 @@ esp_err_t esp_bt_controller_deinit(void)
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
ble_controller_deinit();
r_ble_controller_deinit();
esp_ble_unregister_bb_funcs();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
r_ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
@ -910,7 +921,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
coex_enable();
#endif // CONFIG_SW_COEXIST_ENABLE
if (ble_controller_enable(mode) != 0) {
if (r_ble_controller_enable(mode) != 0) {
ret = ESP_FAIL;
goto error;
}
@ -938,7 +949,7 @@ esp_err_t esp_bt_controller_disable(void)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "invalid controller state");
return ESP_FAIL;
}
if (ble_controller_disable() != 0) {
if (r_ble_controller_disable() != 0) {
return ESP_FAIL;
}
#if CONFIG_SW_COEXIST_ENABLE
@ -1072,7 +1083,7 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
case ESP_BLE_PWR_TYPE_DEFAULT:
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1085,7 +1096,7 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
case ESP_BLE_PWR_TYPE_CONN_HDL6:
case ESP_BLE_PWR_TYPE_CONN_HDL7:
case ESP_BLE_PWR_TYPE_CONN_HDL8:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1105,13 +1116,13 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:
if (ble_txpwr_set(power_type, handle, power_level) == 0) {
if (r_ble_txpwr_set(power_type, handle, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1131,7 +1142,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
case ESP_BLE_PWR_TYPE_DEFAULT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
@ -1142,7 +1153,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
case ESP_BLE_PWR_TYPE_CONN_HDL6:
case ESP_BLE_PWR_TYPE_CONN_HDL7:
case ESP_BLE_PWR_TYPE_CONN_HDL8:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_CONN, power_type);
break;
default:
return ESP_PWR_LVL_INVALID;
@ -1164,11 +1175,11 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:
tx_level = ble_txpwr_get(power_type, handle);
tx_level = r_ble_txpwr_get(power_type, handle);
break;
default:
return ESP_PWR_LVL_INVALID;

View File

@ -96,7 +96,7 @@ esp_err_t esp_ble_mesh_deinit(esp_ble_mesh_deinit_param_t *param)
}
/* Take the Semaphore, wait BLE Mesh de-initialization to finish. */
xSemaphoreTake(semaphore, portMAX_DELAY);
__ASSERT(xSemaphoreTake(semaphore, 3000 / portTICK_PERIOD_MS) == pdTRUE, "BLE Mesh deinit take semaphore failed");
/* Don't forget to delete the semaphore at the end. */
vSemaphoreDelete(semaphore);

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
*/
@ -33,7 +33,10 @@ esp_err_t esp_ble_mesh_init(esp_ble_mesh_prov_t *prov, esp_ble_mesh_comp_t *comp
/**
* @brief De-initialize BLE Mesh module.
*
* @note This function shall be invoked after esp_ble_mesh_client_model_deinit().
* @note
* 1. This function shall be invoked after esp_ble_mesh_client_model_deinit().
* 2. This function is strictly forbidden to run in any BTC Task Context
* (e.g. registered Mesh Event Callback).
*
* @param[in] param: Pointer to the structure of BLE Mesh deinit parameters.
*

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
*/
@ -71,6 +71,29 @@
#include "esp_ble_mesh_provisioning_api.h"
#include "esp_ble_mesh_networking_api.h"
#if CONFIG_BLE_MESH_DEINIT
static SemaphoreHandle_t deinit_comp_semaphore;
#endif
static inline void btc_ble_mesh_prov_cb_to_app_reprocess(esp_ble_mesh_prov_cb_event_t event,
esp_ble_mesh_prov_cb_param_t *param)
{
switch (event) {
#if CONFIG_BLE_MESH_DEINIT
case ESP_BLE_MESH_DEINIT_MESH_COMP_EVT:
assert(deinit_comp_semaphore);
/* Give the semaphore when BLE Mesh de-initialization is finished.
* @note: At nimble host, once this lock is released, it will cause
* the btc task to be deleted.
*/
xSemaphoreGive(deinit_comp_semaphore);
break;
#endif
default:
break;
}
}
static inline void btc_ble_mesh_prov_cb_to_app(esp_ble_mesh_prov_cb_event_t event,
esp_ble_mesh_prov_cb_param_t *param)
{
@ -79,6 +102,8 @@ static inline void btc_ble_mesh_prov_cb_to_app(esp_ble_mesh_prov_cb_event_t even
if (btc_ble_mesh_cb) {
btc_ble_mesh_cb(event, param);
}
btc_ble_mesh_prov_cb_to_app_reprocess(event, param);
}
static inline void btc_ble_mesh_model_cb_to_app(esp_ble_mesh_model_cb_event_t event,
@ -2825,8 +2850,8 @@ void btc_ble_mesh_prov_call_handler(btc_msg_t *msg)
case BTC_BLE_MESH_ACT_DEINIT_MESH:
act = ESP_BLE_MESH_DEINIT_MESH_COMP_EVT;
param.deinit_mesh_comp.err_code = bt_mesh_deinit((struct bt_mesh_deinit_param *)&arg->mesh_deinit.param);
/* Give the semaphore when BLE Mesh de-initialization is finished. */
xSemaphoreGive(arg->mesh_deinit.semaphore);
/* Temporarily save the deinit semaphore and release it after the mesh deinit complete event is handled in the app layer */
deinit_comp_semaphore = arg->mesh_deinit.semaphore;
break;
#endif /* CONFIG_BLE_MESH_DEINIT */
default:

View File

@ -1,7 +1,7 @@
/*
* SPDX-FileCopyrightText: 2017 Nordic Semiconductor ASA
* SPDX-FileCopyrightText: 2015-2016 Intel Corporation
* SPDX-FileContributor: 2018-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -74,7 +74,7 @@ static struct bt_mesh_conn_cb *bt_mesh_gatts_conn_cb;
static tBTA_GATTS_IF bt_mesh_gatts_if;
static uint8_t bt_mesh_gatts_addr[BLE_MESH_ADDR_LEN];
static uint16_t svc_handle, char_handle;
static future_t *future_mesh;
static future_t *gatts_future_mesh;
/* Static Functions */
static struct bt_mesh_gatt_attr *bt_mesh_gatts_find_attr_by_handle(uint16_t handle);
@ -561,6 +561,9 @@ static void bt_mesh_bta_gatts_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
case BTA_GATTS_REG_EVT:
if (p_data->reg_oper.status == BTA_GATT_OK) {
bt_mesh_gatts_if = p_data->reg_oper.server_if;
future_ready(gatts_future_mesh, FUTURE_SUCCESS);
} else {
future_ready(gatts_future_mesh, FUTURE_FAIL);
}
break;
case BTA_GATTS_READ_EVT: {
@ -618,27 +621,27 @@ static void bt_mesh_bta_gatts_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
break;
case BTA_GATTS_CREATE_EVT:
svc_handle = p_data->create.service_id;
BT_DBG("svc_handle %d, future_mesh %p", svc_handle, future_mesh);
if (future_mesh != NULL) {
future_ready(future_mesh, FUTURE_SUCCESS);
BT_DBG("svc_handle %d, gatts_future_mesh %p", svc_handle, gatts_future_mesh);
if (gatts_future_mesh != NULL) {
future_ready(gatts_future_mesh, FUTURE_SUCCESS);
}
break;
case BTA_GATTS_ADD_INCL_SRVC_EVT:
svc_handle = p_data->add_result.attr_id;
if (future_mesh != NULL) {
future_ready(future_mesh, FUTURE_SUCCESS);
if (gatts_future_mesh != NULL) {
future_ready(gatts_future_mesh, FUTURE_SUCCESS);
}
break;
case BTA_GATTS_ADD_CHAR_EVT:
char_handle = p_data->add_result.attr_id;
if (future_mesh != NULL) {
future_ready(future_mesh, FUTURE_SUCCESS);
if (gatts_future_mesh != NULL) {
future_ready(gatts_future_mesh, FUTURE_SUCCESS);
}
break;
case BTA_GATTS_ADD_CHAR_DESCR_EVT:
char_handle = p_data->add_result.attr_id;
if (future_mesh != NULL) {
future_ready(future_mesh, FUTURE_SUCCESS);
if (gatts_future_mesh != NULL) {
future_ready(gatts_future_mesh, FUTURE_SUCCESS);
}
break;
case BTA_GATTS_DELELTE_EVT:
@ -962,11 +965,11 @@ int bt_mesh_gatts_service_register(struct bt_mesh_gatt_service *svc)
if (svc->attrs[i].uuid->type == BLE_MESH_UUID_TYPE_16) {
switch (BLE_MESH_UUID_16(svc->attrs[i].uuid)->val) {
case BLE_MESH_UUID_GATT_PRIMARY_VAL: {
future_mesh = future_new();
gatts_future_mesh = future_new();
bta_uuid_to_bt_mesh_uuid(&bta_uuid, (struct bt_mesh_uuid *)svc->attrs[i].user_data);
BTA_GATTS_CreateService(bt_mesh_gatts_if,
&bta_uuid, 0, svc->attr_count, true);
if (future_await(future_mesh) == FUTURE_FAIL) {
if (future_await(gatts_future_mesh) == FUTURE_FAIL) {
BT_ERR("Failed to add primary service");
return ESP_FAIL;
}
@ -976,11 +979,11 @@ int bt_mesh_gatts_service_register(struct bt_mesh_gatt_service *svc)
break;
}
case BLE_MESH_UUID_GATT_SECONDARY_VAL: {
future_mesh = future_new();
gatts_future_mesh = future_new();
bta_uuid_to_bt_mesh_uuid(&bta_uuid, (struct bt_mesh_uuid *)svc->attrs[i].user_data);
BTA_GATTS_CreateService(bt_mesh_gatts_if,
&bta_uuid, 0, svc->attr_count, false);
if (future_await(future_mesh) == FUTURE_FAIL) {
if (future_await(gatts_future_mesh) == FUTURE_FAIL) {
BT_ERR("Failed to add secondary service");
return ESP_FAIL;
}
@ -993,11 +996,11 @@ int bt_mesh_gatts_service_register(struct bt_mesh_gatt_service *svc)
break;
}
case BLE_MESH_UUID_GATT_CHRC_VAL: {
future_mesh = future_new();
gatts_future_mesh = future_new();
struct bt_mesh_gatt_char *gatts_chrc = (struct bt_mesh_gatt_char *)svc->attrs[i].user_data;
bta_uuid_to_bt_mesh_uuid(&bta_uuid, gatts_chrc->uuid);
BTA_GATTS_AddCharacteristic(svc_handle, &bta_uuid, bt_mesh_perm_to_bta_perm(svc->attrs[i + 1].perm), gatts_chrc->properties, NULL, NULL);
if (future_await(future_mesh) == FUTURE_FAIL) {
if (future_await(gatts_future_mesh) == FUTURE_FAIL) {
BT_ERR("Failed to add characteristic");
return ESP_FAIL;
}
@ -1019,10 +1022,10 @@ int bt_mesh_gatts_service_register(struct bt_mesh_gatt_service *svc)
case BLE_MESH_UUID_ES_CONFIGURATION_VAL:
case BLE_MESH_UUID_ES_MEASUREMENT_VAL:
case BLE_MESH_UUID_ES_TRIGGER_SETTING_VAL: {
future_mesh = future_new();
gatts_future_mesh = future_new();
bta_uuid_to_bt_mesh_uuid(&bta_uuid, svc->attrs[i].uuid);
BTA_GATTS_AddCharDescriptor(svc_handle, bt_mesh_perm_to_bta_perm(svc->attrs[i].perm), &bta_uuid, NULL, NULL);
if (future_await(future_mesh) == FUTURE_FAIL) {
if (future_await(gatts_future_mesh) == FUTURE_FAIL) {
BT_ERR("Failed to add descriptor");
return ESP_FAIL;
}
@ -1768,7 +1771,19 @@ void bt_mesh_gatt_init(void)
CONFIG_BLE_MESH_GATT_PROXY_SERVER
tBT_UUID gatts_app_uuid = {LEN_UUID_128, {0}};
memset(&gatts_app_uuid.uu.uuid128, BLE_MESH_GATTS_APP_UUID_BYTE, LEN_UUID_128);
gatts_future_mesh = future_new();
if (!gatts_future_mesh) {
BT_ERR("Mesh gatts sync lock alloc failed");
return;
}
BTA_GATTS_AppRegister(&gatts_app_uuid, bt_mesh_bta_gatts_cb);
if (future_await(gatts_future_mesh) == FUTURE_FAIL) {
BT_ERR("Mesh gatts app register failed");
return;
}
#endif
#if (CONFIG_BLE_MESH_PROVISIONER && CONFIG_BLE_MESH_PB_GATT) || \

View File

@ -2,7 +2,7 @@
/*
* SPDX-FileCopyrightText: 2017 Intel Corporation
* SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -121,22 +121,22 @@ static bt_mesh_mutex_t seg_rx_lock;
static inline void bt_mesh_seg_tx_lock(void)
{
bt_mesh_mutex_lock(&seg_tx_lock);
bt_mesh_r_mutex_lock(&seg_tx_lock);
}
static inline void bt_mesh_seg_tx_unlock(void)
{
bt_mesh_mutex_unlock(&seg_tx_lock);
bt_mesh_r_mutex_unlock(&seg_tx_lock);
}
static inline void bt_mesh_seg_rx_lock(void)
{
bt_mesh_mutex_lock(&seg_rx_lock);
bt_mesh_r_mutex_lock(&seg_rx_lock);
}
static inline void bt_mesh_seg_rx_unlock(void)
{
bt_mesh_mutex_unlock(&seg_rx_lock);
bt_mesh_r_mutex_unlock(&seg_rx_lock);
}
uint8_t bt_mesh_seg_send_interval(void)
@ -517,6 +517,12 @@ static bool send_next_segment(struct seg_tx *tx, int *result)
net_tx.ctx->net_idx = tx->sub->net_idx;
/**
* Add one to the ref count only if the segment can be further
* processed by the network.
*/
seg = net_buf_ref(seg);
err = bt_mesh_net_send(&net_tx, seg, &seg_sent_cb, tx);
if (err) {
BT_ERR("Send seg %u failed (err %d)", tx->last_seg_n, err);
@ -966,7 +972,18 @@ static int send_seg(struct bt_mesh_net_tx *net_tx, struct net_buf_simple *sdu,
}
}
tx->seg[seg_o] = net_buf_ref(seg);
/**
* If the net buffer allocation of the subsequent
* segments of this segment message fails, it will
* cause the ref count of the previously allocated
* successful segments to not be unref, which will
* cause the net buffer leakage to occur, so it is
* necessary to wait until all the segments have been
* allocated, and then when the segment is confirmed
* that it will be network layer for further processing,
* then ref of the net buffer should be plus one.
*/
tx->seg[seg_o] = seg;
BT_DBG("Seg %u/%u prepared", seg_o, tx->seg_n);
}
@ -975,6 +992,11 @@ static int send_seg(struct bt_mesh_net_tx *net_tx, struct net_buf_simple *sdu,
* tx->seg[0] will be NULL here.
*/
if (tx->seg[0]) {
/**
* Add one to the ref count only if the segment can be further
* processed by the network.
*/
tx->seg[0] = net_buf_ref(tx->seg[0]);
err = bt_mesh_net_send(net_tx, tx->seg[0], &seg_sent_cb, tx);
if (err) {
BT_ERR("Send 1st seg failed (err %d)", err);
@ -2327,8 +2349,8 @@ void bt_mesh_trans_init(void)
seg_rx[i].buf.data = seg_rx[i].buf.__buf;
}
bt_mesh_mutex_create(&seg_tx_lock);
bt_mesh_mutex_create(&seg_rx_lock);
bt_mesh_r_mutex_create(&seg_tx_lock);
bt_mesh_r_mutex_create(&seg_rx_lock);
}
#if CONFIG_BLE_MESH_DEINIT
@ -2338,7 +2360,7 @@ void bt_mesh_trans_deinit(bool erase)
bt_mesh_tx_reset();
bt_mesh_rpl_reset(erase);
bt_mesh_mutex_free(&seg_tx_lock);
bt_mesh_mutex_free(&seg_rx_lock);
bt_mesh_r_mutex_free(&seg_tx_lock);
bt_mesh_r_mutex_free(&seg_rx_lock);
}
#endif /* CONFIG_BLE_MESH_DEINIT */

View File

@ -61,7 +61,7 @@ bool hci_host_check_send_available(void)
void hci_host_send_packet(uint8_t *data, uint16_t len)
{
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_record_hci_data(data[0], data, len);
bt_hci_log_record_hci_data(data[0], &data[1], len - 1);
#endif
#if (BT_CONTROLLER_INCLUDED == TRUE)
esp_vhci_host_send_packet(data, len);

View File

@ -1014,6 +1014,25 @@ esp_err_t esp_ble_dtm_stop(void)
return (btc_transfer_context(&msg, NULL, 0, NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
esp_err_t esp_ble_gap_set_privacy_mode(esp_ble_addr_type_t addr_type, esp_bd_addr_t addr, esp_ble_privacy_mode_t mode)
{
btc_msg_t msg;
btc_ble_gap_args_t arg;
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GAP_BLE;
msg.act = BTC_GAP_BLE_SET_PRIVACY_MODE;
arg.set_privacy_mode.addr_type = addr_type;
memcpy(arg.set_privacy_mode.addr, addr, sizeof(esp_bd_addr_t));
arg.set_privacy_mode.privacy_mode = mode;
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gap_args_t), NULL, NULL)
== BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#if (BLE_50_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gap_read_phy(esp_bd_addr_t bd_addr)

View File

@ -228,6 +228,7 @@ typedef enum {
ESP_GAP_BLE_SET_RPA_TIMEOUT_COMPLETE_EVT, /*!< When set the Resolvable Private Address (RPA) timeout completes, the event comes */
ESP_GAP_BLE_ADD_DEV_TO_RESOLVING_LIST_COMPLETE_EVT, /*!< when add a device to the resolving list completes, the event comes*/
ESP_GAP_BLE_VENDOR_CMD_COMPLETE_EVT, /*!< When vendor hci command complete, the event comes */
ESP_GAP_BLE_SET_PRIVACY_MODE_COMPLETE_EVT, /*!< When set privacy mode complete, the event comes */
ESP_GAP_BLE_EVT_MAX, /*!< when maximum advertising event complete, the event comes */
} esp_gap_ble_cb_event_t;
@ -1030,6 +1031,11 @@ typedef struct {
} esp_ble_gap_past_params_t;
#endif // #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
typedef enum{
ESP_BLE_NETWORK_PRIVACY_MODE = 0X00, /*!< Network Privacy Mode for peer device (default) */
ESP_BLE_DEVICE_PRIVACY_MODE = 0X01, /*!< Device Privacy Mode for peer device */
} esp_ble_privacy_mode_t;
/**
* @brief Gap callback parameters union
*/
@ -1507,6 +1513,12 @@ typedef union {
uint16_t param_len; /*!< The length of parameter buffer */
uint8_t *p_param_buf; /*!< The point of parameter buffer */
} vendor_cmd_cmpl; /*!< Event parameter of ESP_GAP_BLE_VENDOR_CMD_COMPLETE_EVT */
/**
* @brief ESP_GAP_BLE_SET_PRIVACY_MODE_COMPLETE_EVT
*/
struct ble_set_privacy_mode_cmpl_evt_param {
esp_bt_status_t status; /*!< Indicate privacy mode set operation success status */
} set_privacy_mode_cmpl; /*!< Event parameter of ESP_GAP_BLE_SET_PRIVACY_MODE_COMPLETE_EVT */
} esp_ble_gap_cb_param_t;
/**
@ -2640,6 +2652,21 @@ esp_err_t esp_ble_gap_clear_advertising(void);
*/
esp_err_t esp_ble_gap_vendor_command_send(esp_ble_vendor_cmd_params_t *vendor_cmd_param);
/**
* @brief This function set the privacy mode of the device in resolving list.
*
* @note This feature is not supported on ESP32.
*
* @param[in] addr_type: The address type of the peer identity address (BLE_ADDR_TYPE_PUBLIC or BLE_ADDR_TYPE_RANDOM).
* @param[in] addr: The peer identity address of the device.
* @param[in] mode: The privacy mode of the device.
*
* @return
* - ESP_OK : success
* - other : failed
*/
esp_err_t esp_ble_gap_set_privacy_mode(esp_ble_addr_type_t addr_type, esp_bd_addr_t addr, esp_ble_privacy_mode_t mode);
#ifdef __cplusplus
}
#endif

View File

@ -5838,6 +5838,13 @@ void bta_dm_ble_gap_add_dev_to_resolving_list(tBTA_DM_MSG *p_data)
p_data->add_dev_to_resolving_list.p_add_dev_to_resolving_list_callback);
}
void bta_dm_ble_gap_set_privacy_mode(tBTA_DM_MSG *p_data)
{
APPL_TRACE_API("%s, privacy_mode = %d", __func__, p_data->ble_set_privacy_mode.privacy_mode);
BTM_BleSetPrivacyMode(p_data->ble_set_privacy_mode.addr_type, p_data->ble_set_privacy_mode.addr,
p_data->ble_set_privacy_mode.privacy_mode, p_data->ble_set_privacy_mode.p_cback);
}
#if (BLE_50_FEATURE_SUPPORT == TRUE)
void bta_dm_ble_gap_dtm_enhance_tx_start(tBTA_DM_MSG *p_data)
{

View File

@ -2679,6 +2679,21 @@ void BTA_DmBleDtmStop(tBTA_DTM_CMD_CMPL_CBACK *p_dtm_cmpl_cback)
}
}
void BTA_DmBleSetPrivacyMode(uint8_t addr_type, BD_ADDR addr, uint8_t privacy_mode, tBTA_SET_PRIVACY_MODE_CMPL_CBACK *p_cback)
{
tBTA_DM_API_SET_PRIVACY_MODE *p_msg;
if ((p_msg = (tBTA_DM_API_SET_PRIVACY_MODE *)osi_malloc(sizeof(tBTA_DM_API_SET_PRIVACY_MODE)))
!= NULL) {
p_msg->hdr.event = BTA_DM_API_SET_PRIVACY_MODE_EVT;
p_msg->addr_type = addr_type;
memcpy(p_msg->addr, addr, sizeof(BD_ADDR));
p_msg->privacy_mode = privacy_mode;
p_msg->p_cback = p_cback;
bta_sys_sendmsg(p_msg);
}
}
#endif
/*******************************************************************************

View File

@ -234,6 +234,7 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
bta_dm_ble_gap_clear_adv, /* BTA_DM_API_BLE_CLEAR_ADV_EVT */
bta_dm_ble_gap_set_rpa_timeout, /* BTA_DM_API_SET_RPA_TIMEOUT_EVT */
bta_dm_ble_gap_add_dev_to_resolving_list, /* BTA_DM_API_ADD_DEV_TO_RESOLVING_LIST_EVT */
bta_dm_ble_gap_set_privacy_mode, /* BTA_DM_API_SET_PRIVACY_MODE_EVT */
#endif
};

View File

@ -225,6 +225,7 @@ enum {
BTA_DM_API_BLE_CLEAR_ADV_EVT,
BTA_DM_API_SET_RPA_TIMEOUT_EVT,
BTA_DM_API_ADD_DEV_TO_RESOLVING_LIST_EVT,
BTA_DM_API_SET_PRIVACY_MODE_EVT,
#endif
BTA_DM_MAX_EVT
};
@ -950,6 +951,14 @@ typedef struct {
tBTA_CLEAR_ADV_CMPL_CBACK *p_clear_adv_cback;
} tBTA_DM_API_CLEAR_ADV;
typedef struct {
BT_HDR hdr;
tBLE_ADDR_TYPE addr_type;
BD_ADDR addr;
UINT8 privacy_mode;
tBTA_SET_PRIVACY_MODE_CMPL_CBACK *p_cback;
} tBTA_DM_API_SET_PRIVACY_MODE;
#endif /* BLE_INCLUDED */
/* data type for BTA_DM_API_REMOVE_ACL_EVT */
@ -1355,6 +1364,7 @@ typedef union {
tBTA_DM_API_BLE_DTM_RX_START dtm_rx_start;
tBTA_DM_API_BLE_DTM_STOP dtm_stop;
tBTA_DM_API_CLEAR_ADV ble_clear_adv;
tBTA_DM_API_SET_PRIVACY_MODE ble_set_privacy_mode;
#endif
tBTA_DM_API_REMOVE_ACL remove_acl;
@ -1802,6 +1812,7 @@ extern void bta_dm_ble_gap_dtm_stop(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_clear_adv(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_set_rpa_timeout(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_add_dev_to_resolving_list(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_set_privacy_mode(tBTA_DM_MSG *p_data);
#if (BLE_50_FEATURE_SUPPORT == TRUE)
extern void bta_dm_ble_gap_dtm_enhance_tx_start(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_gap_dtm_enhance_rx_start(tBTA_DM_MSG *p_data);

View File

@ -722,6 +722,26 @@ extern void bta_hd_exit_suspend_act(tBTA_HD_DATA *p_data)
bta_sys_idle(BTA_ID_HD, 1, p_cback->addr);
}
/*******************************************************************************
*
* Function bta_hd_open_failure
*
* Description
*
* Returns void
*
******************************************************************************/
extern void bta_hd_open_failure(tBTA_HD_DATA *p_data)
{
tBTA_HD_CBACK_DATA *p_cback = (tBTA_HD_CBACK_DATA *)p_data;
tBTA_HD cback_data = {0};
bdcpy(cback_data.conn.bda, p_cback->addr);
cback_data.conn.status = BTA_HD_ERROR;
cback_data.conn.conn_status = BTA_HD_CONN_STATE_DISCONNECTED;
bta_hd_cb.p_cback(BTA_HD_OPEN_EVT, &cback_data);
}
/*******************************************************************************
*
* Function bta_hd_cback

View File

@ -62,6 +62,7 @@ enum {
BTA_HD_VC_UNPLUG_DONE_ACT,
BTA_HD_SUSPEND_ACT,
BTA_HD_EXIT_SUSPEND_ACT,
BTA_HD_OPEN_FAILURE,
BTA_HD_NUM_ACTIONS
};
@ -74,7 +75,7 @@ const tBTA_HD_ACTION bta_hd_action[] = {
bta_hd_disconnect_act, bta_hd_add_device_act, bta_hd_remove_device_act, bta_hd_send_report_act,
bta_hd_report_error_act, bta_hd_vc_unplug_act, bta_hd_open_act, bta_hd_close_act,
bta_hd_intr_data_act, bta_hd_get_report_act, bta_hd_set_report_act, bta_hd_set_protocol_act,
bta_hd_vc_unplug_done_act, bta_hd_suspend_act, bta_hd_exit_suspend_act,
bta_hd_vc_unplug_done_act, bta_hd_suspend_act, bta_hd_exit_suspend_act, bta_hd_open_failure
};
/* state table information */
@ -118,7 +119,7 @@ const uint8_t bta_hd_st_idle[][BTA_HD_NUM_COLS] = {
/* BTA_HD_API_REPORT_ERROR_EVT */ {BTA_HD_IGNORE, BTA_HD_IDLE_ST},
/* BTA_HD_API_VC_UNPLUG_EVT */ {BTA_HD_VC_UNPLUG_ACT, BTA_HD_IDLE_ST},
/* BTA_HD_INT_OPEN_EVT */ {BTA_HD_OPEN_ACT, BTA_HD_CONN_ST},
/* BTA_HD_INT_CLOSE_EVT */ {BTA_HD_IGNORE, BTA_HD_IDLE_ST},
/* BTA_HD_INT_CLOSE_EVT */ {BTA_HD_OPEN_FAILURE, BTA_HD_IDLE_ST},
/* BTA_HD_INT_INTR_DATA_EVT */ {BTA_HD_IGNORE, BTA_HD_IDLE_ST},
/* BTA_HD_INT_GET_REPORT_EVT */ {BTA_HD_IGNORE, BTA_HD_IDLE_ST},
/* BTA_HD_INT_SET_REPORT_EVT */ {BTA_HD_IGNORE, BTA_HD_IDLE_ST},

View File

@ -164,5 +164,6 @@ extern void bta_hd_set_protocol_act(tBTA_HD_DATA *p_data);
extern void bta_hd_vc_unplug_done_act(tBTA_HD_DATA *p_data);
extern void bta_hd_suspend_act(tBTA_HD_DATA *p_data);
extern void bta_hd_exit_suspend_act(tBTA_HD_DATA *p_data);
extern void bta_hd_open_failure(tBTA_HD_DATA *p_data);
#endif

View File

@ -437,6 +437,8 @@ typedef tBTM_SET_RPA_TIMEOUT_CMPL_CBACK tBTA_SET_RPA_TIMEOUT_CMPL_CBACK;
typedef tBTM_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK tBTA_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK;
typedef tBTM_SET_PRIVACY_MODE_CMPL_CBACK tBTA_SET_PRIVACY_MODE_CMPL_CBACK;
typedef tBTM_CMPL_CB tBTA_CMPL_CB;
typedef tBTM_VSC_CMPL tBTA_VSC_CMPL;
@ -2893,6 +2895,8 @@ extern void BTA_DmBleDtmTxStart(uint8_t tx_channel, uint8_t len_of_data, uint8_t
extern void BTA_DmBleDtmRxStart(uint8_t rx_channel, tBTA_DTM_CMD_CMPL_CBACK *p_dtm_cmpl_cback);
extern void BTA_DmBleDtmStop(tBTA_DTM_CMD_CMPL_CBACK *p_dtm_cmpl_cback);
extern void BTA_DmBleSetPrivacyMode(uint8_t addr_type, BD_ADDR addr, uint8_t privacy_mode, tBTA_SET_PRIVACY_MODE_CMPL_CBACK *p_cback);
/*******************************************************************************
**
** Function BTA_DmBleSetStorageParams

View File

@ -1326,6 +1326,25 @@ static void btc_ble_vendor_hci_cmd_complete_callback(tBTA_VSC_CMPL *p_param)
}
}
static void btc_ble_set_privacy_mode_callback(UINT8 status)
{
esp_ble_gap_cb_param_t param;
bt_status_t ret;
btc_msg_t msg = {0};
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_GAP_BLE;
msg.act = ESP_GAP_BLE_SET_PRIVACY_MODE_COMPLETE_EVT;
param.set_privacy_mode_cmpl.status = btc_btm_status_to_esp_status(status);
ret = btc_transfer_context(&msg, &param, sizeof(esp_ble_gap_cb_param_t), NULL, NULL);
if (ret != BT_STATUS_SUCCESS) {
BTC_TRACE_ERROR("%s btc_transfer_context failed\n", __func__);
}
}
void btc_get_whitelist_size(uint16_t *length)
{
BTM_BleGetWhiteListSize(length);
@ -1504,6 +1523,13 @@ static void btc_ble_dtm_stop(tBTA_DTM_CMD_CMPL_CBACK *p_dtm_cmpl_cback)
BTA_DmBleDtmStop(p_dtm_cmpl_cback);
}
static void btc_ble_set_privacy_mode(uint8_t addr_type,
BD_ADDR addr,
uint8_t privacy_mode,
tBTA_SET_PRIVACY_MODE_CMPL_CBACK *p_cback)
{
BTA_DmBleSetPrivacyMode(addr_type, addr, privacy_mode, p_cback);
}
void btc_gap_ble_cb_handler(btc_msg_t *msg)
{
@ -2354,6 +2380,10 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
arg->vendor_cmd_send.p_param_buf,
btc_ble_vendor_hci_cmd_complete_callback);
break;
case BTC_GAP_BLE_SET_PRIVACY_MODE:
btc_ble_set_privacy_mode(arg->set_privacy_mode.addr_type, arg->set_privacy_mode.addr,
arg->set_privacy_mode.privacy_mode, btc_ble_set_privacy_mode_callback);
break;
default:
break;
}
@ -2364,6 +2394,7 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
//register connection parameter update callback
void btc_gap_callback_init(void)
{
BTM_BleRegiseterPktLengthChangeCallback(btc_set_pkt_length_callback);
BTM_BleRegiseterConnParamCallback(btc_update_conn_param_callback);
#if (BLE_50_FEATURE_SUPPORT == TRUE)
BTM_BleGapRegisterCallback(btc_ble_5_gap_callback);

View File

@ -261,7 +261,7 @@ static void btc_hd_deinit(void)
}
btc_hd_cb.service_dereg_active = FALSE;
// unresgister app will also relase the connection
// unregister app will also release the connection
// and disable after receiving unregister event from lower layer
if (is_hidd_app_register()) {
btc_hd_unregister_app(true);
@ -844,6 +844,8 @@ void btc_hd_cb_handler(btc_msg_t *msg)
// }
// btc_storage_set_hidd((bt_bdaddr_t *)&p_data->conn.bda);
btc_hd_cb.status = BTC_HD_CONNECTED;
} else if (p_data->conn.conn_status == BTA_HD_CONN_STATE_DISCONNECTED) {
btc_hd_cb.status = BTC_HD_DISCONNECTED;
}
param.open.status = p_data->conn.status;
param.open.conn_status = p_data->conn.conn_status;

View File

@ -105,6 +105,7 @@ typedef enum {
BTC_GAP_BLE_ACT_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT,
BTC_GAP_BLE_ACT_ADD_DEVICE_TO_RESOLVING_LIST,
BTC_GAP_BLE_ACT_VENDOR_HCI_CMD_EVT,
BTC_GAP_BLE_SET_PRIVACY_MODE,
} btc_gap_ble_act_t;
/* btc_ble_gap_args_t */
@ -267,9 +268,15 @@ typedef union {
uint8_t param_len;
uint8_t *p_param_buf;
} vendor_cmd_send;
// BTC_GAP_BLE_SET_PRIVACY_MODE
struct set_privacy_mode {
esp_ble_addr_type_t addr_type;
esp_bd_addr_t addr;
uint8_t privacy_mode;
} set_privacy_mode;
} btc_ble_gap_args_t;
#if (BLE_50_FEATURE_SUPPORT == TRUE)
#if (BLE_50_FEATURE_SUPPORT == TRUE)
typedef union {
struct read_phy_args {
esp_bd_addr_t bd_addr;

View File

@ -36,7 +36,7 @@
#include "stack/hcimsgs.h"
#if ((BT_CONTROLLER_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER)
#include "nimble/ble_hci_trans.h"
#include "ble_hci_trans.h"
#endif
#if (C2H_FLOW_CONTROL_INCLUDED == TRUE)
@ -541,6 +541,26 @@ static void host_send_pkt_available_cb(void)
hci_downstream_data_post(OSI_THREAD_MAX_TIMEOUT);
}
void bt_record_hci_data(uint8_t *data, uint16_t len)
{
#if (BT_HCI_LOG_INCLUDED == TRUE)
if ((data[0] == DATA_TYPE_EVENT) && (data[1] == HCI_BLE_EVENT) && ((data[3] == HCI_BLE_ADV_PKT_RPT_EVT) || (data[3] == HCI_BLE_DIRECT_ADV_EVT)
#if (BLE_ADV_REPORT_FLOW_CONTROL == TRUE)
|| (data[3] == HCI_BLE_ADV_DISCARD_REPORT_EVT)
#endif // (BLE_ADV_REPORT_FLOW_CONTROL == TRUE)
#if (BLE_50_FEATURE_SUPPORT == TRUE)
|| (data[3] == HCI_BLE_EXT_ADV_REPORT_EVT) || (data[3] == HCI_BLE_PERIOD_ADV_REPORT_EVT)
#endif // (BLE_50_FEATURE_SUPPORT == TRUE)
)) {
bt_hci_log_record_hci_adv(HCI_LOG_DATA_TYPE_ADV, &data[2], len - 2);
} else {
uint8_t data_type = ((data[0] == 2) ? HCI_LOG_DATA_TYPE_C2H_ACL : data[0]);
bt_hci_log_record_hci_data(data_type, &data[1], len - 1);
}
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
}
static int host_recv_pkt_cb(uint8_t *data, uint16_t len)
{
//Target has packet to host, malloc new buffer for packet
@ -552,13 +572,11 @@ static int host_recv_pkt_cb(uint8_t *data, uint16_t len)
return 0;
}
bt_record_hci_data(data, len);
bool is_adv_rpt = host_recv_adv_packet(data);
if (!is_adv_rpt) {
#if (BT_HCI_LOG_INCLUDED == TRUE)
uint8_t data_type = ((data[0] == 2) ? HCI_LOG_DATA_TYPE_C2H_ACL : data[0]);
bt_hci_log_record_hci_data(data_type, data, len);
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
pkt_size = BT_HDR_SIZE + len;
pkt = (BT_HDR *) osi_calloc(pkt_size);
if (!pkt) {
@ -572,10 +590,6 @@ static int host_recv_pkt_cb(uint8_t *data, uint16_t len)
memcpy(pkt->data, data, len);
fixed_queue_enqueue(hci_hal_env.rx_q, pkt, FIXED_QUEUE_MAX_TIMEOUT);
} else {
#if (BT_HCI_LOG_INCLUDED == TRUE)
// data type is adv report
bt_hci_log_record_hci_adv(HCI_LOG_DATA_TYPE_ADV, data, len);
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
#if !BLE_ADV_REPORT_FLOW_CONTROL
// drop the packets if pkt_queue length goes beyond upper limit
if (pkt_queue_length(hci_hal_env.adv_rpt_q) > HCI_HAL_BLE_ADV_RPT_QUEUE_LEN_MAX) {

View File

@ -70,7 +70,7 @@ static tBTM_BLE_VSC_CB *cmn_ble_gap_vsc_cb_ptr;
static tBTM_BLE_CTRL_FEATURES_CBACK *p_ctrl_le_feature_rd_cmpl_cback = NULL;
#endif
tBTM_CallbackFunc conn_param_update_cb;
tBTM_CallbackFunc conn_callback_func;
/*******************************************************************************
** Local functions
*******************************************************************************/
@ -309,7 +309,21 @@ void btm_ble_sem_free(void)
*******************************************************************************/
void BTM_BleRegiseterConnParamCallback(tBTM_UPDATE_CONN_PARAM_CBACK *update_conn_param_cb)
{
conn_param_update_cb.update_conn_param_cb = update_conn_param_cb;
conn_callback_func.update_conn_param_cb = update_conn_param_cb;
}
/*******************************************************************************
**
** Function BTM_BleRegiseterPktLengthChangeCallback
**
** Description Registers a callback function for packet length changes.
**
** Returns void
**
*******************************************************************************/
void BTM_BleRegiseterPktLengthChangeCallback(tBTM_SET_PKT_DATA_LENGTH_CBACK *ptk_len_chane_cb)
{
conn_callback_func.set_pkt_data_length_cb = ptk_len_chane_cb;
}
/*******************************************************************************
@ -4727,6 +4741,17 @@ BOOLEAN BTM_BleAddDevToResolvingList(BD_ADDR addr,
return TRUE;
}
BOOLEAN BTM_BleSetPrivacyMode(UINT8 addr_type, BD_ADDR bd_addr, UINT8 privacy_mode, tBTM_SET_PRIVACY_MODE_CMPL_CBACK *p_callback)
{
if (btsnd_hcic_ble_set_privacy_mode(addr_type, bd_addr, privacy_mode) != TRUE) {
BTM_TRACE_ERROR("LE SetPrivacyMode Mode=%d: error", privacy_mode);
return FALSE;
}
btm_cb.devcb.p_set_privacy_mode_cmpl_cb = p_callback;
return TRUE;
}
bool btm_ble_adv_pkt_ready(void)
{
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;

View File

@ -454,6 +454,34 @@ void btm_ble_set_rpa_timeout_complete(UINT8 *p, UINT16 evt_len)
}
/*******************************************************************************
**
** Function btm_ble_set_privacy_mode_complete
**
** Description This function is called when the LE Set Privacy Mode command completes.
**
** Parameters p: Pointer to the command complete event data.
** evt_len: Length of the event data.
**
** Returns void
**
*******************************************************************************/
void btm_ble_set_privacy_mode_complete(UINT8 *p, UINT16 evt_len)
{
UINT8 status;
// Extract the status of the command completion from the event data
STREAM_TO_UINT8(status, p);
BTM_TRACE_DEBUG("%s status = 0x%x", __func__, status);
tBTM_SET_PRIVACY_MODE_CMPL_CBACK *p_cb = btm_cb.devcb.p_set_privacy_mode_cmpl_cb;
if (p_cb) {
(*p_cb)(status);
}
}
/*******************************************************************************
VSC that implement controller based privacy
********************************************************************************/

View File

@ -497,6 +497,7 @@ void btm_ble_enable_resolving_list_for_platform (UINT8 rl_mask);
void btm_ble_resolving_list_init(UINT8 max_irk_list_sz);
void btm_ble_resolving_list_cleanup(void);
void btm_ble_add_default_entry_to_resolving_list(void);
void btm_ble_set_privacy_mode_complete(UINT8 *p, UINT16 evt_len);
#endif
void btm_ble_multi_adv_configure_rpa (tBTM_BLE_MULTI_ADV_INST *p_inst);

View File

@ -237,6 +237,9 @@ tBTM_SET_RPA_TIMEOUT_CMPL_CBACK *p_ble_set_rpa_timeout_cmpl_cb; /* Callback fun
ble set rpa timeout is completed */
tBTM_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK *p_add_dev_to_resolving_list_cmpl_cb;
tBTM_SET_PRIVACY_MODE_CMPL_CBACK *p_set_privacy_mode_cmpl_cb;
tBTM_CMPL_CB *p_le_test_cmd_cmpl_cb; /* Callback function to be called when
LE test mode command has been sent successfully */
@ -970,9 +973,11 @@ typedef struct {
typedef struct{
//connection parameters update callback
tBTM_UPDATE_CONN_PARAM_CBACK *update_conn_param_cb;
// setting packet data length callback
tBTM_SET_PKT_DATA_LENGTH_CBACK *set_pkt_data_length_cb;
}tBTM_CallbackFunc;
extern tBTM_CallbackFunc conn_param_update_cb;
extern tBTM_CallbackFunc conn_callback_func;
/* security action for L2CAP COC channels */
#define BTM_SEC_OK 1
#define BTM_SEC_ENCRYPT 2 /* encrypt the link with current key */

View File

@ -1100,6 +1100,10 @@ static void btu_hcif_hdl_command_complete (UINT16 opcode, UINT8 *p, UINT16 evt_l
case HCI_BLE_SET_RAND_PRIV_ADDR_TIMOUT:
btm_ble_set_rpa_timeout_complete(p, evt_len);
break;
case HCI_BLE_SET_PRIVACY_MODE:
btm_ble_set_privacy_mode_complete(p, evt_len);
break;
#endif // #if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE)
#if (BLE_50_FEATURE_SUPPORT == TRUE)
case HCI_BLE_SET_EXT_ADV_PARAM:
case HCI_BLE_SET_EXT_ADV_DATA:
@ -1139,7 +1143,6 @@ static void btu_hcif_hdl_command_complete (UINT16 opcode, UINT8 *p, UINT16 evt_l
break;
}
#endif // #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
#endif
#endif /* (BLE_INCLUDED == TRUE) */
default: {
@ -1252,6 +1255,9 @@ static void btu_hcif_command_complete_evt(BT_HDR *response, void *context)
static void btu_hcif_hdl_command_status (UINT16 opcode, UINT8 status, UINT8 *p_cmd,
void *p_vsc_status_cback)
{
if (status != HCI_SUCCESS){
HCI_TRACE_WARNING("%s,opcode:0x%04x,status:0x%02x", __func__, opcode,status);
}
BD_ADDR bd_addr;
UINT16 handle;
#if BTM_SCO_INCLUDED == TRUE
@ -1465,7 +1471,6 @@ static void btu_hcif_command_status_evt(uint8_t status, BT_HDR *command, void *c
hack->context = context;
event->event = BTU_POST_TO_TASK_NO_GOOD_HORRIBLE_HACK;
if (btu_task_post(SIG_BTU_HCI_MSG, event, OSI_THREAD_MAX_TIMEOUT) == false) {
osi_free(event);
}

View File

@ -1909,4 +1909,28 @@ UINT8 btsnd_hcic_ble_set_default_periodic_adv_sync_trans_params(UINT8 mode, UINT
return btu_hcif_send_cmd_sync(LOCAL_BR_EDR_CONTROLLER_ID, p);
}
#endif // #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
UINT8 btsnd_hcic_ble_set_privacy_mode(UINT8 addr_type, BD_ADDR addr, UINT8 privacy_mode)
{
BT_HDR *p;
UINT8 *pp;
if ((p = HCI_GET_CMD_BUF (HCIC_PARAM_SIZE_SET_PRIVACY_MODE)) == NULL) {
return (FALSE);
}
pp = (UINT8 *)(p + 1);
p->len = HCIC_PREAMBLE_SIZE + HCIC_PARAM_SIZE_SET_PRIVACY_MODE;
p->offset = 0;
UINT16_TO_STREAM(pp, HCI_BLE_SET_PRIVACY_MODE);
UINT8_TO_STREAM(pp, HCIC_PARAM_SIZE_SET_PRIVACY_MODE);
UINT8_TO_STREAM(pp, addr_type);
BDADDR_TO_STREAM(pp, addr);
UINT8_TO_STREAM(pp, privacy_mode);
btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
return (TRUE);
}
#endif

View File

@ -231,7 +231,7 @@ static void hidd_l2cif_connect_cfm(uint16_t cid, uint16_t result)
tHID_CONN *p_hcon = &hd_cb.device.conn;
HIDD_TRACE_EVENT("%s: cid=%04x result=%d, conn_state=%d", __func__, cid, result, p_hcon->conn_state);
if (p_hcon->ctrl_cid != cid && p_hcon->intr_cid != cid) {
HIDD_TRACE_WARNING("%s: unknown cid", __func__);
HIDD_TRACE_WARNING("%s: unknown cid=%04x", __func__, cid);
return;
}
if (!(p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) ||
@ -243,10 +243,12 @@ static void hidd_l2cif_connect_cfm(uint16_t cid, uint16_t result)
}
if (result != L2CAP_CONN_OK) {
HIDD_TRACE_WARNING("%s: connection failed, now disconnect", __func__);
if (cid == p_hcon->ctrl_cid)
if (cid == p_hcon->ctrl_cid) {
p_hcon->ctrl_cid = 0;
else
} else {
p_hcon->intr_cid = 0;
}
hidd_conn_disconnect();
hd_cb.callback(hd_cb.device.addr, HID_DHOST_EVT_CLOSE, HID_L2CAP_CONN_FAIL | (uint32_t)result, NULL);
return;
@ -278,7 +280,7 @@ static void hidd_l2cif_config_ind(uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
HIDD_TRACE_EVENT("%s: cid=%04x", __func__, cid);
p_hcon = &hd_cb.device.conn;
if (p_hcon->ctrl_cid != cid && p_hcon->intr_cid != cid) {
HIDD_TRACE_WARNING("%s: unknown cid", __func__);
HIDD_TRACE_WARNING("%s: unknown cid=%04x", __func__, cid);
return;
}
if ((!p_cfg->mtu_present) || (p_cfg->mtu > HID_DEV_MTU_SIZE))
@ -297,7 +299,8 @@ static void hidd_l2cif_config_ind(uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
// update flags
if (cid == p_hcon->ctrl_cid) {
p_hcon->conn_flags |= HID_CONN_FLAGS_HIS_CTRL_CFG_DONE;
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) && (p_hcon->conn_flags & HID_CONN_FLAGS_MY_CTRL_CFG_DONE)) {
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) && (p_hcon->conn_flags & HID_CONN_FLAGS_MY_CTRL_CFG_DONE) &&
(p_hcon->conn_state != HID_CONN_STATE_CONNECTING_INTR)) {
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL;
if ((p_hcon->intr_cid = L2CA_ConnectReq(HID_PSM_INTERRUPT, hd_cb.device.addr)) == 0) {
p_hcon->conn_state = HID_CONN_STATE_UNUSED;
@ -330,7 +333,7 @@ static void hidd_l2cif_config_cfm(uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
HIDD_TRACE_EVENT("%s: cid=%04x pcfg->result=%d", __func__, cid, p_cfg->result);
p_hcon = &hd_cb.device.conn;
if (p_hcon->ctrl_cid != cid && p_hcon->intr_cid != cid) {
HIDD_TRACE_WARNING("%s: unknown cid", __func__);
HIDD_TRACE_WARNING("%s: unknown cid=%04x", __func__, cid);
return;
}
if (p_hcon->intr_cid == cid && p_cfg->result == L2CAP_CFG_UNACCEPTABLE_PARAMS && p_cfg->qos_present) {
@ -357,7 +360,8 @@ static void hidd_l2cif_config_cfm(uint16_t cid, tL2CAP_CFG_INFO *p_cfg)
// update flags
if (cid == p_hcon->ctrl_cid) {
p_hcon->conn_flags |= HID_CONN_FLAGS_MY_CTRL_CFG_DONE;
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) && (p_hcon->conn_flags & HID_CONN_FLAGS_HIS_CTRL_CFG_DONE)) {
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) && (p_hcon->conn_flags & HID_CONN_FLAGS_HIS_CTRL_CFG_DONE) &&
(p_hcon->conn_state != HID_CONN_STATE_CONNECTING_INTR)) {
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL;
if ((p_hcon->intr_cid = L2CA_ConnectReq(HID_PSM_INTERRUPT, hd_cb.device.addr)) == 0) {
p_hcon->conn_state = HID_CONN_STATE_UNUSED;
@ -389,11 +393,14 @@ static void hidd_l2cif_disconnect_ind(uint16_t cid, bool ack_needed)
HIDD_TRACE_EVENT("%s: cid=%04x ack_needed=%d", __func__, cid, ack_needed);
p_hcon = &hd_cb.device.conn;
if (p_hcon->conn_state == HID_CONN_STATE_UNUSED || (p_hcon->ctrl_cid != cid && p_hcon->intr_cid != cid)) {
HIDD_TRACE_WARNING("%s: unknown cid", __func__);
HIDD_TRACE_WARNING("%s: unknown cid=%04x", __func__, cid);
return;
}
if (ack_needed)
if (ack_needed) {
L2CA_DisconnectRsp(cid);
}
if (cid == p_hcon->ctrl_cid) {
p_hcon->ctrl_cid = 0;
p_hcon->conn_state = HID_CONN_STATE_DISCONNECTING_CTRL;
@ -417,7 +424,7 @@ static void hidd_l2cif_disconnect_ind(uint16_t cid, bool ack_needed)
*
* Function hidd_l2cif_disconnect_cfm
*
* Description Handles L2CAP disconection response
* Description Handles L2CAP disconnection response
*
* Returns void
*
@ -428,7 +435,7 @@ static void hidd_l2cif_disconnect_cfm(uint16_t cid, uint16_t result)
HIDD_TRACE_EVENT("%s: cid=%04x result=%d", __func__, cid, result);
p_hcon = &hd_cb.device.conn;
if (p_hcon->conn_state == HID_CONN_STATE_UNUSED || (p_hcon->ctrl_cid != cid && p_hcon->intr_cid != cid)) {
HIDD_TRACE_WARNING("%s: unknown cid", __func__);
HIDD_TRACE_WARNING("%s: unknown cid=%04x", __func__, cid);
return;
}
if (cid == p_hcon->ctrl_cid) {
@ -465,7 +472,7 @@ static void hidd_l2cif_cong_ind(uint16_t cid, bool congested)
HIDD_TRACE_EVENT("%s: cid=%04x congested=%d", __func__, cid, congested);
p_hcon = &hd_cb.device.conn;
if (p_hcon->conn_state == HID_CONN_STATE_UNUSED || (p_hcon->ctrl_cid != cid && p_hcon->intr_cid != cid)) {
HIDD_TRACE_WARNING("%s: unknown cid", __func__);
HIDD_TRACE_WARNING("%s: unknown cid=%04x", __func__, cid);
return;
}
if (congested) {
@ -492,7 +499,7 @@ static void hidd_l2cif_data_ind(uint16_t cid, BT_HDR *p_msg)
HIDD_TRACE_EVENT("%s: cid=%04x", __func__, cid);
p_hcon = &hd_cb.device.conn;
if (p_hcon->conn_state == HID_CONN_STATE_UNUSED || (p_hcon->ctrl_cid != cid && p_hcon->intr_cid != cid)) {
HIDD_TRACE_WARNING("%s: unknown cid", __func__);
HIDD_TRACE_WARNING("%s: unknown cid=%04x", __func__, cid);
osi_free(p_msg);
return;
}
@ -645,7 +652,7 @@ tHID_STATUS hidd_conn_initiate(void)
p_dev->conn.ctrl_cid = 0;
p_dev->conn.intr_cid = 0;
p_dev->conn.disc_reason = HID_L2CAP_CONN_FAIL;
p_dev->conn.conn_flags = HID_CONN_FLAGS_IS_ORIG;
p_dev->conn.conn_flags |= HID_CONN_FLAGS_IS_ORIG;
BTM_SetOutService(p_dev->addr, BTM_SEC_SERVICE_HIDD_SEC_CTRL, HIDD_SEC_CHN);
/* Check if L2CAP started the connection process */
if ((p_dev->conn.ctrl_cid = L2CA_ConnectReq(HID_PSM_CONTROL, p_dev->addr)) == 0) {

View File

@ -379,7 +379,6 @@ tHID_STATUS HID_HostAddDev ( BD_ADDR addr, UINT16 attr_mask, UINT8 *handle )
if (!hh_cb.devices[i].in_use) {
hh_cb.devices[i].in_use = TRUE;
hh_cb.devices[i].delay_remove = FALSE;
hh_cb.devices[i].is_orig = FALSE;
memcpy( hh_cb.devices[i].addr, addr, sizeof( BD_ADDR ) ) ;
hh_cb.devices[i].state = HID_DEV_NO_CONN;
hh_cb.devices[i].conn_tries = 0 ;
@ -487,7 +486,6 @@ tHID_STATUS HID_HostOpenDev ( UINT8 dev_handle )
}
hh_cb.devices[dev_handle].conn_tries = 1;
hh_cb.devices[dev_handle].is_orig = TRUE;
return hidh_conn_initiate( dev_handle );
}
@ -666,7 +664,7 @@ BOOLEAN HID_HostConnectOrig(UINT8 dev_handle)
break;
}
ret = hh_cb.devices[dev_handle].is_orig;
ret = hidh_conn_is_orig(dev_handle);
} while (0);
return ret;

View File

@ -457,8 +457,8 @@ static void hidh_l2cif_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
if (l2cap_cid == p_hcon->ctrl_cid) {
p_hcon->conn_flags |= HID_CONN_FLAGS_HIS_CTRL_CFG_DONE;
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) &&
(p_hcon->conn_flags & HID_CONN_FLAGS_MY_CTRL_CFG_DONE)) {
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) && (p_hcon->conn_flags & HID_CONN_FLAGS_MY_CTRL_CFG_DONE) &&
(p_hcon->conn_state != HID_CONN_STATE_CONNECTING_INTR)) {
/* Connect interrupt channel */
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL; /* Reset initial reason for CLOSE_EVT: Connection Attempt was made but failed */
if ((p_hcon->intr_cid = L2CA_ConnectReq (HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr)) == 0) {
@ -528,8 +528,8 @@ static void hidh_l2cif_config_cfm (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
if (l2cap_cid == p_hcon->ctrl_cid) {
p_hcon->conn_flags |= HID_CONN_FLAGS_MY_CTRL_CFG_DONE;
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) &&
(p_hcon->conn_flags & HID_CONN_FLAGS_HIS_CTRL_CFG_DONE)) {
if ((p_hcon->conn_flags & HID_CONN_FLAGS_IS_ORIG) && (p_hcon->conn_flags & HID_CONN_FLAGS_HIS_CTRL_CFG_DONE) &&
(p_hcon->conn_state != HID_CONN_STATE_CONNECTING_INTR)) {
/* Connect interrupt channel */
p_hcon->disc_reason = HID_L2CAP_CONN_FAIL; /* Reset initial reason for CLOSE_EVT: Connection Attempt was made but failed */
if ((p_hcon->intr_cid = L2CA_ConnectReq (HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr)) == 0) {
@ -968,7 +968,7 @@ tHID_STATUS hidh_conn_initiate (UINT8 dhandle)
p_dev->conn.disc_reason = HID_L2CAP_CONN_FAIL; /* Reset initial reason for CLOSE_EVT: Connection Attempt was made but failed */
/* We are the originator of this connection */
p_dev->conn.conn_flags = HID_CONN_FLAGS_IS_ORIG;
p_dev->conn.conn_flags |= HID_CONN_FLAGS_IS_ORIG;
if (p_dev->attr_mask & HID_SEC_REQUIRED) {
service_id = BTM_SEC_SERVICE_HIDH_SEC_CTRL;
@ -989,6 +989,20 @@ tHID_STATUS hidh_conn_initiate (UINT8 dhandle)
return ( HID_SUCCESS );
}
/*******************************************************************************
**
** Function hidh_conn_is_orig
**
** Description This function check if we are the originator of this connection
**
** Returns BOOLEAN
**
*******************************************************************************/
BOOLEAN hidh_conn_is_orig(UINT8 dhandle)
{
tHID_HOST_DEV_CTB *p_dev = &hh_cb.devices[dhandle];
return (p_dev->conn.conn_flags & HID_CONN_FLAGS_IS_ORIG);
}
/*******************************************************************************
**

View File

@ -35,7 +35,6 @@ enum { HID_DEV_NO_CONN, HID_DEV_CONNECTED };
typedef struct per_device_ctb {
BOOLEAN in_use;
BOOLEAN delay_remove;
BOOLEAN is_orig;
BD_ADDR addr; /* BD-Addr of the host device */
UINT16 attr_mask; /* 0x01- virtual_cable; 0x02- normally_connectable; 0x03- reconn_initiate;
0x04- sdp_disable; */
@ -66,6 +65,7 @@ extern tHID_STATUS hidh_conn_reg (void);
extern void hidh_conn_dereg( void );
extern tHID_STATUS hidh_conn_disconnect (UINT8 dhandle);
extern tHID_STATUS hidh_conn_initiate (UINT8 dhandle);
extern BOOLEAN hidh_conn_is_orig(UINT8 dhandle);
extern void hidh_proc_repage_timeout (TIMER_LIST_ENT *p_tle);
#ifdef __cplusplus
extern "C" {

View File

@ -1006,6 +1006,8 @@ typedef void (tBTM_START_STOP_ADV_CMPL_CBACK) (UINT8 status);
typedef void (tBTM_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_CMPL_CBACK) (tBTM_STATUS status, uint8_t subcode, uint32_t length, uint8_t *device_info);
typedef void (tBTM_CLEAR_ADV_CMPL_CBACK) (UINT8 status);
typedef void (tBTM_SET_PRIVACY_MODE_CMPL_CBACK) (tBTM_STATUS status);
#if (BLE_50_FEATURE_SUPPORT == TRUE)
#define BTM_BLE_5_GAP_READ_PHY_COMPLETE_EVT 1
#define BTM_BLE_5_GAP_SET_PREFERED_DEFAULT_PHY_COMPLETE_EVT 2
@ -1048,7 +1050,8 @@ typedef void (tBTM_CLEAR_ADV_CMPL_CBACK) (UINT8 status);
#define BTM_BLE_GAP_SET_PAST_PARAMS_COMPLETE_EVT 38
#define BTM_BLE_GAP_PERIODIC_ADV_SYNC_TRANS_RECV_EVT 39
#endif // #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
#define BTM_BLE_5_GAP_UNKNOWN_EVT 40
#define BTM_BLE_GAP_SET_PRIVACY_MODE_COMPLETE_EVT 40
#define BTM_BLE_5_GAP_UNKNOWN_EVT 41
typedef UINT8 tBTM_BLE_5_GAP_EVENT;
#define BTM_BLE_EXT_ADV_DATA_COMPLETE 0x00
@ -1366,6 +1369,7 @@ extern "C" {
**
*******************************************************************************/
void BTM_BleRegiseterConnParamCallback(tBTM_UPDATE_CONN_PARAM_CBACK *update_conn_param_cb);
void BTM_BleRegiseterPktLengthChangeCallback(tBTM_SET_PKT_DATA_LENGTH_CBACK *ptk_len_chane_cb);
/*******************************************************************************
**
@ -2689,6 +2693,25 @@ BOOLEAN BTM_BleAddDevToResolvingList(BD_ADDR addr,
uint8_t irk[],
tBTM_ADD_DEV_TO_RESOLVING_LIST_CMPL_CBACK *p_add_dev_to_resolving_list_callback);
/*******************************************************************************
**
** Function BTM_BleSetPrivacyMode
**
** Description This function is called to set the privacy mode of device in resolving list
**
** Parameters addr_type - The address type of the device in resolving list (public or random).
** addr - The address of the device in resolving list.
** privacy_mode - The privacy mode (network or device) of the device.
** p_callback - Callback function to be called when the operation is completed.
**
** Returns TRUE if the operation was successful, otherwise FALSE.
**
*******************************************************************************/
BOOLEAN BTM_BleSetPrivacyMode(UINT8 addr_type,
BD_ADDR bd_addr,
UINT8 privacy_mode,
tBTM_SET_PRIVACY_MODE_CMPL_CBACK *p_callback);
/*
#ifdef __cplusplus
}

View File

@ -384,8 +384,8 @@
#define HCI_BLE_RD_TRANSMIT_POWER (0x004B | HCI_GRP_BLE_CMDS)
#define HCI_BLE_RD_RF_PATH_COMPENSATION (0x004C | HCI_GRP_BLE_CMDS)
#define HCI_BLE_WR_RF_PATH_COMPENSATION (0x004D | HCI_GRP_BLE_CMDS)
#define HCI_BLE_SET_PRIVACY_MODE (0x004E | HCI_GRP_BLE_CMDS)
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
#define HCI_BLE_SET_PRIVACY_MODE (0x004E | HCI_GRP_BLE_CMDS)
#if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
#define HCI_BLE_SET_PERIOD_ADV_RECV_ENABLE (0x0059 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_PERIOD_ADV_SYNC_TRANS (0x005A | HCI_GRP_BLE_CMDS)
@ -1134,18 +1134,18 @@ typedef UINT8 tHCI_STATUS;
#define HCI_MIN_INQ_LAP 0x9E8B00
#define HCI_MAX_INQ_LAP 0x9E8B3F
/* HCI role defenitions */
/* HCI role definitions */
#define HCI_ROLE_MASTER 0x00
#define HCI_ROLE_SLAVE 0x01
#define HCI_ROLE_UNKNOWN 0xff
/* HCI mode defenitions */
/* HCI mode definitions */
#define HCI_MODE_ACTIVE 0x00
#define HCI_MODE_HOLD 0x01
#define HCI_MODE_SNIFF 0x02
#define HCI_MODE_PARK 0x03
/* HCI Flow Control Mode defenitions */
/* HCI Flow Control Mode definitions */
#define HCI_PACKET_BASED_FC_MODE 0x00
#define HCI_BLOCK_BASED_FC_MODE 0x01
@ -1414,7 +1414,7 @@ typedef UINT8 tHCI_STATUS;
/* Define an invalid value for a handle */
#define HCI_INVALID_HANDLE 0xFFFF
/* Define max ammount of data in the HCI command */
/* Define max amount of data in the HCI command */
#define HCI_COMMAND_SIZE 255
/* Define the preamble length for all HCI Commands.

View File

@ -758,6 +758,7 @@ void btsnd_hcic_vendor_spec_cmd (BT_HDR *buffer, UINT16 opcode,
#define HCIC_PARAM_SIZE_BLE_WRITE_EXTENDED_SCAN_PARAM 11
#define HCIC_PARAM_SIZE_BLE_UPDATE_ADV_FLOW_CONTROL 2
#define HCIC_PARAM_SIZE_BLE_CLEAR_ADV 0
#define HCIC_PARAM_SIZE_SET_PRIVACY_MODE 8
#if (BLE_50_FEATURE_SUPPORT == TRUE)
#define HCIC_PARAM_SIZE_BLE_READ_PHY 2
#define HCIC_PARAM_SIZE_BLE_SET_DEF_PHY 3
@ -1041,6 +1042,8 @@ UINT8 btsnd_hcic_ble_write_rf_path_compensation(UINT16 rf_tx_path, UINT16 rf_rx_
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
UINT8 btsnd_hcic_ble_set_privacy_mode(UINT8 addr_type, BD_ADDR addr, UINT8 privacy_mode);
#define HCIC_PARAM_SIZE_WRITE_AUTHENT_PAYLOAD_TOUT 4
#define HCI__WRITE_AUTHENT_PAYLOAD_TOUT_HANDLE_OFF 0

View File

@ -175,14 +175,14 @@ BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bda, UINT16 min_int, UINT16 max_in
L2CAP_TRACE_ERROR("There are two connection parameter requests that are being updated, please try later ");
}
if ((need_cb == TRUE) && (conn_param_update_cb.update_conn_param_cb != NULL)) {
if ((need_cb == TRUE) && (conn_callback_func.update_conn_param_cb != NULL)) {
tBTM_LE_UPDATE_CONN_PRAMS update_param;
update_param.max_conn_int = max_int;
update_param.min_conn_int = min_int;
update_param.conn_int = p_lcb->current_used_conn_interval;
update_param.slave_latency = p_lcb->current_used_conn_latency;
update_param.supervision_tout = p_lcb->current_used_conn_timeout;
(conn_param_update_cb.update_conn_param_cb)(status, p_lcb->remote_bd_addr, &update_param);
(conn_callback_func.update_conn_param_cb)(status, p_lcb->remote_bd_addr, &update_param);
return (status == HCI_SUCCESS);
}
@ -287,7 +287,7 @@ UINT8 L2CA_GetBleConnRole (BD_ADDR bd_addr)
**
** Function l2cble_notify_le_connection
**
** Description This function notifiy the l2cap connection to the app layer
** Description This function notify the l2cap connection to the app layer
**
** Returns none
**
@ -647,7 +647,7 @@ void l2cble_process_conn_update_evt (UINT16 handle, UINT8 status, UINT16 conn_in
p_lcb->conn_update_mask &= ~L2C_BLE_UPDATE_PARAM_FULL;
btu_stop_timer(&p_lcb->upda_con_timer);
if (conn_param_update_cb.update_conn_param_cb != NULL) {
if (conn_callback_func.update_conn_param_cb != NULL) {
l2c_send_update_conn_params_cb(p_lcb, status);
}
@ -686,7 +686,7 @@ void l2cble_get_conn_param_format_err_from_contoller (UINT8 status, UINT16 handl
btu_stop_timer (&p_lcb->upda_con_timer);
if (conn_param_update_cb.update_conn_param_cb != NULL) {
if (conn_callback_func.update_conn_param_cb != NULL) {
l2c_send_update_conn_params_cb(p_lcb, status);
}
if ((p_lcb->conn_update_mask & L2C_BLE_UPDATE_PARAM_FULL) != 0){
@ -868,7 +868,7 @@ void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len)
**
** Function l2cble_init_direct_conn
**
** Description This function is to initate a direct connection
** Description This function is to initiate a direct connection
**
** Returns TRUE connection initiated, FALSE otherwise.
**
@ -894,7 +894,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
/* There can be only one BLE connection request outstanding at a time */
if (p_dev_rec == NULL) {
L2CAP_TRACE_WARNING ("unknown device, can not initate connection");
L2CAP_TRACE_WARNING ("unknown device, can not initiate connection");
return (FALSE);
}
@ -947,7 +947,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
if (!btm_ble_topology_check(BTM_BLE_STATE_INIT)) {
l2cu_release_lcb (p_lcb);
L2CAP_TRACE_ERROR("initate direct connection fail, topology limitation");
L2CAP_TRACE_ERROR("initiate direct connection fail, topology limitation");
return FALSE;
}
uint32_t link_timeout = L2CAP_BLE_LINK_CONNECT_TOUT;
@ -981,7 +981,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
BLE_CE_LEN_MIN, /* UINT16 min_len */
BLE_CE_LEN_MIN)) { /* UINT16 max_len */
l2cu_release_lcb (p_lcb);
L2CAP_TRACE_ERROR("initate direct connection fail, no resources");
L2CAP_TRACE_ERROR("initiate direct connection fail, no resources");
return (FALSE);
} else {
p_lcb->link_state = LST_CONNECTING;
@ -1033,7 +1033,7 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
btm_ble_set_conn_st (BLE_DIR_CONN);
if(!btsnd_hcic_ble_create_ext_conn(&aux_conn)) {
l2cu_release_lcb (p_lcb);
L2CAP_TRACE_ERROR("initate Aux connection failed, no resources");
L2CAP_TRACE_ERROR("initiate Aux connection failed, no resources");
}
#else
L2CAP_TRACE_ERROR("BLE 5.0 not support!\n");
@ -1324,15 +1324,18 @@ void l2cble_process_data_length_change_event(UINT16 handle, UINT16 tx_data_len,
if(p_acl) {
p_acl->data_length_params = data_length_params;
if (p_acl->p_set_pkt_data_cback) {
// Only when the corresponding API is called will the callback be registered
(*p_acl->p_set_pkt_data_cback)(BTM_SUCCESS, &data_length_params);
} else {
// If the callback is not registered,using global callback
(*conn_callback_func.set_pkt_data_length_cb)(BTM_SUCCESS, &data_length_params);
}
p_acl->data_len_updating = false;
if(p_acl->data_len_waiting) {
p_acl->data_len_waiting = false;
p_acl->p_set_pkt_data_cback = p_acl->p_set_data_len_cback_waiting;
p_acl->p_set_data_len_cback_waiting = NULL;
// if value is same, triger callback directly
// if value is same, trigger callback directly
if(p_acl->tx_len_waiting == p_acl->data_length_params.tx_len) {
if(p_acl->p_set_pkt_data_cback) {
(*p_acl->p_set_pkt_data_cback)(BTM_SUCCESS, &p_acl->data_length_params);
@ -1396,7 +1399,7 @@ void l2cble_set_fixed_channel_tx_data_length(BD_ADDR remote_bda, UINT16 fix_cid,
*******************************************************************************/
void l2c_send_update_conn_params_cb(tL2C_LCB *p_lcb, UINT8 status)
{
if(conn_param_update_cb.update_conn_param_cb != NULL){
if(conn_callback_func.update_conn_param_cb != NULL){
tBTM_LE_UPDATE_CONN_PRAMS update_param;
//if myself update the connection parameters
if (p_lcb->updating_param_flag){
@ -1412,7 +1415,7 @@ void l2c_send_update_conn_params_cb(tL2C_LCB *p_lcb, UINT8 status)
update_param.slave_latency = p_lcb->current_used_conn_latency;
update_param.supervision_tout = p_lcb->current_used_conn_timeout;
(conn_param_update_cb.update_conn_param_cb)(status, p_lcb->remote_bd_addr, &update_param);
(conn_callback_func.update_conn_param_cb)(status, p_lcb->remote_bd_addr, &update_param);
}
}

View File

@ -498,7 +498,6 @@ config BT_NIMBLE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto
@ -597,7 +596,7 @@ if BT_NIMBLE_EXT_ADV
Enable this option to start periodic advertisement.
config BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transer Sync Events"
bool "Enable Transfer Sync Events"
depends on BT_NIMBLE_ENABLE_PERIODIC_ADV
default y
help
@ -666,7 +665,7 @@ config BT_NIMBLE_GATT_CACHING_MAX_DSCS
depends on BT_NIMBLE_GATT_CACHING
default 64
help
Set this option to set the upper limit on number of discriptors per connection to be cached.
Set this option to set the upper limit on number of descriptors per connection to be cached.
config BT_NIMBLE_WHITELIST_SIZE
int "BLE white list size"
@ -907,7 +906,6 @@ config BT_NIMBLE_OPTIMIZE_MULTI_CONN
config BT_NIMBLE_ENC_ADV_DATA
bool "Encrypted Advertising Data"
depends on SOC_ESP_NIMBLE_CONTROLLER
select BT_NIMBLE_EXT_ADV
help
This option is used to enable encrypted advertising data.

View File

@ -21,8 +21,6 @@
#include "freertos/semphr.h"
#include "esp_compiler.h"
#include "soc/soc_caps.h"
#include "bt_common.h"
#include "hci_log/bt_hci_log.h"
#define NIMBLE_VHCI_TIMEOUT_MS 2000
#define BLE_HCI_EVENT_HDR_LEN (2)
@ -77,9 +75,6 @@ int ble_hci_trans_hs_cmd_tx(uint8_t *cmd)
}
if (xSemaphoreTake(vhci_send_sem, NIMBLE_VHCI_TIMEOUT_MS / portTICK_PERIOD_MS) == pdTRUE) {
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_record_hci_data(cmd[0], cmd, len);
#endif
esp_vhci_host_send_packet(cmd, len);
} else {
rc = BLE_HS_ETIMEOUT_HCI;
@ -117,9 +112,6 @@ int ble_hci_trans_hs_acl_tx(struct os_mbuf *om)
len += OS_MBUF_PKTLEN(om);
if (xSemaphoreTake(vhci_send_sem, NIMBLE_VHCI_TIMEOUT_MS / portTICK_PERIOD_MS) == pdTRUE) {
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_record_hci_data(data[0], data, len);
#endif
esp_vhci_host_send_packet(data, len);
} else {
rc = BLE_HS_ETIMEOUT_HCI;
@ -178,7 +170,6 @@ static void ble_hci_rx_acl(uint8_t *data, uint16_t len)
OS_EXIT_CRITICAL(sr);
}
/*
* @brief: BT controller callback function, used to notify the upper layer that
* controller is ready to receive command
@ -223,18 +214,12 @@ static int host_rcv_pkt(uint8_t *data, uint16_t len)
/* Allocate LE Advertising Report Event from lo pool only */
if ((data[1] == BLE_HCI_EVCODE_LE_META) &&
(data[3] == BLE_HCI_LE_SUBEV_ADV_RPT || data[3] == BLE_HCI_LE_SUBEV_EXT_ADV_RPT)) {
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_record_hci_adv(HCI_LOG_DATA_TYPE_ADV, data, len);
#endif
evbuf = ble_transport_alloc_evt(1);
/* Skip advertising report if we're out of memory */
if (!evbuf) {
return 0;
}
} else {
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_record_hci_data(data[0], data, len);
#endif
evbuf = ble_transport_alloc_evt(0);
assert(evbuf != NULL);
}
@ -245,9 +230,6 @@ static int host_rcv_pkt(uint8_t *data, uint16_t len)
rc = ble_hci_trans_ll_evt_tx(evbuf);
assert(rc == 0);
} else if (data[0] == BLE_HCI_UART_H4_ACL) {
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_record_hci_data(HCI_LOG_DATA_TYPE_C2H_ACL, data, len);
#endif
ble_hci_rx_acl(data + 1, len - 1);
}
return 0;
@ -282,10 +264,6 @@ esp_err_t esp_nimble_hci_init(void)
goto err;
}
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_init();
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
xSemaphoreGive(vhci_send_sem);
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
@ -313,10 +291,6 @@ esp_err_t esp_nimble_hci_deinit(void)
ble_buf_free();
#if (BT_HCI_LOG_INCLUDED == TRUE)
bt_hci_log_deinit();
#endif // (BT_HCI_LOG_INCLUDED == TRUE)
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
ble_adv_list_deinit();
#endif

View File

@ -1,20 +1,7 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef H_HCI_TRANSPORT_

View File

@ -65,7 +65,7 @@ struct os_mbuf_pool {
/**
* A packet header structure that preceeds the mbuf packet headers.
* A packet header structure that proceeds the mbuf packet headers.
*/
struct os_mbuf_pkthdr {
/**
@ -89,7 +89,7 @@ struct os_mbuf {
*/
uint8_t *om_data;
/**
* Flags associated with this buffer, see OS_MBUF_F_* defintions
* Flags associated with this buffer, see OS_MBUF_F_* definitions
*/
uint8_t om_flags;
/**

Some files were not shown because too many files have changed in this diff Show More