Compare commits

..

3465 Commits

Author SHA1 Message Date
Aditya Patwardhan
96567cb17b Merge branch 'bugfix/http_client_test_failure_v5.3' into 'release/v5.3'
fix: update root certificate for postman-echo endpoint (v5.3)

See merge request espressif/esp-idf!39848
2025-06-18 14:16:04 +05:30
Island
a5e7c6c7a7 Merge branch 'feat/ble_mesh_micellaneous_fix_v5.3' into 'release/v5.3'
Feat/ble mesh micellaneous fix (v5.3)

See merge request espressif/esp-idf!39636
2025-06-18 10:17:04 +08:00
Rahul Tank
fed967df46 Merge branch 'feat/auto_security_initiate_v5.3' into 'release/v5.3'
feat(nimble): Automatically initiate security if a GATT service request fails (v5.3)

See merge request espressif/esp-idf!39865
2025-06-17 11:47:02 +05:30
morris
9f5cea4dd9 Merge branch 'fix/jpeg_encode_msync_v5.3' into 'release/v5.3'
fix(jpeg): Fix wrong parameter in jpeg encoder msync ,eliminate random black line on jpeg decoder (backport v5.3)

See merge request espressif/esp-idf!39889
2025-06-17 10:33:07 +08:00
morris
074a7306d4 Merge branch 'docs/p4_eco1_usb_pins_backport_v5.3' into 'release/v5.3'
docs(usb): Update ESP32-P4 USB pins to MP version (backport to v5.3)

See merge request espressif/esp-idf!39904
2025-06-17 10:32:26 +08:00
Tomas Rezucha
6d28c1a5ba docs(usb): Update ESP32-P4 USB pins to MP version
Closes https://github.com/espressif/esp-idf/issues/16136
2025-06-16 16:39:08 +02:00
Sumeet Singh
0cdcf41916 feat(nimble): Added two GATT features:
1. Automatically initiate security if a GATT service request fails
2. Encryption, Authentication, and Authorization requirement on CCCD
2025-06-16 17:00:47 +05:30
Rahul Tank
cf343ab4e8 Merge branch 'fix/nimble_pr_issues_v5.3' into 'release/v5.3'
fix(nimble): Add fixes for compilation issues in nimble (v5.3)

See merge request espressif/esp-idf!39843
2025-06-16 15:45:08 +05:30
Island
84bbb92b9f Merge branch 'feat/add_ble_dtm_on_cert_test_v5.3' into 'release/v5.3'
feat(ble): add dtm test code to cert test example on ESP32-C6 (v5.3)

See merge request espressif/esp-idf!39833
2025-06-16 17:40:48 +08:00
C.S.M
b9364776e7 bugfix(jpeg): eliminate random black line on jpeg decoder 2025-06-16 14:37:30 +08:00
C.S.M
7409674b09 fix(jpeg): Fix wrong parameter in jpeg encoder msync 2025-06-16 14:37:30 +08:00
Rahul Tank
34868cf387 Merge branch 'bugfix/pawr_sync_v5.3' into 'release/v5.3'
fix(nimble): memset the sync structs to prevent uncertainty for ext_adv reports (v5.3)

See merge request espressif/esp-idf!39717
2025-06-13 15:24:59 +05:30
Marius Vikhammer
fd806756ac Merge branch 'change/update-esp-event-register-doxygen_v5.3' into 'release/v5.3'
change(esp-event): Update the doxygen comment of esp_event_handler_register (v5.3)

See merge request espressif/esp-idf!39855
2025-06-13 17:17:16 +08:00
Guillaume Souchere
ede772445f change(esp-event): Update the doxygen comment of esp_event_handler_register
Add a comment to specify what happens when registering a handler several times
to the same event.
2025-06-13 08:22:38 +02:00
Mahavir Jain
a9c62e02e4 fix: update root certificate for postman-echo endpoint
The certificate chain for postman-echo endpoint has switched to
Let's Encrypt root CA
2025-06-13 11:05:57 +05:30
zwl
f96430915e feat(ble): add dtm test code to cert test example on ESP32-C6 2025-06-13 11:46:39 +08:00
Island
96c50f997c Merge branch 'bugfix/fix_blecibr25_119_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed extended adv restart failure during reconnection (v5.3)

See merge request espressif/esp-idf!39776
2025-06-13 10:59:27 +08:00
morris
f2e7b746d6 Merge branch 'docs/fix_p4_usb_jtag_pins_v5.3' into 'release/v5.3'
docs(jtag): fix esp32p4 usb jtag pins (v5.3)

See merge request espressif/esp-idf!39158
2025-06-13 10:47:05 +08:00
morris
83b9e29158 Merge branch 'fix/fix_xip_psram_ptr_check_v5.3' into 'release/v5.3'
psram: fixed psram ptr check issue under xip_psram condition for ESP32P4 (v5.3)

See merge request espressif/esp-idf!39734
2025-06-13 10:44:40 +08:00
Rahul Tank
c3e556b510 fix(nimble): Add fixes for compilation issues in nimble
1. Fix compile failures when CSFCS is 0
2. Wrap BLE service API with extern "C"
2025-06-12 20:58:29 +05:30
Rahul Tank
42856071ea Merge branch 'bugfix/fix_kconfig_names_v5.3' into 'release/v5.3'
fix(nimble): Modified Kconfig information to make it more user friendly (v5.3)

See merge request espressif/esp-idf!39645
2025-06-12 20:28:49 +05:30
Rahul Tank
9fc65dca56 Merge branch 'feat/ram_optimization_v5.3' into 'release/v5.3'
fix(nimble): Add support to minimize ram consumption (v5.3)

See merge request espressif/esp-idf!39620
2025-06-12 20:23:45 +05:30
Island
4009aa6ed0 Merge branch 'feat/reduce_bin_size_and_iram_for_ble_rom_code_v5.3' into 'release/v5.3'
feat(ble/controller): Reduce bin size and IRAM for BLE rom code on ESP32-C3 and ESP32-S3 (v5.3)

See merge request espressif/esp-idf!39451
2025-06-12 21:51:51 +08:00
Roland Dobai
16dcf5012d Merge branch 'fix/enable_remove_requirements_file_v5.3' into 'release/v5.3'
fix(tools): handle missing `requirements.*.txt` files for enabled features (v5.3)

See merge request espressif/esp-idf!39804
2025-06-11 15:04:00 +02:00
Marek Fiala
aff708b067 fix(tools): Enabled removing requirements.* files 2025-06-11 11:15:33 +02:00
chenjianhua
18597b1139 feat(ble/bluedroid): Support anonymous address type for white list 2025-06-11 11:11:07 +08:00
chenjianhua
6a2e6d8d98 feat(ble/bluedroid): Add config for BLE vendor hci command and event 2025-06-11 11:11:01 +08:00
chenjianhua
7b613ab0a9 feat(ble/bluedroid): Support BLE vendor event reporting with params 2025-06-11 11:10:55 +08:00
chenjianhua
2e63a39e41 fix(bt/bluedroid): Fixed BLE connection active count getting 2025-06-11 11:10:48 +08:00
Chen Jian Hua
bfc8495686 fix(ble/bluedroid): Fixed extended adv restart failure during reconnection
(cherry picked from commit 6392180813)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-06-10 21:33:27 +08:00
Island
4a01630b37 Merge branch 'change/ble_update_lib_20250606_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250606 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!39738
2025-06-10 11:05:54 +08:00
zhanghaipeng
7eac7d773c fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(4713a69)
- Fixed double free exception during BLE init under low memory
2025-06-10 10:31:34 +08:00
Alexey Gerenkov
e64f3d7559 Merge branch 'ci/fix-custom-oocd-setting_v5.3' into 'release/v5.3'
ci: select OpenOCD binary based on runner (v5.3)

See merge request espressif/esp-idf!39378
2025-06-09 23:17:49 +08:00
Island
d1159f634d Merge branch 'bugfix/fix_ble_smp_fail_0x82_v5.3' into 'release/v5.3'
Bugfix/fix ble smp fail 0x82 (v5.3)

See merge request espressif/esp-idf!39661
2025-06-09 14:38:48 +08:00
morris
86cb813f1d Merge branch 'docs/add_doc_link_for_esp32p4_v5.3' into 'release/v5.3'
docs: Update hw-reference/index.rst for esp32p4 (v5.3)

See merge request espressif/esp-idf!39731
2025-06-09 11:50:50 +08:00
Zhao Wei Liang
bd57080585 fix(ble): change the default ble cca thresh on ESP32-C2
(cherry picked from commit a10696d7e1)

Co-authored-by: cjin <jinchen@espressif.com>
2025-06-09 11:04:17 +08:00
Zhao Wei Liang
37b2119b5d fix(ble): change the default ble cca thresh on ESP32-H2
(cherry picked from commit a2fab0ad60)

Co-authored-by: cjin <jinchen@espressif.com>
2025-06-09 11:04:15 +08:00
Zhao Wei Liang
5a2166c96b fix(ble): change the default ble cca thresh on ESP32-C6
(cherry picked from commit 581521526b)

Co-authored-by: cjin <jinchen@espressif.com>
2025-06-09 11:04:13 +08:00
Zhao Wei Liang
8807b30463 fix(ble): change ld file on ESP32-C2
(cherry picked from commit 6c5bff1bd8)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-06-09 11:04:11 +08:00
Zhao Wei Liang
4eca2abbaf fix(ble): fixed an occasional assertion issue during sync on ESP32-C6
(cherry picked from commit 3c8ba488e0)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-06-09 11:04:09 +08:00
Zhao Wei Liang
15b7fa98c1 change(ble): [AUTO_MR] Update lib_esp32c2 to 7f72c031
(cherry picked from commit 4be18a2469)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-06-09 11:04:07 +08:00
Zhao Wei Liang
65ea7eb2c8 change(ble): [AUTO_MR] Update lib_esp32c6 to 35fe65f4
(cherry picked from commit 57c8d23800)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-06-09 11:04:04 +08:00
Zhao Wei Liang
3f9a7589e1 change(ble): [AUTO_MR] Update lib_esp32h2 to 35fe65f4
(cherry picked from commit dbf7835a6b)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-06-09 11:04:02 +08:00
armando
29a7e5f35f fix(psram): fixed psram ptr check under xip_psram condition
Closes https://github.com/espressif/esp-idf/pull/15999
Closes https://github.com/espressif/esp-idf/issues/15997
2025-06-09 10:34:44 +08:00
John Boiles
9faf8c3a52 fix(memory-utils): Add _instruction_reserved_start/end to esp_psram_check_ptr_addr
Adds missing range check that can be used when SPIRAM_XIP_FROM_PSRAM is enabled.
2025-06-09 10:34:40 +08:00
John Boiles
a2b21a9070 fix(freertos): Use ESP_EARLY_LOGE in vPortTLSPointersDelCb for RISCV
Using ESP_LOG* in this function causes a crash
2025-06-09 10:34:37 +08:00
Zhang Shuxian
4611b10db7 docs: Update hw-reference/index.rst for esp32p4 2025-06-09 10:27:48 +08:00
Rahul Tank
f506bf2777 Merge branch 'bugfix/add_missing_deinit_call_v5.3' into 'release/v5.3'
fix(nimble): Add invocation for mempool_deinit (v5.3)

See merge request espressif/esp-idf!39672
2025-06-07 18:36:04 +05:30
Abhinav Kudnar
009ed01b68 fix(nimble): memset the sync structs to prevent uncertainty for ext_adv reports 2025-06-06 17:14:29 +05:30
Jiang Jiang Jian
37acb543a7 Merge branch 'bugfix/supplicant_analyzer_fixes_v5.3' into 'release/v5.3'
Bugfix/supplicant analyzer fixes (v5.3)

See merge request espressif/esp-idf!39456
2025-06-06 19:04:08 +08:00
luoxu
9b9b5c335f feat(ble_mesh): update lib to f15b27e2d2 2025-06-06 14:37:08 +08:00
luoxu
a99d369dc2 fix(ble_mesh): fixed issue with recv ntf before ccc done 2025-06-06 14:35:16 +08:00
luoxu
3fd78bf329 fix(ble_mesh): fixed proxy server might send segment message with incorrect format
refer commit: 7738bca124
2025-06-06 14:35:08 +08:00
Wang Meng Yang
7242379726 Merge branch 'change/opt_hid_device_connect_description_v5.3' into 'release/v5.3'
docs(bt/bluedroid): Updated HID Device connect API description (v5.3)

See merge request espressif/esp-idf!39605
2025-06-06 09:25:11 +08:00
Sergei Silnov
d8333672f0 Merge branch 'ci/disable-plugin-idf_ci_v5.3' into 'release/v5.3'
ci: disable idf-ci plugin (v5.3)

See merge request espressif/esp-idf!39667
2025-06-05 06:12:12 -03:00
morris
3c5910db24 Merge branch 'fix/s2_adc_cali_loss_resolution_v5.3' into 'release/v5.3'
fix(adc): fix s2 cali loss resolution (v5.3)

See merge request espressif/esp-idf!38596
2025-06-05 14:36:48 +08:00
gaoxu
a68af096e6 fix(adc): fix s2 cali loss resolution 2025-06-05 11:31:59 +08:00
morris
79cfb2630c Merge branch 'ci/fix_c5_related_build_failure' into 'release/v5.3'
ci(esp32c5): bypass the build failure

See merge request espressif/esp-idf!39504
2025-06-05 11:30:13 +08:00
Jiang Jiang Jian
b22ca79669 Merge branch 'bugfix/add_more_checks_when_receiving_espnow_v5.3' into 'release/v5.3'
fix(wifi): Added more check when receiving espnow data (v5.3)

See merge request espressif/esp-idf!39520
2025-06-05 11:07:53 +08:00
Rahul Tank
1a6c26d7b7 Merge branch 'feat/nimble_ancs_final_v5.3' into 'release/v5.3'
fix(nimble): Added support for ANCS in nimble (v5.3)

See merge request espressif/esp-idf!39657
2025-06-04 19:13:42 +05:30
Rahul Tank
2197b5b066 fix(nimble): Add invocation for mempool_deinit 2025-06-04 17:01:09 +05:30
Fu Hanxi
e97adbf002 ci: disable idf-ci plugin
this plugin will be re-enabled with compatible code in !38755
2025-06-04 13:18:40 +02:00
Zhang Hai Peng
c053f1d908 fix(ble/bluedroid): Fixed BLE SMP state machine inconsistency on disconnection
(cherry picked from commit 99121258d4)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-06-04 17:13:34 +08:00
Zhang Hai Peng
504818372c feat(ble/bluedroid): Include SMP state in BLE status reporting
(cherry picked from commit de9a367f13)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-06-04 17:13:32 +08:00
Astha Verma
722a42f6e4 fix(nimble): Added support for ANCS in nimble 2025-06-04 14:29:33 +05:30
Island
8ef869122d Merge branch 'bugfix/fix_ble_crash_when_check_send_pkts_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed null pointer assert in l2c_link_check_send_pkts (v5.3)

See merge request espressif/esp-idf!39597
2025-06-04 16:53:22 +08:00
Shu Chen
39515e2273 Merge branch 'feat/and_function_to_exit_ot_mainloop_v5.3' into 'release/v5.3'
feat(openthread): add a function to exit openthread mainloop safely (v5.3)

See merge request espressif/esp-idf!39612
2025-06-04 08:24:13 +00:00
Rahul Tank
daeca6d07b fix(nimble): Modified Kconfig information to make it more user friendly 2025-06-04 10:44:35 +05:30
Island
45ad092517 Merge branch 'fix/ble_log_spi_out_timer_delete_v5.3' into 'release/v5.3'
fix(ble): set timer handle to null after deletion (v5.3)

See merge request espressif/esp-idf!39558
2025-06-04 11:26:51 +08:00
laokaiyao
39591137c8 ci(esp32c5): bypass the build failure 2025-06-04 11:21:28 +08:00
morris
d11bc380ae Merge branch 'test/c61_disable_build_test_v5.3' into 'release/v5.3'
test(ci): disable c61 helloworld build

See merge request espressif/esp-idf!39629
2025-06-03 22:06:00 +08:00
Roland Dobai
bb24b4fdd5 Merge branch 'fix/gen_soc_caps_v5.3' into 'release/v5.3'
change: config options of the same name must have the same type (v5.3)

See merge request espressif/esp-idf!39571
2025-06-03 15:38:25 +02:00
wanckl
85e28b74aa test(ci): disable c61 helloworld build 2025-06-03 19:49:43 +08:00
Shreeyash
ba39a51377 fix(nimble): Add support to minimize ram consumption 2025-06-03 16:07:10 +05:30
Xu Si Yu
2be5e88549 feat(openthread): add a function to exit openthread main loop safely 2025-06-03 16:45:37 +08:00
Island
eb5c41678f Merge branch 'fix/ble_mesh_solic_tx_pdu_fix_v5.3' into 'release/v5.3'
fix(ble_mesh): fixed issues with proxy solic pdu adv (v5.3)

See merge request espressif/esp-idf!39526
2025-06-03 15:53:55 +08:00
liqigan
f20f53f153 docs(bt/bluedroid): Updated HID Device connect API description
Closes https://github.com/espressif/esp-idf/issues/16020
2025-06-03 15:38:17 +08:00
morris
15bc442a88 Merge branch 'feat/usb-explicit-fifo-config_v5.3' into 'release/v5.3'
feat(usb/hal): Add HAL API to configure custom FIFO layout (backport v5.3)

See merge request espressif/esp-idf!39264
2025-06-03 14:35:32 +08:00
Zhang Hai Peng
d9fd25fc94 fix(ble/bluedroid): Fixed null pointer assert in l2c_link_check_send_pkts
(cherry picked from commit 8150573012)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-06-03 12:13:32 +08:00
morris
fa230832a3 Merge branch 'feature/usb_host_ext_hub_collective_backport_v5.3' into 'release/v5.3'
feat(usb_host): External Hub collective backport to v5.3

See merge request espressif/esp-idf!39578
2025-06-03 11:40:26 +08:00
zhangyanjiao
d6ec5a5225 fix(wifi): Added more check when receiving espnow data 2025-06-03 11:07:59 +08:00
Jiang Jiang Jian
cb1e34073d Merge branch 'bugfix/fix_sta_connection_info_error_on_c5_c6_v5.3' into 'release/v5.3'
fix(wifi): fix the issue that sta connection info loss lr info on C5/C6 (v5.3)

See merge request espressif/esp-idf!39440
2025-06-03 10:57:54 +08:00
Roman Leonov
e550fb11c3 fix(ext_hub): Added processing waiting_release flag while dev changed to IDLE
11382a2a fix(ext_hub): Added processing waiting_release flag while dev changed to IDLE

Co-authored-by: Roman Leonov <roman.leonov@espressif.com>
2025-06-02 11:45:29 +02:00
Roman Leonov
59aa1cbaf8 refactor(ext_hub): Device release (allows to run usb_host test with ext hub)
754d357f refactor(ext_hub): Fixed device release, optimized the order of closing usbh device
fc61875a refactor(ext_hub): Pospone the device release, if device is not IDLE
3fd17b8b refactor(hub): Applied new ext_hub api, refactor func names
3003362b refactor(usb_host): Cancel hub porpagation to the user, rename non-critical func
19ce9ed6 refactor(test_usb_host_async): Added host_lib_task finish notification
f238d75b refactor(ext_port): Remove the error verification, as error will be handled in ext hub driver

Co-authored-by: Roman Leonov <roman.leonov@espressif.com>
2025-06-02 11:45:19 +02:00
Jan Beran
2ee0b6c4dd change(gen_soc_caps_kconfig): check if config options have the same type
Also introduce ignore pragma to prevent some #defines from .h files to
be translated to Kconfig files.
2025-06-02 10:21:36 +02:00
morris
da5f469d16 Merge branch 'refactor/improve_p4_psram_timing_tuning_point_selection_v5.3' into 'release/v5.3'
mspi: improve p4 psram timing tuning point selection (v5.3)

See merge request espressif/esp-idf!38193
2025-05-31 13:54:31 +08:00
Zhou Xiao
75c85605df fix(ble): set timer handle to null after deletion
(cherry picked from commit 1614e71eb6)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-30 19:53:33 +08:00
Wang Meng Yang
ede2d093bf Merge branch 'feat/add_avrcp_init_state_event_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Add events to indicate the initialization states of AVRCP(v5.3)

See merge request espressif/esp-idf!39536
2025-05-30 18:42:21 +08:00
Mahavir Jain
064a724466 Merge branch 'feat/httpd_register_uri_handler_strdup_failure_case_check_v5.3' into 'release/v5.3'
Handling httdp_register_uri_handler() strdup function failure case check (v5.3)

See merge request espressif/esp-idf!39513
2025-05-30 10:04:14 +05:30
luoxu
08852439ce fix(ble_mesh): fixed issues with proxy solic pdu adv 2025-05-30 11:09:29 +08:00
xiongweichao
00512cd39a feat(bt/bluedroid): Add events to indicate the initialization states of AVRCP 2025-05-30 10:14:32 +08:00
Wang Meng Yang
ed87d1d3c7 Merge branch 'fix/incorrect_setting_of_sco_packet_type_mask_v5.3' into 'release/v5.3'
fix(bt): fixed incorrect mask was used to exclude sco packets (backport v5.3)

See merge request espressif/esp-idf!39501
2025-05-30 07:12:16 +08:00
Rahul Tank
62bedaceaa Merge branch 'bugfix/add_ci_files_v5.3' into 'release/v5.3'
fix(nimble): Add CI files for base configurations (v5.3)

See merge request espressif/esp-idf!39243
2025-05-29 14:06:27 +05:30
zhangyanjiao
d08c56a92f fix(wifi): fix the issue that sta connection info loss lr info on C5/C6 2025-05-29 14:25:36 +08:00
hrushikesh.bhosale
6559ae7ec2 feat(http_server): httpd register handler strdup failure case check
In httpd_register_uri_handler api, for the strdup function failure case was not
checked and not returned any error by freeing previously allocated memory, if the memory
allocation for strdup function did not gets successful.

Closes https://github.com/espressif/esp-idf/issues/15878
2025-05-29 11:50:27 +05:30
Mahavir Jain
d2f79c406b Merge branch 'fix/suppress_cert_bundle_serial_number_warning_v5.3' into 'release/v5.3'
fix(mbedtls/esp_crt_bundle): Suppress non-negative serial number warning (v5.3)

See merge request espressif/esp-idf!39403
2025-05-29 10:29:03 +05:30
gongyantao
96b9efad27 fix(bt): fixed incorrect mask was used to exclude sco packets 2025-05-29 09:55:48 +08:00
Rahul Tank
1db2b14f40 fix(nimble): Added CI files for various configurations 2025-05-28 21:49:45 +05:30
Island
1dd628e4a0 Merge branch 'bugfix/fix_send_delete_link_key_cmd_1_v5.3' into 'release/v5.3'
Bugfix/fix send delete link key cmd 1 (v5.3)

See merge request espressif/esp-idf!39444
2025-05-28 10:58:42 +08:00
armando
4c0dcf94ed refactor(mspi): improve p4 timing tuning delayline configurations 2025-05-28 02:56:32 +00:00
armando
e8dc8b5388 refactor(mspi): improved timing tuning max consecutive success points calculation 2025-05-28 02:56:32 +00:00
Island
4e7e58f458 Merge branch 'fix/ble_mesh_micellaneous_update_v5.3' into 'release/v5.3'
Fix/ble mesh micellaneous update v5.3

See merge request espressif/esp-idf!39461
2025-05-28 10:37:40 +08:00
Island
61cc298f77 Merge branch 'feat/ble_log_spi_out_dev_phase_3_v5.3' into 'release/v5.3'
Feat/ble log spi out dev phase 3 (v5.3)

See merge request espressif/esp-idf!39354
2025-05-28 10:35:50 +08:00
Kapil Gupta
541628045a Merge branch 'fix/rrm_config_set_v5.3' into 'release/v5.3'
Set rrm config condition in case RRM monitoring is enabled

See merge request espressif/esp-idf!39432
2025-05-27 18:32:55 +05:30
luoxu
06992821d7 feat(ble_mesh): update lib to bbb57d10f9 2025-05-27 20:11:21 +08:00
luoxu
70d888ddb0 feat(ble_mesh): Change the type of rpl size from uint8 to uint16 2025-05-27 16:59:45 +08:00
luoxu
cf321a1647 fix(ble_mesh): update ble 50 macro on unsupported version 2025-05-27 16:59:45 +08:00
Kapil Gupta
7a07743ecc ci(esp_wifi): Extend eloop test to verify wifi deinit properly 2025-05-27 13:45:32 +05:30
Kapil Gupta
56b6b03e57 fix(esp_wifi): Fixed some concurrency issues in eloop deinit 2025-05-27 13:45:27 +05:30
Kapil Gupta
bc9d6c093f fix(esp_wifi): Add eloop blocking call API for public APIs 2025-05-27 13:45:20 +05:30
Kapil Gupta
7cfa2617af fix(esp_wifi): Fixed static analyzer issues 2025-05-27 13:39:46 +05:30
Kapil Gupta
4ab256a441 fix(esp_wifi): Disble IP renew skip by default 2025-05-27 13:39:46 +05:30
Zhi Wei Jian
ad523cf3ff feat(ble/controller): Reduce bin size and IRAM for BLE rom code
(cherry picked from commit 1d739291ca)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-05-27 16:03:29 +08:00
luoxu
bd4fee986c fix(ble_mesh): fixed issue where private beacon used incorrect adv type 2025-05-27 15:31:49 +08:00
luoxu
6df436f63c fix(ble_mesh): fixed some issues with ble50 2025-05-27 15:31:43 +08:00
luoxu
6ff7b65c34 feat(ble_mesh): Remote Provisioning Server UUID Matchs Supported 2025-05-27 15:31:31 +08:00
luoxu
876a4aac1f fix(ble_mesh): Remote Provisioning Client/Server bugs fixed 2025-05-27 15:28:46 +08:00
Zhang Hai Peng
9344c8873a fix(ble/bluedroid): Fixed clear BLE device recored
(cherry picked from commit 21391a45fd)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-05-27 15:13:46 +08:00
Zhang Hai Peng
37ac34cff0 fix(ble/bluedroid): Fixed issue with deleting link key when classic Bluetooth is not used
(cherry picked from commit 7c16bce827)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-05-27 15:13:43 +08:00
Jiang Jiang Jian
18b48329df Merge branch 'backport/backport_some_wifi_changes_250526_v5.3' into 'release/v5.3'
fix(wifi): fix some wifi bugs(backport v5.3)

See merge request espressif/esp-idf!39409
2025-05-27 14:36:27 +08:00
tarun.kumar
52040c6a77 fix(wifi) : Set rrm config condition in case RRM monitoring is enabled 2025-05-27 11:03:12 +05:30
Mahavir Jain
30630c6666 Merge branch 'change/exclude_cve-2023-53154_v5.3' into 'release/v5.3'
change: adds CVE-2023-53154 to cJSON sbom exclude list (v5.3)

See merge request espressif/esp-idf!39417
2025-05-27 10:52:07 +05:30
Jiang Jiang Jian
433f0ab716 Merge branch 'fix/nvs_logger_json_output_v5.3' into 'release/v5.3'
fix(nvs_flash/nvs_tool): Fix nvs_tool.py to output required values (v5.3)

See merge request espressif/esp-idf!38682
2025-05-26 20:03:37 +08:00
Jiang Jiang Jian
080ad8423c Merge branch 'bugfix/hwlp_coproc_saving_master_v5.3' into 'release/v5.3'
fix(freertos): workaround a hardware bug related to HWLP coprocessor (backport v5.3)

See merge request espressif/esp-idf!38060
2025-05-26 20:02:48 +08:00
Jiang Jiang Jian
c06e9d3a73 Merge branch 'fix/fix_esp32p4_retention_cost_v5.3' into 'release/v5.3'
fix(esp_hw_support): optimize retention cost and update sleep time compensation (v5.3)

See merge request espressif/esp-idf!38745
2025-05-26 20:01:56 +08:00
Jiang Jiang Jian
3f160107a3 Merge branch 'fix/fix_usj_pad_leakage_v5.3' into 'release/v5.3'
fix(esp_hw_support): always disable USJ pad in sleep to supress leakage (v5.3)

See merge request espressif/esp-idf!39107
2025-05-26 19:57:41 +08:00
Jiang Jiang Jian
96037e9cc3 Merge branch 'fix/fix_usb_hs_phy_leakage_on_deepsleep_v5.3' into 'release/v5.3'
fix(esp_hw_support): Fix deepsleep leakage after initializing USB HS phy (v5.3)

See merge request espressif/esp-idf!39169
2025-05-26 19:56:41 +08:00
Jiang Jiang Jian
b7cdd6ead9 Merge branch 'fix/fix_esp32p4_stuck_in_pd_ana_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix esp32p4 may get stuck when entering deepsleep (v5.3)

See merge request espressif/esp-idf!39284
2025-05-26 19:56:12 +08:00
Jiang Jiang Jian
b78ef76005 Merge branch 'fix/fix_esp_timer_accuracy_when_do_dfs_v5.3' into 'release/v5.3'
fix(esp_hw_support): improve esp timer accuracy on DFS for esp32 & esp32s2 (v5.3)

See merge request espressif/esp-idf!39341
2025-05-26 19:54:44 +08:00
Ashish Sharma
f8795b4e10 change: adds CVE-2023-53154 to cJSON sbom exclude list 2025-05-26 17:31:57 +08:00
yinqingzhao
7bcbc483c6 fix(wifi): fix some wifi bugs 2025-05-26 16:43:59 +08:00
harshal.patil
38452e4cc8 fix(mbedtls/esp_crt_bundle): Suppress non-negative serial number warning
Co-authored-by: Mahavir Jain <mahavir.jain@espressif.com>
2025-05-26 13:55:08 +05:30
Zhou Xiao
154c162d99 change(ble): make falling edge when disabling ts sync 2025-05-26 15:35:07 +08:00
Zhou Xiao
8736c4c0a3 fix(ble): fixed spi log init failure return value for ESP32 2025-05-26 10:47:25 +08:00
Zhou Xiao
098d0a1e5f fix(ble): fixed ts sync sleep support trigger 2025-05-23 19:12:45 +08:00
morris
46ac830333 Merge branch 'bugfix/lp_uart_baudrate_limitation_v5.3' into 'release/v5.3'
fix(uart): LP UART does not have the pre-divider for its clock source (v5.3)

See merge request espressif/esp-idf!37595
2025-05-23 17:10:39 +08:00
morris
2e89dce260 Merge branch 'feature/add_uart_io_deinit_process_v5.3' into 'release/v5.3'
fix(uart): eliminate garbled data on TX/RX line in sleep (v5.3)

See merge request espressif/esp-idf!39281
2025-05-23 16:46:37 +08:00
Zhou Xiao
5872bf889f fix(ble): fixed printf va list cross function pass failure 2025-05-23 12:31:42 +08:00
Samuel Obuch
e75d5b9c46 ci: select OpenOCD binary based on runner 2025-05-23 00:42:49 +02:00
Rahul Tank
e4f973dcf3 Merge branch 'bugfix/coverity_fix_v5.3' into 'release/v5.3'
fix(nimble): Add changes for coverity reported issue (v5.3)

See merge request espressif/esp-idf!39315
2025-05-22 16:29:09 +05:30
Zhou Xiao
afbbf72002 fix(ble): fixed upper layer trans append failure bug
(cherry picked from commit 1e6bc70837)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:39 +08:00
Zhou Xiao
3105d10cbb feat(ble): support ts sync for sleep app
(cherry picked from commit e10460ce14)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:37 +08:00
Zhou Xiao
16383af1ae feat(ble): support controller raw log print out
(cherry picked from commit ed09e97c66)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:35 +08:00
Zhou Xiao
91ce842f01 feat(ble): refactored loss report module and represent frame using struct
(cherry picked from commit 9800d715a5)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:32 +08:00
Zhou Xiao
cc4744cffd feat(ble): support le audio log buffer separation
(cherry picked from commit cd3aa6527c)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:30 +08:00
Zhou Xiao
fb0bb82e1a feat(ble): optimized printf functions code size and speed
(cherry picked from commit e4be25ba63)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:28 +08:00
Zhou Xiao
4e8e6b7920 feat(ble): refactored flush module and provided public flush api
(cherry picked from commit 70792443c7)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:25 +08:00
Zhou Xiao
b9a06476f1 feat(ble): refactored ll isr buffer append and buffer flush using event handler
(cherry picked from commit bba90309e7)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:23 +08:00
Zhou Xiao
ac35a6e8f2 feat(ble): provided dynamic spi enable/disable api
(cherry picked from commit 3568f19fef)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:20 +08:00
Zhou Xiao
5558bef466 feat(ble): support hci log buffer separation
(cherry picked from commit 16a3b2c71b)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:18 +08:00
Zhou Xiao
43dfe06c05 feat(ble): optimized macros readability
(cherry picked from commit f8699785e9)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-22 16:54:16 +08:00
wuzhenghui
162681d8ea ci(esp_timer): add UT case for esp_timer period alarm with DFS 2025-05-22 15:14:44 +08:00
wuzhenghui
326b32bd74 feat(esp_hw_support): compensate the error introduced to LACT during APB frequency switching 2025-05-22 15:14:43 +08:00
wuzhenghui
bc1624879c fix(esp_hw_support): update systimer step immediately when XTAL changes on esp32s2 2025-05-22 15:14:43 +08:00
wuzhenghui
85aad225d0 fix(esp_hw_support): update LACT clock prescale immediately when APB changes on esp32 2025-05-22 15:14:39 +08:00
Mahavir Jain
c0ab30f33c Merge branch 'feat/some_xip_psram_related_optimisations_and_fixes_v5.3' into 'release/v5.3'
feat(esp_psram): Add some wasted XIP PSRAM memory in heap and XIP PSRAM protection (v5.3)

See merge request espressif/esp-idf!38873
2025-05-22 12:00:14 +05:30
Song Ruo Jing
8baffe22cb fix(uart): LP UART does not have the pre-divider for its clock source
Closes https://github.com/espressif/esp-idf/issues/15427
2025-05-22 11:51:19 +08:00
Song Ruo Jing
6f9979451b fix(gpio): fix bad bit shift operation and OOB (h2) in io_mux.c 2025-05-22 11:51:19 +08:00
Song Ruo Jing
84f8be2e31 refactor(uart): increase test app memory leak tolerance 2025-05-22 11:51:19 +08:00
Island
ade43f3b00 Merge branch 'bugfix/fix_ble_scan_no_adv_report_when_connected_v5.3' into 'release/v5.3'
Fixed missing ADV reports after bonding and connection on ESP32-C3 and ESP32-S3 (v5.3)

See merge request espressif/esp-idf!39274
2025-05-21 18:19:24 +08:00
harshal.patil
5e15adfae9 fix(esp_psram): Add XIP PSRAM alignment gaps in heap only if PSRAM protection is enabled 2025-05-21 15:36:41 +05:30
harshal.patil
29f7654c2b feat(cpu_region_protect): Enable basic memory protection for SPIRAM 2025-05-21 15:36:41 +05:30
harshal.patil
8d42a711c4 feat(esp_psram): Add the gap created due to alignment of XIP segments in heap 2025-05-21 15:36:41 +05:30
harshal.patil
2cb93cd926 feat(esp_psram): Add some helper APIs to get usable PSRAM memory size 2025-05-21 15:36:41 +05:30
Armando
21bd94f116 fix(linker): fixed extern linker symbol type from int to char 2025-05-21 15:36:40 +05:30
morris
a2c53e5690 Merge branch 'fix/slot0_requires_all_pins_in_1bit_mode_issue_v5.3' into 'release/v5.3'
sd: fixed all pins need to be set when using slot0 on esp32p4 issue (v5.3)

See merge request espressif/esp-idf!39307
2025-05-21 15:11:13 +08:00
Song Ruo Jing
266c576d20 fix(ci): remove esp32c5 from the build template app for release/v5.3 2025-05-21 14:37:26 +08:00
Rahul Tank
ae995b34d7 fix(nimble): Add changes for coverity reported issue 2025-05-21 11:38:18 +05:30
Rahul Tank
95b3176fdd Merge branch 'bugfix/handle_flow_control_flag_v5.3' into 'release/v5.3'
fix(nimble): Add chip dependancy flag for Flow control feature (v5.3)

See merge request espressif/esp-idf!39295
2025-05-21 09:53:13 +05:30
armando
870e1f2204 fix(sd): fixed menuconfig multi pin definitions issue 2025-05-21 11:16:22 +08:00
armando
8c89c9b9d5 fix(sd): fixed slot0 requires all pins to be set when using 1bit iomux mode on p4 2025-05-21 11:13:28 +08:00
Rahul Tank
9a2a3d0d86 Merge branch 'feat/min_size_builds_v5.3' into 'release/v5.3'
fix(nimble): Add support for minimilistic builds (v5.3)

See merge request espressif/esp-idf!39100
2025-05-20 21:03:50 +05:30
igor.masar
d98a828c7e feat(usb/hal): Add support for explicit FIFO configuration
Introduce a new HAL API `usb_dwc_hal_set_fifo_config()` that allows advanced users
to manually configure RX, Non-Periodic TX, and Periodic TX FIFO sizes. This offers
fine-grained control beyond the previous bias-based sizing approach.

The HAL function no longer returns `esp_err_t`, and internal validations are enforced
via `HAL_ASSERT()`. Responsibility for input validation has been moved to the HCD layer.

FIFO configuration must be applied before any USB pipes are created or activated.
This feature is intended for use during `usb_host_install()`.

If no custom FIFO configuration is provided (i.e., all values are zero),
the driver falls back to a bias-based default layout based on Kconfig settings
(`CONFIG_USB_HOST_HW_BUFFER_BIAS_*`). Bias resolution is done inside `hcd_port_init()`.

The `port_obj_t` structure has been extended with a `fifo_config` field, which stores
the configuration to allow re-application after a USB port reset.

Obsolete FIFO bias enums (`usb_hal_fifo_bias_t`, `hcd_port_fifo_bias_t`) and related
APIs (`hcd_port_set_fifo_bias()`) have been removed in favor of the new structure-based mechanism.

The HCD initialization and port reset flow has been updated to use the explicit
FIFO configuration.

USB Host maintainer documentation (`maintainers.md`) has been updated accordingly.
Test cases were updated to remove the usage of removed bias API and now rely on default
or custom FIFO configuration.
2025-05-20 15:44:54 +02:00
Rahul Tank
f2c577ae51 fix(nimble): Add chip dependancy flag for Flow control feature 2025-05-20 18:10:35 +05:30
Song Ruo Jing
674113bfcc fix(gpio): add some detailed error log for gpio_pullup_en and gpio_pulldown_en 2025-05-20 16:49:47 +08:00
Song Ruo Jing
501fb2fab2 fix(uart): eliminate garbled data on UART TX/RX line in sleep 2025-05-20 16:49:47 +08:00
Song Ruo Jing
752df66332 feat(uart): add pin release process to uart driver 2025-05-20 16:49:39 +08:00
wuzhenghui
6866e9d40e fix(esp_hw_support): fix esp32p4 may get stuck when entering deepsleep 2025-05-20 16:01:20 +08:00
Mahavir Jain
2be4cef6f2 Merge branch 'feat/cjson_update_to_upstream_v5.3' into 'release/v5.3'
feat(cjson): update to latest upstream (v5.3)

See merge request espressif/esp-idf!39227
2025-05-20 09:50:26 +05:30
Mahavir Jain
7d97a53953 Merge branch 'contrib/github_pr_15059_v5.3' into 'release/v5.3'
feat(https): Get TLS errors from http client (GitHub PR) (v5.3)

See merge request espressif/esp-idf!39143
2025-05-20 09:49:12 +05:30
Song Ruo Jing
74a496e3d0 fix(dedic_gpio): fix calloc to heap_caps_calloc 2025-05-20 11:54:44 +08:00
Song Ruo Jing
5383558bb9 fix(uart): fix nmea0183 example wrong knots to m/s unit conversion
Closes https://github.com/espressif/esp-idf/issues/15695
2025-05-20 11:54:26 +08:00
Song Ruo Jing
7c4a6bf9d6 fix(uart): correct C3/S3 module enable porcedure to avoid undesired line noise 2025-05-20 11:54:15 +08:00
Song Ruo Jing
52cd954e41 fix(sleep): uart suspend/flush should also check if port is enabled on esp32 2025-05-20 11:53:59 +08:00
Song Ruo Jing
3de0b669e7 docs(uart): improve set/get baud rate API docs
Closes https://github.com/espressif/esp-idf/issues/15449
2025-05-20 11:53:42 +08:00
Song Ruo Jing
96372d2091 fix(uart): fixed coverity ininitialized scalar variable in uart_tcgetattr 2025-05-20 11:52:22 +08:00
Island
88cb3027f5 Merge branch 'change/ble_update_lib_20250516_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250516 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!39236
2025-05-20 11:39:56 +08:00
Zhang Hai Peng
a689510a6c fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(4713205)
- Fix: Missing ADV reports after bonding and connection


(cherry picked from commit 244d4f8fa7)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-05-20 11:13:27 +08:00
Alexey Gerenkov
811fa4e9f1 Merge branch 'ci/enable_gcov_test_v5.3' into 'release/v5.3'
ci: enable gcov example for all chips (v5.3)

See merge request espressif/esp-idf!39173
2025-05-20 02:04:24 +08:00
Alexey Gerenkov
ef4c750d39 Merge branch 'feat/apptrace-crc16_v5.3' into 'release/v5.3'
Store CRC16 checksum value in the PERFMON1 reg (v5.3)

See merge request espressif/esp-idf!39210
2025-05-20 01:50:54 +08:00
zwl
75fcb6b5d5 fix(ble): fixed occasional assert issue in scan and connection scenarios on ESP32-C6 2025-05-19 20:37:37 +08:00
Rahul Tank
03dfb8e411 fix(nimble): Add support for minimilistic builds 2025-05-19 12:48:32 +05:30
Rahul Tank
7e99457c8f Merge branch 'fix/gattc_proc_comparison_v5.3' into 'release/v5.3'
fix(nimble): Fix proc rx entry comparison (v5.3)

See merge request espressif/esp-idf!39189
2025-05-19 12:32:58 +05:30
Zhao Wei Liang
d42c0c88ef fix(ble): added missed printf for ll log interface
(cherry picked from commit d12e072b35)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-05-19 12:04:01 +08:00
Zhao Wei Liang
6f73cb187c feat(ble): support creating connections during scanning process on ESP32-H2
(cherry picked from commit 207d85a5f7)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-05-19 12:03:59 +08:00
Zhao Wei Liang
3a52c0443c change(ble): [AUTO_MR] Update lib_esp32c2 to 664e4255
(cherry picked from commit 3cfd4d0166)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-05-19 12:03:56 +08:00
Zhao Wei Liang
e248ccd543 change(ble): [AUTO_MR] Update lib_esp32c6 to 1304a9d0
(cherry picked from commit 69158d5064)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-05-19 12:03:54 +08:00
Zhao Wei Liang
4ba0a8310b change(ble): [AUTO_MR] Update lib_esp32h2 to 1304a9d0
(cherry picked from commit 29f89efea6)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-05-19 12:03:52 +08:00
Ashish Sharma
ecc61d4e45 feat(cjson): update to latest upstream 2025-05-19 09:51:18 +08:00
morris
292114f622 Merge branch 'refactor/usb_dwc_buff_delay_on_p4_backport_v5.3' into 'release/v5.3'
refactor(hcd_dwc): Apply ls_via_fs_hub delay for all targets (backport to v5.3)

See merge request espressif/esp-idf!39150
2025-05-16 23:04:43 +08:00
Jiang Jiang Jian
df274a328e Merge branch 'bugfix/fix_twt_just_post_one_event_for_multiple_flow_v5.3' into 'release/v5.3'
fix(wifi): fix twt just post one event for multiple flow(Backport v5.3)

See merge request espressif/esp-idf!37758
2025-05-16 19:56:13 +08:00
Erhan Kurubas
6cafe499ed feat(apptrace): Store CRC16 checksum value of exposed block in the perfmon reg 2025-05-16 11:33:12 +02:00
morris
c590bc5beb Merge branch 'refactor/add_dfs_init_auto_test_v5.3' into 'release/v5.3'
fix(mcpwm): the wrong pm lock type on esp32 and esp32s3 (v5.3)

See merge request espressif/esp-idf!39194
2025-05-16 14:34:49 +08:00
morris
3260fd31cf fix(mcpwm): the wrong pm lock type on esp32 and esp32s3 2025-05-16 10:51:37 +08:00
morris
995b09e792 Merge branch 'fix/usbjtag_after_tinyusb_backport_v5.3' into 'release/v5.3'
fix(usb/phy): Fix ability to switch back to USB/JTAG after uninstalling TinyUSB (backport to v5.3)

See merge request espressif/esp-idf!39125
2025-05-16 10:23:04 +08:00
Sumeet Singh
e7e6577568 fix(nimble): Fix proc rx entry comparison (v5.3) 2025-05-15 19:51:00 +05:30
Samuel Obuch
64d8dfa024 ci: fix app_trace_basic test 2025-05-15 14:00:22 +02:00
Samuel Obuch
b1922f4de3 ci: enable gcov example for all chips 2025-05-15 14:00:18 +02:00
wuzhenghui
e0d1641281 fix(esp_hw_support): Fix deepsleep leakage after initializing USB HS phy 2025-05-15 16:05:34 +08:00
Omar Chebib
8943314799 fix(freertos): optimize HWLP context switch by disabling it when unused 2025-05-15 15:48:45 +08:00
Omar Chebib
acd976161f fix(freertos): workaround a hardware bug related to HWLP coprocessor
This commit manually sets the HWLP context to dirty when a Task that needs it is scheduled it.
2025-05-15 15:48:45 +08:00
Alexey Gerenkov
087d7db455 Merge branch 'freertos_sysview_deadlock_fix_v5.3' into 'release/v5.3'
fix(app_trace): prevent deadlock on sysview start (v5.3)

See merge request espressif/esp-idf!39138
2025-05-15 15:46:22 +08:00
Anton Maklakov
3dba09b93f docs(jtag): fix esp32p4 usb jtag pins 2025-05-15 12:13:42 +07:00
morris
711836a6a0 Merge branch 'feat/usb_host_move_dma_cap_mem_to_psram_p4_backport_v5.3' into 'release/v5.3'
feat(usb_host): Move DMA capable memory to external ram on P4 (backport v5.3)

See merge request espressif/esp-idf!39081
2025-05-14 22:20:50 +08:00
Rahul Tank
4d86268751 Merge branch 'bugfix/fix_few_nimble_issues_10052025_v5.3' into 'release/v5.3'
fix(nimble): fix nimble issues 10052025(v5.3)

See merge request espressif/esp-idf!39015
2025-05-14 20:41:42 +08:00
Shu Chen
c16caab061 Merge branch 'feat/calibrate_bus_latency_v5.3' into 'release/v5.3'
Feat/calibrate bus latency v5.3

See merge request espressif/esp-idf!39132
2025-05-14 20:04:49 +08:00
Roman Leonov
bc7c612c1f refactor(hcd_dwc): Apply ls_via_fs_hub delay for all targets 2025-05-14 13:52:16 +02:00
nilesh.kale
7853142e6e fix(esp_http_client): update code format for API
This commit update code format as per IDF standard for API
esp_http_client_get_and_clear_last_tls_error().
2025-05-14 15:25:18 +05:30
Lorenzo Consolaro
81382d93a5 feat(https): Get TLS errors from http client
update PR

update mr

Update components/esp_http_client/esp_http_client.c

Co-authored-by: Nilesh Kale <nilesh.kale@espressif.com>
2025-05-14 15:25:18 +05:30
Island
60cd7f506c Merge branch 'bugfix/fix_some_ble_bugs_0422_v5.3' into 'release/v5.3'
Bugfix/fix some ble bugs 0422 (v5.3)

See merge request espressif/esp-idf!39071
2025-05-14 17:23:20 +08:00
Samuel Obuch
5281c04d97 fix(sysview): do not use freertos ticks to prevent deadlock 2025-05-14 11:22:30 +02:00
Tan Yan Quan
63a287101e feat(openthread): change border agent to kconfig option 2025-05-14 16:15:57 +08:00
Tan Yan Quan
964285f73b fix(openthread): handle SetTimeSyncState when ifconfig up or down 2025-05-14 16:15:51 +08:00
Tan Yan Quan
71d42ab61d feat(openthread): support bus_latency for dual-chip BR solution 2025-05-14 16:15:43 +08:00
Marius Vikhammer
83bac55998 Merge branch 'fix/memory-utils-ptr-executable_v5.3' into 'release/v5.3'
fix(memory-utils): Missing case in esp_ptr_executable logic (backport v5.3)

See merge request espressif/esp-idf!37100
2025-05-14 16:14:50 +08:00
Marius Vikhammer
49025e7140 Merge branch 'fix/memprot-config-used-in-memory-layouts_v5.3' into 'release/v5.3'
fix(heap): Fix wrong config to enable MALLOC_CAP_EXEC in memory_layout.c (backport v5.3)

See merge request espressif/esp-idf!35201
2025-05-14 14:32:22 +08:00
John Boiles
362cca224a fix(usb/phy): Fix ability to switch back to USB/JTAG after uninstalling TinyUSB
Fixes #15912. This is a revert of a change made in 005ae0554 that breaks the
ability to re-initalize the USB/JTAG device after uninstalling TinyUSB.

Closes https://github.com/espressif/esp-idf/issues/15912
2025-05-14 08:25:43 +02:00
Sumeet Singh
e17ed5d738 fix(nimble): Fixed async race condition with HCI outstanding packets counter 2025-05-14 10:29:40 +05:30
Rahul Tank
3e97fa00a2 fix(nimble): Extend support for allow connect during scan for more chips 2025-05-14 10:29:33 +05:30
Rahul Tank
577563840a fix(nimble): Add support for anonymous address type for whitelist 2025-05-14 10:29:25 +05:30
Rahul Tank
378216daf1 fix(nimble): Add configurable option to select ext adv v2 command 2025-05-14 10:29:21 +05:30
Shu Chen
4c8ebb9831 Merge branch 'feat/ot_br_esp32p4_v5.3' into 'release/v5.3'
feat(br): support ot_br example for esp32p4 (v5.3)

See merge request espressif/esp-idf!39009
2025-05-14 09:26:37 +08:00
Rahul Tank
37c0d836ab Merge branch 'fix/gatt_cache_inc_services_uuid_type_error_v5.3' into 'release/v5.3'
fix(nimble): Fixed UUID type error in gatt caching included service search (v5.3)

See merge request espressif/esp-idf!39089
2025-05-14 09:26:22 +08:00
wuzhenghui
ce414f6ca6 fix(esp_hw_support): always disable USJ pad in sleep to supress leakage 2025-05-13 20:13:42 +08:00
Sumeet Singh
8cab86decd fix(nimble): Fixed UUID type error in gatt caching included service search (v5.3) 2025-05-13 17:34:15 +05:30
peter.marcisovsky
196bc310e5 feat(usb_host): Move DMA capable memory to external ram on P4
- DWC-OTG internal DMA can access psram on esp32p4
    - Move DMA memory buffs to psram, to save internal ram
    - HCD tests and MSC example runs in CI with psram enabled
2025-05-13 13:32:38 +02:00
Zhang Hai Peng
0ac1d27ea7 fix(ble/bluedroid): Reduce Bluedroid host log output over SPI
(cherry picked from commit 0586d10317)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-05-13 16:13:59 +08:00
Zhang Hai Peng
31fecc616d fix(ble/bluedroid): Added value len check in esp_ble_gatts_send_indicate()
(cherry picked from commit bfa0fff2e5)

Co-authored-by: Nebojsa Cvetkovic <nebkat@gmail.com>
2025-05-13 16:13:56 +08:00
Zhang Hai Peng
9c282d6e12 fix(ble/bluedroid): Change maximum length of attribute value to 517
(cherry picked from commit df8c1f7a96)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-05-13 16:13:54 +08:00
Zhang Hai Peng
c27dbdf1a9 docs(ble): clarify meaning of 0 value for esp_ble_gap_start_ext_scan() parameters
(cherry picked from commit ebb76933d0)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-05-13 16:13:51 +08:00
Zhang Hai Peng
668739a675 fix(ble/bluedroid): Fixed BLE GAP appearance configuration check
(cherry picked from commit 6552854cb5)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-05-13 16:13:48 +08:00
yinqingzhao
ced26468d4 fix(wifi): fix some wifi bugs 2025-05-13 14:49:53 +08:00
Marius Vikhammer
acea1fc047 Merge branch 'contrib/github_pr_15132_v5.3' into 'release/v5.3'
fix(newlib): usleep returning early (GitHub PR) (v5.3)

See merge request espressif/esp-idf!38709
2025-05-13 14:38:55 +08:00
Guillaume Souchere
7ab1b601ad fix(heap): Fix wrong config to enable MALLOC_CAP_EXEC in memory_layout.c
In esp32c2 and esp32c61 memory_layout.c files, the config used to allow
MALLOC_CAP_EXEC was CONFIG_ESP_SYSTEM_MEMPROT_FEATURE when
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT should be used.

Closes https://github.com/espressif/esp-idf/issues/14836
2025-05-13 08:17:28 +02:00
Guillaume Souchere
cb076f2097 fix(memory-utils): Missing case in esp_ptr_executable logic
esp_ptr_executable does not consider that the PSRAM and FLASH
memory mapping are not always matching.

Added a "pointer is in PSRAM" specific check in the logic to
fix the issue.
2025-05-13 08:16:59 +02:00
Rahul Tank
d56f1b5cb7 Merge branch 'feat/gatt_cache_info_v5.3' into 'release/v5.3'
fix(nimble): Added api's to fetch gatt cache info (v5.3)

See merge request espressif/esp-idf!39031
2025-05-13 13:54:44 +08:00
hrushikesh.bhosale
ad18796692 feat(nvs_tool): Test for print_minimal_json
Added the test for the print_minimal_json function
and setup_minimal_json function to setup the test.
2025-05-12 14:10:08 +02:00
hrushikesh.bhosale
b642feb67e fix(nvs_flash/nvs_tool): Fix nvs_tool.py to output required values
nvs_tool.py did not provide the minimal output support which outputs
the only necessary data.

nvs_tool.py minimal text ouptut, the deliminators were not handled
in the output

Closes https://github.com/espressif/esp-idf/issues/15274
2025-05-12 14:00:31 +02:00
Martin Vychodil
8db2dcca76 Merge branch 'feat/nvs_pytest_add_non_ascii_string_test_v5.3' into 'release/v5.3'
feat: Add NVS generator check test for CRC of non-ASCII strings (v5.3)

See merge request espressif/esp-idf!38843
2025-05-12 19:48:40 +08:00
morris
bc6a2359a4 Merge branch 'fix/rmt_race_condition_v5.3' into 'release/v5.3'
fix(rmt): fix race condition and add receive config error message (v5.3)

See merge request espressif/esp-idf!38999
2025-05-12 15:14:53 +08:00
Astha Verma
8e72311441 fix(nimble): Added api's for fetching gatt cache data and for discovering included service 2025-05-12 11:56:24 +05:30
Rahul Tank
d00ce57499 Merge branch 'bugfix/provide_user_option_delete_pair_v5.3' into 'release/v5.3'
fix(nimble): Added option to stack to handle repeat pairing internally (v5.3)

See merge request espressif/esp-idf!38960
2025-05-12 13:03:04 +08:00
morris
93953299c6 Merge branch 'bugfix/fixed_mismatch_of_tx_queue_statue_v5.3' into 'release/v5.3'
fix(i2s): fixed the false buf catenate while use preload (v5.3)

See merge request espressif/esp-idf!38968
2025-05-12 10:38:03 +08:00
Tan Yan Quan
d7ff344c4f fix(openthread): standardize disable_test to exclude certain targets 2025-05-12 10:37:50 +08:00
Rahul Tank
c15ce89435 fix(nimble): Added option to stack to handle repeat pairing internally 2025-05-10 20:26:11 +05:30
Tan Yan Quan
5f026d7533 feat(openthread/br): update thread-lib for esp32p4 and OT upstream ec2b0d487
* esp-openthread: thread_zigbee/esp-openthread@ac1715a6f
* openthread: espressif/openthread@ec2b0d487
* esp-idf: espressif/esp-idf@eb703e4f0
2025-05-09 11:51:20 +00:00
Tan Yan Quan
eb703e4f0f feat(openthread): update OT upstream to ec2b0d487 2025-05-09 19:41:59 +08:00
Tan Yan Quan
c975aa6aef feat(openthread): support esp32p4 as ot_br 2025-05-09 19:41:34 +08:00
morris
53ab7b89f8 Merge branch 'feat/customize_i2c_operation_transaction_v5.3' into 'release/v5.3'
feat(i2c): Add api for customize i2c transaction interface for un-standard i2c device (backport v5.3)

See merge request espressif/esp-idf!37416
2025-05-09 18:05:27 +08:00
Mahavir Jain
df74d2bc70 Merge branch 'fix/async_handler_example_stack_overflow_issue_v5.3' into 'release/v5.3'
fix(esp_http_server): Async handler example stack overflow fix (v5.3)

See merge request espressif/esp-idf!38997
2025-05-09 17:18:07 +08:00
Island
29c26da8d2 Merge branch 'change/ble_update_lib_20250430_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250430 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!38973
2025-05-09 14:05:19 +08:00
Island
f4b2885b22 Merge branch 'fix/ble_mesh_trans_pending_fix_v5.3' into 'release/v5.3'
fix(ble_mesh): remove tx pending assert (v5.3)

See merge request espressif/esp-idf!38939
2025-05-09 14:03:52 +08:00
Chen Jichang
46f81894b8 fix(rmt): fix race condition and add receive config error message
Closes https://github.com/espressif/esp-idf/issues/15842
Closes https://github.com/espressif/esp-idf/issues/15836
2025-05-09 13:44:29 +08:00
hrushikesh.bhosale
5722889fe3 fix(esp_http_server): Async handler example stack overflow fix
1. In async handler example, on hitting /long URI and closing the
connection forcefully from client (example ctrl + c) cause more stack
size (almost 200 bytes) than successfull request.
2. The connection should be closed from the server as soon as the client
closes the connect (i.e. handler should return ESP_FAIL to close the
connection)
2025-05-09 10:18:27 +05:30
Jiang Jiang Jian
fe6f2d08af Merge branch 'feat/add_svc_info_in_sdf_v5.3' into 'release/v5.3'
Add extended SSI support for NAN Services  (Backport v5.3)

See merge request espressif/esp-idf!38110
2025-05-09 12:14:05 +08:00
Wang Meng Yang
82b1690b10 Merge branch 'feat/add_sdkconfig_for_secure_connection_v5.3' into 'release/v5.3'
fix(bt): disable dm1 for acl-u when aes-ccm is on in peripheral(backport v5.3)

See merge request espressif/esp-idf!38976
2025-05-09 09:38:44 +08:00
Rahul Tank
9e99b2afa3 Merge branch 'feat/autopts_and_ssc_fixes_v5.3' into 'release/v5.3'
feat(nimble): Added fixes related to SSC and AutoPTS testing (v5.3)

See merge request espressif/esp-idf!38797
2025-05-08 21:45:07 +08:00
gongyantao
0de1fab085 fix(bt): disable dm1 for acl-u when aes-ccm is on in peripheral 2025-05-08 18:21:42 +08:00
Shen Wei Long
8f2c00f18a fix(ble): update ld file on ESP32-C2
(cherry picked from commit ee6607b489)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-05-08 14:54:01 +08:00
Shen Wei Long
4103766c1e change(ble): [AUTO_MR] Update lib_esp32c2 to 16e16586
(cherry picked from commit 26754d8e71)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2025-05-08 14:53:58 +08:00
Shen Wei Long
6494b57fe8 change(ble): [AUTO_MR] Update lib_esp32c6 to 9ecb81c8
(cherry picked from commit a477bfb140)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2025-05-08 14:53:56 +08:00
Shen Wei Long
396c10c618 change(ble): [AUTO_MR] Update lib_esp32h2 to 9ecb81c8
(cherry picked from commit a3cc91dbf0)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2025-05-08 14:53:53 +08:00
laokaiyao
c5ead79fce fix(i2s): fixed the false buf catenate while use preload
Closes https://github.com/espressif/esp-idf/issues/15775
2025-05-08 14:24:44 +08:00
Shu Chen
165bacc967 Merge branch 'feat/mtd_parent_search_v5.3' into 'release/v5.3'
feat(openthread): enable parent search function for MTD (v5.3)

See merge request espressif/esp-idf!38821
2025-05-08 14:12:44 +08:00
Shu Chen
0a3fd1aa02 Merge branch 'fix/calibrate_csl_rx_v5.3' into 'release/v5.3'
fix(openthread): calibrate CSL parameters (v5.3)

See merge request espressif/esp-idf!38534
2025-05-08 14:11:43 +08:00
akshat
3f27399ef4 feat(esp_wifi): Add extended SSI support for NAN Services 2025-05-08 11:14:57 +05:30
Mahavir Jain
fbcfce1f20 Merge branch 'feat/c6_v002_compatibility_v5.3' into 'release/v5.3'
hw_support: Add Kconfig option for c6 v0.2 (v5.3)

See merge request espressif/esp-idf!38943
2025-05-08 13:33:17 +08:00
C.S.M
87c6979b97 fix(i2c): Fix that fsm reset cause i2c scl frequency changed on esp32s2 2025-05-08 13:01:30 +08:00
C.S.M
debbb61451 fix(i2c): Fix some i2c coverity issue 2025-05-08 13:01:30 +08:00
C.S.M
0fdd061500 fix(i2c): I2C should not clear bus in a nack state 2025-05-08 13:01:30 +08:00
Jonathan Swoboda
5c7211ed3a fix(i2c): Fix clear bus issue in legacy i2c driver,
Closes https://github.com/espressif/esp-idf/pull/15638
2025-05-08 13:01:30 +08:00
C.S.M
31999770a6 fix(i2c): Fix i2c customize only read one byte issue 2025-05-08 13:01:30 +08:00
C.S.M
1ac593a956 docs(i2c): Add document for customize i2c transaction interface for un-standard i2c device 2025-05-08 13:01:30 +08:00
C.S.M
d5ceed3d96 feat(i2c): Add api for customize i2c transaction interface for un-standard i2c device 2025-05-08 13:01:30 +08:00
Jiang Jiang Jian
6389791949 Merge branch 'bugfix/espnow_send_issue_v53' into 'release/v5.3'
fix(esp_wifi): Fix for issue in esp_now_send when wifi tx callback registered(v5.3)

See merge request espressif/esp-idf!37944
2025-05-08 10:39:34 +08:00
Rahul Tank
c84c699166 Merge branch 'bugfix/conn_with_scan_c6_h2_v5.3' into 'release/v5.3'
fix(nimble): Enable support for Connect with scan for 32/ c6/ h2 chip (v5.3)

See merge request espressif/esp-idf!38853
2025-05-08 08:39:05 +08:00
Sumeet Singh
cbeef453a8 feat(nimble): Added some fixes for autopts testing (v5.3) 2025-05-07 17:02:56 +05:30
Island
44782e53b6 Merge branch 'bugfix/fix_scan_stopped_with_high_rtc_freq_v5.3' into 'release/v5.3'
fix(ble): fix rtc freq set too high on ESP32-C2 (v5.3)

See merge request espressif/esp-idf!38930
2025-05-07 18:47:17 +08:00
Martin Vychodil
a3aa438820 Merge branch 'feat/sdmmc_support_concurrent_use_v5.3' into 'release/v5.3'
feat(sdmmc): Concurrent use of SDMMC peripheral (v5.3)

See merge request espressif/esp-idf!32871
2025-05-07 18:43:43 +08:00
Xiao Xufeng
cdb0c79383 feat(soc): add config option for c6 v0.2 2025-05-07 16:47:31 +08:00
Island
c30b17ee80 Merge branch 'fix/ble_mesh_fixed_insufficient_link_close_v5.3' into 'release/v5.3'
fix(ble_mesh): fixed issue with insufficient link close transmit cnt (v5.3)

See merge request espressif/esp-idf!38897
2025-05-07 15:40:01 +08:00
Rahul Tank
63c0035225 fix(nimble): Enable support for Connect with scan for esp32/c6/ h2 chip 2025-05-07 12:45:38 +05:30
luoxu
92eb463704 fix(ble_mesh): remove tx pending assert 2025-05-07 14:54:39 +08:00
Aditi
f93379abcf fix(esp_wifi): Fix for issue in esp_now_send when wifi tx callback registered 2025-05-07 10:42:00 +05:30
Rahul Tank
207db463bf Merge branch 'fix/optimize_nimble_throughput_example_v5.3' into 'release/v5.3'
fix(nimble): Added support of Dynamic switching between different Phy modes. (v5.3)

See merge request espressif/esp-idf!38911
2025-05-07 12:39:08 +08:00
wuzhenghui
9321f7ef75 fix(esp_hw_support): specify optimize options to avoid dirtying L2 mem after L1D$ writeback 2025-05-07 11:42:36 +08:00
wuzhenghui
ad4f0a8708 fix(esp_hw_support): fix wrong APB clock freq on retenion 2025-05-07 11:42:35 +08:00
wuzhenghui
38d6e17516 feat(esp_hw_support): count pau backup time into sleep rejection judgment 2025-05-07 11:42:35 +08:00
wuzhenghui
61e32da02c feat(esp_hw_support): remeasure sleep_time_overhead_out if min_freq_mhz changed 2025-05-07 11:42:35 +08:00
wuzhenghui
1b47abed1b feat(esp_hw_support): use non-lock regi2c fast-up cpll/mpll enable process after sleep wakeup 2025-05-07 11:42:33 +08:00
Mahavir Jain
4d7f1a4b31 Merge branch 'change/secure_boot_config_description_v5.3' into 'release/v5.3'
Improve description of the config SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS (v5.3)

See merge request espressif/esp-idf!38909
2025-05-07 11:38:19 +08:00
Jiang Jiang Jian
e65ad010ef Merge branch 'bugfix/tsens_read_abnormal_value_v5.3' into 'release/v5.3'
fix: tsens read abnormal value in esp32c2eco4(backport v5.3)

See merge request espressif/esp-idf!38902
2025-05-07 11:37:47 +08:00
wuzhenghui
50846c2595 feat(esp_hw_support): optimize esp32p4 GPIO retention link 2025-05-07 11:36:44 +08:00
wuzhenghui
86d68da4ed fix(esp_hw_support): iomux slp_sel is not avaliable to isolate mspi pin leakage on esp32p4 2025-05-07 11:36:44 +08:00
morris
52215a763f Merge branch 'feature/usb_host_ext_hub_collective_backport_v5.3' into 'release/v5.3'
feat(usb_host): External Hub collective backport to v5.3

See merge request espressif/esp-idf!37268
2025-05-07 10:49:46 +08:00
Jin Chen
2c782de873 fix(ble): fix rtc freq set too high on ESP32-C2
(cherry picked from commit 6a80deac03)

Co-authored-by: cjin <jinchen@espressif.com>
2025-05-07 10:18:33 +08:00
Roman Leonov
add4213c6b refactor(ext_port): Removed ext_hub dependency 2025-05-06 15:21:39 +02:00
Roman Leonov
166a79a764 refactor(ext_port): Changed the mechanism for hub class request
Merged all Hub Class specific request to one function.
Added a callback for the External Port Driver to break the dependency from ext_hub.h
2025-05-06 15:01:33 +02:00
Roman Leonov
02b96db4ae feat(ext_hub): Added device error handling 2025-05-06 14:54:58 +02:00
Roman Leonov
622eab9bad feat(usbh): Added uid presence check in USBH device object list 2025-05-06 14:54:58 +02:00
Shreeyash
d236459656 fix(nimble): Added support for 1m, 2m, coded phy channels and optimized throughput 2025-05-06 18:00:59 +05:30
Rahul Tank
a564be34c6 Merge branch 'bugfix/add_adv_type_parse_v5.3' into 'release/v5.3'
fix(nimble): Add API to parse adv report for given type (v5.3)

See merge request espressif/esp-idf!38790
2025-05-06 19:56:07 +08:00
Roland Dobai
318dbef100 Merge branch 'docs/fix-kconfserver-link_v5.3' into 'release/v5.3'
docs: Fix link to the kconfserver documentation (v5.3)

See merge request espressif/esp-idf!38906
2025-05-06 18:29:05 +08:00
Jiang Jiang Jian
0a0b9bf02d Merge branch 'bugfix/wps_msg_timeout_increase_v5.3' into 'release/v5.3'
fix(esp_wifi): Increase WPS message timeout (v5.3)

See merge request espressif/esp-idf!38876
2025-05-06 16:38:35 +08:00
harshal.patil
53321dd030 change(bootloader_support/secure_boot): Improve description of the config SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS 2025-05-06 13:48:30 +05:30
Jan Beran
0fc301b94c docs: Fix link to the kconfserver documentation 2025-05-06 09:15:19 +02:00
sibeibei
8fe39c57cc fix: tsens read abnormal value in esp32c2eco4 2025-05-06 14:26:11 +08:00
morris
4066380f48 Merge branch 'fix/usb_host_hcd_dma_ls_via_fs_hubs_backport_v5.3' into 'release/v5.3'
fix(hcd): Added delay to slow down scatter-gather dma for ls device via fs hubs (backport v5.3)

See merge request espressif/esp-idf!38649
2025-05-06 13:40:40 +08:00
Luo Xu
29107a553d fix(ble_mesh): fixed issue with insufficient link close transmit cnt
(cherry picked from commit ad1073693e)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-05-06 12:23:28 +08:00
Jiang Jiang Jian
d63d26d580 Merge branch 'feature/add_ds_param_in_probe_req_v5.3' into 'release/v5.3'
Add DS parameter in probe requests from STA (Backport v5.3)

See merge request espressif/esp-idf!38173
2025-05-06 11:19:17 +08:00
Nachiket Kukade
e4b89c0de0 Merge branch 'feat/eap_domain_check_v5.3' into 'release/v5.3'
esp_wifi: Add EAP domain validation support (v5.3)

See merge request espressif/esp-idf!38279
2025-05-05 19:53:24 +08:00
Adam Múdry
f369caa5d2 fix(sdmmc): SDMMC concurrency change active slot only after the slot is initialized
Fixes counting of initialized slots
2025-05-05 18:58:58 +08:00
Adam Múdry
1e04e7cdbb fix(sdmmc): Fix SDMMC slot switch timing related issue on ESP32-P4 2025-05-05 18:58:58 +08:00
Ivan Grokhotkov
6773164b6a fix(sdmmc): don't disable SDIO interrupts when switching slots 2025-05-05 18:58:58 +08:00
Adam Múdry
d29f0f3e21 feat(sdmmc): Concurrent use of SDMMC peripheral
Host and device (card, etc.) initialization is not thread-safe.
After initialization transactions are serialized and guarded by mutex.
Changed `SDMMC_HOST_DEFAULT()` default deinit function to `sdmmc_host_deinit_slot`
which has a slot number as argument.
2025-05-05 18:58:58 +08:00
Adam Múdry
c81c37fe1e refactor(sdmmc): Allow sdmmc_host_init to be called multiple times
Along with slight refactor for sdmmc_host.c
2025-05-05 18:58:58 +08:00
Rahul Tank
7d3abe2c8c Merge branch 'bugfix/fix_ext_disc_example_usage_v5.3' into 'release/v5.3'
fix(nimble): Corrected structure field name usage in examples (v5.3)

See merge request espressif/esp-idf!38859
2025-05-05 13:44:46 +08:00
Aditya Patwardhan
c50e49dd0f Merge branch 'bugfix/esp32_c6_rev0_ecdsa_build_v5.3' into 'release/v5.3'
fix: Secure boot (ECDSA) build failure for C6 rev0 target (v5.3)

See merge request espressif/esp-idf!38835
2025-05-02 10:38:03 +08:00
morris
3a1bd70fea Merge branch 'fix/usb_comprehensive_heap_backport_v5.3' into 'release/v5.3'
fix(usb/host): Do not call heap_caps_get_allocated_size() in USB host driver (backport to v5.3)

See merge request espressif/esp-idf!38863
2025-05-01 07:59:30 +08:00
Kapil Gupta
c2560ed96d fix(esp_wifi): Flush PMK when EAP config is changed 2025-04-30 15:34:16 +05:30
Kapil Gupta
b3baf8c026 fix(esp_wifi): Code cleanup for PR#15550 PR#15551
Closes https://github.com/espressif/esp-idf/pull/15550
Closes https://github.com/espressif/esp-idf/pull/15551
2025-04-30 17:57:37 +08:00
Michael Stoll
05a6990049 fix: Force validate when using the default crt bundle 2025-04-30 17:57:37 +08:00
Michael Stoll
832bd03971 feat: Add domain match to wifi_enterprise example 2025-04-30 17:57:37 +08:00
Michael Stoll
90b7cd0971 feat(esp_wifi): Implement esp_eap_client_set_domain_match 2025-04-30 17:57:37 +08:00
akshat
2922213f7d bugfix(wpa_supplicant): Fix build errors when Supplicant logs are enabled 2025-04-30 15:25:10 +05:30
Kapil Gupta
b6cc3a4abc fix(esp_wifi): Increase WPS timeout 2025-04-30 15:25:10 +05:30
Roland Dobai
f640db4613 Merge branch 'ci/rename-packages_v5.3' into 'release/v5.3'
ci: rename local idf_ci folder, avoid name collision (v5.3)

See merge request espressif/esp-idf!38758
2025-04-30 17:17:53 +08:00
Shu Chen
da117743b2 Merge branch 'fix/fix_ot_set_mac_framecounter_v5.3' into 'release/v5.3'
backport: OpenThread features and bug fixes to v5.3

See merge request espressif/esp-idf!38817
2025-04-30 15:44:24 +08:00
morris
48deddea70 Merge branch 'fix/fix_image_check_16_mega_bytes_limit_v5.3' into 'release/v5.3'
bootloader: fixed image cannot exceed 16MB issue (v5.3)

See merge request espressif/esp-idf!38845
2025-04-30 14:49:51 +08:00
Tomas Rezucha
35e354c77f fix(usb/host): Do not call heap_caps_get_allocated_size() in USB host driver
It causes heap corruption if heap poisoning is enabled on ESP32-P4.
It returns incorrect size on ESP32-S3.

Closes https://github.com/espressif/esp-idf/issues/15815
2025-04-30 08:38:19 +02:00
akshat
199ec4c82b feat(esp_wifi): Add DS parameter in probe requests from STA
Parse the DS IE to get intended channel when softAP rx request,
send probe response only if request is intended for the channel
2025-04-30 11:27:54 +05:30
Mahavir Jain
8e825839dd Merge branch 'feat/configurable_mbedtls_sha1_v5.3' into 'release/v5.3'
feat(mbedtls): Make mbedtls SHA1 support configurable (v5.3)

See merge request espressif/esp-idf!37981
2025-04-30 12:42:19 +08:00
Island
6946068a0e Merge branch 'bugfix/fix_cble50y25_207_v5.3' into 'release/v5.3'
Fixed MIC error disconnection when pairing with iOS devices on ESP32-C3 and ESP32-S3(edf923e) (v5.3)

See merge request espressif/esp-idf!38763
2025-04-30 11:16:49 +08:00
armando
956d74a22b fix(bootloader): fixed image cannot exceed 16MB issue
flash 32-bit-addr is an experimental feature that has multiple
dependencies, e.g. flash chip vendor, etc.

If CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH can be enabled
successfully and tests are passed, we can allow images to be
placed on higher-than-16MB flash addresses
2025-04-30 10:34:55 +08:00
Rahul Tank
0675f2be27 fix(nimble): Corrected structure field name usage in examples 2025-04-29 21:48:12 +05:30
Adam Múdry
26bd3313aa feat: Add NVS generator check test for CRC of non-ASCII strings 2025-04-29 16:45:29 +02:00
Mahavir Jain
ffc4ceb1a5 fix: Secure boot (ECDSA) build failure for C6 rev0 target
Closes https://github.com/espressif/esp-idf/issues/15856
2025-04-29 18:06:08 +08:00
Alexey Gerenkov
d1af51f3fd Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20250422_v5.3' into 'release/v5.3'
feat(tools): update openocd version to v0.12.0-esp32-20250422 (v5.3)

See merge request espressif/esp-idf!38800
2025-04-29 16:20:21 +08:00
Rahul Tank
26ec118faf fix(nimble): Add API to parse adv report for given type 2025-04-29 12:24:59 +05:30
Tan Yan Quan
223ed69c9b feat(openthread): enable parent search function for MTD 2025-04-29 14:37:16 +08:00
Xu Si Yu
300a5ed9f4 feat(openthread): add a callback to handle rcp reset failure 2025-04-29 14:23:17 +08:00
Xu Si Yu
105fe8d804 feat(openthread): dns server of border router bind unspecified netif 2025-04-29 14:23:16 +08:00
Xu Si Yu
6aa0f96ae8 fix(openthread): use esp_netif_tcpip_exec when sending a trel message 2025-04-29 14:23:16 +08:00
Xu Si Yu
b6c5152231 feat(openthread): add a function to ensure monotonically increasing frame counter 2025-04-29 14:12:59 +08:00
Kapil Gupta
adfec6463d fix(esp_wifi): Use supplicant's internal SHA1 if not available from IDF 2025-04-29 11:21:34 +05:30
harshal.patil
5bd3fb9f0c fix(mbedtls): Fix config dependencies when ROM mbedtls is used 2025-04-29 11:20:25 +05:30
harshal.patil
031ca5cc9b fix(wpa_supplicant): Disable fastpbkdf2 when s/w and h/w SHA1 is disabled 2025-04-29 11:20:18 +05:30
Jiang Jiang Jian
eaf03eeca9 Merge branch 'refactor/sae_pt_flag_v5.3' into 'release/v5.3'
refactor(wifi): Optimize wifi bin size for station mode (Backport v5.3)

See merge request espressif/esp-idf!38307
2025-04-29 13:48:37 +08:00
harshal.patil
86fb48da77 fix(esp-tls): Fix build failure when CONFIG_MBEDTLS_SHA1_C is disabled 2025-04-29 11:17:27 +05:30
Kapil Gupta
502229f409 fix(esp_wifi): Add alternate SHA1 APIs in WiFi
Add alternate SHA1 APIs to handle cases when
`CONFIG_MBEDTLS_SHA1_C` is disabled.
2025-04-29 11:17:27 +05:30
harshal.patil
36e5d6c695 feat(mbedtls): Make mbedtls SHA1 support configurable 2025-04-29 11:17:27 +05:30
Sudeep Mohanty
5f5fc0882f test(newlib): Added unit tests for usleep and sleep_for functions
This commit adds unit tests to verify the basic functionality of
usleep() and this_thread::sleep_for() std functions.
2025-04-28 17:13:07 +02:00
Stephen Noonan
3dda3d2438 fix(newlib): usleep returning early
This commit updates usleep() to always sleep for the required sleep
period or more. This fixes a bug where the usleep() could sleep for less
than the request sleep period.

Closes https://github.com/espressif/esp-idf/pull/15132
2025-04-28 17:12:20 +02:00
Rahul Tank
9e042f6d71 Merge branch 'bugfix/blufi_add_missing_adv_stop_v5.3' into 'release/v5.3'
fix(nimble): Added code for missing adv stop in blufi (v5.3)

See merge request espressif/esp-idf!38719
2025-04-28 19:19:43 +08:00
Sajia
17427b5314 refactor(wifi): Optimize wifi bin size for station mode 2025-04-28 14:39:19 +05:30
chenjianhua
c82cabb576 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(edf923e)
- Fixed ble lib linkage issue
2025-04-28 14:11:25 +08:00
Chen Jian Hua
7f3f15f5f1 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(edf923e)
- Fixed MIC error disconnection when pairing with iOS devices


(cherry picked from commit 0df0b53b0a)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-04-28 14:11:11 +08:00
Jiang Jiang Jian
8e95ca2923 Merge branch 'bugfix/fix_some_wifi_bugs_250427_v5.3' into 'release/v5.3'
fix(phy): fix phy data partition restoring default fails issue(Backport v5.3)

See merge request espressif/esp-idf!38776
2025-04-28 11:42:08 +08:00
Jiang Jiang Jian
be21344c3c Merge branch 'fix/fix_usj_pad_retention_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix usj pad config bad retention (v5.3)

See merge request espressif/esp-idf!38747
2025-04-27 19:31:30 +08:00
Rahul Tank
4df0a64c83 Merge branch 'bugfix/ios_hid_failure_v5.3' into 'release/v5.3'
fix(nimble): Update hid device example in nimble to work with iOS (v5.3)

See merge request espressif/esp-idf!38677
2025-04-27 18:36:51 +08:00
muhaidong
3a6d14649a fix(wifi): fix association timeout timer issue for wep shared auth 2025-04-27 16:55:25 +08:00
muhaidong
57336f2a81 fix(phy): fix phy data partition restoring default fails issue
Closes https://github.com/espressif/esp-idf/issues/14698
2025-04-27 16:21:31 +08:00
Jiang Jiang Jian
d950dde7c1 Merge branch 'bugfix/crypto_reset_on_exit_v5.3' into 'release/v5.3'
fix(esp_system): reset crypto peripherals before device restart (v5.3)

See merge request espressif/esp-idf!38476
2025-04-27 14:26:47 +08:00
Jiang Jiang Jian
13091e4a14 Merge branch 'fix/remove-unnecessary-select_v5.3' into 'release/v5.3'
fix(esp_system): Remove unnecessary select from esp_system/Kconfig (v5.3)

See merge request espressif/esp-idf!37521
2025-04-27 14:22:29 +08:00
Jiang Jiang Jian
dcd92c96bf Merge branch 'fix/rmii_ref_ckl_v5.3' into 'release/v5.3'
fix(esp_eth): fixed ESP32P4 EMAC REF RMII CLK output mode (v5.3)

See merge request espressif/esp-idf!38040
2025-04-27 14:21:28 +08:00
Jiang Jiang Jian
7ca3e628e5 Merge branch 'contrib/github_pr_15637_v5.3' into 'release/v5.3'
fix(esp_eth): Fix order of fields in ETH_ESP32_EMAC_DEFAULT_CONFIG on P4 (GitHub PR) (v5.3)

See merge request espressif/esp-idf!38166
2025-04-27 14:20:55 +08:00
Jiang Jiang Jian
9b3e257d48 Merge branch 'fix/memory-utils-esp_ptr_in_rtc_dram_fast_v5.3' into 'release/v5.3'
fix(esp_hw_support): esp_ptr_in_rtc_iram_fast check to return false (backport v5.3)

See merge request espressif/esp-idf!36932
2025-04-27 14:20:10 +08:00
Jiang Jiang Jian
5eb2b8625e Merge branch 'fix/ulp_riscv_interrupt_bug_v5.3' into 'release/v5.3'
fix(ulp): fix ULP RISC-V interrupt handler corrupting the stack (backport v5.3)

See merge request espressif/esp-idf!35226
2025-04-27 14:19:20 +08:00
Island
b158614c9e Merge branch 'feat/add_sync_cte_type_in_pa_sync_v5.3' into 'release/v5.3'
Feat/add sync cte type in pa sync (v5.3)

See merge request espressif/esp-idf!38591
2025-04-27 14:11:50 +08:00
Island
e85aaaaf98 Merge branch 'feat/spi_ble_log_improvement_v5.3' into 'release/v5.3'
feat(ble): Improved SPI BLE Log functionality (v5.3)

See merge request espressif/esp-idf!38740
2025-04-27 14:05:28 +08:00
Jiang Jiang Jian
7615c09c60 Merge branch 'bugfix/pmf_enabled_sae_query_v5.3' into 'release/v5.3'
fix(wifi): SA Query responses not transmitted (Backport v5.3)

See merge request espressif/esp-idf!38244
2025-04-27 10:26:50 +08:00
Island
c854f7f1fd Merge branch 'feat/optimize_cble50y24_109_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Added throughput mode for BLE SPP example (v5.3)

See merge request espressif/esp-idf!38692
2025-04-27 10:14:48 +08:00
Wang Meng Yang
c34c3feed6 Merge branch 'feat/add_api_get_avrc_status_v5.3' into 'release/v5.3'
feat(bt): Add API to get some information of Classic Bluetooth profile(v5.3)

See merge request espressif/esp-idf!38687
2025-04-27 09:52:58 +08:00
Alexey Gerenkov
585da85759 feat(tools): update openocd version to v0.12.0-esp32-20250422 2025-04-26 12:41:10 +02:00
akshat
2ec6169144 fix(wifi): Fix occasional dropping of SA Query responses by SoftAP 2025-04-25 17:46:43 +05:30
Jiang Jiang Jian
6a98af1fa0 Merge branch 'fix/update_os_time_struct_v5.3' into 'release/v5.3'
Modifying os_time_t datatype for platform and compiler independence

See merge request espressif/esp-idf!36718
2025-04-25 18:01:07 +08:00
Fu Hanxi
b27dd7c77a ci: rename local idf_ci folder, avoid name collision 2025-04-25 11:28:13 +02:00
Ivan Grokhotkov
f3782f6701 Merge branch 'fix/keep-got-sections-for-riscv_v5.3' into 'release/v5.3'
feat(esp_system): drop .got* sections and add hint (v5.3)

See merge request espressif/esp-idf!33370
2025-04-25 17:01:49 +08:00
morris
d68e22c828 Merge branch 'bugfix/remove_invalid_link_in_parlio_rx_example_v5.3' into 'release/v5.3'
fix(parlio_rx): remove invalid link in example readme (v5.3)

See merge request espressif/esp-idf!38751
2025-04-25 16:57:04 +08:00
laokaiyao
3455a47bd7 fix(parlio_rx): remove invalid link in example readme 2025-04-25 16:06:14 +08:00
wuzhenghui
c9946759dd fix(esp_hw_support): fix usj pad config bad retention
Closes https://github.com/espressif/esp-idf/issues/15797
2025-04-25 15:55:22 +08:00
tarun.kumar
f7ccfd2293 fix(wifi): Modify authmode to sta for sta connect event 2025-04-25 12:26:59 +05:30
tarun.kumar
155f41760a fix(esp_wifi): Modifying os_time_t datatype for platform and compiler independence 2025-04-25 12:26:38 +05:30
Zhou Xiao
ca8689dfdc feat(ble): Improved SPI BLE Log functionality
* Added checksum for every frame
* Added SPI slave transaction interval workaround
* Added SPI tx done isr issue workaround
* Turned buffer flush to a menuconfig and disabled by default
* Modified packet loss write operation and trigger condition
* Optimized buffer append efficiency for controller ISR


(cherry picked from commit 243705c143)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-04-25 14:53:41 +08:00
xiongweichao
60f188198b feat(bt): Add API to get some information of Classic Bluetooth profile 2025-04-25 14:47:57 +08:00
Wang Meng Yang
1977c705f4 Merge branch 'bugfix/l2cap_no_report_stop_server_evt_v5.3' into 'release/v5.3'
fix(bt): Fixed l2cap not reporting stop server completion event(v5.3)

See merge request espressif/esp-idf!38699
2025-04-25 12:04:22 +08:00
morris
d47c37f233 Merge branch 'test/parlio_rx_cache_safe_v5.3' into 'release/v5.3'
Reenable parlio rx cache safe test (v5.3)

See merge request espressif/esp-idf!38684
2025-04-24 18:47:42 +08:00
Rahul Tank
cc455c05d2 fix(nimble): Added code for missing adv stop in blufi 2025-04-24 14:22:11 +05:30
Alexey Lapshin
bbb257f893 feat(esp_system): drop .got* sections and add hint
Closes https://github.com/espressif/esp-idf/issues/14296
2025-04-24 16:36:31 +08:00
zwl
ae8047d36a feat(ble): add configuration command during RF testing 2025-04-24 16:08:05 +08:00
zhangbowen
3f6cc98495 feat(bt/bluedroid): Added throughput mode for BLE SPP example 2025-04-24 16:07:42 +08:00
xiongweichao
d909fe2156 fix(bt): Fixed l2cap not reporting stop server completion event 2025-04-24 15:14:45 +08:00
Marius Vikhammer
201b376200 Merge branch 'fix/freertos_tickless_idle_tick_jump_v5.3' into 'release/v5.3'
fix(freertos): Fixed tickless idle tick count accounting (v5.3)

See merge request espressif/esp-idf!38511
2025-04-24 13:35:26 +08:00
Marius Vikhammer
2f084e47c9 Merge branch 'fix/dram_dma_aligned_attr_for_p4_v5.3' into 'release/v5.3'
fix(esp_common): Fix DRAM_DMA_ALIGNED_ATTR for ESP32-P4 (v5.3)

See merge request espressif/esp-idf!38644
2025-04-24 13:34:35 +08:00
Marius Vikhammer
ae2b54430d Merge branch 'fix/multi_core_race_cond_in_panic_handler_v5.3' into 'release/v5.3'
fix(panic_handler): Prevent race condition in panic handler (v5.3)

See merge request espressif/esp-idf!38665
2025-04-24 11:34:47 +08:00
Shu Chen
0da8ecd5f3 Merge branch 'fix/meshcop_udp_port_v5.3' into 'release/v5.3'
fix(openthread/meshcop): get right udp port for publishing meshcop-e (v5.3)

See merge request espressif/esp-idf!38658
2025-04-24 11:06:14 +08:00
Shu Chen
0d1b3956cc Merge branch 'fix/ieee802154_tx_ack_timeout_crash_v5.3' into 'release/v5.3'
fix(802.15.4): fix 15.4 process for unsupported frame (v5.3)

See merge request espressif/esp-idf!38670
2025-04-24 10:59:08 +08:00
morris
fef5594966 fix(parlio): reenable parlio rx driver cache safe test 2025-04-24 10:47:11 +08:00
morris
fa3ee29633 fix(spi): allocate driver memory with caps explicitly 2025-04-24 10:47:11 +08:00
Jiang Jiang Jian
181aeb8245 Merge branch 'bugfix/fix_scan_info_error_in_lr_only_mode_v5.3' into 'release/v5.3'
fix(wifi): Fixed the scan information error in LR only mode (v5.3)

See merge request espressif/esp-idf!37809
2025-04-24 10:39:56 +08:00
Island
c367f335e5 Merge branch 'feat/support_136k_rc_clk_on_ble_sleep_v5.3' into 'release/v5.3'
Feat/support 136k rc clk on ble sleep (v5.3)

See merge request espressif/esp-idf!38620
2025-04-24 10:37:52 +08:00
morris
bbe8bfba44 Merge branch 'bugfix/fix_i2s_assign_and_check_sequence_v5.3' into 'release/v5.3'
fix(i2s): fixed i2s inappropriate check and assign sequence (v5.3)

See merge request espressif/esp-idf!38606
2025-04-24 10:34:09 +08:00
Jiang Jiang Jian
3a0d5d7854 Merge branch 'bugfix/fix_bt_access_ext_mem_in_intr_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed access external memory in isr context (v5.3)

See merge request espressif/esp-idf!38573
2025-04-24 10:22:13 +08:00
Martin Vychodil
2b1150c223 Merge branch 'fix/nvs_tool_false_duplicate_warning_v5.3' into 'release/v5.3'
fix(nvs): nvs_tool.py refactor, reduce false duplicate warnings, add a test (v5.3)

See merge request espressif/esp-idf!33775
2025-04-23 22:14:44 +08:00
Rahul Tank
eac2f08842 fix(nimble): Update hid device example in nimble to work with iOS 2025-04-23 17:19:41 +05:30
Rahul Tank
a11b8f79da Merge branch 'fix/pawr_docs_v5.3' into 'release/v5.3'
feat(nimble):Added tutorials for PAwR examples (v5.3)

See merge request espressif/esp-idf!38623
2025-04-23 19:45:02 +08:00
Rahul Tank
33eb5fc7d7 Merge branch 'feat/pawr_bugfix_v5.3' into 'release/v5.3'
fix(nimble): Fix sync handle assignment for pawr connection (v5.3)

See merge request espressif/esp-idf!38503
2025-04-23 19:36:33 +08:00
zwx
7105516bc1 fix(802.15.4): fix 15.4 process for unsupported frame 2025-04-23 19:01:45 +08:00
Sudeep Mohanty
3dfb9cec3f fix(panic_handler): Prevent race condition in panic handler
This commit updates all RTC WDT contexts to be local instead of global
to avoid race conditions when both cores enter the panic handler
simultaneously.
2025-04-23 12:53:50 +02:00
Tan Yan Quan
a54cc0f79f fix(openthread/meshcop): get right udp port for publishing meshcop-e
* esp-openthread: thread_zigbee/esp-openthread@ad81e1b23
* openthread: espressif/openthread@8c30b93fe
* esp-idf: espressif/esp-idf@aa5357ab7
2025-04-23 10:09:51 +00:00
Roman Leonov
c44f46751a fix(usb_host): Correctly initialize set pipe ep char 2025-04-23 09:59:28 +02:00
Roman Leonov
3750d02cb1 fix(hcd): Added delay to slow down scatter-gather dma for ls device via fs hubs 2025-04-23 09:59:16 +02:00
Konstantin Kondrashov
e89352080f fix(esp_common): Fix DRAM_DMA_ALIGNED_ATTR for P4 2025-04-23 10:37:19 +03:00
Island
aa5357ab70 Merge branch 'bugfix/fix_some_ble_bugs_250331_esp32c3_v5.3' into 'release/v5.3'
Fixed some BLE bugs 250331 on esp32c3 (v5.3)

See merge request espressif/esp-idf!38579
2025-04-23 10:32:45 +08:00
Island
ee7e35a3fc Merge branch 'feat/optimize_cble50y24_111_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Added BLE eddystone sender example (v5.3)

See merge request espressif/esp-idf!38157
2025-04-23 10:32:26 +08:00
Abhinav Kudnar
2f56e5e490 feat(nimble):Added tutorials for PAwR examples 2025-04-22 19:18:45 +08:00
cjin
7d88bc78f9 feat(ble): support ble sleep using 136 kHz RC on ESP32-C6 2025-04-22 19:09:58 +08:00
Jin Chen
31269f3f44 feat(ble): support ble sleep using 136 kHz RC on ESP32-H2
(cherry picked from commit 6c8ee69151)

Co-authored-by: cjin <jinchen@espressif.com>
2025-04-22 19:05:37 +08:00
Jin Chen
e851ff6671 feat(ble): support ble sleep using 136 kHz RC on ESP32-C2
(cherry picked from commit 73f1084bf8)

Co-authored-by: cjin <jinchen@espressif.com>
2025-04-22 19:05:35 +08:00
morris
5bcebb94ed Merge branch 'bugfix/fix_esp32_touch_example_task_watchdog_issue_v5.3' into 'release/v5.3'
fix(legacy_touch): fixed touch read WDT issue on esp32 (v5.3)

See merge request espressif/esp-idf!38582
2025-04-22 18:37:21 +08:00
Sudeep Mohanty
6d9ed9f905 test(freertos): Added a unit test for tickless idle tick jump scenario
This commit adds a unit test to test that tickless idle mode does not
cause an unexpected jump in tick count after tickless idle mode is
exited.
2025-04-22 16:32:20 +08:00
Sudeep Mohanty
f69d77bcb6 fix(freertos): Fixed tickless idle tick count accounting
This commit fixes an issue where the FreeRTOS kernel does not account
for the pended ticks occuring during automatic light-sleep mode and
hence causing a jump in the tick count at a later stage in the
application lifetime.

Closes: https://github.com/espressif/esp-idf/issues/15642
2025-04-22 16:32:20 +08:00
laokaiyao
cdb6426d2e fix(i2s): add check for the minimum sample rate
Closes https://github.com/espressif/esp-idf/issues/15659
2025-04-22 15:41:56 +08:00
laokaiyao
fdcf1dcecc fix(i2s): reset the dma buf_size while allocation failed
Closes https://github.com/espressif/esp-idf/issues/15648
2025-04-22 15:19:51 +08:00
Mahavir Jain
635c4190f8 Merge branch 'feat/add_config_to_set_addrfamily_v5.3' into 'release/v5.3'
feat(tcp_transport): add an api to configure the addr family (v5.3)

See merge request espressif/esp-idf!37912
2025-04-22 12:21:34 +08:00
zhangyanjiao
bccec2b6c1 fix(wifi): update wifi lib for scan and connect issues 2025-04-22 11:59:30 +08:00
zhangyanjiao
e8c42bd62d fix(wifi): fix the noise floor error on ESP32C5
Closes https://github.com/espressif/esp-idf/issues/15594
2025-04-22 11:59:21 +08:00
zhangyanjiao
3f15dfa313 fix(wifi): Update the doc for espnow add peer 2025-04-22 11:52:18 +08:00
zhangyanjiao
63f167570d fix(wifi): Fixed the scan information error when AP in LR only mode 2025-04-22 11:52:01 +08:00
zhangyanjiao
b8a242abca fix(wifi): Fixed the max log level not work when it exceeds the default log level 2025-04-22 11:51:30 +08:00
zhangyanjiao
1c63e3e70c docs(wifi): update the description for esp_mesh_send() return value
Closes https://github.com/espressif/esp-idf/issues/14440
2025-04-22 11:51:17 +08:00
Island
9201b68d1b Merge branch 'fix/blemesh25-92_v5.3' into 'release/v5.3'
fix(ble_mesh): fixed issues with decrypt failed when resending messages (v5.3)

See merge request espressif/esp-idf!38559
2025-04-22 11:50:20 +08:00
Island
2216ed92a0 Merge branch 'bugfix/fix_some_ble_bugs_2503_v5.3' into 'release/v5.3'
Bugfix/fix some ble bugs 2503 (v5.3)

See merge request espressif/esp-idf!38290
2025-04-22 11:48:59 +08:00
Island
8c0f374926 Merge branch 'feat/support_read_periodic_adv_size_v5.3' into 'release/v5.3'
feat(ble/bluedroid): Support read periodic advertiser list size command (v5.3)

See merge request espressif/esp-idf!37503
2025-04-22 11:48:45 +08:00
Island
2a45026a41 Merge branch 'feat/ble_read_long_value_v5.3' into 'release/v5.3'
feat(ble/bluedroid): Add Read Long Characteristic Values example (v5.3)

See merge request espressif/esp-idf!37488
2025-04-22 11:48:32 +08:00
Island
f3dc80e9f6 Merge branch 'bugfix/fix_ble_kconfig_v5.3' into 'release/v5.3'
fix(ble/controller): Fix BLE Kconfig on ESP32 to avoid unexpected behavior (v5.3)

See merge request espressif/esp-idf!37421
2025-04-22 11:48:20 +08:00
Jiang Jiang Jian
0ac4b9a486 Merge branch 'bugfix/sae_send_confirm_v5.3' into 'release/v5.3'
fix(esp_wifi): Fix send_confirm according to specification provided by IEEE 802.11 (v5.3)

See merge request espressif/esp-idf!38435
2025-04-22 10:21:13 +08:00
Jiang Jiang Jian
9312c3595e Merge branch 'esp32/run_panic_debug_v5.3' into 'release/v5.3'
fix(esp32): Fixed qa program may fail issue when cpu 240m (v5.3)

See merge request espressif/esp-idf!37233
2025-04-22 10:20:30 +08:00
laokaiyao
781ccfbd0c fix(touch): fixed tie option take no effect 2025-04-21 20:46:33 +08:00
Chen Jian Hua
eea10e1039 feat(bt/bluedroid): Added BLE eddystone sender example
(cherry picked from commit 06366353d8)

Co-authored-by: zhangbowen <zhangbowen@espressif.com>
2025-04-21 20:24:03 +08:00
Abhinav Kudnar
7dce8f8ecd fix(nimble): Fix sync handle assignment for pawr connection 2025-04-21 18:04:20 +08:00
Zhi Wei Jian
77f5da2cb4 feat(ble/bluedroid): Add sync_cte_type in creat_periodic_adv_sync function
(cherry picked from commit eb647d10c6)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-04-21 17:03:27 +08:00
Zhi Wei Jian
31d8a68a0b fix(ble/bluedroid): Fixed BLE_FEAT_CREATE_SYNC_ENH define error in bluedroid host
(cherry picked from commit cf6135c990)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-04-21 17:03:25 +08:00
Roland Dobai
8b725deb56 Merge branch 'bugfix/esp32p4_linker_script_v5.3' into 'release/v5.3'
fix(esp_system): add missing `arrays` attribute in the ESP32-P4 linker script (backport v5.3)

See merge request espressif/esp-idf!36095
2025-04-21 15:54:05 +08:00
Roland Dobai
833adbc27c Merge branch 'fix/linux_std_flags_v5.3' into 'release/v5.3'
fix(build): don't call enable_language() before project() (v5.3)

See merge request espressif/esp-idf!37881
2025-04-21 15:53:28 +08:00
Roland Dobai
d618bb56e1 Merge branch 'fix/remove-unused-from-gdbinit_cmake_v5.3' into 'release/v5.3'
fix(tools): remove unused variables in gdbinit.cmake (v5.3)

See merge request espressif/esp-idf!38046
2025-04-21 15:53:06 +08:00
Roland Dobai
d73b3d8129 Merge branch 'fix/check_python_dependencies_v5.3' into 'release/v5.3'
fix(tools): handle packages with dots in their names during dependency checks (v5.3)

See merge request espressif/esp-idf!38063
2025-04-21 15:49:39 +08:00
Roland Dobai
81968004de Merge branch 'feat/deactivate_idf_env_every_run_v5.3' into 'release/v5.3'
feat(tools): Deactivate current ESP-IDF environment with every export run (v5.3)

See merge request espressif/esp-idf!38027
2025-04-21 15:49:13 +08:00
Roland Dobai
58c14765ae Merge branch 'fix/install_input_validation_v5.3' into 'release/v5.3'
fix(idf_tools): Validate input features (v5.3)

See merge request espressif/esp-idf!37890
2025-04-21 15:48:52 +08:00
Roland Dobai
3f2690aa78 Merge branch 'fix/extractall_deprecation_v5.3' into 'release/v5.3'
fix(idf_tools): Patch extractall() deprecation warning (v5.3)

See merge request espressif/esp-idf!37884
2025-04-21 15:48:34 +08:00
Roland Dobai
28b2914c95 Merge branch 'fix/fix_kconfig_files_v5.3' into 'release/v5.3'
fix(kconfig): Fix issues with Kconfig files (v5.3)

See merge request espressif/esp-idf!37576
2025-04-21 15:48:18 +08:00
Roland Dobai
65699a0bda Merge branch 'change/move_deprecated_kconfig_checker_v5.3' into 'release/v5.3'
change: move check_deprecated_configs.py logic to esp-idf-kconfig (v5.3)

See merge request espressif/esp-idf!37406
2025-04-21 15:48:00 +08:00
laokaiyao
be96ad682b fix(legacy_touch): fixed the concurrent issue in esp32 touch driver 2025-04-21 15:04:43 +08:00
laokaiyao
584092aec1 fix(touch): fixed touch read WDT issue on esp32
Closes https://github.com/espressif/esp-idf/issues/15629
2025-04-21 14:47:38 +08:00
Chen Jian Hua
3dbcb7b7f8 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(a684dd5)
- Fixed clear legacy adv error when adv not exist
- Disable anonymous extended adv reporting
- Fixed BLE assert lld_adv.c 2992
- Fixed heap assert due to adv data buffer double freeing
- Fixed BLE 0x08 disconnect when the win size is greater than half of the conn interval


(cherry picked from commit 4602665e5d)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-04-21 14:33:34 +08:00
linruihao
2d39af8aa0 fix(bt/controller): Fixed access external memory in isr context 2025-04-21 14:22:56 +08:00
Jin Cheng
4173a7f896 fix(bt/controller): update libbtdm_app.a
- fixed errors in the coexistance of ACL and SCO
- fixed dynamic priority config error in dual mode
2025-04-21 14:22:56 +08:00
Jiang Jiang Jian
a8381ef00d Merge branch 'bugfix/pmkid_password_mismatch_v5.3' into 'release/v5.3'
fix(wifi): Fix wrong PMKSA cache entry being used when wifi password is changed (Backport v5.3)

See merge request espressif/esp-idf!37472
2025-04-21 14:21:53 +08:00
Island
182b1583c7 Merge branch 'change/ble_update_lib_20250417_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250417 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!38544
2025-04-21 10:40:43 +08:00
Marius Vikhammer
9e2fe50fb0 Merge branch 'fix/lp_wakeup_cause_bits_accumulation_v5.3' into 'release/v5.3'
fix(ulp): Fix accumulation of wakeup cause bits in ULP (v5.3)

See merge request espressif/esp-idf!38562
2025-04-21 08:53:00 +08:00
morris
7356a99938 Merge branch 'bugfix/ppa_srm_scale_frag_yuv420_v5.3' into 'release/v5.3'
fix(ppa): fix ppa srm potentially get blocked when scaling to YUV420 (v5.3)

See merge request espressif/esp-idf!37593
2025-04-19 23:13:40 +08:00
Sarvesh Bodakhe
04a0e6304b fix(wifi): Fix wrong PMKSA cache entry being used when wifi password is changed
Co-authored-by: yinqingzhao <yinqingzhao@espressif.com>
2025-04-19 16:39:56 +05:30
Konstantin Kondrashov
d41fc36511 fix(ulp): Fix accumulation of wakeup cause bits in ULP
Closes https://github.com/espressif/esp-idf/issues/15794
2025-04-18 15:52:46 +03:00
Luo Xu
3679e52a89 fix(ble_mesh): fixed issues with decrypt failed when resending messages
(cherry picked from commit 4803cea3cc)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-04-18 20:23:43 +08:00
Wang Meng Yang
916f1992bd Merge branch 'fix/some_issues_in_bt_controller_v5.3' into 'release/v5.3'
fix(bt): fixed some issues in bt controller(backport v5.3)

See merge request espressif/esp-idf!38449
2025-04-18 17:51:23 +08:00
Shen Wei Long
758eeb45a7 change(ble): [AUTO_MR] Update lib_esp32c6 to cd6ba0ec
(cherry picked from commit a89916eef4)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2025-04-18 14:10:06 +08:00
Shen Wei Long
e6d2a5debb change(ble): [AUTO_MR] Update lib_esp32h2 to cd6ba0ec
(cherry picked from commit d48cc9ce2a)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2025-04-18 14:10:04 +08:00
Tan Yan Quan
0a0da0ce97 fix(openthread): check state for ot wake 2025-04-18 12:15:36 +08:00
Tan Yan Quan
b605247441 fix(openthread): relax CSL accuracy default value 2025-04-18 12:15:36 +08:00
Island
c399ca8fab Merge branch 'change/ble_update_lib_20250414_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250414 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!38493
2025-04-18 11:07:12 +08:00
morris
c4f2a9b192 Merge branch 'fix/usb_host_docs_host_num_chan_reference_backport_v5.3' into 'release/v5.3'
fix(usb_host): Fixing reference to OTG_NUM_HOST_CHAN in docs backport to v5.3

See merge request espressif/esp-idf!37390
2025-04-18 10:25:57 +08:00
morris
643a78d0c4 Merge branch 'docs/add_note_about_twai_instance_install_v5.3' into 'release/v5.3'
docs: Add a note about TWAI multiple instances install (v5.3)

See merge request espressif/esp-idf!37966
2025-04-18 10:25:49 +08:00
morris
950c9df5e5 Merge branch 'fix/fix_mmu_map_concurrent_issue_v5.3' into 'release/v5.3'
mmu: fix mmu map concurrent issue (v5.3)

See merge request espressif/esp-idf!38410
2025-04-17 21:13:28 +08:00
Jiang Jiang Jian
e63d13e0bd Merge branch 'change/allow_keep_sar_poweron_in_light_sleep_v5.3' into 'release/v5.3'
change(esp_hw_support): allow sar power keep on during lightsleep (v5.3)

See merge request espressif/esp-idf!38455
2025-04-17 17:19:22 +08:00
Jiang Jiang Jian
a34413811c Merge branch 'fix/fix_current_leakage_after_ext_osc_detect_failed_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists (v5.3)

See merge request espressif/esp-idf!38440
2025-04-17 17:16:46 +08:00
Jiang Jiang Jian
0e84a52417 Merge branch 'fix/esp32p4_xtal_path_not_on_top_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix esp32p4 xtal_xpd depends on TOP power domain (v5.3)

See merge request espressif/esp-idf!38453
2025-04-17 17:14:56 +08:00
Rocha Euripedes
ba53fb402e Merge branch 'fix/fix-test-socks-transport_v5.3' into 'release/v5.3'
fix(tcp_transport): Fix test for socks transport (v5.3)

See merge request espressif/esp-idf!38294
2025-04-17 16:16:29 +08:00
Zhou Xiao
d1b7a2adbd change(ble): bugs fixed on spi ble log
* removed spi master in iram select for flash only firmware
* fixed memory issue in transaction init function
* fixed memory issue in transaction deinit function
2025-04-17 13:43:12 +08:00
Jiang Jiang Jian
a96e966f69 Merge branch 'fix/fix_uart_console_broken_after_sleep_v5.3' into 'release/v5.3'
fix(esp_hw_support): fixed gpio sleep switching filling junk data to the console UART FIFO (v5.3)

See merge request espressif/esp-idf!38445
2025-04-17 11:01:39 +08:00
chaijie@espressif.com
bb0dac0a72 fix(esp32): Fixed qa program may fail issue when cpu 240m (v5.3) 2025-04-17 10:58:51 +08:00
Jiang Jiang Jian
10a20f3388 Merge branch 'ci/add_test_for_ecos_wifi_enterprise_v53' into 'release/v5.3'
ci(c2/c3): add major eco version tests(v5.3)

See merge request espressif/esp-idf!37806
2025-04-17 10:56:45 +08:00
Zhou Xiao
2f511e9a87 fix(ble): remove null pointer assert in npl event deinit
(cherry picked from commit ece108c0bf)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-04-17 10:54:35 +08:00
Zhou Xiao
47ff853520 feat(ble): support configurable rxbuf opt feat on ESP32-C6
(cherry picked from commit 5fbbec8655)

Co-authored-by: cjin <jinchen@espressif.com>
2025-04-17 10:54:33 +08:00
Zhou Xiao
659d7ad3cc feat(ble): support configurable rxbuf opt feat on ESP32-H2
(cherry picked from commit 4937d3c883)

Co-authored-by: cjin <jinchen@espressif.com>
2025-04-17 10:54:31 +08:00
Zhou Xiao
c5ac5e42b3 feat(ble): use new section for ble sleep on ESP32-C2
(cherry picked from commit ce4e012c8b)

Co-authored-by: cjin <jinchen@espressif.com>
2025-04-17 10:54:29 +08:00
Zhou Xiao
246b1ca89d change(ble): [AUTO_MR] Update lib_esp32c2 to fca2b9ea
(cherry picked from commit 09467baed0)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-04-17 10:54:26 +08:00
Zhou Xiao
8c4a9675f7 change(ble): [AUTO_MR] Update lib_esp32c6 to 76549818
(cherry picked from commit e2d1a5509e)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-04-17 10:54:24 +08:00
Zhou Xiao
a666e3edbf change(ble): [AUTO_MR] Update lib_esp32h2 to 76549818
(cherry picked from commit c11bb1ddd0)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-04-17 10:54:22 +08:00
Wang Meng Yang
8b83368211 Merge branch 'feat/add_l2cap_register_event_v5.3' into 'release/v5.3'
feat(bt): Added events for l2cap register and unregister vfs(v5.3)

See merge request espressif/esp-idf!38422
2025-04-17 08:10:51 +08:00
Mahavir Jain
5b2e8f2b38 fix(esp_system): reset crypto peripherals before device restart
This change addresses a rare but critical issue observed on certain
ESP32-C3 and ESP32-S3 devices, where secure boot verification
intermittently fails due to improper cleanup of crypto peripherals
during a restart.

Background – Restart Behavior in IDF
------------------------------------
In ESP-IDF, when the device restarts (via `esp_restart()` or due to a
panic/exception), a partial peripheral reset is performed followed by a
CPU reset. However, until now, crypto-related peripherals were not
included in this selective reset sequence.

Problem Scenario
----------------
If a restart occurs while the application is in the middle of a bignum
operation (i.e., using the MPI/Bignum peripheral), the ROM code may
encounter an inconsistent peripheral state during the subsequent boot.
This leads to transient RSA-PSS secure boot verification failures.

Following such a failure, the ROM typically triggers a full-chip reset
via the watchdog timer (WDT). This full reset clears the crypto
peripheral state, allowing secure boot verification to succeed on the
next boot.

Risk with Aggressive Revocation
-------------------------------
If secure boot aggressive revocation is enabled (disabled by default in
IDF), this transient verification failure could mistakenly lead to
revocation of the secure boot digest.

If your product configuration has aggressive revocation enabled,
applying this fix is strongly recommended.

Frequency of Occurrence
-----------------------
The issue is rare and only occurs in corner cases involving
simultaneous use of the MPI peripheral and an immediate CPU reset.

Fix
---
This fix ensures that all crypto peripherals are explicitly reset prior
to any software-triggered restart (including panic scenarios),
guaranteeing a clean peripheral state for the next boot and preventing
incorrect secure boot behavior.
2025-04-16 20:31:44 +08:00
wuzhenghui
5ce6c51c28 fix(esp_hw_support): fix unused OSC source deinit breaks XTAL32K configuration 2025-04-16 17:19:08 +08:00
wuzhenghui
8d55741d32 fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists 2025-04-16 17:19:04 +08:00
wuzhenghui
9131a6f556 change(esp_hw_support): allow sar power keep on during lightsleep
Closes https://github.com/espressif/esp-idf/issues/12426
2025-04-16 16:05:38 +08:00
wuzhenghui
d8e9167dcf fix(esp_hw_support): fix esp32p4 xtal_xpd depends on TOP power domain 2025-04-16 15:43:05 +08:00
Marius Vikhammer
b187b74bfc Merge branch 'fix/ringbuf_allow_split_receive_crash_v5.3' into 'release/v5.3'
fix(ringbuf): xRingbufferReceive() crashes for allow-split buffers (v5.3)

See merge request espressif/esp-idf!37923
2025-04-16 15:31:12 +08:00
gongyantao
fb5a67c1d3 fix(bt): fixed some issues in bt controller
- add check for Wi-Fi channel
- fix the incorrect unit of duration_min in cpb tx
- recalculate the channel map when afh is enabled
- fix incorrect vendor event count causing an assertion failure
2025-04-16 15:31:04 +08:00
wuzhenghui
1677013d7b fix(esp_hw_support): fixed gpio sleep switching filling junk data to the console UART FIFO 2025-04-16 15:24:52 +08:00
Island
5de769cba4 Merge branch 'change/ble_update_lib_20250313_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250313 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!37821
2025-04-16 14:38:01 +08:00
Shreyas Sheth
d5b8462f5b ci(wifi): Add build test for with wpa3 disabled for station and softap 2025-04-16 11:56:31 +05:30
Shreyas Sheth
08993cd527 fix(esp_wifi): Fix send_confirm according to specification provided by IEEE 802.11 2025-04-16 11:56:31 +05:30
Rahul Tank
5ac3846998 Merge branch 'bugfix/fix_few_nimble_issues_15042025_v5.3' into 'release/v5.3'
fix(nimble): Fix few nimble issues_15042025 (v5.3)

See merge request espressif/esp-idf!38424
2025-04-16 14:20:13 +08:00
Song Ruo Jing
ca8c9a297f fix(ppa): fix ppa srm potentially get blocked when scaling to YUV420
YUV420 requires scale_x_frag, scale_y_frag be even
2025-04-16 11:33:26 +08:00
Song Ruo Jing
bf147686a7 fix(dma2d): dma2d_force_end should not crash when rx channel is idle 2025-04-16 11:33:20 +08:00
Island
9a97296876 Merge branch 'feat/support_blecrt_359_v5.3' into 'release/v5.3'
Support BLE vendor hci set rx sensie and max gain on esp32c3 (v5.3)

See merge request espressif/esp-idf!38129
2025-04-16 11:25:15 +08:00
Mahavir Jain
52b43b318d Merge branch 'feat/update_mbedtls_3.6.3_v5.3' into 'release/v5.3'
feat(component/mbedtls): update to upstream v3.6.3 (v5.3)

See merge request espressif/esp-idf!38179
2025-04-16 11:15:26 +08:00
Marius Vikhammer
ce31db18b8 Merge branch 'bugfix/heap_in_flash_v5.3' into 'release/v5.3'
fix(heap): fixed CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH not working together with CONFIG_HEAP_TLSF_USE_ROM_IMPL (v5.3)

See merge request espressif/esp-idf!38122
2025-04-16 11:11:43 +08:00
morris
a29e9974d0 Merge branch 'fix/flash_encryption_verify_write_etc_v5.3' into 'release/v5.3'
fix(spi_flash): Fix flash encryption write verify (backport v5.3)

See merge request espressif/esp-idf!38270
2025-04-16 10:29:13 +08:00
morris
94f6398f35 Merge branch 'fix/i2s_iram_safe_issue_while_use_psram_v5.3' into 'release/v5.3'
fix(i2s): fixed failure when dma is iram_safe but i2s not (v5.3)

See merge request espressif/esp-idf!38004
2025-04-16 10:27:59 +08:00
morris
3fc84fdbca Merge branch 'fix/usb-hal-dwc-host-channel-num_v5.3' into 'release/v5.3'
fix(usb/hal/dwc): Correct host channel number calculation (backport v5.3)

See merge request espressif/esp-idf!37373
2025-04-16 10:21:29 +08:00
morris
b4baef0e47 Merge branch 'fix/usb_phy_pull_override_backport_v5.3' into 'release/v5.3'
fix(usb_phy): Removed pad pull override config for Full-speed (backport to v5.3)

See merge request espressif/esp-idf!36775
2025-04-16 10:21:11 +08:00
morris
f1bc85de12 Merge branch 'fix/usb_host_enum_unchecked_return_coverity_backport_v5.3' into 'release/v5.3'
fix(usb_host): Fixed unchecked return value in enum driver (coverity) (backport to v5.3)

See merge request espressif/esp-idf!36670
2025-04-16 10:20:38 +08:00
morris
3f9d5cac2a Merge branch 'bugfix/clear_ledc_gamma_ram_v5.3' into 'release/v5.3'
fix(ledc): left-off gamma ram registers should be cleared (v5.3)

See merge request espressif/esp-idf!37573
2025-04-16 10:19:51 +08:00
morris
aa9900290a Merge branch 'fix/usb-host-device-close-err-give-semaphore_v5.3' into 'release/v5.3'
fix(usb_host): Give semaphore on attempted close of non-opened device (backport v5.3)

See merge request espressif/esp-idf!38152
2025-04-16 10:19:08 +08:00
morris
7c447b5525 Merge branch 'bugfix/gpio_dump_io_config_v5.3' into 'release/v5.3'
fix(gpio): fix pu, pd, drv value incorrect from gpio_dump_io_configuration on esp32 (v5.3)

See merge request espressif/esp-idf!37909
2025-04-16 10:17:44 +08:00
morris
ba27554f0c Merge branch 'feat/allow_rmt_tx_channel_to_switch_other_gpios_v5.3' into 'release/v5.3'
feat(rmt_tx): allow to switch gpio in tx channal (v5.3)

See merge request espressif/esp-idf!38395
2025-04-16 10:13:08 +08:00
Alexey Gerenkov
67d7cde1f1 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20250226_v5.3' into 'release/v5.3'
feat(tools): update openocd version to v0.12.0-esp32-20250226 (v5.3)

See merge request espressif/esp-idf!37527
2025-04-16 00:12:14 +08:00
Alexey Gerenkov
de7d36f0e9 Merge branch 'fix/apptrace_basic_tests_v5.3' into 'release/v5.3'
test(apptrace): run tests from custom OpenOCD class (v5.3)

See merge request espressif/esp-idf!37603
2025-04-16 00:11:05 +08:00
Alexey Gerenkov
7c1972c120 Merge branch 'fix/esp32p4_apptrace_v5.3' into 'release/v5.3'
fix(apptrace): replace ctrl block into noncache-able TCM  memory (v5.3)

See merge request espressif/esp-idf!38363
2025-04-16 00:08:16 +08:00
Alexey Gerenkov
17fea0dabe Merge branch 'fix/coredump_uart_checksum_error_v5.3' into 'release/v5.3'
Fix/coredump uart checksum error (v5.3)

See merge request espressif/esp-idf!38365
2025-04-15 23:58:21 +08:00
morris
430695b85d Merge branch 'fix/jpeg_dma_stuck_v5.3' into 'release/v5.3'
fix(jpeg): use dma2d empty rx desc event to avoid a stuck on bad quality image (backport v5.3)

See merge request espressif/esp-idf!38263
2025-04-15 21:52:55 +08:00
morris
d808131b51 Merge branch 'fix/i2c_race_condition_etc_v5.3' into 'release/v5.3'
fix(i2c_master): Fix i2c master race condition issue, etc. (backport v5.3)

See merge request espressif/esp-idf!38266
2025-04-15 21:44:29 +08:00
Jiang Jiang Jian
52331299e9 Merge branch 'feature/support_sco_coexist_v5.3' into 'release/v5.3'
feat(coex): Support BR/EDR (e)SCO and Wi-Fi coexistence

See merge request espressif/esp-idf!38134
2025-04-15 19:59:46 +08:00
Shreeyash
fc72283f48 fix(nimble): Fix incorrect OTA address assignment 2025-04-15 17:15:16 +05:30
Rahul Tank
e4da6e3155 fix(nimble): Fixed one missing ble_hs_unlock() 2025-04-15 17:15:01 +05:30
Rahul Tank
27a137cf43 fix(nimble): Handle connection posting condition 2025-04-15 17:14:35 +05:30
Rahul Tank
3182b8381f Merge branch 'bugfix/fix_sscanf_usage_v5.3' into 'release/v5.3'
fix(nimble): Updated sscanf usage in examples to work for all versions (v5.3)

See merge request espressif/esp-idf!38022
2025-04-15 19:24:10 +08:00
Shu Chen
7f7eaf8046 Merge branch 'feature/add_ot_cli_ci_case_v5.3' into 'release/v5.3'
feat(openthread): add openthread ci ssed case v5.3

See merge request espressif/esp-idf!38255
2025-04-15 19:20:13 +08:00
Rahul Tank
c0935d4208 Merge branch 'bugfix/replace_sizeof_with_strlen_v5.3' into 'release/v5.3'
fix(nimble): Replaced incorrect sizeof with strnlen (v5.3)

See merge request espressif/esp-idf!37798
2025-04-15 19:18:30 +08:00
Rahul Tank
84c416079f Merge branch 'fix/periodic_adv_example_v5.3' into 'release/v5.3'
fix(nimble):Fix conversion for min-max itvl of periodic adv param (v5.3)

See merge request espressif/esp-idf!38092
2025-04-15 19:17:14 +08:00
Rahul Tank
002c737d39 Merge branch 'feat/added_change_to_ble_spp_client_v5.3' into 'release/v5.3'
feat(nimble): Allow BLE SPP Client to subscribe to the server (v5.3)

See merge request espressif/esp-idf!37456
2025-04-15 19:16:42 +08:00
xiongweichao
a2d88bf700 fix(bt): fixed spp not reporting write event 2025-04-15 19:07:35 +08:00
xiongweichao
7e3efc45ad fix(bt): Fixed the issue with l2cap not using dynamic memory 2025-04-15 19:07:31 +08:00
xiongweichao
4a64e655de fix(bt): Fixed write_read task stack overflow in l2cap example 2025-04-15 19:07:26 +08:00
xiongweichao
259bc660b3 feat(bt): Added events for l2cap register and unregister vfs 2025-04-15 19:07:21 +08:00
Shu Chen
f8886ebb72 Merge branch 'fix/ldgen_section_name_v53' into 'release/v5.3'
fix(ldgen): extend section name regex to include '_' (v5.3)

See merge request espressif/esp-idf!38326
2025-04-15 14:56:36 +08:00
chenjianhua
2a30f64b71 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(566c8e3)
- Support BLE vendor hci set RX sensitivity and AGC gain command
- Fixed enhanced TX power setting and getting for legacy adv
- Fixed BLE assert lld_con.c 2387
- Fixed compatibility issues during the encryption procedure
- Support BLE vendor hci enable CCA command
2025-04-15 14:48:25 +08:00
morris
13cf4ba87c Merge branch 'bugfix/sdmmc_high_prio_timeout_v5.3' into 'release/v5.3'
fix(sdmmc): move DMA descriptor refilling into the ISR (v5.3)

See merge request espressif/esp-idf!37688
2025-04-15 14:47:50 +08:00
morris
4bab63dc26 Merge branch 'fix/pr_15513_psram_bss_noinit_calc_issue_v5.3' into 'release/v5.3'
psram: correct .bss and .noinit vaddr calculation (v5.3)

See merge request espressif/esp-idf!37663
2025-04-15 14:45:42 +08:00
Chen Jichang
392422573d feat(rmt_tx): allow to switch gpio in tx channal 2025-04-15 14:40:51 +08:00
armando
231694ac25 test(system): increased 200B memory leak thresh due to mmu mmap mutex
200B to extend the thresh, real increase to the memory usage will be smaller
2025-04-15 14:24:23 +08:00
armando
1b763ce920 test(mmu): added esp_mmu_map concurrency test 2025-04-15 14:23:59 +08:00
armando
17f3a1e353 fix(mmu): fixed esp_mmu_map concurrent issue and add related docs 2025-04-15 14:23:56 +08:00
baohongde
a90116fdd1 feat(coex): Support BR/EDR (e)SCO and Wi-Fi coexistence 2025-04-15 14:17:21 +08:00
Ashish Sharma
ededcccda5 feat(mbedtls): new config to allow weak cert verification 2025-04-15 13:10:26 +08:00
Ashish Sharma
45bf1239d6 feat(mbedtls): update to version 3.6.3 2025-04-15 13:10:26 +08:00
C.S.M
6efaf6b85c fix(i2c_master): Fix the stretch happen cause timeout in probe,
Closes https://github.com/espressif/esp-idf/issues/15589
2025-04-15 13:09:12 +08:00
C.S.M
e225e29196 fix(i2c): Fix i2c slave auto selection issue,
Closes https://github.com/espressif/esp-idf/issues/15644
2025-04-15 13:09:12 +08:00
C.S.M
3aeeb7585d fix(i2c): Fix the array size of static operation,
Closes https://github.com/espressif/esp-idf/issues/15583
2025-04-15 13:09:12 +08:00
C.S.M
7f37a6fd66 fix(i2c_master): Fix i2c master race condition issue,
Closes https://github.com/espressif/esp-idf/issues/15444
2025-04-15 13:09:12 +08:00
Mahavir Jain
352704257a Merge branch 'fix/examples_python3.13_ssl_conn_failure_v5.3' into 'release/v5.3'
Change in Python3.13's default ssl context caused SSL connection failure (v5.3)

See merge request espressif/esp-idf!38200
2025-04-15 12:37:07 +08:00
Rahul Tank
70c9a757c7 Merge branch 'fix/ble_issue_10032025_v5.3' into 'release/v5.3'
fix(nimble): Fix some nimble issues ble_issue_10032025_v5.3

See merge request espressif/esp-idf!37623
2025-04-15 12:32:44 +08:00
Shen Weilong
af828cc8f5 fix(ble): fixed a heap assertion issue when enabling BLE for esp32c2 v2.0 2025-04-15 12:21:25 +08:00
Shen Weilong
7856fefea1 feat(ble/controller): Added memory boundary check for ESP32-C2 2025-04-15 12:20:31 +08:00
Shen Weilong
353abd8d22 feat(ble/controller): Added memory boundary check for ESP32-C6 and ESP32-H2 2025-04-15 12:20:20 +08:00
Geng Yuchao
6b123e9cc7 fix(ble): Add link requires esp_phy for ble. 2025-04-15 12:17:03 +08:00
Zhou Xiao
9fc5f5c1ef fix(ble): fix ble log init failure mem leak for ESP32 2025-04-15 12:17:03 +08:00
Zhou Xiao
e4225026b5 fix(ble): fix ble log init failure mem leak for ESP32-C3 2025-04-15 12:17:03 +08:00
cjin
4ad5cebd84 fix(ble): remove macro in lpclk src get api on ESP32-C6 2025-04-15 12:17:03 +08:00
cjin
8e93f25f4d fix(ble): remove macro in lpclk src get api on ESP32-C5 2025-04-15 12:17:03 +08:00
zwl
87838acaed feat(ble): add enhanced connect function on ESP32-C2 2025-04-15 12:17:03 +08:00
Zhou Xiao
c3d2bc6302 feat(ble): support ble log simple output via SPI interface for ESP32-C6 2025-04-15 12:17:03 +08:00
Zhou Xiao
90954505ff feat(ble): support ble log simple output via SPI interface for ESP32-C5 2025-04-15 12:17:03 +08:00
Zhou Xiao
e22a8ff4fc feat(ble): support ble log simple output via SPI interface for ESP32-H2 2025-04-15 12:17:03 +08:00
Zhou Xiao
9c27284fd5 feat(ble): support ble log simple output via SPI interface for ESP32-C2 2025-04-15 12:17:03 +08:00
Zhou Xiao
1dac25fab7 fix(ble): add feed wdts during ble log dump for ESP32-C2 2025-04-15 12:17:03 +08:00
Zhou Xiao
e7dd876456 feat(ble): support ble log simple output via SPI interface 2025-04-15 12:17:03 +08:00
Shu Chen
935f66096f Merge branch 'feature/add_txrx_frame_dump_debugging_v5.3' into 'release/v5.3'
feat(802.15.4): supported tx/rx frame dumping (v5.3)

See merge request espressif/esp-idf!38235
2025-04-15 12:11:08 +08:00
Shu Chen
aa220e7b65 Merge branch 'fix/154_txpower_set_api_v5.3' into 'release/v5.3'
fix(802.15.4): fix the behavior of the `esp_ieee802154_set_txpower` (v5.3)

See merge request espressif/esp-idf!37737
2025-04-15 12:10:44 +08:00
Shu Chen
d84c417459 Merge branch 'feat/update_ot_upstream_v53' into 'release/v5.3'
feat(openthread): update openthread upstream submodule to support BR DNS resolution (v5.3)

See merge request espressif/esp-idf!38187
2025-04-15 12:09:54 +08:00
Shu Chen
4eddf0c42b Merge branch 'fix/csl_rx_off_when_idle_v5.3' into 'release/v5.3'
fix(openthread): turn off rx for SSED running CSL during idle (v5.3)

See merge request espressif/esp-idf!37993
2025-04-15 12:09:42 +08:00
Shu Chen
0ed17a246e Merge branch 'bugfix/fix_ot_ci_cases_avahi_service_issue_v5.3' into 'release/v5.3'
feat(openthread): fix ci avahi service cases issue (v5.3)

See merge request espressif/esp-idf!37862
2025-04-15 12:09:03 +08:00
Shu Chen
0161f5e59c Merge branch 'support/ieee802154_set_txon_delay_using_phylib_impl_v5.3' into 'release/v5.3'
feat(802.15.4): configure tx on delay using phylib implementation (v5.3)

See merge request espressif/esp-idf!37657
2025-04-15 12:07:54 +08:00
Island
97016c986c Merge branch 'feat/optimize_hci_data_recv_process_v5.3' into 'release/v5.3'
Feat/optimize hci data recv process (v5.3)

See merge request espressif/esp-idf!37833
2025-04-15 11:35:08 +08:00
Island
4615344118 Merge branch 'feat/support_bluedroid_host_iso_feature_master_v5.3' into 'release/v5.3'
Fixed controller flash only bug if hci-uart is enabled (v5.3)

See merge request espressif/esp-idf!38162
2025-04-15 11:34:53 +08:00
Marius Vikhammer
7fea3ef20f Merge branch 'bug/xtensa_cpu1_sys_lockup_v5.3' into 'release/v5.3'
fix(panic_handler): Updated panic handler to use RTC WDT (v5.3)

See merge request espressif/esp-idf!37115
2025-04-15 11:05:57 +08:00
morris
5ad0818c9f Merge branch 'refactor/ana_cmpr_driver_v5.3' into 'release/v5.3'
refactor(ana_cmpr): enhanced the driver implementation (v5.3)

See merge request espressif/esp-idf!38389
2025-04-15 10:57:27 +08:00
morris
3816f5f281 Merge branch 'fix/parlio_add_gdma_fifo_reset_v5.3' into 'release/v5.3'
fix(parlio_tx): add clock and fifo reset in disable function (v5.3)

See merge request espressif/esp-idf!36274
2025-04-15 10:47:25 +08:00
Jiang Jiang Jian
fe5e048a56 Merge branch 'fix/fix_sleep_reject_on_esp32_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix short duration sleep requests rejected in pd_flash lightsleep (v5.3)

See merge request espressif/esp-idf!38222
2025-04-15 10:33:19 +08:00
Jiang Jiang Jian
c1c257d47f Merge branch 'bugfix/remove_broken_link_for_wifi_expansion_v5.3' into 'release/v5.3'
bugfix: Remove the broken link in wifi-expansion.rst (v5.3)

See merge request espressif/esp-idf!38333
2025-04-15 10:32:30 +08:00
morris
949b0451d7 Merge branch 'bugfix/ledc_fade_stop_race_condition_v5.3' into 'release/v5.3'
fix(ledc): fix race condition in ledc_fade_stop causing assert failure (v5.3)

See merge request espressif/esp-idf!38081
2025-04-15 10:32:17 +08:00
Jiang Jiang Jian
ca42f3e1a2 Merge branch 'doc/add_wakeup_source_usage_precautions_v5.3' into 'release/v5.3'
change(doc): added more usage notes & warings about PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP (v5.3)

See merge request espressif/esp-idf!37392
2025-04-15 10:32:09 +08:00
Jiang Jiang Jian
71f774e3ca Merge branch 'update/version_5_3_3' into 'release/v5.3'
Update version to 5.3.3

See merge request espressif/esp-idf!38314
2025-04-15 10:30:48 +08:00
morris
086e129cd3 Merge branch 'bugfix/enable_additional_lp_io_wakeup_v5.3' into 'release/v5.3'
fix(lp_io): enable setting edge type wakeup sources for targets that support this (v5.3)

See merge request espressif/esp-idf!36012
2025-04-15 10:30:26 +08:00
morris
1eb1fad16d Merge branch 'bugfix/uart_async_rxtxtasks_example_stack_overflow_v5.3' into 'release/v5.3'
fix(uart): enlarged task stack size for uart_async_rxtxtasks example (v5.3)

See merge request espressif/esp-idf!37591
2025-04-15 10:27:53 +08:00
Jiang Jiang Jian
02dcf4f33d Merge branch 'feature/github_pull_15073_v5.3' into 'release/v5.3'
feat(wpa_supplicant): Add optimized PSK implementation (v5.3)

See merge request espressif/esp-idf!38105
2025-04-15 10:25:53 +08:00
morris
cff4d595e5 Merge branch 'fix/jpeg_decoder_collective_backport_v5.3' into 'release/v5.3'
fix(jpeg_decoder): JPEG Decoder collective backport to v5.3

See merge request espressif/esp-idf!37508
2025-04-15 10:24:04 +08:00
Marius Vikhammer
6d8f288bbc Merge branch 'bugfix/p4_lpwdt_efuse_v5.3' into 'release/v5.3'
fix(lpwdt): P4 LP-WDT now takes into account the EFUSE_WDT_DELAY for the timeout (v5.3)

See merge request espressif/esp-idf!38393
2025-04-15 10:22:09 +08:00
morris
befa9bb4d2 Merge branch 'doc/touch_element_support_esp32s3_v5.3' into 'release/v5.3'
docs(touch): build the touch element doc for esp32s3 (v5.3)

See merge request espressif/esp-idf!38391
2025-04-15 10:21:16 +08:00
morris
5a3ef8e515 Merge branch 'contrib/github_pr_15484_v5.3' into 'release/v5.3'
fix(twai): fixed twai assert fail during recover (GitHub PR) (v5.3)

See merge request espressif/esp-idf!37989
2025-04-15 10:20:15 +08:00
morris
9e58fe0004 Merge branch 'feat/unilc_psram_s3_v5.3' into 'release/v5.3'
psram: supported UnilC octal psram on s3 (v5.3)

See merge request espressif/esp-idf!37855
2025-04-15 10:16:44 +08:00
morris
1a79c5e1ad Merge branch 'bugfix/missing_kconfig_definition_v5.3' into 'release/v5.3'
fix(i2c): add Kconfig to skip driver conflict check (v5.3)

See merge request espressif/esp-idf!37762
2025-04-15 10:15:05 +08:00
morris
46e271ea7c Merge branch 'bugfix/usj_wrong_return_value_v5.3' into 'release/v5.3'
fix(usb_serial_jtag): wrong return value in usb_serial_jtag_write_bytes (v5.3)

See merge request espressif/esp-idf!37970
2025-04-15 10:14:40 +08:00
morris
d69f12a7aa Merge branch 'fix/fix_cam_iram_safe_compile_error_v5.3' into 'release/v5.3'
cam: fix cam iram safe compile error (v5.3)

See merge request espressif/esp-idf!37607
2025-04-15 10:13:57 +08:00
morris
b1c16b8382 Merge branch 'fix/rmt_lim_thres_incorrect_v5.3' into 'release/v5.3'
fix(rmt): fix the received symbols issue (v5.3)

See merge request espressif/esp-idf!37900
2025-04-15 10:13:13 +08:00
morris
227bae6fea Merge branch 'docs/update_i2c_static_v5.3' into 'release/v5.3'
docs: Update static for i2c.rst (v5.3)

See merge request espressif/esp-idf!37765
2025-04-15 10:12:14 +08:00
morris
8bb21fda7c Merge branch 'feat/enable_l2mem_burst_buffer_mode_v5.3' into 'release/v5.3'
improve AXI-ICM QoS function (v5.3)

See merge request espressif/esp-idf!37469
2025-04-15 10:10:52 +08:00
morris
220910fb7e Merge branch 'feat/can_bypass_buffer_align_check_v5.3' into 'release/v5.3'
feat(gdma): allow bypass the alignment check in the link driver (v5.3)

See merge request espressif/esp-idf!37424
2025-04-15 10:10:20 +08:00
morris
89c81ac2c8 Merge branch 'bugfix/rmt_simple_encoder_example_v5.3' into 'release/v5.3'
fix(example): wrong ws2812 reset duration (v5.3)

See merge request espressif/esp-idf!37467
2025-04-15 10:10:12 +08:00
morris
214ba70ed6 Merge branch 'refactor/spi_remove_unnecessary_dependency_v5.3' into 'release/v5.3'
fix(spi): removed PERIPH_CTRL_FUNC_IN_IRAM dependency (v5.3)

See merge request espressif/esp-idf!37564
2025-04-15 10:10:08 +08:00
morris
b4fd30cd5c Merge branch 'contrib/github_pr_15499_v5.3' into 'release/v5.3'
Add missing break statements to usb_serial_jtag_ll_phy_select (GitHub PR) (v5.3)

See merge request espressif/esp-idf!38125
2025-04-15 10:09:21 +08:00
Jiang Jiang Jian
6c1754a0a6 Merge branch 'bugfix/roaming_app_issues_v5.3' into 'release/v5.3'
fix(wifi): Fix some issues observed in roaming app (v5.3)

See merge request espressif/esp-idf!37415
2025-04-15 10:06:57 +08:00
Jiang Jiang Jian
72ae23c6f5 Merge branch 'fix/fix_dhcp_server_recv_decline_issue_v53' into 'release/v5.3'
fix(dhcp): fix dhcp server recv decline issue v53

See merge request espressif/esp-idf!38132
2025-04-15 10:03:39 +08:00
Marius Vikhammer
01a90d2175 fix(newlib): fixed newlib malloc wrappers IRAM/flash placement
If HEAP_PLACE_FUNCTION_INTO_FLASH = y then we should also place
the newlib wrappers for the heap in to flash.
2025-04-15 09:53:21 +08:00
Marius Vikhammer
046a26af5c fix(heap): fixed HEAP_PLACE_FUNCTION_INTO_FLASH disabled if heap impl in ROM 2025-04-15 09:53:21 +08:00
Wang Meng Yang
dd8d184f0a Merge branch 'bugfix/spp_mem_leak_v5.3' into 'release/v5.3'
fix(bt/bluedroid): fixed memory leaks in SPP callback mode (v5.3)

See merge request espressif/esp-idf!37386
2025-04-15 07:51:10 +08:00
Wang Meng Yang
5a011faf69 Merge branch 'feature/add_profile_stat_v5.3' into 'release/v5.3'
feat(bt): Add API to get profile status(v5.3)

See merge request espressif/esp-idf!38276
2025-04-15 07:50:13 +08:00
Wang Meng Yang
91a8ee9057 Merge branch 'bugfix/sec_service_record_conn_fail_v5.3' into 'release/v5.3'
fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles(v5.3)

See merge request espressif/esp-idf!38075
2025-04-15 07:47:50 +08:00
Wang Meng Yang
4adf4003a2 Merge branch 'bugfix/err_disc_state_changed_evt_v5.3' into 'release/v5.3'
fix(bt/bluedroid): fixed other events being reported when disconnected(v5.3)

See merge request espressif/esp-idf!37937
2025-04-15 07:46:24 +08:00
Wang Meng Yang
60341250b4 Merge branch 'bugfix/spp_free_server_slot_err_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fixed freeing spp server memory when disconnected(v5.3)

See merge request espressif/esp-idf!37609
2025-04-15 07:46:14 +08:00
Tan Yan Quan
0573caeb54 feat(openthread): add esp_system dependency for SSED CI 2025-04-14 16:34:36 +08:00
Tan Yan Quan
1c019f6dff feat(openthread): relax conditions for trel case approval 2025-04-14 16:34:32 +08:00
Tan Yan Quan
fd0df9d04a feat(openthread): add openthread ci ssed case 2025-04-14 16:34:27 +08:00
Tan Yan Quan
2685cc10e0 feat(openthread): use freertos timer for debug logs 2025-04-14 16:34:21 +08:00
Marius Vikhammer
c15953acee fix(lpwdt): P4 LP-WDT now takes into account the EFUSE_WDT_DELAY forthe timeout 2025-04-14 14:52:23 +08:00
morris
50efd81fc5 docs(touch): build the touch element doc for esp32s3
Closes https://github.com/espressif/esp-idf/issues/15755
2025-04-14 14:51:35 +08:00
morris
f4968da7ce fix(ana_cmpr): ETM event not work for Unit 1 2025-04-14 14:42:21 +08:00
Erhan Kurubas
31b0956051 fix(coredump): make sure consistency with uart data and calculated checksum
Closes https://github.com/espressif/esp-idf-monitor/issues/23
2025-04-10 16:29:13 +02:00
Erhan Kurubas
0206d8442e fix(apptrace): replace esp32p4 ctrl block into noncache-able TCM memory 2025-04-10 16:22:07 +02:00
diplfranzhoepfinger
1d7d24b160 fix(twai): fixed twai assert fail when recover
driver try start new frame in ISR however already bus off

Closes https://github.com/espressif/esp-idf/issues/9697
2025-04-10 20:07:16 +08:00
Rahul Tank
517d3b1749 fix(nimble): Updated sscanf usage in examples to work for all versions 2025-04-09 18:29:44 +05:30
Zhang Shuxian
563c21f930 bugfix: Remove the broken link in wifi-expansion.rst 2025-04-09 19:05:23 +08:00
Alexey Lapshin
6bb3dce495 fix(ldgen): extend section name regex to include '_' (e.g.: used by picolibc) 2025-04-09 16:51:38 +08:00
C.S.M
2881da7024 fix(spi_flash): Add suspend check on esp32c6 and esp32h2 for some reason 2025-04-09 10:14:26 +08:00
Martin Vychodil
6db3dc25df change(version): Update version to 5.3.3 2025-04-08 15:34:04 +02:00
Zhang Hai Peng
d72a674119 fix(ble/bluedroid): Fix potential uint32_t overflow in BLE btu_start_timer
(cherry picked from commit a9286567f0)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-04-08 16:42:27 +08:00
Zhang Hai Peng
4729fba793 fix(ble/bluedrooid): Fixed memory leak issue when deinit the host
(cherry picked from commit 6becf74cbb)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-04-08 16:42:27 +08:00
zhanghaipeng
4f136cca74 feat(bluedroid): Support get bt config path 2025-04-08 16:34:32 +08:00
zhanghaipeng
6886dc78c6 feat(ble/bluedroid): Implement BLE channel map reading API 2025-04-08 16:34:12 +08:00
luaijun
2f749a21e7 ci(c2/c3): add major eco version tests 2025-04-08 10:34:19 +08:00
xiongweichao
805543ce42 fix(bt): Fix ci failure due to code spelling errors 2025-04-08 10:05:51 +08:00
glmfe
94e26900cb fix(tcp_transport): Fix test for socks transport
- Removed out of scope stack acess
2025-04-07 12:09:50 -03:00
Zhang Hai Peng
6bdad836ea fix(ble/bluedroid): Fix missing event reporting in esp_ble_create_sc_oob_data
(cherry picked from commit f291725936)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-04-07 21:13:59 +08:00
Zhang Hai Peng
a5b43c72c8 fix(ble/bluedroid): Fixed BLE crash when disable bluedroid host
(cherry picked from commit 9dfa6ab0e9)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-04-07 21:13:57 +08:00
xiongweichao
3721a43afc feat(bt): Add API to get profile status 2025-04-07 19:17:01 +08:00
Kapil Gupta
d4151643ca fix(esp_wifi): Fix some compilation errors in roaming app 2025-04-07 18:58:08 +08:00
Kapil Gupta
ef9da59ea9 fix(esp_wifi): Removed unnecessary handlers to cleanup 2025-04-07 18:58:08 +08:00
Kapil Gupta
dc802d98d3 fix(esp_wifi): Roaming app, sync api naming 2025-04-07 18:58:08 +08:00
Kapil Gupta
2aa64cefae fix(esp_wifi): Some more cleanup for roaming app 2025-04-07 18:58:08 +08:00
Kapil Gupta
5deeaecdf4 fix(esp_wifi): moving around roaming app code a bit 2025-04-07 18:58:08 +08:00
Kapil Gupta
0b8775e1c7 fix(roaming_app): Add get set config params for the app 2025-04-07 18:58:08 +08:00
Kapil Gupta
b353ab7427 fix(wifi): Provide a config option to skip IP renew during roam 2025-04-07 18:58:08 +08:00
Kapil Gupta
a34e915a2a fix(esp_wifi): Set minimum scan time to 30ms in roaming app 2025-04-07 18:58:08 +08:00
Kapil Gupta
9e6700110a fix(wifi): Fix some issues observed in roaming app 2025-04-07 18:58:08 +08:00
Kapil Gupta
e7480577f0 fix(ci): Update UT to verify fast psk calculations
Also update some comments
2025-04-07 18:56:56 +08:00
Kapil Gupta
2a2f77b5b5 fix(esp_wifi): Add some comments in github PR 15073
Closes https://github.com/espressif/esp-idf/pull/15073
2025-04-07 18:56:56 +08:00
Chien Wong
06c2fd5ffe feat(wpa_supplicant): Add optimized PSK impl
Signed-off-by: Chien Wong <m@xv97.com>
2025-04-07 18:56:56 +08:00
zhiweijian
2fd56b7ed8 feat(ble/bluedroid): report cte_type in periodic adv report if CTE feature is enabled 2025-04-07 17:03:07 +08:00
zhiweijian
94ada16554 fix(bt/controller): Fixed controller flash only bug if hci-uart is enabled 2025-04-07 17:02:58 +08:00
C.S.M
0e7fa10217 fix(spi_flash): Return false directly in suspend caps check 2025-04-07 15:26:21 +08:00
C.S.M
e691cbef4d fix(spi_flash): Fix flash encryption write verify,
Closes https://github.com/espressif/esp-idf/issues/15380
2025-04-07 15:26:14 +08:00
C.S.M
acd6896872 fix(jpeg): use dma2d empty rx desc event to avoid a stuck 2025-04-07 13:48:35 +08:00
C.S.M
3ae39a039c feat(dma2d): Add a rx empty event callback 2025-04-07 13:40:57 +08:00
Jiang Jiang Jian
60d077eadd Merge branch 'ci/disable_deploy_stable_docs_v5_3' into 'release/v5.3'
ci(docs): disable stable docs deployment (v5.3)

See merge request espressif/esp-idf!38221
2025-04-03 19:53:28 +08:00
Jiang Jiang Jian
246917f51d Merge branch 'fix/fix_l2_cache_miss_issue_5.3_2' into 'release/v5.3'
cache: fixed l2 cache suspended/frozen but l1cache triggers l2 writeback issue (v5.3 full version)

See merge request espressif/esp-idf!38204
2025-04-03 19:52:37 +08:00
zwx
ee150dbf1c feat(802.15.4) add a build CI test for debugging feature 2025-04-03 17:30:59 +08:00
zwx
6e560ba1de feat(802.15.4): supported tx/rx frame dumping 2025-04-03 17:30:59 +08:00
harshal.patil
28e42429f4 fix(examples): Example CA certs must contain the Key Usage parameter
- Example CA certificates that are used for self-signed client certificates
need to include the Key Usage parameter.
- Python3.13 changed the default context of the SSL context that is
generated using ssl.create_default_context() by enabling the VERIFY_X509_STRICT
flag by default
2025-04-03 10:52:47 +05:30
Rahul Tank
b869b7fd87 fix(nimble): Replaced incorrect sizeof with strnlen 2025-04-03 10:25:53 +05:30
wuzhenghui
28882e9b29 fix(esp_hw_support): fix min sleep time calculation missmatch in powerdown flash decision 2025-04-03 11:44:31 +08:00
Marius Vikhammer
2cda6dc0f5 ci(docs): disable stable docs deployment 2025-04-03 11:06:35 +08:00
armando
9dfbc9a59c fix(cache): fixed l2 cache suspended/frozen but l1cache triggers l2 writeback issue 2025-04-02 18:11:02 +08:00
armando
950e54fc96 Revert "fix(cache): fixed l2 cache suspended/frozen but l1cache triggers l2 writeback issue"
This reverts commit df1f0f51f4.
2025-04-02 18:07:49 +08:00
armando
7948c53dde Revert "fix(cache): disable branch predictor when cache freeze"
This reverts commit 6bb78e4573.
2025-04-02 18:07:40 +08:00
Tan Yan Quan
ba45546620 feat(openthread): increase CI timeout for dns CLI commands 2025-04-02 14:42:19 +08:00
Tan Yan Quan
2164e3e7db feat(openthread): update thread-lib to support BR DNS resolution 2025-04-02 14:41:46 +08:00
Tan Yan Quan
a823db9e5d feat(openthread): revert to OT upstream main branch 2025-04-02 14:32:12 +08:00
Tan Yan Quan
7af1de5a82 fix(openthread): change include statement to updated upstream path 2025-04-02 14:32:06 +08:00
Tan Yan Quan
7a84aa6623 fix(openthread): update openthread upstream to support BR DNS resolution 2025-04-02 14:31:13 +08:00
Ondrej Kosta
babd94dd66 ci(esp_eth): enabled Ethernet target tests 2025-04-01 12:42:11 +02:00
zwx
d756c7d25f fix(802.15.4) fix the behavior of the esp_ieee802154_set_txpower 2025-04-01 17:49:22 +08:00
Jonathan Swoboda
680989eb56 fix(esp_eth): Fix order of fields in ETH_ESP32_EMAC_DEFAULT_CONFIG on P4 2025-04-01 07:24:30 +00:00
Ondrej Kosta
87e77f3154 fix(esp_eth): fixed emac_ll_pause_frame_enable for ESP32P4 2025-04-01 08:34:45 +02:00
Ondrej Kosta
9f4acf245a fix(esp_eth): fixed ESP32P4 EMAC REF RMII CLK output mode
fixed units returned and used by periph_rtc_mpll_freq_set function
2025-04-01 08:34:45 +02:00
Zhi Wei Jian
4e24544d1c fix(ble/bluedroid): move setting host feature API to GAP
(cherry picked from commit 79b706ccb0)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-04-01 11:03:43 +08:00
Zhi Wei Jian
e145fe0566 feat(bt/bluedroid): Support ble bluedroid host connection subrating feature
(cherry picked from commit fc58f2f67d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-04-01 11:03:41 +08:00
Zhi Wei Jian
6d44d49dd0 feat(bt/bluedroid): Support ble bluedroid host power control feature
(cherry picked from commit 4f05f6e280)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-04-01 11:03:39 +08:00
Zhi Wei Jian
7daadbcd90 feat(bt/bluedroid): Support BLE CTE in bluedroid host
(cherry picked from commit fcad8b7ebd)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-04-01 11:03:37 +08:00
Zhi Wei Jian
a025c1870a feat(bt/bluedroid): Support BLE iso in bluedroid host
(cherry picked from commit 7128087646)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2025-04-01 11:03:34 +08:00
igor.masar
ddd9d02794 fix(usb_host): Fix return code and description
Changed error code from ESP_ERR_INVALID_STATE to ESP_ERR_NOT_FOUND
when the client never opened the device.
Updated function documentation to correctly reflect return values.
2025-03-31 23:44:32 +02:00
Myk Melez
5750b151cf fix(usb_host): Give semaphore on attempted close of non-opened device
If you call *usb_host_device_close()* for a device that isn't open, the function exits early,
without giving back the semaphore it took, which causes any other call that tries to take
that semaphore to hang indefinitely.

Strangely, there's redundant handling of this condition, with two checks in a row that both handle
the case where `_check_client_opened_device(client_obj, dev_addr)` returns `false`:

```c
    HOST_CHECK_FROM_CRIT(_check_client_opened_device(client_obj, dev_addr), ESP_ERR_NOT_FOUND);
    if (!_check_client_opened_device(client_obj, dev_addr)) {
        // Client never opened this device
        ret = ESP_ERR_INVALID_STATE;
        HOST_EXIT_CRITICAL();
        goto exit;
    }
…
exit:
    xSemaphoreGive(p_host_lib_obj->constant.mux_lock);
    return ret;
```

The first line is the one that exits early, as HOST_CHECK_FROM_CRIT returns its second parameter
if its first parameter is false, without giving back the semaphore (although it does exit
the critical section).

The subsequent block handles the exact same case, except that it ensures the semaphore is given
back before returning. Currently, this block is never reached.

Perhaps the first check was added, then someone noticed the issue and added the second check,
but they forgot to remove the first one.

In any case, this PR removes the first check, so the second check can properly handle this case
by giving back the semaphore before returning.

This bug appears to have been present in the initial commit of the USB Host library to the ESP-IDF
repo: accbaee57c

Of course, if you never try to close a non-opened device, then you won't encounter it!
Unfortunately, I have some code that tried to do that, which is how I found the issue.
2025-03-31 23:44:32 +02:00
Frantisek Hrbata
b8d0de64f8 fix(build): don't call enable_language() before project()
For the Linux target, we currently attempt to fallback to older C/CXX
lagnuage standards in the __build_set_lang_version() function. The
language standard support is checked using CMake's language-specific
functions, such as check_c_compiler_flag(). These functions require the
language to be enabled[1] in CMake beforehand, which is done by calling
project() or by enabling the languages later with enable_language(). At
present, we use enable_language() to enable C and CXX languages in
CMake, allowing us to set the standard early, before invoking project().
However, newer CMake versions (>3.29) issue a warning[2] if
enable_language() is called before project(), as noted in CMP0165[3].

It should generally be acceptable to call __build_set_lang_version()
after __project(), but doing so would alter the behavior of the
COMPILE_OPTIONS also for non-Linux targets. Currently, users can
add to COMPILE_OPTIONS even before calling project() in the project's
CMakeLists.txt and the options will be in the desired order. In other
words, appending to COMPILE_OPTIONS can occur either before or after
calling project() in the project's CMakeLists.txt, with the outcome
remaining consistent. This means the user's settings will appear later
and take priority. However, if __build_set_lang_version() is called
after __project(), the user's COMPILE_OPTIONS settings would be
overridden if set before calling project(). Our documentation[4] explicitly
states that COMPILE_OPTIONS and similar properties should be modified
using idf_build_set_property() after calling project() to prevent
default values from overwriting them.

Even with this guidance, some existing components that modify
COMPILE_OPTIONS before invoking project() might be impacted by this
change. Therefore, separate the language standard settings for non-Linux
and Linux targets. For non-Linux targets, these settings are applied in
__build_set_default_build_specifications(), maintaining the current
behavior. For the Linux target, the language standard is set with
__linux_build_set_lang_version() after calling __project(), ensuring the
languages are already enabled in CMake and no warning is issued. Since the Linux
target is still in preview, this approach should be acceptable,
especially with the existing documentation[4].

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

[1] https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#languages
[2] https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9396
[3] https://cmake.org/cmake/help/latest/policy/CMP0165.html#policy:CMP0165
[4] https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32/api-guides/
    build-system.html#overriding-default-build-specifications

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-03-31 14:51:01 +08:00
wangtao@espressif.com
8e11fdf1fd fix(dhcp): fix dhcp server recv decline issue 2025-03-31 14:11:44 +08:00
Renze Nicolai
cb7cdb315e fix: add missing break statements to usb_serial_jtag_ll_phy_select,
Closes https://github.com/espressif/esp-idf/pull/15499
2025-03-31 10:39:18 +08:00
Abhinav Kudnar
3e4a0c2876 fix(nimble): Fix conversion for min-max itvl of periodic adv param 2025-03-28 14:19:40 +08:00
Song Ruo Jing
7b4ac061db fix(ledc): fix race condition in ledc_fade_stop causing assert failure
Closes https://github.com/espressif/esp-idf/issues/15580
2025-03-27 20:17:03 +08:00
xiongweichao
8d5543b191 fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles
- Due to the number of service security records exceeding the maximum value, the connection failed
2025-03-27 19:56:52 +08:00
Frantisek Hrbata
99a08577b4 fix(tools): handle packages with dots in their names during dependency checks
The `setuptools` package starting with `v70.1.0`[1] contains built-in
`bdist_wheel` command. Before this version `setuptools` relied on the
`bdist_wheel` command implementation from the `wheel` package. Starting with
`setuptools` `v75.8.1` the `PEP 491`[3] restrictions on the distribution name
of a wheel package are enforced[4], replacting also `.` with `_`.  Note that
`PEP 491` actually allows `.` in the distribution name, but for some reason the
latest packaging docs[10][11] does not, stating that `.` should be replaced
with `_`. This was discussion here[12].

Also the `wheel` package starting with `v0.45.0`[5] is using the `bdist_wheel`
command from `setuptools`.  This means that any package which has `.` in its
distribution name, like `ruamel.yaml.clib`, can have different wheel name,
depending on which version of the `bdist_wheel` command was used.

The `bdist_wheel` command from setuptools prior `v75.8.1` or `wheel` prior
`v0.45.0` will keep the dots in distribution name preserved.  For exaple the
`ruamel.yaml.clib` package will have distribution name
`ruamel.yaml.clib-0.2.12.dist-info. Newer versions will replace the dots with
`_` according to [10][11], creating distribution like
`ruamel_yaml_clib-0.2.12.dist-info`.

From packaging point of view `ruamel.yaml.clib-0.2.12.dist-info` and
`ruamel_yaml_clib-0.2.12.dist-info` are the same packages, but this is not
reflected in `importlib.metadata` prior python 3.10[9], which does not perform
name normalization prior the distribution search. This causes the `version`
from `importlib.metadata` to fail on python prior the 3.10 version if the
package with dots in distribution name was generated with normalized paths with
newer `setuptools`. Note that the distribution name normalization was
backported to some later 3.9 python version.

Let's demonstrate this behavior on a simple package with the
`my.minimal.package` name.

```
my_minimal_package/
├── pkg
│   └── __init__.py
└── setup.py

from setuptools import setup, find_packages

setup(
    name='my.minimal.package',
    version='0.1.0',
    packages=find_packages(),
    install_requires=[],
    entry_points={},
)
```

With python 3.9.0 search for `my.minimal.package` fails because
of the missing name normalization.
```
docker run --rm -it --platform linux/x86_64 python:3.9.0 bash
python -m venv venv
. venv/bin/activate
pip install setuptools==v75.8.1
python setup.py bdist_wheel
pip install dist/my_minimal_package-0.1.0-py3-none-any.whl
python
Python 3.9.0 (default, Nov 18 2020, 13:28:38)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 551, in version
    return distribution(distribution_name).version
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: my.minimal.package
>>> get_version('my_minimal_package')
'0.1.0'
```

With python 3.10.0 search for both `my.minimal.package` and
`my_minimal_package` succeeds.
```
docker run --rm -it --platform linux/x86_64 python:3.10.0 bash
python
Python 3.10.0 (default, Dec  3 2021, 00:21:30) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
'0.1.0'
>>> get_version('my_minimal_package')
'0.1.0'
```

In our `tools/check_python_dependencies.py` we cannot relay on the default
distribution finder, used in the `version` function from `importlib.metadata`,
to do name normalization on older python versions.  To cope with this,
implement a fallback version search. If `version` fails with
`PackageNotFoundError`, do the name normalization according to [10][11] and try
again.

Note: There is also a `wheel`[6][7] `v0.43.0` package embeded in `setuptools`
along with the new implementation[8].  This one seems to be used if the
external `wheel` package is not available but imported. TBH this is all kinda
messy and I may have overlooked something.

* [1] https://setuptools.pypa.io/en/stable/history.html#v70-1-0
* [2] https://setuptools.pypa.io/en/stable/history.html#v75-8-1
* [3] https://peps.python.org/pep-0491/#escaping-and-unicode
* [4] https://github.com/pypa/setuptools/pull/4766/files
* [5] https://wheel.readthedocs.io/en/stable/news.html
* [6] https://github.com/pypa/setuptools/blob/main/setuptools/_vendor/wheel/__init__.py
* [7] https://github.com/pypa/setuptools/issues/1386
* [8] https://github.com/pypa/setuptools/blob/main/setuptools/command/bdist_wheel.py
* [9] c6ca368867
* [10] https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
* [11] https://packaging.python.org/en/latest/specifications/binary-distribution-format/
       #escaping-and-unicode
* [12] https://github.com/pypa/setuptools/issues/3777

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-03-27 08:05:07 +01:00
Jiang Jiang Jian
517e489c75 Merge branch 'fix/fix_l2_cache_miss_issue_v5.3' into 'release/v5.3'
cache: fixed l2 cache suspended/frozen but l1cache triggers l2 writeback issue (v5.3)

See merge request espressif/esp-idf!37999
2025-03-27 00:41:08 +08:00
Alexey Lapshin
b64ddb1893 fix(tools): remove unused variables in gdbinit.cmake
Closes https://github.com/espressif/esp-idf/issues/15035
2025-03-26 19:51:33 +07:00
armando
6bb78e4573 fix(cache): disable branch predictor when cache freeze 2025-03-26 18:59:37 +08:00
armando
df1f0f51f4 fix(cache): fixed l2 cache suspended/frozen but l1cache triggers l2 writeback issue 2025-03-26 18:59:33 +08:00
Island
07f4ff8c00 Merge branch 'feature/add_vendor_ble_cmd_definitions_5.3' into 'release/v5.3'
Feature/add vendor ble cmd definitions (v5.3)

See merge request espressif/esp-idf!37957
2025-03-26 13:58:31 +08:00
Marek Fiala
f6ddf27a90 feat(tools): Deactivate current ESP-IDF environment with every export run
Unix systems only
2025-03-25 14:20:52 +01:00
laokaiyao
26833a82dd fix(i2s): add check for i2s DMA buffer array allocation
Closes https://github.com/espressif/esp-idf/issues/15607
2025-03-25 15:24:06 +08:00
laokaiyao
8c9ed6c4e1 fix(i2s): fixed mismatch of the i2s and gdma iram-safe config
Closes https://github.com/espressif/esp-idf/issues/15533
2025-03-25 15:17:59 +08:00
zhiweijian
fe6e6b3613 feat(bt): fixed some doc error and add ocf parameters description 2025-03-25 14:22:15 +08:00
Tan Yan Quan
f4d3a0396d fix(openthread): add some bugfixes to pass CI pipeline 2025-03-25 12:22:53 +08:00
Tan Yan Quan
59909d648d refactor(openthread): move isr_handle_timerX to esp_ieee802154_timer 2025-03-25 12:22:53 +08:00
Tan Yan Quan
70bbe45f32 fix(openthread): calibrate CSL tx parameters 2025-03-25 12:22:53 +08:00
Tan Yan Quan
dc2500bd08 fix(openthread): turn off rx for SSED running CSL during idle 2025-03-25 12:06:18 +08:00
Shen Weilong
e45c7dadd1 feat(bt): added definitions for bluetooth hci vendor commands and events 2025-03-24 20:20:35 +08:00
Shen Wei Long
92ddd1cccb feat(ble/controller): Deleted useless functions for ESP32-C6/H2/C2 2025-03-24 20:20:35 +08:00
Jan Beran
4b3d7a33f4 fix(kconfig): Fix issues with Kconfig files 2025-03-24 10:32:00 +01:00
Geng Yu Chao
c28b58a059 feat(ble): Add Kconfig support for direction finding feature
(cherry picked from commit 8c7af817d89c254714dc9c93414499fead3717d3)

Co-authored-by: Geng Yuchao <gengyuchao@espressif.com>
2025-03-24 11:56:05 +05:30
Geng Yuchao
31e4d7e31b feat(ble):Support Bluetooth LE 5.1 direction finding feature 2025-03-24 11:56:05 +05:30
Rahul Tank
2ebf77da91 fix(nimble): Fix SMP command allocation 2025-03-24 11:56:05 +05:30
Shreeyash
7a6f552df3 feat(nimble): support vendor event mask set and vendor HCI event on nimble host 2025-03-24 11:56:05 +05:30
Rahul Tank
c80e35cbbb fix(nimble): Fix incorrect event deinit in gatt caching discovery 2025-03-24 11:56:05 +05:30
Rahul Tank
27590a7c0c fix(nimble): Exposed the ble_gap_wl_tx_add API to add a device in whitelist 2025-03-24 11:56:05 +05:30
Shen Weilong
e05aee0fa4 feat(bt): support hardware ecc acceleration for bt tinycrypt 2025-03-24 11:56:05 +05:30
Shen Weilong
50d8535b4f change(bt): moved porting/ext/tinycrypt into common 2025-03-24 11:56:05 +05:30
Rahul Tank
fde9c35242 fix(nimble): Fix SC only pairing failure 2025-03-24 11:56:05 +05:30
morris
c15432fc79 fix(usb_serial_jtag): wrong return value in usb_serial_jtag_write_bytes
Closes https://github.com/espressif/esp-idf/issues/15620
2025-03-24 11:46:56 +08:00
Zhang Shuxian
288a133930 docs: Add a note about TWAI multiple instances install 2025-03-24 11:07:50 +08:00
zhiweijian
8c132bbbd8 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3 (86a4da5c)
- Remove unused functions in the controller
2025-03-21 19:48:44 +08:00
baohongde
78667d6d40 feat(bt): added definitions for BR/EDR hci vendor commands and events 2025-03-21 19:36:20 +08:00
chenjianhua
b1f85271ff fix(bt): Update bt lib for ESP32(dc1cd581)
- Remove unused functions in the controller
- Add an SDK config for the minimum size of encryption key
2025-03-21 19:34:37 +08:00
Mahavir Jain
8685219916 Merge branch 'fix/incorrect_calculation_of_used_xip_pages_v5.3' into 'release/v5.3'
fix(esp_psram): Fix incorrect calculation of used XIP PSRAM pages (v5.3)

See merge request espressif/esp-idf!37496
2025-03-21 16:13:10 +08:00
Mahavir Jain
611b0f0d5b Merge branch 'bugfix/fix_github_cert_verification_simpleota_v5.3' into 'release/v5.3'
fix: failing Github certificate verification (v5.3)

See merge request espressif/esp-idf!37825
2025-03-21 16:12:52 +08:00
xiongweichao
51591ba7b9 fix(bt/bluedroid): fixed other events being reported when disconnected
- Since no initial value is assigned, the variable evt is a random value,
causing the ESP_BT_GAP_DISC_STATE_CHANGED_EVT event to be reported when
the connection is disconnected.
2025-03-21 11:17:43 +08:00
Sudeep Mohanty
db9d88c0d4 fix(ringbuf): xRingbufferReceive() crashes for allow-split buffers
This commit adds an assert check to xRingbufferReceive() and
xRingbufferReceiveFromISR() functions to prevent them from being used to
retrieve items from an allow-split buffer. Corresponding documentation
has also been updated.
2025-03-20 11:49:14 +01:00
Song Ruo Jing
0077f642df fix(gpio): fix 8/16-bit gpio, rtc/lp_io register access 2025-03-20 17:09:36 +08:00
Song Ruo Jing
47f1a2c81b fix(gpio): fix pu, pd, drv value incorrect from gpio_dump_io_configuration on esp32
Closes https://github.com/espressif/esp-idf/issues/14931
2025-03-20 17:09:28 +08:00
Xu Si Yu
074be51f83 feat(tcp_transport): add an api to configure the addr family 2025-03-20 16:08:02 +08:00
Jiang Jiang Jian
72a684c1f0 Merge branch 'bugfix/11r_compile_error_v5.3' into 'release/v5.3'
fix(wifi): Fixed compilation error when 11KV is disabled and 11R is enabled (v5.3)

See merge request espressif/esp-idf!37866
2025-03-20 13:57:35 +08:00
Jiang Jiang Jian
352c4de224 Merge branch 'bugfix/provisioning_sec2_aes_iv_usage_v5.3' into 'release/v5.3'
fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme (v5.3)

See merge request espressif/esp-idf!37615
2025-03-20 13:56:26 +08:00
Jiang Jiang Jian
142a63219a Merge branch 'bugfix/fix_esp32_bt_disable_crash_v5.3' into 'release/v5.3'
fix(bt): Fix controller disable cause iwdt timeout on esp32 (v5.3)

See merge request espressif/esp-idf!37773
2025-03-20 13:55:45 +08:00
Jiang Jiang Jian
a3427837d5 Merge branch 'bugfix/fix_ersu_compatibility_issue_v5.3' into 'release/v5.3'
fix(wifi): fix ersu compatibility issue(Backport v5.3)

See merge request espressif/esp-idf!37749
2025-03-20 11:04:27 +08:00
Chen Jichang
0a063c4997 fix(rmt): fix the received symbols issue 2025-03-20 10:36:53 +08:00
morris
04dd4c7c47 fix(i2c): add Kconfig to skip driver conflict check 2025-03-20 10:11:58 +08:00
Radim Karniš
3c8d99d8ef fix(idf_tools): Validate input features 2025-03-19 21:44:43 +01:00
Radim Karniš
61f3968e91 fix(idf_tools): Patch extractall() deprecation warning 2025-03-19 13:48:36 +01:00
yiwenxiu
2fc3a282bb feat(openthread): fix ci avahi service cases issue 2025-03-19 18:07:11 +08:00
Kapil Gupta
18d8bc4286 ci(wifi): Add builds for FT, RRM and WNM configs 2025-03-19 12:42:24 +05:30
Kapil Gupta
31bb54373d fix(wifi): Fixed compilation error when 11R is enabled without 11KV 2025-03-19 12:42:12 +05:30
armando
d7eb89c7f7 feat(psram): supported new octal psram on s3 2025-03-19 10:23:07 +08:00
muhaidong
e9aefff1ed fix(wifi): fix ersu compatibility issue 2025-03-19 10:10:17 +08:00
linruihao
7e654ca887 fix(bt): Fix controller disable cause iwdt timeout on esp32 2025-03-18 20:21:57 +08:00
Zhao Wei Liang
7399bd6ca4 feat(ble): change nimble whitelist max size to 31
(cherry picked from commit 93357e8613)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:35 +08:00
Zhao Wei Liang
c70eac403d feat(ble): change whitelist max size to 31 on ESP32-C2
(cherry picked from commit 578f2358c6)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:33 +08:00
Zhao Wei Liang
a921ffacee feat(ble): change whitelist max size to 31 on ESP32-C6
(cherry picked from commit 2b435687b0)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:30 +08:00
Zhao Wei Liang
12453eac2b fix(ble): Fixed warning that the gpio is not usable when reconfig hci uart pin
(cherry picked from commit 57417ca30f)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:28 +08:00
Zhao Wei Liang
6c7416bc9a fix(ble): fixed hci driver stack protection fault issue on ESP32-C2
(cherry picked from commit afd44d14b9)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:26 +08:00
Zhao Wei Liang
c4d62abfe9 fix(ble): fixed hci driver stack protection fault issue on ESP32-C6
(cherry picked from commit ec4a1324f5)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:24 +08:00
Zhao Wei Liang
02dc949a8f fix(ble): delete ble_hci_trans header file
(cherry picked from commit 327182e3e6)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:21 +08:00
Zhao Wei Liang
234e604f27 fix(ble): fixed hci assertion issue when uart interference occurs
(cherry picked from commit 84f0b39e4d)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-03-18 16:04:19 +08:00
Ashish Sharma
9357b6c606 fix(component/mbedtls): Adds github root cert to cmn_crt_authorities.csv 2025-03-18 14:39:32 +08:00
Mahavir Jain
73ecbfce69 feat(protocomm): add (hidden) config option to indicate security patch feature 2025-03-17 13:35:38 +05:30
morris
8bb65e6d85 Merge branch 'fix/change_pm_lock_type_v5.3' into 'release/v5.3'
fix(pm): use CPU lock in dirvers use axi dma to access psram (v5.3)

See merge request espressif/esp-idf!37713
2025-03-17 11:11:01 +08:00
Island
5a170dfb1b Merge branch 'bugfix/reduce_controller_bin_size_v5.3' into 'release/v5.3'
fix(ble/controller): reduce controller bin size(backport v5.3)

See merge request espressif/esp-idf!37756
2025-03-14 19:26:20 +08:00
Zhang Shuxian
c0ba5274a9 docs: Update static for i2c.rst 2025-03-14 12:08:36 +08:00
zhiweijian
8f7ed33e18 fix(ble/controller): reduce controller bin size 2025-03-14 10:53:03 +08:00
Chen Jichang
3590ddc7f6 fix(drivers): use CPU_MAX lock in dirvers use axi dma to access psram 2025-03-13 15:42:30 +08:00
morris
8a1c9e3cfa fix(axi_icm): qos can be applied to read and write independently 2025-03-12 21:37:29 +08:00
Jiang Jiang Jian
9e2dc78364 Merge branch 'bugfix/wps_reconnect_failure_v5.3' into 'release/v5.3'
fix(wpa_suppplicant): Fix for issue in wps reconnection (Backport v5.3)

See merge request espressif/esp-idf!37643
2025-03-12 15:14:26 +08:00
Ivan Grokhotkov
924ad0c3a9 test(sdmmc): add test for high-prio task busy while writing
Related to https://github.com/espressif/esp-idf/issues/13934
2025-03-12 13:06:57 +08:00
Ivan Grokhotkov
f824a827dc fix(sdmmc): move DMA descriptor refilling into the ISR
Previously, as DMA descriptors were processed, the task performing
SDMMC transfer would get woken up and would refill the descriptors.
This design didn't work correctly when higher priority tasks occupied
the CPU for too long, resulting in SDMMC transfer timing out.

This change moves DMA descriptor refilling into SDMMC ISR. Now the
"DMA done" interrupt is delivered back to task context only when
the entire transfer is completed.

Closes https://github.com/espressif/esp-idf/issues/13934
2025-03-12 13:06:57 +08:00
xiongweichao
d127ebb160 fix(bt/bluedroid): Fixed freeing spp server memory when disconnected 2025-03-11 12:03:19 +08:00
armando
9af8b5468c refactor(psram): rename .bss .noinit segments to sections
Closes https://github.com/espressif/esp-idf/pull/15513
2025-03-11 11:43:56 +08:00
Erki Aring
ed2b78e4ce fix(psram): correct heap vaddr calculation
- fixes https://github.com/espressif/esp-idf/issues/15496

Signed-off-by: armando <douyiwen@espressif.com>
2025-03-11 11:43:53 +08:00
zwx
17ae917039 feat(802.15.4): configure tx on delay using phylib impl 2025-03-11 11:37:19 +08:00
Island
efec039d9f Merge branch 'bugfix/disable_dbg_hci_cmd_on_esp32_v5.3' into 'release/v5.3'
Disable debug vendor hci command on ESP32 (v5.3)

See merge request espressif/esp-idf!37629
2025-03-11 11:07:56 +08:00
Omar Chebib
7721dd5d5d fix(ulp): fix ULP RISC-V interrupt handler corrupting the stack
* Closes https://github.com/espressif/esp-idf/issues/14930
2025-03-10 18:07:26 +08:00
Sarvesh Bodakhe
c80ed51aac fix(wifi): Resolved WPS connectivity issue with pre-connected stations
This fixes the issue where station was not able connect using WPS if it was
already in connected state.

wifi_wps_scan_done() issues an esp_wifi_disconnect() before
calling esp_wifi_connect() to associate with the newly discovered AP. This
behavior incorrectly triggered a failure event (WIFI_EVENT_STA_WPS_ER_FAILED)
even though the disconnection was part of the normal WPS flow. This commit
prevents sending the false failure event, ensuring expected WPS behavior.
2025-03-10 15:16:22 +05:30
Aditi
22296cb613 fix(wpa_suppplicant): Add fix for issue in wps reconnection 2025-03-10 15:16:17 +05:30
chenjianhua
49243e1ad8 fix(bt): Update bt lib for ESP32(e250cf1)
- Disable debug vendor hci command
2025-03-10 15:28:50 +08:00
gongyantao
c1d5cb63cc fix(bt): fixed some issues in bt controller
- fixed the issue where the NULL pointer was deferenced in lc_free state
- avoid accessing released ACL resources in SCO logic
2025-03-10 15:28:32 +08:00
Jin Cheng
73508cf7b4 fix(bt/controller): fixed some controller bugs on ESP32.
1. added a VSC to control whether to initiate lmp_auto_rate
        - Closes https://github.com/espressif/esp-idf/issues/15133
    2. fixed EA resource cleanup error after SNIFF negotiation failure
        - Closes https://github.com/espressif/esp-idf/issues/13605
    3. removed an assertion in SCO data TX handler after disconnection
        - Closes https://github.com/espressif/esp-idf/issues/15176
2025-03-10 15:28:22 +08:00
shenmengjing
e6dea1b9fb docs(provisioning): Sync CN translation and EN source 2025-03-10 10:00:17 +05:30
Mahavir Jain
0a329ab9a4 fix(esp_local_ctrl): update for changes in protocomm security2 scheme 2025-03-10 10:00:12 +05:30
Mahavir Jain
1b319631b8 fix(docs): update for changes in provisioning security2 scheme 2025-03-10 10:00:06 +05:30
Mahavir Jain
af1bd1472c fix(provisioning): fix incorrect AES-GCM IV usage in security2 scheme
Using same IV in AES-GCM across multiple invocation of
encryption/decryption operations can pose a security risk. It can help
to reveal co-relation between different plaintexts.

This commit introduces a change to use part of IV as a monotonic
counter, which must be incremented after every AES-GCM invocation
on both the client and the device side.

Concept of patch version for a security scheme has been introduced here
which can help to differentiate a protocol behavior for the provisioning
entity. The security patch version will be available in the JSON
response for `proto-ver` endpoint request with the field
`sec_patch_ver`.

Please refer to documentation for more details on the changes required
on the provisioning entity side (e.g., PhoneApps).
2025-03-10 10:00:00 +05:30
Mahavir Jain
7e8251d16b fix(protocomm): memory leak issue for session command0 failure case 2025-03-10 09:59:57 +05:30
armando
dbb06fb027 test(cam): added cache-safe build test 2025-03-10 10:39:28 +08:00
armando
737a858dab refactor(cam): rename IRAM-Safe to Cache-Safe 2025-03-10 10:38:40 +08:00
armando
241389134b fix(cam): fixed cam iram safe build error 2025-03-10 10:36:35 +08:00
Erhan Kurubas
cf53484fad test(apptrace): run tests from custom OpenOCD class 2025-03-09 17:34:43 +01:00
Jiang Jiang Jian
4d62ea01b6 Merge branch 'fix/sleep_cpu_mspi_freq_mismatch_issue_p4_v5.3' into 'release/v5.3'
mspi: fixed cpu and mspi freq mismatch issue when in dfs/sleep on p4 (v5.3)

See merge request espressif/esp-idf!37584
2025-03-08 18:45:20 +08:00
Jiang Jiang Jian
d5b8419620 Merge branch 'fix/fix_esp32s3_reboot_cache_failure_v5.3' into 'release/v5.3'
fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart (v5.3)

See merge request espressif/esp-idf!37585
2025-03-08 15:04:16 +08:00
wuzhenghui
fbda052593 change(esp_hw_support): only do mpll disable in lightsleep process 2025-03-08 14:17:05 +08:00
Armando
51280e0e8a fix(mspi): fixed cpu and mspi freq mismatch issue when in dfs/sleep on p4 2025-03-08 14:17:02 +08:00
Song Ruo Jing
5f08f68aa6 docs(uart): aligned the config order in the programming guide with examples
Closes https://github.com/espressif/esp-idf/issues/13182
2025-03-07 21:01:26 +08:00
Song Ruo Jing
6b7c57b520 fix(uart): enlarged task stack size for uart_async_rxtxtasks example
Meanwhile, added CI pytest for some UART examples

Closes https://github.com/espressif/esp-idf/issues/15363
2025-03-07 21:01:26 +08:00
Song Ruo Jing
0ced5fbd21 fix(ledc): overflowed integer argument in ledc_hal_clear_left_off_fade_param 2025-03-07 20:30:20 +08:00
Jiang Jiang Jian
51fafde80b Merge branch 'bugfix/fix_some_wifi_bugs_202502_v5.3' into 'release/v5.3'
fix(sniffer): fix channel in rx_ctrl is zero when using sniffer(Backport v5.3)

See merge request espressif/esp-idf!37561
2025-03-07 20:07:09 +08:00
Chen Jichang
546b60f6f1 fix(parlio): fix non-free running test case 2025-03-07 19:44:23 +08:00
Guillaume Souchere
5c62675f45 fix(esp_hw_support): esp_ptr_in_rtc_iram_fast check to return false
esp_ptr_in_rtc_iram_fast logic should be executed if
SOC_RTC_FAST_MEM_SUPPORTED is set but it should also be executed
if IRAM and DRAM region mapping is the same. Remove the
SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW part of the check.

Update heap component to use the modify function appropriately.
2025-03-07 12:24:07 +01:00
igor.masar
e0679b5ba0 fix(usb/hal/dwc): Correct host channel number calculation
The hardware field `ghwcfg2.numhstchnl` is zero-based, meaning the actual
number of available host channels is `numhstchnl + 1`. This off-by-one
error caused the USB Host controller to report N-1 channels instead of N,
leading to premature "No more HCD channels available" errors when
connecting multiple devices.

This issue affects ESP32-S2, ESP32-S3, and ESP32-P4.
2025-03-07 18:30:44 +08:00
Song Ruo Jing
346d084a5d docs(ledc): add notes for ledc_set_fade_with_time API reference
Closes https://github.com/espressif/esp-idf/issues/15085
2025-03-07 17:30:40 +08:00
peter.marcisovsky
3e8d088748 fix(jpeg_decoder): Correctly handle invalid 0xffff JPEG marker 2025-03-07 10:30:10 +01:00
Song Ruo Jing
d173affef0 fix(ledc): left-off gamma ram registers should be cleared
Hardware reads in (range_number+1) fade parameter registers, which could
cause output waveform error.
2025-03-07 17:30:05 +08:00
peter.marcisovsky
1d99ad74fc feat(jpeg_decode): Add support for default Huffman tables
- In case of a missing Huffman table, while decoding a JPEG image
    - Define a default Huff table and add it to JPEG image header
2025-03-07 10:30:04 +01:00
Song Ruo Jing
a1bd7abd1d fix(ledc): updated docs for esp32h2 eco5 bugfix 2025-03-07 17:22:49 +08:00
morris
382466d03a fix(spi): removed PERIPH_CTRL_FUNC_IN_IRAM dependency 2025-03-07 15:45:09 +08:00
yinqingzhao
79df1a8657 fix(sniffer): fix channel in rx_ctrl is zero when using sniffer 2025-03-07 15:24:49 +08:00
Jiang Jiang Jian
7d8b308352 Merge branch 'bugfix/fix_scan_bitmap_channel_14_fail_issue_v5.3' into 'release/v5.3'
fix(wifi): fix scan bitmap channel 14 fail issue

See merge request espressif/esp-idf!37519
2025-03-07 14:25:13 +08:00
wuzhenghui
f99c3c6343 fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart 2025-03-07 11:05:41 +08:00
Jiang Jiang Jian
31d1ceb29b Merge branch 'bugfix/11kv_config_break_v5.3' into 'release/v5.3'
fix(esp_wifi): Correctly break 11kv config into wnm and rrm configs (v5.3)

See merge request espressif/esp-idf!37477
2025-03-07 10:56:05 +08:00
Roman Leonov
26ba099bd1 fix(usb_host): Fixed unchecked return value in enum driver (coverity) 2025-03-06 20:19:39 +08:00
Sudeep Mohanty
81109e8bdd fix(panic_handler): Updated panic handler to use RTC WDT
This commit updates the following:
- Updates the panic handler to use only the RTC WDT to reset the system.
- Refactors some of the panic handler code.
- Updates Bluetooth files where in they now feed the WDTs instead of
  reconfiguring them.
- Removes some unnecessary configuration of WDTs from various files.
- Added a unit test to verify that the system does not lock up when the
  panic handler is stuck.
- Updates the memprot unit tests to work with the refactored panic
  handler.

Closes https://github.com/espressif/esp-idf/issues/15166
Closes https://github.com/espressif/esp-idf/issues/15018
Closes https://github.com/espressif/esp-idf/issues/10110
2025-03-06 09:13:17 +01:00
Erhan Kurubas
5d442d0054 test(hmac_soft_jtag): check jtag connection status properly 2025-03-05 15:34:43 +01:00
Erhan Kurubas
47c014f117 feat(tools): update openocd version to v0.12.0-esp32-20250226 2025-03-05 15:34:43 +01:00
Jan Beran
2a401c768c fix(esp_system): Remove unnecessary select from esp_system/Kconfig 2025-03-05 15:09:25 +01:00
muhaidong
d3031add26 fix(wifi): fix scan bitmap channel 14 fail issue 2025-03-05 21:44:36 +08:00
peter.marcisovsky
0f58c571cf feat(jpeg_decoder): Correctly set JPEG restart interval 2025-03-05 10:43:07 +01:00
Island
f6997a73ef Merge branch 'bugfix/fix_link_estab_compile_failure_v5.3' into 'release/v5.3'
fix(nimble): Handle probable release breaking change (v5.3)

See merge request espressif/esp-idf!37435
2025-03-05 17:02:28 +08:00
Zhang Hai Peng
ca9ca7d021 feat(ble/bluedroid): Support read periodic advertiser list size command
(cherry picked from commit dcc26e3e4f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-03-05 15:13:26 +08:00
Kapil Gupta
1c5d468279 fix(esp_wifi): Prevent flushing of FT data mistakenly 2025-03-05 12:39:23 +05:30
Kapil Gupta
91622962fc fix(esp_wifi): Correctly break 11kv config into wnm and rrm configs 2025-03-05 12:39:11 +05:30
Shreeyash
5c4ff82aeb feat(nimble): Allow BLE SPP Client to subscribe to the server 2025-03-05 11:40:11 +05:30
harshal.patil
223b25e1f3 fix(esp_psram): Fix incorrect calculation of used XIP PSRAM pages
The functions mmu_config_psram_text_segment() and mmu_config_psram_rodata_segment()
used to return the value of next start page in *out_page instead of the number
of pages used as mentioned in the documentation
2025-03-05 10:37:42 +05:30
Zhang Hai Peng
587eae152f feat(ble/bluedroid): Add Read Long Characteristic Values example
(cherry picked from commit 32e4fb79e8)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-03-04 22:13:35 +08:00
Jiang Jiang Jian
f8fdca6fdb Merge branch 'bugfix/fix_regression_while_reverting_wpa3_ent' into 'release/v5.3'
fix(wifi): Re-introduce parsing for Enterprise APs during the connecting scan (Regression v5.3)

See merge request espressif/esp-idf!37443
2025-03-04 21:25:54 +08:00
morris
709fe57efd fix(example): wrong ws2812 reset duration
Closes https://github.com/espressif/esp-idf/issues/15498
2025-03-04 11:10:55 +08:00
Sarvesh Bodakhe
f6cf94660c fix(wifi): Re-introduce parsing for Enterprise APs during the connecting scan
Fixes the regression introduced in d90f31c29e
2025-03-03 14:07:07 +05:30
Rahul Tank
3b85cba90c fix(nimble): Handle probable release breaking change
link_estab event may be handled by customers in application and the previous would break it.
Revert few changes so as to not break the customer's code
2025-03-03 12:37:23 +05:30
Omar Chebib
105588b113 fix(esp_system): add missing arrays attribute in the ESP32-P4 linker script 2025-03-03 14:21:17 +08:00
morris
8062ad5a0c feat(gdma): allow bypass the alignment check in the link driver
Closes https://github.com/espressif/esp-idf/issues/15228
2025-03-03 11:21:31 +08:00
Zhang Hai Peng
a903c662db fix(ble/controller): Fix BLE Kconfig on ESP32 to avoid unexpected behavior
(cherry picked from commit 9496949132)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-03-03 11:13:40 +08:00
Jan Beran
94e61d005b change: move check_deprecated_configs.py file to esp-idf-kconfig 2025-02-28 14:51:23 +01:00
wuzhenghui
0d8c311296 change(doc): added more usage notes & warings about PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP 2025-02-28 16:45:51 +08:00
peter.marcisovsky
e638cb8845 fix(usb_host): Fixing dererence to OTG_NUM_HOST_CHAN in docs 2025-02-28 09:33:33 +01:00
Jin Cheng
f58c729e8a fix(bt/bluedroid): fixed memory leaks in SPP callback mode 2025-02-28 16:12:46 +08:00
Chen Jichang
f3eec647aa feat(parlio_tx): backport the clock change to v5.3 2025-02-28 15:03:11 +08:00
Jiang Jiang Jian
7b0c6f45aa Merge branch 'fix/reduce_rtc_text_size_v5.3' into 'release/v5.3'
fix(system): linker script: free unused .rtc.text memory for esp32c3, esp32s2 (v5.3)

See merge request espressif/esp-idf!35367
2025-02-28 14:17:45 +08:00
Jiang Jiang Jian
9e4d18461d Merge branch 'fix/ssdmmc_send_cmd_set_relative_addr_rca_v5.3' into 'release/v5.3'
fix(sdmmc): Retry to get another RCA if the previous response was 0 (v5.3)

See merge request espressif/esp-idf!34345
2025-02-28 13:20:56 +08:00
Jiang Jiang Jian
325b4f433c Merge branch 'feature/softap_fixes_for_ceritification_v5.3' into 'release/v5.3'
WiFi: fixes for issues discovered during SoftAP ceritification

See merge request espressif/esp-idf!36511
2025-02-28 12:40:25 +08:00
Jiang Jiang Jian
9bc2babe54 Merge branch 'feat/support_ble_vendor_hci_event_report_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Support BLE vendor hci event reporting (v5.3)

See merge request espressif/esp-idf!37353
2025-02-28 12:02:00 +08:00
Jiang Jiang Jian
eddaf0377b Merge branch 'feat/add_ble_ctrl_log_module_on_esp32c3_v5.3' into 'release/v5.3'
feat(bt): Added BLE log module on ESP32-C3 and ESP32-S3(723439d) (v5.3)

See merge request espressif/esp-idf!37360
2025-02-28 12:01:11 +08:00
Jiang Jiang Jian
4b43d63d73 Merge branch 'bugfix/freertos_wcaps_coproc_v5.3' into 'release/v5.3'
fix(freertos): fix a bug in `prvTaskDeleteWithCaps` related to coprocessors (backport v5.3)

See merge request espressif/esp-idf!37154
2025-02-28 11:56:39 +08:00
Jiang Jiang Jian
064f63d2a0 Merge branch 'fix/fix_bad_dslp_param_after_lightsleep_v5.3' into 'release/v5.3'
fix(esp_hw_support): Fixed the issue that light sleep destroyed the parameters of subsequent deep sleep (v5.3)

See merge request espressif/esp-idf!37303
2025-02-28 11:36:21 +08:00
Kapil Gupta
5a9b16d754 fix(esp_wifi): Address some review comments 2025-02-28 11:35:22 +08:00
Aditi
30264132b5 fix(wpa_supplicant): Remove the btm_rrm task from supplicant
This commit removes btm_rrm_t task and CONFIG_SUPPLICANT_TASK from
wpa_supplicant and make the functions work in wifi task's context.
2025-02-28 11:35:22 +08:00
Aditi
041bc41ccf fix(wpa_supplicant): Fix for sending alternate ft-auth in roaming 2025-02-28 11:35:22 +08:00
Aditi
4724d7c5e7 fix(wpa_supplicant): Add two separate flags for RRM and WNM
Added two separate flags CONFIG_RRM(80211k) and CONFIG_WNM(80211v)
    flags under IEEE80211KV support flag.
2025-02-28 11:35:22 +08:00
Aditi
b2abac0a4e fix(wpa_supplicant): Add some minor fixes in roaming
1) Add a fix in roaming example for 11kvr
    2) Removed length constraint for neighbor report received.
2025-02-28 11:35:22 +08:00
Aditi
9e168a1480 fix(esp_wifi): Add fix for error handling for FT-Auth 2025-02-28 11:35:22 +08:00
Nachiket Kukade
76235525a6 fix(wpa_supplicant): Fix some coverity issues in wpa_supplicant
1. Fix leak in SoftAP while sending SAE Confirm
2. Move NULL check before pointer is getting used
3. Remove some dead code
2025-02-28 11:35:22 +08:00
wangtao@espressif.com
f1f420ad05 fix(wifi): fix build issue when disable wpa3 sae 2025-02-28 11:35:22 +08:00
Shreyas Sheth
e71a1290d6 fix(wifi): Resolve comments for softap fixes 2025-02-28 11:35:22 +08:00
Shreyas Sheth
fedcf1a524 fix(wifi): Resolve comments on feature/softap_fixes_for_ceritification 2025-02-28 11:35:22 +08:00
Shreyas Sheth
bdd9c2a0f1 fix(wifi): Make sure auth is sent after sae process 2025-02-28 11:35:22 +08:00
Shreyas Sheth
d402b239d6 feat(wifi): Add support for transition_disable for softAP
Bugfix rsnxe len for assoc req
2025-02-28 11:35:22 +08:00
Jiang Jiang Jian
d05db91535 Merge branch 'feat/add_h2_config_and_maxver_for_v5.3' into 'release/v5.3'
feat(soc): add Kconfig rev min option and increase max ver for H2 v1.2 (v5.3)

See merge request espressif/esp-idf!36417
2025-02-28 11:33:21 +08:00
Jiang Jiang Jian
cb8d1796b8 Merge branch 'fix/xtensa_nmi_v5.3' into 'release/v5.3'
fix(esp_hw_support): make the NMI interrupts available for the main application (backport v5.3)

See merge request espressif/esp-idf!34268
2025-02-28 11:32:47 +08:00
Jiang Jiang Jian
f98328e9b2 Merge branch 'bugfix/ethernet_example_netif_glue_assignment_v5.3' into 'release/v5.3'
fix(ethernet_basic): Fix second Ethernet device not receiving IP address (v5.3)

See merge request espressif/esp-idf!36946
2025-02-28 10:55:33 +08:00
Jiang Jiang Jian
5f18a9711b Merge branch 'feature/esp32h2_eco5_ecc_v5.3' into 'release/v5.3'
feat(ecc): enable ECC constant time mode for ESP32-H2 ECO5 (v5.3)

See merge request espressif/esp-idf!36585
2025-02-28 10:50:18 +08:00
Alexey Lapshin
2ff0343243 fix(system): linker script: free unused .rtc.text memory for esp32c3/esp32s2/esp32s3 2025-02-28 10:45:53 +08:00
Adam Múdry
8de193ff17 fix(sdmmc): Retry to get another RCA if the previous response was 0 2025-02-28 10:43:22 +08:00
Jiang Jiang Jian
8c4d2464d5 Merge branch 'fix/fix_max_idle_priod_issue_v53' into 'release/v5.3'
fix(wifi): fix max idle period 1 issue

See merge request espressif/esp-idf!37309
2025-02-28 10:41:03 +08:00
Island
42c78af828 Merge branch 'fix/optimize_ble_example_ci_build_rule_v5.3' into 'release/v5.3'
fix(ble): Optimizied the bluetooth build test rules (v5.3)

See merge request espressif/esp-idf!35326
2025-02-28 10:35:45 +08:00
Rahul Tank
e53eed0cd1 Merge branch 'bugfix/deprecate_link_estab_v5.3' into 'release/v5.3'
fix(nimble): Deprecate link_estab event (v5.3)

See merge request espressif/esp-idf!37058
2025-02-27 23:13:53 +08:00
Tomas Rezucha
3b2c3cb854 fix(usb/phy): Fixed crash on external PHY init with speed != UNDEFINED
Also deprecated usb_phy_otg_dev_set_speed()
and usb_phy_action() which are no longer used in esp-idf
2025-02-27 15:10:13 +01:00
Roman Leonov
b937bd3a1e fix(usb_phy): Removed pad pull override config for Full-speed 2025-02-27 15:10:13 +01:00
Island
5db0534f7e Merge branch 'feat/add_ble_spi_log_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Support SPI log output options for HCI (v5.3)

See merge request espressif/esp-idf!37340
2025-02-27 20:17:56 +08:00
Roland Dobai
284120b0f4 Merge branch 'fix/docker_qemu_seg_v5.3' into 'release/v5.3'
CI: Fixed docker build

See merge request espressif/esp-idf!37366
2025-02-27 20:13:29 +08:00
Roland Dobai
73b6a8c263 ci(github): Fixed docker build caused by Qemu segmentation fault
Works around issue from
https://github.com/espressif/esp-idf/actions/runs/13531037397/job/37813060700
caused by Qemu segmentation fault.

    Errors were encountered while processing: libc-bin

The workaround is from https://github.com/docker/setup-qemu-action/issues/198.
2025-02-27 12:45:15 +01:00
morris
ae09425178 Merge branch 'fix/spi_master_halt_using_rc_fast_v5.3' into 'release/v5.3'
fix(spi_master): fix spi halt when remove device who using rc_fast (v5.3)

See merge request espressif/esp-idf!37004
2025-02-27 16:48:23 +08:00
chenjianhua
2b80f7506d feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(723439d)
- Added BLE controller debug log trace
- Added BLE controller log module
2025-02-27 15:46:45 +08:00
Shu Chen
5c06d62702 Merge branch 'fix/fix_ot_uart_init_bug_v5.3' into 'release/v5.3'
fix(openthread): fix a bug of openthread uart init port (v5.3)

See merge request espressif/esp-idf!37323
2025-02-27 15:36:18 +08:00
Chen Jichang
25f35910a7 fix(parlio): fix rempty interrupt during resetting fifo
Move the fifo reset to after disabling the tx core clock.
And add external non-free running clock src test.
2025-02-27 15:12:33 +08:00
Linda
9655032d2b docs: update the API description for esp-wifi_scan_get_ap_records 2025-02-27 15:12:01 +08:00
wangtao@espressif.com
b5477c5532 fix(wifi): fix max idle period 1 issue 2025-02-27 14:47:43 +08:00
Marius Vikhammer
8d6d6957ce fix(lp_io): allow edge wakeup types for LP-IO on chips which support it 2025-02-27 14:31:00 +08:00
morris
195d7f47a4 Merge branch 'feat/add_temperature_calib_v5.3' into 'release/v5.3'
feat(temperature_sensor): Add temperature sensor calibration support(backport v5.3)

See merge request espressif/esp-idf!37314
2025-02-27 14:28:06 +08:00
Jiang Jiang Jian
9c5aefac91 Merge branch 'docs/fix_some_coexist_doc_issue_v5.3' into 'release/v5.3'
docs(coex): update rf coexistence documents (v5.3)

See merge request espressif/esp-idf!37345
2025-02-27 14:03:31 +08:00
Jiang Jiang Jian
b2f08a80dc Merge branch 'bugfix/ifdef_cplusplus_bracket_v5.3' into 'release/v5.3'
bugfix(wifi): Add missing brackets in the C++ guard (Backport v5.3)

See merge request espressif/esp-idf!36845
2025-02-27 13:41:24 +08:00
Mahavir Jain
eb9019a1eb Merge branch 'feature/enable_ota_resumption_support_for_release5.3' into 'release/v5.3'
feat(app_update): enabled ota resumption support for release/v5.3

See merge request espressif/esp-idf!37212
2025-02-27 13:41:07 +08:00
Chen Jian Hua
7527948b6b feat(bt/bluedroid): Support BLE vendor hci event reporting
(cherry picked from commit 1003ced6e9)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-02-27 12:33:32 +08:00
Chen Jian Hua
4913618b07 feat(bt/bluedroid): Support BLE setting vendor event mask
(cherry picked from commit fd4094e502)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-02-27 12:33:29 +08:00
wanlei
b43104538b fix(spi_master): fix spi halt when remove device who using rc_fast 2025-02-27 11:42:15 +08:00
Jiang Jiang Jian
e40304b2ec Merge branch 'bugfix/fix_some_wifi_bugs_250226_v5.3' into 'release/v5.3'
fix(wifi): fix some wifi bugs 250226(Bbackport v5.3)

See merge request espressif/esp-idf!37308
2025-02-27 11:38:10 +08:00
akshat
f8c552b560 bugfix(wifi): Fix header file errors and remove esp_supplicant from check_public_headers_exceptions.txt 2025-02-27 11:09:30 +08:00
akshat
1c231b4401 bugfix(wifi): Add missing brackets in the C++ guard
Closes https://github.com/espressif/esp-idf/issues/14991
2025-02-27 11:09:30 +08:00
linruihao
5da35cadb6 docs(coex): update rf coexistence documents
- remove BLE connecting state in coexistence scenario
- remove WIFI section in H2 docs
2025-02-27 11:07:55 +08:00
Shu Chen
eadfab049f docs(coex): add the supported coexistence scenario for Wi-Fi and 802.15.4 2025-02-27 11:07:45 +08:00
Island
a71e0aac53 Merge branch 'feat/add_save_debug_context_250226_v5.3' into 'release/v5.3'
Feat/add save debug context 250226 (v5.3)

See merge request espressif/esp-idf!37296
2025-02-27 10:40:05 +08:00
Zhou Xiao
ac9ac0a46c fix(ble): fix flushout and sync issues
(cherry picked from commit b144337020)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-27 09:53:39 +08:00
Xiao Xufeng
1ce83d7b36 feat(soc): add Kconfig rev min option and increase max ver for H2 v1.2 2025-02-27 09:04:14 +08:00
Zhang Hai Peng
5927173177 fix(ble/bluedroid): Added SPI output support for Bluedroid host log
(cherry picked from commit b6903296ad)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-02-26 23:13:41 +08:00
Zhang Hai Peng
efdf380fb9 fix(ble/bluedroid): Support SPI log output options for HCI
(cherry picked from commit e00ba3cbd1)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-02-26 23:13:39 +08:00
Martin Vychodil
313c3406f9 Merge branch 'fix/esp_vfs_register_fd_range_warning_message_v5.3' into 'release/v5.3'
fix(storage/vfs): incorrect log level in esp_vfs_register_fd_range (v5.3)

See merge request espressif/esp-idf!36319
2025-02-26 21:39:04 +08:00
Aditya Patwardhan
2390e81fb7 fix(hal): Fixed ecc_ll for esp32c5 beta3 2025-02-26 17:04:28 +05:30
Zhang Shuxian
d464d7b150 docs: Update CN translation for size.rst 2025-02-26 17:04:28 +05:30
Aditya Patwardhan
78874d7f7c feat(docs): Update minimizing binary size
The ESP32-H2 software countermeasure may not be necessary
        for ESP32-H2 v1.2 and above, this commit updates
        the relevant documentation
2025-02-26 17:04:28 +05:30
laokaiyao
25322aeb81 refactor(ecdsa): rely on efuse to get chip revision 2025-02-26 17:04:27 +05:30
Aditya Patwardhan
08e250d081 fix(soc): Fixed ECDSA register compatibility 2025-02-26 17:04:27 +05:30
Aditya Patwardhan
68eb689b35 fix(hal): Make the ECDSA countermeasure dynamically applicable
This commit makes the ECDSA countermeasure dynamically applicable
    across different revisions of the ESP32H2 SoC.
2025-02-26 17:04:19 +05:30
Xu Si Yu
3b770e7307 fix(openthread): fix a bug of openthread uart init port 2025-02-26 19:22:20 +08:00
morris
70e8021aa7 Merge branch 'bugfix/gpio_rom_patch_fix_v5.3' into 'release/v5.3'
fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2 (v5.3)

See merge request espressif/esp-idf!36866
2025-02-26 19:09:11 +08:00
Chen Jichang
1ff5e64acd fix(parlio_tx): add clock and fifo reset in disable function 2025-02-26 18:41:49 +08:00
C.S.M
77e69fa036 feat(temperature_sensor): Add temperature sensor calibration support 2025-02-26 17:54:36 +08:00
wuzhenghui
f72d3ea516 fix(esp_hw_support): fix lightsleep destroys deepsleep rtc parameters 2025-02-26 17:31:35 +08:00
Island
af4ad22e9a Merge branch 'feat/optimize_ble_config_reduce_bin_v5.3' into 'release/v5.3'
Feat/optimize bluedroid host config and reduce bin size (v5.3)

See merge request espressif/esp-idf!37260
2025-02-26 17:23:29 +08:00
muhaidong
2e5099261f fix(wifi): fix some wifi bugs 250226
1. fix(wifi): fix some esp32p4 host issues
2. fix(wifi): fix wep shared auth connect fail issue
3. fix(coex): fix disable external coex fail issue
2025-02-26 17:09:43 +08:00
morris
67c6ae91ab Merge branch 'feat/allow_setting_rmt_group_prescale_v5.3' into 'release/v5.3'
refactor(rmt): set group clock prescale dynamically (v5.3)

See merge request espressif/esp-idf!36738
2025-02-26 17:03:16 +08:00
Yuhan Wei
24aecbbc39 fix(ble): Fixed the bluetooth examples build rule 2025-02-26 16:52:03 +08:00
Alexey Gerenkov
d0f9dc4b80 Merge branch 'update_usb_jtag_doc_v5.3' into 'release/v5.3'
docs(jtag): add esp32p4 usb jtag pin numbers (v5.3)

See merge request espressif/esp-idf!37242
2025-02-26 16:39:26 +08:00
muhaidong
810a9149e7 feat(phy): add gpio cmd for cert test 2025-02-26 16:04:47 +08:00
morris
53ecffa92f Merge branch 'refactor/gptimer_isr_logs_opt_int_v5.3' into 'release/v5.3'
feat(gptimer): make start and stop function idempotent (v5.3)

See merge request espressif/esp-idf!37249
2025-02-26 15:51:24 +08:00
Jiang Jiang Jian
709c9221e9 Merge branch 'feature/c3_libphy_20250120_v5.3' into 'release/v5.3'
feat(phy): update libphy for RXDC cal opt, no antenna current opt, add cca api(Backport v5.3)

See merge request espressif/esp-idf!37225
2025-02-26 15:05:55 +08:00
Zhao Wei Liang
be9de2b50e feat(ble): add a debug way to retain scene on ESP32-C6
(cherry picked from commit bc299e784c)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-02-26 15:03:37 +08:00
Zhao Wei Liang
bcbaa93cf7 fix(ble): fixed common kconfig error when controller enable only
(cherry picked from commit 5b8ac71ace)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-02-26 15:03:34 +08:00
Island
4aa1a3712f Merge branch 'bugfix/fix_ble_report_len_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fix adv data and scan rsp data not reported together in BLE active scan (v5.3)

See merge request espressif/esp-idf!37202
2025-02-26 14:12:00 +08:00
Chen Jichang
e98ded4e7b refactor(rmt): set group clock prescale dynamically
Closes https://github.com/espressif/esp-idf/issues/14760
2025-02-26 11:22:51 +08:00
Omar Chebib
9b0b5b4613 fix(examples): fix NMI interrupt example to work on ESP32-S3 2025-02-26 10:06:44 +08:00
Omar Chebib
209cfa313b fix(esp_hw_support): make the NMI interrupts available for the main application
Closes https://github.com/espressif/esp-idf/issues/13629

NMI interrupt level has been freed for all the Xtensa targets, making it possible
for the main application to use it. An example has been added to show how to
proceed.
2025-02-26 10:06:44 +08:00
zhiweijian
5f389f7270 feat(ble/bluedroid): reduce bluedrois host bin size and disable BLE_HOST_BG_CONNECT_EN 2025-02-25 17:59:11 +08:00
Wang Meng Yang
73d6bd722f Merge branch 'bugfix/fix_hid_reconnect_issue_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Add Kconfig option to keep device bonding info when HID unplugging (v5.3)

See merge request espressif/esp-idf!37182
2025-02-25 17:51:06 +08:00
Wang Meng Yang
2abf7c6ec5 Merge branch 'bugfix/sdp_uuid16_match_err_v5.3' into 'release/v5.3'
fix(bt): Fix the incorrect record found using uuid16 search(v5.3)

See merge request espressif/esp-idf!36844
2025-02-25 17:01:25 +08:00
zhiweijian
27fa98772a feat(ble/bluedroid): disable bluedroid host unused functions 2025-02-25 16:48:38 +08:00
zhiweijian
b0725698e2 feat(bt/bluedroid): optimize bluedroid menuconfig 2025-02-25 16:48:29 +08:00
zhiweijian
386f94a807 feat(bt/bluedroid): delete unused host congest check 2025-02-25 16:48:17 +08:00
Song Ruo Jing
dfa95bfe6e fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2
Closes https://github.com/espressif/esp-idf/issues/15209
2025-02-25 16:23:08 +08:00
Marius Vikhammer
79bf6acddb Merge branch 'fix/esp-log-put-function-in-iram_v5.3' into 'release/v5.3'
fix(log): Modified linker script to move functions from flash to iram (backport v5.3)

See merge request espressif/esp-idf!36816
2025-02-25 16:00:46 +08:00
Island
192edf0bab Merge branch 'change/ble_update_lib_20250217_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250217 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!37130
2025-02-25 15:09:23 +08:00
morris
509b9d9a54 feat(gptimer): make start and stop function idempotent
Closes https://github.com/espressif/esp-idf/issues/12325
Closes https://github.com/espressif/esp-idf/issues/13486
2025-02-25 11:45:01 +08:00
Wang Meng Yang
af429c89a2 Merge branch 'feat/add_sdk_config_for_sdp_size_option_v5.3' into 'release/v5.3'
feat(bt): Implement SDK Config SDP size options(backport v5.3)

See merge request espressif/esp-idf!37211
2025-02-25 07:51:25 +08:00
Erhan Kurubas
9f9ddd246f docs(jtag): add esp32p4 usb jtag pin numbers 2025-02-24 14:44:35 +01:00
Jiang Jiang Jian
fbddf2af95 Merge branch 'feat/add_inq_page_coex_schm_v5.3' into 'release/v5.3'
feat(coex): add coexist scheme for bt inquiry/page coexist with wifi

See merge request espressif/esp-idf!36989
2025-02-24 19:42:25 +08:00
muhaidong
42bd89e725 feat(phy): update libphy for RXDC cal opt, no antenna current opt, add cca api 2025-02-24 14:23:35 +08:00
Island
4418394bc3 Merge branch 'feat/add_ble_log_spi_out_printf_v5.3' into 'release/v5.3'
feat(ble): add printf interface for ble log spi out (v5.3)

See merge request espressif/esp-idf!37186
2025-02-24 14:01:42 +08:00
Island
99e15e90ea Merge branch 'fix/ble_log_spi_out_api_fix_v5.3' into 'release/v5.3'
fix(ble): changed DMA malloc api to v5.3

See merge request espressif/esp-idf!37208
2025-02-24 14:01:36 +08:00
liuning
07a0f94779 feat(coex): add coexist scheme for bt inquiry/page coexist with wifi 2025-02-24 10:42:15 +08:00
Marius Vikhammer
37413d2148 Merge branch 'docs/fix_gps_broken_link_v5.3' into 'release/v5.3'
docs(examples): fixed broken link in uart example readme (v5.3)

See merge request espressif/esp-idf!37150
2025-02-24 10:03:34 +08:00
Rahul Tank
6515dc1d2e fix(nimble): Keep only BLE_GAP_EVENT_CONNECT gap event 2025-02-23 15:11:27 +05:30
Martin Vychodil
6226e07ce4 Merge branch 'bugfix/memprot_s2_intr_peri1_v5.3' into 'release/v5.3'
fix(security): ESP32S2 memory protection check for Peri1 RTCSLOW interrupt (v5.3)

See merge request espressif/esp-idf!37118
2025-02-23 03:44:10 +08:00
Adam Múdry
1d09158bb5 fix: test_nvs_gen_check.py support for read-only NVS partitions 2025-02-21 14:26:48 +01:00
Adam Múdry
14b8dc77a3 fix(nvs): Fix the nvs generator test (write_namespace safer behavior change) 2025-02-21 14:26:36 +01:00
Adam Múdry
9620508388 docs(nvs): Document nvs_check.py functions 2025-02-21 14:26:36 +01:00
Adam Múdry
1eacc6c2a8 feat(nvs): Add raw_data variable to NVS_Partition class in nvs_parser.py 2025-02-21 14:26:36 +01:00
xiongweichao
059a6cdd65 fix(bt): Fixed SDP record integrity check bug 2025-02-21 18:02:02 +08:00
xiongweichao
b3521b51f1 fix(bt/bluedroid): fixed the format error of passkey printing 2025-02-21 18:02:02 +08:00
xiongweichao
c3bfb484d0 fix(bt/bluedroid): Fixed incorrect types of some variables in SDP 2025-02-21 18:02:02 +08:00
xiongweichao
ff81e4b9ee fix(bt): Fix incorrect type returned when searching SAP record 2025-02-21 18:02:02 +08:00
xiongweichao
9e33139206 fix(bt): Fix the incorrect record found using uuid16 search 2025-02-21 18:02:02 +08:00
nilesh.kale
a64afccafc feat(app_update): enabled ota resumption support for release/v5.3 2025-02-21 15:28:21 +05:30
gongyantao
7c28af0945 change(bt): optimize the macro definition for sdp_max_pad_len 2025-02-21 17:54:18 +08:00
Mitch Cairns
2e30c74883 feat(bt): Implement SDK Config SDP size options
Closes https://github.com/espressif/esp-idf/pull/15321
2025-02-21 17:50:17 +08:00
Zhou Xiao
8372c3d4d9 fix(ble): changed DMA malloc api to v5.3 2025-02-21 17:12:18 +08:00
Martin Vychodil
2c26a7e11e fix(security): Fixed ESP32S2 memory protection check for Peri1 RTCSLOW interrupt
- fixes the issue found in https://github.com/espressif/esp-idf/issues/15359
- extends debug printouts in the related tests
2025-02-21 16:29:04 +08:00
Zhang Hai Peng
18973c0c61 fix(ble/bluedroid): Fix adv data and scan rsp data not reported together in BLE active scan
(cherry picked from commit 7f2cedc048)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-02-21 16:13:46 +08:00
cjin
bb232d627d change(ble): update esp32c6 lib to 7ead2d29 2025-02-21 12:24:09 +08:00
cjin
d6410d2aad change(ble): update esp32h2 lib to 7ead2d29 2025-02-21 12:24:09 +08:00
zwl
8ef5a044d2 feat(ble): implement ble capture info user handler on ESP32-C6 and ESP32-H2 2025-02-21 12:24:09 +08:00
Shen Weilong
838dd8e567 change(ble): Supported cuttable architecture for ble 2025-02-21 12:24:09 +08:00
Zhou Xiao
6c54ce599f feat(ble): add printf and write with timestamp interface for ble log spi out
(cherry picked from commit f8efa4cd80)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-21 11:53:54 +08:00
linruihao
5d8955ebac feat(bt/bluedroid): Add Kconfig option to keep device bonding info when HID unplugging 2025-02-21 11:53:08 +08:00
Jiang Jiang Jian
fed7e38609 Merge branch 'fix/esp32p4_lightsleep_fixes_v5.3' into 'release/v5.3'
fix(esp_hw_support): some fixes of esp32p4 lightsleep retention & power switch process (v5.3)

See merge request espressif/esp-idf!37097
2025-02-21 11:03:20 +08:00
Jiang Jiang Jian
c327f4c4a7 Merge branch 'fix/fix_s2_s3_rtc_iomux_clock_management_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix esp32s2/esp32s3 RTC IOMUX clock management (v5.3)

See merge request espressif/esp-idf!37166
2025-02-21 11:02:40 +08:00
morris
061faa21c2 Merge branch 'bugfix/fix_cache_count_flash_pages_patchs_return_wrong_value_v5.3' into 'release/v5.3'
fix(rom): Fix s2 and s3 Cache_Count_Flash_Pages rom function wrapper (v5.3)

See merge request espressif/esp-idf!37156
2025-02-21 10:17:09 +08:00
wuzhenghui
1f6d8d4e5d fix(esp_hw_support): fix esp32s2/esp32s3 RTC IOMUX clock management 2025-02-20 19:39:02 +08:00
Tomasz Kramkowski
664b7821f7 fix(rom): Fix s2 and s3 Cache_Count_Flash_Pages rom function wrapper
The rom function on the s2 and s3 only counts one page for any pages
which are mapped to page 0 of flash as the Cache_Flash_To_SPIRAM_Copy
function attempts to map all flash page 0 mapped pages to one PSRAM
page.

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

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

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

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

This patch addresses the issue in this wrapper function by correctly
compensating for the bug only in cases where the final page0_mapped
value is 0.
2025-02-20 16:06:02 +08:00
Omar Chebib
24fd631d97 fix(freertos): fix a bug in prvTaskDeleteWithCaps related to coprocessors
When a coprocessor is used, the stack pointer is altered. It must be restored
before freeing the memory allocated to the task.
2025-02-20 15:40:01 +08:00
Song Ruo Jing
5ed33be402 fix(pmu): enable all func clock icg during retention
This should only increase a tiny amount of the power consumption in the retention process,
but save debug time since some module register read/write relies not only APB but also func clock.
2025-02-20 15:04:13 +08:00
Island
9eeff2e97e Merge branch 'feat/improve_bt_log_spi_output_interface_v5.3' into 'release/v5.3'
Feat/improve bt log spi output interface (v5.3)

See merge request espressif/esp-idf!37136
2025-02-20 14:48:02 +08:00
Island
d76e076fc3 Merge branch 'change/ble_update_lib_20250212_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250212 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!37043
2025-02-20 14:47:57 +08:00
morris
cac01ada13 Merge branch 'fix/build_when_rom_patch_disable_v5.3' into 'release/v5.3'
fix(spi_flash): Fix build fail when rom_patch config disabled (backport v5.3)

See merge request espressif/esp-idf!37104
2025-02-20 13:54:38 +08:00
Marius Vikhammer
1812f701ba docs(examples): fixed broken link in uart example readme 2025-02-20 12:49:32 +08:00
morris
4d88d8ec08 Merge branch 'fix/i2c_scl_freq_s2_v5.3' into 'release/v5.3'
fix(i2c): Fix scl frequency is wrong on esp32s2 in legacy i2c driver (backport v5.4)

See merge request espressif/esp-idf!37114
2025-02-20 11:51:30 +08:00
Jiang Jiang Jian
ec02fb249e Merge branch 'feat/wait_pll_stable_after_sleep_wakeup_fix_xtal_v5.3' into 'release/v5.3'
feat(esp_hw_support): wait pll stable after sleep wakeup (v5.3)

See merge request espressif/esp-idf!36019
2025-02-20 11:22:18 +08:00
morris
03a2fca29d Merge branch 'feature/flash_software_resume_v5.3' into 'release/v5.3'
feat(spi_flash): Add config for adding auto check status after suspend to improve performance (backport v5.3)

See merge request espressif/esp-idf!36526
2025-02-20 11:01:11 +08:00
morris
7354091eb2 Merge branch 'bugfix/fix_i2s_std_initializer_order_for_cpp_compiler_v5.3' into 'release/v5.3'
fix(i2s): fixed i2s_std initializer order for cpp compiler (v5.3)

See merge request espressif/esp-idf!37048
2025-02-20 11:00:21 +08:00
morris
c1b32c87de Merge branch 'fix/esp_mmu_vaddr_to_paddr_cannot_figure_psram_p4_v5.3' into 'release/v5.3'
mmu: vaddr to paddr cannot figure psram vaddr on esp32p4 (v5.3)

See merge request espressif/esp-idf!37050
2025-02-20 10:59:35 +08:00
morris
a698b26012 Merge branch 'bugfix/dma_alignment_for_encryption_memory_v5.3' into 'release/v5.3'
fix(gdma): relax alignment constraint for internal memory (v5.3)

See merge request espressif/esp-idf!37094
2025-02-20 10:12:13 +08:00
Mahavir Jain
e97c51ea24 feat(ecc): enable ECC constant time mode for ESP32-H2 ECO5 2025-02-19 19:15:17 +05:30
wuzhenghui
7147d7b366 change(esp_hw_support): wrapper sleep dcdc/ldo ops with ll 2025-02-19 21:37:38 +08:00
wuzhenghui
367fda4447 feat(esp_hw_support): add branch prediction config retention 2025-02-19 21:37:16 +08:00
wuzhenghui
2445545a17 fix(esp_hw_support): fix DCDC switch bad software powerdown 2025-02-19 21:36:40 +08:00
wuzhenghui
08e7ef62da change(esp_hw_support): define Cache invalidate in sleep process to avoid dirtying the L1 Cache 2025-02-19 21:36:13 +08:00
wuzhenghui
022def4ac5 feat(esp_hw_support): do mstatus restore on each core 2025-02-19 21:34:36 +08:00
wuzhenghui
f52b2275d9 feat(esp_hw_support): do esp32p4 l1 cache invalidate by regdma 2025-02-19 21:33:08 +08:00
wuzhenghui
ca9cca73ff feat(esp_hw_support): do esp32p4 l1&l2 cache regs retention by regdma 2025-02-19 21:32:15 +08:00
Zhou Xiao
c3c849b263 feat(ble): support ble log spi out for ESP32-C3 and ESP32-S3
(cherry picked from commit e41f619566)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:54:16 +08:00
Zhou Xiao
03073ad5a5 feat(ble): support ble log spi out for ESP32
(cherry picked from commit e2fbec5d2e)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:54:14 +08:00
Zhou Xiao
ce6741163a change(ble): update ble log spi out config for ESP32-H2
(cherry picked from commit 608ecf63e2)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:54:11 +08:00
Zhou Xiao
7e22702043 change(ble): update ble log spi out config for ESP32-C6
(cherry picked from commit e61089e7e0)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:54:08 +08:00
Zhou Xiao
d01f32df2d change(ble): update ble log spi out config for ESP32-C2
(cherry picked from commit e4b698fc32)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:54:05 +08:00
Zhou Xiao
e8daf00ea5 feat(ble): improved ble log spi output interface to support multisource log
(cherry picked from commit 2221133ba8)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-19 20:54:02 +08:00
C.S.M
c96f29f856 fix(i2c): Fix scl frequency is wrong on esp32s2 in legacy i2c driver,
Closes https://github.com/espressif/esp-idf/issues/15301,
Closes https://github.com/espressif/esp-idf/issues/14603
2025-02-19 17:45:44 +08:00
C.S.M
1800d14dc1 refactor(spi_flash): remove redundent flash suspend check 2025-02-19 16:55:27 +08:00
C.S.M
d96f71c5cc fix(spi_flash): Fix build fail when rom_patch config disabled,
Closes https://github.com/espressif/esp-idf/issues/15229
2025-02-19 16:54:37 +08:00
Island
d4bb0e2aa3 Merge branch 'feat/support_ble_debug_with_gpio_v5.3' into 'release/v5.3'
Support change HID task size by Kconfig in HID example (v5.3)

See merge request espressif/esp-idf!36998
2025-02-19 16:37:56 +08:00
morris
6a1cf6bb85 fix(gdma): relax alignment constraint for internal memory
external memory encryption should not affect internal memory alignment

Closes https://github.com/espressif/esp-idf/issues/15228
2025-02-19 15:16:19 +08:00
Armando
f8e84969f9 test(psram): added mem leak thresh for xip test, previous is 600 is close to the actual leak 2025-02-19 14:07:47 +08:00
Armando
04708898a2 test(flash_mmap): added psram enabled test for esp32p4 as mmu is per target 2025-02-19 14:07:47 +08:00
Armando
817961a8a2 test(mmu): added test for checking esp_mmu_vaddr_to_paddr with psram vaddrs 2025-02-19 14:07:47 +08:00
Armando
e1ea5ee810 fix(mmu): fixed esp_mmu_vaddr_to_paddr cannot figure out psram vaddr issue on esp32p4 2025-02-19 14:07:47 +08:00
Jiang Jiang Jian
1698a58881 Merge branch 'fix/add_sleep_duration_check_for_timer_wakeup_v5.3' into 'release/v5.3'
fix(esp_hw_support): add timer wakeup sleep duration check (v5.3)

See merge request espressif/esp-idf!37011
2025-02-19 14:02:53 +08:00
Jiang Jiang Jian
edd28f9cf1 Merge branch 'bugfix/watchdog_timer_ap_sta_esp32c5_v5.3' into 'release/v5.3'
fix(wifi): Prevent overwriting of scan parameters in consecutive scans (Backport v5.3)

See merge request espressif/esp-idf!34073
2025-02-19 13:46:39 +08:00
Shu Chen
9b00dff1b9 Merge branch 'support/ieee802154_get_rssi_comp_from_phy_v5.3' into 'release/v5.3'
feat(802.15.4): support ieee802154 get rssi comp from phylib (v5.3)

See merge request espressif/esp-idf!37052
2025-02-19 11:03:40 +08:00
morris
85cf4c262b Merge branch 'fix/adc_func_register_not_reset_issue_v5.3' into 'release/v5.3'
adc: func register not reset issue (v5.3)

See merge request espressif/esp-idf!37046
2025-02-19 10:33:33 +08:00
Island
f258a14894 Merge branch 'bugfix/h2_ble_timer_clk_enable_fix_v5.3' into 'release/v5.3'
fix: H2 ble timer clk enable issue. (v5.3)

See merge request espressif/esp-idf!36544
2025-02-18 15:45:38 +08:00
laokaiyao
a137775d11 fix(i2s): fixed i2s_std initializer order for cpp compiler
Closes https://github.com/espressif/esp-idf/issues/15405
2025-02-18 15:06:51 +08:00
Marius Vikhammer
fa4706e4cb Merge branch 'fix/usb-cdc-non-blocking-read_v5.3' into 'release/v5.3'
fix(esp_vfs_console): USB CDC read when non blocking (backport v5.3)

See merge request espressif/esp-idf!36749
2025-02-18 12:17:26 +08:00
zwx
c1adbead0c feat(802.15.4): use btbb function to get rssi comp for h2 2025-02-18 12:10:24 +08:00
zwl
192ba32e6d feat(ble): add channel assessment and enhanced connect function on ESP32-C6 2025-02-18 10:48:58 +08:00
Armando
aad78c3022 fix(adc): fixed adc function register not reset issue 2025-02-18 10:35:59 +08:00
Zhou Xiao
8ca2a45a16 feat(ble): support enhanced controller log capabilities on ESP32-C2
(cherry picked from commit bbcb4a2e1f)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-02-18 10:23:26 +08:00
Zhou Xiao
add7feb191 feat(ble): support enhanced controller log capabilities on ESP32-C6 and ESP32-H2
(cherry picked from commit f598976c6b)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-02-18 10:23:23 +08:00
Zhou Xiao
02b0d6495e feat(ble): add channel assessment and enhanced connect function on ESP32-H2
(cherry picked from commit 0ffac92586)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-02-18 10:23:21 +08:00
Zhou Xiao
532570f5e8 change(ble): [AUTO_MR] Update lib_esp32c6 to 1d7eebaf
(cherry picked from commit 4579e083ef)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-18 10:23:17 +08:00
Zhou Xiao
74263fffa8 change(ble): [AUTO_MR] Update lib_esp32h2 to 1d7eebaf
(cherry picked from commit 4f0e0f371a)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-18 10:23:14 +08:00
wuzhenghui
cbd3df38d9 fix(esp_hw_support): fix lp/hp clock wait time calculation 2025-02-17 21:49:26 +08:00
Roland Dobai
dc36761eed Merge branch 'fix/ldgen_interm_no_secs_v5.3' into 'release/v5.3'
fix(ldgen): don't emit intermediate placements without sections (v5.3)

See merge request espressif/esp-idf!36968
2025-02-17 19:41:20 +08:00
wuzhenghui
812a609eca change(esp_hw_support): wait pll calibration done in regdma link instead of wait fixed value 2025-02-17 19:13:17 +08:00
wuzhenghui
0e2335f6f9 fix(esp_hw_support): add timer wakeup sleep duration check
Closes https://github.com/espressif/esp-idf/issues/15255
2025-02-17 19:09:44 +08:00
Jiang Jiang Jian
752c5e6b1e Merge branch 'bugfix/fix_delete_queue_error_in_espnow_example_v5.3' into 'release/v5.3'
fix(wifi): fix the delete queue error in espnow exapmle (v5.3)

See merge request espressif/esp-idf!37015
2025-02-17 16:19:38 +08:00
Nachiket Kukade
35d0114354 fix(wifi): Prevent overwriting of scan parameters in consecutive scans 2025-02-17 13:08:25 +05:30
Frantisek Hrbata
a60c3c4f29 fix(ldgen): don't emit intermediate placements without sections
When a symbol needs to be placed to a different target than the one
designated for the object file, the object file is expanded, which
includes the following steps:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The map file for such mapping now contains following input sections

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

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

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-02-17 15:33:19 +08:00
zhangyanjiao
9b5d325650 fix(wifi): fix the delete queue error in espnow exapmle
Closes https://github.com/espressif/esp-idf/issues/15383
2025-02-17 14:56:16 +08:00
Zhang Hai Peng
d30c46cf98 feat(ble/bluedroid): Support change HID task size by Kconfig in HID example
(cherry picked from commit d4b3a7e99d)

Co-authored-by: Mitch Cairns <mitch.cairns@handheldlegend.com>
2025-02-17 11:15:21 +08:00
Zhang Hai Peng
61893e9fe5 docs(ble/bluedroid): Optimize doc for implementation of a characteristic with 128 bit UUID
(cherry picked from commit fa40d971a5)

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

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

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

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

Co-authored-by: Nebojsa Cvetkovic <nebkat@gmail.com>
2025-02-17 11:15:08 +08:00
Zhang Hai Peng
04a238f88a fix(ble): Update bt lib for ESP32(2a2631f)
- Support ESP32 BLE GPIO DEBUG


(cherry picked from commit 0a7888f839)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-02-17 11:13:49 +08:00
Island
c09aadf60c Merge branch 'feat/add_spi_output_v5.3' into 'release/v5.3'
Feat/add spi output (v5.3)

See merge request espressif/esp-idf!36955
2025-02-17 11:04:33 +08:00
Rahul Tank
92cf6566aa Merge branch 'bugfix/handle_slave_extra_disconn_v5.3' into 'release/v5.3'
fix(nimble): Handle not sending disconnect event if connect was not sent (v5.3)

See merge request espressif/esp-idf!36921
2025-02-15 22:42:50 +08:00
Rahul Tank
de76f43e11 fix(nimble): Handle not sending disconnect event if connect was not sent 2025-02-15 09:24:20 +05:30
Rahul Tank
4dd97f4847 Merge branch 'feat/long_read_offset_v5.3' into 'release/v5.3'
feat(nimble): Add offset in GATT server long read context (v5.3)

See merge request espressif/esp-idf!36977
2025-02-15 11:26:58 +08:00
Martin Vychodil
b11b31016f Merge branch 'bugfix/storage_generic_pytests_v5.3' into 'release/v5.3'
fix(ci): Removed storage related entries in known generate test child pipeline warnings (v5.3)

See merge request espressif/esp-idf!36685
2025-02-15 00:07:25 +08:00
Fu Hanxi
11142cffb3 ci: set app_list to empty list when not None 2025-02-14 14:04:18 +01:00
Jiang Jiang Jian
68556198ff Merge branch 'bugfix/stack_corruption_btm_task' into 'release/v5.3'
fix(esp_wifi): Fix stack curruption in btm task (v5.3)

See merge request espressif/esp-idf!36970
2025-02-14 19:02:01 +08:00
Aditya Patwardhan
f62b178a65 Merge branch 'refactor/security_docs_re-org_v5.3' into 'release/v5.3'
refactor(docs): re-organize security docs for better navigation (v5.3)

See merge request espressif/esp-idf!36961
2025-02-14 16:32:42 +08:00
Kapil Gupta
746abfa199 fix(esp_wifi): Fix stack curruption in btm task (v5.3) 2025-02-14 12:53:59 +05:30
Jiang Jiang Jian
2ff653bc56 Merge branch 'bugfix/skip_memory_reordering_wpa2_semaphr_v5.3' into 'release/v5.3'
fix(esp_wifi): fixed stack corruption in WiFi tasks (v5.3)

See merge request espressif/esp-idf!36937
2025-02-14 14:31:29 +08:00
Mahavir Jain
570b01fd9b refactor(docs): re-organize security docs for better navigation 2025-02-14 11:48:24 +05:30
Abhinav Kudnar
4bba68caeb feat(nimble): Add offset in GATT server long read context 2025-02-14 11:22:28 +05:30
Rahul Tank
a106371679 Merge branch 'fix/blesync_periodic_adv_v5.3' into 'release/v5.3'
fix(nimble): Added sync reattempt for periodic adv (v5.3)

See merge request espressif/esp-idf!36788
2025-02-14 13:45:40 +08:00
Jiang Jiang Jian
b96b91c6a5 Merge branch 'feat/sleep_retention_expand_module_bitmap_v5.3' into 'release/v5.3'
backport v5.3: expand the number of sleep retention modules supported on different chips

See merge request espressif/esp-idf!35491
2025-02-14 13:29:03 +08:00
Zhou Xiao
96e01bf510 feat(ble): support esp ble controller spi output interface for ESP32-H2
(cherry picked from commit 9c98c7e040)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-14 11:54:05 +08:00
Zhou Xiao
8f2c1c02ce feat(ble): support esp ble controller spi output interface for ESP32-C6
(cherry picked from commit 58b8775f95)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-14 11:54:02 +08:00
Zhou Xiao
d6fb7d4c0b feat(ble): support esp ble controller spi output interface for ESP32-C2
(cherry picked from commit 0b57f8ae87)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-14 11:53:59 +08:00
Zhou Xiao
c8456b78d3 feat(ble): add spi output interface for esp ble controller log
(cherry picked from commit 52106c9895)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-02-14 11:53:56 +08:00
radek.tandler
b4af220c1e fix(storage/nvs): Fixed failing test cases in example folder 2025-02-13 20:40:06 +01:00
radek.tandler
f78620853b fix(storage/vfs): Fixed failing test cases in test_apps 2025-02-13 20:40:06 +01:00
radek.tandler
0f5073ea2c fix(ci): Removed storage related ignore warnings 2025-02-13 20:40:05 +01:00
Astha Verma
68420c726e fix(nimble): Added sync reattempt for periodic adv 2025-02-13 18:26:58 +05:30
Jiang Jiang Jian
8835b4d2e6 Merge branch 'bugfix/mem_leak_sae_pk_v5.3' into 'release/v5.3'
fix(wifi): Bugfix memory leak due to sae public key (v5.3)

See merge request espressif/esp-idf!36926
2025-02-13 20:36:19 +08:00
Bogdan Kolendovskyy
f2e4f97853 fix(ethernet_basic): Fix second Ethernet device not receiving IP address 2025-02-13 12:52:05 +01:00
Rahul Tank
b80c387c9f Merge branch 'fix/core_err_code_def_v5.3' into 'release/v5.3'
fix(nimble): Enhanced error handling by adding to print core error definitions (v5.3)

See merge request espressif/esp-idf!36655
2025-02-13 19:45:04 +08:00
Mahavir Jain
562ca9f2e0 Merge branch 'bugfix/http_client_select_read_error_v5.3' into 'release/v5.3'
fix(tcp_tranport): Fix handling of select() return value (v5.3)

See merge request espressif/esp-idf!36918
2025-02-13 19:19:22 +08:00
Kapil Gupta
135a320b3c fix(esp_wifi): Fix stack corruption in wpa3 task 2025-02-13 14:23:35 +05:30
Kapil Gupta
70ad8d04ed fix(esp_wifi): fixed Stack corruption in DPP task 2025-02-13 14:23:35 +05:30
Kapil Gupta
d6dec98447 fix(esp_wifi): fixed Stack corruption in WPS processing 2025-02-13 14:23:35 +05:30
Kapil Gupta
565b8914ae fix(esp_wifi): Fixed memory corruption in wifi enterprise
Closes https://github.com/espressif/esp-idf/issues/15370
2025-02-13 14:23:35 +05:30
Li Shuai
88c1c9c344 change(esp_hw_support): fix some sleep retention build error 2025-02-13 16:33:30 +08:00
Li Shuai
af5a9c87cd change(soc): define sleep retention module total number to 64 for esp32p4 2025-02-13 16:33:30 +08:00
Li Shuai
62633bcdae change(esp_hw_support): update power domain pd allowed check logic 2025-02-13 16:33:28 +08:00
Shu Chen
377c208320 Merge branch 'feat/add_ot_br_lib_check_case_v5.3' into 'release/v5.3'
feat(openthread): add br library check case (v5.3)

See merge request espressif/esp-idf!36886
2025-02-13 15:49:31 +08:00
Li Shuai
44001a9d70 change(esp_hw_support): update some modules sleep retention init dependency bitmap 2025-02-13 15:35:19 +08:00
Li Shuai
61b7a971d3 change(soc): add sleep retention module total number definition 2025-02-13 15:17:55 +08:00
Shreyas Sheth
467524f067 fix(wifi): Fixed memory leak occurring in SAE PK connection 2025-02-13 12:03:16 +05:30
morris
a916a250ea Merge branch 'bugfix/lcd_driver_with_flash_encryption_v5.3' into 'release/v5.3'
fix(dma): also consider buffer alignment when calculating the DMA nodes (v5.3)

See merge request espressif/esp-idf!36818
2025-02-13 14:16:07 +08:00
Li Shuai
c60d991c28 feat(esp_hw_support): extend sleep retention module bitmap bit width 2025-02-13 11:28:25 +08:00
Astha Verma
e142d1c760 fix(nimble): Enhanced error handling by adding to print core error definitions 2025-02-13 08:56:33 +05:30
Rahul Tank
75dbaca030 Merge branch 'fix/NVS_corruption_v5.3' into 'release/v5.3'
fix(nimble): Handle NVS corruption caused by non removal of security records (v5.3)

See merge request espressif/esp-idf!36895
2025-02-13 11:19:41 +08:00
nilesh.kale
9ec7e06ddf fix(tcp_tranport): Fix handling of select() return value
When both readset/writeset and errset are set for a single socket,
the HTTP client incorrectly handled the condition, causing premature termination.
Added a check to ensure readset/writeset is prioritized before errset.

Closes https://github.com/espressif/esp-idf/issues/14673
2025-02-12 20:23:35 +05:30
Alexey Gerenkov
6fc456715f Merge branch 'fix/__atomic_test_and_set' into 'release/v5.3'
fix(newlib): fix __atomic_test_and_set to ensure atomicity

See merge request espressif/esp-idf!36707
2025-02-12 21:52:48 +08:00
Alexey Gerenkov
f46d4f6c1c Merge branch 'fix/coredump_note_section_alignment_v5.3' into 'release/v5.3'
Fix/coredump note section headers and alignments (v5.3)

See merge request espressif/esp-idf!36881
2025-02-12 21:33:06 +08:00
Jiang Jiang Jian
ca8638aaad Merge branch 'fix/heap-allocate-in-rtc-iram_v5.3' into 'release/v5.3'
fix(heap): MALLOC_CAP_EXEC does not allocate in RTC IRAM (backport v5.3)

See merge request espressif/esp-idf!35622
2025-02-12 16:17:20 +08:00
Jiang Jiang Jian
a46ac40ca8 Merge branch 'bugfix/wps_scan_freq_v5.3' into 'release/v5.3'
fix(esp_wifi): Reduce scan frequency in WPS (v5.3)

See merge request espressif/esp-idf!36820
2025-02-12 16:15:57 +08:00
Jiang Jiang Jian
a7ce0206bd Merge branch 'bugfix/analyzer_issues_supplicant_v5.3' into 'release/v5.3'
fix(esp_wifi): fix some analyzer issues (v5.3)

See merge request espressif/esp-idf!36826
2025-02-12 13:57:44 +08:00
Astha Verma
f1ecb0a72f fix(nimble): fix NVS corruption 2025-02-12 10:51:51 +05:30
Rahul Tank
cb0501e313 Merge branch 'bugfix/fix_warn_write_string_v5.3' into 'release/v5.3'
fix(nimble): Fixed warnings with COMPILTER_WARN_WRITE_STRINGS set (v5.3)

See merge request espressif/esp-idf!36700
2025-02-12 12:57:43 +08:00
Mahavir Jain
5f7897837e Merge branch 'bugfix/fix_blufi_crash_opt_v5.3' into 'release/v5.3'
fix(blufi): Enhance security in BLUFI example (v5.3)

See merge request espressif/esp-idf!36860
2025-02-12 12:32:01 +08:00
Jiang Jiang Jian
830b5c57e2 Merge branch 'fix/stack_overuse_by_failure_retry_cnt_v5.3' into 'release/v5.3'
fix(wifi): Fix stack overflow when failure_retry_cnt is set and add WIFI_EVENT_AP_WRONG_PASSWORD feature (Backport v5.3)

See merge request espressif/esp-idf!36846
2025-02-12 11:13:29 +08:00
morris
30d1ae3088 Merge branch 'feat/mmu_find_paddr_caps_by_any_offset_v5.3' into 'release/v5.3'
mmu: supported find paddr caps by any paddr offset (v5.3)

See merge request espressif/esp-idf!36838
2025-02-12 10:30:42 +08:00
yiwenxiu
f5cbe394c0 feat(openthread): add br library check case 2025-02-12 09:33:54 +08:00
Wang Meng Yang
ab25b7eb6c Merge branch 'bugfix/add_bluedroid_init_migration_v5.3' into 'release/v5.3'
docs(bt/bluedroid): Added migration guide for bluedroid init API[backport v5.3]

See merge request espressif/esp-idf!36876
2025-02-12 09:21:55 +08:00
Erhan Kurubas
e2818f6ff4 fix(coredump): disable uart txd pullup using gpio hal 2025-02-11 16:53:37 +01:00
Erhan Kurubas
ca9d3c487d fix(coredump): fix note section alignments 2025-02-11 16:53:37 +01:00
Erhan Kurubas
43d4c319c7 fix(coredump): only clear high bit in PC when set 2025-02-11 16:53:37 +01:00
liqigan
3f4cd77c50 docs(bt/bluedroid): Added migration guide for bluedroid init API
Closes https://github.com/espressif/esp-idf/issues/15352
2025-02-11 19:39:08 +08:00
Wang Meng Yang
6fd6c4d475 Merge branch 'feat/add_vsc_to_support_test_v5.3' into 'release/v5.3'
feat(bt): add vendor hci command and event to support test (v5.3)

See merge request espressif/esp-idf!36570
2025-02-11 17:54:49 +08:00
Armando
9d724fdebe test(mmu): test can find paddr caps by any paddr offset 2025-02-11 15:56:08 +08:00
Armando
36900880d8 feat(mmu): supported find paddr caps by any paddr offset
Closes https://github.com/espressif/esp-idf/issues/14988
2025-02-11 15:56:08 +08:00
Zhang Hai Peng
f40aa9c587 fix(blufi): Enhance security in BLUFI example
(cherry picked from commit 3fc6c93936)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-02-11 15:13:42 +08:00
Sarvesh Bodakhe
dac80a87a4 fix(wifi): Add some wifi bugfixes and features
1. Fix issue of increased stack usage when failure_retry_cnt is set
   and wifi driver internally retries connection attempts

2. Add WIFI_EVENT_AP_WRONG_PASSWORD in SoftAP.
   This event is triggered when external station tries connecting to softAP
   with wrong password.

   Current supported softAP AUTH modes: WPA-PSK, WPA2-PSK and WPA3-PSK (SAE-auth)
2025-02-11 12:14:10 +05:30
Jiang Jiang Jian
344d3c220a Merge branch 'revert/use_wpa3_ent_authmode_naming_v5.3' into 'release/v5.3'
revert(wifi): Revert support for WPA3 Enterprise authentication modes (Backport v5.3)

See merge request espressif/esp-idf!36808
2025-02-11 13:56:36 +08:00
Shu Chen
b544acb95a Merge branch 'feature/support_hw_reset_when_handling_rcp_failure_v5.3' into 'release/v5.3'
feat(openthread): support hardware reset RCP while processing RCP failure (v5.3)

See merge request espressif/esp-idf!36554
2025-02-11 11:30:20 +08:00
Sarvesh Bodakhe
d90f31c29e revert(wifi): Revert support for WPA3 Enterprise authentication modes
This reverts commit ca4d97bb22.
2025-02-11 10:52:53 +08:00
Rahul Tank
f7e86fa548 fix(nimble): Fixed warnings with COMPILTER_WARN_WRITE_STRINGS set 2025-02-10 21:51:37 +05:30
Rahul Tank
36cf635137 Merge branch 'fix/spp_server_readme_change_v5.3' into 'release/v5.3'
docs: Updated README.md by removing unclear lines (v5.3)

See merge request espressif/esp-idf!36743
2025-02-10 23:59:51 +08:00
Rahul Tank
ed91973947 Merge branch 'fix/wifi_provisioning_ble_v5.3' into 'release/v5.3'
fix(nimble): Handle nested locks when BT_NIMBLE_DEBUG enabled (v5.3)

See merge request espressif/esp-idf!36498
2025-02-10 23:58:37 +08:00
Jiang Jiang Jian
14a1fa8b41 Merge branch 'bugfix/wpa3_enterprise_mode_detection_v5.3' into 'release/v5.3'
fix(wifi): Fix bug in authmode detection for wpa2/wpa3 enterprise (Backport v5.3)

See merge request espressif/esp-idf!36248
2025-02-10 21:45:05 +08:00
Sarvesh Bodakhe
141030941c fix(wifi): Fix bug in authmode detection for wpa2/wpa3 enterprise
WPA3-Enterprise mandates the use of AKM suite selector
00:0F:AC:5 (IEEE80211 802.1X with SHA-256)
2025-02-10 20:29:36 +08:00
Kapil Gupta
4442fe7787 fix(esp_wifi): Add review comments and some cleanup 2025-02-10 15:46:50 +05:30
Kapil Gupta
0b4bfb451f fix(esp_wifi): fix some analyzer issues
Closes https://github.com/espressif/esp-idf/issues/15097
Closes https://github.com/espressif/esp-idf/issues/15098
Closes https://github.com/espressif/esp-idf/issues/15099
2025-02-10 15:46:50 +05:30
Kapil Gupta
074235e261 fix(esp_wifi): Reduce scan frequency in WPS 2025-02-10 15:31:46 +05:30
morris
1536b00d75 fix(dma): also consider buffer alignment when calculating the DMA nodes
Closes https://github.com/espressif/esp-idf/issues/15228
2025-02-10 17:12:22 +08:00
Jiang Jiang Jian
489d7a2b3a Merge branch 'change/default_value_for_esp_coex_vsc_in_bluedroid_v5.3' into 'release/v5.3'
change(bt): Set default value for BT_BLUEDROID_ESP_COEX_VSC conditionally (v5.3)

See merge request espressif/esp-idf!36735
2025-02-10 16:43:54 +08:00
Jiang Jiang Jian
05e3e2cfa1 Merge branch 'feat/increase_c2_supported_ver_v5.3' into 'release/v5.3'
feat(soc): increase c2 max supported version (v5.3)

See merge request espressif/esp-idf!35971
2025-02-10 16:39:59 +08:00
Jiang Jiang Jian
c5eb636e4d Merge branch 'docs/usb_host_ext_port_driver_backport_v5.3' into 'release/v5.3'
docs(ext_port): Maintainers Notes for the External Port Driver (backport v5.3)

See merge request espressif/esp-idf!35101
2025-02-10 16:37:33 +08:00
Cristian Funes
cc89f7266d fix(log): Modified linker script to move functions from flash to iram 2025-02-10 09:32:24 +01:00
zhanghaipeng
dda01d886f fix(ble): Update bt lib for ESP32(194dd63)
- Fix the issue where disconnection events were not reported as a slave.
- Enhance Access Address validation in compatibility mode.
2025-02-10 15:50:20 +08:00
gongyantao
96293d4575 feat(bt): add vendor hci command and event to support test
- add afh related vendor hci command and event
- add vendor event mask command
2025-02-10 15:50:11 +08:00
linruihao
1ca8daee7a feat(bt): add coexist scheme status support for bt page 2025-02-10 15:50:01 +08:00
Marius Vikhammer
780dc81e96 Merge branch 'fix/esp-event-profiling_v5.3' into 'release/v5.3'
fix(esp_event): Fix event loop profiling in handler_execute function (backport v5.3)

See merge request espressif/esp-idf!36690
2025-02-10 14:47:04 +08:00
Guillaume Souchere
693058a728 fix(esp_hw_support): Unused variables in memory_utils functions 2025-02-10 07:16:08 +01:00
Guillaume Souchere
bee3d8ff86 fix(heap): MALLOC_CAP_EXEC does not allocate in RTC IRAM
This commit fixes the issue when trying to allocate memory
with the MALLOC_CAP_EXEC in RTC memory. Prior to the fix,
the heap allocator was returning an address in RTC DRAM.

To fix this issue:
- modified memory_layout.c of the concerned targets to fill the iram_address
field in the rtc entry of the soc_memory_region array properly.
- modified heap component  related functions to return IRAM address when
an allocation in RTC memory with MALLOC_CAP_EXEC is requested.

Closes https://github.com/espressif/esp-idf/issues/14835
2025-02-10 07:16:07 +01:00
morris
33cc36595d Merge branch 'feat/async_memcpy_any_alignment_v5.3' into 'release/v5.3'
async memcpy destination address doesn't have to be cache aligned (v5.3)

See merge request espressif/esp-idf!36634
2025-02-10 13:32:22 +08:00
morris
57061d6336 Merge branch 'feature/malloc_cap_simd_flag_v5.3' into 'release/v5.3'
feat(heap): add a MALLOC_CAP_SIMD flag (v5.3)

See merge request espressif/esp-idf!36650
2025-02-09 10:45:43 +08:00
Song Ruo Jing
6975924104 feat(heap): add a MALLOC_CAP_SIMD flag
MALLOC_CAP_SIMD can be used to allocate memory to be used for SIMD instructions
2025-02-08 16:29:36 +08:00
Shu Chen
b46c03040f Merge branch 'feat/add_callback_for_esp_ot_radio_spinel_init_v5.3' into 'release/v5.3'
feat(openthread): add an API to set rcp version string (v5.3)

See merge request espressif/esp-idf!36744
2025-02-08 16:26:04 +08:00
morris
74615ed1a7 feat(async_memcpy): support rx buffer unaligned to cache line size 2025-02-08 15:48:11 +08:00
morris
1840d3663a refactor(dma): split rx buffer to cache aligned ones 2025-02-08 15:48:11 +08:00
morris
6cf2f3a8e2 Merge branch 'fix/usb_non_periodic_backport_v5.3' into 'release/v5.3'
fix(usb/host): Set SCHED_INFO for all channels (backport v5.3)

See merge request espressif/esp-idf!36771
2025-02-08 10:07:53 +08:00
Jiang Jiang Jian
1b33c442de Merge branch 'bugfix/remove_unused_sco_state_v5.3' into 'release/v5.3'
Bugfix/remove unused sco state (v5.3)

See merge request espressif/esp-idf!36730
2025-02-07 20:02:32 +08:00
Jiang Jiang Jian
354c0f5b8e Merge branch 'bugfix/sync_buf_crash_v5.3' into 'release/v5.3'
fix(bt/controller): fixed missing critical protections on linked-list structure of (e)SCO buffers (v5.3)

See merge request espressif/esp-idf!36341
2025-02-07 15:43:12 +08:00
Geng Yuchao
d418167af1 fix(esp32h2): H2 ble timer clk enable issue 2025-02-07 11:46:27 +08:00
Wang Mengyang
c7c0def473 change(bt): Set default value for BT_BLUEDROID_ESP_COEX_VSC conditionally
- Set default value of BT_BLUEDROID_ESP_COEX_VSC to n if software coexistence is not required,
in host-controller combined Bluetooth stack configuration.
2025-02-07 10:47:59 +08:00
Guillaume Souchere
7d4d24d198 fix(esp_vfs_console): USB CDC read when non blocking
In non blocking mode, the read function is expected
to return weather data is available for reading or not.

In case data are available but the size does not match
the expected size, the function read should return whatever
data is available.

Previously, the function was returning -1 with errno set
to EWOULDBLOCK even if the size of data in the buffer was
less than the requested size. It would only return the
available data if the size in the buffer was greater or equal
to the requested size.

The implementation of cdcacm_read is modified to return the avilable
data from the buffer even is the size is lesser than the requested
size.
2025-02-06 08:58:44 +01:00
Tomas Rezucha
56620eb23b fix(usb/host): Set SCHED_INFO for all channels
Although the hardware documentation suggests that SCHED_INFO is only used
for periodic channels, empirical evidence shows that omitting this configuration
on non-periodic channels can cause them to freeze.
Therefore, we set this field for all channels to ensure reliable operation.
2025-02-06 08:18:04 +01:00
Astha Verma
25b965deba fix(nimble): Handle nested locks when BT_NIMBLE_DEBUG enabled 2025-02-05 14:49:57 +05:30
Astha Verma
c4a5d869eb Updated README.md by removing unclear lines 2025-02-05 14:17:22 +05:30
morris
4d5a7c9864 Merge branch 'fix/move_spi_lcd_cb_fun_to_iram_v5.3' into 'release/v5.3'
feat(spi_lcd): move callback function to iram (v5.3)

See merge request espressif/esp-idf!36740
2025-02-05 14:56:11 +08:00
Xu Si Yu
6fb839eafc feat(openthread): add an API to set rcp version string 2025-02-05 14:36:06 +08:00
David Cermak
c17f0bb36c fix(esp_eth): Fix test code to unregister event correctly 2025-02-05 07:34:02 +01:00
morris
1de6022c76 Merge branch 'fix/periodic_fs_usb_on_p4_backport_v5.3' into 'release/v5.3'
fix(usb/host): Fixed Full Speed periodic transfers on ESP32-P4 (backport v5.3)

See merge request espressif/esp-idf!36648
2025-02-05 14:18:31 +08:00
Chen Jichang
7aab628ea8 feat(dma): Add helper functions to split aligned buffer
In some cases we will need the dma's buffer to be aligned with specific
requirements. This MR add two helper function to split the unaligned
buffer and merge to the origin buffer. The cost is that each unaligned
buffer requires two stash buffers of spilt alignment size. And this
memory should be managed by callers.
2025-02-05 12:48:25 +08:00
morris
400b1e5d57 Merge branch 'bugfix/fix_i2s_reconfig_slot_issue_v5.3' into 'release/v5.3'
fix(i2s): fixed incorrect logic in slot reconfig (v5.3)

See merge request espressif/esp-idf!36642
2025-02-05 12:32:26 +08:00
Chen Jichang
f6bbf60deb feat(spi_lcd): move callback function to iram
Closes https://github.com/espressif/esp-idf/issues/15160
2025-02-05 11:21:53 +08:00
Jin Cheng
d557699837 fix(bt/controller): fixed missing critical protections on linked-list structure of (e)SCO buffers 2025-02-05 10:24:59 +08:00
Wang Mengyang
72cde9aee5 change(bt): Remove unused state variable for (e)SCO disconnect reason in Bluedroid 2025-02-05 10:08:58 +08:00
Alexey Lapshin
88bbf875bd fix(newlib): fix __atomic_test_and_set to ensure atomicity
Before the change described in
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631393.html it
appeared that inlining built-in GCC function __atomic_test_and_set() was
incorrect. It resulted in a non-atomic write.
For GCC toolchains which do not have such patch yet, this commit fixes
__atomic_test_and_set to be atomic in IDF's builds.
2025-02-04 15:17:25 +07:00
David Cermak
62be7fea47 fix(esp_event): Fix minor no-ISR post regression
from 15f6775f5d
2025-02-04 09:07:13 +01:00
Alexey Gerenkov
3908e7b7b3 Merge branch 'fix/coredump_test_uart_data_missing_v5.3' into 'release/v5.3'
Fix missing coredump uart data in tests (v5.3)

See merge request espressif/esp-idf!36712
2025-02-03 22:55:07 +08:00
Erhan Kurubas
e9161c62d0 test(coredump): collect all expected uart data first, then process lazily 2025-02-03 15:11:27 +01:00
Rocha Euripedes
2c88dd6b46 Merge branch 'fix/test_app_certificate_v5.3' into 'release/v5.3'
Regenerate certificates for testing (v5.3)

See merge request espressif/esp-idf!36673
2025-01-31 16:00:00 +08:00
Michael (XIAO Xufeng)
0d73471a9d Merge branch 'test/add_cache2phys_xip_tests_v5.3' into 'release/v5.3'
fix(mmap): fixed spi_flash_phys2cache, spi_flash_cache2phys return addr in PSRAM issue (v5.3)

See merge request espressif/esp-idf!33628
2025-01-30 23:08:33 +08:00
Guillaume Souchere
e12090a6c8 fix(esp_event): Handler unregistration by itself issue
when esp_event_handler_unregister_with_internal cannot take
the loop mutex (e.g., when the handler unregisters itself),
create an event with a special base identifier and add it to
the queue of the corresponding loop to postpone the removal
of the handler from the list at a time when the loop mutex can be
successfully taken.
2025-01-30 10:39:20 +01:00
David Čermák
9c7be1d697 Merge branch 'fix/ping_data_race_v5.3' into 'release/v5.3'
fix(lwip): Fix potential data-race in ping tcpip callback (v5.3)

See merge request espressif/esp-idf!36535
2025-01-30 17:34:18 +08:00
Guillaume Souchere
295f691e14 fix(esp_event): Fix event loop profiling in handler_execute function
handler_execute function is looking to match the handler only in the
list of loop events but does not look in the base event handler list
nor the id event handler list. So unless the event handler is
registered to be triggered for all event bases and all event ids of
an event loop, its profiling fields (invoked and time) are not updated
when it is called.

This commit updates the search for the matching handler to also look
in base event list and ID event list.

Closes https://github.com/espressif/esp-idf/issues/15041
2025-01-30 10:33:56 +01:00
Mahavir Jain
2ee980590b Merge branch 'feat/bootloader_nvs_read_encrypted_v5.3' into 'release/v5.3'
fix(esptool_py): NVS partition being incorrectly marked as encrypted by the build system (v5.3)

See merge request espressif/esp-idf!36680
2025-01-30 17:14:36 +08:00
harshal.patil
1318d51dd4 fix(esptool_py): Fix NVS partition being incorrectly marked as encrypted
- The CMake function esptool_py_partition_needs_encryption() in the esptool_py
component used to mark NVS partition as encrypted, instead it should have marked
the NVS keys partition as encrypted.
2025-01-30 12:02:54 +05:30
David Cermak
8da8db7a4e fix(lwip): Fix potential data-race in ping tcpip callback
Need to use tcpip_api_call() instead of tcpip_callback(), since the
former waits for the tcpip task to complete and thus prevents potential
data races with subsequent TCP/IP tasks.
2025-01-29 23:34:27 +08:00
David Čermák
b7d6d7459e Merge branch 'test/bridge_v5.3' into 'release/v5.3'
[network/examples]: Fix build rules to test builds on for all targets (v5.3)

See merge request espressif/esp-idf!36630
2025-01-29 23:22:50 +08:00
Euripedes Rocha
6c83f8a838 fix(mqtt): Regenerate certificates for testing
- Previous fix ommited one of the client certificates by mistaque.
- This regenerates all certificates to clean that up.
2025-01-29 14:04:14 +01:00
Tomas Rezucha
fc39a5b836 refactor(usb): Include supported PHYs information in SoC 2025-01-27 08:07:59 +01:00
Tomas Rezucha
55f5f29517 fix(usb): Fixed missing GPIO drive capability on ESP32-P4
All USB PHYs that share their IOs with GPIOs must set
the GPIO's drive capability to maximum.
2025-01-27 08:07:46 +01:00
Tomas Rezucha
47577b83c5 fix(usb/host): Fixed Full Speed periodic transfers on ESP32-P4
For FS periodic endpoints 'tokens_per_frame' must be set to 8
LL usb_dwc_ll_hctsiz_set_sched_info() function.
2025-01-27 08:07:30 +01:00
laokaiyao
3cb9ab1f1b fix(i2s): fix uninitialize warning for the default macros
Closes https://github.com/espressif/esp-idf/issues/15271
2025-01-27 14:21:31 +08:00
laokaiyao
a1631226d9 fix(i2s): fixed incorrect logic in slot reconfig
Closes https://github.com/espressif/esp-idf/issues/15256
2025-01-27 14:13:19 +08:00
David Cermak
c06e2509f3 fix(network/examples): Fix build rules to test builds on for all targets
Uses wifi defines only if wifi is enabled for this target
2025-01-24 17:01:59 +01:00
David Čermák
f2fe95f31b Merge branch 'ci/iperf_esp32p4_v5.3' into 'release/v5.3'
ci(esp_eth): added ESP32P4 to iperf CI test (v5.3)

See merge request espressif/esp-idf!36390
2025-01-24 19:49:20 +08:00
Wang Meng Yang
0c1a7ad156 Merge branch 'feat/esp32_set_get_bt_lpclk_src_v5.3' into 'release/v5.3'
feat(bt): Added API to get/set low power clock source(v5.3)

See merge request espressif/esp-idf!36563
2025-01-24 19:14:34 +08:00
Mahavir Jain
e1a023e13d Merge branch 'feat/support_aes_pseudo_round_func_in_esp32h2_eco5_v5.3' into 'release/v5.3'
Support AES and XTS-AES's pseudo round function in ESP32H2-ECO5 (v5.3)

See merge request espressif/esp-idf!36464
2025-01-24 14:40:00 +08:00
morris
8f20eac2df Merge branch 'feat/spi_std_timing_and_bit_trans_v5.3' into 'release/v5.3'
feat(driver_spi): support adjust master rx to standard timing (v5.3)

See merge request espressif/esp-idf!36400
2025-01-24 10:24:14 +08:00
renpeiying
db588e04dd docs: Update CN trans for security docs 2025-01-23 14:06:16 +05:30
harshal.patil
ac0dc0d775 feat(bootloader_support): Permanently enable XTS-AES pseudo rounds when FE release mode is enabled 2025-01-23 14:06:16 +05:30
harshal.patil
ae4e693cfc feat(hal/spi_flash_encrypted): Enable pseudo rounds function during XTS-AES operations 2025-01-23 14:06:16 +05:30
harshal.patil
8d30077744 feat(hal/aes): Enable pseudo rounds function during AES operations 2025-01-23 14:06:16 +05:30
Mahavir Jain
ad911e11d1 Merge branch 'feature/efuse_update_for_esp32h2_eco5_v5.3' into 'release/v5.3'
feat(efuse): Adds efuses for esp32h2 eco5 (v5.3)

See merge request espressif/esp-idf!36239
2025-01-23 15:59:02 +08:00
Konstantin Kondrashov
ae7857416e feat(espefuse): Adds efuses for esp32h2 eco5
- Support efuses that are not present in the main efuse table
2025-01-23 13:29:36 +08:00
xiongweichao
5a94c54fb8 feat(bt): Added API to get/set low power clock source 2025-01-23 11:19:36 +08:00
Jiang Jiang Jian
15f4775afc Merge branch 'fix/fix_branch_predictor_access_flash_after_cache_diabled_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix branch predictor access flash after cache disabled (v5.3)

See merge request espressif/esp-idf!36559
2025-01-23 11:05:53 +08:00
Tomáš Rohlínek
090c895f00 fix(storage/vfs): incorrect log level in esp_vfs_register_fd_range
Closes https://github.com/espressif/esp-idf/issues/14327
2025-01-22 21:21:40 +08:00
wuzhenghui
12db9e4225 fix(esp_hw_support): fix branch predictor access flash after cache disabled 2025-01-22 19:27:37 +08:00
Island
4b4bc91ec0 Merge branch 'bugfix/fix_blufi_crash_v5.3' into 'release/v5.3'
fix(blufi): Fixed crash issue during memcpy in example (v5.3)

See merge request espressif/esp-idf!36551
2025-01-22 18:18:22 +08:00
Island
0c8da9f966 Merge branch 'change/ble_update_lib_20250114_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250114 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!36479
2025-01-22 18:17:51 +08:00
zwx
6c6c6cb72d feat(openthread): support hardware reset RCP while processing RCP failure 2025-01-22 17:12:23 +08:00
Zhang Hai Peng
12b7a9e6d7 fix(blufi): Fixed some security issue in blufi example
(cherry picked from commit abc18e93eb)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-22 16:34:36 +08:00
Sergei Silnov
fa7bbbb2e6 Merge branch 'feat/core_components_v5.3' into 'release/v5.3'
feat: add `COMPONENT_SOURCE` property to component targets (v5.3)

See merge request espressif/esp-idf!34184
2025-01-21 21:50:18 +08:00
C.S.M
4b86e6424b fix(spi_flash): Fix issue that bit_length is wrong on suspend chip because not judge idle correctly 2025-01-21 17:39:39 +08:00
Jiang Jiang Jian
731c461049 Merge branch 'bugfix/pm-300-v5.3' into 'release/v5.3'
backport v5.3: fix some esp32c5 and esp32c61 light sleep wakeup issues

See merge request espressif/esp-idf!36076
2025-01-21 16:47:44 +08:00
Fu Hanxi
539971de6c feat: add component_source property to component targets 2025-01-21 16:45:29 +08:00
C.S.M
d756e6d208 feat(spi_flash): Add config for adding auto check status after suspend to improve performance 2025-01-21 15:04:21 +08:00
C.S.M
d772cb3055 feat(spi_flash): support software resume after suspend in unicore 2025-01-21 15:02:22 +08:00
Shu Chen
aedf0408a6 Merge branch 'fix/ci_restart_avahi_daemon_v5.3' into 'release/v5.3'
fix(ci): restart avahi-daemon in otbr service discovery test case (v5.3)

See merge request espressif/esp-idf!36434
2025-01-21 14:41:39 +08:00
zwx
8681e5ec9c fix(ci): restart avahi-daemon in otbr service discovery test case 2025-01-21 11:25:50 +08:00
Jiang Jiang Jian
427304105d Merge branch 'bugfix/clic_register_issues_v5.3' into 'release/v5.3'
fix(soc): fix clic register definition and description (backport v5.3)

See merge request espressif/esp-idf!35589
2025-01-20 20:20:36 +08:00
Marius Vikhammer
c8f9cedc69 Merge branch 'docs/add_html_download_link_v5.3' into 'release/v5.3'
feat(docs): Replace PDF download link with HTML zip download link (v5.3)

See merge request espressif/esp-idf!35882
2025-01-20 16:18:43 +08:00
Marius Vikhammer
889f7b23dd feat(docs): Replace PDF download link with HTML zip download link
PDF build would randomly fail after S3 docs grew to a certain size.

At 3k+ pages PDF is not very usable anyways.
For offline use an HTML archive makes more sense.
2025-01-20 15:02:33 +08:00
morris
adf1474e2f Merge branch 'refactor/usb_merge_p4_phy_backport_v5.3' into 'release/v5.3'
refactor(usb/phy): Merge P4 and S2/S3 PHYs into one module (backport_v5.3)

See merge request espressif/esp-idf!36448
2025-01-20 15:02:21 +08:00
morris
fb25eb02eb Merge branch 'fix/p4_spi_slave_example_not_work_v5.3' into 'release/v5.3'
fix(driver_spi): fixed slave (and slave_hd) driver and example error with alignment check (v5.3)

See merge request espressif/esp-idf!36404
2025-01-20 10:54:22 +08:00
Martin Vychodil
814cb095c1 Merge branch 'fix/broken_fatfsgen_tests_v5.3' into 'release/v5.3'
fix(storage/fatfsgen): broken test_apps scripts for fatfsgen (v5.3)

See merge request espressif/esp-idf!36489
2025-01-18 05:38:45 +08:00
Tomáš Rohlínek
c1d93799b0 fix(storage/fatfsgen): broken test_apps scripts for fatfsgen 2025-01-17 18:02:32 +01:00
Shu Chen
738ed11aa0 Merge branch 'fix/fix_coex_macro_control_v5.3' into 'release/v5.3'
fix(openthread): use the correct macros to control code compilation (v5.3)

See merge request espressif/esp-idf!36457
2025-01-17 17:14:18 +08:00
Zhou Xiao
7a1dab88e5 change(ble): update esp32c2 rom ld file
(cherry picked from commit e5feba6ed3)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2025-01-17 16:53:56 +08:00
Zhou Xiao
f7c66806f5 change(ble): [AUTO_MR] Update lib_esp32c2 to 7b7ee440
(cherry picked from commit c263c75897)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-17 16:53:54 +08:00
Zhou Xiao
e7ff7f041c change(ble): [AUTO_MR] Update lib_esp32c6 to bbc1903d
(cherry picked from commit 06a6b311a8)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-17 16:53:52 +08:00
Zhou Xiao
c5ecbf27fc change(ble): [AUTO_MR] Update lib_esp32h2 to bbc1903d
(cherry picked from commit 4f5f0b0954)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-17 16:53:49 +08:00
Jiang Jiang Jian
bb8c9936f5 Merge branch 'bugfix/enable_eap_workarounds_v5.3' into 'release/v5.3'
fix(esp_wifi): Enable EAP workarounds by default (v5.3)

See merge request espressif/esp-idf!36153
2025-01-17 16:06:43 +08:00
Island
403a3e06c4 Merge branch 'change/ble_update_lib_20250103_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20250103 - Update ESP BLE Controller Lib (v5.3)

See merge request espressif/esp-idf!36372
2025-01-17 14:23:03 +08:00
Kapil Gupta
b6a87e7e6d fix(esp_wifi): Enable EAP workarounds by default
Enabling this will make sure our behavior is same as upstream
wpa_supplicant.
2025-01-17 13:53:18 +08:00
Jiang Jiang Jian
c7ad8d795f Merge branch 'bugfix/fix_double_wifi_active_time_v5.3' into 'release/v5.3'
bugfix/fix double wifi active time v5.3

See merge request espressif/esp-idf!36359
2025-01-17 13:51:00 +08:00
morris
8ec35b4d75 Merge branch 'refactor/improve_the_compatible_method_on_h2_v5.3' into 'release/v5.3'
refactor(lpperi): improve compatibility solution (v5.3)

See merge request espressif/esp-idf!36421
2025-01-17 12:40:00 +08:00
Jiang Jiang Jian
4e0cb9a140 Merge branch 'fix/fix_p4_deepsleep_io_leakage_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix esp32p4 JTAG pad deepsleep current leakage (v5.3)

See merge request espressif/esp-idf!36009
2025-01-17 12:10:46 +08:00
Jiang Jiang Jian
92e1c50800 Merge branch 'fix/fix_pm_trace_rtc_domain_keeping_v5.3' into 'release/v5.3'
fix(esp_pm): enable RTC_PERIPH domain once in esp_pm_trace_init (v5.3)

See merge request espressif/esp-idf!35998
2025-01-17 12:10:05 +08:00
Jiang Jiang Jian
087e8a83f3 Merge branch 'fix/fix_flash_leakage_workaroud_config_dependcy_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix FLASH leakage workaround kconfig dependcy (v5.3)

See merge request espressif/esp-idf!35991
2025-01-17 12:09:38 +08:00
Jiang Jiang Jian
86adcd99df Merge branch 'fix/fix_flash_clock_changed_after_sleep_bak_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix mspi clock freq changed after lightsleep (v5.3)

See merge request espressif/esp-idf!36003
2025-01-17 12:03:30 +08:00
Jiang Jiang Jian
04afd65ae6 Merge branch 'fix/fix_tsens_power_after_modem_wakeup_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix tsensor power enable failed after modem state wakeup (v5.3)

See merge request espressif/esp-idf!36227
2025-01-17 12:02:59 +08:00
Jiang Jiang Jian
0590d1c21c Merge branch 'fix/fix_p4_usb_phy_bad_suspend_on_lslp_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix p4 OTG phy bad suspend cause high power consumption on sleep (v5.3)

See merge request espressif/esp-idf!36366
2025-01-17 12:02:10 +08:00
Jiang Jiang Jian
33923d3999 Merge branch 'fix/lwip_ping_getnetif_threadsafe_v5.3' into 'release/v5.3'
fix(lwip): Fix ping session calling thread unsafe API (v5.3)

See merge request espressif/esp-idf!36380
2025-01-17 11:43:55 +08:00
wanckl
c18f258a24 fix(driver_spi): fixed slave example error on esp32p4 2025-01-17 11:18:41 +08:00
wanckl
e1cc1e2568 feat(driver_spi): support using SPI_DEVICE_STD_TIMING to adjust master rx in standard timing 2025-01-17 10:48:52 +08:00
Marius Vikhammer
e3e7243400 Merge branch 'bugfix/rm_redefined_gpio_num_v5.3' into 'release/v5.3'
fix(ulp): remove redefinition and unify gpio enum in ulp (backport v5.3)

See merge request espressif/esp-idf!36437
2025-01-17 10:42:24 +08:00
morris
af9e91c4ab Merge branch 'refactor/cleanup_usb_phy_v5.3' into 'release/v5.3'
Cleanup USB PHY (backport v5.3)

See merge request espressif/esp-idf!36237
2025-01-17 10:40:26 +08:00
Xu Si Yu
527d29409e fix(openthread): use the correct macros to control code compilation 2025-01-17 09:49:18 +08:00
Shu Chen
84e3f04fec Merge branch 'fix/set_154_cca_duration_v5.3' into 'release/v5.3'
fix(15.4): set 15.4 energy scan duration before cca (v5.3)

See merge request espressif/esp-idf!36425
2025-01-17 09:19:11 +08:00
Martin Vychodil
96d3dfbb9a Merge branch 'fix/incorrect_console_open_and_close_behaviour_v5.3' into 'release/v5.3'
fix(storage/vfs_console): stop new console opens from overwriting existing fds (v5.3)

See merge request espressif/esp-idf!35268
2025-01-16 22:08:13 +08:00
Li Shuai
f453380760 fix(uart): fix esp32c61 light sleep uart wakeup failed 2025-01-16 20:34:31 +08:00
Li Shuai
ff3c790ad1 fix(esp_hw_support): fix esp32c5 and esp32c61 wakeup failed when TOP rejects PD 2025-01-16 20:34:16 +08:00
zwl
5fe98f852c feat(ble): support for putting ble code into flash on ESP32-C6 2025-01-16 18:20:43 +08:00
Tomas Rezucha
6d97cd0aa1 refactor(usb/phy): Merge P4 and S2/S3 PHYs into one module
P4 had separate PHY implementation for initial bring-up,
now we can merge it with the original PHY driver.
2025-01-16 10:25:25 +01:00
Tomas Rezucha
19bdc77e55 fix(usb): Backport v5.3 compatibility commit 2025-01-16 09:53:22 +01:00
Tomas Rezucha
144f8a660e refactor(usb/phy): Start using values from usb_dwc_info in PHY driver
Add tests for PHY sanity checks
2025-01-16 16:39:59 +08:00
Tomas Rezucha
005ae0554a refactor(usb/phy): Do not use deprecated variables in usb_phy 2025-01-16 16:39:59 +08:00
Tomas Rezucha
47fd8aac23 feat(hal/usb): Explicitly enable clock and reset USB WRAP on init 2025-01-16 16:39:59 +08:00
Xiaoyu Liu
1ef5be3b39 fix(ulp): remove redefinition and unify gpio enum in ulp
Closes https://github.com/espressif/esp-idf/issues/15219
2025-01-16 09:22:48 +01:00
Xu Si Yu
d0948e250d fix(15.4): set 15.4 energy scan duration before cca 2025-01-16 11:45:42 +08:00
laokaiyao
2abf73d94c refactor(lpperi): improve compatibility solution 2025-01-16 10:18:02 +08:00
Rahul Tank
10db90a2fc Merge branch 'bugfix/fix_compilation_warn_v5.3' into 'release/v5.3'
fix(nimble): Address compilation warnings for different flag combination (v5.3)

See merge request espressif/esp-idf!36393
2025-01-15 21:31:52 +08:00
morris
18714a2e4c Merge branch 'refactor/update_lpperi_regs_for_h2_eco5_v5.3' into 'release/v5.3'
refactor(lpperi): compatible refactor for H2 ECO5 (v5.3)

See merge request espressif/esp-idf!36336
2025-01-15 16:11:38 +08:00
wanckl
ddeb3f1d35 fix(driver_spi): fixed slave_hd driver transaction alignment check 2025-01-15 16:03:58 +08:00
morris
16023f1da7 Merge branch 'change/bs_cmake_cleanup_v5.3' into 'release/v5.3'
feat(gdma): added help function to count the bytes in the receive buffer (v5.3)

See merge request espressif/esp-idf!36376
2025-01-15 13:19:34 +08:00
Rahul Tank
c089950c8b fix(nimble): Fix compilation issues for different flag combinations 2025-01-15 10:11:23 +05:30
Shu Chen
9e58ddd91f Merge branch 'feat/update_thread_lib_v5.3' into 'release/v5.3'
fix(openthread): update SRP server to support zero subtype (v5.3)

See merge request espressif/esp-idf!36337
2025-01-15 10:57:49 +08:00
wuzhenghui
e6808779dc fix(esp_hw_support): fix p4 OTG phy bad suspend cause high power consumption on sleep 2025-01-15 10:20:58 +08:00
Ondrej Kosta
17ebbe0924 ci(esp_eth): added ESP32P4 to iperf CI test
Updated (increased) ETH_THROUGHPUT_SPI_ETH limits.
Improved iperf optimization description
2025-01-14 15:45:55 +01:00
Roland Dobai
a4330d297c Merge branch 'fix/remove_duplicates_from_sdkconfig_renames_v5.3' into 'release/v5.3'
fix: remove duplicit lines from sdkconfig.rename files (v5.3)

See merge request espressif/esp-idf!36347
2025-01-14 19:41:46 +08:00
David Cermak
c2bc4d3797 fix(lwip): Fix ping session calling thread unsafe API
Closes https://github.com/espressif/esp-idf/issues/14982
2025-01-14 11:25:44 +01:00
Zhou Xiao
0a3068236c fix(ble): fixed ld file for c2eco0 and c2eco4
(cherry picked from commit 937fe2a6e3)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 17:44:22 +08:00
David Čermák
5231c61b1b Merge branch 'bugfix/ws_head_buf_size_v5.3' into 'release/v5.3'
fix(tcp_transport): Fix websocket header read to handle overflow (v5.3)

See merge request espressif/esp-idf!35668
2025-01-14 16:43:00 +08:00
David Čermák
f78ee19900 Merge branch 'fix/esp_netif_ppp_nullptr_check_v5.3' into 'release/v5.3'
fix(esp_netif): Prevent null deref when checking netif type (v5.3)

See merge request espressif/esp-idf!35671
2025-01-14 16:42:45 +08:00
morris
9a2e7b8686 feat(gdma): added API to count the size of rx buffer until eof 2025-01-14 16:41:05 +08:00
Zhou Xiao
eaf097ef8d fix(ble): fixed esp_ble_tx_power_set api issue on ESP32-H2
(cherry picked from commit d2b62f2130)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:29 +08:00
Zhou Xiao
b9fadacf2f fix(ble): fixed esp_ble_tx_power_set api issue on ESP32-C6
(cherry picked from commit 8d6ec12838)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:27 +08:00
Zhou Xiao
0740986590 fix(ble): fixed esp_ble_tx_power_set api issue on ESP32-C2
(cherry picked from commit 6a752eeb89)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:24 +08:00
Zhou Xiao
c240d04a67 feat(ble): support for putting ble code into flash on ESP32-H2
(cherry picked from commit 5a9acdc379)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:22 +08:00
Zhou Xiao
d0976ef837 change(ble): Update lib_esp32c2 to 2a00fb0b
(cherry picked from commit 7cd3fe6953)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 14:54:20 +08:00
Zhou Xiao
fcce32a66c change(ble): Update lib_esp32c6 to 3422b706
(cherry picked from commit 4fc95fa91f)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 14:54:18 +08:00
Zhou Xiao
1c89a133f2 change(ble): Update lib_esp32h2 to 3422b706
(cherry picked from commit fe5a12e7e7)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 14:54:16 +08:00
morris
a5581e8117 Merge branch 'bugfix/uart_single_wire_mode_v5.3' into 'release/v5.3'
fix(uart): allow same pin for tx and rx in uart_set_pin; UART_SELECT_READ_NOTIF race conditon fix (v5.3)

See merge request espressif/esp-idf!36251
2025-01-14 13:12:02 +08:00
Mahavir Jain
74b2b3911f Merge branch 'bugfix/update_api_to_get_url_correctly_v5.3' into 'release/v5.3'
fix(esp_http_client): updated API esp_http_client_get_url() to get URL in correct format (v5.3)

See merge request espressif/esp-idf!36332
2025-01-14 12:44:56 +08:00
morris
4ff6e2cc6b Merge branch 'fix/twai_io_init_glitch_v5.3' into 'release/v5.3'
fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config (v5.3)

See merge request espressif/esp-idf!34816
2025-01-14 11:57:30 +08:00
liuning
5cb0e2e020 fix(wifi): fix double max active time, fix coex pwr period cant been updated by ps type set 2025-01-14 11:17:39 +08:00
liuning
99291fb28d feat(coex): update coexist debug default event 2025-01-14 11:13:27 +08:00
Jiang Jiang Jian
adf5319639 Merge branch 'bugfix/fix_the_wpa3_connect_error_in_mesh_v5.3' into 'release/v5.3'
fix(wifi/mesh): fixed the mesh connection failure in WPA3 mode after erasing flash (v5.3)

See merge request espressif/esp-idf!36329
2025-01-13 19:41:37 +08:00
Jan Beran
0547a0bad9 fix: remove duplicit lines from sdkconfig.rename files 2025-01-13 09:07:32 +01:00
Shu Chen
d043df3778 Merge branch 'feature/support_esp32h2eco5_phylib_v5.3' into 'release/v5.3'
feat(esp_phy): support esp32h2eco5 phylib (v5.3)

See merge request espressif/esp-idf!36209
2025-01-13 15:50:47 +08:00
Tan Yan Quan
50dc1848fe fix(openthread): update SRP server to support zero subtype/v5.3
* esp-openthread: 4f3fd4895
* openthread: 005c5cefc
* esp-idf: ce5ac9571
2025-01-13 14:50:55 +08:00
laokaiyao
90457a9a4e refactor(lpperi): compatible refactor for H2 ECO5 2025-01-13 14:39:33 +08:00
nilesh.kale
bfed3b3dae fix(esp_http_client): updated API esp_http_client_get_url to get URL in correct format
This commit updates the API to include the port number in the URL,
which was previously missing.
2025-01-13 11:14:34 +05:30
Rahul Tank
ce5ac95711 Merge branch 'bugfix/fix_few_nimble_issues_v5.3' into 'release/v5.3'
fix(nimble): Fix few nimble issues 11012025 (v5.3)

See merge request espressif/esp-idf!36311
2025-01-13 13:26:15 +08:00
Mahavir Jain
636ae484d8 Merge branch 'fix/return_esp_err_t_for_httpd_req_get_url_query_str_v5.3' into 'release/v5.3'
feat(https_server): Added checks to verify if uri is empty (v5.3)

See merge request espressif/esp-idf!36287
2025-01-13 11:58:30 +08:00
zhangyanjiao
954de95aac fix(wifi/mesh): fixed the mesh connection failure in WPA3 mode after erasing flash
Closes https://github.com/espressif/esp-idf/issues/14095
2025-01-13 11:44:48 +08:00
Jiang Jiang Jian
8e54a6cc71 Merge branch 'bugfix/fix_some_wifi_bugs_20241221_v5.3' into 'release/v5.3'
fix some wifi bugs 20241221(Backport v5.3)

See merge request espressif/esp-idf!35862
2025-01-13 10:57:26 +08:00
morris
f0fef3aef8 Merge branch 'bugfix/reset_axi_gdma_gracefully_v5.3' into 'release/v5.3'
fix(gdma): stop the axi gdma gracefully on CPU SW reset (v5.3)

See merge request espressif/esp-idf!36284
2025-01-13 10:16:49 +08:00
morris
37e05e9815 Merge branch 'fix/c61_h2_pmu_icg_csv_update_v5.3' into 'release/v5.3'
fix(pmu): c61 and h2 update pmu_icg_mapping.h (v5.3)

See merge request espressif/esp-idf!34797
2025-01-13 09:59:55 +08:00
Abhinav Kudnar
eb4ce28bfc feat(nimble): Additional changes in PAWR IDF Examples/support for ESP IP 2025-01-10 17:13:32 +05:30
Rahul Tank
4fda5fd142 fix(nimble): Fixed a typo in Kconfig file 2025-01-10 17:13:17 +05:30
Astha Verma
b0adb3acac fix(nimble): Added HCI_Read_Remote_Version_Information command 2025-01-10 17:13:02 +05:30
Rahul Tank
45141eb6be fix(nimble): Clear our and peer security records during unpair 2025-01-10 17:12:36 +05:30
Song Ruo Jing
a1ba653952 fix(uart): allow same pin for tx and rx in uart_set_pin
Closes https://github.com/espressif/esp-idf/issues/14787
2025-01-10 15:14:27 +08:00
morris
79b798cac6 Merge branch 'refactor/cleanup_usb_phy_backport_v5.3' into 'release/v5.3'
fix(usb/host): Fix reaction on High-Speed NYET packet (backport v5.3)

See merge request espressif/esp-idf!36120
2025-01-10 14:35:08 +08:00
Island
171a0b9acf Merge branch 'feat/add_config_for_ble_vs_qa_cmd_v5.3' into 'release/v5.3'
fixed interrupt WDT when shutdown bt controller on ESP32(ba6739f) (v5.3)

See merge request espressif/esp-idf!36175
2025-01-10 14:17:36 +08:00
hrushikesh.bhosale
fce6e09463 feat(https_server): Added checks to verify if uri is empty
Added the checks if the URI is empty for the funtions httpd_req_get_url_query_len
and httpd_req_get_url_query_str in httpd_parser.c
2025-01-10 11:09:43 +05:30
wanckl
65d3591cf7 fix(pmu): c61 and h2 update pmu_icg_mapping.h 2025-01-10 10:20:20 +08:00
morris
418768ebc7 fix(dma): abort the axi dma gracefully on CPU SW reset 2025-01-10 10:15:36 +08:00
morris
e4762af4bb Merge branch 'feature/isp_dvp_example_v5.3' into 'release/v5.3'
feat(dvp_isp_dsi_example): add new option to connect a DVP camera sensor (ov2640) through ISP_DVP (v5.3)

See merge request espressif/esp-idf!35996
2025-01-10 10:11:13 +08:00
Jiang Jiang Jian
77eaf678f6 Merge branch 'backport/backport_some_changes_to_v5.3_20250106' into 'release/v5.3'
Backport/backport some changes to v5.3 20250106

See merge request espressif/esp-idf!36234
2025-01-09 19:54:38 +08:00
wanckl
283a192713 fix(twai): currect twai type macro initialize definition 2025-01-09 11:54:56 +08:00
wanckl
06c97f9d1f fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config
Closes https://github.com/espressif/esp-idf/issues/14548
2025-01-09 11:54:56 +08:00
Jiang Jiang Jian
3b9242212c Merge branch 'fix/blufi_example_mem_access_v5.3' into 'release/v5.3'
fix(ble/blufi): Fixed blufi example security issue (v5.3)

See merge request espressif/esp-idf!36163
2025-01-09 11:48:31 +08:00
Island
608ac0bb0a Merge branch 'bugfix/fix_some_ble_bugs_241224_esp32c3_v5.3' into 'release/v5.3'
Fixed some BLE bugs 241224 on ESP32C3(fd62b31) (v5.3)

See merge request espressif/esp-idf!36195
2025-01-09 11:35:00 +08:00
wuzhenghui
f87077b825 fix(esp_hw_support): fix modem power enable failed after modem state wakeup 2025-01-09 11:13:29 +08:00
Song Ruo Jing
33935c5607 fix(uart): fix race condition with the use of UART_SELECT_READ_NOTIF
UART_SELECT_READ_NOTIF needs to be sent after received data got processed
to avoid the potential race condition
2025-01-08 20:47:58 +08:00
Alex Bethel
1639033c66 docs: Fix gpio_dump_io_configuration typo in docs
The mentioned `gpio_dump_all_io_configuration` function doesn't exist,
the correct function is `gpio_dump_io_configuration`.

Merges https://github.com/espressif/esp-idf/pull/15031
2025-01-08 20:47:46 +08:00
Shu Chen
182dcd8261 Merge branch 'feature/154_api_enhancement_for_mp_v5.3' into 'release/v5.3'
feat(802.15.4): support register isr callback (v5.3)

See merge request espressif/esp-idf!36199
2025-01-08 17:12:39 +08:00
yinqingzhao
93582b8221 feat(wifi): avoid compiling components related to wifi when wifi is not supported 2025-01-08 16:47:34 +08:00
yinqingzhao
20cda6424d feat(wifi): wifi support 80211tx using 11ax and 11ac rate 2025-01-08 16:45:49 +08:00
Song Ruo Jing
ce22a85ceb fix(isp): isp_dvp raw->rgb needs a workaround 2025-01-08 16:39:53 +08:00
Tomas Rezucha
875defd3b7 fix(usb/host): Fix reaction on High-Speed NYET packet
In Scatter-Gather DMA mode, the USB-DWC will automatically enable
PING protocol if an OUT packet is NACKed by the High-Speed device.
The PING bit must be manually reset.
2025-01-08 16:29:14 +08:00
Song Ruo Jing
ff0f9cd649 feat(dvp_isp_dsi_example): add an example shows DVP-ISP-DSI combination 2025-01-08 16:20:14 +08:00
Marius Vikhammer
db968c6956 Merge branch 'docs/remove_coex_doxy_v5.3' into 'release/v5.3'
docs(doxygen): removed coex header from doxyfile (v5.3)

See merge request espressif/esp-idf!36223
2025-01-08 10:37:32 +08:00
Marius Vikhammer
f00857b253 docs(doxygen): removed coex header from doxyfile
Failing to build due to missing comments, but the header was
never included in the docs anyway, so might as well remove it.
2025-01-08 09:47:31 +08:00
Marius Vikhammer
ba92aee8c1 Merge branch 'ci/swap-argument-find-app_v5.3' into 'release/v5.3'
ci(ci_build_apps): swap function args (v5.3)

See merge request espressif/esp-idf!36060
2025-01-08 09:10:48 +08:00
Rahul Tank
ba0b5b08a3 Merge branch 'bugfix/fix_csfc_write_nvs_v5.3' into 'release/v5.3'
fix(nimble): Corrected storing method of csfc to nvs (v5.3)

See merge request espressif/esp-idf!36166
2025-01-08 00:43:23 +08:00
zhangwenxu
636c017439 feat(esp_phy): support esp32h2eco5 phylib 2025-01-07 17:52:46 +08:00
Michael (XIAO Xufeng)
4c422b18ff Merge branch 'bugfix/warn_rc32k_use_in_kconfig_v5.3' into 'release/v5.3'
fix(clk): add an inevitable kconfig option to be selected to use rc32k (v5.3)

See merge request espressif/esp-idf!35965
2025-01-07 15:50:42 +08:00
zwx
2ec92c5cd8 feat(802.15.4): introduced a feature for registering 802.15.4 ISR callbacks 2025-01-07 15:26:13 +08:00
Chen Jian Hua
fb815fb6f3 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(fd62b31)
- Fixed periodic adv enable params checking
- Fixed BLE assert lld_scan.c 1728 when receiving directed adv
- Support resolving RPA to identity address when creating connection
- Fixed BLE assert rwble.c 505 param 00400010
- Fixed peer address type error in HCI LE meta event
- Fixed setting random address failed when extended adv is enabled


(cherry picked from commit 326f391f9c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-01-07 14:33:33 +08:00
Shu Chen
90de6ac550 Merge branch 'feat/support_setting_event_for_154_txrx_5_3' into 'release/v5.3'
feat(15.4): support setting 15.4 txrx pti when coex is enabled (backport to 5.3)

See merge request espressif/esp-idf!36106
2025-01-07 10:30:43 +08:00
Jiang Jiang Jian
e7caff51c1 Merge branch 'bugfix/use_wpa3_ent_authmode_naming_v5.3' into 'release/v5.3'
fix(wifi): Add support to recongize different WPA3 Authentication modes from specifications  (Backport v5.3)

See merge request espressif/esp-idf!36104
2025-01-06 21:10:12 +08:00
morris
9b2d46fde5 Merge branch 'fix/ble_i2c_v5.3' into 'release/v5.3'
fix(i2c): Fix i2c read from fifo issue when enabling bt/wifi/uart, etc... (backport v5.3)

See merge request espressif/esp-idf!36054
2025-01-06 17:27:10 +08:00
Roland Dobai
bc92458d2a Merge branch 'feature/add_utf_8_decoding_v5.3' into 'release/v5.3'
feat(tools): Enforced utf-8 encoding with Python open() functions (v5.3)

See merge request espressif/esp-idf!36126
2025-01-06 17:10:39 +08:00
morris
b545f9cca8 Merge branch 'bugfix/modbus_serial_examples_fix_mode_v53' into 'release/v5.3'
fix(modbus): Fix the mode setup in modbus slave (backport v5.3)

See merge request espressif/esp-idf!36118
2025-01-06 17:05:33 +08:00
Roland Dobai
3652281fb5 Merge branch 'feat/dfu_p4_backport_v5.3' into 'release/v5.3'
feat(dfu): Enable DFU on ESP32-P4 (backport v5.3)

See merge request espressif/esp-idf!35830
2025-01-06 15:41:59 +08:00
Chen Jian Hua
4847e78895 fix(bt): Update bt lib for ESP32(ba6739f)
- Fixed assert in lld_evt.c at line 2353
- Fixed interrupt WDT when shutdown bt controller
- Added config for BLE vendor HCI QA command
- Added config for BLE channel assessment and ping procedure


(cherry picked from commit ad3554fbed)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-01-06 15:20:14 +08:00
morris
d7d3eb3f0a Merge branch 'feat/ldo_can_output_3v3_v5.3' into 'release/v5.3'
feat(ldo): support output rail voltage (3.3V) (v5.3)

See merge request espressif/esp-idf!36131
2025-01-06 15:08:55 +08:00
Rahul Tank
3d36093651 fix(nimble): Corrected storing method of csfc to nvs 2025-01-06 10:58:30 +05:30
Zhang Hai Peng
a43f3c46e2 fix(ble/bluedroid): Fixed BLE feature selection configuration
(cherry picked from commit 117aa74705)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:14:21 +08:00
Zhang Hai Peng
e631e58963 docs(ble/bluedroid): Added BLE log when bond info was deleted
(cherry picked from commit c9cdf51b05)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:13:55 +08:00
Zhang Hai Peng
ed51c0b6b2 docs(ble/bluedroid): Optimize doc for registering BLE callback functions
(cherry picked from commit d84ccadf90)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:13:53 +08:00
Zhang Hai Peng
b6d4dfa565 fix(ble/blufi): Fixed blufi example security issue
(cherry picked from commit 3cb2d9c3c6)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:13:51 +08:00
morris
ad1237a1e4 feat(ldo): support output rail voltage (3.3V) 2025-01-06 10:45:30 +08:00
Xu Si Yu
f5f07d4962 fix(openthread): fix openthread radio spinel deinit 2025-01-06 10:29:40 +08:00
Xu Si Yu
aaab96050a fix(openthread): fix a naming error of kconfig 2025-01-06 10:29:19 +08:00
Xu Si Yu
33ff758293 feat(15.4): support setting 15.4 txrx pti when coex is enabled 2025-01-06 10:29:19 +08:00
morris
c84a7db80f Merge branch 'bugfix/uart_8_16_bit_access_v5.3' into 'release/v5.3'
fix(uart): fix 8/16-bit uart register access (v5.3)

See merge request espressif/esp-idf!35961
2025-01-06 10:10:29 +08:00
Rahul Tank
326e101a76 Merge branch 'bugfix/coverity_fixes_v5.3' into 'release/v5.3'
fix(nimble): Address fixes for coverity reported issues (v5.3)

See merge request espressif/esp-idf!35369
2025-01-05 22:51:20 +08:00
Shu Chen
ad6fd3f2f8 Merge branch 'feat/example_connect_thread_v5_3' into 'release/v5.3'
feat(protocol_examples_common): Add Thread connect to support Thread for the protocol examples(v5.3)

See merge request espressif/esp-idf!36091
2025-01-05 10:58:33 +08:00
Rahul Tank
6e5a8865de fix(nimble): Address few coverity reported issues
1. Overflowed constant (INTEGER_OVERFLOW): Added change to typecast
value
2. Structurally dead code: Removed dead code
3. Resource leak: Added a free for allocated memory, in case of failure
4. too_few_printf_args: Corrected print statement to pass arguments
5. Fixed nesting levels
6. Fixed unused value warnings
7. Illegal memory access fix
2025-01-03 17:55:41 +05:30
Jiang Jiang Jian
21fb91564e Merge branch 'bugfix/fix_sniffer_fail_on_ci_v5.3' into 'release/v5.3'
fix(ci): Enlarge the pcap memory size in sniffer example (v5.3)

See merge request espressif/esp-idf!35697
2025-01-03 19:59:02 +08:00
Shu Chen
8b5008bb28 Merge branch 'feature/ieee802154_txpower_table_v5.3' into 'release/v5.3'
Feature/ieee802154 txpower table (v5.3)

See merge request espressif/esp-idf!36133
2025-01-03 17:05:05 +08:00
Sarvesh Bodakhe
ca4d97bb22 fix(wifi): Add support to recongize different WPA3 Authentication modes from specs
Add support  to recognize APs supporting 'WPA3-Enterprise-Only Mode' and
'WPA3-Enterprise-Transition Mode' using authmodes WIFI_AUTH_WPA3_ENTERPRISE
and WIFI_AUTH_WPA2_WPA3_ENTERPRISE, respectively.
2025-01-03 12:54:58 +05:30
morris
47a4af87a4 Merge branch 'bugfix/channel_resolution_calculation_v5.3' into 'release/v5.3'
fix(rmt): channel resolution divider rounding issue (v5.3)

See merge request espressif/esp-idf!36033
2025-01-03 14:50:11 +08:00
zwx
9d996989d2 fix(802.15.4): fix a typo for 15.4 Kconfig 2025-01-03 14:22:13 +08:00
zwx
5bf1cc9d44 feat(802.15.4): introduce a series of APIs related power table 2025-01-03 14:22:13 +08:00
zwx
52f905b6c7 feat(openthread): support preferred channel mask 2025-01-03 14:22:13 +08:00
Rahul Tank
69129b34ea Merge branch 'bugfix/ieee802154_ble_coex_v5.3' into 'release/v5.3'
fix(nimble): Save the gatt context in case of preemption (v5.3)

See merge request espressif/esp-idf!35436
2025-01-03 13:50:10 +08:00
Marius Vikhammer
4745d09d40 Merge branch 'bugfix/h2_wifi_intr_v5.3' into 'release/v5.3'
fix(interrupt): fixed wrongly reserved interrupt for wifi on H2 (v5.3)

See merge request espressif/esp-idf!36112
2025-01-03 11:11:33 +08:00
Marek Fiala
2b0407eb2a feat(tools): Enforce utf-8 encoding with open() function 2025-01-02 16:48:43 +01:00
Song Ruo Jing
b0a1735b55 fix(clk): rtc_clk_cpu_freq_set_xtal will always disable CPU's PLL
Align C6/H2/C5/C61 rtc_clk_cpu_freq_set_xtal behavior to other chips
For PMU supported chips, powering down CPU PLL in sleep will be done by PMU, not sleep code
2025-01-02 21:16:27 +08:00
Jiang Jiang Jian
ca961274f5 Merge branch 'feat/backport_some_feature_and_bugfix_v53' into 'release/v5.3'
Feat/backport some feature and bugfix v53

See merge request espressif/esp-idf!35925
2025-01-02 20:31:03 +08:00
aleks
fb506232f7 fix(modbus): Fix the mode setup in modbus slave
https://github.com/espressif/esp-idf/pull/14878
2025-01-02 17:58:42 +08:00
Kabir Waraich
74cb39cbca Update slave.c to fix the mode
There is an issue in the lines that I have changed. I think it was copied over from the enum by mistake.
2025-01-02 17:58:42 +08:00
Marius Vikhammer
4531d056e9 fix(interrupt): fixed wrongly reserved interrupt for wifi on H2 2025-01-02 16:44:05 +08:00
morris
ce3bc62076 Merge branch 'bugfix/ledc_get_freq_calc_v5.3' into 'release/v5.3'
fix(ledc): fix ledc_get_freq calculation err due to overflow (v5.3)

See merge request espressif/esp-idf!36020
2025-01-02 15:45:49 +08:00
Jiang Jiang Jian
b5e59fb0af Merge branch 'ci/add_build_test_eco_versions_v5.3' into 'release/v5.3'
ci: add build test for eco versions (v5.3)

See merge request espressif/esp-idf!35819
2025-01-02 15:24:34 +08:00
morris
cfa4a3aa69 Merge branch 'bugfix/esp_rom_gpio_connect_out_signal_patch_v5.3' into 'release/v5.3'
fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2 (v5.3)

See merge request espressif/esp-idf!35940
2025-01-02 15:09:37 +08:00
morris
2d432ab856 Merge branch 'feat/xmc_32d_support_v5.3' into 'release/v5.3'
feat(spi_flash): support 120M on xmc25q32d flash (backport v5.3)

See merge request espressif/esp-idf!36079
2025-01-02 14:17:13 +08:00
morris
d47aa5b072 Merge branch 'fix/fix_parlio_tx_example_line_address_v5.3' into 'release/v5.3'
fix(parlio_tx): fix line address in simple_rgb_martix example (v5.3)

See merge request espressif/esp-idf!36071
2025-01-02 14:12:01 +08:00
Shu Chen
e27cc7cb5d Merge branch 'feat/set_get_ack_timeout_v5.3' into 'release/v5.3'
feat(802.15.4): add api for set/get ack timeout (v5.3)

See merge request espressif/esp-idf!36086
2025-01-02 12:21:52 +08:00
Zhuang Hang
b3830bed43 feat(802.15.4): add api for set/get ack timeout (v5.3) 2025-01-02 12:21:52 +08:00
C.S.M
09321904dc docs(i2c): Add type declaration in i2c docs,
Closes https://github.com/espressif/esp-idf/issues/15086
2024-12-31 15:36:24 +08:00
Xu Si Yu
eed839d11a feat(openthread): update build test rules 2024-12-31 14:33:33 +08:00
WanqQixiang
6ae2ed32c3 fix(openthread): Fix CI failure of ot_trel example build 2024-12-31 14:33:27 +08:00
WanqQixiang
43ae52b87a feat(protocol_examples_common): Add Thread connect to support Thread for the protocol examples 2024-12-31 14:33:17 +08:00
C.S.M
385fa9870f fix(i2c): Add bus handle check so that it will not be panic when there is no free bus,
Closes https://github.com/espressif/esp-idf/issues/14819
2024-12-31 12:01:10 +08:00
Shu Chen
238d7038ec Merge branch 'feature/use_fixed_dut_in_ot_ci_cases_v5.3' into 'release/v5.3'
feat(openthread): use fixed port in ot ci cases (Backport v5.3)

See merge request espressif/esp-idf!36047
2024-12-31 12:00:08 +08:00
C.S.M
768f746036 feat(spi_flash): support 120M on xmc25q32d flash 2024-12-31 11:34:27 +08:00
Abhinav Kudnar
1c195041d2 fix(nimble): Save the gatt context in case of preemption 2024-12-30 20:00:05 +08:00
Rahul Tank
05b7732547 Merge branch 'bugfix/fix_ext_reconn_compilation_v5.3' into 'release/v5.3'
fix(nimble): Fix compilation issue for combination of Ext Adv and Reattempt conn flag (v5.3)

See merge request espressif/esp-idf!35932
2024-12-30 19:46:49 +08:00
Chen Jichang
7cd877b0d3 fix(parlio_tx): fix line address in simple_rgb_martix example 2024-12-30 17:08:59 +08:00
Song Ruo Jing
191c2aee72 fix(ledc): fix ledc_get_freq calculation err due to overflow
Closes https://github.com/espressif/esp-idf/pull/14882
2024-12-30 17:05:24 +08:00
Rahul Tank
cc83b057b9 fix(nimble): Fix compilation issue for combination of Ext Adv and Reattempt conn flag 2024-12-30 14:27:57 +05:30
igor.udot
8abb36267b ci(ci_build_apps): swap function args 2024-12-30 15:03:33 +08:00
Roland Dobai
67e7a935c7 Merge branch 'fix/missing_header_hint_v5.3' into 'release/v5.3'
fix(hints): improve suggestion for missing header file (v5.3)

See merge request espressif/esp-idf!36044
2024-12-30 13:59:40 +08:00
C.S.M
056f0bdb0e fix(i2c_slave): Support 10-bit address on esp32 2024-12-30 13:41:01 +08:00
C.S.M
5729fd2952 fix(i2c): Fix lose byte during data reading in i2c master on esp32,
Closes https://github.com/espressif/esp-idf/issues/12860
2024-12-30 13:40:49 +08:00
C.S.M
d4f3c9c0d5 fix(i2c): Enhance lp clock source and avoid deadlock,
Closes https://github.com/espressif/esp-idf/issues/14908,
Closes https://github.com/espressif/esp-idf/issues/14906
2024-12-30 13:40:37 +08:00
yiwenxiu
b3a7c9f79d feat(openthread): use fixed port in ot ci cases 2024-12-30 10:02:24 +08:00
Frantisek Hrbata
af605b12d2 fix(hints): improve suggestion for missing header file
Currently, we are only suggesting that the header file is likely not
part of the component's INCLUDE_DIRS. However, the header file may be
missing also because of the configuration settings. For instance, the
component might be disabled in sdkconfig, or the feature that supplies
the header might not be enabled. Enhance the hint message to address
this scenario as well.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-12-29 18:56:46 +01:00
Xiao Xufeng
91964c9ad5 ci(app_update): move test_apps to subfolder with a name 2024-12-28 02:01:16 +08:00
Rahul Tank
c889978a12 Merge branch 'bugfix/force_att_tx_q_cleanup_v5.3' into 'release/v5.3'
fix(nimble): Add ATT Tx queue cleanup during link disconnection (v5.3)

See merge request espressif/esp-idf!36006
2024-12-27 20:07:59 +08:00
Island
31b7c82a8f Merge branch 'docs/refactor_ceva_bt_controller_api_v5.3_1215' into 'release/v5.3'
docs(ble): Refactored the API reference for esp32/c3/s3 BT controller (v5.3)

See merge request espressif/esp-idf!35636
2024-12-27 18:45:10 +08:00
Xiao Xufeng
4d75a8118f ci(spi_flash): add tests for cache2phys with XIP 2024-12-27 18:04:51 +08:00
Xiao Xufeng
a4886829f5 fix(mmap): fixed spi_flash_phys2cache return addr in PSRAM issue
When SPIRAM_FETCH_INSTRUCTIONS or SPIRAM_RODATA enabled
2024-12-27 18:04:51 +08:00
Xiao Xufeng
c4cccdedd0 fix(mmap): fixed spi_flash_cache2phys return addr in PSRAM issue
When SPIRAM_FETCH_INSTRUCTIONS or SPIRAM_RODATA enabled
2024-12-27 18:04:51 +08:00
morris
a68cda3c86 fix(rmt): channel resolution divider rounding issue
Closes https://github.com/espressif/esp-idf/issues/15092
2024-12-27 16:57:57 +08:00
Wang Meng Yang
93178f26db Merge branch 'bugfix/fix_btqabr2023330_v5.3' into 'release/v5.3'
fix(bt): Fix error code returned by create_conn_cancel_cmd at different status (backport v5.3)

See merge request espressif/esp-idf!35734
2024-12-27 11:02:59 +08:00
Jiang Jiang Jian
c1e2b60be3 Merge branch 'feature/support_to_query_phy_rf_used_time_v5.3' into 'release/v5.3'
feat(phy): support to query phy used time

See merge request espressif/esp-idf!35877
2024-12-27 10:35:20 +08:00
morris
883829f490 Merge branch 'bugfix/reserve_mspi_pin_regarding_line_mode_v5.3' into 'release/v5.3'
fix(gpio_reserve): reserve the mspi pin regarding line mode (v5.3)

See merge request espressif/esp-idf!35906
2024-12-27 10:19:03 +08:00
Shu Chen
53a38bd9cb Merge branch 'fix/openthread_dns_hook_v5_3' into 'release/v5.3'
fix(openthread): Fix external DNS resolve hook for DNS64 client(v5.3)

See merge request espressif/esp-idf!35984
2024-12-27 10:15:13 +08:00
wuzhenghui
d1475b5d72 fix(esp_hw_support): fix mspi clock freq changed after lightsleep 2024-12-26 19:26:44 +08:00
wuzhenghui
a18fe20e9b fix(esp_hw_support): fix esp32p4 JTAG pad deepsleep current leakage 2024-12-26 16:05:14 +08:00
Rahul Tank
8a2ba98b8b fix(nimble): Add ATT Tx queue cleanup during link disconnection 2024-12-26 12:57:10 +05:30
Island
d0a157e723 Merge branch 'refactor/optimize_ble_gatt_api_doc_v5.3' into 'release/v5.3'
refactor(bt/bluedroid): Optimize BLE GATT related APIs reference (v5.3)

See merge request espressif/esp-idf!35918
2024-12-26 14:25:08 +08:00
Island
4dd4435bc2 Merge branch 'feat/add_get_started_example_on_bluedroid_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Added BLE get started examples for Bluedroid (v5.3)

See merge request espressif/esp-idf!35652
2024-12-26 14:24:51 +08:00
wuzhenghui
3260d95cab fix(esp_pm): enable RTC_PERIPH domain once in esp_pm_trace_init 2024-12-26 14:10:29 +08:00
wuzhenghui
f2f87de88d fix(esp_hw_support): fix FLASH leakage workaround kconfig dependcy 2024-12-26 11:36:00 +08:00
Island
505a359f36 Merge branch 'bugfix/fixed_ble_issues_241220_v5.3' into 'release/v5.3'
Bugfix/fixed ble issues 241220 (v5.3)

See merge request espressif/esp-idf!35923
2024-12-26 11:30:17 +08:00
morris
e62af45d60 Merge branch 'bugfix/rtc_clk_cpu_freq_set_xtal_behavior_v5.3' into 'release/v5.3'
fix(clk): rtc_clk_cpu_freq_set_xtal will always disable CPU's PLL (v5.3)

See merge request espressif/esp-idf!35944
2024-12-26 10:48:02 +08:00
WanqQixiang
5950b8f2b1 fix(openthread): Fix external DNS resolve hook for DNS64 client 2024-12-26 10:18:58 +08:00
morris
09abea3d98 Merge branch 'fix/fix_psram_mode_reg_wrong_timing_v5.3' into 'release/v5.3'
psram: fixed mode reg read bad timing on octal and hex psrams (v5.3)

See merge request espressif/esp-idf!35949
2024-12-26 10:17:09 +08:00
Xiao Xufeng
73c9de5eab feat(soc): increase c2 max supported version 2024-12-25 20:30:29 +08:00
Song Ruo Jing
a2178b0fa2 fix(clk): add an inevitable kconfig option to be selected to use rc32k 2024-12-25 20:01:37 +08:00
Song Ruo Jing
340c0d1280 fix(uart): fix 8/16-bit uart register access 2024-12-25 19:08:05 +08:00
morris
a7781f3662 Merge branch 'feat/rgb_lcd_increase_pclk_v5.3' into 'release/v5.3'
feat(lcd): increase the upper limit of pclk frequency for RGB LCD (v5.3)

See merge request espressif/esp-idf!35929
2024-12-25 16:24:59 +08:00
Song Ruo Jing
97ef2f36d2 fix(uart): eliminated potential glitch on TX at setup if TX signal is inversed
Closes https://github.com/espressif/esp-idf/issues/14285
2024-12-25 15:19:49 +08:00
morris
73a155f988 Merge branch 'feat/rmt_return_real_channel_resolution_v5.3' into 'release/v5.3'
feat(rmt): add API to return the real clock resolution of a channel (v5.3)

See merge request espressif/esp-idf!35902
2024-12-25 14:33:02 +08:00
laokaiyao
fa118a24cd fix(gpio_reserve): reserve the mspi pin regarding line mode 2024-12-25 11:07:01 +08:00
Armando
03f12395de fix(psram): fixed mode reg read bad timing on octal and hex psrams 2024-12-25 11:02:38 +08:00
chenqingqing
b7148ab71f fix(bt): Fix error code returned by create_conn_cancel_cmd at different status
- Closes https://github.com/espressif/esp-idf/issues/7763
2024-12-25 10:01:57 +08:00
morris
4d5d5defd5 feat(lcd): increase the upper limit of pclk frequency for RGB LCD 2024-12-24 22:47:52 +08:00
Song Ruo Jing
c73be9a62d fix(clk): rtc_clk_cpu_freq_set_xtal will always disable CPU's PLL
Align C6/H2/C5/C61 rtc_clk_cpu_freq_set_xtal behavior to other chips
2024-12-24 22:08:46 +08:00
Song Ruo Jing
983653de9a fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2
The original ROM function enabled output for the pad first, and then connected the signal
This could result in an undesired level change at the pad

Closes https://github.com/espressif/esp-idf/issues/12826
2024-12-24 20:17:28 +08:00
zwl
eb0c5ed331 feat(ble): add dtm configuration command in hci example 2024-12-24 19:30:30 +08:00
morris
cfea4f7c98 Merge branch 'bugfix/fix_i2s_24b_buf_size_calc_v5.3' into 'release/v5.3'
fix(i2s): fixed some issues in I2S driver (v5.3)

See merge request espressif/esp-idf!35769
2024-12-24 18:36:09 +08:00
Shu Chen
fbdf9d919b Merge branch 'fix/add_macros_for_otbr_v5.3' into 'release/v5.3'
fix(openthread): add macros for ot_br (v5.3)

See merge request espressif/esp-idf!35893
2024-12-24 17:55:29 +08:00
wangtao@espressif.com
4e335ed5a7 fix(wifi): backport some wifi feature and bugfixs 2024-12-24 15:39:08 +08:00
Zhao Wei Liang
ea2cf71b2f feat(ble): Support get ble controller free heap size on ESP32-C2
(cherry picked from commit 2cb7d2437b)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:36 +08:00
Zhao Wei Liang
9c0c5af372 feat(ble): Support get ble controller free heap size on ESP32-H2
(cherry picked from commit 12f226be7d)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:34 +08:00
Zhao Wei Liang
c0d8e44cda feat(ble): Support get ble controller free heap size on ESP32-C6
(cherry picked from commit aa7feb9449)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:31 +08:00
Zhao Wei Liang
132f4b27e8 feat(ble): fixed some ble issues on ESP32-C2
(cherry picked from commit 5f9a3cdd1a)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:29 +08:00
Zhao Wei Liang
08d741dff3 feat(ble): adjust bt default scheme position
(cherry picked from commit 446239251c)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:27 +08:00
Chen Jian Hua
d366629761 Merge branch 'refactor/optimize_ble_gatt_api_doc' into 'master'
refactor(bt/bluedroid): Optimize BLE GATT related APIs reference

See merge request espressif/esp-idf!34650

(cherry picked from commit 19b5381c99)

7320c77d refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
8a80617c refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
0ac97e98 refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
27b17c69 refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
ea8d7686 docs: Update gattc & gatts api header files
f508772f Apply 3 suggestion(s) to 2 file(s)
03469b52 Apply 2 suggestion(s) to 1 file(s)
aa2cf7a5 docs: fix minor issue
46dc6e96 docs(ble): Replaced "closed" with "terminated" for physical connection.

Co-authored-by: Wei Yu Han <weiyuhan@espressif.com>
2024-12-24 15:19:59 +08:00
wangtao@espressif.com
a8de5a6c2b fix(wifi): fix spiram ignore issue 2024-12-24 15:17:47 +08:00
wangtao@espressif.com
da39fcebc4 feat(wifi): fix SPIRAM_IGNORE_NOTFOUND releated config 2024-12-24 15:15:31 +08:00
wangtao@espressif.com
d8599406a8 change(wifi): change softap default dtim period to 1 2024-12-24 15:13:51 +08:00
wangtao@espressif.com
e8f8bf2995 fix(wifi): fix esp32c2eco4 sta_rx_csa ld 2024-12-24 15:09:23 +08:00
laokaiyao
fdc8275b37 fix(i2s): add check for the tdm frame bits num 2024-12-24 12:21:29 +08:00
laokaiyao
01d1aecd19 fix(i2s): fix the es8311 example on P4
Closes https://github.com/espressif/esp-idf/issues/14297
2024-12-24 12:07:45 +08:00
Gustavo Litovsky
c475820f54 change(esp32): undo forcing two slots in I2S
fix(i2s): fixed the issue in PR 14879

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

[Kevin: Update to only remove the limitation for PCM short format]
2024-12-24 12:07:45 +08:00
laokaiyao
75fb8bbe04 refactor(i2s): refactor i2s examples common dependencies
Closes https://github.com/espressif/esp-idf/issues/14751

Make the common I2S dependencies as an example common component,
so that to avoid slash & backslash issue on windows
when use absolute include path.
2024-12-24 12:07:45 +08:00
laokaiyao
85be1550ab docs(example): added troubleshooting for i2s_es8311 example
Closes https://github.com/espressif/esp-idf/issues/15047
2024-12-24 12:07:44 +08:00
laokaiyao
9b46827d00 fix(i2s): return error when mclk_div is smaller than 2 2024-12-24 12:07:44 +08:00
laokaiyao
33f490d69c fix(i2s): fixed incorrect buf size calculation 2024-12-24 12:07:44 +08:00
morris
3bc10aa81b feat(rmt): add API to return the real clock resolution of a channel
Closes https://github.com/espressif/esp-idf/pull/15074
2024-12-24 11:17:11 +08:00
Tan Yan Quan
5f19eb45b8 fix(openthread): add macros for ot_br 2024-12-23 21:31:08 +08:00
Marius Vikhammer
c042aad969 Merge branch 'fix/ringbuf_receives_after_aq_wraparound_v5.3' into 'release/v5.3'
fix(esp_ringbuf): Fixed no-split ringbuf issue where acquire pointer  wraps around (v5.3)

See merge request espressif/esp-idf!35868
2024-12-23 14:51:08 +08:00
Rahul Tank
98f9bdb7fa Merge branch 'bugfix/fix_compile_issue_v5.3' into 'release/v5.3'
fix(nimble): Fix compilation issues when BLE_MAX_STORE_BOND is set to 0 (v5.3)

See merge request espressif/esp-idf!34442
2024-12-23 12:31:49 +08:00
liuning
ce18873e7a feat(phy): support to query phy used time 2024-12-23 10:56:54 +08:00
morris
8273d98760 Merge branch 'fix/flash_noos_issues_v5.3' into 'release/v5.3'
flash: fixed some no_os API issues (v5.3)

See merge request espressif/esp-idf!35792
2024-12-23 10:21:04 +08:00
Rahul Tank
3e9375e9f9 fix(nimble): Fix compilation issues when BLE_MAX_STORE_BOND is set to 0 2024-12-22 15:20:59 +05:30
Rahul Tank
c21e1af174 Merge branch 'fix/added_change_for_invalid_offset_v5.3' into 'release/v5.3'
fix(nimble): Added a check for invalid offset (v5.3)

See merge request espressif/esp-idf!35752
2024-12-22 17:44:40 +08:00
Shreeyash
cb108dd39b fix(nimble): Added a check for invalid offset 2024-12-22 11:58:24 +05:30
Rahul Tank
13a627e91b Merge branch 'fix/update_peer_ota_addr_type_v5.3' into 'release/v5.3'
fix(nimble):Updated peer OTA address type (v5.3)

See merge request espressif/esp-idf!35344
2024-12-22 14:22:43 +08:00
shreeyash
8f6aac5d17 fix(nimble): Updated peer OTA address type 2024-12-21 21:18:02 +05:30
Yuhan Wei
d7cf748dbc docs(ble): Optimized bluetooth controller API reference 2024-12-21 23:46:09 +08:00
Rahul Tank
2d965b65ab Merge branch 'bugfix/blufi_deinit_memory_leak_v5.3' into 'release/v5.3'
fix(nimble): Fix memory leak issue in Blufi example (v5.3)

See merge request espressif/esp-idf!35313
2024-12-21 23:43:04 +08:00
Astha Verma
c8d452638c fix(nimble): fix memory leak issue in Blufi example 2024-12-21 16:31:45 +05:30
Rahul Tank
a949e02275 Merge branch 'fix/hci_err_code_description_v5.3' into 'release/v5.3'
fix(nimble): Added a function for printing HCI error definition (v5.3)

See merge request espressif/esp-idf!35678
2024-12-21 18:54:23 +08:00
weiyuhan
8d37ce199a fix(ble): removed c5 sdk config 2024-12-21 18:45:56 +08:00
Chen Jian Hua
5a9418a95c feat(bt/bluedroid): Added BLE get started examples for Bluedroid
(cherry picked from commit d051a2a39d)

Co-authored-by: xuzhekai <xuzhekai@espressif.com>
2024-12-21 18:25:08 +08:00
Sudeep Mohanty
4390b045dd fix(esp_ringbuf): Fixed no-split ringbuf issue where acquire pointer wraps around
This commit fixes an issue with no-split ring buffers where in the the
buffer did not receive items correctly if the acquire pointer wraps
around before items are sent to it.
2024-12-21 12:07:49 +05:30
Astha Verma
6d88cae54d fix(nimble): Updated function to print HCI opcode with error definition 2024-12-21 09:25:55 +05:30
Rahul Tank
08102036fd Merge branch 'bugfix/solve_memory_prints_v5.3' into 'release/v5.3'
fix(nimble): Changing esp_rom_printf to ESP_LOGI when memory allocation fails (v5.3)

See merge request espressif/esp-idf!35836
2024-12-21 11:50:46 +08:00
muhaidong
8ba5b34a50 fix(wifi): fixed blufi connect wep or wpa ap fail issue 2024-12-21 09:59:40 +08:00
muhaidong
02d3a619c4 fix(phy): fixed calibration warning infomation inaccurate issue
Closes https://github.com/espressif/esp-idf/issues/14963
2024-12-21 09:59:40 +08:00
Abhinav Kudnar
19931368cf fix(nimble): Changing esp_rom_printf to ESP_LOGI when memory allocation fails 2024-12-20 21:45:12 +05:30
Rahul Tank
27fb5d47ff Merge branch 'bugfix/fix_link_estab_param_v5.3' into 'release/v5.3'
fix(nimble): Corrected link_estab event handling parameters (v5.3)

See merge request espressif/esp-idf!35808
2024-12-21 00:05:46 +08:00
Sergei Silnov
ce79ad5546 Merge branch 'fix/tools_pip_upgrade_v5.3' into 'release/v5.3'
fix(idf_tools.py): Upgrade pip and setuptools separately (v5.3)

See merge request espressif/esp-idf!35775
2024-12-20 20:07:01 +08:00
Roland Dobai
cee2a29981 Merge branch 'change/bump_up_kconfig_precommit_v5.3' into 'release/v5.3'
ci(pre-commit): bump kconfig checker pre-commit version to 2.4.1 (v5.3)

See merge request espressif/esp-idf!35826
2024-12-20 19:19:14 +08:00
Zhang Shuxian
686389582b docs: Update CN translation for dfu 2024-12-20 11:18:06 +01:00
Tomas Rezucha
31c883b3a6 feat(dfu): Enable DFU on ESP32-P4 2024-12-20 11:17:26 +01:00
Marius Vikhammer
25347b5b03 Merge branch 'fix/esp32p4_unexpected_reset_v5.3' into 'release/v5.3'
fix(system): avoid unexcpected hp_sys_wdt reset (v5.3)

See merge request espressif/esp-idf!35802
2024-12-20 16:55:37 +08:00
Armando
eb85f8da46 fix(cache): fixed cache hal ctx not initialised in app issue 2024-12-20 14:06:19 +08:00
Armando
1f982e3ded fix(spi_flash): fixed no_os flash API not consider branch predictor on c5/c61 2024-12-20 14:06:19 +08:00
Armando
5b6191195f fix(spi_flash): fixed no_os flash API not consider cache states issue on h2/p4/c6/c5/c61 2024-12-20 14:06:19 +08:00
Shu Chen
fde54d5718 Merge branch 'fix/thread-lib-v53' into 'release/v5.3'
fix(openthread): update esp-thread-lib branch (v5.3)

See merge request espressif/esp-idf!35813
2024-12-20 13:37:35 +08:00
Tan Yan Quan
d9b3f2ccb1 fix(openthread): update esp-thread-lib branch 2024-12-20 12:29:56 +08:00
morris
9322f7b0d3 Merge branch 'fix/fix_adc_cali_check_scheme_api_issue_v5.3' into 'release/v5.3'
adc: fixed adc_cali_check_scheme wrong return on c2/h2/c6 (v5.3)

See merge request espressif/esp-idf!35719
2024-12-20 10:12:32 +08:00
Alexey Gerenkov
19884eb092 Merge branch 'fix/coredump_checksum_error_v5.3' into 'release/v5.3'
Fix/coredump checksum error (v5.3)

See merge request espressif/esp-idf!35763
2024-12-19 23:01:19 +08:00
Jan Beran
5485eebfc3 ci(pre-commit): bump kconfig checker pre-commit version to 2.4.1 2024-12-19 15:45:13 +01:00
Chen Yudong
5fd9ee23d3 ci: add build test for eco versions 2024-12-19 21:02:49 +08:00
Island
ede55daa15 Merge branch 'bugfix/fix_set_perfer_ext_conn_param_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fixed setting perfer conn params complete event report (v5.3)

See merge request espressif/esp-idf!35747
2024-12-19 19:21:17 +08:00
Rahul Tank
749d70e159 fix(nimble): Corrected link_estab event handling parameters 2024-12-19 16:04:25 +05:30
Erhan Kurubas
9cab2c7796 fix(system): avoid unexcpected hp_sys_wdt reset 2024-12-19 11:58:58 +03:00
Shu Chen
2c786a4b04 Merge branch 'feature/add_rx_buff_statistic_v5.3' into 'release/v5.3'
feat(802.15.4): IEEE802.15.4 add rx buffer statistic (v5.3)

See merge request espressif/esp-idf!35640
2024-12-19 16:21:25 +08:00
Roland Dobai
81010cff35 fix(idf_tools.py): Upgrade pip and setuptools separately
This way the setuptools version dependency resolution will be done by
the upgraded pip.
2024-12-18 12:57:20 +01:00
Shu Chen
1dcb5a0c5d Merge branch 'feature/change_ot_ci_cases_wlan_to_ethernet_v5.3' into 'release/v5.3'
feat(openthread): change wlan to ethernet (Backport v5.3)

See merge request espressif/esp-idf!35741
2024-12-18 19:21:00 +08:00
Erhan Kurubas
854acfca27 change(coredump): include coredump own stack into coredump file 2024-12-18 13:16:13 +03:00
Erhan Kurubas
81affe2c09 change(coredump): make sure consistency with written data and calculated checksum 2024-12-18 13:16:13 +03:00
chenjianhua
fffc222122 fix(bt/bluedroid): Fixed LE channel selection algorithm event reporting 2024-12-18 11:49:52 +08:00
Chen Jian Hua
12efe83588 fix(bt/bluedroid): Fixed setting perfer conn params complete event report
(cherry picked from commit 4b352d1c4f)

Co-authored-by: xuzhekai <xuzhekai@espressif.com>
2024-12-18 11:33:32 +08:00
Island
73c6ff0e94 Merge branch 'bugfix/fix_ble_aa_zero_c3_s3_v5.3' into 'release/v5.3'
fix(bt/ble): Update esp32c3/s3 libbtdm_app.a (555b0a2) (v5.3)

See merge request espressif/esp-idf!35691
2024-12-18 10:46:13 +08:00
Island
14075e8ebf Merge branch 'bugfix/fix_blufi_prepare_write_v5.3' into 'release/v5.3'
fix(blufi): Fixed crash issue in Blufi example during prepare write operation (v5.3)

See merge request espressif/esp-idf!35716
2024-12-18 10:45:58 +08:00
Island
9bf938c904 Merge branch 'docs/add_ble_qualification_table_v5.3' into 'release/v5.3'
docs(ble): Added BLE Qualification Information to API Guides (v5.3)

See merge request espressif/esp-idf!35710
2024-12-18 10:41:15 +08:00
Wei Yu Han
f4bc876b2b docs(ble): Added BLE Qualification Information to API Guides (v5.3) 2024-12-18 10:41:15 +08:00
yiwenxiu
1f5b298c20 feat(openthread): change wlan to ethernet 2024-12-18 10:08:07 +08:00
Marius Vikhammer
224066e99d Merge branch 'ci/docs_master_build_v5.3' into 'release/v5.3'
ci(docs): revert d98e77a4a7 to simplify CI (v5.3)

See merge request espressif/esp-idf!35685
2024-12-18 09:49:27 +08:00
Alexey Gerenkov
a7c987e450 Merge branch 'fix/test_idf_gdb_v5.3' into 'release/v5.3'
test(system): mark gdb test runners properly (v5.3)

See merge request espressif/esp-idf!35587
2024-12-17 21:43:34 +08:00
Island
77d0629ae7 Merge branch 'feat/support_some_vendor_hci_for_qa_v5.3' into 'release/v5.3'
fix(ble): fixed the connect issue when rx error aa on ESP32-C2 (v5.3)

See merge request espressif/esp-idf!35646
2024-12-17 16:49:26 +08:00
Armando
6bb943f0c7 fix(adc): fixed adc_cali_check_scheme wrong return on c2/h2/c6 2024-12-17 16:14:54 +08:00
Zhang Hai Peng
f0d0a4a9fb fix(blufi): Fixed crash issue in Blufi example during prepare write operation
(cherry picked from commit 5acb9c9b5f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-17 16:13:39 +08:00
Marius Vikhammer
f53b071b51 Merge branch 'bugfix/esp_ringbuf_static_analyzer_v5.3' into 'release/v5.3'
fix(ringbuf): fixed logic errors when compiling with CONFIG_COMPILER_STATIC_ANALYZER (v5.3)

See merge request espressif/esp-idf!35301
2024-12-17 16:09:28 +08:00
zhanghaipeng
a50df596ef docs(ble/bluedroid): Optimize BLE example documentation 2024-12-17 11:16:16 +08:00
zhangyanjiao
860ed52a00 fix(ci): Enlarge the pcap memory size in sniffer example 2024-12-17 11:13:40 +08:00
Troy
99341fde59 fix(wifi/mesh): Modify examples/mesh/internal_communication
Delete the secondary judgment of whether it is the root node in the sending task

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

Signed-off-by: zhangyanjiao <zhangyanjiao@espressif.com>
2024-12-17 11:13:32 +08:00
xiongweichao
45890e88e0 fix(ble): fixed that the resolvable private address does not change when light sleep is enabled 2024-12-17 10:52:55 +08:00
zhanghaipeng
f8dc54c026 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(555b0a2)
- Check Access Address when receive connection request PDU
- Fix issue with BLE5.0 duplicate scan for chained packets
2024-12-17 10:52:31 +08:00
Marius Vikhammer
646664328a ci(docs): revert d98e77a4a7 to simplify CI 2024-12-17 10:08:50 +08:00
Marius Vikhammer
f17a9f6cad fix(ringbuf): fixed logic errors when compiling with __clang_analyzer__
We return pdFALSE if prvReceiveGeneric was called with any of the input pointers
as NULL, but pvItem2 and xItemSize2 will only be non-null for split buffers.

Closes https://github.com/espressif/esp-idf/issues/14905
2024-12-17 10:01:32 +08:00
David Čermák
12938e511e Merge branch 'lwip/dns_clear_cache_fix_v5.3' into 'release/v5.3'
fix(lwip): Fixed active DNS entries before clearing cache(v5.3)

See merge request espressif/esp-idf!35003
2024-12-16 22:20:59 +08:00
Mahavir Jain
de65ee55a7 Merge branch 'feature/add_support_for_http_1.0_requests_v5.3' into 'release/v5.3'
feat(esp_http_server): add support to handle HTTP 1.0 requests (v5.3)

See merge request espressif/esp-idf!35660
2024-12-16 22:01:09 +08:00
Jiang Jiang Jian
bbdcff5092 Merge branch 'fix/fix_esp32c2_ld_issue_v53' into 'release/v5.3'
fix(wifi): fix esp32c2 ld issue

See merge request espressif/esp-idf!35609
2024-12-16 20:26:34 +08:00
David Cermak
1ffa52db36 fix(esp_netif): Prevent null deref when checking netif type
Most esp_netif public API check for invalid arguments, but when enabling
PPP the macros to check netif type could potentially dereference
esp_netif without any null-check.

Releted to https://github.com/espressif/esp-idf/issues/14816
2024-12-16 11:15:01 +01:00
David Cermak
b61dc87a68 fix(tcp_transport): Fix websocket header read to handle overflow 2024-12-16 11:14:03 +01:00
Abhik Roy
6d18437d56 fix(lwip): Fixed active DNS entries before clearing cache 2024-12-16 11:03:38 +01:00
nilesh.kale
d48984ad3f feat(esp_http_server): add support to handle HTTP 1.0 requests
This commit adds support to handle HTTP/1.0 requests alongside HTTP/1.1 for
legacy compliance purposes.
2024-12-16 14:10:46 +05:30
Island
a0fdc9f741 Merge branch 'feat/support_bleqabr24_1539_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Added config for saving BLE bonding keys to NVS (v5.3)

See merge request espressif/esp-idf!35603
2024-12-16 14:25:38 +08:00
Zhao Wei Liang
c119c9f6d7 fix(ble): fixed the connect issue when rx error aa on ESP32-C2
(cherry picked from commit 6b01a56e09)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:44 +08:00
Zhao Wei Liang
526d58a40b feat(ble): support some vendor hci commands on ESP32-H2
(cherry picked from commit 15203f9f35)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:42 +08:00
Zhao Wei Liang
5ac570ee2f feat(ble): support some vendor hci commands on ESP32-C6
(cherry picked from commit 5bd66eaa57)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:39 +08:00
Tan Yan Quan
53b3a212a7 feat(802.15.4): add some documentation for txrx statistics and debug record 2024-12-16 10:46:25 +08:00
Tan Yan Quan
6b50795455 feat(802.15.4): IEEE802.15.4 add documentation and refactor component structure 2024-12-16 10:46:25 +08:00
Tan Yan Quan
c667d67248 feat(802.15.4): IEEE802.15.4 add some minor edits for readability 2024-12-16 10:46:25 +08:00
Tan Yan Quan
979e1d86cb feat(802.15.4): IEEE802.15.4 add rx buffer statistic 2024-12-16 10:46:25 +08:00
morris
bfac3bfd16 Merge branch 'feat/allow_to_skip_legacy_driver_conflict_check_v5.3' into 'release/v5.3'
feat(legacy_driver): add kconfig to skip legacy confilct check (v5.3)

See merge request espressif/esp-idf!35616
2024-12-13 18:50:09 +08:00
Island
b024864e4c Merge branch 'fix/ble_mesh_enable_high_duty_itvl_on_nimble_v5.3' into 'release/v5.3'
feat(ble_mesh): select BT_NIMBLE_HIGH_DUTY_ADV_ITVL when using random adv itvl (v5.3)

See merge request espressif/esp-idf!35598
2024-12-13 16:21:51 +08:00
Chen Jichang
5e7e352b5a feat(legacy_driver): add kconfig to skip legacy confilct check 2024-12-12 18:13:53 +08:00
Tomáš Rohlínek
299b93bc9e fix(storage/vfs_console): stop new console opens from overwriting existing fds 2024-12-12 10:01:16 +01:00
wangtao@espressif.com
71c6360648 fix(wifi): fix esp32c2 ld issue 2024-12-12 14:55:33 +08:00
Chen Jian Hua
a8a8df15c2 fix(bt/bluedroid): Fixed failure to get host status when host is not enabled
(cherry picked from commit 23455ea9c2)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-12-12 12:33:39 +08:00
Chen Jian Hua
651568f73a feat(bt/bluedroid): Added config for saving BLE bonding keys to NVS
(cherry picked from commit 6d1160b2e6)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-12-12 12:33:37 +08:00
Luo Xu
01a7db26e2 feat(ble_mesh): select BT_NIMBLE_HIGH_DUTY_ADV_ITVL
(cherry picked from commit 6faf0a59fdcf063d40fc1000a209341318131185)

Co-authored-by: luoxu <luoxu@espressif.com>

(cherry picked from commit a7622efd0c)

Co-authored-by: Luo Xu <luoxu@espressif.com>
2024-12-12 12:23:32 +08:00
gaoxiaojie
da028bce66 fix(soc): fix clic register define and add description 2024-12-12 09:53:18 +08:00
Island
0b7cbb40ca Merge branch 'bugfix/fix_hid_crash_v5.3' into 'release/v5.3'
fix(ble): Fix crash issue during logging (v5.3)

See merge request espressif/esp-idf!35510
2024-12-12 09:06:15 +08:00
Erhan Kurubas
e29f06bb2b change(cmake): use board configuration file for ftdi interface 2024-12-11 18:50:09 +01:00
Erhan Kurubas
b63cafb1a6 test(system): mark gdb test runners properly 2024-12-11 18:50:09 +01:00
David Čermák
0986682ec1 Merge branch 'fix/lwip_ping_ipv6only_v5.3' into 'release/v5.3'
fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration (v5.3)

See merge request espressif/esp-idf!35086
2024-12-11 20:10:29 +08:00
David Cermak
dec5fe5ce2 fix(lwip): Fix ping_v6 receiving to accept only echo replies
This fixes a bug where we ping our own IP and the request itself
bounces back to the raw receive function and is incorrectly treated as
reply. (this bug was discovered when fixing ICMPv6 pings with incorrect
checksums, while the ping request was dropped in icmpv6.c due to wrong
checksum, but was also fed to raw layers where it was treated as
"correct" response, so the PINGv6 to ourselves still worked)
2024-12-11 09:50:59 +01:00
David Cermak
56fb9199f3 fix(common_connect): Fix example's stdin/out to setup UART interrupt once
Function example_configure_stdin_stdout() was used for simple UART I/O
operation in CI to enter test env configuration (wifi ssid, IPs, etc).
It could be called multiple times, but didn't handle the situation where
we install UART interrupt from multiple source (e.g. in ICMP tests,
where we first need to enter wifi credentials of test AP and then we
start ping-cmd console to handle ping commands)
2024-12-11 09:50:59 +01:00
David Cermak
9b129db0cb fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration 2024-12-11 09:50:58 +01:00
Rahul Tank
c46dac6d2a Merge branch 'bugfix/fix_vulnerability_v5.3' into 'release/v5.3'
fix(nimble): Fixes for security vulnerabilities reported in NimBLE (v5.3)

See merge request espressif/esp-idf!35500
2024-12-11 16:44:44 +08:00
David Čermák
8d9d1091c0 Merge branch 'fix/lwip_tcp_pcb_recycle_v5.3' into 'release/v5.3'
fix(lwip): Limit active TCP PCBs and recycle them faster (v5.3)

See merge request espressif/esp-idf!35094
2024-12-11 16:41:22 +08:00
Island
78b9bfe213 Merge branch 'bugfix/fix_bleqabr24_1646_v5.3' into 'release/v5.3'
Fixed BLE creating connection when the connection already exists on ESP32 (v5.3)

See merge request espressif/esp-idf!35046
2024-12-11 14:57:53 +08:00
Jiang Jiang Jian
e5b7c29d48 Merge branch 'bugfix/sae_pk_transition_disable_v5.3' into 'release/v5.3'
fix(wifi): Fix bug in wrong profile checking of AP's RSNXE IE  and other fixes (Backport v5.3)

See merge request espressif/esp-idf!34874
2024-12-11 14:04:02 +08:00
Shu Chen
82d3d24767 Merge branch 'fix/disable_border_agent_default_v5_3' into 'release/v5.3'
fix(openthread): Disable Border Agent features by default(v5.3)

See merge request espressif/esp-idf!35551
2024-12-11 12:17:59 +08:00
Island
270c107c41 Merge branch 'fix/ble_mesh_bugs_fixed_v5.3' into 'release/v5.3'
fix(ble_mesh): Miscellaneous update (v5.3)

See merge request espressif/esp-idf!35426
2024-12-11 11:31:08 +08:00
WanqQixiang
0278cef134 fix(openthread): Disable Border Agent features by default 2024-12-11 10:53:50 +08:00
Shyamal Khachane
c61e3f4dd3 fix(esp_wifi): Populate appropriate reason codes when softAP sends deauthentication
Populate appropriate reason for sending deauthentication when softAP receives
invalid RSN IE from association request
2024-12-10 20:08:02 +05:30
Sarvesh Bodakhe
e2d73046b3 fix(wifi): Fix wrong wifi reason codes reported on station and softAP
- Fix wrong reason code reported when softAP issues a disconnect for station
- Fix wrong reason code reported when association timeout happens at station
- Deprecate enums WIFI_REASON_ASSOC_EXPIRE, WIFI_REASON_NOT_AUTHED, WIFI_REASON_NOT_ASSOCED
  and use WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY,
  WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA,
  WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA respectively
- Update wifi documentation related to reason codes
2024-12-10 20:08:00 +05:30
Sarvesh Bodakhe
55a93548da fix(wpa_supplicant): Fix debug print in wps_start_msg_timer() 2024-12-10 20:07:39 +05:30
Sarvesh Bodakhe
38b015eb77 fix(wifi): Fix bug in wrong profile checking of AP's RSNXE IE 2024-12-10 20:07:34 +05:30
Alexey Gerenkov
083aad99cf Merge branch 'fix/coredump-gcc-analyzer-warnings_v5.3' into 'release/v5.3'
fix(system): fix GCC-14 analyzer warnings for coredump (v5.3)

See merge request espressif/esp-idf!35522
2024-12-10 21:54:56 +08:00
Alexey Gerenkov
9d3917d532 Merge branch 'extend_coredump_tests_v5.3' into 'release/v5.3'
Extend coredump tests v5.3

See merge request espressif/esp-idf!33456
2024-12-10 21:54:42 +08:00
Jiang Jiang Jian
aabab371f9 Merge branch 'fix/fix_esp32c2eco4_wifi_deinit_crash_issue_v53' into 'release/v5.3'
fix(wifi): fix esp32c2eco4 wifi deinit crash issue v53

See merge request espressif/esp-idf!35390
2024-12-10 19:16:35 +08:00
Mahavir Jain
48a7476a1c Merge branch 'bugfix/fix_build_failure_with_tls1_3_only_v5.3' into 'release/v5.3'
fix: Fixed build errors with TLS 1.3 only configuration (v5.3)

See merge request espressif/esp-idf!35260
2024-12-10 16:37:03 +08:00
wangtao@espressif.com
fef3280356 fix(wifi): fix esp32c2eco4 wifi deinit crash issue 2024-12-10 14:35:16 +08:00
Harshit Malpani
83413257af fix(wpa_supplicant): Fix build errors for exclusive TLSv1.3 mbedtls config
Co-authored-by: Sarvesh Bodakhe <sarvesh.bodakhe@espressif.com>
2024-12-10 13:07:44 +08:00
Harshit Malpani
b577f659cd fix: Fixed build errors with TLS 1.3 only configuration 2024-12-10 13:07:44 +08:00
morris
2c9ab21629 Merge branch 'refactor/fine_tune_dphy_pll_v5.3' into 'release/v5.3'
feat(mipi): fine tune DPHY PLL clock (v5.3)

See merge request espressif/esp-idf!35292
2024-12-10 11:36:03 +08:00
Erhan Kurubas
dfc248d66d change(tools): enhance expect_reg_dump to support any or specific core values 2024-12-09 16:23:39 +01:00
Erhan Kurubas
ef14d7ab64 test(coredump): fix failed core dump tests 2024-12-09 15:52:59 +01:00
Erhan Kurubas
5f3d3f5e92 ci(panic): extend extram_stack tests 2024-12-09 15:52:59 +01:00
Erhan Kurubas
1848079dec fix(coredump): properly save task's stack when stack is located in PSRAM 2024-12-09 15:52:58 +01:00
Erhan Kurubas
c753271de1 ci(panic): add coredump tcb corrupted test 2024-12-09 15:52:58 +01:00
Erhan Kurubas
8bfabe711a fix(espcoredump): prevent null pointer dereference in panic reason handling 2024-12-09 15:15:51 +01:00
Erhan Kurubas
512b16a7bd fix(espcoredump): fix incorrect pointer usage in checksum update call 2024-12-09 15:15:51 +01:00
Alexey Lapshin
bf45c56825 fix(espcoredump): fix GCC-14 analyzer warnings for coredump 2024-12-09 15:15:51 +01:00
zhanghaipeng
6718fc73b1 feat(bt): Add support for converting BT HCI logs to btsnoop format 2024-12-09 17:55:37 +08:00
Zhang Hai Peng
a91f9b2395 fix(blufi): Fixed blufi init fail after deinit
(cherry picked from commit 7addb57ccd)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-09 17:45:30 +08:00
Jiang Jiang Jian
369befb8fc Merge branch 'fix/add_sbom_exception_v5.3' into 'release/v5.3'
Add an exception in wpa_supplicant sbom.yml (Backport v5.3)

See merge request espressif/esp-idf!35063
2024-12-09 17:22:18 +08:00
Zhang Hai Peng
338b3744e6 fix(ble): Fixed crash in BLE HID host example during logging
(cherry picked from commit ab1e3c1ffd)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-09 17:15:08 +08:00
Jiang Jiang Jian
6adf3f7f5a Merge branch 'bugfix/wps_ie_reset_v53' into 'release/v5.3'
fix(wifi): Remove WPS IEs once WPS succeeds(v5.3)

See merge request espressif/esp-idf!35077
2024-12-09 17:08:56 +08:00
Luo Xu
2178c6a8f2 fix(ble_mesh): Miscellaneous update
(cherry picked from commit 589ebfc1d6)

Co-authored-by: luoxu <luoxu@espressif.com>
2024-12-09 16:57:11 +08:00
David Cermak
33a3722788 fix(lwip): Limit active TCP PCBs and recycle them faster
* Update submodule: git log --oneline c816f0ee..a587d929
Detailed description of the changes:
  - test: Add tcp-pcb recycle test (espressif/esp-lwip@a587d929)
  - tcp: Apply faster PCB recycling in FIN_WAIT_1 or FIN_WAIT_2 state (espressif/esp-lwip@3bfc85d2)
  - test: Add tcp alloc limitation test (espressif/esp-lwip@0c9c39a9)
  - memp: Employ TCP-PCB allocation limit if libc malloc used (espressif/esp-lwip@9cb96ac1)

Closes https://github.com/espressif/esp-idf/issues/9670
Closes https://github.com/espressif/esp-lwip/pull/63
2024-12-09 15:46:39 +08:00
Jiang Jiang Jian
e84fb07383 Merge branch 'fix/ws_transport_head_fragments_v5.3' into 'release/v5.3'
fix(ws_transport): Fix reading WS header in fragments (v5.3)

See merge request espressif/esp-idf!35089
2024-12-09 15:43:37 +08:00
Jiang Jiang Jian
ecda30011c Merge branch 'fix/ble_mesh_heartbeat_bug_v5.3' into 'release/v5.3'
fix(ble_mesh): fixed heartbeat issue (v5.3)

See merge request espressif/esp-idf!34965
2024-12-09 15:41:57 +08:00
Jiang Jiang Jian
075e6d8cad Merge branch 'fix/update_ping_cmd_version_v5.3' into 'release/v5.3'
update: Update ping-cmd component to v1.0.0 (v5.3)

See merge request espressif/esp-idf!35013
2024-12-09 15:41:19 +08:00
Jiang Jiang Jian
e3940cb354 Merge branch 'feat/add_profile_state_event_v5.3' into 'release/v5.3'
feat(bt/bluedroid): added events to indicate the profile states of HFP (v5.3)

See merge request espressif/esp-idf!35149
2024-12-09 15:39:57 +08:00
Jiang Jiang Jian
e797b89583 Merge branch 'ci/wifi_power_save_got_ip_time_v5.3' into 'release/v5.3'
ci: increase test_wifi_power_save got ip timeout

See merge request espressif/esp-idf!35184
2024-12-09 15:39:07 +08:00
Jiang Jiang Jian
2cb1dbd0de Merge branch 'bugfix/fix_ble_ke_mem_267_assert_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed BLE assert ke_mem.c line 267 on ESP32-C3 and ESP32-S3 (backport v5.3)

See merge request espressif/esp-idf!35337
2024-12-09 15:36:10 +08:00
Jiang Jiang Jian
4230ea6478 Merge branch 'docs/update_vscode_extension_link_v5.3' into 'release/v5.3'
docs: Update vscode extension link in get started (v5.3)

See merge request espressif/esp-idf!35303
2024-12-09 15:34:31 +08:00
Jiang Jiang Jian
42ef2887f4 Merge branch 'fix/fix_regdma_wait_node_issue_v5.3' into 'release/v5.3'
fix(esp_driver_gptimer): do gptimer retention by timer unit rather than timer group (v5.3)

See merge request espressif/esp-idf!35358
2024-12-09 15:27:24 +08:00
Jiang Jiang Jian
bfe4d479ae Merge branch 'bugfix/chip823_pll_bug_v5.3' into 'release/v5.3'
fix(H2):fix pll low temp bug(v5.3)

See merge request espressif/esp-idf!35241
2024-12-09 15:24:27 +08:00
Jiang Jiang Jian
e1c1befc7d Merge branch 'bugfix/fix_c2_light_sleep_coex_v5.3' into 'release/v5.3'
fix(ble): fix ble light sleep error on esp32c2 (v5.3)

See merge request espressif/esp-idf!35055
2024-12-09 15:23:53 +08:00
chenjianhua
e881a8fdec fix(bt): Update bt lib for ESP32(c3082c4)
- Fixed BLE creating connection when the connection already exists
2024-12-09 15:03:45 +08:00
Jiang Jiang Jian
e2671cb9eb Merge branch 'bugfix/fix_bandwidth_show_unknown' into 'release/v5.3'
fix(wifi): fix ap bandwidth is unknown in scan results

See merge request espressif/esp-idf!35004
2024-12-09 14:04:17 +08:00
morris
c7c4d33311 Merge branch 'refactor/cp_dma_use_gdma_link_v5.3' into 'release/v5.3'
refactor(cp_dma): to use gdma_link driver for descriptor config (v5.3)

See merge request espressif/esp-idf!35444
2024-12-09 13:57:38 +08:00
Rahul Tank
c0828595ff fix(nimble): Fixes for security vulnerabilities reported in NimBLE 2024-12-09 10:13:41 +05:30
morris
e3a628e1db Merge branch 'feature/efuse_s3_adds_psram_cap_bit_v5.3' into 'release/v5.3'
feat(efuse): Adds 3 bit for PSRAM_CAP efuse field (v5.3)

See merge request espressif/esp-idf!35121
2024-12-09 10:20:57 +08:00
morris
c7529d7c94 Merge branch 'bugfix/test_esp_flash_write_v5.3' into 'release/v5.3'
fix(spi_flash): Fix Test esp_flash_write (v5.3)

See merge request espressif/esp-idf!35385
2024-12-09 10:20:32 +08:00
morris
92b06b4b9a Merge branch 'feature/usb_host_hubs_support_msg_backport_v5.3' into 'release/v5.3'
feat(hub): Added notification when hubs support is disabled (backport to v5.3)

See merge request espressif/esp-idf!35454
2024-12-09 10:20:08 +08:00
morris
e673b17d51 Merge branch 'contrib/github_pr_14767_v5.3' into 'release/v5.3'
fix(gptimer): race on FSM state in gptimer_start() (GitHub PR) (v5.3)

See merge request espressif/esp-idf!35135
2024-12-09 10:15:01 +08:00
morris
85ce7c15ce Merge branch 'feat/mipi_dsi_underrun_error_v5.3' into 'release/v5.3'
feat(mipi_dsi): enable underrun error interrupt (v5.3)

See merge request espressif/esp-idf!34981
2024-12-09 10:14:12 +08:00
morris
4cd2ba46c3 Merge branch 'change/esp_ldo_reserve_for_spi_flash_v5.3' into 'release/v5.3'
LDO calibration on ESP32-P4 (v5.3)

See merge request espressif/esp-idf!34865
2024-12-09 10:07:51 +08:00
Shu Chen
e3ad294826 Merge branch 'fix/add_delay_before_command_in_ot_ci_case_v5.3' into 'release/v5.3'
feat(openthread): add delay before execute wifi command in openthread ci cases (Backport v5.3)

See merge request espressif/esp-idf!35421
2024-12-09 09:40:05 +08:00
Rahul Tank
8b9f7cb368 Merge branch 'fix/hci_err_code_def_v5.3' into 'release/v5.3'
fix: Added a function for printing HCI error definition (v5.3)

See merge request espressif/esp-idf!35085
2024-12-08 22:31:11 +08:00
morris
3946fbb142 Merge branch 'feat/dynamic_usb_hal_backport_v5.3' into 'release/v5.3'
feat(hal/usb): Make USB-DWC HAL&LL configuration independent backport v5.3

See merge request espressif/esp-idf!34811
2024-12-07 23:19:56 +08:00
Roland Dobai
cd3d85ae4b Merge branch 'fix/execute-gdb-without-built-app_v5.3' into 'release/v5.3'
tools: fix idf.py gdb execution in case app was not built (v5.3)

See merge request espressif/esp-idf!35490
2024-12-07 14:28:47 +08:00
Astha Verma
8060769801 fix(nimble): Added a function for printing HCI error definition 2024-12-07 07:55:45 +05:30
Rahul Tank
89cf76a45d Merge branch 'feat/pts_changes_5.3' into 'release/v5.3'
feat(nimble): BLE 5.4 PTS Related Features and Fixes (v5.3)

See merge request espressif/esp-idf!34976
2024-12-07 09:26:18 +08:00
Alexey Lapshin
782e04e2dc fix(tools): fix idf.py gdb execution in case app was not built 2024-12-06 23:34:54 +07:00
Abhinav Kudnar
03655d6d67 feat(nimble): Added PAwR support for nimble with IDF examples 2024-12-06 21:09:04 +05:30
Sumeet Singh
8b7cb01545 fix(nimble): Added
1. Option to disable automatic discovery when receiving out-of-sync
2. Fixed bugs related to robust caching
2024-12-06 21:08:47 +05:30
Sumeet Singh
a33bfe628f feat(nimble): Added ways to enable/disable some menuconfig options at runtime 2024-12-06 21:08:47 +05:30
Sumeet Singh
c56a0e45c8 feat(nimble): Added option to disable automatically sending extra credits to peer 2024-12-06 21:08:47 +05:30
Sumeet Singh
0253aad7c6 feat(nimble): Added support for persisting csf characteristic for bonded devices 2024-12-06 21:08:47 +05:30
Sumeet Singh
c3911c4817 feat(nimble): Added option in menuconfig to enable Secure Connections Only mode 2024-12-06 21:08:47 +05:30
Sumeet Singh
5d8f076745 fix(nimble): fix and enable connection subrating 2024-12-06 21:08:47 +05:30
Sumeet Singh
360e9e20d8 fix(nimble): Added option to enable code under Enhanced COC 2024-12-06 21:08:47 +05:30
Sumeet Singh
c74465664d fix(nimble): Fixed Device Information and Scan Parameters service 2024-12-06 21:08:46 +05:30
Sumeet Singh
9f1c2cad6e fix(nimble): Fixed encrypted advertisement data example 2024-12-06 21:08:46 +05:30
Sumeet Singh
355155b39d feat(nimble): Added LE GATT Security Levels Characteristic 2024-12-06 21:08:46 +05:30
Sumeet Singh
62265b90c0 feat(nimble): Added support for EATT Credit Based Flow Control Mode 2024-12-06 21:08:46 +05:30
Rahul Tank
63ca3b296d Merge branch 'bugfix/change_hci_cb_logging_v5.3' into 'release/v5.3'
fix(nimble): Replace ESP_LOG* with esp_rom_printf in controller context callback (v5.3)

See merge request espressif/esp-idf!35028
2024-12-06 23:32:37 +08:00
Rahul Tank
8f24c221cb Merge branch 'bugfix/memory_issue_v5.3' into 'release/v5.3'
fix(nimble): Nimble Error logs in case of memory overflow/failure (v5.3)

See merge request espressif/esp-idf!34998
2024-12-06 23:09:07 +08:00
Island
0a49e286df Merge branch 'bugfix/fix_ble_creat_conn_fail_enh_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type (v5.3)

See merge request espressif/esp-idf!35018
2024-12-06 22:40:54 +08:00
Roland Dobai
0a62a9078c Merge branch 'change/sysview_test_config_v5.3' into 'release/v5.3'
change(sysview): run heap_log tracing tests on existing cores (v5.3)

See merge request espressif/esp-idf!35196
2024-12-06 19:56:48 +08:00
Roland Dobai
22162a45e9 Merge branch 'feature/move-gdb-options-to_project_description_json_v5.3' into 'release/v5.3'
feat(debugging): move gdbinit generation to CMake (v5.3)

See merge request espressif/esp-idf!35176
2024-12-06 19:29:12 +08:00
Kapil Gupta
3a8cf533bc fix(wifi): Remove WPS IEs once WPS succeeds 2024-12-06 18:54:35 +08:00
morris
8b18991b0a refactor(cp_dma): to use gdma_link driver for descriptor config 2024-12-06 18:40:41 +08:00
morris
120c2b0d12 Merge branch 'bugfix/uart_vfs_read_behavior_v5.3' into 'release/v5.3'
fix(uart_vfs): read() now aligned to POSIX defined behavior (v5.3)

See merge request espressif/esp-idf!35393
2024-12-06 18:38:24 +08:00
yiwenxiu
0e2c916ec5 feat(openthread): add delay before execute wifi command in openthread ci cases 2024-12-06 18:27:10 +08:00
Island
69e8c4a0c5 Merge branch 'bugfix/add_aa_check_on_esp32c2_and_esp32c6_v5.3' into 'release/v5.3'
Bugfix/add aa check on esp32c2 and esp32c6 (v5.3)

See merge request espressif/esp-idf!35233
2024-12-06 17:55:14 +08:00
Roland Dobai
3a3396dcc1 Merge branch 'feat/size_unify_sections_v5.3' into 'release/v5.3'
feat(tools): unify sections in idf.py size reports for NG version (v5.3)

See merge request espressif/esp-idf!34856
2024-12-06 17:35:38 +08:00
Roland Dobai
5ce9a7f07d Merge branch 'fix/import_error_msg_v5.3' into 'release/v5.3'
fix(tools): re-raise ImportError without module name (v5.3)

See merge request espressif/esp-idf!35074
2024-12-06 17:35:26 +08:00
Sergei Silnov
a60a4da3f8 Merge branch 'ci/pre-commit-idf-build-apps-version_v5.3' into 'release/v5.3'
ci: update idf-build-apps version in pre-commit (v5.3)

See merge request espressif/esp-idf!35467
2024-12-06 17:10:07 +08:00
morris
a720fdcbf5 Merge branch 'fix/suspend_ci_v5.3' into 'release/v5.3'
test(spi_flash): Fix some failing test related to spi flash (backport v5.3)

See merge request espressif/esp-idf!35155
2024-12-06 17:05:15 +08:00
morris
ca6ade86d1 Merge branch 'fix/fix_esp32_pico_v3_psram_not_ignored_issue_v5.3' into 'release/v5.3'
psram: fixed esp32p pico-v3 psram init not ignored issue (v5.3)

See merge request espressif/esp-idf!35378
2024-12-06 17:04:46 +08:00
morris
0a47570126 Merge branch 'fix/adc_monitor_not_work_v5.3' into 'release/v5.3'
fix(esp_adc): fixed adc continue monitor don't work issue (v5.3)

See merge request espressif/esp-idf!35166
2024-12-06 17:04:19 +08:00
morris
75a9b80bd4 Merge branch 'fix/spi_enable_p4_c5_test_v5.3' into 'release/v5.3'
fix(driver_spi): enable p4 test (v5.3)

See merge request espressif/esp-idf!34281
2024-12-06 17:03:38 +08:00
morris
491c54fbae Merge branch 'fix/i2s_enable_test_p4_c5_multi_v5.3' into 'release/v5.3'
test(driver_i2s): p4 and c5 enable multi dut test (v5.3)

See merge request espressif/esp-idf!34238
2024-12-06 17:02:57 +08:00
morris
d93ebf3e9c feat(mipi_dsi): enable underrun error interrupt 2024-12-06 17:00:05 +08:00
lsita
2a51849dc2 fix(gptimer): race condition between start and stop
Merges https://github.com/espressif/esp-idf/pull/14767
2024-12-06 16:59:58 +08:00
Rahul Tank
40ce8d7f97 Merge branch 'bugfix/fix_esp_hid_host_compilation_v5.3' into 'release/v5.3'
fix(nimble): Fix compilation issue in esp_hid_host example (v5.3)

See merge request espressif/esp-idf!35308
2024-12-06 16:32:33 +08:00
morris
0fa1c0e513 Merge branch 'feat/mcpwm_dead_time_add_warning_v5.3' into 'release/v5.3'
fix(mcpwm): add warning about generator deadtime (v5.3)

See merge request espressif/esp-idf!34730
2024-12-06 16:14:34 +08:00
morris
90399d0d5c Merge branch 'feat/parlio_sleep_retention_v5.3' into 'release/v5.3'
fix(parlio): fix spelling error in reg_base.h (v5.3)

See merge request espressif/esp-idf!34736
2024-12-06 16:14:05 +08:00
morris
1503d0f80f Merge branch 'feat/mcpwm_sleep_rentention_v5.3' into 'release/v5.3'
fix(mcpwm): fix mcpwm register offset on p4 (v5.3)

See merge request espressif/esp-idf!34803
2024-12-06 16:13:28 +08:00
morris
26545860f7 feat(ldo): load calibration parameters from efuse 2024-12-06 16:12:43 +08:00
morris
3abe326490 Merge branch 'feature/adds_efuse_adc_calib_data_v5.3' into 'release/v5.3'
feat(efuse): Adds efuse ADC calib data for P4 C5 C61 (v5.3)

See merge request espressif/esp-idf!35119
2024-12-06 16:12:31 +08:00
morris
50f41592ed Merge branch 'fix/fix_jpeg_decode_info_v5.3' into 'release/v5.3'
fix(jpeg_decoder): Fix jpeg decoder get picture information (backport v5.3)

See merge request espressif/esp-idf!35158
2024-12-06 16:12:02 +08:00
Wang Meng Yang
6c02672a3d Merge branch 'bugfix/sdp_get_uuid_error_v5.3' into 'release/v5.3'
fix(bt/bluedroid): fixed issues introduced by byte alignment(v5.3)

See merge request espressif/esp-idf!35251
2024-12-06 16:04:09 +08:00
chenjianhua
561307a6bf feat(ble/bluedroid): Support setting connection params when creating connection 2024-12-06 15:51:33 +08:00
Shu Chen
2ecc042d30 Merge branch 'backport/2015_enhack_v53' into 'release/v5.3'
fix(802.15.4): add case for 2015 frame enh-ack (Backport v5.3)

See merge request espressif/esp-idf!34953
2024-12-06 15:51:28 +08:00
zhanghaipeng
3a85b1b6ce fix(ble/bluedroid): Optimize BLE API "esp_ble_gattc_enh_open" 2024-12-06 15:50:50 +08:00
Shu Chen
91fc7e9484 Merge branch 'fix/enhance_wifi_connection_check_in_ot_ci_case_v5.3' into 'release/v5.3'
feat(openthread): enhance wifi connection check in openthread ci cases (Backport v5.3)

See merge request espressif/esp-idf!35163
2024-12-06 15:50:45 +08:00
zhanghaipeng
2904494228 fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type 2024-12-06 15:50:43 +08:00
Shu Chen
3a4396b7d9 Merge branch 'fix/fix_a_naming_error_of_esp_radio_spinel_v53' into 'release/v5.3'
Backport openthread related features to 5.3

See merge request espressif/esp-idf!35040
2024-12-06 15:50:35 +08:00
Shu Chen
6bedf6cdad Merge branch 'fix/add_network_reconnectin_in_ot_ci_case_v5.3' into 'release/v5.3'
feat(openthread): flush ipv6 addr in openthread ci cases(Backport v5.3)

See merge request espressif/esp-idf!34674
2024-12-06 15:50:13 +08:00
Abhinav Kudnar
a6b7edc414 fix(nimble): Nimble Error logs in case of memory overflow/failure 2024-12-06 13:20:11 +05:30
Rahul Tank
d3be7130e0 Merge branch 'feature/remove_min_max_def_v5.3' into 'release/v5.3'
fix(nimble): Removed min/max macro definition from os.h (v5.3)

See merge request espressif/esp-idf!34910
2024-12-06 15:44:54 +08:00
morris
1ddebd1f62 Merge branch 'contrib/github_pr_14859_v5.3' into 'release/v5.3'
fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register (GitHub PR) (v5.3)

See merge request espressif/esp-idf!34876
2024-12-06 15:42:45 +08:00
morris
59a7d3782c Merge branch 'change/p4_sd_runner_no_use_usj_v5.3' into 'release/v5.3'
ci(sd): use uart0 as usj always serial noise on ci on p4 (v5.3)

See merge request espressif/esp-idf!35193
2024-12-06 15:41:27 +08:00
Mahavir Jain
ecc5f36e49 Merge branch 'fix/fetch_image_hdr_v5.3' into 'release/v5.3'
fix(esp_system): Correct address used to fetch application image header (v5.3)

See merge request espressif/esp-idf!34628
2024-12-06 15:36:53 +08:00
Mahavir Jain
796355150e Merge branch 'fix/aes_cache_failure_when_l2_cache_line_size_greater_than_l1_cache_v5.3' into 'release/v5.3'
Fix memory corruption caused due to unaligned external memory buffers sync in AES (v5.3)

See merge request espressif/esp-idf!35065
2024-12-06 15:36:11 +08:00
Mahavir Jain
8ce6ba18da Merge branch 'bugfix/ota_failed_with_openssl_3.0.2_v5.3' into 'release/v5.3'
fix(esp_http_client): Fix ota failure with openssl server (v5.3)

See merge request espressif/esp-idf!35066
2024-12-06 15:35:59 +08:00
Island
52066e6f46 Merge branch 'feat/optimize_cble50y24_110_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Added BLE 5.0 throughput examples (v5.3)

See merge request espressif/esp-idf!35009
2024-12-06 15:32:50 +08:00
Wang Meng Yang
b9c4d3f8c7 Merge branch 'bugfix/disconn_sdp_upon_wrong_data_v5.3' into 'release/v5.3'
fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response (v5.3)

See merge request espressif/esp-idf!35144
2024-12-06 15:31:00 +08:00
Wang Meng Yang
0001696a58 Merge branch 'bugfix/rx_invalid_cmd_err_code_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fixed the incorrect error code returned when receiving an invalid command(v5.3)

See merge request espressif/esp-idf!34991
2024-12-06 15:30:43 +08:00
Wang Meng Yang
633dbb38cd Merge branch 'bugfix/lmp_trans_collision_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed some controller bugs on ESP32 (v5.3)

See merge request espressif/esp-idf!34945
2024-12-06 15:30:21 +08:00
igor.udot
1c93e5d35a ci: update idf-build-apps version in pre-commit 2024-12-06 11:57:39 +08:00
Marius Vikhammer
9a6aba7401 Merge branch 'update/version_5_3_2' into 'release/v5.3'
Update version to 5.3.2

See merge request espressif/esp-idf!35449
2024-12-06 09:44:36 +08:00
shenmengjing
3c4464632f docs: Update CN translation for docs in jtag-degugging 2024-12-06 05:07:52 +08:00
Alexey Lapshin
3af39a0ab0 feat(debugging): move gdbinit generation to CMake
This feature is useful for 3rd-party software to run GDB with predefined
options that described in project_description.json file

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

  --gdb-commands: command line arguments for gdb. (without changes)
  -ex: pass command to gdb.
  -x: pass gdbinit file to gdb. Alias for old --gdbinit command
2024-12-06 05:07:52 +08:00
Roman Leonov
ad9419c2ae feat(hub): Added notification when hubs support is disabled 2024-12-05 10:31:05 +01:00
Marius Vikhammer
9d7f2d69f5 change(version): Update version to 5.3.2 2024-12-05 15:30:21 +08:00
Jin Cheng
4643ceb78a fix(bt/bluedroid): fixed access NULL in HFP callback handler 2024-12-05 13:23:07 +08:00
Jiang Jiang Jian
a24dc94030 Merge branch 'fix/fix_modem_module_clock_missing_after_ota_v5.3' into 'release/v5.3'
fix(esp_system): deselect all modem modules lp clock source selection before clk initialization (v5.3)

See merge request espressif/esp-idf!34924
2024-12-05 10:48:25 +08:00
Armando
7b770e5230 fix(psram): fixed esp32p pico-v3 psram init not ignored issue 2024-12-04 10:49:01 +08:00
Song Ruo Jing
32c17b419a fix(uart_vfs): read() now aligned to POSIX defined behavior
- For blocking mode, block until data available
- Return with the bytes available in the file at the time,
  it should not block until reaching the requested size

And read() should not realy return on the newline character
Closes https://github.com/espressif/esp-idf/issues/14155
2024-12-03 16:32:27 +08:00
Konstantin Kondrashov
3e4fa69113 fix(spi_flash): Fix Test esp_flash_write 2024-12-03 09:55:18 +02:00
wuzhenghui
1a23d3cd53 fix(esp_driver_gptimer): do gptimer retention by timer unit rather than timer group 2024-12-03 10:44:56 +08:00
wuzhenghui
97d9f01134 fix(esp_hw_support): remove p4 wdt retention on entry2 2024-12-02 17:44:53 +08:00
wuzhenghui
57aa7fece9 fix(esp_hw_support): fix retention link dump helper functions 2024-12-02 17:44:53 +08:00
Li Shuai
2c31e2b118 fix(esp_hw_support): fix the issue of regdma wait node to immediately return to done 2024-12-02 17:44:48 +08:00
zhiweijian
044ae88fac fix(bt/controller): Fixed BLE assert ke_mem.c line 267 on ESP32-C3 and ESP32-S3 2024-12-02 16:04:35 +08:00
Chen Yudong
00cd226fd4 ci: increase test_wifi_power_save got ip timeout 2024-12-02 14:57:39 +08:00
Rahul Tank
bdafa320c3 fix(nimble): Fix compilation issue in esp_hid_host example 2024-11-29 15:23:27 +05:30
Laukik Hase
4acc6d3482 fix(esp_system): Correct address used to fetch application image header 2024-11-29 17:42:01 +08:00
luweike
581c30d3af docs: Update vscode extension link in get started 2024-11-29 16:06:31 +08:00
morris
6f992acf31 feat(mipi): fine tune DPHY PLL clock 2024-11-29 10:04:38 +08:00
Konstantin Kondrashov
524dbd1fee feat(efuse): Adds 3 bit for PSRAM_CAP efuse field 2024-11-28 17:04:53 +02:00
xiongweichao
5bc5695ff0 fix(bt/bluedroid): fixed issues introduced by byte alignment
- esp_bt_uuid_t is byte aligned, tBT_UUID is 4-byte aligned.
2024-11-28 10:16:06 +08:00
zlq
0e37fdd1b0 fix: fix pll low temp bug (v5.3) 2024-11-27 19:17:48 +08:00
wuzhenghui
7563ae5e70 fix(esp_system): deselect all modem modules clk source selection before clk init 2024-11-27 17:02:53 +08:00
zwl
f776fa729f fix(ble): fixed the connect issue when rx error aa on ESP32-C6 2024-11-27 16:22:01 +08:00
Zhao Wei Liang
9f98a81bd2 fix(ble): fixed the connect issue when rx error aa on ESP32-H2
(cherry picked from commit 093b65e27c)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-11-27 16:03:44 +08:00
yiwenxiu
d78f993d01 feat(openthread): enhance wifi connection check in openthread ci cases 2024-11-27 15:47:12 +08:00
Chen Jian Hua
6e6c97fde4 feat(bt/bluedroid): Added BLE 5.0 throughput examples
(cherry picked from commit 6d3a82eecf)

Co-authored-by: zhangbowen <zhangbowen@espressif.com>
2024-11-27 11:14:33 +08:00
Chen Yudong
2833b442d4 ci: increase test_wifi_power_save got ip timeout 2024-11-26 20:17:29 +08:00
Erhan Kurubas
e2db600c8c fix(sysview): add prefix to the module desc to avoid stuck in Segger SystemView app
Closes https://github.com/espressif/esp-idf/issues/10483
2024-11-26 10:56:02 +01:00
Armando
938c77ebea change(sdmmc): allow speciying pins for IOMUX slots as well 2024-11-26 17:44:17 +08:00
Armando
6c210c4930 test(emmc): disabled emmc tests on p4 2024-11-26 17:44:17 +08:00
Armando
60720adb03 ci(sd): use uart0 as usj always serial noise on ci on p4 2024-11-26 17:43:27 +08:00
Erhan Kurubas
235168e558 change(sysview): support single/dual core targets in heap_trace_log test 2024-11-26 08:49:46 +01:00
Armando
8cf7188e7c test(sd): no uhs1 runner 2024-11-26 15:13:22 +08:00
Konstantin Kondrashov
a593f41b25 feat(efuse): Adds efuse ADC calib data for ESP32-C61 2024-11-25 17:05:48 +02:00
Jin Cheng
c1324755aa feat(bt/bluedroid): added events to indicate the profile states of HFP 2024-11-25 16:51:04 +08:00
wanckl
99f7733d8e fix(esp_adc): fixed adc continue monitor don't work issue
Closes https://github.com/espressif/esp-idf/issues/14769
Closes https://github.com/espressif/esp-idf/issues/14814
2024-11-25 15:48:11 +08:00
C.S.M
1a1fb67b7f fix(jpeg_decoder): Fix jpeg decoder get picture information 2024-11-25 14:42:40 +08:00
C.S.M
286bf6b096 fix(jpeg): Fix the length of com marker 2024-11-25 14:42:40 +08:00
Xu Si Yu
56aaf05ac1 feat(openthread): adjusted the default macro configurations of openthread 2024-11-25 14:34:10 +08:00
C.S.M
ee6f31b279 test(spi_flash): Fix some failing test related to spi flash 2024-11-25 14:28:01 +08:00
Xu Si Yu
2c4b02e64c feat(openthread): support using custom header file 2024-11-25 12:32:54 +08:00
Jin Cheng
fddec5d90e fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response 2024-11-25 10:19:38 +08:00
Tomas Rezucha
177679b74e feat(hal/usb): Make USB-DWC HAL&LL configuration independent
Previously, we included symbols from soc/usb_dwc_cfg.h and configured
the HAL and LL according to it. Now we get the configuration in runtime
from USB-DWC registers.

Added missing definition for USB FS peripheral on ESP32-P4.
2024-11-22 17:32:22 +08:00
Tomas Rezucha
1d5a8f6952 feat(hal/usb): Add USB UTMI PHY HAL
* Add a bare-bones HAL API for the USB UTMI PHY
* Split USB-DWC LL per target
2024-11-22 17:32:22 +08:00
Tomas Rezucha
7019a9f61c feat(soc/usb): Add USB related changes to soc_caps and usb_dwc_periph
This commit changes the following:

- Add types and data structures indicating the available USB controllers
for each target.
2024-11-22 17:32:22 +08:00
Jin Cheng
ef4559a09d fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed wrong logic in handling sniff transaction collision at slave
      side
    - Fixed the issue ACL is stopped too early before eSCO
2024-11-22 17:27:40 +08:00
Jin Cheng
c160316961 fix(bt/bluedroid): AG should send OK or other error codes to HF client
when it is driven by HF to initiate a call.
2024-11-22 17:27:40 +08:00
Konstantin Kondrashov
427e8e5fe4 feat(efuse): Adds efuse ADC calib data for ESP32-C5 2024-11-22 08:10:15 +02:00
Konstantin Kondrashov
b4ebb04184 feat(efuse): Adds efuse ADC calib data for ESP32-P4 2024-11-22 08:10:15 +02:00
Roman Leonov
823eff4553 docs(ext_port): Maintainers Notes for the External Port Driver 2024-11-21 12:57:40 +01:00
Richard Allen
14635c6e1f fix(ws_transport): Fix reading WS header bytes
Correct split header bytes

When the underlying transport returns header,
length, or mask bytes early, again call the
underlying transport.

This solves the WS parser getting offset when
the server sends a burst of frames where the
last WS header is split across packet boundaries,
so fewer than the needed bytes may be available.

Merges https://github.com/espressif/esp-idf/pull/14706
2024-11-21 10:39:38 +01:00
Frantisek Hrbata
8d768f675b fix(tools): re-raise ImportError without module name
The ImportError or ModuleNotFoundError might be raised without
specifying a module name. In this not so common situation, re-raise the
exception to print all the information that could assist in identifying
the problem.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-21 09:37:22 +01:00
nilesh.kale
d5237f09d5 fix(esp_http_client): Fix ota failure with openssl server
If the TLS server (e.g., openssl) closes connection with encrypted close-notify alert
then `errno` is not explicitly set on the socket by LwIP stack.
For this scenario, we must rely only on `ERR_TCP_TRANSPORT_CONNECTION_CLOSED_BY_FIN`
return value as the connection close case and do the graceful connection closure.

Closes https://github.com/espressif/esp-idf/issues/14724
2024-11-21 12:36:11 +05:30
harshal.patil
ea5c318031 fix(mbedtls/aes): Fix external memory corruption caused due to unaligned length cache sync
Fixes the memory corruption issue that arises due to external memory cache sync of unaligned
length bytes when L2 cache line size is greater than the L1 cache line size
2024-11-21 12:16:18 +05:30
Nachiket Kukade
78b5ff0750 fix(wpa_supplicant): Add an exception in wpa_supplicant sbom.yml 2024-11-21 11:52:05 +05:30
Jin Chen
cb9e8a3b31 fix(ble): change ld for ble scan coex issue
(cherry picked from commit dd499d7b2e)

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

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-21 11:03:46 +08:00
Daniel Mangum
6db2b4c1ad fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register
Fixes issue where ESP_ERR_NO_MEM was being silently discarded after
cleaning up after a failed malloc in usb_host_client_register.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-11-20 21:07:54 +08:00
Xu Si Yu
0245561d65 fix(openthread): fix a naming error of esp radio spinel 2024-11-20 15:44:04 +08:00
Rahul Tank
a76ecf7384 fix(nimble): Replace ESP_LOG* with esp_rom_printf in controller context callback 2024-11-19 17:40:46 +05:30
Luo Xu
946b9fd6c1 fix(ble_mesh): fixed heartbeat issue
(cherry picked from commit 167cd4762b)

Co-authored-by: luoxu <luoxu@espressif.com>
2024-11-19 18:03:25 +08:00
Chen Jichang
0526a285ed fix(mcpwm): fix mcpwm register offset on p4 2024-11-19 17:49:39 +08:00
yiwenxiu
e56baaed71 feat(openthread): flush ipv6 addr in openthread ci cases 2024-11-19 15:47:59 +08:00
laokaiyao
0a19d9ed71 ci(i2s): fix the potential overflow in multi_dev test 2024-11-19 15:32:57 +08:00
wanckl
e441ad4107 test(driver_i2s): p4 and c5 enable multi dut test 2024-11-19 11:50:05 +08:00
Chen Yudong
e7b6e57134 change: Update ping-cmd component to v1.0.0 2024-11-19 11:38:24 +08:00
Chen Jichang
45ca614851 fix(mcpwm): add warning about generator deadtime
Closes https://github.com/espressif/esp-idf/issues/14773
2024-11-19 11:00:38 +08:00
Chen Jichang
6a22acc02f fix(parlio): fix spelling error in reg_base.h 2024-11-19 11:00:22 +08:00
xiongweichao
82ef0a6b94 fix(bt/bluedroid): Fixed the incorrect error code returned
when receiving an invalid command
2024-11-19 07:11:20 +08:00
yinqingzhao
f74a170a2d fix(wifi): fix ap bandwidth is unknown in scan results 2024-11-18 20:09:53 +08:00
Frantisek Hrbata
63c565d95d feat(tools): unify sections in idf.py size reports for NG version
By default, esp-idf-size.ng displays all sections individually. This can
be confusing, especially if CONFIG_SOC_MEM_NON_CONTIGUOUS_SRAM is
enabled, resulting in sections like .dram0.data and .dram1.data being
abbreviated as two .data sections in the size report. To avoid confusion
for idf.py and cmake users, pass the --unify option to the underlying
esp_idf_size.ng by default.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-15 21:17:53 +08:00
Jiang Jiang Jian
4143156926 Merge branch 'fix/fix_deadlock_in_pm_mode_switching_v5.3' into 'release/v5.3'
fix(esp_pm): fix deadlock in pm_mode switching (v5.3)

See merge request espressif/esp-idf!34939
2024-11-15 20:48:26 +08:00
Jiang Jiang Jian
34b31d4c2e Merge branch 'bugfix/fix_tbtt_interval_update_fail_v5.3' into 'release/v5.3'
fix(wifi): Optimization for wifi components (v5.3)

See merge request espressif/esp-idf!34896
2024-11-15 20:09:00 +08:00
Jiang Jiang Jian
1fde2c3cec Merge branch 'fix/thread_resolve_invalid_host_v5_3' into 'release/v5.3'
fix(openthread): Fix invalid host resolving for Thread end devices(v5.3)

See merge request espressif/esp-idf!34941
2024-11-15 20:08:02 +08:00
Marius Vikhammer
8ed5ef2de3 ci(docs): set PDF build as allowed to fail 2024-11-15 16:36:51 +08:00
sibeibei
64067f4cf0 fix(wifi): fix some wifi issues 241031
1. fix cant sleep if reconnect to connected ap
    2. clear pmk in internal reconnection
    3. update connect status for init-->auth
2024-11-15 16:35:50 +08:00
Linda
6ba7a20e9f docs: add esp_wifi_types_generic.h to esp_wifi.rst 2024-11-15 16:35:50 +08:00
zhangyanjiao
37674bf1b1 docs(wifi/mesh): make it clear that the root node does not automatically forward IP packets to the external address 2024-11-15 16:35:50 +08:00
zhangyanjiao
90ed8096a9 docs(wifi): update the wifi api doc 2024-11-15 16:35:50 +08:00
zhangyanjiao
5d04427d26 fix(wifi): update comments in esp_wifi_types_generic.h 2024-11-15 16:35:50 +08:00
zhangyanjiao
4fb8608e9a fix(wifi): add esp_wifi_types_native.h and esp_wifi_types_generic.h to Doxyfile 2024-11-15 16:35:50 +08:00
zhangyanjiao
43afca49b4 docs(wifi/espnow): update the documentation for EPS-NOW ERSU and phy rate
Closes https://github.com/espressif/esp-idf/issues/12216
2024-11-15 16:35:50 +08:00
zhangyanjiao
8004824d30 docs(wifi/espnow): Update the description for ESP-NOW frame 2024-11-15 16:35:50 +08:00
Tan Yan Quan
eaa706503c fix(802.15.4): add case for 2015 frame enh-ack 2024-11-15 15:11:46 +08:00
wanlei
9aeaf03f95 feat(spi_master): add test clock src and config validation 2024-11-15 14:59:49 +08:00
wanckl
b5eca3a8a1 fix(driver_spi): enable p4 multi dut test 2024-11-15 14:59:49 +08:00
Jiang Jiang Jian
bce45894e7 Merge branch 'feat/mipi_dsi_yuv_converter_v5.3' into 'release/v5.3'
feat(lcd): support YUV422 input color format (v5.3)

See merge request espressif/esp-idf!34761
2024-11-15 13:45:02 +08:00
Jiang Jiang Jian
9b3dd3e443 Merge branch 'fix/esp_hiram_heap_v5.3' into 'release/v5.3'
fix(esp_psram): fix a bug in PSRAM heap registration (backport v5.3)

See merge request espressif/esp-idf!34693
2024-11-15 13:44:40 +08:00
Jiang Jiang Jian
4473476107 Merge branch 'bugfix/chip823_pll_low_temp_bug_v5.3' into 'release/v5.3'
[H2]Fix cpu switch fail for bbpll cali fail bug in low temp (v5.3)

See merge request espressif/esp-idf!34599
2024-11-15 12:59:02 +08:00
WanqQixiang
5f7e1aa14f fix(openthread): Fix invalid host resolving for Thread end devices 2024-11-15 11:28:21 +08:00
wuzhenghui
b57d6ecc81 fix(esp_pm): fix deadlock in pm_mode switching 2024-11-15 11:26:26 +08:00
wuzhenghui
2607022204 fix(esp_pm): fix missed ccompare update when another core is already in do_switch 2024-11-15 11:26:25 +08:00
Jiang Jiang Jian
d44e47e910 Merge branch 'bugfix/gpio_set_level_atomic_v5.3' into 'release/v5.3'
fix(gpio): improve set level performance (v5.3)

See merge request espressif/esp-idf!34765
2024-11-15 11:22:39 +08:00
Jiang Jiang Jian
8cce21dbf6 Merge branch 'fix/p4_spi_no_dma_polling_cache_fail_v5.3' into 'release/v5.3'
fix(driver_spi): fixed p4 no dma polling trans cache sync fail (v5.3)

See merge request espressif/esp-idf!34814
2024-11-15 11:20:40 +08:00
Jiang Jiang Jian
0c90cf37bb Merge branch 'fix/littlefs_image_creation_windows_v5.3' into 'release/v5.3'
fix(littlefs): Allow LittleFS image generation on Windows + version bump (v5.3)

See merge request espressif/esp-idf!34916
2024-11-15 11:20:00 +08:00
Jiang Jiang Jian
f35389e956 Merge branch 'bugfix/fix_classic_bt_build_fail_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE (v5.3)

See merge request espressif/esp-idf!34930
2024-11-15 11:16:59 +08:00
Jiang Jiang Jian
f3e99aa4e7 Merge branch 'fix/fix_top_domain_pd_v5.3' into 'release/v5.3'
fix(esp_pm): move clock module out of TOP_DOMAIN_PERIPHERALS_BM (v5.3)

See merge request espressif/esp-idf!34881
2024-11-15 11:13:54 +08:00
Jiang Jiang Jian
6467dea037 Merge branch 'fix/tusb_midi_task_stack_overflow_v5.3' into 'release/v5.3'
fix(examples): tusb_midi task stack overflow fix (v5.3)

See merge request espressif/esp-idf!34934
2024-11-15 11:13:30 +08:00
Jiang Jiang Jian
c54355ee96 Merge branch 'bugfix/fix_avrc_absolute_volume_compatibility_v5.3' into 'release/v5.3'
bugfix/fix_avrc_absolute_volume_compatibility[backport v5.3]

See merge request espressif/esp-idf!34770
2024-11-15 10:57:45 +08:00
Jiang Jiang Jian
3e700eff31 Merge branch 'bugfix/esp32c3_eco7_usj_console_v5.3' into 'release/v5.3'
fix(esp_rom): fix esp32c3 eco7 console rom function address (v5.3)

See merge request espressif/esp-idf!34739
2024-11-15 10:43:29 +08:00
Jiang Jiang Jian
f18a122917 Merge branch 'backport/fix_154_ext_coex_5_3' into 'release/v5.3'
fix(coex): fix 802.15.4 external coexistence (backport to 5.3)

See merge request espressif/esp-idf!34901
2024-11-15 09:39:22 +08:00
Adam Múdry
be42634dc9 fix(examples): tusb_midi task stack overflow fix 2024-11-14 16:43:27 +01:00
Zhang Hai Peng
f88298796b fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE
(cherry picked from commit 59d20e80d3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-14 22:13:45 +08:00
Adam Múdry
a973b02fbe fix(littlefs): Allow LittleFS image generation on Windows + version bump
Closes https://github.com/espressif/esp-idf/issues/12900
2024-11-14 13:17:52 +01:00
Jiang Jiang Jian
cfdce1f95c Merge branch 'bugfix/fix_some_wifi_bugs_1030_v5.3' into 'release/v5.3'
Bugfix/fix some wifi bugs 1030 v5.3(Backport v5.3)

See merge request espressif/esp-idf!34705
2024-11-14 20:05:21 +08:00
Li Bo
15c18e4757 fix(esp_rom): fix esp32c3 eco7 console rom function address 2024-11-14 19:14:50 +08:00
Omar Chebib
d902ed146c fix(esp_psram): fix a bug in PSRAM heap registration
This commit fixes a bug in the PSRAM heap initialization that didn't take into
account the reserved himem area when registering the PSRAM virtual space as a heap.
2024-11-14 19:11:20 +08:00
Jiang Jiang Jian
d8a2be0564 Merge branch 'contrib/github_pr_14196_v5.3' into 'release/v5.3'
fix(esp_http_server): prevent concurrent access to socket used in async http requests (GitHub PR) (v5.3)

See merge request espressif/esp-idf!34684
2024-11-14 19:10:23 +08:00
Jiang Jiang Jian
96a795dac9 Merge branch 'feature/usb_host_hub_support_collective_backport_p3_v5.3' into 'release/v5.3'
feat(usb_host): Hub Support Collective backport part 3/3 (v5.3)

See merge request espressif/esp-idf!33987
2024-11-14 19:09:02 +08:00
Jiang Jiang Jian
6639e723e7 Merge branch 'fix/disable_sar_power_when_enter_deepsleep_v5.3' into 'release/v5.3'
fix(esp_hw_support): disable sar power when esp32p4 going to deepsleep (v5.3)

See merge request espressif/esp-idf!34868
2024-11-14 19:06:45 +08:00
Abhinav Kudnar
3c8df3285d fix(nimble): Removed min/max macro defination from os.h
Closes https://github.com/espressif/esp-idf/issues/14840
2024-11-14 19:05:50 +08:00
Jiang Jiang Jian
d9cbadebdd Merge branch 'bugfix/wrong_return_type_v5.3' into 'release/v5.3'
fix(i2c_lcd): wrong return type for esp_lcd_new_panel_io_i2c (v5.3)

See merge request espressif/esp-idf!34654
2024-11-14 19:01:30 +08:00
Jiang Jiang Jian
8b6ef89ade Merge branch 'bugfix/update_condition_to_verify_http_version_v5.3' into 'release/v5.3'
fix(esp_http_server): updated condition to verify http version (v5.3)

See merge request espressif/esp-idf!34635
2024-11-14 19:01:05 +08:00
Jiang Jiang Jian
c5a3c7e78f Merge branch 'ci/backport_i2s_ci_fix_to_v5.3' into 'release/v5.3'
ci(i2s&parlio): backport i2s and parlio ci fix (v5.3)

See merge request espressif/esp-idf!34587
2024-11-14 19:00:39 +08:00
Jiang Jiang Jian
62933660a8 Merge branch 'feat/fatfs_support_sector_less_than_128_v5.3' into 'release/v5.3'
feat(fatfs): enable partition handling for sectors less than 128 (v5.3)

See merge request espressif/esp-idf!34559
2024-11-14 19:00:24 +08:00
Jiang Jiang Jian
61c5b1151a Merge branch 'ci/diff_manifest_with_sha' into 'release/v5.3'
CI: Diff manifest (v5.3)

See merge request espressif/esp-idf!34746
2024-11-14 18:59:49 +08:00
Jiang Jiang Jian
14f6943f30 Merge branch 'bugfix/osi_replace_free_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Replace free/malloc with osi_free/malloc(v5.3)

See merge request espressif/esp-idf!34606
2024-11-14 18:58:57 +08:00
hongshuqing
24bdc5312d fix: fix pll low temp bug 2024-11-14 18:58:28 +08:00
Jiang Jiang Jian
61f337f3a2 Merge branch 'docs/update_cn_libs_frameworks' into 'release/v5.3'
docs: Update CN translation for libs-frameworks.rst(v5.3)

See merge request espressif/esp-idf!34506
2024-11-14 18:56:35 +08:00
Jiang Jiang Jian
d819f0c512 Merge branch 'bugfix/p4_ld_newlib_api_v5.3' into 'release/v5.3'
fix(lp_core): updated lp rom newlib API addresses (v5.3)

See merge request espressif/esp-idf!34480
2024-11-14 18:56:14 +08:00
Jiang Jiang Jian
004e1b5c24 Merge branch 'ci/fix_macos_ccache_v5.3' into 'release/v5.3'
CI: Fix failing ccache and show ccache statistics for macOS tests (v5.3)

See merge request espressif/esp-idf!33937
2024-11-14 18:55:25 +08:00
Jiang Jiang Jian
6b2ac26da3 Merge branch 'feature/support_apll_on_p4_v5.3' into 'release/v5.3'
feat(clock): support apll clock on p4 (v5.3)

See merge request espressif/esp-idf!33214
2024-11-14 18:54:59 +08:00
Jiang Jiang Jian
b820d70949 Merge branch 'fix/fix_cache_stuck_in_esp_restart_v5.3' into 'release/v5.3'
fix(esp_system): writeback L1 Dcache before disable L2 if PSRAM used (v5.3)

See merge request espressif/esp-idf!34800
2024-11-14 18:54:08 +08:00
Xu Si Yu
683b7b4f07 fix(coex): fix 802.15.4 external coexistence 2024-11-14 15:07:41 +08:00
morris
bde65f22fc fix(gpio): improve set level performance
by avoid "read-modify-write" operation. The registers designed to be
write only.

Related to https://github.com/espressif/esp-idf/issues/14674
2024-11-14 14:35:49 +08:00
morris
a30099a879 feat(lcd): support color conversion for mipi dsi driver 2024-11-14 14:35:25 +08:00
yinqingzhao
62a926857e fix(wifi): fix some wifi bugs 2024-11-14 14:09:55 +08:00
yinqingzhao
87bdd572c7 fix(wifi): modify the comment of bandwidth in wifi_ap_record_t 2024-11-14 14:03:39 +08:00
yinqingzhao
ee9a74ec52 feat(phy): esp32c6 update phy init data 2024-11-14 14:03:24 +08:00
yinqingzhao
439cb125c5 feat(twt): twt add parameter to enable keep alive 2024-11-14 14:03:13 +08:00
Shu Chen
87af41852e Merge branch 'fix/find_and_close_service_in_ot_ci_case_v5.3' into 'release/v5.3'
fix(ci): optimize an openthread ci case (Backport v5.3)

See merge request espressif/esp-idf!34726
2024-11-14 12:01:21 +08:00
Island
7cd3d4a97f Merge branch 'feature/support_moving_code_to_flash_v5.3' into 'release/v5.3'
feat(ble): Support for putting code in flash on ESP32-C2 (v5.3)

See merge request espressif/esp-idf!34785
2024-11-14 11:46:39 +08:00
Jiang Jiang Jian
d451cb1f34 Merge branch 'bugfix/support_random_iv_in_esptouch_v2_v5.3' into 'release/v5.3'
fix(wifi): Support AES IV with random value in esptouch v2 (v5.3)

See merge request espressif/esp-idf!34603
2024-11-14 10:46:03 +08:00
Anton Maklakov
54bb25ce8d Merge branch 'ci/remove_gitlab_api_while_generating_test_pipeline_v5.3' into 'release/v5.3'
CI: remove gitlab api call while generating test pipeline (v5.3)

See merge request espressif/esp-idf!34639
2024-11-14 10:18:55 +08:00
Shu Chen
d271b6b7db Merge branch 'backport/openthread_related_feature_v53_20241112' into 'release/v5.3'
Backport openthread related features to 5.3

See merge request espressif/esp-idf!34838
2024-11-14 09:42:38 +08:00
Shu Chen
6df4318039 Merge branch 'backport/fix_energy_scan_api_para_mismatch_v53' into 'release/v5.3'
fix(openthread): set channel for energy scan(Backport v5.3)

See merge request espressif/esp-idf!34596
2024-11-14 09:42:29 +08:00
Fu Hanxi
773ce3de55 ci: remove gitlab api call while generating pytest target-test child pipeline 2024-11-13 20:46:01 +01:00
Fu Hanxi
91feda824b ci: generate new report if old one failed to be updated 2024-11-13 20:46:01 +01:00
zhangyanjiao
fd224e83bb fix(wifi): Support AES IV with random value in esptouch v2 2024-11-13 17:29:23 +08:00
zwx
98bd2ef93c feat(openthread): support alloc nat64 session from psram 2024-11-13 16:46:29 +08:00
Simon Dean
bb24084db4 enable openthread coap client for mtd 2024-11-13 16:46:29 +08:00
Xu Si Yu
aff23f32e4 feat(openthread): update openthread submodule and border router lib 2024-11-13 16:46:29 +08:00
wuzhenghui
06fa736f84 fix(esp_pm): move clock module out of TOP_DOMAIN_PERIPHERALS_BM 2024-11-13 16:12:02 +08:00
Island
d22ed3fc0d Merge branch 'bugfix/fix_some_ble_bugs_240926_esp32_v5.3' into 'release/v5.3'
Fixed some BLE bugs 240926 on ESP32 (v5.3)

See merge request espressif/esp-idf!34553
2024-11-13 14:21:46 +08:00
Island
6948697e66 Merge branch 'feat/support_blecrt_90_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Added API to set supported channel selection algorithm (v5.3)

See merge request espressif/esp-idf!34505
2024-11-13 14:21:40 +08:00
Island
951aaa2a9a Merge branch 'bugfix/fix_ble_adv_start_fail_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing(v5.3)

See merge request espressif/esp-idf!34528
2024-11-13 14:21:21 +08:00
Island
845a925def Merge branch 'bugfix/fix_ble_build_fail_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0 (v5.3)

See merge request espressif/esp-idf!34664
2024-11-13 14:21:15 +08:00
Island
dc1265c6eb Merge branch 'bugfix/fixed_h2_assert_master_1031_v5.3' into 'release/v5.3'
Bugfix/fixed h2 assert master 1031 (v5.3)

See merge request espressif/esp-idf!34540
2024-11-13 14:20:54 +08:00
wuzhenghui
14f37bd8e8 fix(esp_hw_support): disable sar power when esp32p4 going to deepsleep 2024-11-13 11:35:26 +08:00
liqigan
49c356ab18 fix(bt/bluedroid): Fixed AVRCP compatibility issue on absolute volume synchronization 2024-11-12 19:19:50 +08:00
Island
9196ca3054 Merge branch 'feat/support_controller_run_in_flash_only_v5.3' into 'release/v5.3'
feat/support controller run in flash only(backport v5.3)

See merge request espressif/esp-idf!34749
2024-11-12 11:12:11 +08:00
Shen Weilong
6e4b35ac4a feat(ble): Support for putting code in flash on ESP32-C2 2024-11-11 17:52:15 +08:00
wanckl
2f5020176d fix(driver_spi): fixed p4 no dma polling trans cache sync fail 2024-11-11 17:35:13 +08:00
wuzhenghui
9c195f52a3 fix(esp_system): writeback L1 Dcache before disable L2 if PSRAM used 2024-11-11 14:03:08 +08:00
zhiweijian
ac81c14b48 feat(bt/controller): Support controller code run in flash only 2024-11-08 17:28:52 +08:00
Chen Jian Hua
6fdc9ae60f fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(52ee788)
- Fixed BLE vendor HCI set and get tx power
- Support BLE vendor HCI set adv aux offset command
- Support BLE vendor HCI set CSA support command
- Added config for BLE instant passed workaround
- Fixed btdm_sleep_clock_sync timeout workaround


(cherry picked from commit 1e3220b0b0)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-11-08 17:28:52 +08:00
Jiang Jiang Jian
dc2b26c25f Merge branch 'fix/esp_prov_ipv6_resolve_v5_3' into 'release/v5.3'
fix(tools/esp_prov): Fix hostname resolving for IPv6-only host(v5.3)

See merge request espressif/esp-idf!34678
2024-11-08 16:36:56 +08:00
Jiang Jiang Jian
6ba4aa75fc Merge branch 'feat/openthread_dataset_changed_event_v5_3' into 'release/v5.3'
feat(openthread): Add dataset changed event and post it in state change callback(v5.3)

See merge request espressif/esp-idf!34546
2024-11-08 16:36:48 +08:00
Jiang Jiang Jian
7e712b6b20 Merge branch 'backport/upgrade-zigbee-examples-v5.3' into 'release/v5.3'
feat(zigbee): Upgrade the Zigbee lib to v1.6 for Zigbee examples(Backport v5.3)

See merge request espressif/esp-idf!34715
2024-11-08 16:36:38 +08:00
Jiang Jiang Jian
780f99b489 Merge branch 'backport/linker_script_check_missing_function_v53' into 'release/v5.3'
fix(ieee802154): fix linker error due to static function being inlined(Backport v5.3)

See merge request espressif/esp-idf!34721
2024-11-08 16:36:29 +08:00
Jiang Jiang Jian
0eb655b407 Merge branch 'fix/bypass_some_restore_process_if_sleep_rejected_v5.3' into 'release/v5.3'
fix(esp_hw_support): skip some wakeup steps if sleep is rejected (v5.3)

See merge request espressif/esp-idf!34621
2024-11-08 16:35:15 +08:00
Jiang Jiang Jian
0a14e9a4db Merge branch 'fix/c6_ble_no_adv_bug_v5.3' into 'release/v5.3'
fix: C6 ble does not send adv when coexistence with wifi

See merge request espressif/esp-idf!34573
2024-11-08 16:34:52 +08:00
Jiang Jiang Jian
4676ec7d4a Merge branch 'bugfix/fix_memory_leak_in_sco_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable (v5.3)

See merge request espressif/esp-idf!34565
2024-11-08 16:34:41 +08:00
Jiang Jiang Jian
b840737ebf Merge branch 'fix/fix_ota_slowclock_switching_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix rtc slow clock missing after the OTA app changes the slow clock source (v5.3)

See merge request espressif/esp-idf!34474
2024-11-08 16:34:22 +08:00
gongyantao
0448a53c66 fix(bt): fix some issues in bt controller
1: Store local device name into NVDS when handling hci_wr_local_name_cmd.
2: Set default device name during link manager initialization.
3: Set the QoS value to the minimum value if the calculated QoS is less
   than the minumum.
2024-11-08 14:33:11 +08:00
zhanghaipeng
90a723f7b5 fix(bt/ble): Update esp32 libbtdm_app.a (17db8bd)
- Added a verification step for the Access Address within the CONNECT_IND PDU
2024-11-08 14:33:02 +08:00
Chen Jian Hua
f36d81a62c fix(bt): Update bt lib for ESP32(a2a7457)
- Fixed assert in ke_mem.c at line 409 when controller reset
- Added config for BLE instant passed workaround
- Fixed connection can't be established when initiating and advertising coexist


(cherry picked from commit 2b28133ace)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-11-08 14:32:44 +08:00
Michael (XIAO Xufeng)
f7154edfd8 Merge branch 'feat/support_bod_p4_eco2_v5.3' into 'release/v5.3'
feat(bod): Update bod threshold on esp32p4-eco2 (backport v5.3)

See merge request espressif/esp-idf!34591
2024-11-07 21:36:01 +08:00
Michael (XIAO Xufeng)
dccce426d5 Merge branch 'fix/fix_writeback_psram_after_vo2_powerdown_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix writeback cache to psram after vo2 powerdown (v5.3)

See merge request espressif/esp-idf!34580
2024-11-07 21:24:24 +08:00
Fu Hanxi
dbe61e3290 ci: use different base commit for merge result pipelines 2024-11-07 10:40:39 +01:00
Fu Hanxi
c9971bea59 ci: support diff manifest sha with the base commit 2024-11-07 10:40:23 +01:00
Xu Si Yu
07959c4bbe fix(ci): optimize an openthread ci case 2024-11-07 10:45:48 +08:00
xieqinan@espressif.com
ca41ac94b9 feat(zigbee): Upgrade the Zigbee lib to v1.6 for Zigbee examples
- Optimize the Zigbee light, switch and gateway examples
- Remove the esp_zigbee_rcp example
2024-11-07 10:42:50 +08:00
zwx
c4bddd3319 fix(802.15.4): add no inline to some static function 2024-11-06 19:50:47 +08:00
Ivan Grokhotkov
6ed49332f3 fix(ieee802154): fix linker error due to static function being inlined
When the compiler decides to inline a static function, linker script
generator will complain about the missing function.
2024-11-06 19:50:41 +08:00
Friedolin Gröger
8b559ce614 fix(esp_http_server): prevent concurrent access to socket used in async http requests 2024-11-06 08:10:55 +01:00
WanqQixiang
20ee7e18f4 fix(tools/esp_prov): Fix hostname resolving for IPv6-only host 2024-11-05 17:44:46 +08:00
Zhang Hai Peng
7a4d10b718 fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0
(cherry picked from commit 94d1a4f1c0)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-05 16:13:46 +08:00
morris
c0bc1046c8 fix(i2c_lcd): wrong return type for esp_lcd_new_panel_io_i2c
when build for C++ project
2024-11-05 13:46:24 +08:00
nilesh.kale
b06249f483 fix(esp_http_server): updated condition to verify http version
Closes https://github.com/espressif/esp-idf/issues/14723
2024-11-04 15:50:00 +05:30
wuzhenghui
d93d99f134 fix(esp_hw_support): skip some wakeup steps if sleep is rejected
1. Skip esp_timer time compensation to avoid introducing errors into rtc_timer
    2. Ignore sleep_time_overhead_out measurements when sleep is rejected
2024-11-04 14:23:53 +08:00
xiongweichao
68b16aa2ba fix(bt/bluedroid): Replace free/malloc with osi_free/malloc 2024-11-01 17:49:39 +08:00
zwx
cbc69025d1 fix(openthread): set channel for energy scan 2024-11-01 16:38:30 +08:00
wuzhenghui
e488d7669a fix(esp_hw_support): only support power down flash after revison v1.0 on esp32p4 2024-11-01 16:26:29 +08:00
C.S.M
0a437b0ea0 fix(bod): Remove config for bod on p4 v0.x 2024-11-01 15:31:13 +08:00
C.S.M
4049f2b5fb feat(bod): Update bod threshold on esp32p4-eco2 2024-11-01 15:31:02 +08:00
C.S.M
12d6cdb29a feat(esp32p4): Introduce p4 eco2 configuration 2024-11-01 15:30:39 +08:00
wuzhenghui
655a99bec8 fix(esp_hw_support): fix writeback cache to psram after vo2 powerdown 2024-11-01 14:14:35 +08:00
laokaiyao
035f2f8280 ci(parlio_rx): enable logic analyzer example test 2024-11-01 11:18:59 +08:00
laokaiyao
9b4e9e7c7a ci(parlio_rx): increase the i2s test case stability 2024-11-01 11:06:12 +08:00
laokaiyao
ea3f4ad6f0 ci(parlio_rx): bypass the spi test case 2024-11-01 11:06:12 +08:00
laokaiyao
9b4d83fe40 ci(i2s): fix i2s_multi_dev failed case 2024-11-01 11:06:04 +08:00
linruihao
a987953341 fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable 2024-11-01 10:42:48 +08:00
WanqQixiang
bf1e6008ee feat(openthread): Add dataset changed event and post it in state change callback 2024-10-31 19:05:00 +08:00
Yuhan Wei
72bdce626d fix(phy): Updated phylib to phy_version: 320, 348a293 2024-10-31 18:43:07 +08:00
renpeiying
c255d61f5a docs: Update CN translation for fatfs.rst 2024-10-31 11:04:55 +01:00
sonika.rathi
d3992d4963 feat(fatfs): enable partition handling for sectors less than 128 2024-10-31 09:22:35 +01:00
zwl
f808a705b8 fix(ble): fixed occasional crash issue in low memory scenarios on ESP32-C6 2024-10-31 11:34:09 +08:00
Zhao Wei Liang
c9b55d1542 fix(ble): fixed occasional crash issue in low memory scenarios on ESP32-H2
(cherry picked from commit dbad6a0ca5)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-10-31 11:23:50 +08:00
laokaiyao
5b03fff32e feat(clock): support apll clock on p4 2024-10-31 11:01:04 +08:00
Zhang Hai Peng
4f707f0c12 fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing
(cherry picked from commit 76e1650161)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-30 15:24:52 +08:00
Zhang Hai Peng
bc1b6e2bf1 fix(ble/bluedroid): Support enable BLE topology check by API
(cherry picked from commit dbc94c7056)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-30 15:24:37 +08:00
chenjianhua
116820c42c fix(bt/bluedroid): Fixed error when memory debug enabled 2024-10-29 21:49:53 +08:00
chenjianhua
5e383d34fa fix(bt/bluedroid): Fixed GATTC app status check when BT and BLE coexist 2024-10-29 21:49:44 +08:00
chenjianhua
116e5c34f6 fix(bt/bluedroid): Update address type for BLE link when the connection is completed 2024-10-29 21:49:28 +08:00
Chen Jian Hua
149474e5d2 feat(bt/bluedroid): Added API to set supported channel selection algorithm
(cherry picked from commit 4ae7b4aecf)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-10-29 17:35:26 +08:00
shenmengjing
30c62f19a3 docs: Update CN translation for libs-frameworks.rst 2024-10-29 17:34:30 +08:00
Roman Leonov
b15e83f6e0 refactor(usb_host): Removed error in enum when stalled, added hcd_dwc no more free channels 2024-10-28 18:14:14 +01:00
Roman Leonov
63f9104669 fix(ext_port): Added port recovery delay 2024-10-28 18:14:14 +01:00
Roman Leonov
79d7c23315 fix(usb_host_lib): Returned task suspend 2024-10-28 18:14:14 +01:00
Roman Leonov
670f11644f refactor(usb_host/examples): Enabled external Hub support feature 2024-10-28 18:14:14 +01:00
Roman Leonov
52aa6a1d4c feat(ext_port): Added External Port driver
Closes https://github.com/espressif/esp-idf/issues/12554
2024-10-28 18:14:08 +01:00
Jiang Jiang Jian
9f4b1bd471 Merge branch 'bugfix/hfp_sniff_mng_v5.3' into 'release/v5.3'
bugfix/hf_and_ag_cannot_enter/exit sniff mode. (v5.3)

See merge request espressif/esp-idf!34464
2024-10-28 21:46:21 +08:00
Shu Chen
dddc2938f2 Merge branch 'backport/openthread_related_feature_v53' into 'release/v5.3'
Backport/openthread related feature v53(Backport v5.3)

See merge request espressif/esp-idf!33407
2024-10-28 21:44:11 +08:00
Jiang Jiang Jian
938c363930 Merge branch 'fix/fix_some_wifi_bugs_10_25_v5.3' into 'release/v5.3'
fix(wifi): fix some bss color bugs (v5.3)

See merge request espressif/esp-idf!34462
2024-10-28 21:40:23 +08:00
morris
7828079733 Merge branch 'bugfix/mipi_gen_short_read_v5.3' into 'release/v5.3'
fix(mipi_dsi): error logic in reading short packet (v5.3)

See merge request espressif/esp-idf!34461
2024-10-28 21:37:26 +08:00
Jiang Jiang Jian
eb4186dc97 Merge branch 'bugfix/update_btlib_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed some controller bugs on ESP32 (v5.3)

See merge request espressif/esp-idf!34463
2024-10-28 21:09:50 +08:00
wuzhenghui
f2fb17cb87 fix(esp_hw_support): disable unused clock sources after rtc clock switching complete 2024-10-28 19:54:06 +08:00
Marius Vikhammer
f3557bcf5e fix(lp_core): updated lp rom newlib API addresses 2024-10-28 17:21:26 +08:00
xuxiao
9266b5a6a1 fix(wifi): fix some bss color bugs (v5.3) 2024-10-28 14:21:56 +08:00
morris
73ad41524a Merge branch 'fix/lcd_lvgl_regression_v5.3' into 'release/v5.3'
fix(lcd): fix the newest lvgl regression (v5.3)

See merge request espressif/esp-idf!34473
2024-10-28 14:20:47 +08:00
Jiang Jiang Jian
12a68856e7 Merge branch 'bugfix/roaming_app_support_wifi_disconnect_v5.3' into 'release/v5.3'
Stops roaming app upon application initiated disconnect(backport v5.3)

See merge request espressif/esp-idf!33705
2024-10-28 13:38:09 +08:00
morris
b8a5a171a2 Merge branch 'feat/i2c_port_handle_func_v5.3' into 'release/v5.3'
feat(i2c_master): Add an api for retrieveing handle via port (backport v5.3)

See merge request espressif/esp-idf!34438
2024-10-28 12:44:33 +08:00
Xu Si Yu
ba2d48dacd feat(openthread): update extension commands component for examples 2024-10-28 12:21:34 +08:00
Shu Chen
436550ae7f feat(openthread): support time sync feature on border router 2024-10-28 12:21:34 +08:00
Michael Wei
2ea60a4931 fix(openthread): fix RCP build to pass time sync and CSL options
Closes https://github.com/espressif/esp-idf/pull/14060
2024-10-28 12:21:34 +08:00
zwx
34e9768e82 fix(802.15.4): fix oob issue for pending table 2024-10-28 12:21:34 +08:00
zwx
ad236ae122 feat(802.15.4): support large scale pending table size 2024-10-28 12:21:34 +08:00
zwx
c3ad441895 feat(lwip): add a config to set the size of ND6 table cache 2024-10-28 12:21:33 +08:00
zwx
4cd756ccc1 feat(esp_netif): add an API to get all preferred ip6 addresses 2024-10-28 12:21:33 +08:00
Jiang Jiang Jian
7229ec4be9 Merge branch 'feature/check_efuse_blk_after_ota_v5.3' into 'release/v5.3'
feat(bootloader): support to check efuse block revision (v5.3)

See merge request espressif/esp-idf!33136
2024-10-28 12:20:05 +08:00
Chen Jichang
a848c82b12 fix(lcd): fix the newest lvgl regression 2024-10-28 12:19:16 +08:00
Jiang Jiang Jian
2fb4424db0 Merge branch 'example/ping_invalid_ip6_fix_v5.3' into 'release/v5.3'
fix(example): Fixed updating recv addr for invalid packets (v5.3)

See merge request espressif/esp-idf!32989
2024-10-28 12:15:56 +08:00
wuzhenghui
2153a6b81e fix(esp_hw_support): enable all supported slow clock at pmu_init 2024-10-28 12:14:54 +08:00
Jiang Jiang Jian
e6fcf6632c Merge branch 'fix/gdbstub_runtime_test_requiers_elf_file_v5.3' into 'release/v5.3'
fix(gdbstub_runtime): fix test gdbstub_runtime which requiers elf file (v5.3)

See merge request espressif/esp-idf!33815
2024-10-28 12:12:32 +08:00
Jiang Jiang Jian
2144fb9ae9 Merge branch 'bugfix/fix_h2_wrong_lslp_drvb_config_bug_v5.3' into 'release/v5.3'
fix(h2): fix lslp drvb config bug (v5.3)

See merge request espressif/esp-idf!34292
2024-10-28 12:09:08 +08:00
Jiang Jiang Jian
1fbb8b12b3 Merge branch 'fix/bootloader_size_increase_perf_benchmark_fails_to_build_v5.3' into 'release/v5.3'
fix: Bootloader size increase broke perf_benchmark example compilation (v5.3)

See merge request espressif/esp-idf!34306
2024-10-28 12:07:37 +08:00
Jiang Jiang Jian
5cb70e4452 Merge branch 'fix/freertos_race_cond_in_stream_buffers_send_v5.3' into 'release/v5.3'
fix(freertos): Fixed SMP race condition in xStreamBufferSend() (v5.3)

See merge request espressif/esp-idf!34335
2024-10-28 12:06:41 +08:00
Island
425db8e135 Merge branch 'bugfix/fix_assert_if_ble_sleep_init_failed_v5.3' into 'release/v5.3'
fix(ble): do not assert if ble sleep init failed (v5.3)

See merge request espressif/esp-idf!34427
2024-10-28 11:55:31 +08:00
Jiang Jiang Jian
8d41e65110 Merge branch 'fix/kconfig-option-orphan_sections_warning_v5.3' into 'release/v5.3'
fix(build): fix orphan sections warning kconfig variable (v5.3)

See merge request espressif/esp-idf!33941
2024-10-28 11:53:16 +08:00
Mahavir Jain
921a8a7e71 Merge branch 'feat/mbedtls_size_optimization_v5.3' into 'release/v5.3'
Fix the increase in build size of mbedtls while upgrading to v3.x (v5.3)

See merge request espressif/esp-idf!34252
2024-10-28 11:16:23 +08:00
Island
d926a9259b Merge branch 'refactor/ble_example_print_on_bluedroid_v5.3' into 'release/v5.3'
refactor(bt/bluedroid): Refactor the print for BLE examples (v5.3)

See merge request espressif/esp-idf!34310
2024-10-28 10:52:54 +08:00
Jin Cheng
c42c11ec4d fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed access NULL in SCO frame end
      Closes https://jira.espressif.com:8443/browse/IDFGH-10796
    - Added LAP checking for Periodic Inquiry
    - Removed an inproper assertion in SCO module
    - Fixed wrong logic in key exchange when
      LMP transaction collision occurred
    - Fixed the using of wrong error code in
      the transaction collision of role switch
2024-10-28 10:26:45 +08:00
Jin Cheng
2a603083d0 fix(bt/bluedroid): fixed AG and HF client cannot enter/exit sniff mode 2024-10-28 10:20:34 +08:00
Jin Cheng
ca3618c433 Revert "Disable sniff mode during (e)SCO connection."
This reverts commit 39a5eb84f3.
2024-10-28 10:20:34 +08:00
Shu Chen
47dc6f37f5 Merge branch 'backport/openthread_154_related_feature_v53' into 'release/v5.3'
Backport/openthread 154 related feature v53

See merge request espressif/esp-idf!34274
2024-10-28 10:19:39 +08:00
morris
ceef7a5f91 fix(mipi_dsi): error logic in reading short packet 2024-10-28 10:14:59 +08:00
morris
d25f9b6071 Merge branch 'feat/mipi_dsi_hdmi_v5.3' into 'release/v5.3'
feat(lcd): Allow to disable low-power mode in DPI panel (v5.3)

See merge request espressif/esp-idf!34432
2024-10-28 10:05:39 +08:00
Anton Maklakov
37cc7aac0a Merge branch 'ci/temp_disable_sonarqube_v5.3' into 'release/v5.3'
ci: temp disable sonarqube check. keep it for migrating to codechecker (v5.3)

See merge request espressif/esp-idf!34450
2024-10-28 09:43:11 +08:00
Jiang Jiang Jian
5bb5407dc6 Merge branch 'feat/support_32k_osc_ble_sleep_clk_v5.3' into 'release/v5.3'
feat(ble): Support using 32k oscillator as Bluetooth sleep clock(v5.3)

See merge request espressif/esp-idf!33996
2024-10-28 09:41:03 +08:00
Kapil Gupta
baed5ea1e9 fix(esp_wifi): Stop roaming app when station stops 2024-10-25 23:39:05 +05:30
Kapil Gupta
9f27f51dbe fix(esp_wifi): Remove duplicate declaration of function 2024-10-25 23:32:14 +05:30
jgujarathi
161751bec2 fix(examples) : Common component's wifi disconnect handler should ignore roaming disconnect
- Common component's wifi disconnect handler should ignore roaming disconnect (WIFI_REASON_ROAMING)
  as connect gets issued internally in these cases.
2024-10-25 23:32:14 +05:30
jgujarathi
74bb92cc5f fix(esp_wifi): Stops roaming app upon application initiated disconnect
Stops roaming app when the application initiates a disconnect.
Roaming app if enabled will be restarted when the station reconnects again.
2024-10-25 23:32:14 +05:30
jgujarathi
33214e4d68 fix(esp_supplicant): Fix compilation issues with btm and rrm status funcs
- Ensure that the btm and rrm status funcs can be used even if 80211.kv
  are not enabled in menuconfig. They will return false in such cases.
2024-10-25 23:32:14 +05:30
Jiang Jiang Jian
e071521943 Merge branch 'fix/wifi_netif_null_deref_v5.3' into 'release/v5.3'
esp_wifi: Add null pointer checks to WiFi-netif APIs (v5.3)

See merge request espressif/esp-idf!34158
2024-10-26 01:58:45 +08:00
Jiang Jiang Jian
1a9959b55b Merge branch 'bugfix/retry_count_when_sta_disconnect_v5.3' into 'release/v5.3'
fix(wifi): Do not attempt re-connection as per 'failure_retry_cnt' when sta itself issues disconnect in between of connection establishment (Backport v5.3)

See merge request espressif/esp-idf!34168
2024-10-25 22:25:34 +08:00
Jiang Jiang Jian
0deebec285 Merge branch 'feat/lwip_more_sockets_v5.3' into 'release/v5.3'
change(lwip): bump max sockets in lwip Kconfig (GItHubPR) (v5.3)

See merge request espressif/esp-idf!34151
2024-10-25 21:02:55 +08:00
Jiang Jiang Jian
7e6a1e39db Merge branch 'fix/lwip_drop_ipv6_if_no_ll_v5.3' into 'release/v5.3'
fix(lwip): Add default IPv6 input filter to drop traffic if ipv6 not assigned (v5.3)

See merge request espressif/esp-idf!34148
2024-10-25 21:02:47 +08:00
Jiang Jiang Jian
3e77489941 Merge branch 'docs/remove_user_guide_for_esp32-devkitm-1_migration_v5.3' into 'release/v5.3'
docs: Remove user guide for esp32-devkitm-1 migration (v5.3)

See merge request espressif/esp-idf!34320
2024-10-25 19:39:53 +08:00
Jiang Jiang Jian
8e7ce462be Merge branch 'bugfix/workaround_of_i2s_half_sample_rate_issue_v5.3' into 'release/v5.3'
fix(i2s): fix i2s half sample rate issue (v5.3)

See merge request espressif/esp-idf!34353
2024-10-25 19:38:42 +08:00
Jiang Jiang Jian
9c2e021bed Merge branch 'feature/add_dpp_crypto_layer_v53' into 'release/v5.3'
feat(esp_wifi): Restructure dpp crypto Layer APIs

See merge request espressif/esp-idf!34319
2024-10-25 19:38:08 +08:00
Jiang Jiang Jian
bc42469f3c Merge branch 'fix/ws_transport_linux_signed_promotions_v5.3' into 'release/v5.3'
fix(ws_transport): Fix incorrect packet-len on linux due to int promotions of char (GitHub PR) (v5.3)

See merge request espressif/esp-idf!34146
2024-10-25 19:36:59 +08:00
Jiang Jiang Jian
400760634d Merge branch 'fix/ws_transport_mem_corrupt_v5.3' into 'release/v5.3'
fix(transport): Fix websocket mem-corruption while reading headers (v5.3)

See merge request espressif/esp-idf!34153
2024-10-25 19:35:11 +08:00
Fu Hanxi
9e33b5ffc0 ci: disable sonarqube check 2024-10-25 13:01:45 +02:00
Jiang Jiang Jian
9675ca6028 Merge branch 'feat/wifi_remote_with_hosted_v5.3' into 'release/v5.3'
fix(examples): esp_hosted as default for Wi-Fi connect on P4 (v5.3)

See merge request espressif/esp-idf!34156
2024-10-25 18:51:27 +08:00
akshat
a9bdb4a2c9 fix(wifi): Do not try re-connection when sta disconnects with esp_wifi_disconnect()
Do not follow wifi_config::wifi_sta_config::failure_retry_cnt logic when
station itself issues a disconnect from AP/Router using
esp_wifi_disconnect()
2024-10-25 16:00:09 +05:30
David Cermak
9cbbb437db fix(transport): Fix websocket mem-corruption while reading headers
Closes https://github.com/espressif/esp-idf/issues/14473
2024-10-25 17:51:34 +08:00
Rodrigo Silva
c52114bb0b change: bump max sockets in lwip Kconfig
Tested under ESP32S3, running 50 tasks, each with a client, and a server
listening to one client, totalizing 150 sockets/files open, forwarding
data from PPP to Ethernet and vice versa.
Reasoning for 255 total sockets/files is VFS local_fd_t being a uint8_t.
Since FD_SETSIZE is defined at tool level, a CMakeLists user definition
is needed in cases above 64 (the default value).

Merges https://github.com/espressif/esp-idf/pull/13866
2024-10-25 17:50:10 +08:00
David Cermak
4831eee72c fix(lwip): Add default IPv6 input filter to drop traffic if ipv6 not assigned
* Makes LWIP_HOOK_IP6_INPUT default to LWIP_HOOK_IP6_INPUT_DEFAULT
* Updated the stub hook implementation to actually filter out all IPv6
packets if the input netif has no link local address.
2024-10-25 17:49:22 +08:00
Sean DuBois
c28534fd37 fix(ws_transport): Fix crash when reading
When parsing WS framing protocol integer promotion would cause
invalid values to be read. Acting upon these values would eventually
cause a crash

Fixes esp-protocols#645
2024-10-25 17:49:02 +08:00
Jiang Jiang Jian
93ce86a309 Merge branch 'feat/support_enable_ble_hci_log_by_api_v5.3' into 'release/v5.3'
feat(ble/bluedroid): Support enable BLE hci log by API (v5.3)

See merge request espressif/esp-idf!34424
2024-10-25 17:47:30 +08:00
Jiang Jiang Jian
89bf068df2 Merge branch 'bugfix/fix_ble_robust_feature_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed error when writing Client Supported Features characteristic (v5.3)

See merge request espressif/esp-idf!34247
2024-10-25 17:46:26 +08:00
David Cermak
5438287fd5 fix(esp_wifi): Add null pointer checks to WiFi-netif APIs
Added null pointer checks to WiFi-netif API functions to prevent potential
crashes from invalid arguments, updated unit tests.

Closes https://github.com/espressif/esp-idf/issues/8702
2024-10-25 17:40:36 +08:00
David Cermak
847ec07bc4 fix(examples): esp_hosted as default for Wi-Fi connect on P4 2024-10-25 17:32:09 +08:00
xiongweichao
2b30323a2b feat(ble): Support using 32k oscillator as Bluetooth sleep clock 2024-10-25 17:25:18 +08:00
Jiang Jiang Jian
b1fcd348be Merge branch 'change/polish_wifi_sleep_current_desc_v53' into 'release/v5.3'
change(doc): add notes for sleep current data tested in shieled box

See merge request espressif/esp-idf!34435
2024-10-25 16:47:12 +08:00
Jiang Jiang Jian
edb7c4b68b Merge branch 'fix/fix_some_wifi_bugs_v53' into 'release/v5.3'
Fix/fix some wifi bugs v53

See merge request espressif/esp-idf!34431
2024-10-25 16:34:49 +08:00
C.S.M
22edfd2021 test(i2c): Support test for esp32p4 lp i2c 2024-10-25 16:09:21 +08:00
C.S.M
3419abf601 fix(i2c_master): Fix the memory leak in the async transaction 2024-10-25 16:08:50 +08:00
C.S.M
399b8b6ef1 feat(i2c_master): Add an api for retrieveing handle via port 2024-10-25 16:06:15 +08:00
wangtao@espressif.com
c9f094fbc6 change(doc): add notes for sleep current data tested in shieled box 2024-10-25 15:29:39 +08:00
morris
3eefb7d800 Merge branch 'ci/enable_esp32p4_gpio_uart_target_test_v5.3' into 'release/v5.3'
fix(gpio): esp32p4 IOs cannot keep being held in the entire deep sleep process (v5.3)

See merge request espressif/esp-idf!33523
2024-10-25 15:08:40 +08:00
Vilem Zavodny
369a6a5dc7 feat(lcd): Allow to disable low-power mode in DPI panel 2024-10-25 14:52:10 +08:00
wangtao@espressif.com
2397ca90cc fix(wifi): backport some wifi bug fixs v53 2024-10-25 14:39:46 +08:00
wangtao@espressif.com
ac0bfa6769 fix(wifi): fix esp32s2 get ack rssi issue 2024-10-25 14:21:12 +08:00
morris
91e57cfb15 Merge branch 'feat/support_esp32p4_flash_psram_sleep_pd_v5.3' into 'release/v5.3'
feat(esp_hw_support): support power down PSRAM or Flash during sleep for esp32p4 v1.0 (v5.3)

See merge request espressif/esp-idf!34390
2024-10-25 11:00:08 +08:00
cjin
e3cbe53fa3 fix(ble): do not assert if ble sleep init failed 2024-10-25 10:54:35 +08:00
Jiang Jiang Jian
a0f798cfc4 Merge branch 'bugfix/fix_some_wifi_bugs_241024_v5.3' into 'release/v5.3'
fix(wifi): fix some wifi bugs 241024 v5.3

See merge request espressif/esp-idf!34420
2024-10-24 23:37:37 +08:00
Rahul Tank
5f5feed0f4 Merge branch 'bugfix/fix_datalen_issue_v5.3' into 'release/v5.3'
fix(nimble): Adjust time parameter in set Data len API in case BLE 5.0 support is not present(v5.3)

See merge request espressif/esp-idf!34219
2024-10-24 20:23:50 +08:00
Zhang Hai Peng
8fbf8820f1 feat(ble/bluedroid): Support enable BLE hci log by API
(cherry picked from commit 15c895fc6a)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-24 20:13:28 +08:00
wangtao@espressif.com
2b894fca0f fix(wifi): fix ampdu to normal cause free buffer twice issue 2024-10-24 19:49:20 +08:00
Li Shuai
24d122e19c fix(esp_wifi): fix the issue of station fail to connect to softap caused by abnormal rf flag signal 2024-10-24 19:36:14 +08:00
morris
6731f12200 Merge branch 'feat/new_xmc_id_v5.3' into 'release/v5.3'
feat(spi_flash): Add new xmc chip id(backport v5.3)

See merge request espressif/esp-idf!34283
2024-10-24 18:22:40 +08:00
Jiang Jiang Jian
a7c3e8b814 Merge branch 'bugfix/fix_some_wifi_coexist_bugs_20241023_v5.3' into 'release/v5.3'
Bugfix/fix some wifi coexist bugs 20241023 v5.3

See merge request espressif/esp-idf!34414
2024-10-24 18:03:03 +08:00
liuning
d7d4dc7817 fix(coex): fix esp32c2/esp32c5/esp32c61 coexist memory leakage issue 2024-10-24 15:14:01 +08:00
liuning
6eb3d20674 fix(coex): sync up coex head file 2024-10-24 15:10:21 +08:00
liuning
a4354e8cb2 fix(coex): fix esp32c5 coexist hw timer issue 2024-10-24 15:10:21 +08:00
liuning
b09488d35a fix(coex): fix some coexist debug issues 2024-10-24 15:10:20 +08:00
muhaidong
001b20f914 fix(wifi): fix modem_clock_module_enable mismatch issue 2024-10-24 15:10:20 +08:00
muhaidong
b2d96dfa83 fix(wifi): fix esp32c5 enable external coex fail issue 2024-10-24 15:10:20 +08:00
muhaidong
4665dbc6b9 fix(wifi): esp32c5 esp32c61 support external coex 2024-10-24 15:10:20 +08:00
liuning
36ff167161 feat(coex): optimize connectionless coexist pwr, optimize wifi pwr with bt idle 2024-10-24 15:10:20 +08:00
liuning
ce0fe97399 feat(coex): support GPIO debug 2024-10-24 15:10:20 +08:00
laokaiyao
2e57177b94 fix(i2s): fix multi-dev test failure 2024-10-24 14:32:06 +08:00
laokaiyao
e1e9ffdd4f fix(i2s): fix i2s half sample rate issue 2024-10-24 14:32:06 +08:00
morris
6ae7f18158 Merge branch 'bugfix/ppa_buffer_writeback_invalidate_fix2_v5.3' into 'release/v5.3'
fix(ppa): fix a few minor issues for ppa driver (v5.3)

See merge request espressif/esp-idf!34407
2024-10-24 14:27:50 +08:00
Jiang Jiang Jian
deed35c72e Merge branch 'fix/fix_coverity_defects_in_sleep_code_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix coverity defects in sleep code (v5.3)

See merge request espressif/esp-idf!34108
2024-10-24 14:02:19 +08:00
Jiang Jiang Jian
3eef7a1d92 Merge branch 'bugfix/wpa2_ent_fixes_v53' into 'release/v5.3'
Few fixes in wpa_supplicant(v5.3)

See merge request espressif/esp-idf!34275
2024-10-24 13:03:03 +08:00
chenjianhua
994568e387 fix(bt/bluedroid): correct the readme links for BLE periodic examples 2024-10-24 12:03:56 +08:00
chenjianhua
0b8bec3fa5 refactor(bt/bluedroid): Refactor the print for BLE examples 2024-10-24 12:03:56 +08:00
chenjianhua
f6bedd65b6 refactor(bt/bluedroid): Refactor the print for gatt_server and gatt_client example 2024-10-24 12:03:56 +08:00
Jiang Jiang Jian
8e9226f7f8 Merge branch 'feature/ftm_calibration_esp32c6_v5.3' into 'release/v5.3'
feat(ftm): Add ftm calibration values for esp32c6 (Backport v5.3)

See merge request espressif/esp-idf!34406
2024-10-24 11:59:39 +08:00
Jiang Jiang Jian
4956035e3f Merge branch 'jtag_doc_update_v5.3' into 'release/v5.3'
docs(jtag): update OpenOCD related sections (v5.3)

See merge request espressif/esp-idf!34398
2024-10-24 11:22:10 +08:00
Jiang Jiang Jian
817495b1ff Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20241016_v5.3' into 'release/v5.3'
feat(tools): update openocd version to v0.12.0-esp32-20241016 (v5.3)

See merge request espressif/esp-idf!34393
2024-10-24 11:21:28 +08:00
Jiang Jiang Jian
2eec7053f2 Merge branch 'change/improve_some_wifi_releated_introduction_v53' into 'release/v5.3'
change(wifi):improve some wifi releated introduction v53

See merge request espressif/esp-idf!34277
2024-10-24 11:19:41 +08:00
Jiang Jiang Jian
915c011ca5 Merge branch 'feat/add_sbom_wpa_supplicant_v5.3' into 'release/v5.3'
feat(wpa_supplicant): Add sbom manifest file for wpa_supplicant (Backport v5.3)

See merge request espressif/esp-idf!34272
2024-10-24 11:18:29 +08:00
Jiang Jiang Jian
c6420897ea Merge branch 'fix/add_wifi_public_header_checksums_v5.3' into 'release/v5.3'
feat(wifi/coex): Add integrity check for public headers files for esp32c5 and esp32_host (Backport v5.3)

See merge request espressif/esp-idf!34057
2024-10-24 11:16:50 +08:00
Jiang Jiang Jian
5bd2d825a2 Merge branch 'fix/fix_esp32c2_eco4_rom_issue_v53' into 'release/v5.3'
fix(wifi): fix esp32c2 eco4 set conutry policy auto issue

See merge request espressif/esp-idf!34391
2024-10-23 20:10:43 +08:00
Sergei Silnov
ee72cad28f Merge branch 'fix/gdbgui_py3.13_v5.3' into 'release/v5.3'
fix(tools): Print message about GDBGUI being not supported with Python 3.13 (v5.3)

See merge request espressif/esp-idf!34377
2024-10-23 20:00:11 +08:00
Sajia
e5079b6bd1 feat(ftm): Add ftm calibration values for esp32c6 2024-10-23 17:00:49 +05:30
Island
70a7de77e1 Merge branch 'docs/add_ble_get_started_eng_2024102310_v5.3' into 'release/v5.3'
Docs: Added BLE English version of BLE Get Started (v5.3)

See merge request espressif/esp-idf!34386
2024-10-23 18:55:20 +08:00
Song Ruo Jing
5a0eb906da fix(ppa): fix a few minor issues for ppa srm and blend driver
1. The smallest scale size can be 1/16, not 1/15
2. Fix potential heap corruption if scale to a smaller size (OOB)
3. Fix mismatching writeback and invalidate data size if in_bg/fg_buffer and out_buffer
are the same one and L2 cacheline size is larger than L1 cacheline size
2024-10-23 18:39:03 +08:00
Song Ruo Jing
d8b02f5d76 fix(ppa): fix insufficient writeback/invalidate data length 2024-10-23 18:38:15 +08:00
Song Ruo Jing
16476a7a59 fix(gpio): esp32p4 IOs cannot keep being held in the entire deep sleep process 2024-10-23 18:01:50 +08:00
Song Ruo Jing
d3c6c9ccb8 fix(ci): enable gpio, uart, ledc target tests on esp32p4 2024-10-23 18:01:50 +08:00
C.S.M
5239bd2879 docs(spi_flash): Add migration guide for removing XMC-C suspend support 2024-10-23 17:34:16 +08:00
C.S.M
922777118b patch(spi_flash): cleanup XMC flash chip usage according to new information 2024-10-23 17:34:16 +08:00
C.S.M
8890286468 feat(spi_flash): Add new xmc chip id 2024-10-23 17:34:16 +08:00
Erhan Kurubas
95abe26a87 docs(jtag): update OpenOCD related sections 2024-10-23 10:17:16 +02:00
Alexey Gerenkov
854dfb45d4 feat(tools): update openocd version to v0.12.0-esp32-20241016 2024-10-23 10:04:56 +02:00
wuzhenghui
855bba0582 feat(esp_hw_support): support power down PSRAM or Flash during sleep for esp32p4 v1.0 2024-10-23 16:03:39 +08:00
wangtao@espressif.com
87bb09d746 change(wifi):improve some wifi releated introduction 2024-10-23 13:57:46 +08:00
Jiang Jiang Jian
8d472cf779 Merge branch 'fix/fix_esp32c2_tx_shake_issue_v53' into 'release/v5.3'
fix(wifi): fix esp32c2 tx shake issue v53

See merge request espressif/esp-idf!34388
2024-10-23 13:55:19 +08:00
Rahul Tank
aa7802ee6a fix(nimble): Adjust Data len time in case BLE 5.0 support is not present 2024-10-23 11:15:55 +05:30
Mahavir Jain
300bc6bbe1 Merge branch 'feature/update_mbedtls_version_to_3.6.2_v5.3' into 'release/v5.3'
feat(mbedtls): update mbedtls version to 3.6.2 (v5.3)

See merge request espressif/esp-idf!34357
2024-10-23 13:12:27 +08:00
wangtao@espressif.com
de273130d1 fix(wifi): fix esp32c2 eco4 set conutry policy auto issue 2024-10-23 11:49:18 +08:00
Sarvesh Bodakhe
868351beaa ci: Add md5 checksum validation for COEX public header files for esp32c5
Add MD5 checksum validation for public header files of the following esp32c5.
2024-10-23 11:16:47 +08:00
Sarvesh Bodakhe
9c54b3183f ci: Add md5 checksum validation for WiFi public header files for new chips
Add MD5 checksum validation for public header files of the following new chips:
esp32c5 and esp32_host.
2024-10-23 11:16:47 +08:00
Sarvesh Bodakhe
1298cac4e7 feat(wifi): Add checks for public headers for esp32c5 and esp32_host
Add md5sum integrity check for public header files for esp32c5 and esp32_host libraries.
2024-10-23 11:16:47 +08:00
wangtao@espressif.com
0c0dce7c4f fix(wifi): fix esp32c2 tx shake issue 2024-10-23 11:12:41 +08:00
Jiang Jiang Jian
9c61080493 Merge branch 'feat/support_esp32c2_eco4_wifi_v53' into 'release/v5.3'
Feat/support esp32c2 eco4 wifi v53

See merge request espressif/esp-idf!34109
2024-10-23 11:06:27 +08:00
Wei Yu Han
a8f6e53005 Merge branch 'docs/add_ble_get_started_eng' into 'master'
Docs: Added BLE English version of BLE Get Started

See merge request espressif/esp-idf!34013

(cherry picked from commit 35fd041288)

42601a7a docs(ble): Added ENG version of ble-introduction.rst
615282c4 docs(ble): Added ENG version of ble-device-discovery.rst
645e68f5 docs(ble): Added initial ENG version of ble-device-discovery.rst
d2d95a52 docs(ble): Added ENG version of ble-data-exchange.rst
00ca4dc7 docs(ble):Updated Details table in ble-device-discovery.rst
8e03c200 fix(ble): Removed trailing white space, and fixed some format issues
5b304485 docs(ble):Fixed a indentation in ble-data-exchange.rst
b4c51e7b docs(ble): Deleted some chinese character in ble-data-exchange.rst ENG version
d01d7efe docs(ble):Revised some expression in ENG version of BLE Get Started
a24762c5 docs(ble): Removed a trailing whitespace in ble-introduction.rst
afbe5a1f Apply 44 suggestion(s) to 4 file(s)
4ddab725 docs(ble): Fixed a description in ble-introduction.rst
203dfa03 Apply 5 suggestion(s) to 3 file(s)

Co-authored-by: Island <island@espressif.com>
2024-10-23 10:17:02 +08:00
Roland Dobai
431cf92fed fix(tools): Print message about GDBGUI being not supported with Python 3.13 2024-10-22 16:00:42 +02:00
Martin Vychodil
5510aa6f08 Merge branch 'bugfix/nvs_entry_sanity_check_v5.3' into 'release/v5.3'
Bugfix/added nvs entry header sanity checks (v5.3)

See merge request espressif/esp-idf!34289
2024-10-22 19:51:53 +08:00
wangtao@espressif.com
21f893b038 feat(wifi): update support esp32c2eco4 wifi lib 2024-10-22 17:05:13 +08:00
wangtao@espressif.com
2b63725383 feat(wifi): support esp32c2 eco4 wifi bringup sync head 2024-10-22 17:05:13 +08:00
wangtao@espressif.com
33b0dbf599 fix(wifi): fix esp32c2 eco4 ld 2024-10-22 17:05:13 +08:00
wangtao@espressif.com
71bb752d98 feat(wifi): support esp32c2 eco4 wifi bringup 2024-10-22 17:05:13 +08:00
Jiang Jiang Jian
9498786a97 Merge branch 'fix/fix_softap_sta_example_deafult_dns_addr_v5.3' into 'release/v5.3'
fix(wifi): fix softap_sta example default dns addr invaild issue v53

See merge request espressif/esp-idf!34276
2024-10-22 16:09:49 +08:00
Sudeep Mohanty
2f72b29add fix(freertos): Fixed SMP race condition in xStreamBufferSend()
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferSend() makes the xTaskWaitingToSend NULL but it may
have already been evaluated to not be NULL by xStreamBufferReceive()
running on another core and eventually leading to a crash in tasks.c.
2024-10-22 10:04:14 +02:00
Marius Vikhammer
18d997805a Merge branch 'fix/freertos_race_cond_in_stream_buffers_v5.3' into 'release/v5.3'
fix(freertos): Fixed SMP race condition in stream_buffers.c (v5.3)

See merge request espressif/esp-idf!34223
2024-10-22 15:59:18 +08:00
nilesh.kale
75f416f435 feat(mbedtls): update mbedtls version to 3.6.2 2024-10-22 13:23:28 +05:30
morris
2f2acfaf8f Merge branch 'feat/rgb_lcd_gdma_link_v5.3' into 'release/v5.3'
refactor rgb_lcd driver to use gdma_link driver (v5.3)

See merge request espressif/esp-idf!34265
2024-10-22 11:07:46 +08:00
morris
f7c4b636a2 Merge branch 'docs/delete_user_guide_esp32_s2_and_s3_v5.3' into 'release/v5.3'
docs: Delete user guide esp32-s2-saola-1, esp32-s3-devkitc-1 and esp32-s3-devkitm-1 (v5.3)

See merge request espressif/esp-idf!34324
2024-10-22 10:42:30 +08:00
Zhang Hai Peng
9461323fda fix(ble/bluedroid): Fixed error when writing Client Supported Features characteristic
(cherry picked from commit 5126742003)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-21 18:03:27 +08:00
Zhang Shuxian
28c9f1abde docs: Delete user guide esp32-s2-saola-1, esp32-s3-devkitc-1 and esp32-s3-devkitm-1 2024-10-21 16:56:46 +08:00
renpeiying
a7a09c4300 docs: Remove user guide for esp32-devkitm-1 migration 2024-10-21 15:24:01 +08:00
Xu Si Yu
e84a7e651d feat(openthread): allow enabling trel before getting interface 2024-10-21 10:42:33 +08:00
Mahavir Jain
2d61ea12be Merge branch 'fix/mbedtls_fs_io_dependency_on_vfs_v5.3' into 'release/v5.3'
fix(mbedtls): Fix the MBEDTLS_FS_IO dependency on vfs (v5.3)

See merge request espressif/esp-idf!34269
2024-10-20 22:50:18 +08:00
Adam Múdry
45c49778a0 fix: Bootloader size increase broke perf_benchmark example compilation 2024-10-19 18:57:25 +02:00
Jiang Jiang Jian
4235a074a9 Merge branch 'bugfix/fix_miss_internal_wapi_deinit_issue_v5.3' into 'release/v5.3'
fix(wifi): fix miss internal wapi deinit issue(Backport v5.3)

See merge request espressif/esp-idf!34279
2024-10-18 18:37:47 +08:00
Aditya Patwardhan
9b6d574c95 Merge branch 'feature/add_compiler_no_merge_constants_v5.3' into 'release/v5.3'
feat: add compiler config for not merging const sections (v5.3)

See merge request espressif/esp-idf!34086
2024-10-18 18:37:03 +08:00
hongshuqing
5c2c1d8a24 fix(h2): modify wrong lslp drvb config 2024-10-18 17:01:00 +08:00
radek.tandler
7668a321db fix(storage/nvs): Fixed hadling of inconsistent values in NVS entry header
feat(storage/nvs): Added test cases for damaged entries with correct CRC
2024-10-18 10:48:24 +02:00
muhaidong
9c55f57fa4 fix(wifi): fix miss internal wapi deinit issue 2024-10-18 14:24:52 +08:00
wangtao@espressif.com
e80ab15073 fix(wifi): fix softap_sta example default dns addr invaild issue 2024-10-18 14:07:46 +08:00
aditi
c807ce97d9 feat(esp_wifi): Add esp-idf specific changes
Added esp-idf implementation specific changes on top of the upstream updates.
2024-10-18 11:36:16 +05:30
aditi
7490867a4d feat(esp_wifi): Replace crypto_key with crypto_ec_key
Replaced all occurances of crypto_key with crypto_ec_key struct
    to make the code more consistent with upstream.
2024-10-18 11:36:01 +05:30
aditi_lonkar
d45588ff51 feat(esp_wifi): Restructure dpp crypto Layer APIs
1) Update dpp implementation as per upstram hostapd tag hostap_2_10.
2) Move dpp crypto routines into a separate source code file.
2024-10-18 11:34:37 +05:30
Xu Si Yu
f6591b773e feat(openthread): support trel feature 2024-10-18 13:57:38 +08:00
Aditi
8057de95d7 fix(wpa_supplicant): Add few fixes in dpp task 2024-10-18 11:26:16 +05:30
aditi
e148c20c07 fix(wpa_supplicant): Add few fixes in btm_rrm task 2024-10-18 11:26:08 +05:30
aditi
afd8449418 fix(wpa_supplicant): Add few fixes in eloop task 2024-10-18 11:26:01 +05:30
aditi
78f5d3b11d fix(wpa_supplicant): Add few fixes in WPS task 2024-10-18 11:25:52 +05:30
aditi
79bbcd5952 fix(wpa_supplicant): Add few fixes in NAN task 2024-10-18 11:25:39 +05:30
aditi
e142c11dd0 fix(wpa_supplicant): Add few fixes in eap client code 2024-10-18 11:25:21 +05:30
zwx
064ac29b41 fix(802154): pass hardware abort reason into processing function 2024-10-18 13:18:20 +08:00
Xu Si Yu
6e1bc89945 fix(ieee802154): fix a bug in the usage of a macro 2024-10-18 13:18:20 +08:00
zwx
77ce639292 feat(ieee802154): add frame type checking for hw autoack feature 2024-10-18 13:18:20 +08:00
Xu Si Yu
64dc7ebbc3 fix(openthread): add macro for rcp init 2024-10-18 13:18:19 +08:00
Xu Si Yu
38f024681c feat(openthread): support vendor hook for rcp spi 2024-10-18 13:18:19 +08:00
Jiang Jiang Jian
0e883d99ff Merge branch 'bugfix/fix_retry_assoc_auth_timeout_issue_v5.3' into 'release/v5.3'
fix(wifi): fixed association refused temporarily lead auth timeout issue(Backport v5.3)

See merge request espressif/esp-idf!34242
2024-10-18 12:37:42 +08:00
Nachiket Kukade
fabf233666 feat(wpa_supplicant): Add sbom manifest file for wpa_supplicant 2024-10-18 09:57:22 +05:30
Aditya Patwardhan
5197683852 Merge branch 'fix/esp_tls_excessive_parameter_check_v5.3' into 'release/v5.3'
fix(esp-tls): Reduce parameter check for esp_tls_conn_read (v5.3)

See merge request espressif/esp-idf!34266
2024-10-18 11:52:28 +08:00
Aditya Patwardhan
20ab1e807d fix(mbedtls): Fix the MBEDTLS_FS_IO dependency on vfs
By default MBEDTLS_FS_IO option in mbedtls uses the filesystem supported
added by vfs component.
If the vfs support is disabled by user then mbedtls raises a warning
that the filesystem realted operation shall always fail
This commit fixes the behaviour by enabling respective depedency check for the
MBEDTLS_FS_IO option

Closes https://github.com/espressif/esp-idf/issues/14409
2024-10-18 09:15:23 +05:30
morris
2fa45a9028 feat(rgb_lcd): use gdma_link driver 2024-10-18 11:00:21 +08:00
morris
3e6ae73dd4 Merge branch 'fix/p4_twai_enable_test_v5.3' into 'release/v5.3'
test(twai): p4 twai enable ci test (v5.3)

See merge request espressif/esp-idf!34178
2024-10-18 10:47:24 +08:00
morris
888b6f5c69 Merge branch 'fix/spi_slave_no_dma_rx_overwrite_v5.3' into 'release/v5.3'
fix(driver_spi): fixed slave no dma rx overwrite when trans_len below or over (v5.3)

See merge request espressif/esp-idf!34169
2024-10-18 10:47:10 +08:00
Aditya Patwardhan
76d5665136 fix(esp-tls): Reduce parameter check for esp_tls_conn_read
Previously the *data parameters of esp_tls_conn_read
    was required to be non-NULL after espressif/esp-idf!28358.
    This prevents users from using a functionality in esp_tls_conn_read
    where calling `esp_tls_conn_read(ctx, NULL, 0);` triggers the
    transfer of contents from tcp layer to mbedtls (ssl) layer.
    After this the user can read the contents from
    esp_tls_get_bytes_avail().
    This commit removes the additional NULL check on the data field
    to keep this functionality enabled.
2024-10-18 08:15:42 +05:30
morris
fd5736f9bf feat(gdma): added function to concat two link lists 2024-10-18 10:37:49 +08:00
Mahavir Jain
d9cf088d4c Merge branch 'feat/move_crt_bundle_dummy_cert_to_rodata_v5.3' into 'release/v5.3'
Move cert bundle's dummy cert to .rodata to reduce RAM usage (v5.3)

See merge request espressif/esp-idf!34201
2024-10-18 10:37:48 +08:00
Jiang Jiang Jian
03a0b7ace9 Merge branch 'bugfix/fix_funcs_overriding_on_esp32c3_eco7_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed BLE functions overriding on ESP32-C3 ECO7 (v5.3)

See merge request espressif/esp-idf!34200
2024-10-17 19:45:49 +08:00
harshal.patil
18998ddbe0 fix(mbedtls): Fix the increase in build size of mbedtls when upgrading to v3.x 2024-10-17 14:53:30 +05:30
morris
e58c05a294 Merge branch 'bugfix/pcnt_pm_lock_v5.3' into 'release/v5.3'
fix(pcnt): install the pm lock upon driver installation (v5.3)

See merge request espressif/esp-idf!34213
2024-10-17 15:39:54 +08:00
muhaidong
48bbf278c9 fix(wifi): fixed association refused temporarily lead auth timeout issue 2024-10-17 14:24:21 +08:00
Mahavir Jain
98295c8c67 Merge branch 'bug/ci_test_https_server_file_serving_v5.3' into 'release/v5.3'
fix(protocols): Erased the storage partition for http_server ci test (v5.3)

See merge request espressif/esp-idf!34163
2024-10-17 12:37:57 +08:00
Jiang Jiang Jian
bd81faaf15 Merge branch 'feat/docs_wifi_on_wifiless_chips_v5.3' into 'release/v5.3'
feat(wifi): Document WiFi expansion on wifi-less chips (v5.3)

See merge request espressif/esp-idf!34157
2024-10-17 10:43:04 +08:00
Jiang Jiang Jian
3ecc5e451f Merge branch 'bugfix/wifi_bt_coex_crash_v5.3' into 'release/v5.3'
fix(nimble): Fix the sequence of ll and host transport init (v5.3)

See merge request espressif/esp-idf!33961
2024-10-17 10:40:50 +08:00
Jiang Jiang Jian
b2bc2dfcc3 Merge branch 'bugfix/riscv_task_wdt_cleanup_v5.3' into 'release/v5.3'
fix(wdt): changed register dump on task WDT to be more descriptive (v5.3)

See merge request espressif/esp-idf!33105
2024-10-17 10:39:56 +08:00
Marius Vikhammer
6185744331 Merge branch 'bugfix/intr_alloc_rom_handler_v5.3' into 'release/v5.3'
fix(esp_hw_support): allow allocating interrupts with handlers in ROM with IRAM attribute (backport v5.3)

See merge request espressif/esp-idf!33813
2024-10-17 08:20:41 +08:00
harshal.patil
8d9d5ee218 feat(mbedtls/esp_crt_bundle): Move dummy cert to .rodata to save 408B from dram
Co-authored-by: Hanno <h.binder@web.de>
2024-10-16 16:36:33 +05:30
Roland Dobai
5955059940 Merge branch 'feat/update_tools_in_tools_json_v5.3' into 'release/v5.3'
feat(tools): Update tools: cmake, ninja, ccache (v5.3)

See merge request espressif/esp-idf!33530
2024-10-16 16:04:07 +08:00
Sudeep Mohanty
39f4581178 fix(freertos): Fixed SMP race condition in stream_buffers.c
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferReceive() makes the xTaskWaitingToReceive NULL but it may
have already been evaluated to not be NULL by xStreamBufferSend()
running on another core and eventually leading to a crash in tasks.c.
2024-10-16 09:26:58 +02:00
Marek Fiala
2bfcfda7d4 feat(tools): Exclude modified folders by rebuild 2024-10-16 15:05:52 +08:00
Marek Fiala
02d90f2784 feat(tools): Update tools: cmake, ninja, ccache
cmake  v3.24.0 -> v3.30.2
ninja  v1.11.1 -> v1.12.1
ccache v4.8    -> v4.10.2

Closes https://github.com/espressif/esp-idf/pull/14376
2024-10-16 15:05:52 +08:00
Marius Vikhammer
dbbdb0db0e Merge branch 'bugfix/xtensa_startup_stack_v5.3' into 'release/v5.3'
fix(system): fixed potential double exception when booting on xtensa (v5.3)

See merge request espressif/esp-idf!33902
2024-10-16 11:46:58 +08:00
morris
33f82075e9 fix(pcnt): install the pm lock upon driver installation 2024-10-16 11:33:14 +08:00
Omar Chebib
9d0c888bec fix(esp_hw_support): allow allocating interrupts with handlers in ROM with IRAM attribute
The interrupt allocator now allows allocating an interrupt with a handler in ROM
and flags set to ESP_INTR_FLAG_IRAM
2024-10-16 09:36:09 +08:00
Jiang Jiang Jian
5d3399f079 Merge branch 'bugfix/wifi_set_mode_error_propagation_v5.3' into 'release/v5.3'
Handle missing error propagation in esp_wifi_set_mode() API (Backport v5.3)

See merge request espressif/esp-idf!33883
2024-10-15 20:55:08 +08:00
morris
d4a4cc8fcf Merge branch 'refactor/usb_host_add_func_ret_values_backport_5.3' into 'release/v5.3'
refactor(usb_host): USB Host add function return values description backport v5.3

See merge request espressif/esp-idf!34015
2024-10-15 15:02:05 +08:00
wanckl
5a2db45f40 fix(driver_spi): fixed slave no dma rx overwrite when trans_len below or over
Closes https://github.com/espressif/esp-idf/issues/14462
2024-10-15 14:44:56 +08:00
Jiang Jiang Jian
e183263484 Merge branch 'bugfix/correct_typo_scan_v5.3' into 'release/v5.3'
fix(esp_wifi): Correct typos in example/scan.c (v5.3)

See merge request espressif/esp-idf!34191
2024-10-15 13:44:53 +08:00
Mahavir Jain
bfd037e87e feat: add compiler config for not merging const sections
Probably GCC-13.x and on-wards uses "-fmerge-constants" to merge
the const section (string/floating-point) across compilation units.
This makes it difficult to properly analyze the size output of rodata
section across libraries, the merged section (big in size) is showed
across a single library.

The config option added here can help to disable this compiler behavior
and help to provide better size analysis. It can be used during
development phase only as it increases rodata section size.
2024-10-15 13:35:35 +08:00
Chen Jian Hua
65ff48a604 fix(bt/controller): Fixed BLE functions overriding on ESP32-C3 ECO7
(cherry picked from commit 020f7a6297)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-10-15 13:33:38 +08:00
Mahavir Jain
9a94e3c59b Merge branch 'bugfix/build_failure_cryptoauthlib_v5.3' into 'release/v5.3'
fix(mbedtls): link esp-cryptoauthlib to mbedcrypto library (v5.3)

See merge request espressif/esp-idf!34088
2024-10-15 13:06:51 +08:00
Mahavir Jain
6ccdda249b fix(mbedtls): link esp-cryptoauthlib to mbedcrypto library
If the certificate bundle feature is disabled then the mbedtls
component library becomes interface only component and hence
adding esp-cryptoauthlib as its PRIVATE dependency does not work.

Instead the esp-cryptoauthlib should be added as PRIVATE dependency
for mbedcrypto library (for alternate ECDSA implementation).
2024-10-15 12:15:04 +08:00
David Čermák
b9221c37d9 Merge branch 'mqtt_custom_outbox_ci_v5.3' into 'release/v5.3'
Set partition to large for c6 on custom outbox example (v5.3)

See merge request espressif/esp-idf!34170
2024-10-14 23:02:05 +08:00
diplfranzhoepfinger
2028984bbb fix(esp_wifi): Correct typos in example/scan.c
Closes https://github.com/espressif/esp-idf/issues/14102
Closes https://github.com/espressif/esp-idf/pull/14103
2024-10-14 17:13:54 +05:30
wanckl
ee198ebd4b test(twai): p4 twai enable ci test 2024-10-14 15:56:00 +08:00
Roland Dobai
3f62cc4af8 Merge branch 'fix/ldgen_sort_v5.3' into 'release/v5.3'
fix(ldgen): enable default name SORT in linker fragment (v5.3)

See merge request espressif/esp-idf!34074
2024-10-14 15:20:19 +08:00
Euripedes Rocha
b16f944b86 ci(mqtt): Set partition to large for c6 on custom outbox example
Example failed to build on CI for c6 target due to partition size.
2024-10-14 09:11:25 +02:00
hrushikesh.bhosale
b4eb654cc3 fix(protocols): Erased the storage partition for http_server ci test
Added api to erase storage partition for http_server ci test
2024-10-14 12:00:15 +05:30
David Cermak
80543cf39c feat(wifi): Document WiFi expansion on wifi-less chips 2024-10-14 07:40:31 +02:00
Marius Vikhammer
83a947d540 Merge branch 'docs/cpu_lockup_v5.3' into 'release/v5.3'
Docs/cpu lockup (v5.3)

See merge request espressif/esp-idf!33506
2024-10-14 11:15:26 +08:00
Jiang Jiang Jian
3d97a8ba2e Merge branch 'bugfix/mbedtls_doc_update_v5.3' into 'release/v5.3'
docs: update mbedtls guide for TLS 1.3 supported change (v5.3)

See merge request espressif/esp-idf!33993
2024-10-14 10:26:53 +08:00
Marius Vikhammer
a72ce3590d Merge branch 'fix/priority_inv_when_remove_from_unordered_event_list_v5.3' into 'release/v5.3'
fix(freertos): Fixed priority inversion when setting event group bits (v5.3)

See merge request espressif/esp-idf!34123
2024-10-14 10:24:32 +08:00
Jiang Jiang Jian
5eb746252f Merge branch 'docs/update_startup_for_single_core_chip_v5.3' into 'release/v5.3'
docs: update startup.rst description for single-core chip support (v5.3)

See merge request espressif/esp-idf!33445
2024-10-14 10:22:59 +08:00
Jiang Jiang Jian
d11c994692 Merge branch 'bugfix/fix_wrong_sleep_memory_param_p4_c5_c61_to_v5.3' into 'release/v5.3'
fix(sleep): fix_wrong_sleep_param_for_lp_memory_retention (v5.3)

See merge request espressif/esp-idf!33422
2024-10-14 10:22:28 +08:00
Jiang Jiang Jian
70ee5fa536 Merge branch 'bugfix/fix_s3c3_wrong_ext32k_config_bug_v5.3' into 'release/v5.3'
fix(ext_32k): fix the external 32K issue on C3&S3 (v5.3)

See merge request espressif/esp-idf!33162
2024-10-14 10:20:40 +08:00
Marius Vikhammer
590309a8f1 fix(system): fixed potential double exception when booting on xtensa
Due to old windows from the startup flow being present after
switching to running freertos tasks  windowoverflow exceptions
could potentially try to save windows to the startup stack.

During this overflow they also values previously saved on the
startup stack to find earlier frames' stacks.
Since the start up stack was already recycled these values were
invalid and would cause a crash.

Closes https://github.com/espressif/esp-idf/issues/14406Y
2024-10-14 10:12:27 +08:00
morris
27d7db1205 Merge branch 'refactor/lcd_i80_gpio_config_v5.3' into 'release/v5.3'
Optimize RGB LCD IRAM usage (v5.3)

See merge request espressif/esp-idf!34113
2024-10-14 10:12:22 +08:00
akshat
e5a7ee16f7 fix(esp_wifi): Handle missing error propagation in set_mode 2024-10-12 17:33:49 +08:00
morris
ab0affd796 Merge branch 'fix/fix_macro_in_memory_ld_v5.3' into 'release/v5.3'
fix(psram): fix macro in memory.ld (v5.3)

See merge request espressif/esp-idf!34065
2024-10-12 17:25:01 +08:00
Island
a7782d0d5c Merge branch 'docs/add_ble_get_started_docs_v5.3' into 'release/v5.3'
docs(ble): Added BLE Get Started (v5.3)

See merge request espressif/esp-idf!34017
2024-10-12 14:25:38 +08:00
Wei Yu Han
4fd7958d36 docs(ble): Added BLE Get Started (v5.3) 2024-10-12 14:25:37 +08:00
Jiang Jiang Jian
a41e1502a6 Merge branch 'bugfix/load_access_fault_upon_auth_v5.3' into 'release/v5.3'
fix(wifi): Add a check on hostapd instance while handling an Auth frame (Backport v5.3)

See merge request espressif/esp-idf!34122
2024-10-12 14:24:52 +08:00
Jiang Jiang Jian
6ec74ab769 Merge branch 'fix/ot_dns_ext_hook_ip_check_v5_3' into 'release/v5.3'
fix(openthread): Add check for ip address in DNS external resolve hook(v5.3)

See merge request espressif/esp-idf!34069
2024-10-12 14:23:03 +08:00
Jiang Jiang Jian
fe53000b24 Merge branch 'bugfix/fix_ble_handle_check_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed BLE handle check for GATT API (v5.3)

See merge request espressif/esp-idf!34096
2024-10-12 14:21:31 +08:00
Jiang Jiang Jian
465d1cf229 Merge branch 'feature/set_hp_sleep_power_mode_with_clock_src_selection' into 'release/v5.3'
change(esp_hw_support): switch lp_cpu power mode with clock src selection to save lp_cpu working power (v5.3)

See merge request espressif/esp-idf!34110
2024-10-12 14:14:37 +08:00
morris
e8822fac4e Merge branch 'fix/mcpwm_pm_lock_memory_leak_v5.3' into 'release/v5.3'
fix(mcpwm): fix pm_lock memory issues (v5.3)

See merge request espressif/esp-idf!34058
2024-10-12 11:48:42 +08:00
morris
1eb81bbf17 Merge branch 'bugfix/fix_deep_sleep_wakeup_by_touch_on_p4_v5.3' into 'release/v5.3'
fix(touch): fixed the deep sleep wakeup issue on P4 (v5.3)

See merge request espressif/esp-idf!34134
2024-10-12 11:30:10 +08:00
laokaiyao
7372f1a81f fix(touch): fixed the deep sleep wakeup issue on P4 2024-10-12 09:39:10 +08:00
Island
738bf30efa Merge branch 'docs/update_ble_feature_support_status_v5.3' into 'release/v5.3'
docs(ble): Updated a feature name in feature status table v5.3

See merge request espressif/esp-idf!34061
2024-10-11 20:26:07 +08:00
Sudeep Mohanty
17921b7e9c test(freertos): Added unit test for event groups to test priority inversion
This commit adds a FreeRTOS unit test to verify that event groups do not
cause priority inversion when unblocking a higher priority task.
2024-10-11 11:53:32 +02:00
Sudeep Mohanty
f33abbddba fix(freertos): Fixed priority inversion when setting event group bits
This commit fixes a priority inversion when a lower priority task set
event group bits to unblock a higher priority task but the lower
priority task continued to run.
2024-10-11 11:53:32 +02:00
Sajia
3ff63b3bfc fix(wifi): Add a check on hostapd instance while handling an Auth frame 2024-10-11 15:16:16 +05:30
morris
353b48aa44 refactor(lcd): optimize rgb lcd iram usage
lcd_com_mount_dma_data() doesn't need to be placed in IRAM
2024-10-11 16:24:19 +08:00
wuzhenghui
a70fe8bdee change(esp_hw_support): switch hp_sys default power mode with clock src selection 2024-10-11 16:06:10 +08:00
wuzhenghui
55ff2325c5 change(esp_hw_support): improve gpio deepsleep wakeup configuration code 2024-10-11 14:39:20 +08:00
wuzhenghui
aee378edd0 fix(esp_hw_support): fix coverity defects in sleep code 2024-10-11 14:33:53 +08:00
Zhang Hai Peng
b031e0b672 fix(ble/bluedroid): Fixed BLE handle check for GATT API
(cherry picked from commit 514155de3b)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-10 21:13:28 +08:00
Chen Jian Xing
9b5809d7a3 Merge branch 'bugfix/support_cert_test_v5.3' into 'release/v5.3'
fix(phy): Add cert_test support for ESP32, ESP32-C2, ESP32-C6, ESP32-H2 and ESP32-S2(Backport v5.3)

See merge request espressif/esp-idf!34033
2024-10-10 20:54:27 +08:00
Marius Vikhammer
4a74ca2d2d Merge branch 'docs/freertos_stack_size_v5.3' into 'release/v5.3'
docs(freertos): update freertos comments to reflect that stack size is in bytes (v5.3)

See merge request espressif/esp-idf!33504
2024-10-10 16:35:07 +08:00
Marius Vikhammer
0ccbe0d2e5 Merge branch 'fix/assert_fail_in_xtaskdeletewithcaps_v5.3' into 'release/v5.3'
Fixed occational assert failure in vTaskDeleteWithCaps() (v5.3)

See merge request espressif/esp-idf!33685
2024-10-10 16:26:54 +08:00
Frantisek Hrbata
e32914f972 fix(ldgen): enable default name SORT in linker fragment
Currently, the `SORT` flag mandates the inclusion of at least the
`sort_by_first` argument in the grammar, despite the documentation[1]
indicating that `SORT` can be utilized without any arguments, defaulting
to sorting input sections by name. Fix this by modifying the grammar
to allow a default `SORT` and update a test accordingly.

[1] https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/
    linker-script-generation.html

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-10-10 09:12:27 +02:00
Wei Yu Han
7e1df3e0b0 docs(ble): Update the status of AOA in host feature status table 2024-10-10 14:18:35 +08:00
WanqQixiang
995bd20dcd fix(openthread): Add check for ip address in DNS external resolve hook 2024-10-10 12:20:55 +08:00
muhaidong
67b99935d9 fix(ci): fixed examples protocols mqtt custom_outbox build fail issue 2024-10-10 10:56:25 +08:00
morris
d63eb1239c Merge branch 'feat/adapt_spi_lcd_to_lvgl_v5.3' into 'release/v5.3'
docs: update programming guide to also support quad spi lcd (v5.3)

See merge request espressif/esp-idf!34036
2024-10-10 10:31:46 +08:00
Island
ded2989a73 Merge branch 'feat/ble_mesh_v1.1_feat_disable_support_v5.3' into 'release/v5.3'
feat(ble_mesh): esp ble mesh v1.1 features enable/disable supported (v5.3)

See merge request espressif/esp-idf!33779
2024-10-10 10:19:09 +08:00
Alexey Lapshin
2f8f397d6b fix(test): reduce gdb_loadable_elf binary size 2024-10-10 10:12:31 +08:00
Chen Jichang
04c7bbde5e fix(psram): fix macro in memory.ld 2024-10-10 10:12:29 +08:00
Wei Yu Han
04d15ae574 docs(ble): Updated a feature name in feature status table 2024-10-10 09:59:17 +08:00
Chen Jichang
41838bb8a6 fix(mcpwm): fix pm_lock memory issues 2024-10-10 09:49:41 +08:00
Island
88030d4832 Merge branch 'bugfix/fix_bleqabr24_1282_v5.3' into 'release/v5.3'
Fixed BLE scanning and initiating coexist on ESP32 (v5.3)

See merge request espressif/esp-idf!33834
2024-10-09 17:19:30 +08:00
Island
7531d7e853 Merge branch 'bugfix/fix_bci_443_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed the timeout of wake up timer when using RC OSC (v5.3)

See merge request espressif/esp-idf!33893
2024-10-09 17:19:04 +08:00
Island
7046cb360c Merge branch 'modified_ble_multi_conn_example_readme_v5.3' into 'release/v5.3'
update(ble): Modified the ble multi_conn example's readme (v5.3)

See merge request espressif/esp-idf!33995
2024-10-09 15:16:02 +08:00
Island
530f891259 Merge branch 'bugfix/fix_ext_conn_adv_data_check_v5.3' into 'release/v5.3'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(01cc408) (v5.3)

See merge request espressif/esp-idf!34003
2024-10-09 11:58:21 +08:00
Chen Jichang
a7c2b5c9b6 docs(spi_lcd): update supported spi mode description
Closes https://github.com/espressif/esp-idf/issues/14605
2024-10-09 11:00:13 +08:00
Marius Vikhammer
6c8315511b docs(freertos): update freertos comments to reflect that stack size is in bytes
Closes https://github.com/espressif/esp-idf/issues/11600
2024-10-09 10:10:52 +08:00
Marius Vikhammer
dd6fdb92ea docs(system): add cpu lock up description 2024-10-09 10:10:38 +08:00
muhaidong
b171f1d57b fix(phy): update cert_test docs 2024-10-09 10:00:52 +08:00
Mu Hai Dong
32700ae426 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Jiang Jiang Jian <jack@espressif.com>
2024-10-09 09:50:38 +08:00
muhaidong
7cb3bba0ba fix(phy): esp32s2 and esph2 support rf cert_test 2024-10-09 09:49:05 +08:00
muhaidong
cf577ee4cb fix(phy): fix esp32 build fail issue
Closes https://github.com/espressif/esp-idf/issues/11972
2024-10-09 09:48:13 +08:00
xiehang
2225b4c3ca fix(phy): All chip support cert_test 2024-10-09 09:48:03 +08:00
Jiang Jiang Jian
4866363b87 Merge branch 'bugfix/ftm_apsta_bw_issue_v5.3' into 'release/v5.3'
fix(esp_wifi): Fix FTM issues in AP-STA mode (Backport v5.3)

See merge request espressif/esp-idf!33702
2024-10-08 20:03:20 +08:00
Jiang Jiang Jian
21858b4144 Merge branch 'bugfix/sae_h2e_vulnerability_fix_v5.3' into 'release/v5.3'
fix(wifi): Sae check for invalid rejected group (v5.3)

See merge request espressif/esp-idf!33979
2024-10-08 19:37:33 +08:00
Peter Marcisovsky
46e610fe13 fix(usb_host): Update log level and error poropagation 2024-10-08 11:25:28 +02:00
Peter Marcisovsky
07dc67c640 refactor(usb_host): Fixed function return values in usb_host stack:
- updated doxygen for the whole usb_host stack
    - doxygen for test_apps is not updated
    - fixed error codes propagation problems in the usb_host stack
2024-10-08 11:25:28 +02:00
Nachiket Kukade
7a7ad4a62e fix(esp_wifi): Fix FTM issues in AP-STA mode
Add AP-STA mode support in FTM example
Update wifi libs with below changes -
- Use ex-AP's bandwidth in FTM request when connected
- Allow Bandwidth downgrade in FTM negotiation
- Use separate calibration when Initiator performs 20MHz FTM
  while in-AP is in 40MHz
2024-10-08 16:06:30 +08:00
Jiang Jiang Jian
657d250d96 Merge branch 'bugfix/backport_supplicant_fixes_v5.3' into 'release/v5.3'
fix(wifi): Backport some fixes(v5.3)

See merge request espressif/esp-idf!33714
2024-10-08 16:03:50 +08:00
Zhang Hai Peng
b6cbf1a026 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(01cc408)
- Fixed extended connectable advertising data length check


(cherry picked from commit 8a80675b7c)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-08 15:13:40 +08:00
luoxu
41be5e929e feat(ble_mesh): esp ble mesh v1.1 features enable/disable supported 2024-10-08 15:05:24 +08:00
Shen Wei Long
9617e728e7 update(ble): Modified the ble multi_conn example's readme
(cherry picked from commit 28ffd5fc04)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2024-10-08 12:53:49 +08:00
Mahavir Jain
1191500dae docs: update mbedtls guide for TLS 1.3 supported change 2024-10-08 09:57:41 +05:30
David Čermák
c4d4c22e5b Merge branch 'bugfix/spi_eth_latest_p4_fnc_board_v5.3' into 'release/v5.3'
fix(esp_eth): fixed SPI ETH GPIO to align with latest ESP32-P4-Function-EV-Board (v5.3)

See merge request espressif/esp-idf!33960
2024-10-07 22:03:44 +08:00
Jouni Malinen
b18849638e SAE: Check for invalid Rejected Groups element length explicitly on STA
Instead of practically ignoring an odd octet at the end of the element,
check for such invalid case explicitly. This is needed to avoid a
potential group downgrade attack.

Fixes: 444d76f74f65 ("SAE: Check that peer's rejected groups are not enabled")
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-10-07 12:25:45 +05:30
Jouni Malinen
c6fee11bfc SAE: Check that peer's rejected groups are not enabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-10-07 12:25:45 +05:30
Jouni Malinen
90317ded69 SAE: Reject invalid Rejected Groups element in the parser
There is no need to depend on all uses (i.e., both hostapd and
wpa_supplicant) to verify that the length of the Rejected Groups field
in the Rejected Groups element is valid (i.e., a multiple of two octets)
since the common parser can reject the message when detecting this.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-10-07 12:25:45 +05:30
Jouni Malinen
5f7a3b6d48 SAE: Check for invalid Rejected Groups element length explicitly
Instead of practically ignoring an odd octet at the end of the element,
check for such invalid case explicitly. This is needed to avoid a
potential group downgrade attack.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-10-07 12:25:45 +05:30
Jouni Malinen
6b3bf4d0e7 SAE: Check that peer's rejected groups are not enabled in AP
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-10-07 12:25:45 +05:30
Kapil Gupta
bff34554df fix(wifi): Add channel bit definition 2024-10-07 09:54:17 +05:30
Harshit Malpani
0fa6298774 fix: Fix spelling mistakes in esp_http_server.h 2024-10-06 17:06:48 +05:30
Kapil Gupta
640f9750a4 fix(esp_wifi): Prevent memory overflow in WPS 2024-10-06 16:52:25 +05:30
Kapil Gupta
f430a553de fix(esp_wifi): Mask some error conditions in WPS
Mask some error conditions in WPS to increase the probability of
WPS success.
2024-10-06 16:52:25 +05:30
Kapil Gupta
9f17d6fff8 fix(esp_wifi): Disable WPS timers once WPS succeed 2024-10-06 16:52:25 +05:30
Kapil Gupta
11c1627de9 fix(esp_wifi): Add support for 5ghz channel list for easy connect 2024-10-06 16:52:25 +05:30
Kapil Gupta
32d3b0b02c fix(esp_wifi): Allow connection with WPA mode in WPS 2024-10-06 16:52:25 +05:30
Kapil Gupta
a7065d7020 fix(esp_wifi): Deinit WPS registrar during hostapd deinit 2024-10-06 16:52:25 +05:30
Kapil Gupta
efc79c72ed fix(esp_wifi): Added prints in btm roam for error condition 2024-10-06 16:52:25 +05:30
aditi
dbd96d6499 fix(wpa_supplicant): Fix for WPS-PBC overlap detection in dual band
When WPS is running on dual band(e.g. a separate 2.4 GHz and 5 GHz band
    radios in an AP device), detect pbc overlap only if UUID differs.
2024-10-06 16:52:25 +05:30
Ondrej Kosta
6de1045f01 fix(esp_eth): fixed SPI ETH GPIO to align with latest ESP32-P4-Function-EV-Board 2024-10-03 09:34:24 +02:00
Abhinav Kudnar
4337e634c6 fix(nimble): Fix the sequence of ll and host transport init 2024-10-03 15:33:04 +08:00
Aditya Patwardhan
8c9361afaf Merge branch 'feature/update_mbedtls_version_to_3.6.1_v5.3' into 'release/v5.3'
feat(mbedtls): updated mbedtls version to 3.6.1 (v5.3)

See merge request espressif/esp-idf!33913
2024-10-03 15:00:09 +08:00
Roland Dobai
90ca8e7cb7 Merge branch 'fix/idfpy_uf2_fail_v5.3' into 'release/v5.3'
fix(uf2): Ignore ESPBAUD, ESPPORT when calling idf.py uf2[-app] (v5.3)

See merge request espressif/esp-idf!33948
2024-10-02 20:32:11 +08:00
Alexey Gerenkov
7020c8479a Merge branch 'fix/coredump_sha_build_error_v5.3' into 'release/v5.3'
fix(esp-coredump): fix build error when mbedtls hardware sha disabled (v5.3)

See merge request espressif/esp-idf!33943
2024-10-01 22:12:55 +08:00
Jan Beran
519322de5f fix(uf2): Ignore ESPBAUD, ESPPORT when calling idf.py uf2[-app] 2024-10-01 13:37:17 +02:00
Erhan Kurubas
67e49f542a test(esp-coredump): add test for the soft sha config 2024-10-01 10:07:04 +02:00
Erhan Kurubas
3994a0cb1b fix(esp-coredump): fix build error when mbedtls hardware sha disabled 2024-10-01 10:07:04 +02:00
Alexey Lapshin
40d7068a95 fix(build): fix orphan sections warning kconfig variable 2024-10-01 12:18:56 +07:00
Aditya Patwardhan
4f29e3ffe7 Merge branch 'fix/add_countermeasure_for_ecdsa_peripheral_issue_v5.3' into 'release/v5.3'
feat(hal): Add countermeasure for ECDSA generate signature (v5.3)

See merge request espressif/esp-idf!33745
2024-10-01 11:10:47 +08:00
Peter Macko
044b34475a fix(macos): ccache: re-enable, show stats, set CCACHE_DIR, limit CCACHE_MAXSIZE 2024-09-30 17:57:33 +02:00
Jiang Jiang Jian
98440e1315 Merge branch 'bugfix/fix_esp32c2_rom_eco1_mbedtls_issues_v5.3' into 'release/v5.3'
fix(esp_rom): Fixed esp32c2 rom eco1 mbedtls issues (v5.3)

See merge request espressif/esp-idf!33917
2024-09-30 14:11:16 +08:00
Aditya Patwardhan
44ce512011 feat(hal): Add countermeasure for ECDSA generate signature
The ECDSA peripheral before ECO5 of esp32h2 does not perform the ECDSA
    sign operation in constant time. This allows an attacker to read the
    power signature of the ECDSA sign operation and then calculate the
    ECDSA key stored inside the eFuse. The commit adds a countermeasure
    for this attack. In this case the real ECDSA sign operation is
    masked under dummy ECDSA sign operations to hide its real power
    signature
2024-09-30 12:24:38 +08:00
Jiang Guang Ming
fad9341c08 fix(esp_rom): Fixed esp32c2 rom eco1 mbedtls issues 2024-09-30 09:21:21 +08:00
nilesh.kale
82c178618d feat(mbedtls): updated mbedtls version to 3.6.1 2024-09-29 20:20:07 +05:30
Wang Meng Yang
6df7db673e Merge branch 'feat/add_mode_chg_parem_v5.3' into 'release/v5.3'
feat(bt/bluedroid): Report sniff interval to application layer(v5.3)

See merge request espressif/esp-idf!33865
2024-09-29 14:03:31 +08:00
Jiang Jiang Jian
b398c12576 Merge branch 'fix/fix_esp32p4_freq_switching_timing_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix esp32p4 CPU frequency switching timing (v5.3)

See merge request espressif/esp-idf!33881
2024-09-29 12:11:07 +08:00
chaijie@espressif.com
3497691fc5 fix(sleep): fix_wrong_sleep_param_for_lp_memory_retention (v5.3) 2024-09-29 10:30:00 +08:00
Island
f765a4ccd8 Merge branch 'feat/get_ble_resolve_address_status_v5.3' into 'release/v5.3'
feat(ble/bluedroid): Support resolve BLE address for interval usage (v5.3)

See merge request espressif/esp-idf!33808
2024-09-29 10:29:59 +08:00
morris
a5ed03eb85 Merge branch 'feat/usb_disconnect_api_backport_v5.3' into 'release/v5.3'
refactor(usb): Update HCD tests to use port power off for disconnections backport v5.3

See merge request espressif/esp-idf!33527
2024-09-28 10:50:46 +08:00
Chen Jian Hua
8fa51aa1b5 fix(bt/controller): Fixed ble get tx power error
(cherry picked from commit 4108a5cc4c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-27 18:33:45 +08:00
Chen Jian Hua
0bf641a17c fix(bt/controller): Fixed the timeout of wake up timer when using RC OSC
(cherry picked from commit 873708579c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-27 18:33:43 +08:00
Tomas Rezucha
e009a4f451 feat(usb/host): Enable USB Host tests on P4 2024-09-27 11:31:42 +02:00
Tomas Rezucha
9bdea61071 fix(usb/host): Correctly handle unpowered port in HUB 2024-09-27 11:31:42 +02:00
Darian Leung
802ab4c2cc refactor(usb): Remove use of usb_phy_action() from unit tests
Currently, USB Host unit tests that require a software triggered disconnection/
reconnection rely on the 'usb_phy_action()' function.

This commit replaces those calls with 'hcd_port_command()' or
'usb_host_lib_set_root_port_power()'.

Note: Also removed 'test_usb_common.h/c' as it is no longer necessary are the
function call replacements.
2024-09-27 11:31:42 +02:00
Darian Leung
318c69a671 feat(usb): Add usb_host_lib_set_root_port_power()
This commit adds the usb_host_lib_set_root_port_power() function. This provides
a public API for users to power the root port OFF or ON at runtime, thus trigger
a disconnection or allow connections respectively.

In addition, the usb_host_config_t.root_port_unpowered install configuration is
provided to allow users to install the USB Host Library without automatically
powering ON the root port.
2024-09-27 11:31:42 +02:00
wuzhenghui
a82938bb7e fix(esp_hw_support): fix esp32p4 CPU frequency switching timing 2024-09-27 17:29:54 +08:00
wuzhenghui
5b1796b284 revert(esp_hw_support): revert stall another core during cpu/mem/apb freq switching
This reverts commit 4c2b86f5.
2024-09-27 17:28:05 +08:00
zhanghaipeng
a7d1558e32 fix(ble/bluedroid): Fixed BLE spelling error in word 2024-09-27 15:49:20 +08:00
zhanghaipeng
36b44e7430 feat(ble/bluedroid): Add BLE memory allocation failure message 2024-09-27 15:49:10 +08:00
zhanghaipeng
2129c70ecf feat(ble/controller): Display BLE controller init status for ESP32 and ESP32C3/S3 2024-09-27 15:49:01 +08:00
zhanghaipeng
049f644181 feat(ble/bluedroid): Optimize address resolution status for interval use 2024-09-27 14:47:15 +08:00
xiongweichao
93f862d6fd feat(bt/bluedroid): Report sniff interval to application layer 2024-09-27 14:11:26 +08:00
morris
620966389c Merge branch 'fix/fix_readme_check' into 'release/v5.3'
fix(ci): rerun pre-commit to fix readme

See merge request espressif/esp-idf!33856
2024-09-27 13:42:16 +08:00
Jiang Jiang Jian
144b039abc Merge branch 'feat/bringup_esp32c2_rom_mbedtls_to_formal_feature_v5.3' into 'release/v5.3'
feat(mbedtls): bringup rom mbedtls feature to formal (v5.3)

See merge request espressif/esp-idf!33800
2024-09-27 12:18:34 +08:00
Jiang Jiang Jian
ef53542940 Merge branch 'fix/fix_clock_retention_link_context_v5.3' into 'release/v5.3'
fix(esp_hw_support): add clock retention contents for esp32c6 & esp32h2  (v5.3)

See merge request espressif/esp-idf!33608
2024-09-27 12:18:11 +08:00
Chen Jichang
84f024478c fix(ci): rerun pre-commit to fix readme files 2024-09-27 11:12:55 +08:00
Island
466da04867 Merge branch 'fix/fix_nimble_gatt_server_example_readme_v5.3' into 'release/v5.3'
docs(ble): Added BLE Get Started documentation link to README.md (v5.3)

See merge request espressif/esp-idf!33830
2024-09-26 15:47:17 +08:00
Aditya Patwardhan
da96dfa4be Merge branch 'fix/ecdsa_verify_check_hash_len_v5.3' into 'release/v5.3'
Wrap some mbedtls' ECDSA verification related APIs (v5.3)

See merge request espressif/esp-idf!33783
2024-09-26 15:13:12 +08:00
Aditya Patwardhan
536d6225a1 Merge branch 'ci/enable_memprot_tests_for_esp32c61_v5.3' into 'release/v5.3'
Clear PMA entries before usage (v5.3)

See merge request espressif/esp-idf!33786
2024-09-26 15:11:58 +08:00
Island
0d81f5b619 Merge branch 'bugfix/fix_c2eco4_ble_init_error_v5.3' into 'release/v5.3'
fix(ble): Fixed BLE initialization issue on ESP32-C2 eco4

See merge request espressif/esp-idf!33812
2024-09-26 14:52:38 +08:00
Chen Jian Hua
b724f2a78f fix(bt): Update bt lib for ESP32(3bf7ef0)
- Fixed BLE scanning and initiating coexist


(cherry picked from commit 241b90f3f0)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-26 10:33:37 +08:00
Wei Yu Han
072d872fc6 docs(ble): Added BLE Get Started documentation link to README.md
(cherry picked from commit 5f008828d3)

Co-authored-by: Yuhan Wei <weiyuhan@espressif.com>
2024-09-26 09:38:23 +08:00
Alexey Lapshin
9d3cdebddb fix(gdbstub_runtime): fix test gdbstub_runtime which requiers elf file 2024-09-25 15:34:50 +07:00
Jiang Guang Ming
6729419ee9 feat(mbedtls): bringup rom mbedtls feature to formal 2024-09-25 14:56:36 +08:00
Zhang Hai Peng
2fbe37a0e5 feat(ble/bluedroid): Support resolve BLE address for interval usage
(cherry picked from commit b88b511362)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-09-25 12:13:31 +08:00
Shen Weilong
2040eb646c fix(ble): Fixed BLE initialization issue on ESP32-C2 eco4 2024-09-25 11:47:41 +08:00
Marius Vikhammer
7d8c955e21 fix(wdt): changed register dump on non panic task WDT to be more descriptive
Closes https://github.com/espressif/esp-idf/issues/14400
2024-09-25 10:51:47 +08:00
Island
707d097b01 Merge branch 'bugfix/fixed_c5_ble_cache_error_240919_v5.3' into 'release/v5.3'
Bugfix/fixed c5 ble cache error 240919 (v5.3)

See merge request espressif/esp-idf!33761
2024-09-25 10:31:36 +08:00
Rahul Tank
22858c37c1 Merge branch 'bugfix/fix_clang_compilation_issue_v5.3' into 'release/v5.3'
fix(nimble): Fix clang compilation issue (v5.3)

See merge request espressif/esp-idf!33763
2024-09-25 00:14:21 +08:00
Rahul Tank
c302ea2e71 Merge branch 'bugfix/fix_blufi_deinit_fail_v5.3' into 'release/v5.3'
fix(nimble): Fixed deinit sequence in blufi (v5.3)

See merge request espressif/esp-idf!33768
2024-09-25 00:10:25 +08:00
Adam Múdry
eec8a3ab83 feat(nvs): Test nvs_partition_gen.py and nvs_check.py with pytest
Little fixes in nvs_check.py
2024-09-24 16:42:45 +02:00
morris
f9548c4b7d Merge branch 'docs/fix_typo_gpio_description_v5.3' into 'release/v5.3'
docs: fix a typo in gpio.rst (v5.3)

See merge request espressif/esp-idf!33772
2024-09-24 21:33:56 +08:00
harshal.patil
e1d72e960c feat(mbedtls): Wrap mbedtls_ecdsa_read_signature to use ECDSA hardware when possible 2024-09-24 17:05:27 +05:30
harshal.patil
e4de9ffe7d fix(cpu_region_protect): Reset PMA entries before using them
- ROM uses some PMA entries so we clear such PMA entries before using them in ESP-IDF
2024-09-24 16:56:17 +05:30
harshal.patil
87ddff0ce5 fix(mbedtls/port): Check signature hash length before using ECDSA hardware 2024-09-24 16:48:01 +05:30
Martin Vychodil
e3fdf3efe9 Merge branch 'ci/increase_tiemout_wl_multiple_tasks_can_use_same_volume_v5.3' into 'release/v5.3'
ci: Increase CONFIG_FATFS_VFS_FSTAT_BLKSIZE size for auto_fsync case to fix CI (v5.3)

See merge request espressif/esp-idf!33749
2024-09-24 19:12:37 +08:00
Island
351e9208ee Merge branch 'bugfix/fix_ble_scan_assert_1728_v5.3' into 'release/v5.3'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(e9ae856) (v5.3)

See merge request espressif/esp-idf!33722
2024-09-24 16:10:19 +08:00
Adam Múdry
a01257a976 fix(nvs): nvs_tool.py reduce false duplicate warnings 2024-09-24 10:02:11 +02:00
Adam Múdry
e0e131d246 refactor(nvs): nvs_tool.py integrity check refactor 2024-09-24 10:02:11 +02:00
Linda
419b646d17 docs: fix a typo in gpio.rst 2024-09-24 15:56:21 +08:00
Rahul Tank
887c116f44 fix(nimble): Fixed deinit sequence in blufi 2024-09-24 12:20:07 +05:30
Rahul Tank
f8e4681ea0 fix(nimble): Fix clang compilation issue 2024-09-24 11:58:38 +05:30
Zhao Wei Liang
17c29f773b fix(ble): unified ble memory allocation method
(cherry picked from commit 8e4cc79a27)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-24 12:03:34 +08:00
Adam Múdry
d5e66b8196 ci: Increase CONFIG_FATFS_VFS_FSTAT_BLKSIZE size for auto_fsync case 2024-09-23 17:42:39 +02:00
Aditya Patwardhan
1f68652c46 Merge branch 'feature/add_api_to_get_last_status_code_logged_during_ota_v5.3' into 'release/v5.3'
feat(esp_https_ota): added API to get last status code logged from http resonse (v5.3)

See merge request espressif/esp-idf!33609
2024-09-23 20:49:13 +08:00
Marius Vikhammer
fbf7f2c031 Merge branch 'bugfix/fix_efuse_example_c2_v5.3' into 'release/v5.3'
fix(efuse): Fix efuse test examples (v5.3)

See merge request espressif/esp-idf!33729
2024-09-23 16:42:41 +08:00
Konstantin Kondrashov
5ff61c0913 fix(examples): Fix codespell check for efuse example 2024-09-23 11:10:40 +03:00
Konstantin Kondrashov
2d65f53903 feat(examples): Get offsets for efuses from espefuse.py 2024-09-23 11:10:40 +03:00
Konstantin Kondrashov
599419ab62 fix(examples): Fix SB and FE tests, type of sign 2024-09-23 10:27:14 +03:00
Konstantin Kondrashov
f4086e5f92 feat(examples): Increases partition table offset for P4 and C5 2024-09-23 10:26:31 +03:00
Marius Vikhammer
81c0ccfade fix(efuse): fix efuse examples not compiling on c2 2024-09-23 10:25:02 +03:00
morris
a29f9c9b57 Merge branch 'fix/usb_device_msc_example_fix_console_backport_v5.3' into 'release/v5.3'
fix(usb_device): Fix console periheral, enable USJ Console on P4 backport v5.3

See merge request espressif/esp-idf!33653
2024-09-23 14:42:18 +08:00
Jiang Jiang Jian
7c137656aa Merge branch 'feature/usb_host_hub_support_collective_backport_p2_v5.3' into 'release/v5.3'
feat(usb_host): Hub Support Collective backport part 2/3 (v5.3)

See merge request espressif/esp-idf!31365
2024-09-23 13:40:01 +08:00
Jiang Jiang Jian
b74c02bcd7 Merge branch 'bugfix/gcmp_reason_code_v53' into 'release/v5.3'
fix(esp_wifi): Fix reason code for sta not supporting GCMP

See merge request espressif/esp-idf!33639
2024-09-23 13:38:47 +08:00
zhanghaipeng
e07d014b1d fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(63eb54d)
- Fixed issue where RPA is not updated after BLE RPA timeout
2024-09-23 13:33:22 +08:00
chenjianhua
e6013c84da test(bt/bluedroid): Support to disable BLE address resolution 2024-09-23 13:33:22 +08:00
morris
81d0122ede Merge branch 'ci/remove_c5_build' into 'release/v5.3'
ci(esp32c5,esp32c61): stop building c5 and c61 on 5.3

See merge request espressif/esp-idf!33525
2024-09-23 13:16:36 +08:00
Island
d4a69b5a3d Merge branch 'feat/support_blecrt_242_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fixed access fault when reading BLE controller information fails (v5.3)

See merge request espressif/esp-idf!33634
2024-09-23 12:08:31 +08:00
Island
1bde82470a Merge branch 'bugfix/fix_ble_max_tx_power_on_esp32c3_v5.3' into 'release/v5.3'
fix(bt/controller): Change the max TX power to +20dBm on ESP32-C3 and ESP32-S3 (v5.3)

See merge request espressif/esp-idf!33617
2024-09-23 12:08:26 +08:00
Zhang Hai Peng
10664a2e03 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(e9ae856)
- Fixed BLE scan assert in lld_scan.c 1728


(cherry picked from commit 32c7694f56)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-09-23 11:13:32 +08:00
Island
48088eceaf Merge branch 'fix/ble_mesh_gh_pr_13135_v5.3' into 'release/v5.3'
fix(ble_mesh): Fix OP_TIME_SET and OP_TIME_STATUS (v5.3)

See merge request espressif/esp-idf!32769
2024-09-23 10:29:41 +08:00
Island
310e71e277 Merge branch 'fix/ble_mesh_github_pr_14140_v5.3' into 'release/v5.3'
fix(ble-mesh): don't use dangling pointer in nimble gatt service_(v5.3)

See merge request espressif/esp-idf!32612
2024-09-23 10:29:29 +08:00
Rahul Tank
94ea3fd1de Merge branch 'feat/send_data_len_afer_conn_v5.3' into 'release/v5.3'
feat(nimble): Set data length after connection (v5.3)

See merge request espressif/esp-idf!33694
2024-09-21 21:25:45 +08:00
Jiang Jiang Jian
f41a395b78 Merge branch 'bugfix/warn_rc32k_use_v5.3' into 'release/v5.3'
fix(clk): warn the users to avoid using RC32K clock (v5.3)

See merge request espressif/esp-idf!33501
2024-09-21 14:53:49 +08:00
Jiang Jiang Jian
fe0e852e0a Merge branch 'bugfix/esp_ringbuf_32_bit_alignment_v5.3' into 'release/v5.3'
fix(ringbuf): allow xRingbufferCreateWithCaps to pass in non-32-bit aligned size (v5.3)

See merge request espressif/esp-idf!33520
2024-09-21 14:53:34 +08:00
Jiang Jiang Jian
5ccf21e236 Merge branch 'ble_dev/esp32c2eco4_chip_20240903_v5.3' into 'release/v5.3'
change(ble): update c2 eco4 ld file (v5.3)

See merge request espressif/esp-idf!33669
2024-09-21 14:53:01 +08:00
Sudeep Mohanty
e0608d7c2c fix(freertos): Fixed assert failure in vTaskDeleteWithCaps
This commit fixes an assert failure in vTaskDeleteWithCaps() when
multiple un-pinned tasks are created with stack in the external memory
and such tasks delete themselves.

Closes https://github.com/espressif/esp-idf/issues/14222
2024-09-20 15:13:49 +02:00
Sudeep Mohanty
469d9c8bae test(freertos): Added a test for vTaskDeleteWithCaps when stack is in ext RAM
This commit adds a stress tests for creating multiple tasks with
xTaskCreateWithCaps such that the stack is allocated in external SPIRAM.
Then the tasks self-delete. This is done iteratively as stress test.
2024-09-20 15:07:23 +02:00
Shu Chen
ae4b955a0c Merge branch 'feat/lwip_dns_external_resolve_hook_v5_3' into 'release/v5.3'
feat(lwip): Add DNS external hook in TCPIP context and replace netconn external resolve hook with dns external hook for OpenThread (v5.3)

See merge request espressif/esp-idf!33512
2024-09-20 14:18:01 +08:00
Marius Vikhammer
5bedb0ed69 Merge branch 'fix/ringbuf_receives_item_not_yet_sent_v5.3' into 'release/v5.3'
fix(esp_ringbuf): Fixed a bug where in a no-split buffer received items prematurely (v5.3)

See merge request espressif/esp-idf!33649
2024-09-20 13:38:56 +08:00
Shen Wei Long
cd1ff31bba change(ble): update c2 eco4 ld file
(cherry picked from commit 25189b190f)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2024-09-20 12:53:37 +08:00
Wang Meng Yang
d15668f058 Merge branch 'bugfix/fix_sdp_bugs_v5.3' into 'release/v5.3'
Bugfix/fix sdp bugs[backport 5.3]

See merge request espressif/esp-idf!33602
2024-09-20 11:41:39 +08:00
Wang Meng Yang
22912e4f21 Merge branch 'bugfix/fix_some_bugs_in_avrcp_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fixed some bugs in AVRCP (Backport v5.3)

See merge request espressif/esp-idf!33576
2024-09-20 11:40:54 +08:00
Pat Erley
0507cbaf14 fix(ble_mesh): Fix OP_TIME_SET and OP_TIME_STATUS
When a user app is handling these messages, the tai_utc_delta and
time_zone_offset fields are not correctly populated.  Resolve by
properly setting the fields.
2024-09-20 10:59:23 +08:00
Mario Schlegel
98df0172ac fix(ble-mesh): don't use dangling pointer in nimble gatt service 2024-09-20 10:58:56 +08:00
Island
cdef1308a4 Merge branch 'feat/ble_mesh_lib_flash_size_optimized_v5.3' into 'release/v5.3'
feat(ble_mesh): ble mesh lib flash size optimized (v5.3)

See merge request espressif/esp-idf!33477
2024-09-20 10:36:16 +08:00
Marius Vikhammer
d8ec774d96 Merge branch 'bugfix/check_bootloader_size_with_sign_v5.3' into 'release/v5.3'
fix(esptool_py): Check the size of the bootloader + signature block (v5.3)

See merge request espressif/esp-idf!33590
2024-09-20 09:14:07 +08:00
Rahul Tank
ef1c1169e4 feat(nimble): Set data length after connection 2024-09-19 20:22:43 +05:30
Konstantin Kondrashov
fd36173ac3 fix(examples): Fix pre-commit check for efuse ESP32-C5 2024-09-19 17:30:42 +03:00
Sudeep Mohanty
7d442f76f1 fix(esp_ringbuf): Fixed a bug where in a no-split buffer received items prematurely
This commit fixes a bug in the no-split buffer which could receive an
item prematurely if the space on the buffer is acquired until the buffer
is full. The commit also adds a unit test for this scenario.

Closes https://github.com/espressif/esp-idf/issues/14568
2024-09-19 16:01:54 +02:00
Peter Marcisovsky
e6a551b88d fix(usb_device): Fix console periheral, enable USJ Console on P4 2024-09-19 13:52:23 +02:00
morris
3c3d05e97b Merge branch 'feat/supported_camera_sc2336_lcd_ek79007_v5.3' into 'release/v5.3'
camera: supported camera related example using sc2336 and ek79007 (v5.3)

See merge request espressif/esp-idf!33636
2024-09-19 16:14:41 +08:00
Island
a286bc32dd Merge branch 'bugfix/fixed_c6_crash_c2_crash_issue_v5.3' into 'release/v5.3'
Bugfix/fixed c6 crash c2 crash issue (v5.3)

See merge request espressif/esp-idf!33599
2024-09-19 14:34:10 +08:00
Armando
c48a47c341 feat(camera): supported camera related example using sc2336 and ek79007
Closes https://github.com/espressif/esp-idf/issues/14517
2024-09-19 14:18:42 +08:00
Rahul Tank
bae4cf504a Merge branch 'fix/added_a_change_to_print_address_of_advertising_instance_v5.3' into 'release/v5.3'
fix(nimble): Added a change to print address of an advertising instance (v5.3)

See merge request espressif/esp-idf!33561
2024-09-19 14:09:01 +08:00
Aditi
f1468c2ca3 fix(esp_wifi): Fix reason code for sta not supporting GCMP
Add fix for returning correct reason code when sta doesn't
     support GCMP to ensure consistent behaviour for all chips.
2024-09-19 11:29:20 +05:30
Shu Chen
01613ca01d Merge branch 'backport/add_thread_curl_https_ci_case_v5.3' into 'release/v5.3'
feat(openthread): add thread curl https ci case (Backport v5.3)

See merge request espressif/esp-idf!33586
2024-09-19 10:38:19 +08:00
morris
7fbc78d4dc Merge branch 'feat/support_esp32c2_eco4_rom_systimer_hal_v5.3' into 'release/v5.3'
feat(esp_rom): support esp32c2 rev2.0(ECO4) rom systimer hal (backport v5.3)

See merge request espressif/esp-idf!33618
2024-09-19 10:16:41 +08:00
Chen Jian Hua
3b76633516 fix(bt/bluedroid): Fixed access fault when reading BLE controller information fails
(cherry picked from commit e4e23087ee)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-19 09:12:43 +08:00
Chen Jian Hua
805ee5af90 feat(bt/bluedroid): Add BLE connection id param for ESP_GATTS_RESPONSE_EVT
(cherry picked from commit e4a372ab76)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-19 09:12:41 +08:00
Jiang Guang Ming
05b9f85acc feat(esp_rom): support esp32c2 rev2.0(ECO4) rom systimer hal 2024-09-18 19:21:45 +08:00
Jiang Guang Ming
da31e4beb4 feat(esp_rom): Add esp32c2.rom.eco4.ld 2024-09-18 19:21:35 +08:00
Chen Jian Hua
6a34742cb7 fix(bt/controller): Change the max TX power to +20dBm on ESP32-C3 and ESP32-S3
(cherry picked from commit fe43c8f1b5)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-18 17:34:34 +08:00
nilesh.kale
186d53427e feat(esp_https_ota): added API to get last status code logged from http resonse
Closes https://github.com/espressif/esp-idf/issues/14302
2024-09-18 14:58:16 +05:30
wuzhenghui
234103d7aa fix(esp_hw_support): add clock retention contents 2024-09-18 17:22:21 +08:00
zwl
8650436d6b fix(ble): fixed occasional crash issue in multi-connect scenarios on ESP32-C6 2024-09-18 17:05:08 +08:00
liqigan
50ba5891b5 fix(bt/bluedroid): Fixed not deep copy service_name and user1_ptr in RAW SDP search event 2024-09-18 16:22:24 +08:00
liqigan
0fe9ddd190 change(bt/bluedroid): Limited SDP service discovery operation 2024-09-18 16:22:19 +08:00
liqigan
f1d14e7db5 change(bt/bluedroid): Release record data after SDP record created 2024-09-18 16:08:14 +08:00
Zhao Wei Liang
1ae74c4dd4 fix(ble): fixed memory leak issue when using uart hci
(cherry picked from commit 4d2c44f511)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-18 15:58:07 +08:00
Zhao Wei Liang
dbfc55c111 fix(ble): fixed occasional assertion issue when enabling logging on ESP32-C2
(cherry picked from commit 0ef9ecb715)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-18 15:58:05 +08:00
Zhao Wei Liang
a760bbc784 fix(ble): fixed occasional acl data packet loss issue when using UHCI on ESP32-H2
(cherry picked from commit c929a01931)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-18 15:58:02 +08:00
Konstantin Kondrashov
da77828786 fix(examples): Increases partition table offset for SBV2+FE test 2024-09-18 09:58:10 +03:00
Konstantin Kondrashov
3a8e4d8fa0 fix(esptool_py): Check the size of the bootloader + signature block 2024-09-18 09:58:10 +03:00
yiwenxiu
307df28d6e feat(openthread): add thread curl https ci case 2024-09-18 14:17:39 +08:00
linruihao
1de0308a65 fix(bt/bluedroid): Fixed some bugs in AVRCP 2024-09-18 11:05:13 +08:00
Marius Vikhammer
0955c1aabe Merge branch 'contrib/github_pr_14469_v5.3' into 'release/v5.3'
fix(spinlock): comparison of integer expressions of different signedness (GitHub PR) (v5.3)

See merge request espressif/esp-idf!33543
2024-09-18 09:12:20 +08:00
Alexey Gerenkov
75e8a58a41 Merge branch 'fix/sysview_example_tests_v5.3' into 'release/v5.3'
test(sysview): fix gdb no response error in sysview_heap_log tests (v5.3)

See merge request espressif/esp-idf!33457
2024-09-17 22:58:58 +08:00
Mahavir Jain
17aa8c7f4c Merge branch 'contrib/github_pr_14314_v5.3' into 'release/v5.3'
perf(gcm): shrink Shoup table and tune GCM loop (GitHub PR) (v5.3)

See merge request espressif/esp-idf!32996
2024-09-17 20:51:05 +08:00
Richard Allen
0d3856e369 change(mbedtls/port): optimize gcm_mult()
1) pre-shift GCM last4 to use 32-bit shift

On 32-bit architectures like Aarch32, RV32, Xtensa,
shifting a 64-bit variable by 32-bits is free,
since it changes the register representing half of the 64-bit var.
Pre-shift the last4 array to take advantage of this.

2) unroll first GCM iteration

The first loop of gcm_mult() is different from
the others. By unrolling it separately from the
others, the other iterations may take advantage
of the zero-overhead loop construct, in addition
to saving a conditional branch in the loop.
2024-09-17 20:06:24 +08:00
luoxu
43515e0ccd feat(ble_mesh): ble mesh lib flash size optimized 2024-09-17 17:23:47 +08:00
shreeyash
fd98cf0594 fix(nimble): Added a change to print address of an advertising instance 2024-09-17 12:18:42 +05:30
Mahavir Jain
9a6fcb836c Merge branch 'feat/support_esp32c2_eco4_rom_mbedtls_v3.6.0_lts_v5.3' into 'release/v5.3'
feat(mbedtls): support esp32c2 eco4 rom mbedtls v3.6.0 lts v5.3 (backport v5.3)

See merge request espressif/esp-idf!33419
2024-09-17 12:51:38 +08:00
Rahul Tank
a7fdf8d982 Merge branch 'bugfix/nimble_coverity_fixes_v5.3' into 'release/v5.3'
fix(nimble): Fix for coverity issues (v5.3)

See merge request espressif/esp-idf!33461
2024-09-16 22:40:14 +08:00
Marius Vikhammer
619db6b4c4 Merge branch 'fix/spinlock-var-not-used-warning_v5.3' into 'release/v5.3'
fix(system): fixed warnings related to ununsed var in spinlock.h (backport v5.3)

See merge request espressif/esp-idf!33484
2024-09-16 18:00:01 +08:00
Rahul Tank
a7d487acc5 fix(nimble): Fix for coverity issues 2024-09-16 14:26:06 +05:30
Rahul Tank
d97d579e6b Merge branch 'bugfix/add_dummy_cb_during_deinit_v5.3' into 'release/v5.3'
fix(nimble): De-register host cb in stack deinit (v5.3)

See merge request espressif/esp-idf!33373
2024-09-16 16:41:45 +08:00
Andste82
b24d36a1cd fix(spinlock): comparison of integer expressions of different signedness 2024-09-16 09:49:25 +03:00
Rahul Tank
62d9ebf9ec fix(nimble): De-register host cb in stack deinit 2024-09-16 10:36:58 +05:30
Rahul Tank
42fc27767c Merge branch 'bugfix/fixed_ble_multi_conn_host_issue_5.3' into 'release/v5.3'
fix(ble): fixed the nimble connection reattempt issue when the OPTIMIZE_MULTI_CONN is enabled

See merge request espressif/esp-idf!33500
2024-09-16 13:04:15 +08:00
morris
e6ee09b6a1 Merge branch 'fix/fix_csi_bridge_clock_enable_issue_v5.3' into 'release/v5.3'
rcc: change rcc var i to rcc_cnt (v5.3)

See merge request espressif/esp-idf!33536
2024-09-14 16:10:56 +08:00
Jiang Jiang Jian
ee735d7dbf Merge branch 'bugfix/fix_missing_per_adv_sync_est_evt_v5.3' into 'release/v5.3'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(c66a703) (Backport v5.3)

See merge request espressif/esp-idf!33450
2024-09-14 15:49:11 +08:00
Armando
9011c4a3fd change(rcc): change rcc var i to rcc_cnt 2024-09-14 10:05:00 +08:00
Chen Jichang
c9430ed953 ci(esp32c5,esp32c61): stop building c5 and c61 on 5.3 2024-09-13 19:39:29 +08:00
morris
d02281a90c Merge branch 'bugfix/uart_example_stask_overflow_s3_v5.3' into 'release/v5.3'
fix(uart): increased stack size for the task in uart example (v5.3)

See merge request espressif/esp-idf!33519
2024-09-13 19:21:09 +08:00
Island
2c621edab6 Merge branch 'bugfix/fixed_multi_conn_example_crash_issue_5.3' into 'release/v5.3'
fix(ble): fiexed the crash issue of examples/bluetooth/nimble/ble_multi_conn

See merge request espressif/esp-idf!33492
2024-09-13 19:18:02 +08:00
WanqQixiang
0c8074b318 feat(openthread): Replace netconn external resolve hook with dns external hook 2024-09-13 17:59:15 +08:00
WanqQixiang
4eac78f675 feat(lwip): Add DNS external hook in TCPIP context(v5.3) 2024-09-13 17:59:15 +08:00
Song Ruo Jing
5eb49bab26 fix(ringbuf): allow xRingbufferCreateWithCaps to pass in non-32-bit aligned size 2024-09-13 17:24:39 +08:00
aleks
1c9ff00e50 fix(uart/example): Fixed minimal stack size in uart_echo example 2024-09-13 17:16:20 +08:00
aleks
3ded6819f3 fix(uart/example): Fixed the stack size allocation in uart_echo_rs485 example 2024-09-13 17:15:54 +08:00
franzhoepfinger
7bb93a2b1e Update rs485_example.c
Signed-off-by: aleks <aleks@espressif.com>
Merges https://github.com/espressif/esp-idf/pull/14382
2024-09-13 17:15:42 +08:00
Song Ruo Jing
d712ae83ee fix(uart): increased stack size for the task in uart_events example
The example cannot run successfully on ESP32S3 due to task stack overflow
Introduced in a4e6f57a40
2024-09-13 17:15:15 +08:00
morris
df00c22439 Merge branch 'bugfix/fix_batch_of_i2c_issue_v5.3' into 'release/v5.3'
fix(i2c_master): Fix an I2C issue that slave streth happen but master timeout...etc.4MR (backport v5.3)

See merge request espressif/esp-idf!33475
2024-09-13 15:49:39 +08:00
Erhan Kurubas
29c39f5164 test(sysview): fix gdb no response error in sysview_heap_log tests 2024-09-13 09:34:23 +03:00
Song Ruo Jing
a9fcf0d57a fix(clk): warn the users to avoid using RC32K clock 2024-09-13 11:44:51 +08:00
ShenWeilong
03f54fe5b0 fix(ble): fixed the nimble connection reattempt issue when the OPTIMIZE_MULTI_CONN is enabled 2024-09-13 11:23:21 +08:00
Shen Weilong
dfead07789 fix(ble): fiexed the crash issue of examples/bluetooth/nimble/ble_multi_conn 2024-09-12 20:53:20 +08:00
Guillaume Souchere
ce4e689be0 fix(system): fixed warnings related to ununsed var in spinlock.h 2024-09-12 08:34:44 +02:00
Marius Vikhammer
c72fec55dd Merge branch 'feature/efuse_update_v5.3' into 'release/v5.3'
feat(efuse): Updates efuse tables for p4 and c5 (v5.3)

See merge request espressif/esp-idf!33280
2024-09-12 13:39:21 +08:00
morris
5589d8cbf4 Merge branch 'feat/flash_32bit_support_p4_v5.3' into 'release/v5.3'
feature(spi_flash): Add 32bit address support for esp32p4 eco1 (backport v5.3)

See merge request espressif/esp-idf!31262
2024-09-12 11:45:14 +08:00
C.S.M
403bd86a21 fix(i2c): Fix the wrong return value of esp32,esp32s2,esp32s3 2024-09-12 11:21:10 +08:00
C.S.M
7be3141195 fix(i2c): Fix the i2c sda/scl force out register value on some esp chips 2024-09-12 11:21:10 +08:00
C.S.M
189db78bec fix(i2c): Fix possible error state in clear the bus,
Closes https://github.com/espressif/esp-idf/issues/13647
2024-09-12 11:21:08 +08:00
C.S.M
deb91c7abe fix(i2c_master): Fix an I2C issue that slave streth happen but master timeout set seems doesn't work
Closes https://github.com/espressif/esp-idf/issues/14129
Closes https://github.com/espressif/esp-idf/issues/14401
2024-09-12 11:20:46 +08:00
morris
561f46d989 Merge branch 'docs/sync_psram_noinit_and_bss_description_v5.3' into 'release/v5.3'
docs(psram): sync psram noinit description (v5.3)

See merge request espressif/esp-idf!33462
2024-09-12 10:01:14 +08:00
morris
230d0c7c5e Merge branch 'feat/parlio_tx_support_psram_buffer_v5.3' into 'release/v5.3'
feat(parlio_tx): support transmit buffer in external PSRAM (v5.3)

See merge request espressif/esp-idf!33357
2024-09-12 09:43:06 +08:00
Rahul Tank
3743d387a4 Merge branch 'feat/add_ext_adv_param_v5.3' into 'release/v5.3'
feat(nimble): Add support for ext adv param v2 HCI command (v5.3)

See merge request espressif/esp-idf!33409
2024-09-12 00:24:34 +08:00
Konstantin Kondrashov
b7cbf82c14 feat(efuse): Updates efuse table for esp32c5 2024-09-11 23:12:46 +08:00
Konstantin Kondrashov
ce822125e7 feat(efuse): Updates efuse table for esp32p4 2024-09-11 23:12:46 +08:00
Chen Jichang
bf34e2547d docs(psram): sync psram noinit description 2024-09-11 20:04:20 +08:00
Rahul Tank
8fb1a41da5 feat(nimble): Add support for ext adv param v2 HCI command 2024-09-11 15:58:38 +05:30
morris
b63ac1ce9b Merge branch 'ci/stop_test_c5_v5.3' into 'release/v5.3'
ci(esp32c5): stop testing c5

See merge request espressif/esp-idf!32568
2024-09-11 17:40:02 +08:00
linruihao
2bf5856f06 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(c66a703)
- Fixed missing sync established event after canceling sync
2024-09-11 17:12:12 +08:00
Jiang Jiang Jian
b3a29daa8c Merge branch 'bugfix/fix_wifi_bugs_240904_v5.3' into 'release/v5.3'
fix(wifi): fix wifi bugs 240904 v5.3(Backport v5.3)

See merge request espressif/esp-idf!33383
2024-09-11 16:36:07 +08:00
David Čermák
04741d258a Merge branch 'bugfix/eth_plus_wifi_doc_v5.3' into 'release/v5.3'
docs(esp_eth): added warning to not use ESP32 as ETH CLK source with WiFi (v5.3)

See merge request espressif/esp-idf!33245
2024-09-11 16:31:05 +08:00
Wang Meng Yang
bb85aaf10c Merge branch 'bugfix/exit_sniff_immed_enter_sniff_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fix the protocol stack to exit sniff mode(v5.3)

See merge request espressif/esp-idf!33397
2024-09-11 15:31:05 +08:00
Rahul Tank
7c0c3fa104 Merge branch 'bugfix/bidirectioanl_data_transfer_ble_spp_v5.3' into 'release/v5.3'
fix(nimble): Added support for bidirectional data trasfer (v5.3)

See merge request espressif/esp-idf!33412
2024-09-11 14:02:59 +08:00
Linda
4e4f23dde0 This is a combination of 2 commits.
docs: update startup.rst description for single-core chip support
2024-09-11 10:44:04 +08:00
Chen Jichang
bf487cc290 feat(parlio_tx): support psram buffer 2024-09-11 09:52:49 +08:00
Chen Jichang
8bf4b5bbc0 fix(parlio_tx): fix error in first transfer and 1 byte transfer
On p4, the clock was configured in the wrong order causing a dropped
count on the first transmission. And gdma eof event fails to trigger
parlio_tx eof event when transmitting single byte.
2024-09-11 09:52:49 +08:00
renpeiying
d98a0a0979 docs: Update zh_CN translation for MR32736 2024-09-10 13:45:59 +08:00
Ondrej Kosta
243b01eccc docs(esp_eth): added warning to not use ESP32 as ETH CLK source with WiFi 2024-09-10 13:45:59 +08:00
Island
4d0db7045d Merge branch 'bugfix/fix_some_ble_bugs_240826_v5.3' into 'release/v5.3'
Fixed some BLE bugs 240826 on ESP32C3 (8ce789b) (v5.3)

See merge request espressif/esp-idf!33389
2024-09-10 11:37:42 +08:00
Island
1245cb2a9a Merge branch 'feat/support_ble_scan_and_init_coex_on_esp32_v5.3' into 'release/v5.3'
Support BLE scanning and initiating coexist on ESP32 (v5.3)

See merge request espressif/esp-idf!33385
2024-09-10 11:37:21 +08:00
Jiang Guang Ming
5a3c22dc2b feat(mbedtls): support rom mbedtls threading layer 2024-09-10 10:00:44 +08:00
Jiang Guang Ming
9e618fffcb feat(mbedtls): select MBEDTLS_CMAC_C when MBEDTLS_USE_CRYPTO_ROM_IMPL enabled 2024-09-10 10:00:44 +08:00
Marius Vikhammer
2dea1035d9 Merge branch 'feature/p4_efuse_get_pkg_ver_v5.3' into 'release/v5.3'
feat(efuse): Updates esp_efuse_get_pkg_ver (v5.3)

See merge request espressif/esp-idf!32931
2024-09-10 10:00:10 +08:00
Jiang Guang Ming
fb9a435952 feat(mbedtls): support ROM mbedtls v3.6.0 on C2 rev2.0(ECO4) 2024-09-10 09:47:39 +08:00
Jiang Guang Ming
caca3c2bc3 feat(esp_rom): include rom.mbedtls.eco4.ld with C2 rev2.0(ECO4) select 2024-09-10 09:47:31 +08:00
Jiang Guang Ming
0e80012fce feat(esp_rom): update esp32c2.rom.mbedtls.eco4.ld 2024-09-10 09:47:22 +08:00
Jiang Guang Ming
4e41b73b04 feat(esp_hw_support): Support esp32c2 rev2.0 chip 2024-09-10 09:41:33 +08:00
Ivan Grokhotkov
c697efd32a Merge branch 'feat/newlib-add-sbom-exclude_cve-2024-30949' into 'release/v5.3'
fix(newlib): sbom: add CVE-2024-30949 to cve-exclude-list

See merge request espressif/esp-idf!33369
2024-09-10 07:34:33 +08:00
Astha Verma
c6f9d1b4cd fix(nimble): Added support for bidirectional data trasfer 2024-09-09 18:41:06 +05:30
Jiang Jiang Jian
ab11ab7769 Merge branch 'bugfix/fix_some_esp32_host_issues_v5.3' into 'release/v5.3'
Bugfix/fix some esp32 host issues(Backport v5.3)

See merge request espressif/esp-idf!32681
2024-09-09 17:28:52 +08:00
Mahavir Jain
37bdbf3693 Merge branch 'contrib/github_pr_14317_v5.3' into 'release/v5.3'
fix(mbedtls/port): fix codespell issues (GitHub PR) (v5.3)

See merge request espressif/esp-idf!33010
2024-09-09 15:47:37 +08:00
xiongweichao
a9f47ffd5e fix(bt/bluedroid): Fix the protocol stack to exit sniff mode
- Already in result mode but request change indication has not been cleared
2024-09-09 15:30:39 +08:00
Richard Allen
b4c956c801 fix(mbedtls/port): fix codespell issues
Fix a few comments codespell identified.
2024-09-09 14:09:19 +08:00
Jiang Jiang Jian
0c7e957636 Merge branch 'bugfix/psram_fallback_in_wifi_osi_v5.3' into 'release/v5.3'
fix(wifi): Add PSRAM failure fallback in WiFi Queue API's (backport v5.3)

See merge request espressif/esp-idf!33345
2024-09-09 14:08:48 +08:00
chenjianhua
1feb703e73 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(8ce789b)
- Fixed BLE vendor HCI set scan perfer address command
- Support BLE vendor HCI get controller compile version command
- Fixed BLE util buffer free after controller reset
- Fixed assert when connection already exist and be connected again
2024-09-09 11:35:18 +08:00
morris
4a3ca7f97f Merge branch 'feat/i80_lcd_esp32p4_v5.3' into 'release/v5.3'
Add i80 LCD support on ESP32P4 (v5.3)

See merge request espressif/esp-idf!33293
2024-09-09 11:33:30 +08:00
Jiang Jiang Jian
887cb5dffa Merge branch 'fix/clang_linker_fix_for_linux_target_v5.3' into 'release/v5.3'
fix(cmake): Fixed linker not supporting -warn_commons for linux target on MacOS (v5.3)

See merge request espressif/esp-idf!33052
2024-09-09 11:32:03 +08:00
Jiang Jiang Jian
5aa5090126 Merge branch 'mqtt_update_v5.3' into 'release/v5.3'
change(mqtt): Updte esp_mqtt submodule (v5.3)

See merge request espressif/esp-idf!32938
2024-09-09 11:30:41 +08:00
chenjianhua
f8d64f1026 feat(bt): Update esp32 bt-lib(bc393dd)
- Fixed BLE vendor HCI set scan perfer address command
- Support BLE vendor HCI get controller compile version command
- Support BLE scanning and initiating coexist
2024-09-09 11:30:34 +08:00
Jiang Jiang Jian
591805b943 Merge branch 'test/fix_flaky_sched_time_test_v5.3' into 'release/v5.3'
test(freertos): Fixed flaky scheduling time test (v5.3)

See merge request espressif/esp-idf!32848
2024-09-09 11:29:57 +08:00
Jiang Jiang Jian
d6e9558a1c Merge branch 'contrib/github_pr_14329_v5.3' into 'release/v5.3'
fix(ulp): Add the missing extern "C" guard to ulp_lp_core_print.h (GitHub PR) (v5.3)

See merge request espressif/esp-idf!32833
2024-09-09 11:27:51 +08:00
Jiang Jiang Jian
b994115eee Merge branch 'change/support_pm_slp_iram_opt_in_normal_light_sleep_v5.3' into 'release/v5.3'
change(esp_pm): bypass cache access assertion when using ext0 or ext1(backport v5.3)

See merge request espressif/esp-idf!33142
2024-09-09 11:26:28 +08:00
sibeibei
5ee415a5f5 fix(wifi): fix wifi bugs 240904 v5.3 2024-09-09 11:14:09 +08:00
Xiao Xufeng
d4c9710569 ci(esp32c5): stop testing c5 2024-09-09 10:45:51 +08:00
Island
0593e04dee Merge branch 'docs/optimized_ble_adv_data_type_v5.3' into 'release/v5.3'
docs(ble/bluedroid): Optimize BLE example for setting advertising data (v5.3)

See merge request espressif/esp-idf!32755
2024-09-09 10:35:05 +08:00
Island
140873dfaa Merge branch 'bugfix/fix_ble_resolve_adv_data_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed memory out-of-bounds issue when parsing adv data (v5.3)

See merge request espressif/esp-idf!33023
2024-09-09 10:33:30 +08:00
Roman Leonov
cc505fe27d refactor(hub): Cleaned up dev_tree_node debug output, moved node freeing 2024-09-07 11:46:53 +02:00
zhanghaipeng
b9edac01ae feat(ble/controller): Support get BLE controller free heap size 2024-09-07 12:26:37 +08:00
zhanghaipeng
ca5db5aef0 docs(blufi): Optimize documentation for Blufi example 2024-09-07 12:25:30 +08:00
zhanghaipeng
e4003fd98e fix(ble/bluedroid): Optimize BLE function 'esp_ble_resolve_adv_data_by_type' 2024-09-07 12:25:22 +08:00
zhanghaipeng
af9ebecc1d fix(ble/bluedroid): Fixed memory out-of-bounds issue when parsing adv data 2024-09-07 12:25:10 +08:00
Krzysztof Budzynski
cef46b3cef Merge branch 'docs/remove_user_guide_for_esp32_pico_kit_related_migration_v5.3' into 'release/v5.3'
docs: remove user guide for esp32-pico-kit related docs after migration (v5.3)

See merge request espressif/esp-idf!32781
2024-09-06 22:05:58 +08:00
Alexey Lapshin
13ec7d2b24 fix(newlib): sbom: add CVE-2024-30949 to cve-exclude-list 2024-09-06 18:27:09 +07:00
renpeiying
d097cf38b3 docs: Remove User Guide for ESP32-Pico-Kit related docs after migration 2024-09-06 19:21:32 +08:00
Rahul Tank
50abf54d0f Merge branch 'bugfix/make_cccd_flags_configurable_v5.3' into 'release/v5.3'
fix(nimble): Make CCCD flags configurable (v5.3)

See merge request espressif/esp-idf!33233
2024-09-06 18:57:51 +08:00
Roman Leonov
c2691b94c8 refactor(ext_hub): Prerequisites for the Ext Port Driver 2024-09-06 10:53:13 +02:00
Roman Leonov
aa3adb747e fix(usb_host): The Enumeration Driver, cancellation on error 2024-09-06 10:53:01 +02:00
Wang Meng Yang
4ac395b1b7 Merge branch 'bugfix/fix_hid_cod_setting_v5.3' into 'release/v5.3'
Bugfix/fix hid cod setting[backport 5.3]

See merge request espressif/esp-idf!33337
2024-09-06 16:52:22 +08:00
Roman Leonov
23852bd449 docs(ext_hub): Added description for External Hub Driver 2024-09-06 10:29:50 +02:00
Roman Leonov
8c3a4fc1fe feat(ext_hub): Added External Hub driver 2024-09-06 10:29:02 +02:00
Roman Leonov
56c7b79253 fix(usb_host): Increased address map for clients and changed the uid member type 2024-09-06 10:27:42 +02:00
Tomas Rezucha
a9f8f2576a fix(enum): Returned usb_round_up_to_mps for control request of string descriptors 2024-09-06 10:27:42 +02:00
Roman Leonov
71708508d6 feat(hub): Added device tree nodes list and uid calculation logic 2024-09-06 10:27:42 +02:00
Roman Leonov
9eb4ea32fe fix(enum): Fixed STALL on descriptor request, removed unused value 2024-09-06 10:27:42 +02:00
Roman Leonov
a3b60ecf51 docs(enum): Added description for Enumeration process (Enum Driver) 2024-09-06 10:27:40 +02:00
Roman Leonov
e729453089 refactor(enum): Curved out Enumeration process from Hub Driver 2024-09-06 10:17:22 +02:00
Roman Leonov
231247b0f5 refactor(hub): Updated HUB api for ENUM driver 2024-09-06 10:17:22 +02:00
Roman Leonov
7fdc327cc1 refactor(usbh): Updated USBH api for ENUM driver 2024-09-06 10:17:22 +02:00
Mahavir Jain
77475b4a9a Merge branch 'bugfix/add_notify_flag_for_wifi_prov_v5.3' into 'release/v5.3'
fix(wifi_prov): Add notify characteristic flag support (v5.3)

See merge request espressif/esp-idf!33183
2024-09-06 14:43:35 +08:00
morris
f7b540934b Merge branch 'bugfix/dma2d_transacrion_config_lifecycle_v5.3' into 'release/v5.3'
fix(lcd): prolonged the lifecycle of dma2d transaction config structure (v5.3)

See merge request espressif/esp-idf!32837
2024-09-06 13:36:31 +08:00
shreeyash
1ebc4f4c8b fix(nimble): Make CCCD flags configurable 2024-09-06 10:53:01 +05:30
morris
021233eed7 Merge branch 'refactor/use_gdma_link_list_in_parlio_tx_v5.3' into 'release/v5.3'
refactor(parlio_tx): use gdma link list driver to mount buffer (v5.3)

See merge request espressif/esp-idf!33334
2024-09-06 10:44:02 +08:00
Island
bba6bd35f1 Merge branch 'docs/optimized_ble_gattc_multi_connect_example_v5.3' into 'release/v5.3'
docs(ble/bluedroid): Optimize BLE example documentation for getting characteristic (v5.3)

See merge request espressif/esp-idf!33194
2024-09-06 10:31:55 +08:00
Island
dfbbbabfbc Merge branch 'bugfix/fix_ble_channel_map_update_v5.3' into 'release/v5.3'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(f583012) (v5.3)

See merge request espressif/esp-idf!32581
2024-09-06 10:31:52 +08:00
Jiang Jiang Jian
ddda4cc013 Merge branch 'contrib/github_pr_14276_v5.3' into 'release/v5.3'
fix(esp_eth): fix C++ invalid type conversion error (GitHub PR) (v5.3)

See merge request espressif/esp-idf!32787
2024-09-06 10:31:10 +08:00
Jiang Jiang Jian
9c8303a7fa Merge branch 'ci/disable_dangerjs_releasenote_check_v5.3' into 'release/v5.3'
change(ci): disable dangerjs checker for release notes (v5.3)

See merge request espressif/esp-idf!32773
2024-09-06 10:30:13 +08:00
Jiang Jiang Jian
93cce50b3c Merge branch 'feat/print_the_ble_mac_when_init_5.3' into 'release/v5.3'
feat(ble): Print out the BT mac when the controller is initialized

See merge request espressif/esp-idf!32730
2024-09-06 10:29:39 +08:00
Jiang Jiang Jian
f3dc731015 Merge branch 'fix/incorrect_critical_nesting_count_in_linux_port_v5.3' into 'release/v5.3'
fix(freertos): Fixed critical section macro in vTaskPlaceOnEventListRestricted() (v5.3)

See merge request espressif/esp-idf!32742
2024-09-06 10:29:14 +08:00
muhaidong
71eb08b702 fix(wifi): enable ci build by sdkconfig.ci.esp32p4_with_extconn 2024-09-06 10:03:35 +08:00
Rahul Tank
2d0f0cbbcc Merge branch 'bugfix/correct_per_adv_sync_enable_v5.3' into 'release/v5.3'
fix(nimble): Corrected parameters assignment in per_adv_transfer_enable (v5.3)

See merge request espressif/esp-idf!33269
2024-09-06 08:57:29 +08:00
Rahul Tank
2c2e1a030d fix(nimble): Corrected parameters assignment in per_adv_transfer_enable 2024-09-05 18:56:59 +05:30
Rahul Tank
64d8797756 Merge branch 'fix/change_bt_hci_log_to_nimble_nomenclature_v5.3' into 'release/v5.3'
fix(nimble): Added BT_HCI_LOG_INCLUDED macro into esp nimble configuration according to nimble nomenclature (v5.3)

See merge request espressif/esp-idf!32952
2024-09-05 21:14:05 +08:00
Island
5a14b3caf9 Merge branch 'debug/fix_deep_sleep_wake_up_by_ble_v5.3' into 'release/v5.3'
fix(ble): fix BLE immediately  wakeup deep sleep (v5.3)

See merge request espressif/esp-idf!33095
2024-09-05 21:04:00 +08:00
Rahul Tank
2bfe84235d fix(nimble): Add notify characteristic flag support 2024-09-05 16:18:24 +05:30
Alexey Gerenkov
b1f17b69b6 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20240821_v5.3' into 'release/v5.3'
feat(tools): update openocd version to v0.12.0-esp32-20240821 (v5.3)

See merge request espressif/esp-idf!33170
2024-09-05 18:18:16 +08:00
Alexey Gerenkov
e74ca2811a Merge branch 'coredump_fixes_v5.3' into 'release/v5.3'
Coredump fixes v5.3

See merge request espressif/esp-idf!31104
2024-09-05 17:49:00 +08:00
Nachiket Kukade
cfbb9c0115 fix(wifi): Add PSRAM failure fallback in WiFi Queue API's 2024-09-05 14:38:00 +05:30
Astha Verma
a55ca99677 fix(nimble): Added BT_HCI_LOG_INCLUDED macro according to nimble nomenclature 2024-09-05 12:12:28 +05:30
morris
e7f99a1542 Merge branch 'docs/update_cn_ulp_lp_core_v5.3' into 'release/v5.3'
docs: Update the CN translation for ulp-lp-core.rst (v5.3)

See merge request espressif/esp-idf!32675
2024-09-05 14:41:37 +08:00
morris
dd64098cab Merge branch 'docs/delete_user_guide_esp32s2_kaluga_1_kit_v5.3' into 'release/v5.3'
docs: Delete ESP32-S2-Kaluga-Kit related user guide files (v5.3)

See merge request espressif/esp-idf!32591
2024-09-05 14:41:22 +08:00
Rahul Tank
51515f2296 Merge branch 'bugfix/blesmp_getlist_bond_fail_v5.3' into 'release/v5.3'
fix(nimble): Fixed blesmp getbondlist issue (v5.3)

See merge request espressif/esp-idf!32822
2024-09-05 14:32:47 +08:00
Jiang Jiang Jian
d3b1b54f72 Merge branch 'bugfix/fix_esp32p4_sleep_psram_access_failure_v5.3' into 'release/v5.3'
fix(esp_hw_support): support esp32p4 psram sleep retention (v5.3)

See merge request espressif/esp-idf!32598
2024-09-05 13:46:07 +08:00
Jiang Jiang Jian
24c2c80d2d Merge branch 'fix/hfp_pcm_codec_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Fix default codec type on PCM datapath for hfp_hf (backport v5.3)

See merge request espressif/esp-idf!33158
2024-09-05 13:45:24 +08:00
liqigan
a82edc880f fix(esp_hid): Fixed protocol mode mapping bug
Closes https://github.com/espressif/esp-idf/issues/14232
2024-09-05 11:47:59 +08:00
liqigan
e38b425011 feat(bt/bluedroid): Added definition of minor class of COD for peripheral major class
Closes https://github.com/espressif/esp-idf/issues/13622
2024-09-05 11:47:36 +08:00
Island
4913f936af Merge branch 'docs/add_ble_feature_status_table_v5.3' into 'release/v5.3'
docs(ble): Added BLE feature support status (v5.3)

See merge request espressif/esp-idf!32922
2024-09-05 11:45:37 +08:00
Island
b1f6f331dc Merge branch 'docs/add_nimble_get_started_v5.3' into 'release/v5.3'
feat(ble/example): Added NimBLE Get started examples (v5.3)

See merge request espressif/esp-idf!33028
2024-09-05 11:45:34 +08:00
Island
1720dc7795 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.3' into 'release/v5.3'
Fixed some BLE bugs 240812 (backport v5.3)

See merge request espressif/esp-idf!32792
2024-09-05 11:34:24 +08:00
Jiang Jiang Jian
cd1da85d06 Merge branch 'feat/esp_netif_dns_switch_v5.3' into 'release/v5.3'
[LWIP]: Update submodule to bced058f (multi DNS + PPP/mbedTLS) (v5.3)

See merge request espressif/esp-idf!32798
2024-09-05 10:48:09 +08:00
Jiang Jiang Jian
b0f330a59a Merge branch 'bugfix/heap_corrupt_in_bt_mem_release_on_esp32_v5.3' into 'release/v5.3'
fix(bt): Fix heap corruption in the call of esp_bt_mem_release on ESP32 (v5.3)

See merge request espressif/esp-idf!32801
2024-09-05 10:45:09 +08:00
Jiang Jiang Jian
cbc95947e8 Merge branch 'docs/fix_typo_adc_oneshot_v5.3' into 'release/v5.3'
docs: fix a typo in adc_oneshot (v5.3)

See merge request espressif/esp-idf!33006
2024-09-05 10:42:28 +08:00
morris
d77148bb33 Merge branch 'bugfix/i2s_dma_buf_saturation_on_p4_v5.3' into 'release/v5.3'
fix(i2s): fixed alignment of max DMA buffer length on P4 (v5.3)

See merge request espressif/esp-idf!33221
2024-09-05 10:41:50 +08:00
morris
412f1f5991 Merge branch 'feat/usb_ls_p4_backport_v5.3' into 'release/v5.3'
Fix USB Low-Speed devices on ESP32-P4 backport v5.3

See merge request espressif/esp-idf!33268
2024-09-05 10:41:16 +08:00
morris
26b2e3db8a Merge branch 'docs/usb_docs_p4_backport_v5.3' into 'release/v5.3'
usb_host: P4 Docs and DMA fix backport to v5.3

See merge request espressif/esp-idf!33075
2024-09-05 10:40:53 +08:00
shreeyash
8ef2bd2582 fix(nimble): Fixed blesmp getbondlist issue 2024-09-05 08:09:48 +05:30
Chen Jichang
897e889f7b refactor(parlio_tx): use gdma link list driver to mount buffer 2024-09-05 10:37:53 +08:00
chenqingqing
3af62b6e48 fix(bt/bluedroid): Fix default codec type on PCM datapath for hfp_hf 2024-09-05 10:37:46 +08:00
Rahul Tank
10bba8feda Merge branch 'feat/add_ble_link_estab_event_v5.3' into 'release/v5.3'
feat(nimble): BLE_GAP_EVENT_LINK_ESTAB event to ensure link established

See merge request espressif/esp-idf!33332
2024-09-05 10:37:08 +08:00
Jiang Jiang Jian
daec3b39e4 Merge branch 'docs/delete_not_available_p4_documents_v5.3' into 'release/v5.3'
docs: delete unavailable document links for ESP32-P4 (v5.3)

See merge request espressif/esp-idf!33151
2024-09-05 10:36:13 +08:00
Jiang Jiang Jian
038a86fc5f Merge branch 'task/add_ldgen_exception_for_freertos_v5.3' into 'release/v5.3'
fix(freertos): Added freertos and ringbuf fragments to the exception list of ldgen mapping checks (v5.3)

See merge request espressif/esp-idf!33215
2024-09-05 10:35:36 +08:00
Island
8afaec46c4 Merge branch 'bugfix/fixed_assert_on_esp32c2_v5.3' into 'release/v5.3'
fix(ble): fixed crash issue during deinit host after deinit controller on ESP32-C2 (v5.3)

See merge request espressif/esp-idf!33205
2024-09-05 10:21:21 +08:00
cjin
992bf3f078 feat(ble): add internal api to change ble slow clock source 2024-09-05 10:17:20 +08:00
cjin
420f3ac086 fix(ble): remove ble wakeup before entering light sleep 2024-09-05 10:17:20 +08:00
Wei Yu Han
ade6f459cd fix(ble): Increased the length of addr_str in ble_get_started nimble examples 2024-09-05 10:09:45 +08:00
Yuhan Wei
20e360e68e fix(ble): Removed unsupported sdkconfig 2024-09-05 10:09:45 +08:00
Zhou Xiao
3bb1e9be45 docs(ble): Replace advertising interval hex value with BLE_GAP_ADV_ITVL_MS 2024-09-05 10:09:45 +08:00
Zhou Xiao
ad345aaf60 docs(ble): Improved as Weilong and Shenhang requested 2024-09-05 10:09:45 +08:00
zhouxiao
9c0976d89e docs(ble): Added BLE Get Started 2024-09-05 10:09:45 +08:00
Island
990a84add7 Merge branch 'bugfix/fixed_c6_c2_issues_master_v5.3' into 'release/v5.3'
Bugfix/fixed c6 c2 issues master (v5.3)

See merge request espressif/esp-idf!33064
2024-09-05 10:09:00 +08:00
Chen Yu Dong
4e7a7b60c1 fix(ci): update iperf build ci condition
Co-authored-by: Chen Yu Dong <chenyudong@espressif.com>
2024-09-05 09:57:08 +08:00
muhaidong
1c2b9e8903 fix(wifi): enable p4 and esp8689 build iperf in ci 2024-09-05 09:57:08 +08:00
muhaidong
7d7e5059bb fix(wifi): support esp32_host ext_connect in iper 2024-09-05 09:56:56 +08:00
alanmaxwell
821c94ddd5 fix(wifi_host): support esp32p4 host get mac addr from target 2024-09-05 09:56:56 +08:00
muhaidong
1189ac4bcd fix(iperf): add esp_extconn idf component ymy 2024-09-05 09:56:45 +08:00
Jiang Jiang Jian
19c8c15d2d Merge branch 'bugfix/fix_wrong_typecast_spp_v5.3' into 'release/v5.3'
fix(wifi): Fix wrong typecasting of sta_info while getting SPP Caps (Backport v5.3)

See merge request espressif/esp-idf!33121
2024-09-04 23:11:20 +08:00
Rahul Tank
bbc5658f6b feat(nimble): BLE_GAP_EVENT_LINK_ESTAB event to ensure link established 2024-09-04 20:07:50 +05:30
Rahul Tank
7506432083 Merge branch 'feat/allow_connect_during_scan_v5.3' into 'release/v5.3'
feat(nimble): Add support to allow connection during scanning (v5.3)

See merge request espressif/esp-idf!32821
2024-09-04 22:29:07 +08:00
morris
f0e7941994 Merge branch 'support_psram_noinit_segment_on_s3_v5.3' into 'release/v5.3'
feat(psram): add psram noinit  segment support on s2/s3/p4/c5 and bss segment on c5 (v5.3)

See merge request espressif/esp-idf!33256
2024-09-04 18:24:02 +08:00
Wang Mengyang
f4eef0a5fb fix(bt): Fix heap corruption in the call of esp_bt_mem_release on ESP32
Closes https://github.com/espressif/esp-idf/issues/14263
2024-09-04 18:00:28 +08:00
Wang Mengyang
3de27ba7b2 change(bt): Perform comprehensive heap check in test_app for memory release 2024-09-04 18:00:28 +08:00
Jiang Jiang Jian
2934986c0d Merge branch 'docs/delete_user_guides_three_esp32_dev_boards_v5.3' into 'release/v5.3'
docs: delete user guides of ESP32-DevKitC, ESP-WROVER-KIT and ESP32-PICO-DevKitM-2 (v5.3)

See merge request espressif/esp-idf!32748
2024-09-04 17:59:09 +08:00
Jiang Jiang Jian
0d1227c06f Merge branch 'doc/update_esp32p4_pm_programming_guide_docs_v5.3' into 'release/v5.3'
docs(pm): update power management related docs for esp32p4 (v5.3)

See merge request espressif/esp-idf!32629
2024-09-04 17:58:13 +08:00
Jiang Jiang Jian
2d850169c0 Merge branch 'feature/ble_example_pytest_v5.3' into 'release/v5.3'
add pytest for classic bt example(backport v5.3)

See merge request espressif/esp-idf!32541
2024-09-04 17:57:37 +08:00
Jiang Jiang Jian
384b569ca4 Merge branch 'docs/remove_user_guide_for_esp32_ethernet_migration_v5.3' into 'release/v5.3'
docs: remove user guide for esp32-ethernet-kit migration (v5.3)

See merge request espressif/esp-idf!32580
2024-09-04 17:57:11 +08:00
Rahul Tank
92e4100df1 feat(nimble): Add support to allow connection during scanning 2024-09-04 14:27:04 +05:30
wuzhenghui
21d430cf28 fix(esp_hw_support): always writeback L1D$ before sleep to keep cpu/regdma data consistency 2024-09-04 16:42:54 +08:00
wuzhenghui
e38462456c change(esp_hw_support): add case to test PSRAM survives after lightsleep 2024-09-04 16:42:54 +08:00
wuzhenghui
6e307d5408 change(esp_hw_support): reorder light/deep sleep test cases and wrapper with corresponding support macros 2024-09-04 16:42:50 +08:00
wuzhenghui
2c68d03182 feat(esp_hw_support): support esp32p4 psram retention 2024-09-04 16:41:35 +08:00
wuzhenghui
4fff077599 fix(esp_hw_support): flash/psram SPI io is not controlled by hp iomux on esp32p4 2024-09-04 16:41:34 +08:00
wuzhenghui
7cc55a0e0b fix(esp_hw_support): fix bad power parameter if PSRAM is enabled during sleep 2024-09-04 16:41:34 +08:00
David Čermák
4af7646927 Merge branch 'bugfix/mdio_default_p4_v5.3' into 'release/v5.3'
fix(esp_eth): fixed default GPIO to match new ver. of P4 devboard (v5.3)

See merge request espressif/esp-idf!32777
2024-09-04 16:30:13 +08:00
Mahavir Jain
1da3d68f7e Merge branch 'fix/docs_nvs_encryption_update_v5.3' into 'release/v5.3'
docs(nvs_encryption): Updated the docs of nvs_encryption (v5.3)

See merge request espressif/esp-idf!32909
2024-09-04 16:25:18 +08:00
Rahul Tank
30d5bd0bdc Merge branch 'backport/nimble_support_cte_release_5_3' into 'release/v5.3'
Backport Bluetooth LE 5.1 direction finding host support (Backport v5.3)

See merge request espressif/esp-idf!33222
2024-09-04 15:45:07 +08:00
zlq
1f68af2720 fix(ext_32k): fix the external 32K issue on C3&S3 (v5.3) 2024-09-04 15:06:40 +08:00
Roland Dobai
1726cb266d Merge branch 'change/update-kconfcheck-pre-commit_v5.3' into 'release/v5.3'
ci(pre-commit): bump kconfig checker pre-commit version to 2.3.0 (v5.3)

See merge request espressif/esp-idf!32776
2024-09-04 15:05:30 +08:00
Roland Dobai
aaeb1fcbcb Merge branch 'docs/remove_output_format' into 'release/v5.3'
docs(size): remove -DOUTPUT_FORMAT output format option for idf.py size

See merge request espressif/esp-idf!33019
2024-09-04 15:04:44 +08:00
Yuhan Wei
e100e4c699 docs(ble): Updated the support status for some NimBLE features 2024-09-04 14:47:55 +08:00
Yuhan Wei
2991384f30 docs(ble): Updated support status of LE Isochronous Channels 2024-09-04 14:47:55 +08:00
Yuhan Wei
afa2161067 docs(ble): Replaced Classic Bluetooth with Bluetooth Classic in classic_bt.rst 2024-09-04 14:47:55 +08:00
Yuhan Wei
f7606657a7 docs(ble): Added BLE feature support status to API Guides 2024-09-04 14:47:55 +08:00
Nachiket Kukade
607a689b39 fix(wifi): Fix wrong typecasting of sta_info while getting SPP Caps 2024-09-04 14:44:06 +08:00
wuzhenghui
5e403bb7c6 docs(pm): update power management related docs for esp32p4 2024-09-04 14:13:19 +08:00
Jiang Jiang Jian
90f1111868 Merge branch 'contrib/github_pr_14286_v5.3' into 'release/v5.3'
fix(bt): Add a parameter in the two least significant bits of Class of Device (backport v5.3)

See merge request espressif/esp-idf!33164
2024-09-04 14:01:00 +08:00
Jiang Jiang Jian
59380fef68 Merge branch 'bugfix/fix_wifi_example_itwt_build_fail_issue_v5.3' into 'release/v5.3'
fix(wifi): fix wifi example itwt build fail issue(Backport v5.3)

See merge request espressif/esp-idf!33108
2024-09-04 13:59:29 +08:00
Jiang Jiang Jian
6bca576f99 Merge branch 'bugfix/ldgen_file_single_entry_v5.3' into 'release/v5.3'
fix(ldgen): fix linker script generation from a single-entry fragment file (backport v5.3)

See merge request espressif/esp-idf!33099
2024-09-04 13:58:25 +08:00
Jiang Jiang Jian
246e973232 Merge branch 'bugfix/fix_hidh_integrity_check_bug_v5.3' into 'release/v5.3'
fix(esp_hid): Loose the check of input report length to be more compatible[backport 5.3]

See merge request espressif/esp-idf!32720
2024-09-04 13:54:41 +08:00
Jiang Jiang Jian
1054460446 Merge branch 'bugfix/fix_mesh_ie_issue_from_leaf_to_root_v5.3' into 'release/v5.3'
fix(wifi/mesh): clear the rootless state in mesh ie when changing from leaf to root (v5.3)

See merge request espressif/esp-idf!32560
2024-09-04 13:47:06 +08:00
Jiang Jiang Jian
ed06d008f4 Merge branch 'fix/fix_p4_apb_clk_calc' into 'release/v5.3'
fix(esp_pm): Fix APB clock calculation for chips w/o modem (v5.3)

See merge request espressif/esp-idf!32753
2024-09-04 13:45:26 +08:00
Jiang Jiang Jian
3afe962817 Merge branch 'fix/disable_timer_wakeup_source_with_auto_sleep_off_v5.3' into 'release/v5.3'
fix(esp_pm): disable timer wakeup source with auto light-sleep off (v5.3)

See merge request espressif/esp-idf!32618
2024-09-04 13:45:06 +08:00
morris
212973cca3 Merge branch 'refactor/gptimer_sleep_retention_v5.3' into 'release/v5.3'
Fix gptimer auto reload configuration being overwritten by regdma (v5.3)

See merge request espressif/esp-idf!32729
2024-09-04 12:08:05 +08:00
Geng Yuchao
42a5118974 feat: Add support for BLE 5.1 Direction Finding feature 2024-09-04 09:38:00 +05:30
Geng Yuchao
be33558164 feat: Add direction finding relate defines and kconfig and CMakeLists 2024-09-04 09:38:00 +05:30
Rahul Tank
3ea09ae6c2 Merge branch 'feat/set_data_length_enhancement_v5.3' into 'release/v5.3'
feat(nimble): Add extra handling for set data len packet event (v5.3)

See merge request espressif/esp-idf!32622
2024-09-04 12:05:31 +08:00
Rahul Tank
a034b21a9e Merge branch 'bugfix/add_bluedroid_support_for_esp_ip_v5.3' into 'release/v5.3'
fix(wifi_prov): Add support for ESP IP controller chips in bluedroid (v5.3)

See merge request espressif/esp-idf!33177
2024-09-04 12:02:33 +08:00
Rahul Tank
a6df4152ac Merge branch 'bugfix/handle_linked_om_blufi_v5.3' into 'release/v5.3'
fix(nimble) Added change to handle linked om data at blufi layer (v5.3)

See merge request espressif/esp-idf!31974
2024-09-04 12:00:09 +08:00
Rahul Tank
e072a83a43 Merge branch 'bugfix/fix_proxy_example_assert_v5.3' into 'release/v5.3'
fix(nimble): Fixed assert issue in proximity_sensor example (v5.3)

See merge request espressif/esp-idf!32626
2024-09-04 11:57:08 +08:00
Marius Vikhammer
b278fb8f63 Merge branch 'bugfix/linux_target_mac_v5.3' into 'release/v5.3'
fix(linux): fixed build errors on MacOS (v5.3)

See merge request espressif/esp-idf!32919
2024-09-04 11:44:25 +08:00
Marius Vikhammer
07f531e984 Merge branch 'bugfix/usleep_overflow_v5.3' into 'release/v5.3'
fix(newlib): fixed potential overflow in usleep (v5.3)

See merge request espressif/esp-idf!33001
2024-09-04 11:44:21 +08:00
morris
c593bef24e change(lcd): simplify the i80 lcd example
removed the lcd touch panel initialization code.

For those touch panel driver usage, please check the esp_bsp repo.
2024-09-04 11:39:55 +08:00
morris
03df9a2df2 feat(lcd): support i80 lcd driver on esp32p4 2024-09-04 11:39:55 +08:00
morris
14f723244c Merge branch 'contrib/github_pr_14310_v5.3' into 'release/v5.3'
fix(gptimer): remove incorrect param from example (GitHub PR) (v5.3)

See merge request espressif/esp-idf!32684
2024-09-04 11:32:05 +08:00
morris
a9aa97391d Merge branch 'fix/mmu_multicore_app_bl_v5.3' into 'release/v5.3'
fix(MMU): fixed mmap deadlock when using multicore app with unicore bootloader (v5.3)

See merge request espressif/esp-idf!32889
2024-09-04 11:31:41 +08:00
morris
a3f1ec060c Merge branch 'fix/adc_channel_num_caps_v5.3' into 'release/v5.3'
fix(adc): Corrected the ADC channel number caps for esp32p4 (v5.3)

See merge request espressif/esp-idf!33239
2024-09-04 11:30:22 +08:00
morris
29b43f3f1a Merge branch 'feat/ldo_channel_reserve_v5.3' into 'release/v5.3'
feat(ldo): reserve the LDO1 and LDO2 (v5.3)

See merge request espressif/esp-idf!32836
2024-09-04 11:28:28 +08:00
morris
fe169a2f48 Merge branch 'feat/add_ek79007_mipi_dsi_v5.3' into 'release/v5.3'
feat(lcd): adapt the mipi_dsi example for the EK79007 LCD IC (v5.3)

See merge request espressif/esp-idf!33242
2024-09-04 11:27:55 +08:00
morris
cea789defd Merge branch 'fix/fix_p4_sdspi_v5.3' into 'release/v5.3'
sdspi: fix p4 sdspi (v5.3)

See merge request espressif/esp-idf!33189
2024-09-04 11:27:52 +08:00
Lou Tianhao
4c3f6efbd7 fix(pm): cancel cache_safe_assertion when using ext0 & ext1 2024-09-04 11:27:26 +08:00
morris
20975fb1e6 Merge branch 'fix/fix_c5_p4_c6_cache_disable_with_brc_predict_issue_v5.3' into 'release/v5.3'
cache: fixed double exception after cache disabled caused by branch predictor (v5.3)

See merge request espressif/esp-idf!32886
2024-09-04 11:23:33 +08:00
morris
6ce2eabc4e Merge branch 'fix/pr_14288_v5.3' into 'release/v5.3'
sdspi: add dma_aligned_buffer and pwr_ctrl_handle fields (pr_14288) (v5.3)

See merge request espressif/esp-idf!32608
2024-09-04 11:23:16 +08:00
morris
278ccec584 Merge branch 'feat/gdma_descriptor_driver_v5.3' into 'release/v5.3'
feat(gdma): add GDMA link list driver (v5.3)

See merge request espressif/esp-idf!33012
2024-09-04 11:21:15 +08:00
morris
8016f0dcb8 Merge branch 'docs/fix_a_typo_v5.3' into 'release/v5.3'
docs: Fix a small typo in adc_calibration.rst (v5.3)

See merge request espressif/esp-idf!32715
2024-09-04 11:19:25 +08:00
Marius Vikhammer
cc3203dc4f Merge branch 'update/version_5_3_1' into 'release/v5.3'
Update version to 5.3.1

See merge request espressif/esp-idf!33262
2024-09-03 20:36:46 +08:00
Chen Jichang
9e3fca8d71 feat(psram): add psram noinit segment support on S2/S3/P4/C5
Closes https://github.com/espressif/esp-idf/issues/14253
2024-09-03 15:39:54 +08:00
Tomas Rezucha
8e27a0fb25 refactor(usb/host): Move P4 HS PHY function to correct LL file
Moved usb_wrap_ll_enable_precise_detection() in usb_wrap_ll.h
to usb_utmi_ll_enable_precise_detection() in usb_utmi_ll.h

Fixes commit 97d30e7c48
2024-09-03 08:11:15 +02:00
Tomas Rezucha
3f1d59d6bb fix(usb/host): Fix USB Low Speed devices connection on P4
P4 USB UTMI PHY was updated to specification v2.0
2024-09-03 08:11:07 +02:00
Marius Vikhammer
c8fc5f643b change(version): Update version to 5.3.1 2024-09-03 09:37:24 +08:00
Aditya Patwardhan
87c9fb8d40 Merge branch 'fix/flash_encryption_for_esp32p4_v5.3' into 'release/v5.3'
fix(security): Fixed flash encryption for esp32p4 (v5.3)

See merge request espressif/esp-idf!33140
2024-09-02 19:46:31 +08:00
Aditya Patwardhan
aa754d40b8 fix(security): Fixed flash encryption for esp32p4
The flash encryption on esp32p4 was broken due to code related
    to key manager not being executed when key manager support was
    disabled on esp32p4 target.
    This commit fixes that behaviour
    Additionally, the atomic env enablement for
    key_mgr_ll_enable_peripheral_clock was fixed.
2024-09-02 13:28:30 +05:30
morris
64bfd8c24d feat(lcd): support EK79007 LCD in the mipi dsi example 2024-09-02 15:48:44 +08:00
Sudeep Mohanty
e7b582d472 fix(adc): Corrected the ADC channel number caps for esp32p4
This commit fixes the incorrect soc_caps for the ADC channel numbers on
the esp32p4.
2024-09-02 08:41:22 +02:00
laokaiyao
c518c281dd change(i2s): add warning for inaccurate sample rate 2024-08-30 15:56:28 +08:00
laokaiyao
5bca458dbc fix(i2s): fixed alignment of max DMA buffer length on P4
Closes https://github.com/espressif/esp-idf/issues/14448
2024-08-30 15:56:25 +08:00
Sudeep Mohanty
c3a79c301d test(freertos): Added build test for function in flash with -Os optimation
This commit adds a build test for when FreeRTOS and esp_ringbuf functions
are placed in flash and the compiler optimizes for code size.
2024-08-30 09:15:15 +02:00
Sudeep Mohanty
99b18665a4 fix(freertos): Added freertos fragments to the exception list of ldgen mapping checks
This commit adds freertos and esp_ringbuf linker fragment sections
to the exception list of the ldgen mappings checker script.
2024-08-30 09:15:15 +02:00
zwl
a5f0f83c05 fix(ble): fixed crash issue during deinit host after deinit controller on ESP32-C2 2024-08-30 12:02:53 +08:00
Ivan Grokhotkov
fa13b31dca ci(sdspi): clean up newlib memory, reset between tests
Two changes to make the tests less susceptible to random failures:
- Free up newlib memory to not have false-positive memory leaks due to
  lazy allocations in reent structure
- Reset between tests, so that one failing test doesn't cause
  subsequent tests to fail

Both changes are already applied to esp_driver_sdmmc test app.
2024-08-30 11:54:29 +08:00
Ivan Grokhotkov
db389c7a55 ci(sdspi): re-enable probe/rw tests for slot 1
These tests were disabled since SDMMC_FREQ_HIGHSPEED with sdspi didn't
work on ESP32 and ESP32-S3. However we don't have other tests for
slot 1, meaning that we weren't running probe and perf tests at all.

This commit re-enables the tests, keeping them with SDMMC_FREQ_DEFAULT
2024-08-30 11:53:40 +08:00
Ivan Grokhotkov
a89f1fcfaf fix(sdspi): fix memory leak in do_one_sdspi_probe test 2024-08-30 11:53:14 +08:00
Armando
4922c67780 fix(sdspi): fixed sdspi on p4, s3 2024-08-30 11:50:45 +08:00
Rahul Tank
8c632f4560 fix(wifi_prov): Add support for ESP IP controller chips in bluedroid 2024-08-29 15:05:00 +05:30
zhanghaipeng
01f46017d9 docs(ble/bluedroid): Optimize documentation for BLE connection parameter updates 2024-08-29 16:38:17 +08:00
zhanghaipeng
d02df53fd8 feat(ble/bluedroid): Support getting BLE address type in bond list 2024-08-29 16:37:15 +08:00
zhanghaipeng
dc428a3854 docs(ble/bluedroid): Optimize BLE example documentation for getting characteristic 2024-08-29 16:17:39 +08:00
Nebojša Cvetković
c100af18e6 fix(bt/bluedroid): Resolve warning: unused variable 'pp' 2024-08-29 16:17:39 +08:00
wanckl
fdbdeaaae2 fix(driver_spi): fix p4 cache auto writeback during spi(dma) rx 2024-08-29 14:18:12 +08:00
Jiang Jiang Jian
2c46030bbf Merge branch 'fix/fix_wrong_ap3204_id_check_v5.3' into 'release/v5.3'
fix(psram): fixed ap3204 id check (v5.3)

See merge request espressif/esp-idf!33109
2024-08-29 11:02:09 +08:00
Alexey Gerenkov
6adb58833f feat(tools): update openocd version to v0.12.0-esp32-20240821 2024-08-28 13:18:15 +03:00
chenqingqing
020276b94a fix(bt): Add a parameter in the two least significant bits of Class of Device 2024-08-28 16:46:31 +08:00
WebDust21
4d8825dfa6 fix(bt): Enable use of RESERVED bits in COD (GitHub PR) 2024-08-28 16:46:21 +08:00
Linda
2bb7b51449 docs: delete unavailable document links for ESP32-P4 2024-08-28 15:57:42 +08:00
Lou Tianhao
45990692d1 change(pm): change dependence of pm_slp_iram_opt 2024-08-28 14:22:18 +08:00
laokaiyao
6724cd9ec6 refactor(bootloader): lower down the log level to reduce the bootloader size 2024-08-28 12:12:06 +08:00
laokaiyao
1ece052ce3 feat(bootloader): support to check efuse block revision
change(bootloader): remove ignore efuse check flag (temp)

change(bootloader): use int for the minimum efuse blk rev (temp)
2024-08-28 12:12:00 +08:00
laokaiyao
9e5570e77c docs(chip_revision): update eFuse block revision info 2024-08-28 12:00:22 +08:00
David Roman
e9df36a2df fix(esp_eth): fix C++ invalid type conversion error
Closes https://github.com/espressif/esp-idf/issues/14265
2024-08-27 20:02:07 +08:00
Armando
475825c436 fix(psram): fixed ap3204 id check 2024-08-27 15:50:08 +08:00
muhaidong
c7c0fefd13 fix(wifi): fix wifi example itwt build fail issue 2024-08-27 15:48:20 +08:00
Omar Chebib
99b30023f8 fix(ldgen): fix linker script generation from a single-entry fragment file 2024-08-27 11:41:07 +08:00
liqigan
c986991d90 fix(esp_hid): Loose the check of input report length to be more compatible
Closes https://github.com/espressif/esp-idf/issues/14259
2024-08-27 10:14:31 +08:00
Erhan Kurubas
d72b765404 fix(coredump): fix buffer overflow inside esp_core_dump_get_summary
Closes https://github.com/espressif/esp-idf/issues/13754
2024-08-26 12:17:25 +03:00
Erhan Kurubas
8dd40eeeda ci(panic): add flash encrypted coredump tests 2024-08-26 12:17:18 +03:00
Sudeep Mohanty
3767ec04ae fix(cmake): Fixed linker not supporting -warn_commons for linux target on MacOS
This commit updates the ld linker flags to conditionally include the
-warn_commons flag when the linux target is built on MacOS. This is
because, not all versions of ld support the -warn_commons option.

Closes https://github.com/espressif/esp-idf/issues/13185
2024-08-26 09:53:24 +02:00
Tomas Rezucha
d36469fa59 docs(usb/host): Update USB host docs for ESP32-P4 2024-08-26 08:40:48 +02:00
Tomas Rezucha
e94176c44e docs(usb/device): Update USB device docs for ESP32-P4 2024-08-26 08:40:19 +02:00
Tomas Rezucha
8f38d943b6 docs(usb/host): Update maintainer docs for ESP32-P4 2024-08-26 08:36:06 +02:00
Tomas Rezucha
8f7dcc1eab fix(usb/host): Use new cache aligned DMA alloc functions 2024-08-26 08:32:16 +02:00
chenjianhua
023aadac0f fix(bt/bluedroid): Fixed work queue delete when create thread failed 2024-08-26 12:13:33 +08:00
chenjianhua
cbefea95e4 feat(bt/bluedroid): Report HCI error code to app when command fails 2024-08-26 12:12:43 +08:00
chenjianhua
f199eeee90 fix(bt/bluedroid): Fixed BLE create conn cancel when conn already exist 2024-08-26 12:12:43 +08:00
chenjianhua
7096ac8c29 feat(bt/bluedroid): Add print and assert when failed to alloc memory 2024-08-26 12:12:43 +08:00
zwl
bd8e4e8cd1 fix(ble): fixed ble controller issues on ESP32-H2 2024-08-24 14:34:08 +08:00
zwl
8a4b12a7a7 fix(ble): fixed ble controller issues on ESP32-C6 2024-08-24 14:34:04 +08:00
zwl
4768c57ad2 fix(ble): fixed ble controller issues on ESP32-C2 2024-08-24 13:57:27 +08:00
David Cermak
d645030210 fix(esp_netif): Correct spelling erros 2024-08-23 12:57:52 +02:00
Abhik Roy
a84d136002 fix(lwip): Fixed incorrect handling of 0.0.0.0 in dns (v5.3)
LWIP submodule update: git log --oneline e8d05138..bced058f
  - dns: Fixed incorrect handling of 0.0.0.0
    (espressif/esp-lwip@bced058f)
2024-08-23 11:38:03 +02:00
David Cermak
fec0c43edd fix(esp_netif): Remove unused leftover pppapi_set_auth() call 2024-08-23 11:37:33 +02:00
David Cermak
1237b8c669 feat(lwip): Add support for PPP Auth using mbedTLS (v5.3)
LWIP submodule update (v5.3): git log --oneline 3a3d1fb3..e8d05138
  - PPP/Auth: Add mbedtls includes if lwip uses it
    (espressif/esp-lwip@e8d05138)

Closes https://github.com/espressif/esp-idf/issues/13597
2024-08-23 11:37:09 +02:00
David Cermak
d716e64138 fix(esp_netif): Add unit test of getter/setter API for DNS servers 2024-08-23 11:36:03 +02:00
David Cermak
cf65f557cc fix(esp_netif): Restore DNS servers per netif when setting it default(5.3)
Introducing config option `CONFIG_ESP_NETIF_SET_DNS_PER_DEFAULT_NETIF`
to overcome LWIP limitation of using global DNS server info.
This config option enables LWIP callbacks to collect per netif DNS
server info and then restores global DNS servers of whichever network
interface is selected as default.

LWIP submodule update v5.3: git log --oneline f1746813..3a3d1fb3
  - dns: Allow storing dnsserver per netif (espressif/esp-lwip@3a3d1fb3)
  - api_msg: Fix unused local variable if LWIP_NETCONN_SEM_PER_THREAD=1
    (espressif/esp-lwip@aa4f6e78)
  - lwip: fix gcc -fanalyzer warnings (espressif/esp-lwip@4297782b)
2024-08-23 11:35:36 +02:00
Abhik Roy
0f08a5b123 feat(lwip): Added multiple dns ip support (v5.3)
LWIP submodule update on v5.3: git log --oneline f7922143..f1746813
  - feat(lwip): Added multiple dns ip support
    (espressif/esp-lwip@f1746813)
  - api_msg: Fix crash to fail-safe error if cannot get semaphore
    (espressif/esp-lwip@a1bd9e44)
2024-08-23 11:33:44 +02:00
Frantisek Hrbata
6f97a18e44 docs(size): remove -DOUTPUT_FORMAT output format option for idf.py size
Setting OUTPUT_FORMAT through the CMake variable probably never
functioned and seems to be a remnant (possibly a typo in the
documentation) from the time when the -DOUTPUT_JSON=1 CMake variable was
used to specify the JSON output format, prior to the introduction of the
--format option. This removes the note regarding the option to choose
the output format using -DOUTPUT_FORMAT.

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

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-08-22 13:04:47 +02:00
morris
80bc9a3845 refactor(i80): use the gdma link list driver 2024-08-22 15:47:46 +08:00
morris
473e7268fd feat(gdma): add GDMA link list driver 2024-08-22 15:47:46 +08:00
Linda
234a1371b1 docs: fix a typo in adc_oneshot 2024-08-22 10:18:59 +08:00
Marius Vikhammer
d777b8e72a fix(newlib): fixed potential overflow in usleep
If trying to usleep for 0xFFFF FFFF us the calculation of delay ticks would overflow
resulting in the system not sleeping at all.

Closes https://github.com/espressif/esp-idf/issues/14390
2024-08-22 09:55:58 +08:00
Jiang Jiang Jian
0bbd728196 Merge branch 'bugfix/fix_clkn_lost_after_modem_sleep_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed bluetooth disconnect issue after modem sleep on ESP32 (Backport v5.3)

See merge request espressif/esp-idf!32963
2024-08-21 23:20:44 +08:00
Abhik Roy
cd3c60e8c3 fix(example): Fixed updating recv addr for invalid packets for ping
Closes https://github.com/espressif/esp-idf/issues/14197
2024-08-21 20:37:56 +10:00
linruihao
13326df918 fix(bt/controller): Fixed bluetooth disconnect issue after modem sleep on ESP32 2024-08-21 17:55:52 +08:00
chenjianhua
5703d60420 fix(bt): Update bt lib for ESP32(241c96c)
- Fixed BLE vendor HCI get controller status command
2024-08-21 17:54:20 +08:00
Jiang Jiang Jian
808950a25a Merge branch 'fix/hfp_pcm_api_set_v5.3' into 'release/v5.3'
fix(bt/bluedroid): Add PCM configuration about pcm frame sync signal shape (backport v5.3)

See merge request espressif/esp-idf!32483
2024-08-21 17:27:14 +08:00
Jiang Jiang Jian
aad4a5591f Merge branch 'bugfix/fixed_c2_blufi_issue_when_use_only_4.2_adv_v5.3' into 'release/v5.3'
fix(ble): fixed blufi issue on ESP32-C2 (v5.3)

See merge request espressif/esp-idf!32942
2024-08-21 10:46:59 +08:00
gongyantao
bf228ffbda fix(ci): disable ci test when target is not support classic bluetooth 2024-08-20 19:22:30 +08:00
gongyantao
2e95ecfbc5 fix(bt): remove redundant space in hid example path 2024-08-20 19:22:20 +08:00
Linda
124c7192b8 docs: delete user guides of ESP32-DevKitC, ESP-WROVER-KIT and ESP32-PICO-DevKitM-2 2024-08-20 14:48:43 +08:00
zwl
6c507056f3 fix(ble): fixed blufi issue on ESP32-C2 2024-08-19 21:48:12 +08:00
Euripedes Rocha
1fc04a0321 change(mqtt): Update esp_mqtt submodule
git log --oneline aa6f889fb4f6f743b3a550aa587713aabbdca1fc..cac1552e62b0474c162547b7cce345d7cd1aecfe

Detailed description of the changes:
* fix: clang analyzer unknown pragma warning
  - See merge request espressif/esp-mqtt!215
  - See commit https://github.com/espressif/esp-mqtt/commit/6bb5a5b
* fix: gcc analyzer unknown pragma warning
  - See merge request espressif/esp-mqtt!214
  - See commit https://github.com/espressif/esp-mqtt/commit/b527203
* feat: Moves deletion of expired messages to run at all states
  - Closes IDFGH-12831
  - Closes https://github.com/espressif/esp-mqtt/issues/278
  - See commit https://github.com/espressif/esp-mqtt/commit/32dada4
* fix: Handling of state in the outbox for enqueued QoS 0 messages
  - Closes IDFGH-12829
  - Closes https://github.com/espressif/esp-mqtt/issues/276
  - See commit https://github.com/espressif/esp-mqtt/commit/739cb2d
* fix: Instalation of gcovr in host tests was broken
  - See merge request espressif/esp-mqtt!211
  - See commit https://github.com/espressif/esp-mqtt/commit/6643c49
* Allow to publish using only topic alias on MQTT5
  - Closes IDFGH-12735
  - Fix: Allow to publish using only topic alias on MQTT5 (espressif/esp-mqtt@0071aca)
* refactor: replaced heap mock with Linux-compatible heap component
  - See merge request espressif/esp-mqtt!208
  - See commit https://github.com/espressif/esp-mqtt/commit/8b0b43e
* fix: gcc -fanalyzer warnings
  - See merge request espressif/esp-mqtt!209
  - See commit https://github.com/espressif/esp-mqtt/commit/8bc3bff
* fix: Use catch from component manager
  - See merge request espressif/esp-mqtt!210
  - See commit https://github.com/espressif/esp-mqtt/commit/53e0cc7
* fix: Fix host test for github ci.
  - Closes IDF-8883
  - See commit https://github.com/espressif/esp-mqtt/commit/b43d93c
2024-08-19 15:20:23 +02:00
Konstantin Kondrashov
0b72099bb9 feat(efuse): Updates esp_efuse_get_pkg_ver 2024-08-19 11:32:32 +03:00
Jiang Jiang Jian
0526c35ec3 Merge branch 'fix/esp32c5_rng_random_disable_v5.3' into 'release/v5.3'
fix(bootloader): update random disable api for ESP32-C5/C6 (v5.3)

See merge request espressif/esp-idf!32761
2024-08-19 11:33:01 +08:00
Jiang Jiang Jian
1f37d126c6 Merge branch 'change/exclude_cves_v5.3' into 'release/v5.3'
change: exclude CVEs that do not impact ESP-IDF components (v5.3)

See merge request espressif/esp-idf!32659
2024-08-19 11:32:29 +08:00
Jiang Jiang Jian
24c6528d29 Merge branch 'fix/incorrect_config_name_v5.3' into 'release/v5.3'
Fix encrypt image instead of the partition optimisation not being enabled (v5.3)

See merge request espressif/esp-idf!32639
2024-08-19 11:31:53 +08:00
Jakob Hasse
9d010bd0b2 fix(linux): fixed build errors on MacOS
Closes https://github.com/espressif/esp-idf/issues/14379
2024-08-19 11:17:14 +08:00
hrushikesh.bhosale
19ab530729 docs(nvs_encryption): Updated the docs of nvs_encryption
Updated the documentation by changing subtype from key to
nvs_keys in nvs_encryption.rst
2024-08-18 20:02:48 +05:30
xiongweichao
b1c9475b71 fix(bt/controller): Fixed disconnection issue
- Fixed the issue of disconnection caused by updating the channel map in sniff mode
2024-08-16 12:20:47 +08:00
chenqingqing
aa2290a0ae fix(bt/bluedroid): Add PCM configuration about pcm frame sync signal shape 2024-08-16 12:20:47 +08:00
Xiao Xufeng
a26af847b7 ci(mmu): add unicore test 2024-08-16 11:51:58 +08:00
Xiao Xufeng
87cc3cb7a7 fix(MMU): fixed mmap deadlock when using multicore app with unicore bootloader
Closes https://github.com/espressif/esp-idf/issues/11617
2024-08-16 11:51:58 +08:00
Aditya Patwardhan
466a392a76 Merge branch 'fix/avoid_extra_c2m_msync_in_aes_driver_v5.3' into 'release/v5.3'
fix(mbedtls/aes): Avoid extra C2M sync of memory (v5.3)

See merge request espressif/esp-idf!32699
2024-08-16 11:21:45 +08:00
Armando
13c30981b9 fix(cache): disable branch predictor before disable cache
branch predictor will start cache request
2024-08-16 10:25:43 +08:00
Armando
95594df093 feat(riscv): added api to disable branch predictor 2024-08-16 10:25:40 +08:00
Jiang Jiang Jian
4c53b937b6 Merge branch 'bugfix/fix_none_iram_code_before_xip_psram_v5.3' into 'release/v5.3'
rtc: fixed non-iram rtc code in early stage on p4 leading xip_psram stuck (v5.3)

See merge request espressif/esp-idf!32679
2024-08-15 14:46:07 +08:00
Jiang Jiang Jian
be5feaff6d Merge branch 'backport/make_ot_task_queue_non_permanent_blocking' into 'release/v5.3'
fix(openthread): make ot task queue sending non-permanent blocking(backport5.3)

See merge request espressif/esp-idf!32630
2024-08-15 14:43:46 +08:00
Marius Vikhammer
8679f14d1d Merge branch 'fix/move_xip_doc_out_from_non_updated_list_v5.3' into 'release/v5.3'
doc(psram): move xip psram doc out from non updated list (v5.3)

See merge request espressif/esp-idf!32841
2024-08-15 10:05:32 +08:00
Island
bbe0750ca0 Merge branch 'bugfix/fixed_ble_issues_on_c6_h2_c2_0731_v5.3' into 'release/v5.3'
Bugfix/fixed ble issues on c6 h2 c2 0731 (v5.3)

See merge request espressif/esp-idf!32460
2024-08-14 16:51:57 +08:00
Sudeep Mohanty
3b1bde1238 test(freertos): Fixed flaky scheduling time test
This commit updates the scheduling time test to test for median
scheduling time values instead of average values.
2024-08-14 09:28:30 +02:00
Armando
eca7b3b1f1 fix(xip): move rest xip_psram doc out from non updated list 2024-08-14 14:57:44 +08:00
Armando
fe48cfd6e5 fix(xip): added SOC_SPIRAM_XIP_SUPPORTED for programming guide usage 2024-08-14 14:57:29 +08:00
shenmengjing
867acff64a docs: Update the CN translation for ulp-lp-core.rst 2024-08-14 14:14:47 +08:00
morris
d54f5cdb43 fix(drivers): rename the nested extra_flags structure 2024-08-14 10:45:47 +08:00
morris
3358b3073b fix(lcd): prelonged the lifecycle of dma2d transaction config structure
The context must exit at least until on_job_pixked callback is called
2024-08-14 10:44:40 +08:00
morris
479c835d1a feat(ldo): add config to let hardware control the ldo output
If LDO1 is used by spi flash, then we recommend to give the ownership to
the hardware. Software just read the parameters from the efuse and set
to PMU.
2024-08-14 10:25:04 +08:00
andylinpersonal
88c476e630 fix(ulp): Add the missing extern "C" guard to ulp_lp_core_print.h
This commit adds the missing extern `C` guards the ulp_lp_core_print.h
header file.

Closes https://github.com/espressif/esp-idf/pull/14329
2024-08-13 23:08:30 +02:00
Rahul Tank
584be40657 fix(nimble) Added change to handle linked om data at blufi layer 2024-08-13 16:53:36 +05:30
gongyantao
7b5454bbaa fix(bt): change example sdkconfig name to sdkconfig.ci.test 2024-08-13 09:55:31 +08:00
Ondrej Kosta
9c9ba2e54f fix(esp_eth): fixed default GPIO to match new ver. of P4 devboard 2024-08-12 10:47:16 +02:00
Jan Beran
5fedad0308 ci(pre-commit): bump kconfig checker pre-commit version to 2.3.0 2024-08-12 10:36:10 +02:00
Ivan Grokhotkov
a600af4950 change(ci): disable dangerjs checker for release notes 2024-08-12 09:27:41 +02:00
Mahavir Jain
3eec62f823 fix(rng): avoid clearing PMU_PERIF_I2C_RSTB in random disable API for C6
This configuration bit is required for ADC operation as well and hence
should not be cleared in the RNG API sequence.

Ideally, the ADC driver should take care of initializing this bit but
still the RNG layer change is required because of interleaved API usage
scenario described in following linked issue.

Closes https://github.com/espressif/esp-idf/issues/14124
Closes https://github.com/espressif/esp-idf/issues/14280
2024-08-12 10:07:28 +05:30
zhanghaipeng
87ec32e738 docs(ble/bluedroid): Optimize BLE example for setting advertising data 2024-08-12 11:32:34 +08:00
Alexey Gerenkov
1aec9e7df3 fix(esp_pm): Fix APB clock calculation for chips w/o modem 2024-08-12 10:45:04 +08:00
Sudeep Mohanty
fd446a674a fix(freertos): Fixed critical section macro in vTaskPlaceOnEventListRestricted()
The vTaskPlaceOnEventListRestricted() did not use the correct macro when
exiting a kernel cirtical section. This does not affect the HW targets
but on the Linux port, this caused an issue as the critical nesting
count became negative, leading to deadlocks. This commit fixes the bug
and updates the linux port to prevent the nesting count from going
negative.
2024-08-10 09:24:05 +02:00
Shen Weilong
7c9d9a8ad8 feat(ble): Print out the BT mac when the controller is initialized 2024-08-09 20:47:59 +08:00
zhanghaipeng
7741d58b7f feat(ble/bluedroid): Support getting BLE address type in bond list 2024-08-09 20:21:04 +08:00
zhanghaipeng
2e0c01b1c5 docs(ble/bluedroid): Optimize documentation for BLE connection parameter updates 2024-08-09 20:21:04 +08:00
zhanghaipeng
1046724f9e fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(f583012)
- Fix BLE channel map update when latency is not zero
2024-08-09 20:20:31 +08:00
chenjianhua
cfebc2052a feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(4e58df9)
- Support enhanced BLE TX power setting and getting
2024-08-09 20:20:31 +08:00
morris
998cd5e1f7 refactor(gptimer): sleep retention code clean up 2024-08-09 18:15:32 +08:00
morris
e1ba14df02 fix(gptimer): fix the regdma overwrite the reload configuration 2024-08-09 18:12:25 +08:00
morris
7e7f388392 change(wdt): create wdt_periph.c in soc component 2024-08-09 18:12:25 +08:00
shenmengjing
51130a7a56 docs: Fix a small typo in adc_calibration.rst 2024-08-09 14:44:45 +08:00
harshal.patil
e94d1f275c fix(mbedtls/aes): Avoid extra C2M sync of memory 2024-08-08 14:50:38 +05:30
LonerDan
3084df33d3 docs(gptimer): remove incorrect param from example
Fixes call to `gptimer_start` in one of the examples
which includes extra second parameter `&alarm_config`,
when the function takes only one.

Mreges https://github.com/espressif/esp-idf/pull/14310
2024-08-08 10:05:35 +08:00
Armando
4a7985ab4a fix(rtc): fixed non-iram rtc code in early stage on p4 leading xip_psram stuck 2024-08-07 18:06:56 +08:00
Frantisek Hrbata
1f06765630 change: exclude CVEs that do not impact ESP-IDF components
cJSON:    CVE-2024-31755 - Resolved in cJSON v1.7.18
FreeRTOS: CVE-2024-28115 - Affects only ARMv7-M MPU ports, and ARMv8-M ports

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-08-06 17:23:43 +02:00
harshal.patil
12a2e89ac6 fix(bootloader_support): Fix encrypt image instead of the partition feature not being enabled 2024-08-06 13:44:36 +05:30
zhangyanjiao
4977a8245b fix(wifi/mesh): update the mesh ip_internal_network example 2024-08-06 14:52:47 +08:00
zhangyanjiao
fc92df3ac3 fix(wifi/mesh): fixed the dhcp offer send error issue when root restart multiple times
Closes https://github.com/espressif/esp-idf/issues/13212
2024-08-06 14:52:39 +08:00
zhangyanjiao
ed831645ad fix(wifi/mesh): clear the rootless state in mesh ie when changing from leaf to root
Closes https://github.com/espressif/esp-idf/issues/14063
2024-08-06 14:51:55 +08:00
zwx
73cdd20168 fix(openthread): make ot task queue sending non-permanent blocking 2024-08-06 14:09:20 +08:00
gongyantao
da2979f5ad change(ci): remove device name check in bt example 2024-08-06 11:41:00 +08:00
gongyantao
89218d6cfb fix(bt): get remote device name from eir data 2024-08-06 11:40:49 +08:00
gongyantao
202858eb3e feat(bt/example): add ci sdkconfig for bt examples 2024-08-06 11:40:37 +08:00
wuzhenghui
f7040d3633 fix(esp_pm): configure timer wakeup source with auto light-sleep congiguration 2024-08-06 11:02:30 +08:00
Atsunori Saito
2ebd58bbc0 fix(sdspi): add dma_aligned_buffer and pwr_ctrl_handle fields
Closes https://github.com/espressif/esp-idf/pull/14288
2024-08-06 09:48:29 +08:00
Ivan Grokhotkov
6568f8c553 Merge branch 'feature/update-qemu-to-esp_develop_9.0.0_20240606_v5.3' into 'release/v5.3'
feat(tools): update qemu version to esp_develop_9.0.0_20240606 (v5.3)

See merge request espressif/esp-idf!31526
2024-08-05 22:50:57 +08:00
Ivan Grokhotkov
55069a785e Merge branch 'fix/fatfs_f_mount_immediately_after_formatting_v5.3_backport' into 'release/v5.3'
fix(vfs): FATFS mount immediately after format if mount failed (v5.3)

See merge request espressif/esp-idf!32379
2024-08-05 20:32:08 +08:00
Rahul Tank
6226780516 fix(nimble): Fixed assert issue in proximity_sensor example 2024-08-05 16:56:29 +05:30
Rahul Tank
b7513a2d1e feat(nimble): Add extra handling for set data len packet event 2024-08-05 16:42:55 +05:30
renpeiying
da12d1d932 docs: remove user guide for esp32-ethernet-kit migration 2024-08-05 17:25:22 +08:00
morris
0c03c2008e Merge branch 'fix/mmu_func_force_inline_v5.3' into 'release/v5.3'
fix(mmu_map): make a static function force inline in order not be put in flash(backport v5.3)

See merge request espressif/esp-idf!32574
2024-08-05 17:14:39 +08:00
morris
21147cd7f5 Merge branch 'feat/gpspi_flash_support_v5.3' into 'release/v5.3'
fix(spi_flash): Add external flash support on esp32c6,esp32h2,esp32p4(backport v5.3)

See merge request espressif/esp-idf!32522
2024-08-05 17:13:53 +08:00
Marius Vikhammer
da816521d3 Merge branch 'fix/p4_ulp_shared_mem_v5.3' into 'release/v5.3'
fix(lp-core): fixed ULP shared mem address being wrong on P4 (v5.3)

See merge request espressif/esp-idf!32537
2024-08-05 16:17:07 +08:00
shenmengjing
823ac69f43 docs: Delete ESP32-S2-Kaluga-Kit related user guide files 2024-08-05 16:15:34 +08:00
Michael (XIAO Xufeng)
18a8fcd510 Merge branch 'refactor/rtc_init_before_mspi_tuning_v5.3' into 'release/v5.3'
fix(startup): move rtc initialization before MSPI timing tuning to improve stability (v5.3)

See merge request espressif/esp-idf!32548
2024-08-05 13:34:59 +08:00
Rahul Tank
c4d4bfd646 Merge branch 'bugfix/adjust_tx_power_lvl_boundary_v5.3' into 'release/v5.3'
fix(nimble): Modify Advertising Tx power levels (v5.3)

See merge request espressif/esp-idf!32565
2024-08-05 13:29:53 +08:00
C.S.M
5b8da6f327 fix(spi_flash): Add external flash support on esp32c6,esp32h2,esp32p4 2024-08-05 11:47:55 +08:00
morris
9ed45e4055 Merge branch 'change/pin_ili9881c_version_v5.3' into 'release/v5.3'
change(examples): set the ili9881c version to 0.2.x (v5.3)

See merge request espressif/esp-idf!32573
2024-08-05 11:46:39 +08:00
morris
70bc919e80 change(examples): set the ili9881c version to 0.2.x 2024-08-05 11:01:40 +08:00
C.S.M
0cca45334e fix(mmu_map): make a static function force inline in order not be put in flash 2024-08-05 11:00:50 +08:00
Jiang Jiang Jian
7ccfd7d673 Merge branch 'bugfix/avoid_offchan_ftm_retries_v5.3' into 'release/v5.3'
fix(wifi): Avoid internal retries for offchannel FTM Requests (Backport v5.3)

See merge request espressif/esp-idf!32536
2024-08-05 10:46:14 +08:00
Xiao Xufeng
f81cece9d4 fix(startup): move rtc initialization before MSPI timing tuning to improve stability 2024-08-05 00:35:10 +08:00
Rahul Tank
01f0fd4158 fix(nimble): Modify Advertising Tx power levels 2024-08-03 14:42:10 +05:30
Mahavir Jain
9a44ced672 Merge branch 'bugfix/null_assign_variable_v5.3' into 'release/v5.3'
fix(wifi_prov): Use calloc instead of malloc to zero initialize variable (v5.3)

See merge request espressif/esp-idf!32526
2024-08-02 22:02:52 +08:00
Island
883ee8b0a0 Merge branch 'bugfix/fix_ble_security_param_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed issue with resetting BLE security parameters during initialization (v5.3)

See merge request espressif/esp-idf!32505
2024-08-02 17:38:40 +08:00
Island
530f10f261 Merge branch 'bugfix/fix_ble_gattc_app_unregister_v5.3' into 'release/v5.3'
Bugfix/fix ble gattc app unregister (v5.3)

See merge request espressif/esp-idf!32438
2024-08-02 17:30:29 +08:00
morris
a1ddeeca3e Merge branch 'change/disable_eot_in_lp_mode_v5.3' into 'release/v5.3'
change(dsi): don't send eot packet in lp mode (v5.3)

See merge request espressif/esp-idf!32535
2024-08-02 16:59:15 +08:00
Roland Dobai
5177bcc0a4 Merge branch 'fix/setuptools_constraint_v5.3' into 'release/v5.3'
fix: ensure the constraint file is followed also for setuptools (v5.3)

See merge request espressif/esp-idf!32545
2024-08-02 16:53:55 +08:00
Ivan Grokhotkov
adb5d60ec9 Merge branch 'fix/fix-gcc13-dirent-breaking_v5.3' into 'release/v5.3'
fix(newlib): fix include sys/dirent.h breaking change (v5.3)

See merge request espressif/esp-idf!32528
2024-08-02 16:26:05 +08:00
Frantisek Hrbata
4c90790cd2 fix: ensure the constraint file is followed also for setuptools
Currently, when the venv is installed or updated, we attempt to
automatically update pip and setuptools within the venv. Unfortunately,
the setuptools package is installed or updated without adhering to the
constraints file, which restricts the setuptools version due to
https://github.com/pypa/setuptools/issues/4480. Resolve this issue by
applying the constraints file to the installation and update of both pip
and setuptools.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-08-02 09:30:11 +02:00
Yuan Hong Hui
d51dd9b836 feat(bt):add pytest for classic bt example 2024-08-02 15:10:04 +08:00
Marius Vikhammer
cab1a2ab4a fix(lp-core): fixed ULP shared mem address being wrong on P4 2024-08-02 14:23:52 +08:00
Marius Vikhammer
fc847a0e9f Merge branch 'feature/ulp_hp_core_printf_debug_v5.3' into 'release/v5.3'
feat(ulp): add option for routing LP-printf to HP console (v5.3)

See merge request espressif/esp-idf!32493
2024-08-02 14:05:55 +08:00
Jiang Jiang Jian
14bdeaede5 Merge branch 'bugfix/usb_otg_console_v5.3' into 'release/v5.3'
fix(usb_otg): Fix bug that usb_otg console cannot work on esp32s3 (v5.3)

See merge request espressif/esp-idf!32179
2024-08-02 13:44:34 +08:00
Jiang Jiang Jian
f5e6f7276e Merge branch 'fix/netif_ppp_ip6_autoconfig_v5.3' into 'release/v5.3'
fix(esp_netif): Fix missing IPv6 autoconfig for PPP netifs (v5.3)

See merge request espressif/esp-idf!32177
2024-08-02 13:43:51 +08:00
Nachiket Kukade
de1050b810 fix(wifi): Avoid internal retries for offchannel FTM Requests 2024-08-02 10:41:49 +05:30
Rahul Tank
948c178a96 fix(wifi_prov): Use calloc instead of malloc to zero initialize variable 2024-08-02 10:35:51 +05:30
morris
fc177553b2 Merge branch 'feature/usb_host_multi_configuration_backport_v5.3' into 'release/v5.3'
feat(usb/host): multiconfiguration support backport (v5.3)

See merge request espressif/esp-idf!32054
2024-08-02 11:45:29 +08:00
morris
f7ac13a566 change(dsi): don't send eot packet in lp mode
because some LCD doesn't respond to that
2024-08-02 11:31:44 +08:00
Jiang Jiang Jian
90bb23f2f0 Merge branch 'bugfix/fix_newlib_nano_float_printf_issues_v5.3' into 'release/v5.3'
fix newlib nano float printf issues (backport v5.3)

See merge request espressif/esp-idf!32504
2024-08-02 11:00:58 +08:00
Jiang Jiang Jian
7a538b96a6 Merge branch 'backport/esp_netif_get_ip6addr_should_be_valid_v53' into 'release/v5.3'
fix(esp_netif): netif should return only valid addr(Backportv5.3)

See merge request espressif/esp-idf!32161
2024-08-02 10:58:27 +08:00
Jiang Jiang Jian
ba3a106fed Merge branch 'fix_coredump_build_error_v5.3' into 'release/v5.3'
fix(coredump): fix array out of the bounds error (v5.3)

See merge request espressif/esp-idf!32014
2024-08-02 10:57:52 +08:00
Marius Vikhammer
39148025fc Merge branch 'fix/correct_esp_xt_wdt_configuration_v5.3' into 'release/v5.3'
fix(esp_system): properly exclude XTAL32K WDT from other chips (v5.3)

See merge request espressif/esp-idf!31745
2024-08-02 10:57:24 +08:00
Jiang Jiang Jian
b82594e589 Merge branch 'lwip/if_indextoname_compolation_fix_v5.3' into 'release/v5.3'
rfix(lwip): Fixed compilation error referencing undefined POSIX interface API (v5.3)

See merge request espressif/esp-idf!31405
2024-08-02 10:56:07 +08:00
Marius Vikhammer
f7a3808374 feat(ulp): add option for routing LP-printf to HP console 2024-08-02 09:54:23 +08:00
Alexey Lapshin
86484c14e6 fix(newlib): fix include sys/dirent.h breaking change 2024-08-01 20:08:23 +07:00
Rahul Tank
611beb2c7b Merge branch 'bugfix/add_return_value_to_rpa_to_api_v5.3' into 'release/v5.3'
fix(nimble): Add return value to RPA Timeout API (v5.3)

See merge request espressif/esp-idf!32475
2024-08-01 20:23:56 +08:00
Mahavir Jain
e3182df661 Merge branch 'update/esp32c6-h2_apm_api_v5.3.1' into 'release/v5.3'
fix(apm): minor fixes for apm api

See merge request espressif/esp-idf!32502
2024-08-01 18:32:42 +08:00
C.S.M
3110c94117 feat(spi_flash): Support auto suspend on esp32p4 2024-08-01 18:12:51 +08:00
C.S.M
a4fbcae397 feat(spi_flash): Adjust flash clock to real 80M clock, and support 32bit address on eco1 2024-08-01 18:12:51 +08:00
Marius Vikhammer
660de3d5af Merge branch 'docs/fix_intr_num_hlinterrupts_doc_v5.3' into 'release/v5.3'
docs(interrupts): fix wrong high-level interrupt level num in doc (v5.3)

See merge request espressif/esp-idf!32501
2024-08-01 16:25:15 +08:00
zhanghaipeng
1df847e2a0 fix(ble/bluedroid): Fixed issue with resetting BLE security parameters during initialization 2024-08-01 16:17:53 +08:00
Erhan Kurubas
e4962dccf3 fix(coredump): fix array out of the bounds error
Closes https://github.com/espressif/esp-idf/issues/14117
2024-08-01 16:16:52 +08:00
Jakob Hasse
c658ae6679 fix(esp_system): properly exclude XTAL32K WDT from other chips
Closes https://github.com/espressif/esp-idf/issues/13955
2024-08-01 10:08:19 +02:00
Jiang Guang Ming
ae8c5f5e1c feat(newlib): add test case for printf float 2024-08-01 15:55:19 +08:00
Jiang Guang Ming
d61531a8e5 fix(esp_rom): add new rom caps ESP_ROM_HAS_NEWLIB_NANO_PRINTF_FLOAT_BUG 2024-08-01 15:54:32 +08:00
morris
04220bda1b Merge branch 'bugfix/fix_usb_dp_pullup_disable_v5.3' into 'release/v5.3'
GPIO: correct pio_ll_pullup_dis when USB DP (backport v5.3)

See merge request espressif/esp-idf!32494
2024-08-01 15:25:53 +08:00
Sachin Billore
9e0a13e4d7 fix(apm): minor fixes for apm api 2024-08-01 12:40:24 +05:30
Xiaoyu Liu
46892c32ec docs(interrupts): fix wrong high-level interrupt level num in doc 2024-08-01 15:09:36 +08:00
Marius Vikhammer
68bdc86b65 Merge branch 'feature/print_panic_while_cache_fail_v5.3' into 'release/v5.3'
feat(esp_system): Print backtrace for both CPUs when cache error does not determine CPU (v5.3)

See merge request espressif/esp-idf!31129
2024-08-01 14:47:04 +08:00
Jiang Jiang Jian
9775832c8c Merge branch 'bugfix/deinit_roaming_app_crash_v5.3' into 'release/v5.3'
fix(esp_wifi): Fix crash in wifi deinit due to roaming neighbor list (v5.3)

See merge request espressif/esp-idf!32472
2024-08-01 13:52:30 +08:00
Rahul Tank
7be0bf12af fix(nimble): Add return value to RPA Timeout API 2024-08-01 09:23:24 +05:30
Jiang Jiang Jian
0df2bb24e7 Merge branch 'fix/fix_some_wifi_bugs_07_29_v5.3' into 'release/v5.3'
fix(wifi): fix some wifi bugs (v5.3)

See merge request espressif/esp-idf!32451
2024-08-01 11:22:53 +08:00
gaoxu
4b665425a2 fix(gpio): correct usb dp gpio pullup disable function v5.3 2024-08-01 10:50:58 +08:00
morris
124778fbcb Merge branch 'fix/spi_hd_seg_fix_iwdt_timeout_v5.3' into 'release/v5.3'
fix(spi_slave_hd): fix seg mode potential iwdt timeout when multi task call (v5.3)

See merge request espressif/esp-idf!31842
2024-08-01 10:48:56 +08:00
Ivan Grokhotkov
b5ddc10ed1 Merge branch 'bugfix/sdmmc_test_app_usj_console_v5.3' into 'release/v5.3'
ci(sdmmc): enable tests and switch to usb_serial_jtag in the test app for P4 (v5.3)

See merge request espressif/esp-idf!32490
2024-08-01 02:38:22 +08:00
Ivan Grokhotkov
1dff957597 ci(sdmmc): enable tests for ESP32-P4 2024-07-31 18:39:40 +02:00
Ivan Grokhotkov
b124b1d682 ci(sdmmc): switch to usb_serial_jtag in the test app for P4
New CI runners use usb_serial_jtag, update configuration to match this.
2024-07-31 17:21:25 +02:00
morris
e566ffffcb Merge branch 'feature/support_uart_sleep_retention_v5.3' into 'release/v5.3'
feat(uart): support uart module sleep retention (v5.3)

See merge request espressif/esp-idf!32464
2024-07-31 22:07:59 +08:00
xuxiao
4cc7eecf4f fix(wifi): fix some wifi bugs (v5.3) 2024-07-31 20:35:47 +08:00
morris
fe810983c4 Merge branch 'feature/support_isp_ccm_v5.3' into 'release/v5.3'
feat(isp_ccm): support isp color correction matrix (v5.3)

See merge request espressif/esp-idf!31608
2024-07-31 18:59:44 +08:00
Shreyas Sheth
5dac537f6b fix(esp_wifi): Fix crash in wifi deinit due to roaming neighbor list 2024-07-31 14:47:52 +05:30
morris
df5bf8c365 Merge branch 'bugfix/fix_parlio_cache_sync_issue_on_p4_v5.3' into 'release/v5.3'
fix(parlio): fix cache sync issue on P4 (v5.3)

See merge request espressif/esp-idf!32427
2024-07-31 16:46:57 +08:00
Shu Chen
e1f066e3b3 Merge branch 'backport/add_ot_ts_lock_check_v53' into 'release/v5.3'
feat(openthread): add task switching lock holder check(Backport v5.3)

See merge request espressif/esp-idf!32454
2024-07-31 16:46:36 +08:00
Marius Vikhammer
21e23c16c4 Merge branch 'feat/lp_core_pre_calc_timer_v5.3' into 'release/v5.3'
change(lp_core): changed wakeup time calc to use a precomputed tick value (v5.3)

See merge request espressif/esp-idf!32458
2024-07-31 16:39:27 +08:00
Marius Vikhammer
59666823e4 Merge branch 'feature/lp_core_etm_v5.3' into 'release/v5.3'
feat(lp-core): added support for using ETM events as wake-up source (v5.3)

See merge request espressif/esp-idf!32455
2024-07-31 16:11:47 +08:00
Song Ruo Jing
753fe53fab fix(uart): fix uart_config_t structure size difference in C and C++ 2024-07-31 15:15:59 +08:00
Song Ruo Jing
8b8bb72ad4 feat(uart): support uart module sleep retention on c6/h2/p4 2024-07-31 15:15:11 +08:00
zwl
5509cda7ca fix: fixed directed adv can't be conneted when adv filter is 0x2 on ESP32C2 2024-07-31 14:38:40 +08:00
zwl
8d22f1c609 fix: fixed occasional wdt issue in multi-connection scenarios on ESP32H2 2024-07-31 14:38:40 +08:00
Marius Vikhammer
cada05a0df Merge branch 'fix/vtaskdeletewithcaps_leaks_memory_v5.3' into 'release/v5.3'
fix(freertos): Fixed memory leak issue in vTaskDeleteWithCaps() (v5.3)

See merge request espressif/esp-idf!32399
2024-07-31 13:33:53 +08:00
Marius Vikhammer
dccd6b0259 change(lp_core): changed wakeup time calc to use a precomputed tick value
Previously we would calculate the wakeup ticks upon every wakeup using the lp-timer clock frequency,
but this caused the binary to pull in software division functions, increasing the binary size.

This value is now precalculated by the hp-core when we configure the ULP. This saves about 1k bytes.
2024-07-31 13:28:14 +08:00
Marius Vikhammer
cf36c11b81 feat(lp-core): added support for using ETM events as wake-up source 2024-07-31 11:55:24 +08:00
zwx
7e93518073 feat(openthread): add task switching lock holder check 2024-07-31 11:33:40 +08:00
Island
144b731f3a Merge branch 'feat/save_ble_log_to_flash_0605_v5.3' into 'release/v5.3'
ble: save ble log to flash on ESP32C6 (v5.3)

See merge request espressif/esp-idf!32394
2024-07-31 11:29:39 +08:00
laokaiyao
cd6b3ab9fb feat(isp_ccm): support isp color correction matrix (v5.3) 2024-07-31 11:16:17 +08:00
morris
05305871b2 Merge branch 'bugfix/fix_the_readme_check_failure' into 'release/v5.3'
fix(ci): fix the readme check of c5 mp (v5.3)

See merge request espressif/esp-idf!32428
2024-07-31 11:15:40 +08:00
Jiang Jiang Jian
9a481d8f23 Merge branch 'bugfix/dpp_auth_failure_v5.3' into 'release/v5.3'
fix(wpa_supplicant):Deinit old dpp authentication data after receiving config.(v5.3)

See merge request espressif/esp-idf!32432
2024-07-31 10:35:55 +08:00
Jiang Jiang Jian
474a92697c Merge branch 'contrib/github_pr_14084_v5.3' into 'release/v5.3'
remove TLS pointer/deletion callback from correct thread (GitHub PR) (v5.3)

See merge request espressif/esp-idf!31851
2024-07-31 10:27:19 +08:00
Jiang Jiang Jian
bbda124fce Merge branch 'bugfix/fix_beacon_timeout_issue_in_mesh_v5.3' into 'release/v5.3'
fix(wifi/mesh): fix the beacon timeout issue in mesh (v5.3)

See merge request espressif/esp-idf!32435
2024-07-31 10:19:42 +08:00
Shu Chen
dc7fb34fca Merge branch 'backport/openthread_related_bacport_to_5_3' into 'release/v5.3'
Backport some openthread related features (Backport v5.3)

See merge request espressif/esp-idf!32251
2024-07-30 21:18:47 +08:00
laokaiyao
3fc2c00dab fix(parlio): fix cache sync issue on P4 2024-07-30 19:46:35 +08:00
Sudeep Mohanty
3e4fcf66ef fix(freertos): Fixed memory leak issue in vTaskDeleteWithCaps()
vTaskDeleteWithCaps() leaked memory when a task uses the API to delete
itself. This commit adds a fix to avoid the memory leak.

Closes https://github.com/espressif/esp-idf/issues/14222
2024-07-30 19:45:52 +08:00
Cao Sen Miao
ec130b0a64 fix(usb_otg): Fix bug that usb_otg console cannot work on esp32s3 2024-07-30 19:42:25 +08:00
David Cermak
6b83cc254d fix(esp_netif): Fix missing IPv6 autoconfig for PPP netifs
Closes https://github.com/espressif/esp-idf/issues/13713
2024-07-30 19:41:54 +08:00
zwx
e034358983 fix(esp_netif): netif should return only valid addr 2024-07-30 19:41:10 +08:00
Jiang Jiang Jian
aa95bb1e9a Merge branch 'feature/ulp_include_sdkconfig_cmake_v5.3' into 'release/v5.3'
feat(ulp): import all sdkconfigs macros into cmake build (v5.3)

See merge request espressif/esp-idf!32139
2024-07-30 19:40:15 +08:00
Jiang Jiang Jian
c4d3716f76 Merge branch 'fix/usb_hs_scheduler_backport_v5.3' into 'release/v5.3'
fix(usb/host): Fix occasional ISOC scheduler skipping transfers backport v5.3

See merge request espressif/esp-idf!32083
2024-07-30 19:40:03 +08:00
Myk Melez
5b4b867a9c fix(pthread): Remove TLS pointer/deletion callback from correct thread
Originally, pthread_internal_local_storage_destructor_callback was only called from pthread_exit
on the thread whose TLS is being destroyed.

In b3755b751e, pthread_internal_local_storage_destructor_callback
started being called from pthread_join and pthread_detach on a different thread (whichever one
called one of those functions).

But pthread_internal_local_storage_destructor_callback is still calling
vTaskSetThreadLocalStoragePointer and vTaskSetThreadLocalStoragePointerAndDelCallback with a NULL
xTaskToSet argument, which causes those functions to set the TLS pointer and deletion callback
for the current thread, not the thread whose TLS is being destroyed.

This commit makes pthread_internal_local_storage_destructor_callback call
vTaskSetThreadLocalStoragePointer and vTaskSetThreadLocalStoragePointerAndDelCallback
with the handle of the thread whose TLS is being destroyed.
2024-07-30 19:39:17 +08:00
wanlei
9e38f78ea2 fix(spi_slave_hd): fix seg mode potential iwdt timeout when multi task call 2024-07-30 19:38:45 +08:00
Ivan Grokhotkov
acb201e5b2 feat(tools): enable idf.py qemu integration for ESP32-S3 2024-07-30 19:37:32 +08:00
Ivan Grokhotkov
4168fa28f4 feat(esp_eth): enable openeth in QEMU for ESP32-S3 2024-07-30 19:37:32 +08:00
Ivan Grokhotkov
ae0a230843 feat(tools): update qemu version to esp_develop_9.0.0_20240606 2024-07-30 19:37:32 +08:00
Abhik Roy
ca967c9f96 fix(lwip): Fixed compilation error referencing undefined POSIX interface API
Closes https://github.com/espressif/esp-idf/issues/13577
2024-07-30 19:36:18 +08:00
Konstantin Kondrashov
3f82f6e93b feat(esp_system): Print backtrace for both CPUs when cache error does not determine CPU 2024-07-30 19:35:35 +08:00
zhanghaipeng
18a4191adf fix(ble/bluedroid): Fix incorrect state issue when unregistering BLE GATTC application 2024-07-30 18:03:37 +08:00
zhangyanjiao
fa7fb662c1 fix(wifi/mesh): fix the beacon timeout issue in mesh 2024-07-30 16:44:37 +08:00
aditi
da2fb9de49 fix(wpa_supplicant):Deinit old dpp authentication data after receiving config. 2024-07-30 13:57:42 +05:30
laokaiyao
951bdd70a2 fix(ci): fix the readme check of c5 mp 2024-07-30 15:40:19 +08:00
Marius Vikhammer
6cbb5af66e Merge branch 'ci/disable_c5_system_test' into 'release/v5.3'
ci(system): disable c5 system tests (v5.3)

See merge request espressif/esp-idf!32423
2024-07-30 14:21:53 +08:00
Marius Vikhammer
1adbfa6822 ci(system): disable c5 system tests 2024-07-30 13:19:04 +08:00
morris
6fffc3b017 Merge branch 'fix/esp_lcd_i2c_ng_v5.3' into 'release/v5.3'
fix(esp_lcd): Fix I2C receive without param (v5.3)

See merge request espressif/esp-idf!32412
2024-07-30 10:53:11 +08:00
Jiang Jiang Jian
23e2b6a130 Merge branch 'backport/fix_154_next_operation_for_multi_event_v53' into 'release/v5.3'
fix(ieee802154): refactor the next opteration logic for multiple events(Backport v5.3)

See merge request espressif/esp-idf!32388
2024-07-30 10:34:03 +08:00
Jiang Jiang Jian
0ac440afcc Merge branch 'bugfix/split_hci_log_in_nimble_v5.3' into 'release/v5.3'
fix(bt/nimble): split hci log in nimble (backport v5.3)

See merge request espressif/esp-idf!32383
2024-07-30 10:33:16 +08:00
Marius Vikhammer
1a6f1e67c6 feat(ulp): include sdkconfig macros in cmake build 2024-07-30 10:27:28 +08:00
Tomas Rezucha
0d7d3b5dbb fix(usb/host): Fix occasional ISOC scheduler skipping transfers 2024-07-30 10:25:54 +08:00
Jiang Jiang Jian
179622046d Merge branch 'backport/shortened_uart_read_bytes_blocking_53' into 'release/v5.3'
fix(uart): remove unnecessary wait when sending message to ring buffer(Backport5.3)

See merge request espressif/esp-idf!31380
2024-07-30 10:20:51 +08:00
morris
0e2b19b11b Merge branch 'bugfix/usb_serial_jtag_simplify_v5.3' into 'release/v5.3'
usb-serial-jtag driver simplification (backport v5.3)

See merge request espressif/esp-idf!31947
2024-07-29 18:37:50 +08:00
Peter Marcisovsky
613ad211c6 refactor(usb_host): Update USB Host multiconfig public API
- previous usb_host_get_config_desc_free()
    - updated usb_host_free_config_desc()
2024-07-29 12:20:16 +02:00
Peter Marcisovsky
5fc18ffc04 feat(usb/host): multiconfiguration support
- usb host reads device's configuration on request
    - a control transfer is sent
    - memory is allocated for a new descriptor
    - user must manually free the memory
2024-07-29 12:20:16 +02:00
Adam Múdry
873ae74e0b fix(vfs): FATFS mount immediately after format if mount failed 2024-07-29 17:58:49 +08:00
Martin Vychodil
ac4c6dfd86 Merge branch 'fix/vfs_console_fstat_infinite_recursion_v5.3' into 'release/v5.3'
fix(storage/vfs_console): remove possible infinite recursion (v5.3)

See merge request espressif/esp-idf!31423
2024-07-29 17:25:00 +08:00
morris
c782e57a0f Merge branch 'feature/usb_host_hub_support_collective_backport_v5.3' into 'release/v5.3'
refactor(usb/host): Prerequisite Refactoring For Hub Collective backport (v5.3)

See merge request espressif/esp-idf!30480
2024-07-29 17:11:08 +08:00
morris
0019a9fb8d Merge branch 'change/mipi_dsi_minor_change_v5.3' into 'release/v5.3'
feat(mipi_dsi): update low level functions to include underrun interrupt (v5.3)

See merge request espressif/esp-idf!32389
2024-07-29 16:46:09 +08:00
Vilem Zavodny
b9b3479a20 fix(esp_lcd): Fix I2C receive without param 2024-07-29 16:42:10 +08:00
morris
a156e2871e Merge branch 'feat/support_psram_aps3204l_v5.3' into 'release/v5.3'
psram: support APS3204L (v5.3)

See merge request espressif/esp-idf!32390
2024-07-29 16:00:25 +08:00
morris
bdd2233180 Merge branch 'change/improve_xip_docs_on_p4_v5.3' into 'release/v5.3'
psram: improved xip psram docs on p4 (v5.3)

See merge request espressif/esp-idf!32384
2024-07-29 13:54:53 +08:00
Rahul Tank
85955903e9 Merge branch 'bugifx/zero_initilize_variable_v5.3' into 'release/v5.3'
fix(nimble): Zero initialize variable to avoid garbage value (v5.3)

See merge request espressif/esp-idf!32366
2024-07-29 13:01:34 +08:00
Marius Vikhammer
ee423b186a Merge branch 'ci/enable_misc_c5_build_tests_v5.3' into 'release/v5.3'
test(misc): enable misc tests that have been missed during bringup (v5.3)

See merge request espressif/esp-idf!31789
2024-07-29 12:39:36 +08:00
zwl
6e11307d16 fix(ble): fixed tx memory leak issue when controller disable 2024-07-29 11:56:10 +08:00
zwl
ba97f7d755 fix(ble): fixed wdt issue when print key controller info on ESP32-C6 and ESP32-H2 2024-07-29 11:56:10 +08:00
zwl
29d8e723b8 feat(bluetooth/controller): support switching log output mode on ESP32-C2 2024-07-29 11:56:09 +08:00
zwl
30ff46717f feat(bluetooth/controller): support switching log output mode on ESP32-C6 and ESP32-H2 2024-07-29 11:56:09 +08:00
zwl
565053406b feat(bluetooth/controller): storage ble controller log to flash on ESP32C2 2024-07-29 11:56:09 +08:00
zwl
777e58f80e feat(bluetooth/controller): storage ble controller log to flash on ESP32C6 and ESP32H2 2024-07-29 11:56:08 +08:00
C.S.M
03447f5827 fix(usb_serial_jtag): Fix issue that use u32_reg read/write cannot be used to modify fifo regs 2024-07-29 11:46:52 +08:00
Jeroen Domburg
a0dbe28c9f refactor(usb-serial-jtag): usb-serial-jtag driver simplification to fix rom print coexistence 2024-07-29 11:44:15 +08:00
Armando
10d68e943a feat(psram): support APS3204L 2024-07-29 11:41:00 +08:00
morris
0417d48a9d feat(mipi_dsi): update low level functions to include underrun interrupt 2024-07-29 11:23:52 +08:00
zwx
e8660cd99d fix(ieee802154): refactor the next opteration logic for multiple events 2024-07-29 11:16:37 +08:00
Armando
21b861e9df change(psram): improved xip psram docs on p4 2024-07-29 10:36:44 +08:00
Marius Vikhammer
39a3d54619 Merge branch 'fix/freertos_port_assert_in_isr_bug_v5.3' into 'release/v5.3'
fix(freertos): Incorrect assert in FreeRTOS port layer when not in ISR context (v5.3)

See merge request espressif/esp-idf!32372
2024-07-29 09:52:55 +08:00
zhiweijian
917bcc2cd8 fix(bt/nimble): split hci log in nimble 2024-07-29 09:46:13 +08:00
Rahul Tank
3469d50a8b fix(nimble): Zero initialize variable to avoid garbage value 2024-07-26 21:29:00 +05:30
Rahul Tank
d43458790d Merge branch 'bugfix/host_cb_to_provide_key_v5.3' into 'release/v5.3'
fix(nimble): Add host callback to provide security key (v5.3)

See merge request espressif/esp-idf!32247
2024-07-26 23:00:00 +08:00
Sudeep Mohanty
d2e4722f5b fix(freertos): Incorrect assert in FreeRTOS port layer when not in ISR context
This commit fixes an issue where in the FreeRTOS port layer would cause
the portASSERT_IF_IN_ISR() assert check to fail even when the system is
not in an interrupt context.
2024-07-26 15:15:34 +02:00
Jiang Jiang Jian
2e512fb8ee Merge branch 'bugfix/ld_acl_c_3576_v5.3' into 'release/v5.3'
fix(bt/controller): Removed an improper assertion in ACL link driver (v5.3)

See merge request espressif/esp-idf!32117
2024-07-26 19:09:47 +08:00
Jiang Jiang Jian
7f1b752631 Merge branch 'backport/support_eth_mac_using_esp_read_mac_v53' into 'release/v5.3'
feat(eth) configure eth mac using esp_read_mac(Backport v5.3)

See merge request espressif/esp-idf!31093
2024-07-26 16:38:09 +08:00
Jiang Jiang Jian
ab8e19710f Merge branch 'bugfix/handle_no_pmkid_case_owe_v5.3' into 'release/v5.3'
Recompute keys in OWE incase of PMKID absence or mismatch (Backport v5.3)

See merge request espressif/esp-idf!32331
2024-07-26 16:09:31 +08:00
Jiang Jiang Jian
f15a63efd7 Merge branch 'bugfix/c5_mintstatus_value_v5.3' into 'release/v5.3'
fix(riscv): fix a bug that affected mintstatus CSR value in the CLIC (backport v5.3)

See merge request espressif/esp-idf!32230
2024-07-26 15:56:18 +08:00
Rahul Tank
01086e0307 fix(nimble): Add host callback to provide security key 2024-07-26 11:34:40 +05:30
Rahul Tank
9f7f1f3bf2 Merge branch 'bugfix/reset_irk_when_all_unpair_v5.3' into 'release/v5.3'
fix(nimble): Fixed BLE security vulnerability when using fixed IRK (v5.3)

See merge request espressif/esp-idf!32156
2024-07-26 14:03:09 +08:00
Omar Chebib
dce5170cdb fix(riscv): fix a that affected mintstatus CSR value in the CLIC 2024-07-26 13:57:14 +08:00
Mahavir Jain
8795e7a12d Merge branch 'bugfix/provide_random_addr_api_v5.3' into 'release/v5.3'
fix(wifi_prov): Added API to set random address (v5.3)

See merge request espressif/esp-idf!32325
2024-07-26 13:53:41 +08:00
Jiang Jiang Jian
509bd0ec9e Merge branch 'docs/delete_userguide_esp32_s2_devkitc_1_v5.3' into 'release/v5.3'
docs: Delete user guide esp32-s2-devkitc-1 (v5.3)

See merge request espressif/esp-idf!31613
2024-07-26 13:12:40 +08:00
Jin Cheng
81cdaa3ace fix(bt/controller): Removed an improper assertion in ACL link driver
It can be triggered on peripheral SNIFF mode
when RX window is adjusted on ESP32.
2024-07-26 12:40:04 +08:00
Jiang Jiang Jian
e9ca15c173 Merge branch 'docs/migrate_esp32c3_devkitc_02_devkitm_1_user_guide_v5.3' into 'release/v5.3'
docs: Migrate user guides of ESP32-C3-DevKitM and ESP32-C3-DevKitC to esp-dev-kits (v5.3)

See merge request espressif/esp-idf!31818
2024-07-26 12:01:33 +08:00
Shyamal Khachane
24de52e110 fix(esp_wifi): Handle PMKID mismatch or absence in OWE
Compute keys incase PMKID does not match or PMKID is absent in association response
2024-07-26 11:57:59 +08:00
Jiang Jiang Jian
b58fa75121 Merge branch 'bugfix/wifi_scan_example_v5.3' into 'release/v5.3'
fix(wifi): Free scan configuration after use when channel bitmap is used in scan example (Backport v5.3)

See merge request espressif/esp-idf!32201
2024-07-26 11:56:12 +08:00
Jiang Jiang Jian
d390c6f48a Merge branch 'fix/stack_overflow_in_example_spp_initiator_v5.3' into 'release/v5.3'
Fix/stack overflow in example spp initiator (backport v5.3)

See merge request espressif/esp-idf!32232
2024-07-26 11:55:37 +08:00
Jiang Jiang Jian
b81f35157b Merge branch 'bugfix/fix_ble_cannot_create_conn_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed BLE cannot create connection(v5.3)

See merge request espressif/esp-idf!32306
2024-07-26 11:54:58 +08:00
Jiang Jiang Jian
2ea1eff316 Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.3' into 'release/v5.3'
Fixed some BLE bugs 240723 (backport v5.3)

See merge request espressif/esp-idf!32345
2024-07-26 11:53:59 +08:00
Jiang Jiang Jian
1fa25ff842 Merge branch 'feat/add_ble50_instant_v5.3' into 'release/v5.3'
Add support for BLE 5.0 instances in related events (v5.3)

See merge request espressif/esp-idf!31990
2024-07-26 11:53:08 +08:00
Jiang Jiang Jian
4a4d20f085 Merge branch 'bugfix/fix_esco_conflict_with_sniff_v5.3' into 'release/v5.3'
fix(bt/controller): Fixed some controller bugs (v5.3)

See merge request espressif/esp-idf!31952
2024-07-26 11:51:49 +08:00
Jiang Jiang Jian
25ff0fb054 Merge branch 'docs/optimized_ble_controller_api_references_esp32_v5.3' into 'release/v5.3'
docs(ble): Revised the esp32 controller API explanations (v5.3)

See merge request espressif/esp-idf!31925
2024-07-26 11:51:19 +08:00
Jiang Jiang Jian
3c3c501967 Merge branch 'docs/update_twt_docs_v5.3' into 'release/v5.3'
docs(wifi):update TWT docs(Backport v5.3)

See merge request espressif/esp-idf!31898
2024-07-26 11:50:34 +08:00
Jiang Jiang Jian
67b0e9bd09 Merge branch 'bugfix/fix_ble_connect_fail_report_time_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed BLE report event when connection fails (v5.3)

See merge request espressif/esp-idf!31781
2024-07-26 11:49:19 +08:00
Jiang Jiang Jian
c2d5712563 Merge branch 'bugfix/openthread_uart_vfs_register_v5_3' into 'release/v5.3'
fix(openthread): register uart vfs devices when they are not registered(v5.3)

See merge request espressif/esp-idf!31795
2024-07-26 11:47:45 +08:00
Jiang Jiang Jian
e3e5b3452d Merge branch 'docs/add_the_description_of_gpio_wakeup_in_lightsleep_when_pd_top_v5.3' into 'release/v5.3'
docs(pm): add description for gpio_wakeup  (backport v5.3)

See merge request espressif/esp-idf!31737
2024-07-26 11:47:17 +08:00
Jiang Jiang Jian
d431971fed Merge branch 'feat/ci_check_ll_rw_register_half_word_v5.3' into 'release/v5.3'
fix(hal): LL function read write the register by half-world (v5.3)

See merge request espressif/esp-idf!31722
2024-07-26 11:46:40 +08:00
Mahavir Jain
2c84e2e40b Merge branch 'fix/fix_aes_dma_desc_align_v5.3' into 'release/v5.3'
fix(aes): fixed aes wrong dma desc alignment (v5.3)

See merge request espressif/esp-idf!32206
2024-07-26 11:46:23 +08:00
Jiang Jiang Jian
86bcea64b9 Merge branch 'feature/touch_driver_ng_on_p4_v5.3' into 'release/v5.3'
feat(touch_sensor): touch driver ng on p4 (v5.3)

See merge request espressif/esp-idf!31624
2024-07-26 11:42:27 +08:00
Xu Si Yu
371ae9577c fix(uart): remove unnecessary wait when sending message to ring buffer 2024-07-26 11:41:36 +08:00
zwx
34a7bc558e feat(eth) configure eth mac using esp_read_mac
* Closes https://github.com/espressif/esp-idf/issues/13808
2024-07-26 11:40:10 +08:00
Jiang Jiang Jian
35e9a119da Merge branch 'bugfix/l2cap_use_wrong_handle_v5.3' into 'release/v5.3'
fix(bt/bluedroid):  Fixed the issue of using the wrong handle to handle the BTA_JV_L2CAP_READ_EVT event(v5.3)

See merge request espressif/esp-idf!31278
2024-07-26 11:39:25 +08:00
Jiang Jiang Jian
1316c4bdfb Merge branch 'fix/blemesh24_61_v5.3' into 'release/v5.3'
fix/blemesh24_61 (v5.3)

See merge request espressif/esp-idf!31564
2024-07-26 11:38:30 +08:00
zhangshuxian
c9e769a5f4 docs: Delete user guide esp32-s2-devkitc-1 2024-07-26 11:33:11 +08:00
Jiang Jiang Jian
8e210e56ac Merge branch 'bugfix/fix_coex_loadprohibit_issue_v5.3' into 'release/v5.3'
fix(coex): Fixed coexist scheme phase index overflow issue (backport v5.3)

See merge request espressif/esp-idf!32296
2024-07-26 11:15:46 +08:00
Jiang Jiang Jian
5e24acf877 Merge branch 'fix/esp_eth_p4_docs_v5.3' into 'release/v5.3'
docs(esp_eth): enabled Configure MAC and PHY section for P4 (v5.3)

See merge request espressif/esp-idf!31496
2024-07-26 11:14:37 +08:00
Jiang Jiang Jian
9722f4d044 Merge branch 'docs/delete_user_guide_esp32_s2_devkitm_1_v5.3' into 'release/v5.3'
docs: Delete user guide esp32-s2-devkitm-1 (v5.3)

See merge request espressif/esp-idf!31606
2024-07-26 11:12:14 +08:00
Jiang Jiang Jian
5325cac7e6 Merge branch 'coredump_save_all_regions_v5.3' into 'release/v5.3'
Save .bss, .data and .heap sections in to the coredump (v5.3)

See merge request espressif/esp-idf!30438
2024-07-26 11:11:22 +08:00
Jiang Jiang Jian
3e826dd883 Merge branch 'fix/bump_esp_littlefs_to_v5.3' into 'release/v5.3'
fix(storage/littlefs): Bump version to v1.14.4 (core v2.9.1) (v5.3)

See merge request espressif/esp-idf!30356
2024-07-26 11:09:43 +08:00
Jiang Jiang Jian
50288969c2 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!32291
2024-07-26 11:08:23 +08:00
Jiang Jiang Jian
97888426ab Merge branch 'fix/add_integrity_check_when_select_temporary_key_v5.3' into 'release/v5.3'
fix(bt): add integrity check when temporary link key selected(backport v5.3)

See merge request espressif/esp-idf!31698
2024-07-25 22:03:55 +08:00
Jiang Jiang Jian
758567a7b7 Merge branch 'bugfix/wps_reg_state_handling_v5.3' into 'release/v5.3'
fix(wpa_supplicant): Handle case when WPS registrar misses WSC_DONE sent by station (Backport v5.3)

See merge request espressif/esp-idf!32082
2024-07-25 22:02:21 +08:00
morris
4bfb21de98 Merge branch 'feature/upgrade_example_autofocus_component_v5.3' into 'release/v5.3'
isp: upgrade esp_cam_sensor component for isp/auto_focus (v5.3)

See merge request espressif/esp-idf!32330
2024-07-25 19:13:12 +08:00
Marius Vikhammer
8957785f4d Merge branch 'feat/cache_panic_p4_v5.3' into 'release/v5.3'
cache:cache panic p4 (v5.3)

See merge request espressif/esp-idf!32110
2024-07-25 18:56:39 +08:00
Roland Dobai
a2056b0aa7 Merge branch 'fix/idf_tools_warning_error_v5.3' into 'release/v5.3'
fix(tools): Improve the warning message from idf_tools.py about the Python environment (v5.3)

See merge request espressif/esp-idf!31511
2024-07-25 18:13:41 +08:00
zhiweijian
2233244c86 feat(bt/controller): support mesh duplicate with extend scan 2024-07-25 17:50:04 +08:00
linruihao
313f7be30b fix(coex): Update bt lib for ESP32-C3 and ESP32-S3(e4ba7f6)
- Fixed coexist LoadProhibited issue
2024-07-25 17:50:04 +08:00
zhanghaipeng
ed0cc11750 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(abd7733)
- Fix the issue where RSSI is incorrect when latency is not zero
2024-07-25 17:50:04 +08:00
chenjianhua
bec7b260c6 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(66b5cc0)
- Fixed vendor hci get controller status command
- Prevent BLE interrupt from being preempted
2024-07-25 17:50:04 +08:00
Rahul Tank
e5c1a03e52 fix(nimble): Fixed BLE security vulnerability when using fixed IRK 2024-07-25 15:11:59 +05:30
Rahul Tank
e78cd20095 Merge branch 'bugfix/increase_timer_task_depth_v5.3' into 'release/v5.3'
fix(nimble): Increase Timer stack size for nimble application (v5.3)

See merge request espressif/esp-idf!32269
2024-07-25 17:38:21 +08:00
Rahul Tank
14135f9def Merge branch 'bugfix/fix_example_menuconfig_error_v5.3' into 'release/v5.3'
fix(nimble): Update menuconfig option to consider 5.0 support (v5.3)

See merge request espressif/esp-idf!32035
2024-07-25 17:30:25 +08:00
Aditya Patwardhan
ab6203d819 Merge branch 'bugfix/existing_mmap_region_offset_v5.3' into 'release/v5.3'
fix(esp_mm): for existing mmap region, consider new offset for virtual addr (v5.3)

See merge request espressif/esp-idf!32112
2024-07-25 17:09:33 +08:00
morris
53fd6cb516 Merge branch 'feature/support_isp_awb_v5.3' into 'release/v5.3'
feat(isp): Support ISP Auto White Balance (AWB) (v5.3)

See merge request espressif/esp-idf!31605
2024-07-25 17:02:22 +08:00
Island
d4ac5470ce Merge branch 'fix/ble_mesh_24_76_v5.3' into 'release/v5.3'
fix(ble_mesh): fixed BLEMESH24-76_v5.3

See merge request espressif/esp-idf!32226
2024-07-25 16:55:09 +08:00
Island
638577b0bf Merge branch 'bugfix/fix_some_ble_bugs_cjh_v5.3' into 'release/v5.3'
Fixed some BLE bugs 240620 (backport v5.3)

See merge request espressif/esp-idf!31646
2024-07-25 16:54:55 +08:00
Aditya Patwardhan
d0eccc2de2 Merge branch 'fix/update_latest_git_tag_variable' into 'release/v5.3'
fix(ci): Update LATEST_GIT_TAG variable

See merge request espressif/esp-idf!32340
2024-07-25 16:54:12 +08:00
Wei Yu Han
9c507c76f1 docs(ble): Removed trailing whitespaces 2024-07-25 16:54:09 +08:00
Wei Yu Han
cd05dfede7 docs(ble): Added newline for mode in esp_bt_controller_config_t 2024-07-25 16:54:09 +08:00
Wei Yu Han
300750b8c6 docs(ble): Revised the explanation for esp_bt_mem_release and esp_bt_controller_mem_release 2024-07-25 16:54:09 +08:00
Wei Yu Han
6df549d6b0 docs(ble):Added the parameter name data in esp_vhci_host_send_packet 2024-07-25 16:54:09 +08:00
weiyuhan
efbc3bbbf5 docs(ble): Removed period for incomplete sentences 2024-07-25 16:54:09 +08:00
Wang Ning
4aaad560b3 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Wang Ning <wangning@espressif.com>
2024-07-25 16:54:09 +08:00
Yuhan Wei
d0a5c72c75 docs(ble): Add the explanations to controller parameters configurable in menuconfig 2024-07-25 16:54:09 +08:00
Wang Ning
f0cb44a69c Apply 35 suggestion(s) to 1 file(s)
Co-authored-by: Wang Ning <wangning@espressif.com>
2024-07-25 16:54:09 +08:00
Yuhan Wei
2f9af2ce02 docs(ble): Removed note in esp_bt_controller_config_t 2024-07-25 16:54:09 +08:00
Yuhan Wei
dcece3822e docs(ble): Replaced BT with Bluetooth 2024-07-25 16:54:09 +08:00
Yuhan Wei
294c17e08b docs(ble): Removed unnecessary explanations 2024-07-25 16:54:09 +08:00
Yuhan Wei
2a3b3ab6f9 docs(ble): Added corresponding values to the controller mode 2024-07-25 16:54:09 +08:00
Yuhan Wei
d600d97c04 docs(ble): Fixed the explanation of TX power type 2024-07-25 16:54:09 +08:00
Yuhan Wei
56f8419f5f docs(ble): Added typeof for BLE sleep clock accuracy enum 2024-07-25 16:54:09 +08:00
Yuhan Wei
73509ce16b docs(ble): Added a name for BLE sleep clock accuracy enum 2024-07-25 16:54:09 +08:00
Yuhan Wei
c20cc2d9b2 docs(ble): Revised the esp32 controller API explanations 2024-07-25 16:54:09 +08:00
Island
0efdd4ac01 Merge branch 'feat/optimize_bt_porting_hci_0628_5.3' into 'release/v5.3'
Feat/optimize bt porting hci 0628 5.3

See merge request espressif/esp-idf!32135
2024-07-25 16:53:54 +08:00
morris
9fb47d0ee4 Merge branch 'fix/i2c_semaphore_release_v5.3' into 'release/v5.3'
fix(i2c): Fix i2c not release semaphore in command send loop(backport v5.3)

See merge request espressif/esp-idf!31958
2024-07-25 16:53:19 +08:00
morris
4acc83d7b0 Merge branch 'bugfix/rmt_memory_power_up_v5.3' into 'release/v5.3'
fix(rmt): power up memory block (v5.3)

See merge request espressif/esp-idf!32171
2024-07-25 16:52:12 +08:00
Mahavir Jain
86b9fb7db0 Merge branch 'contrib/github_pr_13945_v5.3' into 'release/v5.3'
fix(esp_http_client): Do not allocate client->if_name twice in esp_http_client_init. (GitHub PR) (v5.3)

See merge request espressif/esp-idf!31942
2024-07-25 16:51:01 +08:00
Mahavir Jain
ad0cfa57e7 Merge branch 'feature/esp32p4_apm_api_v5.3' into 'release/v5.3'
feat: add esp32p4 APM HAL/LL API (v5.3)

See merge request espressif/esp-idf!31417
2024-07-25 16:50:18 +08:00
Mahavir Jain
f0ba6eb94c Merge branch 'fix/incorrect_console_input_decoding_wifi_prov_mgr_v5.3' into 'release/v5.3'
fix(tools/esp_prov): Fix incorrect input decoding when using console transport (v5.3)

See merge request espressif/esp-idf!31689
2024-07-25 16:49:49 +08:00
Mahavir Jain
99467a17e9 Merge branch 'bugfix/c5_mpi_ecc_power_mode_v5.3' into 'release/v5.3'
fix(hal): correct mpi/ecc peripheral power up sequence for ESP32-C5 (v5.3)

See merge request espressif/esp-idf!31728
2024-07-25 16:49:05 +08:00
Mahavir Jain
98578d456f Merge branch 'bugfix/update_ecdsa_reset_api_to_execute_correctly_v5.3' into 'release/v5.3'
fix(hal): updated ecdsa reset api to execute correctly (v5.3)

See merge request espressif/esp-idf!32338
2024-07-25 16:48:25 +08:00
morris
e841a69498 Merge branch 'feature/dvp_cam_driver_optimize_v5.3' into 'release/v5.3'
feat(dvp): DVP cam supports more color format and don't initialize xclock pin (v5.3)

See merge request espressif/esp-idf!32023
2024-07-25 16:46:56 +08:00
morris
5f96f87715 Merge branch 'fix/usb_isoc_error_status_backport_v5.3' into 'release/v5.3'
fix(usb/host): Decode error flags in ISOC transfers backport to v5.3

See merge request espressif/esp-idf!31884
2024-07-25 16:45:42 +08:00
morris
a6edff26c6 Merge branch 'fix/usb_host_hcd_dconn_hs_backport_v5.3' into 'release/v5.3'
fix(usb_dwc_hal): Enabled precise detection of VBUS backport to v5.3

See merge request espressif/esp-idf!32059
2024-07-25 16:45:21 +08:00
morris
b131527d13 Merge branch 'fix/fix_csi_c2m_cache_ops_v5.3' into 'release/v5.3'
camera: fixed csi and isp_dvp c2m cache ops (v5.3)

See merge request espressif/esp-idf!32293
2024-07-25 16:43:10 +08:00
morris
e296941d36 Merge branch 'fix/fix_p4_psram_20m_wrong_clk_div_v5.3' into 'release/v5.3'
fix(psram): fixed p4 psram 20M wrong clk div (v5.3)

See merge request espressif/esp-idf!32255
2024-07-25 16:42:29 +08:00
morris
35961c945a Merge branch 'fix/fix_esp_dma_is_buffer_alignment_satisfied_issue_v5.3' into 'release/v5.3'
dma: fix esp_dma_is_buffer_alignment_satisfied align issue when l2 cache line 128B (v5.3)

See merge request espressif/esp-idf!32205
2024-07-25 16:42:08 +08:00
morris
94bc5d953f Merge branch 'feat/bss_in_psram_p4_v5.3' into 'release/v5.3'
psram: bss in psram p4 (v5.3)

See merge request espressif/esp-idf!32124
2024-07-25 16:41:59 +08:00
morris
9c874ee95d Merge branch 'ci/re-enable_spi_lcd_test_on_p4_v5.3' into 'release/v5.3'
Ci(spi_lcd): re-enable spi lcd test on p4 (v5.3)

See merge request espressif/esp-idf!32073
2024-07-25 16:41:13 +08:00
morris
cf3047a87f Merge branch 'refator/re-enable_test_on_p4_v5.3' into 'release/v5.3'
fix(gptimer): re-enable legacy_test on p4 (v5.3)

See merge request espressif/esp-idf!31539
2024-07-25 16:40:45 +08:00
morris
ab5b9a0c29 fix(hal): functions that may generate invalid load/store byte/half-word instructions
because the APB regsiters can't behave correctly on these instructions
2024-07-25 16:38:47 +08:00
morris
0903bcca1b Merge branch 'fix/lcd_build_error_in_cpp_v5.3' into 'release/v5.3'
fix(lcd): build errors with deprecated lcd types in cpp (v5.3)

See merge request espressif/esp-idf!31676
2024-07-25 16:38:17 +08:00
morris
ea05ae73a5 Merge branch 'bugfix/huk_ll_enable_interrupt_v5.3' into 'release/v5.3'
fix(huk): switch case fall through unexpected (v5.3)

See merge request espressif/esp-idf!31721
2024-07-25 16:34:57 +08:00
morris
8f0584c5be Merge branch 'refactor/adc_dma_memory_allocation_v5.3' into 'release/v5.3'
ADC & AES: use heap component API to allocate cached aligned DMA buffer (v5.3)

See merge request espressif/esp-idf!31723
2024-07-25 16:34:34 +08:00
morris
02fb7add3c Merge branch 'fix/workaround_rmt_static_analyzer_issue_v5.3' into 'release/v5.3'
fix(rmt): fix gcc static analyzer warnings (v5.3)

See merge request espressif/esp-idf!32184
2024-07-25 16:31:59 +08:00
morris
dd77b0b822 Merge branch 'change/dw_gdma_memory_allocation_v5.3' into 'release/v5.3'
change(dw_gdma): clean up memory allocation for link list items (v5.3)

See merge request espressif/esp-idf!32224
2024-07-25 16:31:34 +08:00
Marius Vikhammer
6c52686649 Merge branch 'fix/usb-serial-jtag-hangs-on-init_v5.3' into 'release/v5.3'
fix(console): USB Serial JTAG freezes when input received before the driver is installed (v5.3)

See merge request espressif/esp-idf!31820
2024-07-25 16:26:03 +08:00
Marius Vikhammer
a2d2f30816 Merge branch 'contrib/github_pr_14010_v5.3' into 'release/v5.3'
fix(ulp): Write pin's output mode to the correct register (GitHub PR) (v5.3)

See merge request espressif/esp-idf!31595
2024-07-25 16:24:35 +08:00
Marius Vikhammer
ddc482f11f Merge branch 'fix/ulp_riscv_i2c_multi_byte_v5.3' into 'release/v5.3'
fix(ulp-risc-v): Fixed RTC I2C multi-byte read/write issue for ULP RISC-V (v5.3)

See merge request espressif/esp-idf!31713
2024-07-25 16:24:18 +08:00
Marius Vikhammer
fd6e699728 Merge branch 'feat/lp_core_lp_spi_support_v5.3' into 'release/v5.3'
feat(lp-spi): Added support for LP SPI to the LP core (v5.3)

See merge request espressif/esp-idf!31762
2024-07-25 16:24:04 +08:00
Marius Vikhammer
e438c6973a Merge branch 'fix/duplicate_linux_target_kconfig_v5.3' into 'release/v5.3'
fix(kconfig): Removed duplicate entry for IDF_TARGET_LINUX in Kconfig (v5.3)

See merge request espressif/esp-idf!32027
2024-07-25 16:23:26 +08:00
Marius Vikhammer
93578b5b15 Merge branch 'fix/lp_i2c_generates_spurious_start_cond_v5.3' into 'release/v5.3'
fix(lp-i2c): Fixed the generation of spurious I2C start with lp-i2c (v5.3)

See merge request espressif/esp-idf!32107
2024-07-25 16:23:17 +08:00
Aditya Patwardhan
5a1f4f389c fix(ci): Update LATEST_GIT_TAG variable 2024-07-25 13:53:10 +05:30
Marius Vikhammer
0ae2bf5b4a Merge branch 'ci/esp_intr_dump_qemu_timeout_v5.3' into 'release/v5.3'
ci(qemu): increase timeout for esp_intr_dump test (v5.3)

See merge request espressif/esp-idf!31787
2024-07-25 16:22:27 +08:00
Xu Si Yu
bed5aa5429 feat(openthread): support restoring vendor properties of rcp 2024-07-25 16:00:46 +08:00
Xu Si Yu
ee788924eb feat(openthread): support changing openthread version information 2024-07-25 16:00:40 +08:00
nilesh.kale
215e1391ce fix(hal): updated ecdsa reset api to execute correctly
This commit updated API to ensure ECDSA peripheral resets
and waits until the state returns to idle.
2024-07-25 10:34:12 +05:30
Alexey Lapshin
6a9e8278a1 feat(examples): upgrade esp_cam_sensor component for isp/auto_focus 2024-07-25 09:34:22 +08:00
Rahul Tank
a2666d6f2c fix(wifi_prov): Added API to set random address 2024-07-24 20:52:37 +05:30
Darian Leung
7db459d85f docs(usb): Add USBH maintainer notes 2024-07-24 15:21:02 +08:00
Darian Leung
a602befe1b refactor(usb/usbh): Update USBH device creation and enumeration handling
This commit updates how the USBH handles device creation and enumeration so that
upper layers (such as the Hub driver) can use the USBH API for enumeration instead
of calling the HCD.

USBH Updates:

USBH now creates unenumerated devices set to address 0 with no device/config
descriptor. A newly created device can be opened and communicated with immediately
(using control transfers). This allows the Hub driver to call the USBH instead of
the HCD. Summary of USBH changes:

- Added new APIs to add/remove a device. Devices are now created as unenumerated
and can be immediately opened and communicated with.
- Added new APIs to enumerate a device (see 'usbh_dev_set_...()' functions). Device
must be locked (see 'usbh_dev_enum_lock()') before enumeration functions can be called.
- Added UID for each device. This allows the particular USBH without needing to
use the device's handle (which implies opening the device).

Hub Driver Updates:

Hub driver now calls the USBH for enumeration. Summary of USBH changes:

- Replace all 'hcd_pipe_...()' calls with 'usbh_dev_...()' calls
- Refactored port event handling to fit with new USBH API
- Updated to use UID to uniquely identify devices without opening them

USB Host Updates:

- Reroute USBH control transfers to clients and hub driver
2024-07-24 15:21:02 +08:00
Darian Leung
df6c6f93fa refactor(usb/hub): Update Hub driver port request logic 2024-07-24 15:21:02 +08:00
Darian Leung
3358f3ec46 refactor(usb/hcd): Allow port resets with allocated pipes
This commit updates the HCD API to allow port resets to occur even if pipes
are allocated. The pipes cannot be active and the port reset will simply
restore the pipes (by reinitializing their channel registers) following the
reset.

Changes:

- Allow port resets while channels are allocated
- Remove pipe persistance API 'hcd_pipe_set_persist_reset()'
2024-07-24 15:21:02 +08:00
Darian Leung
8aa9a42f2b refactor(usb/usbh): Rename device pool functions and ref_count
This commit renames the following APIs and variables in the USBH:

- Rename the prefix of device pool functions from 'usbh_dev_...' to
  'usbh_devs_...'.
- Rename 'ref_count' to 'open_count'. This variable tracks the number of times
  a device has been opened.
2024-07-24 15:21:02 +08:00
Darian Leung
c14eae95cd refactor(usb/host): Refactor USBH function grouping
This commit rearranges the USBH functions into new groupings to provide a
clearer abstraction. This is in preparation for refactoring/removing the Hub
related functions in the USBH API. This commit DOES NOT MAKE ANY BEHAVIORAL
CHANGES to the code.

Functions are now grouped into...

- USBH Processing: Functions dealing with overall USBH processing
- Device Pool: Functions that add/remove/open/close devices from the internal
               device pool
- Device: Functions that pertain to setting/getting a particular device
- Endpoints: Functions that pertain to a particular endpoint
- Transfer: Functions that pertain to sending transfers
2024-07-24 15:21:02 +08:00
zhanghaipeng
d8798c4bd5 fix(ble/bluedroid): Fixed BLE cannot create connection 2024-07-24 10:51:08 +08:00
linruihao
40b3f88dfb fix(coex): Fixed coexist scheme phase index overflow issue 2024-07-23 17:56:01 +08:00
Armando
715516eea5 fix(camera): fixed c2m cache ops 2024-07-23 17:49:04 +08:00
liuning
2c4812092d fix(coex): fix esp32 crash issue, fix esp32c6 rx issue 2024-07-23 17:09:09 +08:00
sibeibei
9db556c20e fix(pm): ssn update failed when dut wakeup from lightsleep 2024-07-23 17:08:53 +08:00
muhaidong
b072ccac62 fix(wifi): fix sta may join bad signal ap when set by signal
Closes https://github.com/espressif/esp-idf/issues/13958
2024-07-23 17:08:38 +08:00
muhaidong
240d300d64 fix(wifi): fix reset connection dns fail issue
Closes https://github.com/espressif/esp-idf/issues/12315
2024-07-23 17:08:24 +08:00
muhaidong
ecde808af9 fix(wifi): fixed association refused temporarily issue
1. fixed association refused temporarily issue.
2. give some information when password length mismatch authmode threshold
2024-07-23 17:08:00 +08:00
wangtao@espressif.com
6bb959e7ee fix(wifi):fix get softap dtim and csa config err 2024-07-23 17:07:32 +08:00
Shreyas Sheth
1191a9e1c5 fix(wifi): Ignore 11R, ENT AP when disabled in sdkconfig 2024-07-23 17:07:06 +08:00
zhangyanjiao
9e0064ba20 fix(wifi/mesh): fix the issue that xon request timeout constantly when root reboot
Closes https://github.com/espressif/esp-idf/issues/13212
2024-07-23 17:06:34 +08:00
muhaidong
20932eceaf fix(wifi): annotate a rom function 2024-07-23 16:42:31 +08:00
aditi_lonkar
2130416e2e fix(wifi):Fix for setting wps status fail when connection fails 2024-07-23 16:39:43 +08:00
Rahul Tank
436b31be6e fix(nimble): Increase Timer stack size for nimble application 2024-07-22 15:51:24 +05:30
Xu Si Yu
d1b3845aaa fix(common_components): unregister event handler if wifi disconnect and stop reconnecting 2024-07-22 16:46:35 +08:00
Armando
6fa12ecdf8 fix(psram): fixed p4 psram 20M wrong clk div 2024-07-22 09:27:11 +08:00
Xu Si Yu
436bf0b1ee feat(openthread): update openthread submodule 2024-07-19 19:22:47 +08:00
Mahavir Jain
99b1e56500 fix(hal): correct the power up sequence for MPI/ECC peripherals in ESP32-C5 2024-07-19 13:39:03 +08:00
gongyantao
7f0be0c06c feat(bt): add bt address printing for all bt examples 2024-07-19 11:43:09 +08:00
gongyantao
2c9aaf738d fix(bt): fix uTask stack overflow in bt example spp_initiator 2024-07-19 11:43:08 +08:00
morris
249e7e9282 change(dw_gdma): clean up memory allocation for link list items 2024-07-19 09:58:37 +08:00
Chen Jichang
8d15c0417f fix(spi_master): change MOSI pin default idle level to low 2024-07-18 21:56:31 +08:00
Armando
c3fc7cffda fix(aes): fixed aes wrong dma desc alignment 2024-07-18 16:26:09 +08:00
Armando
a23ae5b4bf fix(dma): fix esp_dma_is_buffer_alignment_satisfied align issue when l2 cache line 128B 2024-07-18 16:23:14 +08:00
morris
25f78b3715 fix(rmt): power up memory block 2024-07-18 14:52:15 +08:00
Sarvesh Bodakhe
3a1cc2be50 fix(wifi): Free scan configuration after use when channel bitmap is used 2024-07-18 11:54:15 +05:30
luoxu
5c39705bac fix(ble_mesh): fixed BLEMESH24-76 2024-07-18 10:54:53 +08:00
zwl
e497c29efe feat(bluetooth/controller): support default tx power configurable on ESP32C2 2024-07-18 10:53:55 +08:00
zwl
a2df884e64 feat(bluetooth/controller): support default tx power configurable on ESP32C6 and ESP32H2 2024-07-18 10:53:45 +08:00
zwl
d5df6dd78b fix(bluetooth/controller): fixed alloc memory fail when use uhci on ESP32-C6 and ESP32-H2 2024-07-17 19:32:22 +08:00
zwl
5a545d6885 fix(ble): fixed nimble host only build error 2024-07-17 19:32:22 +08:00
zwl
52c9d724bc feat(bluetooth/controller): update nimble host to adapt hci layer 2024-07-17 19:32:22 +08:00
zwl
09f4644629 feat(bluetooth/controller): add default cts and rts macro definition 2024-07-17 19:32:22 +08:00
zwl
9117932c6d feat(bluetooth/controller): adopting new HCI layer code on ESP32-C5 2024-07-17 19:32:22 +08:00
zwl
e761c1de8f feat(bluetooth/controller): adopting new HCI layer code and support UHCI function on ESP32-C6 and ESP32-H2 2024-07-17 19:32:22 +08:00
zwl
1390711c27 feat(bluetooth/controller): adopting new HCI layer code on ESP32-C2 2024-07-17 19:32:22 +08:00
zwl
6089f84653 feat(bluetooth/controller): optimize bt hci layer code 2024-07-17 19:32:22 +08:00
zwl
580b6fbd3c fix(ble): fixed some ble issues on ESP32C5 2024-07-17 19:32:22 +08:00
zwl
04e543949e fix(ble): fixed some ble controller issues on ESP32C6 and ESP32H2 2024-07-17 19:32:22 +08:00
zwl
5a6b9fc1b2 fix(ble): fixed some ble controller issues on ESP32-C2 2024-07-17 19:32:22 +08:00
morris
de7b7bc880 fix(rmt): fix gcc static analyzer warnings 2024-07-17 18:42:32 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
wuzhenghui
51a102a467 feat(example): update gpio/ext1 wakeup avaliable IO num in example Kconfig 2024-07-16 22:00:40 +08:00
wuzhenghui
603ad059a3 fix(esp_hw_support): hold LP_IO mode if LP_PERI domain powerdown in sleep 2024-07-16 22:00:40 +08:00
wuzhenghui
074035aac5 feat(esp_hw_support): support esp32p4 gpio wakeup deepsleep 2024-07-16 21:58:45 +08:00
wuzhenghui
4c2b86f5fe fix(esp_hw_support): stall another core during cpu/mem/apb freq switching 2024-07-16 21:47:04 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Guillaume Souchere
2a24cc206e fix(console): USB Serial JTAG freezes when input received before init
When data was sent through USB Serial JTAG before the
driver was installed, the bus was malfunctioning. This
was because the interrupt bit for data reception was cleared
regardless of whether data was received or not. Consequently,
usb_serial_jtag_isr_handler_default was not triggered and the
data was never read causing the bus to malfunction.

This commit is modifying usb_serial_jtag_driver_install to
prevent clearing USB_SERIAL_JTAG_INTR_SERIAL_OUT_RECV_PKT and
USB_SERIAL_JTAG_INTR_SERIAL_IN_EMPTY thus allowing the callback
usb_serial_jtag_isr_handler_default to trigger for possible data
exchanged prior to the call to usb_serial_jtag_driver_install.

This commit also modified the while logic in linenoiseProbe to
discard any data that doesn't match the expected chaaracter sequences
to prevent random input from interfering with evaluating whether the
terminal supports escape sequences or not.

See https://github.com/espressif/esp-idf/issues/13940
2024-07-15 10:17:00 +02:00
Armando
c85dc30b45 test(psram): enable bss psram test 2024-07-15 15:58:00 +08:00
Armando
0b5db82e5e feat(psram): support bss on psram on p4 2024-07-15 15:56:23 +08:00
Mahavir Jain
aacfe19a4e fix(esp_mm): for existing mmap region, consider new offset for virtual addr
While returning virtual address for existing memory mapped region, newly
supplied offset from the physical address was not getting considered.

This was a regression present from ESP-IDF 5.1 release.

Added test case in spi_flash component that fails without this fix.

Closes https://github.com/espressif/esp-idf/issues/13929
2024-07-15 12:42:06 +08:00
Armando
22f1d28533 feat(cache): supported cache panic on p4 2024-07-15 10:16:54 +08:00
Armando
9e34963397 feat(panic): supported more cache error cactch 2024-07-15 10:16:47 +08:00
laokaiyao
2c7958735d refactor(lp_ana_periph): sync the reg names to TRM (part2) 2024-07-13 15:47:20 +08:00
laokaiyao
2ee7f0e133 refactor(touch): refactor the filter configuration 2024-07-13 15:47:20 +08:00
laokaiyao
a775317091 refactor(lp_ana_periph): sync the reg names to TRM 2024-07-13 15:47:20 +08:00
laokaiyao
96e370f9bb fix(touch): fix driver coverity issue 2024-07-13 15:47:20 +08:00
laokaiyao
e6103c521a docs(touch): add doc for cap touch sens driver 2024-07-13 15:47:20 +08:00
laokaiyao
82cba6e3ff feat(touch_sens): add example for the touch sensor v3 2024-07-13 15:47:20 +08:00
laokaiyao
8a6f25738c ci(touch): add test cases for cap touch sens driver 2024-07-13 15:47:20 +08:00
laokaiyao
8a18ae60e0 feat(touch_sens): touch sensor driver-ng on P4 2024-07-13 15:47:20 +08:00
Sudeep Mohanty
5f6ddad456 fix(lp-i2c): Fixed the generation of spurious I2C start with lp-i2c
This commit fixes an issue with LP I2C and RTC I2C where in the
peripherals generated a spurious I2C start condition when initialized.
This caused some sensors to not respond properly to the following read
or write request.

Closes https://github.com/espressif/esp-idf/issues/14043
Closes https://github.com/espressif/esp-idf/issues/11608
2024-07-12 17:39:53 +02:00
Roman Leonov
f8bbf3f32d fix(usb_dwc_hal): Enabled precise detection of VBUS 2024-07-12 11:16:24 +02:00
David Čermák
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
Sarvesh Bodakhe
2475e6cd5d fix(wpa_supplicant): Avoid delaying removal of wps enrollee by 10ms
This is no longer needed as eloop timers are now executed in wifi task context.
2024-07-12 12:07:50 +05:30
Sarvesh Bodakhe
821f4a181f fix(wpa_supplicant): Handle case when WPS registrar misses WSC_DONE sent by station
When registrar somehow misses the WSC_DONE sent by station and station
goes for next connection after sending deauth, make sure that softAP
disables the registrar.
2024-07-12 12:07:44 +05:30
muhaidong
8a0a093cd1 fix(wifi): fix esp32 host lack of lmac api issue 2024-07-12 13:59:32 +08:00
Chen Jichang
8cac15e95b ci(spi_lcd): re-enable spi_lcd test on p4 2024-07-12 13:22:47 +08:00
Sarvesh Bodakhe
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
wuzhenghui
64ace5b6d8 fix(esp_hw_support): fix cpu_retention cache invalidate mask 2024-07-11 22:01:49 +08:00
wuzhenghui
edf14a1de1 fix(esp_hw_support): disable mpll clock after L1 dcache writeback 2024-07-11 13:59:42 +08:00
Rahul Tank
f6974ab183 fix(nimble): Update menuconfig option to consider 5.0 support 2024-07-10 17:21:45 +05:30
Michael (XIAO Xufeng)
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
Sudeep Mohanty
432aa793c4 fix(kconfig): Removed duplicate entry for IDF_TARGET_LINUX in Kconfig
This commit removes a duplicate entry for the IDF_TARGET_LINUX Kconfig
option in the project Kconfig file.

Closes https://github.com/espressif/esp-idf/issues/14145
2024-07-10 09:17:54 +02:00
Dong Heng
f66ff91e4f feat(dvp): DVP cam supports more color format and don't initialize xclock pin 2024-07-10 14:56:11 +08:00
wuzhenghui
108123d50c fix(esp_system): fix stuck in bootloader_random_enable after lightsleep 2024-07-10 14:22:39 +08:00
zhanghaipeng
c3af6db044 fix(ble/bluedroid): Fixed BLE set adv param check 2024-07-10 12:25:39 +08:00
zhanghaipeng
095a0dd85f feat(ble/bluedroid): Support BLE50 instance in related event 2024-07-09 15:23:46 +08:00
C.S.M
d6162c4a78 fix(i2c): Fix i2c not release semaphore in command send loop,
Closes https://github.com/espressif/esp-idf/issues/13962
2024-07-08 15:12:49 +08:00
linruihao
418ddda7ef fix(bt/controller): Fixed some controller bugs
- Fixed fail to establish eSCO when connected to two devices
- Changed some error log level to Debug if the error have a workaround

Closes https://github.com/espressif/esp-idf/issues/12340
2024-07-08 14:26:26 +08:00
liqigan
1c5bcc4a5d fix(bt/controller): Fixed not report HCI_Disconnection_Complete event 2024-07-08 14:26:01 +08:00
fbp2m
1506144d3a fix: fixed allocating if_name in client context multiple times
Do not allocate client->if_name twice in esp_http_client_init().

Signed-off-by: Harshit Malpani <harshit.malpani@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/13945
2024-07-07 21:19:42 +08:00
Aditya Patwardhan
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
Michael (XIAO Xufeng)
4e0d5c923d fix(sdmmc_io): fixed fixed_addr mode will still increase addr when splitting 2024-07-05 14:47:50 +08:00
Aditya Patwardhan
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
Michael (XIAO Xufeng)
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
Jakob Hasse
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
David Cermak
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
yinqingzhao
a83b39f96c docs(wifi):update TWT docs 2024-07-04 14:48:46 +08:00
luoxu
9b6b8ac41b fix(ble_mesh): ensure the operation of adv busy is thread-safe 2024-07-04 12:13:34 +08:00
luoxu
cd627d6453 feat(ble_mesh): add cas operation for bt_mesh_atomic_val_t 2024-07-04 12:13:34 +08:00
Jiang Jiang Jian
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
Island
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
Aditya Patwardhan
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
Tomas Rezucha
90149f6ffd fix(usb/host): Decode error flags in ISOC transfers 2024-07-03 09:15:48 +02:00
Linda
c60e627bba docs: Migrate user guides of ESP32-C3-DevKitM and ESP32-C3-DevKitC to esp-dev-kits 2024-07-01 15:26:49 +08:00
WanqQixiang
9d60b907d5 fix(openthread): register uart vfs devices when they are not registered 2024-06-28 16:02:27 +08:00
Marius Vikhammer
901158540e test(misc): enable misc tests that have been missed during bringup 2024-06-28 15:02:03 +08:00
Sudeep Mohanty
1c95a38ed1 test: Added LP core unit tests for LP SPI
This commit adds tests for LP SPI master and LP SPI slave devices.
2024-06-28 08:57:28 +02:00
Sudeep Mohanty
f910f13de9 feat(lp-spi): Added support for LP SPI driver to the LP Core on esp32p4
This commit adds LP SPI master and LP SPI slave support for the LP Core
on the esp32p4.
2024-06-28 08:57:28 +02:00
liuning
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
Marius Vikhammer
f3a5160e2c ci(qemu): increase timeout for esp_intr_dump test 2024-06-28 14:24:44 +08:00
wuzhenghui
0291269573 fix(esp_hw_support): wait eFuse controller idle after sleep wakeup 2024-06-28 13:58:44 +08:00
wuzhenghui
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
wuzhenghui
eb45491d00 feat(esp_hw_support): bypass rst_reason override for esp32p4eco1 2024-06-28 13:58:44 +08:00
wuzhenghui
fdb0dd23ca feat(esp_hw_support): support LP_Peripheral & CNNT power domain auto powerdown on esp32p4eco1 2024-06-28 13:58:44 +08:00
Marius Vikhammer
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
zhanghaipeng
429eb0952c fix(ble/bluedroid): Fixed BLE report event when connection fails 2024-06-28 12:00:33 +08:00
Marius Vikhammer
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
chenjianhua
2845990aff feat(bt/bluedroid): Add definition for the reason of BLE authentication failure 2024-06-26 17:25:39 +08:00
chenjianhua
14b64bfede fix(bt/bluedroid): Fixed BLE security vulnerability when using fixed IRK 2024-06-26 17:25:24 +08:00
linruihao
73ef188a8c fix(bt): Overwrite a function in esp32c3 eco7 rom 2024-06-26 17:23:29 +08:00
chenjianhua
1b36724897 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(0738a61)
- Fixed BT BB interrupt allocation
- Refactor the prefix of assert print
- Fixed HCI LE set privacy mode command handle
2024-06-26 17:23:29 +08:00
chenjianhua
ad31f4f029 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(eca46a0)
- Fixed adv data buffer free after restart adv
- Fixed BLE interrupt allocation using esp API
2024-06-26 17:23:29 +08:00
Lou Tianhao
dc9f9bf957 docs(pm): add description for gpio_wakeup 2024-06-26 14:04:49 +08:00
Marius Vikhammer
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
Xiaoyu Liu
8cabe4380b docs(sys-time): add esp32c5 info into programming guide docs 2024-06-25 15:35:11 +08:00
Jiang Jiang Jian
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
morris
3e3e1c77ba change(aes): refactor DMA buffer allocation 2024-06-25 13:49:24 +08:00
morris
b52b99a756 change(adc): refactor DMA memory allocation 2024-06-25 13:49:24 +08:00
morris
d054c4bcb6 fix(huk): switch case fall through unexpected 2024-06-25 13:42:22 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
xiongweichao
4a919356ba fix(bt/bluedroid): Fixed deadlock caused by not unlocking 2024-06-25 00:59:25 +08:00
xiongweichao
6c01ce3ae2 fix(bt/bluedroid): Fixed L2CAP using wrong handle
- Fixed the issue of using the wrong handle to handle the BTA_JV_L2CAP_READ_EVT event.
- Closes https://github.com/espressif/esp-idf/issues/13847
2024-06-25 00:59:25 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Sudeep Mohanty
52a5fbf3f9 fix(ulp-risc-v): Fixed RTC I2C multi-byte read/write issue for ULP RISC-V
This commit fixes an issue where multi-byte reads and writes over the
RTC I2C peripheral got stuck on the esp32s2 and esp32s3.

Closes https://github.com/espressif/esp-idf/issues/12235
2024-06-24 17:10:36 +02:00
Jiang Jiang Jian
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
Xiao Xufeng
3105644642 feat(esp32p4): make revision v0.1 the default version 2024-06-24 20:11:02 +08:00
chenjianxing
872319ac5e fix(phy): add phy calibration data check when mode is not none calibration 2024-06-24 20:05:09 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
gongyantao
ae4013c1a6 fix(bt): add integrity check when temporary link key selected 2024-06-24 17:48:27 +08:00
Li Shuai
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
harshal.patil
7e1bdbd683 fix(tools/esp_prov): Fix incorrect input decoding when using console transport
- Closes https://github.com/espressif/esp-idf/issues/14013
2024-06-24 12:28:31 +05:30
harshal.patil
18470061ab docs(secure_boot): Add secure boot signature verification time for esp32p4 2024-06-24 12:25:42 +05:30
morris
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
zhangyanjiao
561146f52b fix(lwip): fixed the dhcp pool error on dhcp server 2024-06-24 14:21:28 +08:00
Jiang Jiang Jian
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
Marius Vikhammer
d6eedc04bf Revert "fix(intr): fixed intr threshhold min level on C5"
This reverts commit a6c2c4149d.
2024-06-24 13:57:57 +08:00
Marius Vikhammer
69ab9d7a17 Revert "fix(rom): fixed esprv_int_set_threshold on C5"
This reverts commit 171e0a21a1.
2024-06-24 13:57:57 +08:00
Shreyas Sheth
33e6eaaabf fix(wpa_supplicant): Fix wpa3 AP crash because of dangling pointer 2024-06-24 13:54:30 +08:00
wuzhenghui
04429c9042 change(esp_hw_support): update xtal_freq after assume to avoid mass print in DFS 2024-06-24 11:56:39 +08:00
wuzhenghui
6eae7bc996 change(esp_system): trigger digital system reset in brownout isr 2024-06-24 11:56:38 +08:00
wuzhenghui
dd5a5f1cf2 feat(esp_hw_support): support DCDC always on 2024-06-24 11:48:23 +08:00
wuzhenghui
79c48b4707 feat(esp_pm): add DCDC always on config 2024-06-24 11:48:18 +08:00
Marius Vikhammer
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
Marius Vikhammer
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
morris
fe2b23b93a fix(i2c_lcd): using function overloading to keep esp_lcd_new_panel_io_i2c
becuase _Generic is not available in C++

Closes https://github.com/espressif/esp-idf/issues/14037
2024-06-24 10:52:28 +08:00
morris
8d8d8cbf18 fix(lcd): build errors with deprecated lcd types in cpp
Closes https://github.com/espressif/esp-idf/issues/14029
2024-06-24 10:52:28 +08:00
morris
8562e3be12 fix(ci): build rmt examples as long as it's driver support is finished 2024-06-24 10:50:11 +08:00
laokaiyao
4189c54abb feat(isp_awb): support to change config after initialized 2024-06-24 10:49:20 +08:00
laokaiyao
b0fcdccd5b fix(isp_awb): fixed continuous mode only triggered once 2024-06-24 10:49:20 +08:00
laokaiyao
4b3e014076 docs(isp_awb): add isp awb programming guide 2024-06-24 10:49:20 +08:00
laokaiyao
8c225c0200 feat(isp_awb): support isp auto white balance 2024-06-24 10:49:20 +08:00
laokaiyao
4b08ddb0f3 feat(hal_utils): added float to fixed point function 2024-06-24 10:49:20 +08:00
cjin
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
Marius Vikhammer
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
Jakob Hasse
357e0f9bf1 docs(esp_hw_support): Adjusted RNG docs to reflect P4 changes 2024-06-21 09:58:08 +02:00
Jiang Jiang Jian
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
Marius Vikhammer
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
Shyamal Khachane
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
Konstantin Kondrashov
14d93dea75 feat(soc): Update efuse related soc_caps for c61 and c5 (MP/beta3) 2024-06-20 12:23:05 +08:00
Marius Vikhammer
7e5ab45fbb ci(rom): disable rom wdt test on C5 2024-06-20 12:22:56 +08:00
morris
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
Island
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
zhangshuxian
786b68743b docs: Delete user guide esp32-s2-devkitm-1 2024-06-19 18:09:09 +08:00
sonika.rathi
dbe5a59412 docs(storage): update esp32p4 storage programming guide 2024-06-19 10:44:58 +02:00
LonerDan
fbd6c9737e fix(ulp-risc-v): Set RTC GPIO output mode in the correct register for ULP RISC-V
According to the ESP32-S2/S3 TRM, the output pin's mode is set in the RTC_GPIO_PINn_REG
by programming the RTC_GPIO_PINn_PAD_DRIVER bit. The current ULP RISC-V RTCIO driver
however, incorrectly programs the RTC_IO_TOUCH_PADn_REG register field RTC_IO_TOUCH_PADn_DRV.
This commit fixes the bug.
2024-06-19 08:59:57 +02:00
Fu Hanxi
8a668d6c03 ci: disable failing esp32c5 builds 2024-06-18 08:27:00 +02:00
Rahul Tank
81b43829a2 fix(nimble): Clear resource before re-starting advertising 2024-06-18 11:11:29 +05:30
Chen Jichang
f3ebebb1dd fix(gptimer): re-enable test on P4
Remove timer_get_counter_time_sec in the ISR. Keep ISR as fast as
possible and not allow FPU usage.
2024-06-17 15:03:56 +08:00
Sudeep Mohanty
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
Mohammad-Mohsen Aseman-Manzar
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
Roland Dobai
04cf7d1230 fix(tools/idf_tools.py): Improve the warning message about the environment 2024-06-14 10:01:05 +02:00
Guillaume Souchere
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
Guillaume Souchere
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
Guillaume Souchere
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
laokaiyao
f7faae7c2d fix(soc): fix the pms reg headers base addr 2024-06-14 12:55:03 +08:00
Sachin Billore
5869850af2 feat: add esp32p4 APM HAL/LL API 2024-06-14 12:55:03 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
yinqingzhao
ce145a2c92 fix(wifi):esp32c6 update ld 2024-06-13 20:18:59 +08:00
Li Shuai
a3a9624ca2 fix(esp_wifi): fix the issue of tbtt interrupt miss caused by beacon monitor 2024-06-13 20:17:11 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Ondrej Kosta
f1989b0dc1 docs(esp_eth): enabled Configure MAC and PHY section for P4 2024-06-13 13:53:37 +02:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
linruihao
aaf371027d fix(bt/controller): Fixed assert issue caused by DPORT access 2024-06-13 17:37:39 +08:00
Marius Vikhammer
171e0a21a1 fix(rom): fixed esprv_int_set_threshold on C5 2024-06-13 16:47:48 +08:00
zhanghaipeng
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
wuzhenghui
2ab144dc3a fix(esp_hw_support): set pau entry backup configuration with link update 2024-06-13 14:08:37 +08:00
wuzhenghui
1854036f92 change(esp_hw_support): use union retention link priority definiation 2024-06-13 14:08:37 +08:00
wuzhenghui
26cb10acbf feat(esp_hw_support): optimize retention link info dump 2024-06-13 14:08:36 +08:00
Li Shuai
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
wuzhenghui
a641428941 fix(ci): use esp_rom_crc32_le in sleep retention frame check 2024-06-13 14:08:35 +08:00
wuzhenghui
d917f0fa1b ci(esp_driver_gptimer): add gptimer pd_top sleep retention test case 2024-06-13 14:08:35 +08:00
wuzhenghui
8093516420 ci(esp_system): add task watchdog pd_top sleep retention test case 2024-06-13 14:08:35 +08:00
wuzhenghui
3785506ec1 change(esp_driver_gptimer): do gptimer timer target retention by needs 2024-06-13 14:08:34 +08:00
wuzhenghui
ea142bb6d1 change(esp_hw_support): do timergroup watchdogs retention by needs 2024-06-13 14:08:26 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
aditi_lonkar
3ccffd46f1 fix(esp_wifi): Fix for issue in changing opmode when wps is enabled 2024-06-13 11:51:25 +08:00
wangtao@espressif.com
c4bda59c31 fix(wifi): fix sta scan when connected cause bcn timeout loop issue 2024-06-13 11:50:45 +08:00
muhaidong
c3a47bf365 fix(wifi): fix configure gcmp failure issue 2024-06-13 11:50:01 +08:00
zhangyanjiao
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
muhaidong
3b0e048f0e fix(wifi): fixed disable gcmp choose pairwise cipher wrong issue 2024-06-13 11:48:27 +08:00
yinqingzhao
bbf0d76ac3 fix(wifi):fix data len not correct in he actions 2024-06-13 11:47:52 +08:00
Armando
cb8670e2bc ci(flash): temp disable SOC_SPI_MEM_SUPPORT_WRAP 2024-06-13 11:26:35 +08:00
Armando
d83e7ea505 fix(esp_system): fixed not necessary public require to bootloader_support 2024-06-13 11:26:35 +08:00
morris
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
morris
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
Island
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
Aditya Patwardhan
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
zhiweijian
679df9ec6f feat(bt/nimble): support hci log for nimble 2024-06-12 19:24:36 +08:00
gaoxu
a326f15120 feat(adc): support ADC continuous mode on ESP32P4 2024-06-12 18:34:04 +08:00
gaoxu
cfc5da167d feat(soc): rename lp_adc and ahb_dma reg base on p4 2024-06-12 18:16:48 +08:00
gaoxu
e63d6582cc feat(adc): move adc periph enable/reset functions to ll layer 2024-06-12 18:16:45 +08:00
gaoxu
3f5037866b fix(dma): feat(adc): support ADC oneshot mod on ESP32P4 2024-06-12 18:16:41 +08:00
gaoxu
cf123b3626 feat(uart): support HP/LP uart on ESP32C5 MP v5.3 2024-06-12 18:15:22 +08:00
morris
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
morris
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
Ivan Grokhotkov
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
Ivan Grokhotkov
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
Song Ruo Jing
bbc44b486e feat(gdma): add GDMA support for ESP32C5 MP 2024-06-12 15:28:40 +08:00
Island
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
Island
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
Jiang Jiang Jian
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
morris
c349247236 refactor(emac): use heap component API to allocate cached aligned DMA buffer 2024-06-12 13:51:17 +08:00
morris
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
Dong Heng
de0990e58c feat(cam): add esp32-p4 lcd_cam dvp driver 2024-06-12 11:35:51 +08:00
Marius Vikhammer
f1df3eb99b docs(core): update misc docs for C5 2024-06-12 10:24:33 +08:00
morris
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
morris
8ae12473b5 refactor(i2s): clean up DMA buffer allocation 2024-06-12 10:16:24 +08:00
morris
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
Michael (XIAO Xufeng)
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
Michael (XIAO Xufeng)
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
Michael (XIAO Xufeng)
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
Michael (XIAO Xufeng)
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
Michael (XIAO Xufeng)
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
David Čermák
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
Song Ruo Jing
39d0f4b650 feat(ppa): add test cases to test PPA data correctness 2024-06-11 21:59:05 +08:00
Michael (XIAO Xufeng)
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
Michael (XIAO Xufeng)
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
Rahul Tank
32a2ddceaa fix(nimble): Added change to handle extra memory for ext adv reattempt 2024-06-11 17:43:32 +05:30
harshal.patil
8445486303 fix(soc): Cleanup inaccessible SHA registers from the header files 2024-06-11 14:24:09 +05:30
morris
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
Jakub Kocka
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
morris
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
morris
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
Island
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
harshal.patil
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
Armando
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
Xu Si Yu
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
Xu Si Yu
3860cc8dac feat(openthread): update openthread br lib 2024-06-11 14:25:01 +08:00
Xu Si Yu
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
morris
b8122ec6b3 refactor(async_memcpy): clean up memory allocation code 2024-06-11 13:54:31 +08:00
morris
b6bc597903 feat(i80_lcd): add help function to allocate draw buffer with proper alignment 2024-06-11 13:50:38 +08:00
morris
33ac88cd31 change(esp_lcd): split header files by different IO interface 2024-06-11 13:50:37 +08:00
morris
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
Island
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
Island
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
Island
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
Island
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
laokaiyao
cd4c71e20f fix(i2s): add the missed port2 for p4 2024-06-11 10:59:05 +08:00
laokaiyao
ab81888705 fix(i2s): add check to gdma callback register 2024-06-11 10:55:22 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Armando
dbccfbb2e7 change(isp): don't init unnecessary isp pipeline items when doing isp_new_processor 2024-06-11 10:18:16 +08:00
Armando
be9c4ebf44 fix(isp): reverted only raw8 input limits 2024-06-11 10:18:16 +08:00
Armando
de1d006ba3 change(isp): change isp_af_window_t to isp_window_t 2024-06-11 10:18:16 +08:00
Armando
f58b63d31e test(isp_dvp): added isp_dvp test 2024-06-11 10:18:16 +08:00
Armando
9713bd63a4 fix(csi): fixed csi wrong state machine settings 2024-06-11 10:18:16 +08:00
Armando
05f44bddf0 feat(isp): added isp dvp driver 2024-06-11 10:18:16 +08:00
morris
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
Marius Vikhammer
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
Marius Vikhammer
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
Marius Vikhammer
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
Marius Vikhammer
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
Marius Vikhammer
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
Michael (XIAO Xufeng)
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
Tomáš Rohlínek
c23dbefd45 fix(storage/vfs_console): remove possible infinite recursion 2024-06-10 16:07:49 +02:00
Michael (XIAO Xufeng)
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
C.S.M
fccc309499 fix(jpeg): Modify jpeg deocde/encode error handling logic (backport v5.3) 2024-06-10 03:28:52 +08:00
Michael (XIAO Xufeng)
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
Darian Leung
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
Darian Leung
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
Darian Leung
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
morris
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
morris
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
morris
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
morris
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
morris
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
morris
5d844e57ed change(rgb_lcd): set DMA transfer burst size 2024-06-07 22:44:18 +08:00
morris
b2ff20d94c change(i80_lcd): set DMA transfer burst size 2024-06-07 22:44:18 +08:00
morris
e8852d5c38 change(async_memcpy): set DMA transfer burst size 2024-06-07 22:44:18 +08:00
morris
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
Ondrej Kosta
09cbbaaf7c fix(esp_eth): Fixed another memory leak ESP MAC 2024-06-07 15:26:18 +02:00
Ondrej Kosta
dab7fdd6f0 fix(esp_eth): fixing memory leak and invalid bit shift 2024-06-07 15:26:18 +02:00
Ondrej Kosta
d6b3b8feeb feat(esp_eth): added example to deinit Ethernet 2024-06-07 15:26:18 +02:00
Ondrej Kosta
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
Aditya Patwardhan
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
Aditya Patwardhan
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
wuzhenghui
6a86351373 fix(hal): fix PMU LL half word and byte access 2024-06-07 14:13:40 +08:00
wuzhenghui
e5429b256a fix(hal): fix LP timer LL half word access 2024-06-07 14:13:39 +08:00
C.S.M
4daaa9c587 fix(bod): Disable fib in bootloader so that interrupt can be triggered properly 2024-06-07 10:38:14 +08:00
wuzhenghui
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
Ivan Grokhotkov
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
Anton Maklakov
6e7a9de65e fix(blink): fix sdkconfig defaults name 2024-06-05 16:30:23 +07:00
gongyantao
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
Alexey Lapshin
b07a1470c5 feat(tools): update toolchain version to esp-13.2.0_20240530 2024-06-04 18:35:17 +04:00
Abhinav Kudnar
737b5edd5b fix(nimble): Added return code in ble_gap_unpair error logs 2024-06-04 14:46:13 +05:30
laokaiyao
d9f9f79270 fix(kconfig): fixed peripheral driver kconfig inconsistencies 2024-06-04 10:19:31 +08:00
Marius Vikhammer
a6c2c4149d fix(intr): fixed intr threshhold min level on C5 2024-06-03 12:44:32 +08:00
Marius Vikhammer
fe32b34b20 docs(links): fix broken links found in CI 2024-06-03 12:42:25 +08:00
Jiang Jiang Jian
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
zhanghaipeng
1542b768fd fix(ble/bluedroid): Optimize BLE stack connect callback name 2024-06-02 17:36:35 +08:00
zhanghaipeng
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
Sarvesh Bodakhe
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
wangtao@espressif.com
63f019565b fix(wifi): fix send mgmt err when eapol process 2024-05-31 13:50:12 +08:00
wuzhenghui
3a5ba85419 docs(lowpower): updating low-power statistics in Wi-Fi scenarios 2024-05-30 21:54:32 +08:00
luoxu
a168f4cc9b fix(ble_mesh): fix issues in mesh deinit 2024-05-30 20:37:31 +08:00
Jeroen Domburg
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
Song Ruo Jing
8800e9d0e5 fix(gpio): fix IO 21-27 IOMUX registers not being backed up on ESP32H2 2024-05-30 15:13:58 +08:00
Marius Vikhammer
2f1b81cd14 feat(ulp): add pulse counter example for lp core 2024-05-30 14:41:47 +08:00
Marius Vikhammer
87d4172ee5 feat(ulp): add lp core panic handler 2024-05-30 14:41:31 +08:00
Marius Vikhammer
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
Marius Vikhammer
3d959421b1 docs(doxygen): fix misc issues with new version of doxygen 2024-05-30 13:42:06 +08:00
Li Shuai
52a922f953 fix(wifi): fixed the issue of tg0 watchdog reset caused by wifi module retention 2024-05-29 20:50:53 +08:00
David Cermak
baf6028974 fix(docs): tcpip_adapter: Document replacement of tcpip_adapter_get_sta_list 2024-05-29 13:44:26 +02:00
Alexey Gerenkov
60c2068fef docs(app_trace): Update docs for ESP32-P4 2024-05-29 14:31:34 +03:00
Song Ruo Jing
10f89fe52e fix(ppa): fix mismatching writeback and invalidate data size on the same buffer 2024-05-29 14:35:26 +08:00
morris
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
morris
1129f0834e fix(dsi): fixed wrong RGB666 pixel size 2024-05-29 12:32:03 +08:00
Armando
58ebdb7ae3 change(image): move image_process driver from bootloader_support to esp_system 2024-05-29 10:02:44 +08:00
Armando
48e06fafea feat(xip_psram): support xip psram feature on esp32p4 2024-05-29 10:02:44 +08:00
Wang Fang
6bb35c551c docs: Updated Getting Started for ESP32-P4 support 2024-05-28 11:52:06 +08:00
gaoxu
0be44b6ccc feat(gpio): fix gpio matrix const input addr on C5 MP 2024-05-27 18:13:58 +08:00
gaoxu
bf604e91a6 feat(gpio): remove io_mux_reg array in gpio_periph.c from c5 2024-05-27 18:13:42 +08:00
laokaiyao
dcc7cf9379 feat(parlio_rx): support parlio rx on p4 2024-05-27 17:20:15 +08:00
C.S.M
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
C.S.M
91cedfe89d feat(brownout): Add brownout detector support on esp32p4 2024-05-27 16:40:45 +08:00
wanlei
0d94b1cd89 fix(spi_master): fix sct mode descripter oob when data lager then 4092 bytes 2024-05-27 15:01:38 +08:00
Song Ruo Jing
1b1005a1d8 feat(ppa): add PPA driver support for ESP32P4 2024-05-27 11:34:47 +08:00
Xiao Xufeng
096db7521b feat(sdmmc_io): support sending CMD53 with fixed address 2024-05-24 20:27:57 +08:00
Armando
cc48efc6ec feat(isp): added isp bf driver 2024-05-24 16:46:00 +08:00
WanqQixiang
88b300d064 fix(esp_netif): Fix mldv6 report memory leak in esp_netif 2024-05-24 15:33:55 +08:00
Armando
f9b58b0c73 change(mmu): fix spell issue 2024-05-23 15:42:04 +08:00
luoxu
3a7aafe7d6 fix(ble_mesh): change tx/rx lock to recursive mutex to avoid dead lock 2024-05-23 15:41:58 +08:00
luoxu
e23d24a65d fix(ble_mesh): reference net_buf on correct positions 2024-05-23 15:41:58 +08:00
Armando
687064b2f8 change(cpu_start): added note about internal ram only stage 2024-05-23 15:41:35 +08:00
Armando
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
Armando
8e66d38959 refactor(cpu_start): move uni/multi core log later 2024-05-23 15:41:25 +08:00
Roland Dobai
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
luoxu
2c96e097c9 fix(ble_mesh): Create service after service register success 2024-05-23 12:16:46 +08:00
Adam Múdry
f3b7e0502a ci(examples/storage): Enable perf_benchmark spiflash example and build others 2024-05-22 17:00:53 +02:00
Adam Múdry
2f10ca582b fix(storage): Fix SD card examples for SoCs with SOC_SDMMC_IO_POWER_EXTERNAL 1 2024-05-22 17:00:53 +02:00
Omar Chebib
0928ff027b fix(riscv): make HWLP feature use direct saving of lazy saving 2024-05-22 16:58:31 +08:00
Omar Chebib
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
nilesh.kale
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
Erhan Kurubas
0f96e51146 ci(coredump): fix capture dram tests 2024-05-22 06:25:04 +02:00
Wang Fang
52b36a60f4 Update CN translation for coredump 2024-05-22 06:25:04 +02:00
Erhan Kurubas
617f5a7052 feat(coredump): save .bss, .data and .heap sections to the elf file 2024-05-22 06:25:01 +02:00
baohongde
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
chenjianhua
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
chaijie@espressif.com
b8d9da5c03 feat(sleep): support 8m force pu in sleep for esp32c6/esp32h2 2024-05-22 11:35:00 +08:00
chenjianhua
52b9c5d666 feat(bt/bluedroid): support BLE set privacy mode 2024-05-22 10:43:37 +08:00
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Li Shuai
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
morris
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
liuning
1bf9c822f9 feat(wifi): support coex pwr 2024-05-21 20:57:46 +08:00
wangtao@espressif.com
bb466097e5 feat(wifi): add softap csa&dtim&wait_bcast_data setting and ignore err nodata 2024-05-21 20:57:06 +08:00
wuzhenghui
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
wuzhenghui
d91dfe3510 change(esp_hw_support/sleep): improve esp32c3 systimer stall bug workaround 2024-05-21 20:30:24 +08:00
Li Shuai
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
gaoxu
ce7ceb8d9d feat(csi): add verify to no backup buffer usage 2024-05-21 15:36:34 +08:00
morris
5ec85c0bfd feat(axi_icm): AXI interconnect QoS configuration functions 2024-05-21 14:38:34 +08:00
igor.udot
7c49b1da55 ci: add 5.3 known failed cases filename 2024-05-21 14:01:08 +08:00
Island
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
Suren Gabrielyan
a3d77114b6 fix(ws_transport): utility functions minor improvments 2024-05-20 17:54:43 +04:00
Richard Allen
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Alexey Lapshin
89218b35e4 fix(system): place idf's stray sections while linking 2024-05-20 13:31:04 +04:00
Marius Vikhammer
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
shenmengjing
9e74564ba5 docs: Update the CN Translation for ram-usage and speed 2024-05-20 09:34:12 +02:00
Xiaoyu Liu
9ebc8f02a9 feat(system/console): Added argtable3 SBOM manifest file in console component for SPDX file generation 2024-05-20 15:04:27 +08:00
Lou Tianhao
7b10c2421f fix(esp_system): fix core1 access cache when core0 close cache during sleep 2024-05-20 15:01:08 +08:00
harshal.patil
0c5bce6918 fix(bootloader_support): Make esp_flash_encrypt.h independent of spi_flash_mmap.h header 2024-05-20 14:40:49 +08:00
harshal.patil
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
wuzhenghui
64c062047f fix(esp_hw_support): invalidate L1DCache before enter hardware sleep 2024-05-20 14:02:04 +08:00
wuzhenghui
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
wuzhenghui
c97ab134ef ci(esp_pm): add pd_top auto lightsleep test case for esp_pm 2024-05-20 14:01:00 +08:00
wuzhenghui
5899701b68 feat(esp_pm): fix esp32p4 cpu powerdown kconfig dependency error 2024-05-20 14:01:00 +08:00
Marius Vikhammer
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Harshit Malpani
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
Harshit Malpani
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
Mahavir Jain
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
Mahavir Jain
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
Marius Vikhammer
f3a73cbce3 docs(sys-time): update link to hw design guidelines 2024-05-20 12:16:19 +08:00
Marius Vikhammer
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
Marius Vikhammer
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
Marius Vikhammer
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
Marius Vikhammer
e53ca8e018 fix(lp_core_test): fixed race-condition in lp core tests 2024-05-20 11:59:10 +08:00
muhaidong
68be49d2cf fix(wifi): fixed scan get ap number issue 2024-05-20 11:58:16 +08:00
Chen Yudong
686878497e docs: update wifi iperf README 2024-05-20 11:56:44 +08:00
zhangyanjiao
c046d87561 docs(wifi): update the docmentation for mesh API 2024-05-20 11:55:27 +08:00
Sarvesh Bodakhe
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
xuxiao
e11f030427 feat(wifi): add itwt teardown status 2024-05-20 11:49:54 +08:00
yinqingzhao
beebbada64 fix(wifi):esp32c6 wifi rx statistics is always zero 2024-05-20 11:47:43 +08:00
yinqingzhao
6da7a46bfa fix(bss_color):fix bss color issues 2024-05-20 11:46:50 +08:00
liuning
d2551d6e4b fix(wifi): fix esp32 unrecoverable m f issue 2024-05-20 11:46:08 +08:00
zhangyanjiao
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
Shyamal Khachane
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
Nachiket Kukade
02c2356cb1 fix(esp_wifi): Fix issue in selecting FTM compensation with external AP 2024-05-20 11:43:18 +08:00
zhangyanjiao
8639f69ed7 fix(wifi): fix the tx issue when mesh packet lifetime remain equal to zero 2024-05-20 11:42:34 +08:00
morris
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
Jiang Jiang Jian
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
Michael (XIAO Xufeng)
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
Mahavir Jain
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
Mahavir Jain
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
Mahavir Jain
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
Michael (XIAO Xufeng)
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
Michael (XIAO Xufeng)
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
Michael (XIAO Xufeng)
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
Mahavir Jain
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
Aditya Patwardhan
3640c1ecba fix(bootloader_support): Fix flash encryption for esp32p4 2024-05-17 21:19:14 +05:30
Darian Leung
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
Darian Leung
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
Armando
5f07f64802 example(isp): added isp af example 2024-05-17 15:29:17 +08:00
Armando
e4f1c01197 fix(csi): fixed wrong assert when there's new transaction 2024-05-17 15:26:58 +08:00
Armando
2ed780b686 fix(isp): fixed af environment detector lack of configuration issue 2024-05-17 15:26:46 +08:00
Armando
a9383cb433 example(camera): added new camera dsi example 2024-05-17 15:26:39 +08:00
Erhan Kurubas
5e817df25f fix(coredump): don't allow mapping of non-encrypted coredump partition 2024-05-16 21:31:40 +02:00
Erhan Kurubas
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
gaoxu
7403b8d68d feat(rom): update c5 mp verison rom ld file 2024-05-16 15:03:21 +08:00
gaoxu
f27e117b5b feat(gpio): update gpio docs on ESP32C5 MP version 2024-05-16 15:02:55 +08:00
gaoxu
a621402e1f feat(pm): add SOC_PM_SUPPORTED in soc caps 2024-05-16 15:00:22 +08:00
gaoxu
a08558a853 feat(coredump): replace fun sel function 2024-05-16 14:58:52 +08:00
gaoxu
2cad39aee5 feat(gpio): add gpio support on ESP32C5 MP version 2024-05-16 14:54:27 +08:00
wangning
173bb82f45 docs(esp32c3): Added missing USB functions to esp32-c3 devkit user guides 2024-05-16 10:56:53 +08:00
Armando
8472467721 fix(isp): updated to only support input data type as raw8 2024-05-16 10:40:26 +08:00
Rahul Tank
2f6fb59b6b docs(nimble): Added chip information in ble_enc_adv README file 2024-05-15 15:35:33 +05:30
Marius Vikhammer
f324e75c64 fix(interrupt): fixed interrupt thresholds not working on C5 2024-05-15 16:02:48 +08:00
Marius Vikhammer
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
Harshit Malpani
24e5e3aef1 feat: Enable app_update test app for ESP32P4 2024-05-14 10:27:32 +05:30
Jin Cheng
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
gongyantao
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
Sudeep Mohanty
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
Erhan Kurubas
b400a8cd72 change(gdbinit): set remote timeout for the gdb connection 2024-05-13 13:34:13 +02:00
C.S.M
4dc565b7d0 feature(usb_serial_jtag): add usb serial jtag support for esp32p4 2024-05-13 12:19:14 +08:00
Xiao Xufeng
cbcd346171 feat(esp32p4): add eco1 revision config option 2024-05-11 11:46:08 +08:00
chaijie@espressif.com
f1d1dfd1ef feat(esp32p4_eco1): modify cpll and spll config 2024-05-11 11:43:24 +08:00
laokaiyao
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
Fu Hanxi
4e850f158e ci: move log dir from pytest_embedded_log to pytest-embedded 2024-05-10 10:29:21 +02:00
Marius Vikhammer
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
Jiang Jiang Jian
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
Jiang Jiang Jian
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
Rahul Tank
89a612aea0 fix(nimble): Free controller memory if init fails 2024-05-09 12:20:11 +05:30
Sarvesh Bodakhe
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
Mahavir Jain
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
liuning
4eacfd6ee1 update c3 s3 c6 libphy fix coex reset and bug 2024-05-09 11:57:56 +08:00
xiongweichao
9eb61ef5a7 docs: Update the process of Bluetooth entering sleep in the sleep_modes.rst 2024-05-09 11:01:31 +08:00
morris
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
Roland Dobai
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
Frantisek Hrbata
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
Frantisek Hrbata
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
Jiang Jiang Jian
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
morris
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
morris
b9f15ba3ab feat(mipi_dsi): round to boundary when draw pixel 2024-05-08 16:31:51 +08:00
Armando
d22f9a97aa change(camera): change esp_cam_del_ctlr to esp_cam_ctlr_del 2024-05-08 15:29:20 +08:00
Li Shuai
90188040fb fix(esp_wifi): clear soc wakeup request signal at tbtt process 2024-05-08 13:44:54 +08:00
Sarvesh Bodakhe
ea1a10da17 fix(wifi): Fix issue in scan when AP advertises WPA and WPA2 with SAE AKM 2024-05-08 13:44:51 +08:00
Nachiket Kukade
7c54373146 feat(esp_wifi): Update FTM PHY Compensation with calibration 2024-05-08 13:42:23 +08:00
xuxiao
209fbfc18b fix(wifi): fix trc_ampdu_stop_rateidx value errors when DUT under softap + sta mode 2024-05-08 13:42:10 +08:00
alanmaxwell
8545eeb4ef fix(wifi): clear wifi buffer to fix ampdu compatibility issue 2024-05-08 13:41:58 +08:00
xuxiao
a22d0df155 fix(wifi): fix esp32c6 wdt issues when recv/send tcp packages 2024-05-08 13:41:36 +08:00
morris
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
Fu Hanxi
b8ed93eec0 ci: apply new fix in pytest-embedded 1.10 2024-05-07 12:17:10 +02:00
Fu Hanxi
840ec6579f ci: update mypy check for python 3.12, check under python 3.8 rules 2024-05-07 12:17:10 +02:00
wuzhenghui
7aed3eb3bc fix(esp_pm): fix esp_pm test cases high fail ratio 2024-05-07 17:08:28 +08:00
nilesh.kale
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
nilesh.kale
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
morris
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
nilesh.kale
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
Roland Dobai
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
Frantisek Hrbata
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
Cao Sen Miao
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
morris
a04f786380 test(gdma): can read data from flash rodata 2024-05-07 13:01:11 +08:00
morris
a6d8251366 feat(gdma): set default valid memory range for gdma 2024-05-07 13:00:39 +08:00
Alexey Lapshin
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
Alexey Lapshin
d42e894a74 fix(system): discard eh_frame sections if disabled in sdkconfig 2024-05-07 08:52:36 +04:00
Rahul Tank
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
Wang Meng Yang
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
Rahul Tank
a61a367bc4 fix(nimble): Deselect MBEDTLS_ECP_RESTARTABLE when mbedTLS is used 2024-05-06 15:17:57 +05:30
Marius Vikhammer
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
Jakob Hasse
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
Darian Leung
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
Jiang Jiang Jian
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
Mahavir Jain
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
Marius Vikhammer
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
morris
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
Aditya Patwardhan
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
Aditya Patwardhan
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
Jakob Hasse
b026a7c915 fix(linux): calling getrandom() outside assert()
* Expressions inside assert are completely removed in release builds
2024-05-02 16:56:39 +02:00
Mahavir Jain
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
Mahavir Jain
60ab9631d7 fix(tests): remove unused partition NVS bin file 2024-05-02 16:48:54 +05:30
liqigan
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
morris
df211933ff fix(mipi_dsi): only wait ready for enabled data lane 2024-04-30 16:46:03 +08:00
Mahavir Jain
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
wuzhenghui
ccca8b74eb fix(esp_system): increase 26Mhz esp32c2 slow clock calibration timeout watchdog threshold 2024-04-30 11:48:42 +08:00
Marius Vikhammer
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
Marius Vikhammer
0ee7d4d17a docs(programming-guide): clean up misc leftover doc updates for P4 2024-04-30 09:46:25 +08:00
laokaiyao
a246aa2973 fix(soc): fixed redefined soc reg names on P4 2024-04-29 19:33:04 +08:00
Roland Dobai
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
Roland Dobai
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
Roland Dobai
ddc357fcca change(docs): Update checked tools doc pages for ESP32-P4 programming guide 2024-04-29 09:54:00 +02:00
Roland Dobai
6a5ab20489 ci(tools): Fix IDF_MIRROR_PREFIX_MAP for including all tools from local 2024-04-29 09:00:55 +02:00
Island
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
zhanghaipeng
212f316f24 feat(ble/bluedroid): Support BLE command status debug log 2024-04-26 17:13:39 +08:00
zhanghaipeng
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
morris
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
Marius Vikhammer
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
morris
49aaac0013 feat(mipi_dsi): support isr iram safe 2024-04-26 10:41:04 +08:00
morris
d910ca7fa8 feat(mipi_dsi): add pm lock for clock source 2024-04-26 10:41:04 +08:00
morris
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
igor.udot
5b3996885c ci: quote spec character in url 2024-04-25 18:35:56 +08:00
Ivan Grokhotkov
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
morris
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
Fu Hanxi
3386c594b4 ci: fix size.json path for app 2024-04-25 08:49:16 +02:00
Guillaume Souchere
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
morris
4fb58d56b4 change(gdma): improve the test cases to be target agnostic 2024-04-25 11:07:16 +08:00
Song Ruo Jing
665883229e fix(gpio_etm): allow one GPIO binds to multiple ETM tasks 2024-04-24 15:58:49 +08:00
Karl Palsson
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
Rahul Tank
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
Darian Leung
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
Richard Allen
ebe1141b25 docs: clarify ESP_RETURN_ON_ERROR result 2024-04-23 14:49:47 +08:00
Rahul Tank
cb5bc35f2e fix(nimble): Expose API to set RPA Timeout 2024-04-23 11:22:21 +05:30
Jiang Jiang Jian
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
Ivan Grokhotkov
f1b9b357e4 change(gitlab): simplify approvals for backports (v5.3) 2024-04-23 01:33:44 +02:00
Adam Múdry
3af63dcf4a fix(storage/littlefs): Bump version to v1.14.4 (core v2.9.1)
Fixes a bug which causes DivideByZero exception when the filesystem is full
2024-04-19 12:54:26 +02:00
14873 changed files with 1251570 additions and 2581300 deletions

View File

@@ -1,4 +1,4 @@
[codespell]
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem,*/COPYING*,docs/sphinx-known-warnings.txt
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen,parms
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,wheight,ot,wel,parms,ehen
write-changes = true

165
.flake8 Normal file
View File

@@ -0,0 +1,165 @@
[flake8]
select =
# Full lists are given in order to suppress all errors from other plugins
# Full list of pyflakes error codes:
F401, # module imported but unused
F402, # import module from line N shadowed by loop variable
F403, # 'from module import *' used; unable to detect undefined names
F404, # future import(s) name after other statements
F405, # name may be undefined, or defined from star imports: module
F406, # 'from module import *' only allowed at module level
F407, # an undefined __future__ feature name was imported
F601, # dictionary key name repeated with different values
F602, # dictionary key variable name repeated with different values
F621, # too many expressions in an assignment with star-unpacking
F622, # two or more starred expressions in an assignment (a, *b, *c = d)
F631, # assertion test is a tuple, which are always True
F701, # a break statement outside of a while or for loop
F702, # a continue statement outside of a while or for loop
F703, # a continue statement in a finally block in a loop
F704, # a yield or yield from statement outside of a function
F705, # a return statement with arguments inside a generator
F706, # a return statement outside of a function/method
F707, # an except: block as not the last exception handler
F721, F722, # doctest syntax error syntax error in forward type annotation
F811, # redefinition of unused name from line N
F812, # list comprehension redefines name from line N
F821, # undefined name name
F822, # undefined name name in __all__
F823, # local variable name referenced before assignment
F831, # duplicate argument name in function definition
F841, # local variable name is assigned to but never used
F901, # raise NotImplemented should be raise NotImplementedError
# Full list of pycodestyle violations:
E101, # indentation contains mixed spaces and tabs
E111, # indentation is not a multiple of four
E112, # expected an indented block
E113, # unexpected indentation
E114, # indentation is not a multiple of four (comment)
E115, # expected an indented block (comment)
E116, # unexpected indentation (comment)
E121, # continuation line under-indented for hanging indent
E122, # continuation line missing indentation or outdented
E123, # closing bracket does not match indentation of opening bracket's line
E124, # closing bracket does not match visual indentation
E125, # continuation line with same indent as next logical line
E126, # continuation line over-indented for hanging indent
E127, # continuation line over-indented for visual indent
E128, # continuation line under-indented for visual indent
E129, # visually indented line with same indent as next logical line
E131, # continuation line unaligned for hanging indent
E133, # closing bracket is missing indentation
E201, # whitespace after '('
E202, # whitespace before ')'
E203, # whitespace before ':'
E211, # whitespace before '('
E221, # multiple spaces before operator
E222, # multiple spaces after operator
E223, # tab before operator
E224, # tab after operator
E225, # missing whitespace around operator
E226, # missing whitespace around arithmetic operator
E227, # missing whitespace around bitwise or shift operator
E228, # missing whitespace around modulo operator
E231, # missing whitespace after ',', ';', or ':'
E241, # multiple spaces after ','
E242, # tab after ','
E251, # unexpected spaces around keyword / parameter equals
E261, # at least two spaces before inline comment
E262, # inline comment should start with '# '
E265, # block comment should start with '# '
E266, # too many leading '#' for block comment
E271, # multiple spaces after keyword
E272, # multiple spaces before keyword
E273, # tab after keyword
E274, # tab before keyword
E275, # missing whitespace after keyword
E301, # expected 1 blank line, found 0
E302, # expected 2 blank lines, found 0
E303, # too many blank lines
E304, # blank lines found after function decorator
E305, # expected 2 blank lines after end of function or class
E306, # expected 1 blank line before a nested definition
E401, # multiple imports on one line
E402, # module level import not at top of file
E501, # line too long (82 > 79 characters)
E502, # the backslash is redundant between brackets
E701, # multiple statements on one line (colon)
E702, # multiple statements on one line (semicolon)
E703, # statement ends with a semicolon
E704, # multiple statements on one line (def)
E711, # comparison to None should be 'if cond is None:'
E712, # comparison to True should be 'if cond is True:' or 'if cond:'
E713, # test for membership should be 'not in'
E714, # test for object identity should be 'is not'
E721, # do not compare types, use 'isinstance()'
E722, # do not use bare except, specify exception instead
E731, # do not assign a lambda expression, use a def
E741, # do not use variables named 'l', 'O', or 'I'
E742, # do not define classes named 'l', 'O', or 'I'
E743, # do not define functions named 'l', 'O', or 'I'
E901, # SyntaxError or IndentationError
E902, # IOError
W191, # indentation contains tabs
W291, # trailing whitespace
W292, # no newline at end of file
W293, # blank line contains whitespace
W391, # blank line at end of file
W503, # line break before binary operator
W504, # line break after binary operator
W505, # doc line too long (82 > 79 characters)
W601, # .has_key() is deprecated, use 'in'
W602, # deprecated form of raising exception
W603, # '<>' is deprecated, use '!='
W604, # backticks are deprecated, use 'repr()'
W605, # invalid escape sequence 'x'
W606, # 'async' and 'await' are reserved keywords starting with Python 3.7
# Full list of flake8 violations
E999, # failed to compile a file into an Abstract Syntax Tree for the plugins that require it
# Full list of mccabe violations
C901 # complexity value provided by the user
ignore =
E221, # multiple spaces before operator
E231, # missing whitespace after ',', ';', or ':'
E241, # multiple spaces after ','
W503, # line break before binary operator
W504 # line break after binary operator
max-line-length = 160
show_source = True
statistics = True
exclude =
.git,
__pycache__,
# submodules
components/bootloader/subproject/components/micro-ecc/micro-ecc,
components/bt/host/nimble/nimble,
components/cmock/CMock,
components/json/cJSON,
components/mbedtls/mbedtls,
components/openthread/openthread,
components/unity/unity,
components/spiffs/spiffs,
# autogenerated scripts
components/protocomm/python/constants_pb2.py,
components/protocomm/python/sec0_pb2.py,
components/protocomm/python/sec1_pb2.py,
components/protocomm/python/sec2_pb2.py,
components/protocomm/python/session_pb2.py,
components/wifi_provisioning/python/wifi_ctrl_pb2.py,
components/wifi_provisioning/python/wifi_scan_pb2.py,
components/wifi_provisioning/python/wifi_config_pb2.py,
components/wifi_provisioning/python/wifi_constants_pb2.py,
components/esp_local_ctrl/python/esp_local_ctrl_pb2.py,
per-file-ignores =
# Sphinx conf.py files use star imports to setup config variables
docs/conf_common.py: F405

View File

@@ -95,26 +95,6 @@ body:
render: plain
validations:
required: false
- type: textarea
id: diag
attributes:
label: Diagnostic report archive.
description: |
Diagnostic report for ESP-IDF created using [idf.py diag](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-diag.html) or [esp-idf-diag](https://github.com/espressif/esp-idf-diag). The `idf.py diag` command is available beginning with ESP-IDF version 5.5. For older versions, you may want to consider using the `esp-idf-diag` command.
In your project directory, execute the following command:
Using `idf.py diag`
1. idf.py diag
Using `esp-idf-diag`
1. pip install esp-idf-diag
2. esp-idf-diag create
Once the report is generated, the tool will guide you with the next steps.
placeholder: Please attach the diagnostic report zip file here.
validations:
required: false
- type: textarea
id: more-info
attributes:

View File

@@ -26,7 +26,7 @@ body:
id: chip_revision
attributes:
label: Espressif SoC revision.
description: On which Espressif SoC revision does your application run on? Run `esptool chip-id` (or `esptool.py chip_id` for ESP-IDF v5.5 and older) to find it.
description: On which Espressif SoC revision does your application run on? Run `esptool chip_id` to find it.
placeholder: ex. ESP32-C3 (QFN32) (revision v0.3)
validations:
required: true
@@ -123,26 +123,6 @@ body:
render: plain
validations:
required: false
- type: textarea
id: diag
attributes:
label: Diagnostic report archive.
description: |
Diagnostic report for ESP-IDF created using [idf.py diag](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-diag.html) or [esp-idf-diag](https://github.com/espressif/esp-idf-diag). The `idf.py diag` command is available beginning with ESP-IDF version 5.5. For older versions, you may want to consider using the `esp-idf-diag` command.
In your project directory, execute the following command:
Using `idf.py diag`
1. idf.py diag
Using `esp-idf-diag`
1. pip install esp-idf-diag
2. esp-idf-diag create
Once the report is generated, the tool will guide you with the next steps.
placeholder: Please attach the diagnostic report zip file here.
validations:
required: false
- type: textarea
id: more-info
attributes:

View File

@@ -21,7 +21,7 @@ jobs:
# Disable the job in forks
if: ${{ github.repository_owner == 'espressif' }}
runs-on: ubuntu-24.04-X64-large
runs-on: ubuntu-latest
steps:
# Depending on the branch/tag, set CLONE_BRANCH_OR_TAG variable (used in the Dockerfile
# as a build arg) and TAG_NAME (used when tagging the image).
@@ -60,7 +60,9 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU for multiarch builds
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push

View File

@@ -14,11 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Sync issue comments to JIRA
uses: espressif/sync-jira-actions@v1
uses: espressif/github-actions/sync_issues_to_jira@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_PASS: ${{ secrets.JIRA_PASS }}
JIRA_PROJECT: IDFGH
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}
WEBHOOK_URL: ${{ secrets.JIRA_ISSUE_COMMENT_WEBHOOK_URL }}

View File

@@ -14,11 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Sync GitHub issues to Jira project
uses: espressif/sync-jira-actions@v1
uses: espressif/github-actions/sync_issues_to_jira@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_PASS: ${{ secrets.JIRA_PASS }}
JIRA_PROJECT: IDFGH
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}
WEBHOOK_URL: ${{ secrets.JIRA_ISSUE_COMMENT_WEBHOOK_URL }}

View File

@@ -23,7 +23,7 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@master
with:
python-version: "3.10"
python-version: v3.8
- name: Install python packages
run: |
pip install pre-commit
@@ -40,5 +40,3 @@ jobs:
echo ""
exit 1
fi
# Run pre-commit for PowerShell scripts check
pre-commit run --hook-stage manual check-powershell-scripts --from-ref base_ref --to-ref pr_ref --show-diff-on-failure

View File

@@ -8,11 +8,10 @@ on:
jobs:
release_zips:
name: Create release zip file
runs-on: ubuntu-24.04
runs-on: ubuntu-20.04
steps:
- name: Create a recursive clone source zip
uses: espressif/release-zips-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_project_name: ESP-IDF
git_extra_args: --shallow-since="1 year ago"
uses: espressif/github-actions/release_zips@master
env:
RELEASE_PROJECT_NAME: ESP-IDF
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -27,7 +27,6 @@ jobs:
- name: Vulnerability scan
env:
SBOM_CHECK_LOCAL_DB: ${{ vars.SBOM_CHECK_LOCAL_DB }}
SBOM_MATTERMOST_WEBHOOK: ${{ secrets.SBOM_MATTERMOST_WEBHOOK }}
NVDAPIKEY: ${{ secrets.NVDAPIKEY }}
uses: espressif/esp-idf-sbom-action@master

5
.gitignore vendored
View File

@@ -37,7 +37,6 @@ components/**/build/
components/**/build_*_*/
components/**/sdkconfig
components/**/sdkconfig.old
components/**/test_apps/wifi_nvs_config/nvs_data_suffix.csv
# Example project files
examples/**/build/
@@ -66,6 +65,8 @@ build_summary_*.xml
coverage.info
coverage_report/
test_multi_heap_host
# VS Code Settings
.vscode/
@@ -98,7 +99,7 @@ managed_components
pytest-embedded/
# legacy one
pytest_embedded_log/
app_info_*.txt
list_job*.txt
size_info*.txt
XUNIT_RESULT*.xml
.manifest_sha

View File

@@ -3,30 +3,31 @@ workflow:
# Disable those non-protected push triggered pipelines
- if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && $CI_PIPELINE_SOURCE == "push"'
when: never
# merged result pipelines
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
# when running merged result pipelines, CI_COMMIT_SHA represents the temp commit it created.
# Please use PIPELINE_COMMIT_SHA at all places that require a commit sha of the original commit.
- if: $CI_OPEN_MERGE_REQUESTS != null
variables:
PIPELINE_COMMIT_SHA: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
# else
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA == null || $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA == ""
IS_MR_PIPELINE: 1
- if: $CI_OPEN_MERGE_REQUESTS == null
variables:
PIPELINE_COMMIT_SHA: $CI_COMMIT_SHA
IS_MR_PIPELINE: 0
- when: always
# Place the default settings in `.gitlab/ci/common.yml` instead
include:
- ".gitlab/ci/danger.yml"
- ".gitlab/ci/common.yml"
- ".gitlab/ci/rules.yml"
- ".gitlab/ci/upload_cache.yml"
- ".gitlab/ci/docs.yml"
- ".gitlab/ci/static-code-analysis.yml"
- ".gitlab/ci/pre_commit.yml"
- ".gitlab/ci/pre_check.yml"
- ".gitlab/ci/build.yml"
- ".gitlab/ci/integration_test.yml"
- ".gitlab/ci/host-test.yml"
- ".gitlab/ci/deploy.yml"
- ".gitlab/ci/post_deploy.yml"
- ".gitlab/ci/test-win.yml"
- '.gitlab/ci/danger.yml'
- '.gitlab/ci/common.yml'
- '.gitlab/ci/rules.yml'
- '.gitlab/ci/upload_cache.yml'
- '.gitlab/ci/docs.yml'
- '.gitlab/ci/static-code-analysis.yml'
- '.gitlab/ci/pre_commit.yml'
- '.gitlab/ci/pre_check.yml'
- '.gitlab/ci/build.yml'
- '.gitlab/ci/integration_test.yml'
- '.gitlab/ci/host-test.yml'
- '.gitlab/ci/deploy.yml'
- '.gitlab/ci/test-win.yml'

View File

@@ -2,252 +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
/.idf_build_apps.toml @esp-idf-codeowners/ci
/.idf_ci.toml @esp-idf-codeowners/ci
/.pre-commit-config.yaml @esp-idf-codeowners/ci
/.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
/ROADMAP*.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
/ruff.toml @esp-idf-codeowners/tools
/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_blockdev/ @esp-idf-codeowners/storage
/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_hal_*/ @esp-idf-codeowners/peripherals
/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_hw_support/usb_phy/ @esp-idf-codeowners/peripherals/usb
/components/esp_lcd/ @esp-idf-codeowners/peripherals
/components/esp_libc/ @esp-idf-codeowners/system @esp-idf-codeowners/toolchain
/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
/components/esp_psram/system_layer/ @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_security/ @esp-idf-codeowners/security
/components/esp_stdio/ @esp-idf-codeowners/storage @esp-idf-codeowners/system
/components/esp_system/ @esp-idf-codeowners/system
/components/esp_tee/ @esp-idf-codeowners/security
/components/esp_timer/ @esp-idf-codeowners/system
/components/esp-tls/ @esp-idf-codeowners/app-utilities
/components/esp_trace/ @esp-idf-codeowners/debugging
/components/esp_usb_cdc_rom_console/ @esp-idf-codeowners/system @esp-idf-codeowners/peripherals/usb
/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/hal/test_apps/crypto/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/security
/components/hal/test_apps/tee/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/security
/components/heap/ @esp-idf-codeowners/system
/components/http_parser/ @esp-idf-codeowners/app-utilities
/components/idf_test/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/ieee802154/ @esp-idf-codeowners/ieee802154
/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/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/rt/ @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/ulp/ @esp-idf-codeowners/system
/components/unity/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/vfs/ @esp-idf-codeowners/storage
/components/wear_levelling/ @esp-idf-codeowners/storage
/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/docs_not_updated/ @esp-idf-codeowners/all-maintainers
/docs/**/api-guides/tools/ @esp-idf-codeowners/tools
/docs/**/api-guides/kconfig/ @esp-idf-codeowners/tools
/docs/en/api-guides/core_dump.rst @esp-idf-codeowners/debugging
/docs/**/api-guides/wifi* @esp-idf-codeowners/wifi
/docs/**/api-guides/esp-wifi-mesh.rst @esp-idf-codeowners/wifi
/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/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
/docs/**/contribute/install-pre-commit-hook.rst @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/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/lowpower/ @esp-idf-codeowners/power-management @esp-idf-codeowners/system
/examples/mesh/ @esp-idf-codeowners/wifi
/examples/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi
/examples/openthread/ @esp-idf-codeowners/ieee802154
/examples/peripherals/ @esp-idf-codeowners/peripherals
/examples/peripherals/usb/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
/examples/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/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/bt/ @esp-idf-codeowners/bluetooth
/tools/ci/ @esp-idf-codeowners/ci
/tools/cmake/ @esp-idf-codeowners/build-config
/tools/cmake/toolchain-*.cmake @esp-idf-codeowners/toolchain
/tools/cmakev2/ @esp-idf-codeowners/build-config
/tools/esp_app_trace/ @esp-idf-codeowners/debugging
/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/components/test_utils/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/tools/test_apps/configs/ @esp-idf-codeowners/system
/tools/test_apps/linux_compatible/ @esp-idf-codeowners/system
/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
# 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

@@ -145,11 +145,11 @@ check if there's a suitable `.if-<if-anchor-you-need>` anchor
1. if there is, create a rule following [`rules` Template Naming Rules](#rules-template-naming-rules).For detail information, please refer to [GitLab Documentation `rules-if`](https://docs.gitlab.com/ee/ci/yaml/README.html#rulesif). Here's an example.
```yaml
.rules:patterns:clang_tidy:
.rules:patterns:python-files:
rules:
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-c-files
changes: *patterns-python-files
```
2. if there isn't
@@ -250,9 +250,76 @@ We're using the latest version of [idf-build-apps][idf-build-apps]. Please refer
In ESP-IDF CI, there's a few more special rules are additionally supported to disable the check app dependencies feature:
- Add MR labels `BUILD_AND_TEST_ALL_APPS`
- Pipeline variable `IDF_CI_SELECT_ALL_PYTEST_CASES=1`
- Run in protected branches
## Upload/Download Artifacts to Internal Minio Server
Please refer to the documentation [here](https://docs.espressif.com/projects/idf-ci/en/latest/guides/cli.html)
### Users Without Access to Minio
If you don't have access to the internal Minio server, you can still download the artifacts from the shared link in the job log.
The log will look like this:
```shell
Pipeline ID : 587355
Job name : build_clang_test_apps_esp32
Job ID : 40272275
Created archive file: 40272275.zip, uploading as 587355/build_dir_without_map_and_elf_files/build_clang_test_apps_esp32/40272275.zip
Please download the archive file includes build_dir_without_map_and_elf_files from [INTERNAL_URL]
```
### Users With Access to Minio
#### Env Vars for Minio
Minio takes these env vars to connect to the server:
- `IDF_S3_SERVER`
- `IDF_S3_ACCESS_KEY`
- `IDF_S3_SECRET_KEY`
- `IDF_S3_BUCKET`
#### Artifacts Types and File Patterns
The artifacts types and corresponding file patterns are defined in tools/ci/artifacts_handler.py, inside `ArtifactType` and `TYPE_PATTERNS_DICT`.
#### Upload
```shell
python tools/ci/artifacts_handler.py upload
```
will upload the files that match the file patterns to minio object storage with name:
`<pipeline_id>/<artifact_type>/<job_name>/<job_id>.zip`
For example, job 39043328 will upload these four files:
- `575500/map_and_elf_files/build_pytest_examples_esp32/39043328.zip`
- `575500/build_dir_without_map_and_elf_files/build_pytest_examples_esp32/39043328.zip`
- `575500/logs/build_pytest_examples_esp32/39043328.zip`
- `575500/size_reports/build_pytest_examples_esp32/39043328.zip`
#### Download
You may run
```shell
python tools/ci/artifacts_handler.py download --pipeline_id <pipeline_id>
```
to download all files of the pipeline, or
```shell
python tools/ci/artifacts_handler.py download --pipeline_id <pipeline_id> --job_name <job_name_or_pattern>
```
to download all files with the specified job name or pattern, or
```shell
python tools/ci/artifacts_handler.py download --pipeline_id <pipeline_id> --job_name <job_name_or_pattern> --type <artifact_type> <artifact_type> ...
```
to download all files with the specified job name or pattern and artifact type(s).
You may check all detailed documentation with `python tools/ci/artifacts_handler.py download -h`

View File

@@ -1,14 +1,73 @@
.build_template:
stage: build
extends:
- .before_script:build
- .after_script:build
- .after_script:build:ccache-show-stats:upload-failed-job-logs
image: $ESP_ENV_IMAGE
tags: [build, shiny]
tags:
- build
# build only on shiny servers since shiny storage server is at the same location
- shiny
variables:
# Enable ccache for all build jobs. See configure_ci_environment.sh for more ccache related settings.
IDF_CCACHE_ENABLE: "1"
dependencies: []
.build_cmake_template:
extends:
- .build_template
- .before_script:build
- .after_script:build:ccache-show-stats
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
artifacts: false
- pipeline_variables
artifacts:
paths:
# The other artifacts patterns are defined under tools/ci/artifacts_handler.py
# Now we're uploading/downloading the binary files from our internal storage server
#
# keep the log file to help debug
- "**/build*/build_log.txt"
# keep the size info to help track the binary size
- size_info.txt
- "**/build*/size.json"
expire_in: 1 week
when: always
script:
# CI specific options start from "--parallel-count xxx". could ignore when running locally
- run_cmd python tools/ci/ci_build_apps.py $TEST_DIR -v
-t $IDF_TARGET
--copy-sdkconfig
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
--extra-preserve-dirs
examples/bluetooth/esp_ble_mesh/ble_mesh_console
examples/bluetooth/hci/controller_hci_uart_esp32
examples/wifi/iperf
--modified-components ${MR_MODIFIED_COMPONENTS}
--modified-files ${MR_MODIFIED_FILES}
# for detailed documents, please refer to .gitlab/ci/README.md#uploaddownload-artifacts-to-internal-minio-server
- python tools/ci/artifacts_handler.py upload
.build_cmake_clang_template:
extends:
- .build_cmake_template
variables:
IDF_TOOLCHAIN: clang
TEST_BUILD_OPTS_EXTRA: ""
TEST_DIR: tools/test_apps/system/cxx_pthread_bluetooth
script:
# CI specific options start from "--parallel-count xxx". could ignore when running locally
- run_cmd python tools/ci/ci_build_apps.py $TEST_DIR -v
-t $IDF_TARGET
--copy-sdkconfig
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
--modified-components ${MR_MODIFIED_COMPONENTS}
--modified-files ${MR_MODIFIED_FILES}
$TEST_BUILD_OPTS_EXTRA
- python tools/ci/artifacts_handler.py upload
######################
# build_template_app #
@@ -16,11 +75,18 @@
.build_template_app_template:
extends:
- .build_template
- .before_script:build
variables:
LOG_PATH: "${CI_PROJECT_DIR}/log_template_app"
BUILD_PATH: "${CI_PROJECT_DIR}/build_template_app"
BUILD_DIR: "${BUILD_PATH}/@t/@w"
BUILD_LOG_CMAKE: "${LOG_PATH}/cmake_@t_@w.txt"
BUILD_COMMAND_ARGS: ""
artifacts:
paths:
- log_template_app/*
- size_info.txt
- build_template_app/**/size*.json
- build_template_app/**/size.json
expire_in: 1 week
when: always
script:
@@ -34,15 +100,149 @@
# Only do the default cmake build for each target, remaining part are done in the build_template_app job
- tools/ci/build_template_app.sh ${BUILD_COMMAND_ARGS}
# build-related-pre-check-jobs ------------------------------------------------
# Build at least one project for each target at earliest stage to reduce build cost for obvious failing commits
fast_template_app:
extends:
- .build_template_app_template
- .rules:build
- .rules:build:target_test
stage: pre_check
tags: [fast_run, shiny]
variables:
BUILD_COMMAND_ARGS: "-p"
#------------------------------------------------------------------------------
########################################
# Clang Build Apps Without Tests Cases #
########################################
build_clang_test_apps_esp32:
extends:
- .build_cmake_clang_template
- .rules:build
variables:
IDF_TARGET: esp32
build_clang_test_apps_esp32s2:
extends:
- .build_cmake_clang_template
- .rules:build
variables:
IDF_TARGET: esp32s2
build_clang_test_apps_esp32s3:
extends:
- .build_cmake_clang_template
- .rules:build
variables:
IDF_TARGET: esp32s3
.build_clang_test_apps_riscv:
extends:
- .build_cmake_clang_template
variables:
# For RISCV clang generates '.linker-options' sections of type 'llvm_linker_options' in asm files.
# See (https://llvm.org/docs/Extensions.html#linker-options-section-linker-options).
# Binutils gas ignores them with warning.
# TODO: LLVM-112, Use integrated assembler.
TEST_BUILD_OPTS_EXTRA: "--ignore-warning-str 'Warning: unrecognized section type'"
build_clang_test_apps_esp32c3:
extends:
- .build_clang_test_apps_riscv
- .rules:build
variables:
IDF_TARGET: esp32c3
build_clang_test_apps_esp32c2:
extends:
- .build_clang_test_apps_riscv
- .rules:build
variables:
IDF_TARGET: esp32c2
build_clang_test_apps_esp32c6:
extends:
- .build_clang_test_apps_riscv
- .rules:build
# TODO: c6 builds fail in master due to missing headers
allow_failure: true
variables:
IDF_TARGET: esp32c6
######################
# Build System Tests #
######################
.test_build_system_template:
stage: host_test
extends:
- .build_template
- .rules:build:check
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
artifacts: false
optional: true
artifacts:
reports:
junit: XUNIT_RESULT.xml
paths:
- XUNIT_RESULT.xml
- test_build_system
expire_in: 1 week
when: always
script:
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
- cd ${IDF_PATH}/tools/test_build_system
- python ${IDF_PATH}/tools/ci/get_known_failure_cases_file.py
- pytest
--cleanup-idf-copy
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
--work-dir ${CI_PROJECT_DIR}/test_build_system
--junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
pytest_build_system:
extends: .test_build_system_template
parallel: 3
pytest_build_system_macos:
extends:
- .test_build_system_template
- .before_script:build:macos
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
- .rules:build:macos
tags:
- macos_shell
parallel: 3
variables:
PYENV_VERSION: "3.8"
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
build_docker:
extends:
- .before_script:minimal
- .rules:build:docker
stage: host_test
needs: []
image: espressif/docker-builder:1
tags:
- build_docker_amd64_brno
variables:
DOCKER_TMP_IMAGE_NAME: "idf_tmp_image"
script:
- export LOCAL_CI_REPOSITORY_URL=$CI_REPOSITORY_URL
- if [ -n "$LOCAL_GITLAB_HTTPS_HOST" ]; then export LOCAL_CI_REPOSITORY_URL="https://gitlab-ci-token:${CI_JOB_TOKEN}@${LOCAL_GITLAB_HTTPS_HOST}/${CI_PROJECT_PATH}"; fi
- if [ -n "$LOCAL_GIT_MIRROR" ]; then export LOCAL_CI_REPOSITORY_URL="${LOCAL_GIT_MIRROR}/${CI_PROJECT_PATH}"; fi
- echo "Using repository at $LOCAL_CI_REPOSITORY_URL"
- export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${LOCAL_CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$PIPELINE_COMMIT_SHA}"
# Build
- docker build --tag ${DOCKER_TMP_IMAGE_NAME} ${DOCKER_BUILD_ARGS} tools/docker/
# We can't mount $PWD/examples/get-started/blink into the container, see https://gitlab.com/gitlab-org/gitlab-ce/issues/41227.
# The workaround mentioned there works, but leaves around directories which need to be cleaned up manually.
# Therefore, build a copy of the example located inside the container.
- docker run --rm --workdir /opt/esp/idf/examples/get-started/blink ${DOCKER_TMP_IMAGE_NAME} idf.py build
# This job builds template app with permutations of targets and optimization levels
build_template_app:
@@ -50,66 +250,11 @@ build_template_app:
- .build_template_app_template
- .rules:build
stage: host_test
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
artifacts: false
########################################
# Clang Build Apps Without Tests Cases #
########################################
.build_cmake_clang_template:
extends:
- .build_template
- .rules:build
needs:
- job: fast_template_app
artifacts: false
- pipeline_variables
artifacts:
paths:
# The other artifacts patterns are defined under .idf_ci.toml
# Now we're uploading/downloading the binary files from our internal storage server
#
# keep the log file to help debug
- "**/build*/build_log.txt"
# keep the size info to help track the binary size
- size_info.txt
- "**/build*/size*.json"
expire_in: 1 week
when: always
variables:
IDF_TOOLCHAIN: clang
TEST_BUILD_OPTS_EXTRA: ""
script:
# CI specific options start from "--parallel-count xxx". could ignore when running locally
- run_cmd idf-build-apps build
-p tools/test_apps/system/clang_build_test
-t $IDF_TARGET
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
--modified-components ${MR_MODIFIED_COMPONENTS}
--modified-files ${MR_MODIFIED_FILES}
$TEST_BUILD_OPTS_EXTRA
build_clang_test_apps_xtensa:
extends: .build_cmake_clang_template
parallel:
matrix:
- IDF_TARGET: [esp32, esp32s2, esp32s3]
build_clang_test_apps_riscv:
extends: .build_cmake_clang_template
variables:
# https://reviews.llvm.org/D90108.
# GNU 'as' lets .weak override .globl since binutils-gdb
# https://github.com/bminor/binutils-gdb/commit/5ca547dc2399a0a5d9f20626d4bf5547c3ccfddd (1996)
# while MC lets the last directive win (PR38921).
# For RISCV chips we use integrated assembler by default, so suppress this warning to pass CI pipeline.
TEST_BUILD_OPTS_EXTRA: "--ignore-warning-str 'changed binding to STB_WEAK'"
parallel:
matrix:
- IDF_TARGET: [esp32c3, esp32c2, esp32c6, esp32c5, esp32h2, esp32p4]
####################
# Dynamic Pipeline #
####################
@@ -130,11 +275,7 @@ generate_build_child_pipeline:
expire_in: 1 week
when: always
script:
- run_cmd idf-ci --debug gitlab build-child-pipeline
-p components
-p examples
-p tools/test_apps
--modified-files $MR_MODIFIED_FILES
- run_cmd python tools/ci/dynamic_pipelines/scripts/generate_build_child_pipeline.py
build_child_pipeline:
stage: build
@@ -145,9 +286,11 @@ build_child_pipeline:
- pipeline_variables
- generate_build_child_pipeline
variables:
IS_MR_PIPELINE: $IS_MR_PIPELINE
MR_MODIFIED_COMPONENTS: $MR_MODIFIED_COMPONENTS
MR_MODIFIED_FILES: $MR_MODIFIED_FILES
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
BUILD_AND_TEST_ALL_APPS: $BUILD_AND_TEST_ALL_APPS
# https://gitlab.com/gitlab-org/gitlab/-/issues/214340
inherit:
variables: false
@@ -156,22 +299,3 @@ build_child_pipeline:
- artifact: build_child_pipeline.yml
job: generate_build_child_pipeline
strategy: depend
generate_disabled_apps_report:
extends:
- .build_template
tags: [fast_run, shiny]
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- pipeline_variables
- job: baseline_manifest_sha
optional: true
artifacts:
paths:
- disabled_report.html
expire_in: 1 week
when: always
script:
- pip install dominate idf-build-apps
- run_cmd python tools/ci/gen_disabled_report.py --output disabled_report.html --verbose --enable-preview-targets
- echo "Report generated at https://${CI_PAGES_HOSTNAME}:${CI_SERVER_PORT}/-/esp-idf/-/jobs/${CI_JOB_ID}/artifacts/disabled_report.html"

View File

@@ -14,12 +14,12 @@ stages:
- post_deploy
variables:
# System environment
# System environment
# Common parameters for the 'make' during CI tests
MAKEFLAGS: "-j5 --no-keep-going"
# GitLab-CI environment
# GitLab-CI environment
# Thanks to pack-objects cache, clone strategy should behave faster than fetch
# so we pick "clone" as default git strategy
# Shiny runners by default remove the CI_PROJECT_DIR every time at the beginning of one job
@@ -29,14 +29,17 @@ variables:
# - set GIT_STRATEGY: "clone" to shiny runners
# - set GIT_STRATEGY: "fetch" to brew runners
GIT_STRATEGY: clone
GIT_DEPTH: 1
GIT_SUBMODULE_STRATEGY: none # here we use cache for submodules, so we don't need to fetch them every time
# we will download archive for each submodule instead of clone.
# we don't do "recursive" when fetch submodule as they're not used in CI now.
GIT_SUBMODULE_STRATEGY: none
# since we're using merged-result pipelines, the last commit should work for most cases
GIT_DEPTH: 1
# --no-recurse-submodules: we use cache for submodules
# --prune --prune-tags: in case remote branch or tag is force pushed
GIT_FETCH_EXTRA_FLAGS: "--no-recurse-submodules --prune --prune-tags"
# we're using .cache folder for caches
GIT_CLEAN_FLAGS: -ffdx -e .cache/
LATEST_GIT_TAG: v6.1-dev
LATEST_GIT_TAG: v5.3.3
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
# by default we will fetch all submodules
@@ -51,10 +54,14 @@ variables:
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
# Docker images
ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v6.1:1"
ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v6.1:1-1"
TARGET_TEST_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/target-test-env-v6.1:1"
ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v5.3:1"
ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v5.3:1-1"
TARGET_TEST_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/target-test-env-v5.3:1"
SONARQUBE_SCANNER_IMAGE: "${CI_DOCKER_REGISTRY}/sonarqube-scanner:5"
PRE_COMMIT_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-pre-commit:1"
# target test repo parameters
TEST_ENV_CONFIG_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/qa/ci-test-runner-configs.git"
# cache python dependencies
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
@@ -65,7 +72,7 @@ variables:
CI_PYTHON_CONSTRAINT_BRANCH: ""
# Update the filename for a specific ESP-IDF release. It is used only with CI_PYTHON_CONSTRAINT_BRANCH.
CI_PYTHON_CONSTRAINT_FILE: "espidf.constraints.v6.1.txt"
CI_PYTHON_CONSTRAINT_FILE: "espidf.constraints.v5.3.txt"
# Set this variable to repository name of a Python tool you wish to install and test in the context of ESP-IDF CI.
# Keep the variable empty when not used.
@@ -76,14 +83,8 @@ variables:
# This is used only if CI_PYTHON_TOOL_REPO is not empty.
CI_PYTHON_TOOL_BRANCH: ""
# Set this variable to Clang toolchain distro URL to be used.
# NOTE: We have separate toolchains for Xtensa and RISCV, therefore jobs for one arch will fail.
# This is OK as far as we use CI_CLANG_DISTRO_URL for pre-release tests purposes only.
# Keep the variable empty when not used.
CI_CLANG_DISTRO_URL: ""
# 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
@@ -95,9 +96,6 @@ variables:
CCACHE_DIR: "/cache/idf_ccache"
CCACHE_MAXSIZE: "50G"
FF_USE_NEW_BASH_EVAL_STRATEGY: "true"
FORCE_COLOR: "1" # rich print with color
################################################
# `before_script` and `after_script` Templates #
################################################
@@ -119,7 +117,7 @@ variables:
source tools/ci/configure_ci_environment.sh
# add extra python packages
export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci:$IDF_PATH/tools/esp_app_trace:$IDF_PATH/components/partition_table:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/esp_app_trace:$IDF_PATH/components/partition_table:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
.setup_tools_and_idf_python_venv: &setup_tools_and_idf_python_venv |
# must use after setup_tools_except_target_test
@@ -127,7 +125,7 @@ variables:
# download constraint file for dev
if [[ -n "$CI_PYTHON_CONSTRAINT_BRANCH" ]]; then
wget -O /tmp/constraint.txt --header="Authorization:Bearer ${ESPCI_TOKEN}" "${GITLAB_HTTP_SERVER}/api/v4/projects/2581/repository/files/${CI_PYTHON_CONSTRAINT_FILE}/raw?ref=${CI_PYTHON_CONSTRAINT_BRANCH}"
wget -O /tmp/constraint.txt --header="Authorization:Bearer ${ESPCI_TOKEN}" ${GITLAB_HTTP_SERVER}/api/v4/projects/2581/repository/files/${CI_PYTHON_CONSTRAINT_FILE}/raw?ref=${CI_PYTHON_CONSTRAINT_BRANCH}
mkdir -p ~/.espressif
mv /tmp/constraint.txt ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
fi
@@ -136,67 +134,41 @@ variables:
if [[ -n "$IDF_DONT_USE_MIRRORS" ]]; then
export IDF_MIRROR_PREFIX_MAP=
fi
# Optimize pip install
if echo "${CI_RUNNER_TAGS}" | grep "shiny"; then
export PIP_INDEX_URL="${PIP_INDEX_URL_SHINY}"
fi
if [[ "$(uname -m)" == "x86_64" ]] || [[ "$(uname -m)" == "aarch64" ]]; then
export IDF_PIP_WHEELS_URL=""
fi
# install.sh
if [[ "${CI_JOB_STAGE}" != "target_test" ]]; then
section_start "running_install_sh" "Running install.sh"
if [[ "${CI_JOB_STAGE}" == "build_doc" ]]; then
run_cmd bash install.sh --enable-ci --enable-docs
else
run_cmd bash install.sh --enable-ci
fi
section_end "running_install_sh"
else
section_start "install_python_env" "Install Python environment, skip required tools check"
run_cmd python tools/idf_tools.py install-python-env --features ci,test-specific
export IDF_SKIP_TOOLS_CHECK=1
section_end "install_python_env"
fi
section_start "source_export" "Source export.sh"
source ./export.sh
section_end "source_export"
# Eager upgrade of CI dependencies
# Done after sourcing export.sh so that we could easily invoke the right pip
section_start "upgrade_ci_dependencies" "Upgrading CI dependencies"
pip install --upgrade --upgrade-strategy=eager -r $IDF_PATH/tools/requirements/requirements.ci.txt -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
# install latest python packages
# target test jobs
if [[ "${CI_JOB_STAGE}" == "target_test" ]]; then
pip install --upgrade --upgrade-strategy=eager -r $IDF_PATH/tools/requirements/requirements.test-specific.txt -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
fi
section_end "upgrade_ci_dependencies"
REEXPORT_NEEDED=0
if [[ ! -z "$INSTALL_EXTRA_TOOLS" ]]; then
section_start "installing_optional_tools" "Install optional tools ${INSTALL_EXTRA_TOOLS}"
run_cmd $IDF_PATH/tools/idf_tools.py --non-interactive install $INSTALL_EXTRA_TOOLS
section_end "installing_optional_tools"
REEXPORT_NEEDED=1
run_cmd bash install.sh --enable-ci --enable-pytest
elif [[ "${CI_JOB_STAGE}" == "build_doc" ]]; then
run_cmd bash install.sh --enable-ci --enable-docs
elif [[ "${CI_JOB_STAGE}" == "build" ]]; then
run_cmd bash install.sh --enable-ci --enable-pytest
else
if ! echo "${CI_JOB_NAME}" | egrep ".*pytest.*"; then
run_cmd bash install.sh --enable-ci
else
run_cmd bash install.sh --enable-ci --enable-pytest
fi
fi
# Install esp-clang if necessary (esp-clang is separately installed)
if [[ "$IDF_TOOLCHAIN" == "clang" && -z "$CI_CLANG_DISTRO_URL" ]]; then
# Install esp-clang if necessary
if [[ "$IDF_TOOLCHAIN" == "clang" ]]; then
$IDF_PATH/tools/idf_tools.py --non-interactive install esp-clang
REEXPORT_NEEDED=1
fi
if [[ $REEXPORT_NEEDED -eq 1 ]]; then
section_start "re_source_export" "Re-source export.sh"
source ./export.sh
section_end "re_source_export"
# Install QEMU if necessary
if [[ ! -z "$INSTALL_QEMU" ]]; then
$IDF_PATH/tools/idf_tools.py --non-interactive install qemu-xtensa qemu-riscv32
fi
# Custom clang toolchain
if [[ "$IDF_TOOLCHAIN" == "clang" && ! -z "$CI_CLANG_DISTRO_URL" ]]; then
# Since the version 3.21 CMake passes source files and include dirs to ninja using absolute paths.
# Needed for pytest junit reports.
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
source ./export.sh
# Custom clang
if [[ ! -z "$CI_CLANG_DISTRO_URL" ]]; then
echo "Using custom clang from ${CI_CLANG_DISTRO_URL}"
wget $CI_CLANG_DISTRO_URL
ARCH_NAME=$(basename $CI_CLANG_DISTRO_URL)
@@ -228,23 +200,42 @@ variables:
rm -rf ${CI_PYTHON_TOOL_REPO}
fi
info "setup tools and python venv done"
.show_ccache_statistics: &show_ccache_statistics |
# Show ccache statistics if enabled globally
section_start "ccache_show_stats" "Show ccache statistics"
test "$CI_CCACHE_STATS" == 1 && test -n "$(which ccache)" && ccache --show-stats -vv || true
section_end "ccache_show_stats"
.upload_failed_job_log_artifacts: &upload_failed_job_log_artifacts |
if [ $CI_JOB_STATUS = "failed" ]; then
run_cmd idf-ci gitlab upload-artifacts --type log
python tools/ci/artifacts_handler.py upload --type logs
fi
.before_script:minimal:
before_script:
- *common-before_scripts
.before_script:build:macos:
before_script:
# macos is running shell executor, which means it would use
# the system installed /usr/local/bin/python3 by default.
# Ensure pyenv and PYENV_VERSION installed
- eval "$(pyenv init -)"
- *common-before_scripts
# On macOS, these tools need to be installed
- export IDF_TOOLS_PATH="${HOME}/.espressif_runner_${CI_RUNNER_ID}_${CI_CONCURRENT_ID}"
- $IDF_PATH/tools/idf_tools.py --non-interactive install cmake ninja
# This adds tools (compilers) and the version-specific Python environment to PATH
- *setup_tools_and_idf_python_venv
- fetch_submodules
.after_script:build:macos:upload-failed-job-logs:ccache-show-stats:
after_script:
# macos is running shell executor, which means it would use
# the system installed /usr/local/bin/python3 by default.
# Ensure pyenv and PYENV_VERSION installed
- eval "$(pyenv init -)"
- *upload_failed_job_log_artifacts
- *show_ccache_statistics
.before_script:build:
before_script:
- *common-before_scripts
@@ -254,9 +245,12 @@ variables:
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
.after_script:build:
.after_script:build:ccache-show-stats:
after_script:
- *show_ccache_statistics
.after_script:build:ccache-show-stats:upload-failed-job-logs:
after_script:
- source tools/ci/utils.sh
- *show_ccache_statistics
- *upload_failed_job_log_artifacts
@@ -294,9 +288,9 @@ variables:
git remote add origin "${CI_REPOSITORY_URL}"
fi
.git_checkout_ci_commit_sha: &git_checkout_ci_commit_sha |
git checkout $CI_COMMIT_SHA
eval "git clean ${GIT_CLEAN_FLAGS}"
.git_checkout_fetch_head: &git_checkout_fetch_head |
git checkout FETCH_HEAD
git clean ${GIT_CLEAN_FLAGS}
# git diff requires two commits, with different CI env var
#
@@ -314,35 +308,27 @@ variables:
- *git_init
- *git_fetch_from_mirror_url_if_exists
- |
# Store the diff output in a temporary file
TEMP_FILE=$(mktemp)
# merged results pipelines, by default
if [[ -n $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA ]]; then
git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_SHA
git fetch origin $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
git diff --name-only $CI_MERGE_REQUEST_TARGET_BRANCH_SHA...$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA > "$TEMP_FILE"
GIT_DIFF_OUTPUT=$(cat "$TEMP_FILE")
git fetch origin $CI_COMMIT_SHA --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
git fetch origin $CI_MERGE_REQUEST_DIFF_BASE_SHA --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
git fetch origin $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
export GIT_DIFF_OUTPUT=$(git diff --name-only $CI_MERGE_REQUEST_DIFF_BASE_SHA $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA)
# merge request pipelines, when the mr got conflicts
elif [[ -n $CI_MERGE_REQUEST_DIFF_BASE_SHA ]]; then
git fetch origin $CI_MERGE_REQUEST_DIFF_BASE_SHA --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
git fetch origin $CI_COMMIT_SHA --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
git diff --name-only $CI_MERGE_REQUEST_DIFF_BASE_SHA $CI_COMMIT_SHA > "$TEMP_FILE"
GIT_DIFF_OUTPUT=$(cat "$TEMP_FILE")
export GIT_DIFF_OUTPUT=$(git diff --name-only $CI_MERGE_REQUEST_DIFF_BASE_SHA $CI_COMMIT_SHA)
# other pipelines, like the protected branches pipelines
elif [[ "$CI_COMMIT_BEFORE_SHA" != "0000000000000000000000000000000000000000" ]]; then
git fetch origin $CI_COMMIT_BEFORE_SHA --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
git fetch origin $CI_COMMIT_SHA --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA > "$TEMP_FILE"
GIT_DIFF_OUTPUT=$(cat "$TEMP_FILE")
export GIT_DIFF_OUTPUT=$(git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA)
else
# pipeline source could be web, scheduler, etc.
git fetch origin $CI_COMMIT_SHA --depth=2 ${GIT_FETCH_EXTRA_FLAGS}
git diff --name-only $CI_COMMIT_SHA~1 $CI_COMMIT_SHA > "$TEMP_FILE"
GIT_DIFF_OUTPUT=$(cat "$TEMP_FILE")
export GIT_DIFF_OUTPUT=$(git diff --name-only $CI_COMMIT_SHA~1 $CI_COMMIT_SHA)
fi
- *git_checkout_ci_commit_sha
- *git_checkout_fetch_head
- *common-before_scripts
- *setup_tools_and_idf_python_venv
- add_gitlab_ssh_keys
@@ -355,48 +341,13 @@ variables:
before_script:
- *git_init
- *git_fetch_from_mirror_url_if_exists
- eval "git fetch --depth=1 ${GIT_FETCH_EXTRA_FLAGS} origin ${CI_COMMIT_SHA}"
- *git_checkout_ci_commit_sha
- git fetch origin "${CI_COMMIT_SHA}" --depth=1 ${GIT_FETCH_EXTRA_FLAGS}
- *git_checkout_fetch_head
- *common-before_scripts
- *setup_tools_and_idf_python_venv
- add_gitlab_ssh_keys
# no submodules
.brew-macos-settings:
variables:
GIT_STRATEGY: none # we do manual git clone to use local mirror
IDF_CCACHE_ENABLE: "0"
CCACHE_DIR: "/var/tmp/cache/idf_ccache"
tags:
- macos-tart
image: macos-sequoia-idf-v6.1
cache: [] # pip cache is created under amd64, and submodules are downloaded with brew mirror, so disable cache here
before_script:
# assert LOCAL_GIT_MIRROR is set
- echo -e "section_start:`date +%s`:check_out\r\e[0Kchecking out from local git mirror, then reset to CI_COMMIT_SHA"
- |
if [ -z "${LOCAL_GIT_MIRROR:-}" ]; then
echo "Error: LOCAL_GIT_MIRROR not set, cannot clone from mirror."
exit 1
fi
- MIRROR_REPO_URL="${LOCAL_GIT_MIRROR}/${CI_PROJECT_PATH}"
- cd "${CI_PROJECT_DIR}"
# since .cache exists in CI_PROJECT_DIR, so can't direct `git clone .`
- git clone -b ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_COMMIT_BRANCH}} --depth=1 --recursive --shallow-submodules "${MIRROR_REPO_URL}" tmp
- mv tmp/.git ./
- rm -rf tmp
- git reset --hard
# set remote url back
- git remote set-url origin "${CI_REPOSITORY_URL}"
- eval "git fetch --depth=1 ${GIT_FETCH_EXTRA_FLAGS} origin ${CI_COMMIT_SHA}"
- git checkout FETCH_HEAD
- git submodule update --init --recursive --depth=1
- echo -e "section_end:`date +%s`:check_out\r\e[0K"
- *common-before_scripts
- *setup_tools_and_idf_python_venv
after_script: [] # ccache now is disabled for macos brew runners
timeout: 30m
#############
# `default` #
#############
@@ -421,12 +372,12 @@ default:
- *setup_tools_and_idf_python_venv
- add_gitlab_ssh_keys
- fetch_submodules
# gitlab bug, setting them here doesn't work
# - expire_in: https://gitlab.com/gitlab-org/gitlab/-/issues/404563
# - when: https://gitlab.com/gitlab-org/gitlab/-/issues/440672
# artifacts:
# expire_in: 1 week
# when: always
# gitlab bug, setting them here doesn't work
# - expire_in: https://gitlab.com/gitlab-org/gitlab/-/issues/404563
# - when: https://gitlab.com/gitlab-org/gitlab/-/issues/440672
# artifacts:
# expire_in: 1 week
# when: always
retry:
max: 2
when:

View File

@@ -2,18 +2,16 @@
# - extra_default_build_targets:
# besides of the SUPPORTED_TARGETS in IDF,
# enable build for the specified targets by default as well.
# !!! DEPRECATED: use `additional_build_targets` in .idf_build_apps.toml instead
#
# - bypass_check_test_targets:
# suppress the check_build_test_rules check-test-script warnings for the specified targets
#
# This file should ONLY be used during bringup. Should be reset to empty after the bringup process
extra_default_build_targets:
- esp32p4
bypass_check_test_targets:
- esp32h21
- esp32h4
- esp32c5
- esp32c61
#
# These lines would
# - enable the README.md check for esp32c6. Don't forget to add the build jobs in .gitlab/ci/build.yml

View File

@@ -1,3 +1,19 @@
.all_targets: &all_targets
- esp32
- esp32s2
- esp32s3
- esp32c3
- esp32c2
- esp32c6
- esp32c5
- esp32h2
- esp32p4
.target_test: &target_test
- example_test
- custom_test
- component_ut
##############
# Build Jobs #
##############
@@ -9,6 +25,7 @@
- build_system
- downloadable-tools
included_in:
- build:target_test
- build:check
# -------------------
@@ -26,13 +43,13 @@
"build:macos":
labels:
# - build
- build
- macos
- macos_test # for backward compatibility
# patterns:
# - build_system
# - build_macos
# - downloadable-tools
patterns:
- build_system
- build_macos
- downloadable-tools
# ---------------------------
# Add patterns to build rules
@@ -40,6 +57,8 @@
"patterns:template-app":
patterns:
- build_template-app
included_in:
- build:target_test
"patterns:build-check":
patterns:
@@ -71,9 +90,3 @@
- windows
specific_rules:
- if-schedule-test-build-system-windows
patterns:
- build_system_win
"labels:buildv2":
labels:
- buildv2

View File

@@ -3,27 +3,7 @@
image: $ESP_ENV_IMAGE
tags: [ deploy ]
.metrics_template:
stage: deploy
tags: [ fast_run, shiny ]
image: python:3.13-slim
dependencies: []
needs: []
variables:
PIP_CACHE_DIR: ".cache/pip"
# Metrics - related env vars
ESP_METRICS_PROJECT_URL: "$CI_PROJECT_URL"
ESP_METRICS_PROJECT_ID: "$CI_PROJECT_ID"
ESP_METRICS_COMMIT_SHA: "$PIPELINE_COMMIT_SHA"
ESP_METRICS_BRANCH_NAME: "$CI_COMMIT_REF_NAME"
cache:
key: metrics-pip
paths:
- .cache/pip
before_script:
- echo "Installing esp-metrics-cli tool"
- pip install "esp-metrics-cli>=0.3,<1"
# Check this before push_to_github
check_submodule_sync:
extends:
- .deploy_job_template
@@ -32,13 +12,13 @@ check_submodule_sync:
tags: [ brew, github_sync ]
retry: 2
variables:
GIT_STRATEGY: fetch # use brew local mirror first
# for brew runners, we always set GIT_STRATEGY to fetch
GIT_STRATEGY: fetch
SUBMODULES_TO_FETCH: "none"
PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
dependencies: []
script:
- git submodule deinit --force .
- rm -rf .git/modules # remove all the cached metadata
# setting the default remote URL to the public one, to resolve relative location URLs
- git config remote.origin.url ${PUBLIC_IDF_URL}
# check if all submodules are correctly synced to public repository
@@ -51,65 +31,31 @@ push_to_github:
extends:
- .deploy_job_template
- .before_script:minimal
- .rules:protected:deploy
- .rules:push_to_github
needs:
# submodule must be synced before pushing to github
- check_submodule_sync
tags: [ brew, github_sync ]
variables:
GIT_STRATEGY: fetch # use brew local mirror first
GIT_DEPTH: 0 # github needs full record of commits
# for brew runners, we always set GIT_STRATEGY to fetch
GIT_STRATEGY: fetch
# github also need full record of commits
GIT_DEPTH: 0
script:
- add_github_ssh_keys
- git remote remove github &>/dev/null || true
- git remote add github git@github.com:espressif/esp-idf.git
- tools/ci/push_to_github.sh
environment:
name: push_to_github_production
deployment_tier: production
url: "https://github.com/espressif/esp-idf"
deploy_update_SHA_in_esp-dockerfiles:
extends:
- .deploy_job_template
- .before_script:minimal
- .rules:protected:deploy
- .rules:protected-no_label-always
dependencies: []
variables:
GIT_DEPTH: 2
tags: [build, shiny]
tags: [ shiny, build ]
script:
- 'curl --header "PRIVATE-TOKEN: ${ESPCI_SCRIPTS_TOKEN}" -o create_MR_in_esp_dockerfile.sh $GITLAB_HTTP_SERVER/api/v4/projects/1260/repository/files/create_MR_in_esp_dockerfile%2Fcreate_MR_in_esp_dockerfile.sh/raw\?ref\=master'
- chmod +x create_MR_in_esp_dockerfile.sh
- ./create_MR_in_esp_dockerfile.sh
environment:
name: deploy_update_SHA_in_esp-dockerfiles_production
deployment_tier: production
upload_junit_report:
extends:
- .deploy_job_template
tags: [ fast_run, shiny ]
needs:
- pipeline_variables
- job: build_child_pipeline
artifacts: false
script:
- run_cmd idf-ci gitlab download-artifacts --type junit
rules:
- when: always
artifacts:
reports:
junit: XUNIT_RESULT_*.xml
expire_in: 1 week
when: always
target-examples-count-metrics:
extends:
- .metrics_template
allow_failure: true
script:
- echo "Generating ESP-IDF examples count metrics"
- cd tools/ci/metrics/examples_count
- python3 generate_metrics.py
- esp-metrics-cli upload -d schema.yaml -i metrics.json

View File

@@ -4,11 +4,11 @@
- "**/*.rst"
- "CONTRIBUTING.rst"
- "**/soc_caps.h"
- "**/Kconfig*"
.patterns-docs-partial: &patterns-docs-partial
- "components/**/*.h"
- "components/**/CMakeLists.txt"
- "components/**/Kconfig*"
- "components/**/CMakeList.txt"
- "components/**/sdkconfig*"
- "tools/tools.json"
- "tools/idf_tools.py"
@@ -19,9 +19,12 @@
.patterns-docs-preview: &patterns-docs-preview
- "docs/**/*"
.if-protected-check: &if-protected-check
.if-protected: &if-protected
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)'
.if-protected-no_label: &if-protected-no_label
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null'
.if-qa-test-tag: &if-qa-test-tag
if: '$CI_COMMIT_TAG =~ /^qa-test/'
@@ -38,7 +41,7 @@
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-label-build_docs
- <<: *if-label-docs_full
- <<: *if-dev-push
@@ -58,10 +61,10 @@
check_readme_links:
extends:
- .pre_check_template
tags: ["amd64", "brew"]
tags: ["build", "amd64", "internet"]
allow_failure: true
rules:
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-example-readme
script:
@@ -85,15 +88,13 @@ check_docs_lang_sync:
artifacts: false
optional: true
script:
- if [ -n "${BREATHE_ALT_INSTALL_URL_PY39}" ]; then
pip uninstall -y breathe && pip install -U ${BREATHE_ALT_INSTALL_URL_PY39};
fi
- if [ -n "${BREATHE_ALT_INSTALL_URL}" ]; then pip uninstall -y breathe && pip install -U ${BREATHE_ALT_INSTALL_URL}; fi
- cd docs
- build-docs -t $DOCTGT -bs $DOC_BUILDERS -l $DOCLANG build
parallel:
matrix:
- DOCLANG: ["en", "zh_CN"]
DOCTGT: ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c2", "esp32c6", "esp32c61", "esp32c5", "esp32h2", "esp32h4", "esp32h21", "esp32p4"]
DOCTGT: ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c2", "esp32c6", "esp32c5","esp32h2", "esp32p4"]
check_docs_gh_links:
image: $ESP_IDF_DOC_ENV_IMAGE
@@ -143,16 +144,11 @@ build_docs_html_partial:
variables:
DOCS_BUILD_DIR: "${IDF_PATH}/docs/_build/"
PYTHONUNBUFFERED: 1
# ensure all tags are fetched, need to know the latest/stable tag for the docs
GIT_STRATEGY: clone
GIT_DEPTH: 0
stage: test_deploy
tags:
- brew
- amd64
- deploy
- shiny
script:
# ensure all tags are fetched, need to know the latest/stable tag for the docs
- git fetch --tags --prune
- add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
- export GIT_VER=$(git describe --always ${PIPELINE_COMMIT_SHA} --)
- deploy-docs
@@ -179,17 +175,14 @@ deploy_docs_preview:
DOCS_DEPLOY_SERVER_USER: "$DOCS_SERVER_USER"
DOCS_DEPLOY_PATH: "$DOCS_PATH"
DOCS_DEPLOY_URL_BASE: "https://$DOCS_PREVIEW_SERVER_URL/docs/esp-idf"
environment:
name: deploy_docs_preview
deployment_tier: staging
url: "https://$DOCS_PREVIEW_SERVER_URL/docs/esp-idf"
# stage: post_deploy
deploy_docs_production:
# The DOCS_PROD_* variables used by this job are "Protected" so these branches must all be marked "Protected" in Gitlab settings
extends:
- .deploy_docs_template
- .rules:protected:deploy
rules:
- <<: *if-protected-no_label
stage: post_deploy
dependencies: # set dependencies to null to avoid missing artifacts issue
needs: # ensure runs after push_to_github succeeded
@@ -203,16 +196,12 @@ deploy_docs_production:
DOCS_DEPLOY_SERVER_USER: "$DOCS_PROD_SERVER_USER"
DOCS_DEPLOY_PATH: "$DOCS_PROD_PATH"
DOCS_DEPLOY_URL_BASE: "https://docs.espressif.com/projects/esp-idf"
DEPLOY_STABLE: 1
environment:
name: deploy_docs_production
deployment_tier: production
url: "https://docs.espressif.com/projects/esp-idf"
check_doc_links:
extends:
- .build_docs_template
- .rules:protected:deploy
rules:
- <<: *if-protected-no_label
stage: post_deploy
needs:
- job: deploy_docs_production

View File

@@ -2,20 +2,18 @@
extends: .rules:test:host_test
stage: host_test
image: $ESP_ENV_IMAGE
tags: [build, shiny]
tags:
- host_test
dependencies: # set dependencies to null to avoid missing artifacts issue
# run host_test jobs immediately, only after upload cache
needs:
- pipeline_variables
- job: upload-pip-cache
optional: true
artifacts: false
- job: upload-submodules-cache
optional: true
artifacts: false
- job: fast_template_app
optional: true
artifacts: false
- pipeline_variables
artifacts:
expire_in: 1 week
when: always
@@ -35,8 +33,12 @@ check_public_headers:
- IDF_TARGET=esp32h2 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
- IDF_TARGET=esp32p4 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
- IDF_TARGET=esp32c61 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
- IDF_TARGET=esp32h21 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
- IDF_TARGET=esp32h4 python tools/ci/check_public_headers.py --jobs 4 --prefix riscv32-esp-elf-
test_nvs_on_host:
extends: .host_test_template
script:
- cd components/nvs_flash/test_nvs_host
- make test
test_nvs_coverage:
extends:
@@ -44,10 +46,10 @@ test_nvs_coverage:
- .rules:labels:nvs_coverage
artifacts:
paths:
- components/nvs_flash/host_test/nvs_host_test/coverage_report
- components/nvs_flash/test_nvs_host/coverage_report
script:
- cd components/nvs_flash/host_test/nvs_host_test
- idf.py build coverage
- cd components/nvs_flash/test_nvs_host
- make coverage_report
# the 'long' host tests take approx 11 hours on our current runners. Adding some margin here for possible CPU contention
timeout: 18 hours
@@ -55,34 +57,64 @@ test_partition_table_on_host:
extends: .host_test_template
script:
- cd components/partition_table/test_gen_esp32part_host
- pytest_for_ut ./gen_esp32part_tests.py
- ./gen_esp32part_tests.py
test_ldgen_on_host:
extends: .host_test_template
script:
- cd tools/ldgen/test
- export PYTHONPATH=$PYTHONPATH:..
- pytest_for_ut .
- python -m unittest
variables:
LC_ALL: C.UTF-8
test_reproducible_build:
extends: .host_test_template
script:
- ./tools/ci/test_reproducible_build.sh
artifacts:
when: on_failure
paths:
- "**/sdkconfig"
- "**/build*/*.bin"
- "**/build*/*.elf"
- "**/build*/*.map"
- "**/build*/flasher_args.json"
- "**/build*/*.bin"
- "**/build*/bootloader/*.bin"
- "**/build*/partition_table/*.bin"
test_spiffs_on_host:
extends: .host_test_template
script:
- cd components/spiffs/test_spiffsgen/
- pytest_for_ut ./test_spiffsgen.py
- ./test_spiffsgen.py
test_fatfsgen_on_host:
extends: .host_test_template
script:
- cd components/fatfs/test_fatfsgen/
- pytest_for_ut ./test_fatfsgen.py ./test_wl_fatfsgen.py ./test_fatfsparse.py
- ./test_fatfsgen.py
- ./test_wl_fatfsgen.py
- ./test_fatfsparse.py
test_multi_heap_on_host:
extends: .host_test_template
script:
- cd components/heap/test_multi_heap_host
- ./test_all_configs.sh
test_certificate_bundle_on_host:
extends: .host_test_template
script:
- cd components/mbedtls/esp_crt_bundle/test_gen_crt_bundle/
- pytest_for_ut ./test_gen_crt_bundle.py
- ./test_gen_crt_bundle.py
test_gdbstub_on_host:
extends: .host_test_template
script:
- cd components/esp_gdbstub/test_gdbstub_host
- make test
# Test for create virtualenv. It must be invoked from Python, not from virtualenv.
# Use docker image system python without any extra dependencies
@@ -101,21 +133,18 @@ 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
# cmake@version that is supported
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa cmake cmake@3.22.1
- 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
# Testing with system python3, so don't use any third-party packages
- python3 ./test_idf_tools.py -v
- python3 ./test_idf_tools_python_env.py
# It runs at the end because it modifies dependencies
- IDF_TEST_MAY_BREAK_DEPENDENCIES=1 python3 ./test_idf_tools.py -v TestSystemDependencies.test_commands_when_nodeps
test_efuse_table_on_host:
.test_efuse_table_on_host_template:
extends: .host_test_template
parallel:
matrix:
- IDF_TARGET: [esp32, esp32s2, esp32c3, esp32s3, esp32c2, esp32c6, esp32h2, esp32p4, esp32c5, esp32c61]
variables:
IDF_TARGET: "esp32"
artifacts:
when: on_failure
paths:
@@ -125,7 +154,35 @@ test_efuse_table_on_host:
- ./efuse_table_gen.py -t "${IDF_TARGET}" ${IDF_PATH}/components/efuse/${IDF_TARGET}/esp_efuse_table.csv
- git diff --exit-code -- ${IDF_TARGET}/esp_efuse_table.c || { echo 'Differences found for ${IDF_TARGET} target. Please run idf.py efuse-common-table and commit the changes.'; exit 1; }
- cd ${IDF_PATH}/components/efuse/test_efuse_host
- pytest_for_ut ./efuse_tests.py
- ./efuse_tests.py
test_efuse_table_on_host_esp32:
extends: .test_efuse_table_on_host_template
test_efuse_table_on_host_esp32s2:
extends: .test_efuse_table_on_host_template
variables:
IDF_TARGET: esp32s2
test_efuse_table_on_host_esp32s3:
extends: .test_efuse_table_on_host_template
variables:
IDF_TARGET: esp32s3
test_efuse_table_on_host_esp32c3:
extends: .test_efuse_table_on_host_template
variables:
IDF_TARGET: esp32c3
test_efuse_table_on_host_esp32h2:
extends: .test_efuse_table_on_host_template
variables:
IDF_TARGET: esp32h2
test_efuse_table_on_host_esp32c6:
extends: .test_efuse_table_on_host_template
variables:
IDF_TARGET: esp32c6
test_logtrace_proc:
extends: .host_test_template
@@ -160,24 +217,19 @@ test_tools:
junit: ${IDF_PATH}/XUNIT_*.xml
variables:
LC_ALL: C.UTF-8
INSTALL_EXTRA_TOOLS: "qemu-xtensa qemu-riscv32" # for test_idf_qemu.py
INSTALL_QEMU: 1 # for test_idf_qemu.py
script:
- stat=0
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- cd ${IDF_PATH}/tools/ci/test_autocomplete
- run_cmd pytest --noconftest test_autocomplete.py --junitxml=${IDF_PATH}/XUNIT_AUTOCOMP.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- pytest --noconftest test_autocomplete.py --junitxml=${IDF_PATH}/XUNIT_AUTOCOMP.xml || stat=1
- cd ${IDF_PATH}/tools/test_idf_py
- run_cmd pytest --noconftest test_idf_py.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- run_cmd pytest --noconftest test_hints.py --junitxml=${IDF_PATH}/XUNIT_HINTS.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- run_cmd pytest --noconftest test_idf_qemu.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY_QEMU.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- cd ${IDF_PATH}/tools/test_bsasm
- run_cmd pytest --noconftest test_bsasm.py --junitxml=${IDF_PATH}/XUNIT_BSASM.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- pytest --noconftest test_idf_py.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY.xml || stat=1
- pytest --noconftest test_hints.py --junitxml=${IDF_PATH}/XUNIT_HINTS.xml || stat=1
- pytest --noconftest test_idf_qemu.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY_QEMU.xml || stat=1
- cd ${IDF_PATH}/tools/test_mkdfu
- run_cmd pytest --noconftest test_mkdfu.py --junitxml=${IDF_PATH}/XUNIT_MKDFU.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- pytest --noconftest test_mkdfu.py --junitxml=${IDF_PATH}/XUNIT_MKDFU.xml || stat=1
- cd ${IDF_PATH}/tools/test_idf_size
- run_cmd pytest --noconftest test_idf_size.py --junitxml=${IDF_PATH}/XUNIT_IDF_SIZE.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- cd ${IDF_PATH}/tools/test_idf_diag
- run_cmd pytest --noconftest test_idf_diag.py --junitxml=${IDF_PATH}/XUNIT_IDF_DIAG.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- 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
@@ -192,11 +244,17 @@ test_split_path_by_spaces:
extends: .host_test_template
script:
- cd ${IDF_PATH}/tools
- pytest_for_ut ./split_paths_by_spaces.py
- python -m unittest split_paths_by_spaces.py
test_mqtt_on_host:
extends: .host_test_template
script:
- cd ${IDF_PATH}/components/mqtt/esp-mqtt/host_test
- idf.py build
- LSAN_OPTIONS=verbosity=1:log_threads=1 build/host_mqtt_client_test.elf
test_transport_on_host:
extends: .host_test_template
allow_failure: true # IDFCI-2781 [v5.5, v5.4] test_transport_on_host fails on ubuntu 24.04
script:
- cd ${IDF_PATH}/components/tcp_transport/host_test
- idf.py build
@@ -231,78 +289,8 @@ test_gen_soc_caps_kconfig:
extends: .host_test_template
script:
- cd ${IDF_PATH}/tools/gen_soc_caps_kconfig/
- pytest_for_ut ./test/test_gen_soc_caps_kconfig.py
- ./test/test_gen_soc_caps_kconfig.py
test_idf_build_apps_load_soc_caps:
extends: .host_test_template
script:
- cd tools/ci
- pytest_for_ut ./test_soc_headers_load_in_idf_build_apps.py
test_nvs_gen_check:
extends: .host_test_template
artifacts:
paths:
- XUNIT_RESULT.xml
- components/nvs_flash/nvs_partition_tool
reports:
junit: XUNIT_RESULT.xml
variables:
LC_ALL: C.UTF-8
script:
- cd ${IDF_PATH}/components/nvs_flash/nvs_partition_tool
- pytest_for_ut test_nvs_gen_check.py
test_esp_rom:
extends: .host_test_template
artifacts:
paths:
- XUNIT_RESULT.xml
reports:
junit: XUNIT_RESULT.xml
script:
- cd ${IDF_PATH}/components/esp_rom/
- pytest_for_ut test_esp_rom.py
make_sure_soc_caps_compatible_in_idf_build_apps:
extends:
- .host_test_template
- .rules:dev-push
artifacts:
paths:
- new.json
- base.json
when: always
when: manual
script:
- python tools/ci/idf_build_apps_dump_soc_caps.py new.json
- git fetch --depth=1 origin $CI_MERGE_REQUEST_DIFF_BASE_SHA
- git checkout -f $CI_MERGE_REQUEST_DIFF_BASE_SHA
- git checkout $CI_COMMIT_SHA -- tools/ci/idf_build_apps_dump_soc_caps.py
- python tools/ci/idf_build_apps_dump_soc_caps.py base.json
- diff new.json base.json
build_docker:
extends:
- .before_script:minimal
- .rules:build:docker
stage: host_test
needs: []
image: espressif/docker-builder:1
tags: [shiny, dind]
variables:
DOCKER_TMP_IMAGE_NAME: "idf_tmp_image"
script:
- export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$CI_COMMIT_SHA} --build-arg IDF_CLONE_SHALLOW=1 --build-arg IDF_GITHUB_ASSETS=${INTERNAL_GITHUB_ASSETS}"
- docker build --tag ${DOCKER_TMP_IMAGE_NAME} ${DOCKER_BUILD_ARGS} tools/docker/
# We can't mount $PWD/examples/get-started/blink into the container, see https://gitlab.com/gitlab-org/gitlab-ce/issues/41227.
# The workaround mentioned there works, but leaves around directories which need to be cleaned up manually.
# Therefore, build a copy of the example located inside the container.
- docker run --rm --workdir /opt/esp/idf/examples/get-started/blink ${DOCKER_TMP_IMAGE_NAME} idf.py build
############################
# Host test with test apps #
############################
test_pytest_qemu:
extends:
- .host_test_template
@@ -311,31 +299,30 @@ test_pytest_qemu:
paths:
- XUNIT_RESULT.xml
- pytest-embedded/
- "**/build*/*.bin"
reports:
junit: XUNIT_RESULT.xml
allow_failure: true # IDFCI-1752
parallel:
matrix:
- IDF_TARGET: "esp32"
INSTALL_EXTRA_TOOLS: "qemu-xtensa"
# Skip Clang + Xtensa tests due to bootloader size issue
IDF_TOOLCHAIN: [gcc]
- IDF_TARGET: "esp32c3"
INSTALL_EXTRA_TOOLS: "qemu-riscv32"
IDF_TOOLCHAIN: [gcc, clang]
- IDF_TARGET: [esp32, esp32c3]
variables:
INSTALL_QEMU: 1
script:
- run_cmd idf-ci build run
--build-system cmake
- run_cmd python tools/ci/ci_build_apps.py . -vv
--target $IDF_TARGET
--pytest-apps
-m qemu
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
--modified-components ${MR_MODIFIED_COMPONENTS}
--modified-files ${MR_MODIFIED_FILES}
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- python tools/ci/get_known_failure_cases_file.py
- run_cmd pytest
--target $IDF_TARGET
-m qemu
--embedded-services idf,qemu
--junitxml=XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
--app-info-filepattern \"list_job_*.txt\"
--qemu-extra-args \"-global driver=timer.$IDF_TARGET.timg,property=wdt_disable,value=true\"
test_pytest_linux:
@@ -350,155 +337,44 @@ test_pytest_linux:
reports:
junit: XUNIT_RESULT.xml
script:
- run_cmd idf-ci build run
--build-system cmake
-p components -p examples -p tools/test_apps
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -vv
--target linux
--only-test-related
--pytest-apps
-m host_test
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
--modified-components ${MR_MODIFIED_COMPONENTS}
--modified-files ${MR_MODIFIED_FILES}
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- python tools/ci/get_known_failure_cases_file.py
- run_cmd pytest
--target linux
--embedded-services idf
-m host_test
--junitxml=XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
--app-info-filepattern \"list_job_*.txt\"
test_pytest_macos:
test_idf_pytest_plugin:
extends:
- .host_test_template
- .brew-macos-settings
artifacts:
paths:
- XUNIT_RESULT.xml
- pytest-embedded/
- "**/build*/build_log.txt"
reports:
junit: XUNIT_RESULT.xml
script:
- run_cmd idf-ci build run
-p components -p examples -p tools/test_apps
--build-system cmake
--target linux
--only-test-related
-m macos
--modified-files ${MR_MODIFIED_FILES}
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- run_cmd pytest
--target linux
-m macos
--junitxml=XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
######################
# Build System Tests #
######################
.test_build_system_template:
stage: host_test
extends:
- .build_template
- .rules:build:check
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
artifacts: false
optional: true
- .rules:patterns:idf-pytest-plugin
variables:
SUBMODULES_TO_FETCH: "none"
artifacts:
reports:
junit: XUNIT_RESULT.xml
script:
- cd tools/ci/idf_pytest
- pytest --junitxml=${CI_PROJECT_DIR}/XUNIT_RESULT.xml
test_nvs_gen_check:
extends: .host_test_template
artifacts:
paths:
- XUNIT_RESULT.xml
- test_build_system
expire_in: 1 week
when: always
script:
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
- cd ${IDF_PATH}/tools/test_build_system
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest
--cleanup-idf-copy
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
--work-dir ${CI_PROJECT_DIR}/test_build_system
--junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
.test_build_system_minimal_cmake_template:
extends: .test_build_system_template
- components/nvs_flash/nvs_partition_tool
reports:
junit: XUNIT_RESULT.xml
variables:
INSTALL_EXTRA_TOOLS: cmake@3.22.1
LC_ALL: C.UTF-8
script:
- MINIMAL_SUPPORTED_CMAKE_VERSION=$(echo "${INSTALL_EXTRA_TOOLS}" | sed -n 's/.*cmake@\([0-9.]*\).*/\1/p')
- export PATH=$(echo "$PATH" | sed -E "s|/tools/cmake/[0-9.]+|/tools/cmake/${MINIMAL_SUPPORTED_CMAKE_VERSION}|")
- ACTUAL_CMAKE_VERSION=$(cmake --version | head -n1 | awk '{print $3}')
- |
if [ "${ACTUAL_CMAKE_VERSION}" != "${MINIMAL_SUPPORTED_CMAKE_VERSION}" ]; then
echo "ERROR: Wrong minimal CMake version! Detected: ${ACTUAL_CMAKE_VERSION}, but should be: ${MINIMAL_SUPPORTED_CMAKE_VERSION}"
exit 1
fi
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
- cd ${IDF_PATH}/tools/test_build_system
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest
-k cmake
--cleanup-idf-copy
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
--work-dir ${CI_PROJECT_DIR}/test_build_system
--junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
pytest_build_system:
extends: .test_build_system_template
parallel: 3
pytest_buildv2_system:
extends:
- .test_build_system_template
- .rules:labels:buildv2
parallel: 3
script:
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
- cd ${IDF_PATH}/tools/test_build_system
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest
--buildv2
--cleanup-idf-copy
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
--work-dir ${CI_PROJECT_DIR}/test_build_system
--junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
--
test_non_default_target.py
test_component_manager.py
test_build.py
test_bootloader.py
test_git.py
test_kconfig.py
test_partition.py
test_reproducible_build.py
test_sdkconfig.py
test_versions.py
test_common.py
test_components.py
test_cmake.py
test_idf_extension.py
test_rebuild.py
pytest_build_system_macos:
extends:
- .test_build_system_template
- .brew-macos-settings
- .rules:build:macos
parallel: 3
pytest_build_system_minimal_cmake:
extends: .test_build_system_minimal_cmake_template
pytest_build_system_macos_minimal_cmake:
extends:
- .test_build_system_minimal_cmake_template
- .brew-macos-settings
- .rules:build:macos
variables:
INSTALL_EXTRA_TOOLS: ninja cmake@3.22.1
- cd ${IDF_PATH}/components/nvs_flash/nvs_partition_tool
- pytest --noconftest test_nvs_gen_check.py --junitxml=XUNIT_RESULT.xml

View File

@@ -60,9 +60,6 @@ child_integration_test_pipeline:
stage: assign_test
needs:
- gen_integration_pipeline
variables:
IDF_S3_SERVER: $IDF_S3_NEW_SERVER
IDF_S3_ACCESS_KEY: $IDF_S3_NEW_ACCESS_KEY
trigger:
include:
- artifact: idf-integration-ci/child_pipeline/pipeline.yml

View File

@@ -1,34 +0,0 @@
.post_deploy_template:
stage: post_deploy
image: $ESP_ENV_IMAGE
generate_failed_jobs_report:
extends:
- .post_deploy_template
tags: [build, shiny]
when: always
dependencies: # Do not download artifacts from the previous stages
needs:
- pipeline_variables
artifacts:
expire_in: 2 week
when: always
paths:
- job_report.html
script:
- python tools/ci/dynamic_pipelines/scripts/generate_report.py --report-type job
sync_support_status:
extends:
- .post_deploy_template
- .rules:master:push
tags: [ brew, github_sync ]
needs:
- push_to_github
cache: []
before_script: []
script:
- curl --fail --request POST --form token="$IDF_STATUS_TRIG_TOKEN" --form ref="$IDF_STATUS_BRANCH" --form "variables[UPLOAD_TO_S3]=true" "$IDF_STATUS_TRIG_URL"
environment:
name: sync_support_status_production
deployment_tier: production

View File

@@ -1,7 +1,8 @@
.pre_check_template:
stage: pre_check
image: $ESP_ENV_IMAGE
tags: [build, shiny]
tags:
- host_test
dependencies: # set dependencies to null to avoid missing artifacts issue
check_version:
@@ -9,7 +10,7 @@ check_version:
# esp_idf_version.h in a branch before tagging the next version.
extends:
- .pre_check_template
- .rules:protected:check
- .rules:protected
tags: [ brew, github_sync ]
variables:
# need a full clone to get the latest tag
@@ -44,7 +45,6 @@ check_blobs:
- IDF_TARGET=esp32c3 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32c6 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32c5 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32c61 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
- IDF_TARGET=esp32_host $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
# Check if Coexistence library header files match between IDF and the version used when compiling the libraries
- IDF_TARGET=esp32 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
@@ -55,7 +55,6 @@ check_blobs:
- IDF_TARGET=esp32c6 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
- IDF_TARGET=esp32h2 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
- IDF_TARGET=esp32c5 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
- IDF_TARGET=esp32c61 $IDF_PATH/components/esp_coex/test_md5/test_md5.sh
# Check if Wi-Fi, PHY, BT blobs contain references to specific symbols
- bash $IDF_PATH/tools/ci/check_blobs.sh
@@ -71,7 +70,7 @@ check_chip_support_components:
expire_in: 1 week
script:
- python tools/ci/check_soc_headers_leak.py
- find ${IDF_PATH}/components/soc/**/include/soc/ ${IDF_PATH}/components/soc/**/register/soc/ -name "*_struct.h" -print0 | xargs -0 -n1 ./tools/ci/check_soc_struct_headers.py
- find ${IDF_PATH}/components/soc/**/include/soc/ -name "*_struct.h" -print0 | xargs -0 -n1 ./tools/ci/check_soc_struct_headers.py
- tools/ci/check_esp_memory_utils_headers.sh
check_esp_err_to_name:
@@ -117,9 +116,19 @@ check_test_scripts_build_test_rules:
- .pre_check_template
- .before_script:build
script:
# requires basic pytest dependencies
# required pytest related packages
- run_cmd bash install.sh --enable-pytest
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
check_configure_ci_environment_parsing:
extends:
- .pre_check_template
- .before_script:build
- .rules:build
script:
- cd tools/ci
- python -m unittest ci_build_apps.py
pipeline_variables:
extends:
- .pre_check_template
@@ -132,7 +141,7 @@ pipeline_variables:
# MR_MODIFIED_FILES and MR_MODIFIED_COMPONENTS are semicolon separated lists that is used in MR only
# for non MR pipeline, these are empty lists
- |
if [ -z "$CI_MERGE_REQUEST_IID" ]; then
if [ $IS_MR_PIPELINE == "0" ]; then
echo "MR_MODIFIED_FILES=\"\"" >> pipeline.env
echo "MR_MODIFIED_COMPONENTS=\"\"" >> pipeline.env
else
@@ -143,14 +152,18 @@ pipeline_variables:
echo "MR_MODIFIED_COMPONENTS=\"$MR_MODIFIED_COMPONENTS\"" >> pipeline.env
fi
- |
if [ -n "$PIPELINE_COMMIT_SHA" ]; then
echo "PIPELINE_COMMIT_SHA=$PIPELINE_COMMIT_SHA" >> pipeline.env
if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)BUILD_AND_TEST_ALL_APPS(,|$)"; then
echo "BUILD_AND_TEST_ALL_APPS=1" >> pipeline.env
fi
# run full pipeline if testing constraint branch
- |
if [ -n "$CI_PYTHON_CONSTRAINT_BRANCH" ]; then
echo "BUILD_AND_TEST_ALL_APPS=1" >> pipeline.env
fi
- echo "OOCD_DISTRO_URL_ARMHF=$OOCD_DISTRO_URL_ARMHF" >> pipeline.env
- echo "OOCD_DISTRO_URL_ARM64=$OOCD_DISTRO_URL_ARM64" >> pipeline.env
- run_cmd idf-ci gitlab pipeline-variables >> pipeline.env
- cat pipeline.env
- run_cmd idf-ci gitlab upload-artifacts --type env
- python tools/ci/artifacts_handler.py upload --type modified_files_and_components_report
artifacts:
reports:
dotenv: pipeline.env
@@ -190,25 +203,3 @@ baseline_manifest_sha:
- .manifest_sha
expire_in: 1 week
when: always
gcc_static_analyzer:
extends:
- .pre_check_template
- .rules:build
variables:
CI_CCACHE_DISABLE: 1
ANALYZING_APP: "examples/get-started/hello_world"
script:
- echo "CONFIG_COMPILER_STATIC_ANALYZER=y" >> ${ANALYZING_APP}/sdkconfig.defaults
- idf-build-apps build -p ${ANALYZING_APP}
retry_failed_jobs:
extends:
- .pre_check_template
- .rules:dev-push
tags: [shiny, fast_run]
allow_failure: true
script:
- echo "Retrieving and retrying all failed jobs for the pipeline..."
- python tools/ci/python_packages/gitlab_api.py retry_failed_jobs $CI_MERGE_REQUEST_PROJECT_ID --pipeline_id $CI_PIPELINE_ID
when: manual

View File

@@ -2,20 +2,33 @@
extends:
- .before_script:minimal
stage: pre_check
image: "${CI_DOCKER_REGISTRY}/esp-idf-pre-commit:2"
tags: [pre-commit]
variables:
# Both shiny and brew runners can pick this job
GIT_STRATEGY: fetch
GIT_DEPTH: 1
SUBMODULES_TO_FETCH: "all"
image: $PRE_COMMIT_IMAGE
tags: [cache, shiny]
needs:
- pipeline_variables
variables:
# cache pre_commit
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit"
script:
- fetch_submodules
- pre-commit run --files $MODIFIED_FILES
- pre-commit run --hook-stage post-commit validate-sbom-manifest
check_pre_commit_upload_cache:
extends:
- .check_pre_commit_template
rules:
- if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/) && $CI_PIPELINE_SOURCE == "push"'
cache:
- key: pre_commit-cache-${LATEST_GIT_TAG}
paths:
- .cache/pre-commit
policy: pull-push
- key: submodule-cache-${LATEST_GIT_TAG}
paths:
- .cache/submodule_archives
policy: pull
check_pre_commit:
extends:
- .check_pre_commit_template
@@ -24,35 +37,11 @@ check_pre_commit:
when: never
- when: on_success
cache:
- key: pre_commit-cache-${LATEST_GIT_TAG}
paths:
- .cache/pre-commit
policy: pull
- key: submodule-cache-${LATEST_GIT_TAG}
paths:
- .cache/submodule_archives
policy: pull
check_powershell:
extends:
- .before_script:minimal
stage: pre_check
image: docker:latest
services:
- docker:dind
tags:
- dind
- amd64
- brew # faster "apk add"
needs:
- pipeline_variables
variables:
# brew runners always use fetch
GIT_STRATEGY: fetch
GIT_DEPTH: 1
SUBMODULES_TO_FETCH: "none"
rules:
- changes:
- "*.ps1"
- ".gitlab/ci/pre_commit.yml"
script:
- apk add python3
- apk add py3-pip
- pip install pre-commit --break-system-packages
- pre-commit run --hook-stage manual check-powershell-scripts --files $MODIFIED_FILES

View File

@@ -10,7 +10,7 @@
- "**/*.{c,C,cpp}"
- "**/*.{h,H,hpp}"
- "components/**/Kconfig"
- "components/**/CMakeLists.txt"
- "components/**/CMakeList.txt"
.patterns-python-cache: &patterns-python-cache
- "tools/requirements.json"
@@ -35,15 +35,16 @@
# Add folders excluded by "???[!t]" and "??[!s]?"
# pre-commit: tools/ci/check_rules_components_patterns.py
- "components/bt/host/**/*"
- "components/esp_psram/system_layer/*"
.patterns-downloadable-tools: &patterns-downloadable-tools
- "tools/idf_tools.py"
- "tools/tools.json"
.patterns-build_template-app: &patterns-build_template-app
- "tools/ci/build_template_app.sh"
.patterns-build_system: &patterns-build_system
- "tools/cmake/**/*"
- "tools/cmakev2/**/*"
- "tools/kconfig_new/**/*"
- "tools/idf.py"
- "tools/idf_py_actions/**/*"
@@ -51,11 +52,11 @@
- "tools/ci/ignore_build_warnings.txt"
- "tools/ci/test_build_system*.sh"
- "tools/ci/test_build_system*.py"
- "tools/ci/build_template_app.sh"
- "tools/ci/ci_build_apps.py"
- "tools/test_build_system/**/*"
.patterns-build_system_win: &patterns-build_system_win
- "tools/test_build_system/**/*"
.patterns-build_macos: &patterns-build_macos
- "tools/ci/test_configure_ci_environment.sh"
.patterns-build_check: &patterns-build_check
- "tools/test_build_system/**/*"
@@ -65,9 +66,6 @@
- "tools/ci/check_esp_memory_utils_headers.sh"
- "tools/ci/check_blobs.sh"
- "tools/ci/check_public_headers.py"
- "tools/ci/check_register_rw_half_word.cmake"
- "tools/ci/check_register_rw_half_word.py"
- "examples/build_system/**/*"
.patterns-host_test: &patterns-host_test
- ".gitlab/ci/host-test.yml"
@@ -83,8 +81,6 @@
- "tools/idf_monitor.py"
- "tools/activate.py"
- "tools/idf.py"
- "tools/idf_py_actions/**/*"
- "tools/test_idf_py/**/*"
@@ -92,19 +88,12 @@
- "tools/idf_size.py"
- "tools/test_idf_size/**/*"
- "tools/test_idf_diag/**/*"
- "tools/tools.json"
- "tools/tools_schema.json"
- "tools/idf_tools.py"
- "tools/test_idf_tools/**/*"
- "tools/install_util.py"
- "tools/export_utils/utils.py"
- "tools/export_utils/shell_types.py"
- "tools/export_utils/console_output.py"
- "tools/export_utils/activate_venv.py"
- "tools/requirements/*"
- "tools/requirements.json"
- "tools/requirements_schema.json"
@@ -117,6 +106,8 @@
- "tools/detect_python.sh"
- "tools/detect_python.fish"
- "tools/ci/test_reproducible_build.sh"
- "tools/gen_soc_caps_kconfig/*"
- "tools/gen_soc_caps_kconfig/test/test_gen_soc_caps_kconfig.py"
@@ -126,11 +117,6 @@
- "tools/check_python_dependencies.py"
- "tools/bsasm.py"
- "tools/test_bsasm/**/*"
- "tools/ci/test_soc_headers_load_in_idf_build_apps.py"
.patterns-docker: &patterns-docker
- "tools/docker/**/*"
@@ -145,8 +131,10 @@
- "components/esp_phy/lib"
- "components/esp_wifi/lib"
- "components/esp_coex/lib"
- "components/json/cJSON"
- "components/lwip/lwip"
- "components/mbedtls/mbedtls"
- "components/mqtt/esp-mqtt"
- "components/openthread/lib"
- "components/openthread/openthread"
- "components/protobuf-c/protobuf-c"
@@ -158,22 +146,25 @@
- "components/bt/esp_ble_mesh/lib/lib"
- ".gitmodules"
.patterns-idf-pytest-plugin: &patterns-idf-pytest-plugin
- "tools/ci/idf_pytest/**/*"
##############
# if anchors #
##############
.if-master-push: &if-master-push
if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "push"'
.if-ref-master: &if-ref-master
if: '$CI_COMMIT_REF_NAME == "master"'
.if-release-tag: &if-release-tag
.if-tag-release: &if-tag-release
if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/'
.if-protected-check: &if-protected-check
.if-protected: &if-protected
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) || $CI_COMMIT_TAG =~ /^qa-test/'
.if-protected-deploy: &if-protected-deploy
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "api")'
.if-protected-no_label: &if-protected-no_label
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null'
.if-protected-branch-push: &if-protected-branch-push
.if-protected-ref-push: &if-protected-ref-push
# rules:changes always evaluates to true for new branch pipelines or when there is no Git push event
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/) && $CI_PIPELINE_SOURCE == "push"'
@@ -183,6 +174,9 @@
.if-dev-push: &if-dev-push
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
.if-schedule: &if-schedule
if: '$CI_PIPELINE_SOURCE == "schedule"'
.if-schedule-nightly: &if-schedule-nightly
if: '$CI_PIPELINE_SOURCE == "schedule" && $INCLUDE_NIGHTLY_RUN == "1"'
@@ -202,41 +196,46 @@
# Rules #
#########
### Branches ###
.rules:protected:check:
.rules:protected:
rules:
- <<: *if-protected-check
- <<: *if-protected
.rules:protected:deploy:
.rules:push_to_github:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-deploy
- <<: *if-protected-no_label
.rules:master:push:
.rules:protected-no_label-always:
rules:
- <<: *if-master-push
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-no_label
when: always
.rules:tag:release:
rules:
- <<: *if-release-tag
- <<: *if-tag-release
.rules:dev-push:
rules:
- <<: *if-dev-push
# Do not upload caches on dev branches by default
.rules:upload-python-cache:
rules:
- <<: *if-release-tag
- <<: *if-tag-release
- <<: *if-schedule-nightly
- <<: *if-protected-branch-push
- <<: *if-protected-ref-push
changes: *patterns-python-cache
- <<: *if-label-upload_cache
when: manual
.rules:upload-submodule-cache:
rules:
- <<: *if-release-tag
- <<: *if-protected-branch-push
# Needn't upload submodule cache in schedule pipeline
- <<: *if-tag-release
- <<: *if-protected-ref-push
changes: *patterns-submodule
- <<: *if-label-upload_cache
when: manual
@@ -244,18 +243,21 @@
### Patterns ###
.rules:patterns:clang_tidy:
rules:
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-c-files
#.rules:patterns:static-code-analysis-preview:
# rules:
# - <<: *if-dev-push
# changes: *patterns-c-files
# - <<: *if-dev-push
# changes: *patterns-python-files
# - <<: *if-dev-push
# changes: *patterns-sonarqube-files
.rules:patterns:python-files:
rules:
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-python-files
.rules:patterns:idf-pytest-plugin:
rules:
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-idf-pytest-plugin
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# DO NOT place comments or maintain any code from this line
@@ -272,9 +274,6 @@
.if-label-build: &if-label-build
if: '$BOT_LABEL_BUILD || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build(?:,[^,\n\r]+)*$/i'
.if-label-buildv2: &if-label-buildv2
if: '$BOT_LABEL_BUILDV2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*buildv2(?:,[^,\n\r]+)*$/i'
.if-label-docker: &if-label-docker
if: '$BOT_LABEL_DOCKER || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*docker(?:,[^,\n\r]+)*$/i'
@@ -300,7 +299,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-label-build
- <<: *if-dev-push
changes: *patterns-build_components
@@ -313,7 +312,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-label-build
- <<: *if-dev-push
changes: *patterns-build_check
@@ -328,7 +327,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-docker
- <<: *if-dev-push
@@ -344,15 +343,31 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-macos
- <<: *if-label-macos_test
- <<: *if-dev-push
changes: *patterns-build_macos
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-downloadable-tools
.rules:labels:buildv2:
.rules:build:target_test:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-label-buildv2
- <<: *if-protected
- <<: *if-label-build
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-build_template-app
- <<: *if-dev-push
changes: *patterns-downloadable-tools
.rules:labels:nvs_coverage:
rules:
@@ -366,14 +381,12 @@
when: never
- <<: *if-schedule-test-build-system-windows
- <<: *if-label-windows
- <<: *if-dev-push
changes: *patterns-build_system_win
.rules:test:host_test:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-host_test
@@ -384,7 +397,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected-check
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-submodule

View File

@@ -16,84 +16,25 @@ clang_tidy_check:
--limit-file tools/ci/static-analysis-rules.yml
--xtensa-include-dir
#
## build stage
## Sonarqube related jobs put here for this reason:
## Here we have two jobs. code_quality_check and code_quality_report.
##
## code_quality_check will analyze the code changes between your MR and
## code repo stored in sonarqube server. The analysis result is only shown in
## the comments under this MR and won't be transferred to the server.
##
## code_quality_report will analyze and transfer both of the newly added code
## and the analysis result to the server.
##
## Put in the front to ensure that the newly merged code can be stored in
## sonarqube server ASAP, in order to avoid reporting unrelated code issues
#.sonar_scan_template:
# stage: build
# extends: .pre_check_template
# # full clone since this image does not support fetch --shallow-since-cutoff
# # shiny runners are used for full clone
# tags: [build, shiny]
# image: $SONARQUBE_SCANNER_IMAGE
# before_script:
# - source tools/ci/utils.sh
# - export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
# - fetch_submodules
# # Exclude the submodules, all paths ends with /**
# - submodules=$(get_all_submodules)
# # get all exclude paths specified in tools/ci/sonar_exclude_list.txt | ignore lines start with # | xargs | replace all <space> to <comma>
# - custom_excludes=$(cat $CI_PROJECT_DIR/tools/ci/sonar_exclude_list.txt | grep -v '^#' | xargs | sed -e 's/ /,/g')
# # Exclude the report dir as well
# - export EXCLUSIONS="$custom_excludes,$submodules"
# - export SONAR_SCANNER_OPTS="-Xmx2048m"
# variables:
# GIT_DEPTH: 0
# REPORT_PATTERN: clang_tidy_reports/**/*.txt
# artifacts:
# paths:
# - $REPORT_PATTERN
# expire_in: 1 week
# when: always
# dependencies: # Here is not a hard dependency relationship, could be skipped when only python files changed. so we do not use "needs" here.
# - clang_tidy_check
#
#code_quality_check:
# extends:
# - .sonar_scan_template
# - .rules:patterns:static-code-analysis-preview
# allow_failure: true # it's using exit code to indicate the code analysis result,
# # we don't want to block ci when critical issues founded
# script:
# - export CI_MERGE_REQUEST_COMMITS=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py commits --src-branch ${CI_COMMIT_REF_NAME} | tr '\n' ',')
# # test if this branch have merge request, if not, exit 0
# - test -n "$CI_MERGE_REQUEST_IID" || exit 0
# - test -n "$CI_MERGE_REQUEST_COMMITS" || exit 0
# - sonar-scanner
# -Dsonar.analysis.mode=preview
# -Dsonar.branch.name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
# -Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
# -Dsonar.exclusions=$EXCLUSIONS
# -Dsonar.gitlab.ci_merge_request_iid=$CI_MERGE_REQUEST_IID
# -Dsonar.gitlab.commit_sha=$CI_MERGE_REQUEST_COMMITS
# -Dsonar.gitlab.merge_request_discussion=true
# -Dsonar.gitlab.ref_name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
# -Dsonar.host.url=$SONAR_HOST_URL
# -Dsonar.login=$SONAR_LOGIN
#
#code_quality_report:
# extends:
# - .sonar_scan_template
# - .rules:protected:check
# allow_failure: true # it's using exit code to indicate the code analysis result,
# # we don't want to block ci when critical issues founded
# script:
# - sonar-scanner
# -Dsonar.branch.name=$CI_COMMIT_REF_NAME
# -Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
# -Dsonar.exclusions=$EXCLUSIONS
# -Dsonar.gitlab.commit_sha=$PIPELINE_COMMIT_SHA
# -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
# -Dsonar.host.url=$SONAR_HOST_URL
# -Dsonar.login=$SONAR_LOGIN
check_pylint:
extends:
- .pre_check_template
- .rules:patterns:python-files
needs:
- pipeline_variables
artifacts:
reports:
codequality: pylint.json
paths:
- pylint.json
expire_in: 1 week
when: always
script:
- |
if [ -n "$CI_MERGE_REQUEST_IID" ]; then
export files=$(echo "$GIT_DIFF_OUTPUT" | grep ".py$" | xargs);
else
export files=$(git ls-files "*.py" | xargs);
fi
- if [ -z "$files" ]; then echo "No python files found"; exit 0; fi
- run_cmd pylint --exit-zero --load-plugins=pylint_gitlab --output-format=gitlab-codeclimate:pylint.json $files

View File

@@ -3,7 +3,8 @@
extends: .rules:test:host_test
stage: host_test
image: $ESP_ENV_IMAGE
tags: [windows-build, brew]
tags:
- windows-build
dependencies: # set dependencies to null to avoid missing artifacts issue
# run host_test jobs immediately, only after upload cache
needs:
@@ -13,21 +14,13 @@
- job: upload-submodules-cache
optional: true
artifacts: false
variables:
GIT_STRATEGY: fetch # use brew local mirror first
before_script:
- if ($env:IDF_DONT_USE_MIRRORS) {
$env:IDF_MIRROR_PREFIX_MAP = ""
}
before_script: []
after_script: []
test_cli_installer_win:
rules:
- when: never
extends:
- .host_test_win_template
- .rules:labels:windows_pytest_build_system
allow_failure: true
artifacts:
when: on_failure
paths:
@@ -36,11 +29,9 @@ test_cli_installer_win:
expire_in: 1 week
variables:
IDF_PATH: "$CI_PROJECT_DIR"
timeout: 3h
script:
# Tools must be downloaded for testing
# cmake@version that is supported
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake cmake@3.22.1
- 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
@@ -50,7 +41,6 @@ test_tools_win:
extends:
- .host_test_win_template
- .rules:labels:windows_pytest_build_system
parallel: 4
artifacts:
paths:
- ${IDF_PATH}/*.out
@@ -64,12 +54,12 @@ test_tools_win:
PYTHONPATH: "$PYTHONPATH;$IDF_PATH\\tools;$IDF_PATH\\tools\\esp_app_trace;$IDF_PATH\\components\\partition_table;$IDF_PATH\\tools\\ci\\python_packages"
script:
- python -m pip install jsonschema
- .\install.ps1 --enable-ci
- .\install.ps1 --enable-ci --enable-pytest
- .\export.ps1
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}/tools/test_idf_py
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest --parallel-count ${CI_NODE_TOTAL} --parallel-index ${CI_NODE_INDEX} --junitxml=${IDF_PATH}/XUNIT_RESULT.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest --noconftest test_idf_py.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY.xml
- pytest --noconftest test_hints.py --junitxml=${IDF_PATH}/XUNIT_HINTS.xml
# Build tests
.test_build_system_template_win:
@@ -82,68 +72,20 @@ test_tools_win:
after_script: []
timeout: 4 hours
script:
- .\install.ps1 --enable-ci
- .\install.ps1 --enable-ci --enable-pytest
- . .\export.ps1
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}\tools\test_build_system
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest --parallel-count ${CI_NODE_TOTAL} --parallel-index ${CI_NODE_INDEX} --junitxml=${CI_PROJECT_DIR}\XUNIT_RESULT.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest --parallel-count ${CI_NODE_TOTAL} --parallel-index ${CI_NODE_INDEX} --junitxml=${CI_PROJECT_DIR}\XUNIT_RESULT.xml
pytest_build_system_win:
extends:
- .test_build_system_template_win
- .rules:labels:windows_pytest_build_system
parallel: 6
needs: []
tags: [windows-build, brew]
artifacts:
paths:
- XUNIT_RESULT.xml
- test_build_system
expire_in: 2 days
reports:
junit: XUNIT_RESULT.xml
when: always
pytest_build_system_win_minimal_cmake:
extends:
- .test_build_system_template_win
- .rules:labels:windows_pytest_build_system
needs: []
tags: [windows-build, brew]
artifacts:
paths:
- XUNIT_RESULT.xml
- test_build_system
expire_in: 2 days
reports:
junit: XUNIT_RESULT.xml
when: always
variables:
MINIMAL_CMAKE_VERSION: "3.22.1"
script:
- .\install.ps1 --enable-ci
- . .\export.ps1
- python ${IDF_PATH}\tools\idf_tools.py install cmake@${MINIMAL_CMAKE_VERSION}
- $Env:PATH = "$Env:USERPROFILE\.espressif\tools\cmake\${MINIMAL_CMAKE_VERSION}\bin;$Env:PATH"
- |
$actualVersion = (& cmake --version).Split()[2]
if ($actualVersion -ne $Env:MINIMAL_CMAKE_VERSION) {
Write-Error "ERROR: Wrong CMake version! Detected: $actualVersion, but expected: $Env:MINIMAL_CMAKE_VERSION"
exit 1
}
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}\tools\test_build_system
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest -k cmake --junitxml=${CI_PROJECT_DIR}\XUNIT_RESULT.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
pytest_buildv2_system_win:
extends:
- .test_build_system_template_win
- .rules:labels:buildv2
parallel: 2
needs: []
tags: [windows-build, brew]
tags:
- windows-build
artifacts:
paths:
- XUNIT_RESULT.xml
@@ -152,31 +94,3 @@ pytest_buildv2_system_win:
reports:
junit: XUNIT_RESULT.xml
when: always
script:
- .\install.ps1 --enable-ci
- . .\export.ps1
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}\tools\test_build_system
- idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- pytest
--buildv2
--parallel-count ${CI_NODE_TOTAL}
--parallel-index ${CI_NODE_INDEX}
--junitxml=${CI_PROJECT_DIR}\XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
--
test_non_default_target.py
test_component_manager.py
test_build.py
test_bootloader.py
test_git.py
test_kconfig.py
test_partition.py
test_reproducible_build.py
test_sdkconfig.py
test_versions.py
test_common.py
test_components.py
test_cmake.py
test_idf_extension.py
test_rebuild.py

View File

@@ -21,7 +21,7 @@ upload-pip-cache:
policy: push
script:
- rm -rf .cache/pip # clear old packages
- bash install.sh --enable-ci --enable-test-specific
- bash install.sh --enable-ci --enable-pytest
parallel:
matrix:
- GEO: [ 'shiny', 'brew' ]

View File

@@ -9,19 +9,7 @@
## Related <!-- Optional -->
<!-- Related Jira issues and Github issues or write "No related issues"-->
<!-- ## Dynamic Pipeline Configuration
```yaml
Test Case Filters:
# Only run tests that match the given substring expression (modified files/components will be ignored):
# Please use a list of strings.
# This will run the test cases filtered like `pytest -k "(<list_item_1>) or (<list_item_2>) or ...`
# The fast pipeline will fail at the final stage.
# For example:
- test_sdm and not sdmmc
- test_hello_world
# This example will include all tests containing 'test_hello_world' in the name,
# and include all tests containing 'test_sdm' but not 'sdmmc' in the name.
``` --><!-- Optional -->
## Release notes <!-- Mandatory -->
<!-- Either state release notes or write "No release notes" -->
<!-- Don't remove the next line - assigns the MR author as the assignee -->
/assign me
<!-- ## Breaking change notes --><!-- Optional -->

View File

@@ -39,5 +39,24 @@ _For other small/non-public changes, which are not expected to be in the release
* Mention submodule MR, if there is
* Mention backport(ed) MR, if there is
<!-- Don't remove the next line - assigns the MR author as the assignee -->
/assign me
_Don't touch the subsection titles below, they will be parsed by scripts._
## Release notes <!-- Mandatory -->
_Changes made in this MR that should go into the **Release Notes** should be listed here. Please use **past tense** and *specify the area (see maintainers page of IDF internal wiki)*. If there is a subscope, include it and separate with slash (`/`). Minor changes can go to the descriptions above without a release notes entry._
_Write all the changes in a **list** (Start at the beginning of the line with `-` or `*`). If multiple changes are made, each of them should take a single line. If there is only one change to list, it should still be the only line of a list. If this MR does not need any release notes, write "No release notes" here without the `-` or `*`. e.g._
* [WiFi] Changed/fixed/updated xxx
* [WiFi] Added support of xxx
* [Peripheral Drivers/I2S] Fixed xxx (https://github.com/espressif/esp-idf/issues/xxxx)
## Breaking change notes
_Remove this subsection if not used._
_If there are any breaking changes, please mention it here. Talking about (1) what is not accepted any more, (2) the alternative solution and (3) the benefits/reason. e.g._
_Please strictly follow the breaking change restriction, which means, if there is a breaking change but you are merging to non-major versions, you have to separate the breaking part out to another MR for a major version. The breaking change subsection is only accepted in MRs merging to major versions._
* [VFS/UART] Now vfs_uart_set_rts_cts accept one more instance argument, to support configuration to different ports.

17
.gitmodules vendored
View File

@@ -46,6 +46,19 @@
sbom-description = Wear-leveled SPI flash file system for embedded devices
sbom-hash = 0dbb3f71c5f6fae3747a9d935372773762baf852
[submodule "components/json/cJSON"]
path = components/json/cJSON
url = ../../DaveGamble/cJSON.git
sbom-version = 1.7.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 = 8f2beb57ddad1f94bed899790b00f46df893ccac
sbom-cve-exclude-list = CVE-2024-31755 Resolved in v1.7.18
sbom-cve-exclude-list = CVE-2023-26819 Resolved in commit a328d65ad490b64da8c87523cbbfe16050ba5bf6
sbom-cve-exclude-list = CVE-2023-53154 Resolved in v1.7.18
[submodule "components/mbedtls/mbedtls"]
path = components/mbedtls/mbedtls
url = ../../espressif/mbedtls.git
@@ -54,6 +67,10 @@
path = components/lwip/lwip
url = ../../espressif/esp-lwip.git
[submodule "components/mqtt/esp-mqtt"]
path = components/mqtt/esp-mqtt
url = ../../espressif/esp-mqtt.git
[submodule "components/protobuf-c/protobuf-c"]
path = components/protobuf-c/protobuf-c
url = ../../protobuf-c/protobuf-c.git

View File

@@ -1,68 +0,0 @@
config_rules = [
'sdkconfig.ci=default',
'sdkconfig.ci.*=',
'=default',
]
extra_pythonpaths = [
'$IDF_PATH/tools/ci/python_packages',
'$IDF_PATH/tools/ci',
'$IDF_PATH/tools',
]
build_system = "idf_ci_local.app:IdfCMakeApp"
recursive = true
check_warnings = true
keep_going = true
copy_sdkconfig = true
ignore_warning_files = [
'$IDF_PATH/tools/ci/ignore_build_warnings.txt',
]
build_dir = "build_@t_@w"
build_log_filename = "build_log.txt"
size_json_filename = "size_${CI_JOB_ID}.json"
verbose = 1 # INFO
additional_build_targets = [
'esp32h21',
'esp32h4',
]
# collect
collect_app_info_filename = "app_info_${CI_JOB_NAME_SLUG}.txt"
junitxml = "build_summary_${CI_JOB_NAME_SLUG}.xml"
# manifest
check_manifest_rules = true
manifest_rootpath = "$IDF_PATH"
manifest_filepatterns = [
'**/.build-test-rules.yml',
]
# dependency-driven build
deactivate_dependency_driven_build_by_components = [
'cxx',
'esp_common',
'esp_hw_support',
'esp_rom',
'esp_system',
'esp_timer',
'freertos',
'hal',
'heap',
'log',
'esp_libc',
'riscv',
'soc',
'xtensa',
]
deactivate_dependency_driven_build_by_filepatterns = [
# tools
'tools/cmake/**/*',
'tools/tools.json',
# ci
'tools/ci/ignore_build_warnings.txt',
]

View File

@@ -1,106 +0,0 @@
preserve_non_test_related_apps = false
exclude_dirs = [
'tools/test_mkdfu',
'tools/test_idf_size',
'tools/test_idf_py',
'tools/test_idf_diag',
'tools/test_bsasm',
'tools/ci/test_autocomplete',
'tools/test_build_system',
]
[local_runtime_envs]
EXTRA_CFLAGS = "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function -Wstrict-prototypes"
EXTRA_CXXFLAGS = "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
LDGEN_CHECK_MAPPING = "1"
IDF_CI_BUILD = "1"
[gitlab]
[gitlab.build_pipeline]
workflow_name = "build_child_pipeline"
presigned_json_job_name = 'generate_pytest_build_report'
job_tags = ['build', 'shiny']
job_template_name = '.dynamic_build_template'
job_template_jinja = '' # write in tools/ci/dynamic_pipelines/templates/.dynamic_jobs.yml
pre_yaml_jinja = """
include:
- .gitlab/ci/common.yml
- tools/ci/dynamic_pipelines/templates/.dynamic_jobs.yml
- tools/ci/dynamic_pipelines/templates/test_child_pipeline.yml
"""
yaml_jinja = """
{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}
workflow:
name: {{ settings.gitlab.build_pipeline.workflow_name }}
rules:
- when: always
{{ jobs }}
""" # simplified since we included the tools/ci/dynamic_pipelines/templates/test_child_pipeline.yml
[gitlab.test_pipeline]
job_template_name = '.dynamic_target_test_template'
job_template_jinja = '' # write in tools/ci/dynamic_pipelines/templates/.dynamic_jobs.yml
pre_yaml_jinja = """
include:
- .gitlab/ci/common.yml
- tools/ci/dynamic_pipelines/templates/.dynamic_jobs.yml
"""
[gitlab.artifacts.s3.debug]
bucket = "idf-artifacts"
patterns = [
'**/build*/bootloader/*.map',
'**/build*/bootloader/*.elf',
'**/build*/*.map',
'**/build*/*.elf',
# customized
'**/build*/esp_tee/*.map',
'**/build*/esp_tee/*.elf',
'**/build*/gdbinit/*',
]
[gitlab.artifacts.s3.flash]
bucket = "idf-artifacts"
patterns = [
'**/build*/bootloader/*.bin',
'**/build*/*.bin',
'**/build*/partition_table/*.bin',
'**/build*/flasher_args.json',
'**/build*/flash_project_args',
'**/build*/config/sdkconfig.json',
'**/build*/sdkconfig',
'**/build*/project_description.json',
# customized
'**/build*/esp_tee/*.bin',
]
[gitlab.artifacts.s3.log]
bucket = "idf-artifacts"
patterns = [
'**/build*/build_log.txt',
'**/build*/size*.json',
]
[gitlab.artifacts.s3.junit]
bucket = "idf-artifacts"
patterns = [
'**/XUNIT_RESULT_*.xml',
'**/build_summary_*.xml',
]
[gitlab.artifacts.s3.env]
bucket = "idf-artifacts"
patterns = [
'**/pipeline.env',
]
[gitlab.artifacts.s3.longterm]
bucket = "longterm"
if_clause = '"$CI_COMMIT_REF_NAME" == "master"'
patterns = [
'**/build*/size*.json',
]

View File

@@ -1,7 +1,7 @@
[mypy]
# Specifies the Python version used to parse and check the target program
python_version = 3.10
python_version = 3.9
# Disallows defining functions without type annotations or with incomplete type annotations
# True => enforce type annotation in all function definitions

View File

@@ -1,15 +1,9 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [pre-commit]
default_stages: [commit]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.7"
hooks:
- id: ruff-format
- id: ruff
args: [ "--fix", "--show-fixes" ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
@@ -20,7 +14,6 @@ repos:
# 2 - any file matching *test*/*expected* (for host tests, if possible use this naming pattern always)
# 3 - any directory named 'testdata'
# 4 - protobuf auto-generated files
# 5 - COPYING files
exclude: &whitespace_excludes |
(?x)^(
.+\.(md|rst|map|bin)|
@@ -30,10 +23,7 @@ repos:
.*.pb-c.h|
.*.pb-c.c|
.*.yuv|
.*.rgb|
.*.gray|
.*COPYING.*|
docs/sphinx-known-warnings\.txt
.*.rgb
)$
- id: end-of-file-fixer
exclude: *whitespace_excludes
@@ -47,8 +37,23 @@ repos:
- id: no-commit-to-branch
name: Do not use uppercase letters in the branch name
args: ['--pattern', '^[^A-Z]*[A-Z]']
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
args: ['--config=.flake8', '--tee', '--benchmark']
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
name: Reorder Python imports
args: [--py38-plus]
exclude: >
(?x)^(
.*_pb2.py
)$
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.2.6
hooks:
- id: codespell
- repo: local
@@ -144,7 +149,7 @@ repos:
require_serial: true
additional_dependencies:
- PyYAML == 5.3.1
- idf-build-apps~=2.13
- idf-build-apps~=2.5
- id: sort-yaml-files
name: sort yaml files
entry: tools/ci/sort_yaml.py
@@ -159,6 +164,15 @@ repos:
files: 'tools/ci/sort_yaml\.py$'
additional_dependencies:
- ruamel.yaml
- id: check-build-test-rules-path-exists
name: check path in .build-test-rules.yml exists
entry: tools/ci/check_build_test_rules.py check-exist
language: python
additional_dependencies:
- PyYAML == 5.3.1
always_run: true
pass_filenames: false
require_serial: true
- id: cleanup-ignore-lists
name: Remove non-existing patterns from ignore lists
entry: tools/ci/cleanup_ignore_lists.py
@@ -177,19 +191,14 @@ repos:
rev: v4.0.1
hooks:
- id: file-contents-sorter
files: "tools/ci/(\
executable-list\\.txt\
|mypy_ignore_list\\.txt\
|check_copyright_ignore\\.txt\
|exclude_check_tools_files\\.txt\
)"
files: 'tools\/ci\/(executable-list\.txt|mypy_ignore_list\.txt|check_copyright_ignore\.txt)'
- repo: https://github.com/espressif/check-copyright/
rev: v1.1.1
rev: v1.0.3
hooks:
- id: check-copyright
args: ['--ignore', 'tools/ci/check_copyright_ignore.txt', '--config', 'tools/ci/check_copyright_config.yaml']
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.10.0
rev: v1.7.0
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]
@@ -210,11 +219,6 @@ repos:
name: shellcheck dash (export.sh)
args: ['--shell', 'dash', '-x']
files: 'export.sh'
- repo: https://github.com/espressif/esp-pwsh-check
rev: v1.0.1
hooks:
- id: check-powershell-scripts
stages: [manual]
- repo: https://github.com/espressif/esp-idf-sbom.git
rev: v0.13.0
hooks:
@@ -227,7 +231,7 @@ repos:
name: Lint rST files in docs folder using Sphinx Lint
files: ^(docs/en|docs/zh_CN)/.*\.(rst|inc)$
- repo: https://github.com/espressif/esp-idf-kconfig.git
rev: v3.2.0
rev: v2.5.0
hooks:
- id: check-kconfig-files
- id: check-deprecated-kconfig-options

641
.pylintrc Normal file
View File

@@ -0,0 +1,641 @@
[MAIN]
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Clear in-memory caches upon conclusion of linting. Useful if running pylint
# in a server-like mode.
clear-cache-post-run=no
# Load and enable all available extensions. Use --list-extensions to see a list
# all available extensions.
#enable-all-extensions=
# In error mode, messages with a category besides ERROR or FATAL are
# suppressed, and no reports are done by default. Error mode is compatible with
# disabling specific errors.
#errors-only=
# Always return a 0 (non-error) status code, even if lint errors are found.
# This is primarily useful in continuous integration scripts.
#exit-zero=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-allow-list=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
# for backward compatibility.)
extension-pkg-whitelist=
# Return non-zero exit code if any of these messages/categories are detected,
# even if score is above --fail-under value. Syntax same as enable. Messages
# specified are enabled, while categories only check already-enabled messages.
fail-on=
# Specify a score threshold under which the program will exit with error.
fail-under=10
# Interpret the stdin as a python script, whose filename needs to be passed as
# the module_or_package argument.
#from-stdin=
# Files or directories to be skipped. They should be base names, not paths.
ignore=CVS
# Add files or directories matching the regular expressions patterns to the
# ignore-list. The regex matches against paths and can be in Posix or Windows
# format. Because '\\' represents the directory delimiter on Windows systems,
# it can't be used as an escape character.
ignore-paths=
# Files or directories matching the regular expression patterns are skipped.
# The regex matches against base names, not paths. The default value ignores
# Emacs file locks
ignore-patterns=^\.#
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.8
# Discover python modules and packages in the file system subtree.
recursive=no
# Add paths to the list of the source roots. Supports globbing patterns. The
# source root is an absolute path or a path relative to the current working
# directory used to determine a package namespace for modules located under the
# source root.
source-roots=
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# In verbose mode, extra non-checker-related info will be displayed.
#verbose=
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style. If left empty, argument names will be checked with the set
# naming style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style. If left empty, attribute names will be checked with the set naming
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style. If left empty, class attribute names will be checked
# with the set naming style.
#class-attribute-rgx=
# Naming style matching correct class constant names.
class-const-naming-style=UPPER_CASE
# Regular expression matching correct class constant names. Overrides class-
# const-naming-style. If left empty, class constant names will be checked with
# the set naming style.
#class-const-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style. If left empty, class names will be checked with the set naming style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style. If left empty, constant names will be checked with the set naming
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style. If left empty, function names will be checked with the set
# naming style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
ex,
Run,
_
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style. If left empty, inline iteration names will be checked
# with the set naming style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style. If left empty, method names will be checked with the set naming style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style. If left empty, module names will be checked with the set naming style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Regular expression matching correct type alias names. If left empty, type
# alias names will be checked with the set naming style.
#typealias-rgx=
# Regular expression matching correct type variable names. If left empty, type
# variable names will be checked with the set naming style.
#typevar-rgx=
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style. If left empty, variable names will be checked with the set
# naming style.
#variable-rgx=
[CLASSES]
# Warn about protected attribute access inside special methods
check-protected-access-in-special-methods=no
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp,
asyncSetUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
[DESIGN]
# List of regular expressions of class ancestor names to ignore when counting
# public methods (see R0903)
exclude-too-few-public-methods=
# List of qualified class names to ignore when counting class parents (see
# R0901)
ignored-parents=
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[EXCEPTIONS]
# Exceptions that will emit a warning when caught.
overgeneral-exceptions=builtins.BaseException,builtins.Exception
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=160
# Maximum number of lines in a module.
max-module-lines=1000
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow explicit reexports by alias from a package __init__.
allow-reexport-from-package=no
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=
# Output a graph (.gv or any supported image format) of external dependencies
# to the given file (report RP0402 must not be disabled).
ext-import-graph=
# Output a graph (.gv or any supported image format) of all (i.e. internal and
# external) dependencies to the given file (report RP0402 must not be
# disabled).
import-graph=
# Output a graph (.gv or any supported image format) of internal dependencies
# to the given file (report RP0402 must not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
# UNDEFINED.
confidence=HIGH,
CONTROL_FLOW,
INFERENCE,
INFERENCE_FAILURE,
UNDEFINED
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
missing-function-docstring, # Modified since here, include this line
missing-class-docstring,
missing-module-docstring,
wrong-import-order,
invalid-name,
too-few-public-methods,
too-many-locals,
ungrouped-imports, # since we have isort in pre-commit
no-name-in-module, # since we have flake8 to check this
too-many-instance-attributes,
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
[METHOD_ARGS]
# List of qualified names (i.e., library.method) which require a timeout
# parameter e.g. 'requests.api.get,requests.api.post'
timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
# Regular expression of note tags to take in consideration.
notes-rgx=
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit,argparse.parse_error
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
# 'convention', and 'info' which contain the number of messages in each
# category, as well as 'statement' which is the total number of statements
# analyzed. This score is used by the global evaluation report (RP0004).
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
#output-format=
# Tells whether to display a full report or only the messages.
reports=no
# Activate the evaluation score.
score=yes
[SIMILARITIES]
# Comments are removed from the similarity computation
ignore-comments=yes
# Docstrings are removed from the similarity computation
ignore-docstrings=yes
# Imports are removed from the similarity computation
ignore-imports=yes
# Signatures are removed from the similarity computation
ignore-signatures=yes
# Minimum lines number of a similarity.
min-similarity-lines=4
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. No available dictionaries : You need to install
# both the python package and the system dependency for enchant to work..
spelling-dict=
# List of comma separated words that should be considered directives if they
# appear at the beginning of a comment and should not be checked.
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains the private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to the private dictionary (see the
# --spelling-private-dict-file option) instead of raising a message.
spelling-store-unknown-words=no
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of symbolic message names to ignore for Mixin members.
ignored-checks-for-mixins=no-member,
not-async-context-manager,
not-context-manager,
attribute-defined-outside-init
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
# Regex pattern to define which classes are considered mixins.
mixin-class-rgx=.*[Mm]ixin
# List of decorators that change the signature of a decorated function.
signature-mutators=
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io

21
.readthedocs.yml Normal file
View File

@@ -0,0 +1,21 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
# Optionally set the version of Python and requirements required to build your docs
python:
version: 2.7
install:
- requirements: docs/requirements.txt
# We need to list all the submodules included in documenation build by Doxygen
submodules:
include:
- components/mqtt/esp-mqtt

View File

@@ -1,63 +1,24 @@
cmake_minimum_required(VERSION 3.22)
cmake_minimum_required(VERSION 3.16)
project(esp-idf C CXX ASM)
if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Current directory '${CMAKE_CURRENT_LIST_DIR}' is not buildable. "
"Change directories to one of the example projects in '${CMAKE_CURRENT_LIST_DIR}/examples' and try again.")
"Change directories to one of the example projects in '${CMAKE_CURRENT_LIST_DIR}/examples' and try "
"again.")
endif()
project(esp-idf C CXX ASM)
# Variables compile_options, c_compile_options, cxx_compile_options, compile_definitions, link_options shall
# not be unset as they may already contain flags, set by toolchain-TARGET.cmake files.
# Add the following build specifications here, since these seem to be dependent
# on config values on the root Kconfig.
if(BOOTLOADER_BUILD)
if(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Oz")
else()
list(APPEND compile_options "-Os")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND compile_options "-freorder-blocks")
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
list(APPEND compile_options "-mno-target-align")
endif()
endif()
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG)
list(APPEND compile_options "-Og")
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX)
list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size
endif()
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF)
list(APPEND compile_options "-O2")
endif()
elseif(ESP_TEE_BUILD)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Oz")
else()
list(APPEND compile_options "-Os")
list(APPEND compile_options "-freorder-blocks")
endif()
else()
if(NOT BOOTLOADER_BUILD)
if(CONFIG_COMPILER_OPTIMIZATION_SIZE)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Oz")
else()
list(APPEND compile_options "-Os")
endif()
list(APPEND compile_options "-Os")
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND compile_options "-freorder-blocks")
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
list(APPEND compile_options "-mno-target-align")
endif()
endif()
elseif(CONFIG_COMPILER_OPTIMIZATION_DEBUG)
list(APPEND compile_options "-Og")
@@ -70,6 +31,24 @@ else()
list(APPEND compile_options "-O2")
endif()
else() # BOOTLOADER_BUILD
if(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE)
list(APPEND compile_options "-Os")
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND compile_options "-freorder-blocks")
endif()
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG)
list(APPEND compile_options "-Og")
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX)
list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size
endif()
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE)
list(APPEND compile_options "-O0")
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF)
list(APPEND compile_options "-O2")
endif()
endif()
if(CONFIG_COMPILER_CXX_EXCEPTIONS)
@@ -109,6 +88,8 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-Wno-char-subscripts")
# Clang seems to notice format string issues which GCC doesn't.
list(APPEND compile_options "-Wno-format-security")
# Logic bug in essl component
list(APPEND compile_options "-Wno-tautological-overlap-compare")
# Some pointer checks in mDNS component check addresses which can't be NULL
list(APPEND compile_options "-Wno-tautological-pointer-compare")
# Similar to the above, in tcp_transport
@@ -159,10 +140,6 @@ if(CONFIG_COMPILER_NO_MERGE_CONSTANTS)
list(APPEND compile_options "-fno-merge-constants")
endif()
if(CONFIG_COMPILER_ENABLE_TEXT_SECTION_LITERALS)
list(APPEND compile_options "-mtext-section-literals")
endif()
if(CONFIG_COMPILER_STACK_CHECK_MODE_NORM)
list(APPEND compile_options "-fstack-protector")
elseif(CONFIG_COMPILER_STACK_CHECK_MODE_STRONG)
@@ -175,20 +152,50 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
list(APPEND compile_options "-fdump-rtl-expand")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 15.0)
list(APPEND c_compile_options "-fzero-init-padding-bits=all" "-fno-malloc-dce")
endif()
idf_build_set_property(GDBINIT_FILES_PREFIX_MAP "${BUILD_DIR}/gdbinit/prefix_map")
file(MAKE_DIRECTORY "${BUILD_DIR}/gdbinit")
file(WRITE "${BUILD_DIR}/gdbinit/prefix_map" "")
if(CONFIG_COMPILER_CXX_GLIBCXX_CONSTEXPR_COLD_CONSTEXPR)
list(APPEND cxx_compile_options "-D_GLIBCXX20_CONSTEXPR=__attribute__((cold)) constexpr")
list(APPEND cxx_compile_options "-D_GLIBCXX23_CONSTEXPR=__attribute__((cold)) constexpr")
elseif(CONFIG_COMPILER_CXX_GLIBCXX_CONSTEXPR_COLD)
list(APPEND cxx_compile_options "-D_GLIBCXX20_CONSTEXPR=__attribute__((cold))")
list(APPEND cxx_compile_options "-D_GLIBCXX23_CONSTEXPR=__attribute__((cold))")
endif()
if(NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS 8.0.0)
if(CONFIG_COMPILER_HIDE_PATHS_MACROS)
list(APPEND compile_options "-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=.")
list(APPEND compile_options "-fmacro-prefix-map=${IDF_PATH}=/IDF")
endif()
__generate_prefix_map(prefix_map_compile_options)
list(APPEND compile_options ${prefix_map_compile_options})
if(CONFIG_APP_REPRODUCIBLE_BUILD)
idf_build_set_property(DEBUG_PREFIX_MAP_GDBINIT "${BUILD_DIR}/prefix_map_gdbinit")
list(APPEND compile_options "-fdebug-prefix-map=${IDF_PATH}=/IDF")
list(APPEND compile_options "-fdebug-prefix-map=${PROJECT_DIR}=/IDF_PROJECT")
list(APPEND compile_options "-fdebug-prefix-map=${BUILD_DIR}=/IDF_BUILD")
# component dirs
idf_build_get_property(python PYTHON)
idf_build_get_property(idf_path IDF_PATH)
idf_build_get_property(component_dirs BUILD_COMPONENT_DIRS)
execute_process(
COMMAND ${python}
"${idf_path}/tools/generate_debug_prefix_map.py"
"${BUILD_DIR}"
"${component_dirs}"
OUTPUT_VARIABLE result
RESULT_VARIABLE ret
)
if(NOT ret EQUAL 0)
message(FATAL_ERROR "This is a bug. Please report to https://github.com/espressif/esp-idf/issues")
endif()
spaces2list(result)
list(LENGTH component_dirs length)
math(EXPR max_index "${length} - 1")
foreach(index RANGE ${max_index})
list(GET component_dirs ${index} folder)
list(GET result ${index} after)
list(APPEND compile_options "-fdebug-prefix-map=${folder}=${after}")
endforeach()
endif()
endif()
if(CONFIG_COMPILER_DISABLE_GCC12_WARNINGS)
list(APPEND compile_options "-Wno-address"
@@ -202,31 +209,10 @@ if(CONFIG_COMPILER_DISABLE_GCC13_WARNINGS)
"-Wno-dangling-reference")
endif()
if(CONFIG_COMPILER_DISABLE_GCC14_WARNINGS)
list(APPEND compile_options "-Wno-calloc-transposed-args")
endif()
if(CONFIG_COMPILER_DISABLE_GCC15_WARNINGS)
list(APPEND c_compile_options "-Wno-unterminated-string-initialization")
list(APPEND c_compile_options "-Wno-header-guard")
list(APPEND cxx_compile_options "-Wno-self-move")
list(APPEND cxx_compile_options "-Wno-template-body")
list(APPEND cxx_compile_options "-Wno-dangling-reference")
list(APPEND cxx_compile_options "-Wno-defaulted-function-deleted")
endif()
if(CONFIG_COMPILER_DISABLE_DEFAULT_ERRORS)
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
idf_build_replace_option_from_property(COMPILE_OPTIONS "-Werror" "-Werror=all")
endif()
endif()
# GCC-specific options
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
list(APPEND compile_options "-fstrict-volatile-bitfields")
if(CONFIG_COMPILER_STATIC_ANALYZER)
list(APPEND compile_options "-fanalyzer")
endif()
list(APPEND compile_options "-fstrict-volatile-bitfields"
)
endif()
if(CONFIG_ESP_SYSTEM_USE_EH_FRAME)
@@ -234,13 +220,6 @@ if(CONFIG_ESP_SYSTEM_USE_EH_FRAME)
list(APPEND link_options "-Wl,--eh-frame-hdr")
endif()
if(CONFIG_ESP_SYSTEM_USE_FRAME_POINTER)
list(APPEND compile_options "-fno-omit-frame-pointer")
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
list(APPEND compile_options "-mno-omit-leaf-frame-pointer")
endif()
endif()
list(APPEND link_options "-fno-lto")
if(CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
@@ -294,9 +273,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
list(APPEND compile_options "-fno-use-cxa-atexit") # TODO IDF-10934
else()
list(APPEND cxx_compile_options "-fuse-cxa-atexit")
list(APPEND compile_options "-fno-use-cxa-atexit")
endif()
if(COMPILER_RT_LIB_NAME)
@@ -332,12 +309,3 @@ foreach(component_target ${build_component_targets})
endif()
set(__idf_component_context 0)
endforeach()
# Run component validation checks after all components have been processed
# Only run validation for the main project, not subprojects like bootloader
idf_build_get_property(bootloader_build BOOTLOADER_BUILD)
idf_build_get_property(esp_tee_build ESP_TEE_BUILD)
if(NOT bootloader_build AND NOT esp_tee_build)
include("${CMAKE_CURRENT_LIST_DIR}/tools/cmake/component_validation.cmake")
__component_validation_run_checks()
endif()

View File

@@ -8,9 +8,9 @@ This document describes the compatibility between ESP-IDF releases and Espressif
NOTE: This document on release branches may be out-of-date. Check the [Compatibility file on master](https://github.com/espressif/esp-idf/blob/master/COMPATIBILITY.md) for the most accurate information.
See [Compatibility Advisory for Chip Revision Numbering Scheme](https://www.espressif.com/sites/default/files/advisory_downloads/AR2022-005%20Compatibility%20Advisory%20for%20Chip%20Revision%20Numbering%20%20Scheme.pdf) on the versioning of Espressif SoC revisions.
See [Compatibility Advisory for Chip Revision Numbering Scheme](https://www.espressif.com.cn/sites/default/files/advisory_downloads/AR2022-005%20Compatibility%20Advisory%20for%20Chip%20Revision%20Numbering%20%20Scheme.pdf) on the versioning of Espressif SoC revisions.
You can run `esptool chip-id` to detect the series and revision of an SoC. See [SoC Errata](https://www.espressif.com/en/support/documents/technical-documents?keys=errata) for more on how to distinguish between chip revisions, and the improvements provided by chip revisions. And run `idf.py --version` to know the version of current ESP-IDF.
You can run `esptool chip_id` to detect the series and revision of an SoC. See [SoC Errata](https://www.espressif.com.cn/en/support/documents/technical-documents?keys=errata) for more on how to distinguish between chip revisions, and the improvements provided by chip revisions. And run `idf.py --version` to know the version of current ESP-IDF.
## ESP-IDF Support for Different Chip Revisions
@@ -84,30 +84,17 @@ Supported since ESP-IDF v4.4.
### ESP32-C2 & ESP8684
#### v1.0, v1.1
#### v1.0
Supported since ESP-IDF v5.0.
#### v1.1
To be added.
#### v1.2
| Release branch | Recommended | Required |
|------------------------|-------------|----------|
| release/v5.0 | v5.0.7+ | v5.0 |
| release/v5.1 | v5.1.4+ | v5.1 |
| release/v5.2 | v5.2.2+ | v5.2 |
| release/v5.3 and above | v5.3+ | v5.3 |
#### v2.0
| Release branch | Recommended | Required |
|------------------------|-------------|----------|
| release/v5.0 | v5.0.8+ | v5.0.8 |
| release/v5.1 | v5.1.5+ | v5.1.5* |
| release/v5.2 | v5.2.4+ | v5.2.4 |
| release/v5.3 | v5.3.2+ | v5.3.2* |
| release/v5.4 and above | v5.4+ | v5.4 |
Note: IDF v5.1.5 and v5.3.2 are compatible with C2 v2.0. However the chip revision check hasn't been updated on these releases. Enable `ESP32C2_REV2_DEVELOPMENT` config to bypass the outdated check.
To be added.
### ESP32-C6
@@ -115,37 +102,12 @@ Note: IDF v5.1.5 and v5.3.2 are compatible with C2 v2.0. However the chip revisi
Supported since ESP-IDF v5.1.
#### v0.2
| Release branch | Recommended | Required |
|------------------------|-------------|----------|
| release/v5.1 | v5.1.5+ | v5.1 |
| release/v5.2 | v5.2.4+ | v5.2 |
| release/v5.3 | v5.3.2+ | v5.3 |
| release/v5.4 and above | v5.4+ | v5.4 |
### ESP32-H2
#### v0.1, v0.2
Supported since ESP-IDF v5.1.
#### v1.2
| Release branch | Recommended | Required |
|------------------------|-------------|----------|
| release/v5.1 | v5.1.6+ | v5.1.6 |
| release/v5.2 | v5.2.5+ | v5.2.5 |
| release/v5.3 | v5.3.3+ | v5.3.3 |
| release/v5.4 | v5.4.1+ | v5.4.1 |
| release/v5.5 and above | v5.5+ | v5.5 |
### ESP32-P4
#### v1.0, v1.3
Supported since ESP-IDF v5.3.
## What If the ESP-IDF Version Is Lower than the `Required` Version?
Latest ESP-IDF versions can prevent from downloading to, or even execute binaries on unsupported chips. ESP-IDF of versions v4.4.5+, v5.0.1+, v5.1 and above have both esptool download check and bootloader loading check against the chip revision. While ESP-IDF v4.3.5 has only esptool downloading check.

View File

@@ -10,7 +10,7 @@
有关乐鑫芯片版本的编码方式,请参考 [关于芯片版本 (Chip Revision) 编码方式的兼容性公告](https://www.espressif.com/sites/default/files/advisory_downloads/AR2022-005%20%E5%85%B3%E4%BA%8E%E8%8A%AF%E7%89%87%E7%89%88%E6%9C%AC%E7%BC%96%E7%A0%81%E6%96%B9%E5%BC%8F%20%28Chip%20Revision%29%20%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E5%85%AC%E5%91%8A.pdf)。
运行 `esptool chip-id` 可查看芯片系列及其版本。有关区分芯片版本及版本改进内容的更多信息,请参考 [芯片勘误表](https://www.espressif.com.cn/zh-hans/support/documents/technical-documents?keys=%E5%8B%98%E8%AF%AF%E8%A1%A8)。运行 `idf.py --version` 可查看当前的 ESP-IDF 版本。
运行 `esptool chip_id` 可查看芯片系列及其版本。有关区分芯片版本及版本改进内容的更多信息,请参考 [芯片勘误表](https://www.espressif.com.cn/zh-hans/support/documents/technical-documents?keys=%E5%8B%98%E8%AF%AF%E8%A1%A8)。运行 `idf.py --version` 可查看当前的 ESP-IDF 版本。
## ESP-IDF 对各芯片版本的支持
@@ -84,30 +84,17 @@
### ESP32-C2 & ESP8684
#### v1.0, v1.1
#### v1.0
从 ESP-IDF v5.0 开始支持。
#### v1.1
待更新。
#### v1.2
| 发布分支 | 推荐版本 | 需求版本 |
|------------------------|-------------|----------|
| release/v5.0 | v5.0.7+ | v5.0 |
| release/v5.1 | v5.1.4+ | v5.1 |
| release/v5.2 | v5.2.2+ | v5.1 |
| release/v5.3 及以上 | v5.3+ | v5.3 |
#### v2.0
| 发布分支 | 推荐版本 | 需求版本 |
|------------------------|-------------|----------|
| release/v5.0 | v5.0.8+ | v5.0.8 |
| release/v5.1 | v5.1.5+ | v5.1.5* |
| release/v5.2 | v5.2.4+ | v5.2.4 |
| release/v5.3 | v5.3.2+ | v5.3.2* |
| release/v5.4 及以上 | v5.4+ | v5.4 |
提示: IDF v5.1.5 及 v5.3.2 与 C2 v2.0 兼容,但芯片版本检查尚未在这些发布版本更新。使能 `ESP32C2_REV2_DEVELOPMENT` 选项来跳过这些过时的检查。
待更新。
### ESP32-C6
@@ -115,36 +102,12 @@
从 ESP-IDF v5.1 开始支持。
#### v0.2
| 发布分支 | 推荐版本 | 需求版本 |
|------------------------|-------------|----------|
| release/v5.1 | v5.1.5+ | v5.1 |
| release/v5.2 | v5.2.4+ | v5.2 |
| release/v5.3 | v5.3.2+ | v5.3 |
| release/v5.4 及以上 | v5.4+ | v5.4 |
### ESP32-H2
#### v0.1, v0.2
从 ESP-IDF v5.1 开始支持。
#### v1.2
| 发布分支 | 推荐版本 | 需求版本 |
|------------------------|-------------|----------|
| release/v5.1 | v5.1.6+ | v5.1.6 |
| release/v5.2 | v5.2.5+ | v5.2.5 |
| release/v5.3 | v5.3.3+ | v5.3.3 |
| release/v5.4 | v5.4.1+ | v5.4.1 |
| release/v5.5 及以上 | v5.5+ | v5.5 |
### ESP32-P4
#### v1.0, v1.3
从 ESP-IDF v5.3 开始支持。
## 如果 ESP-IDF 版本低于 `需求版本` 会出现什么情况?

205
Kconfig
View File

@@ -48,10 +48,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
bool
default "y" if IDF_TOOLCHAIN="clang"
config IDF_TOOLCHAIN_GCC
bool
default "y" if IDF_TOOLCHAIN="gcc"
config IDF_TARGET_ARCH_RISCV
bool
default "n"
@@ -119,6 +115,28 @@ mainmenu "Espressif IoT Development Framework Configuration"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
# TODO: IDF-9197
choice IDF_TARGET_ESP32C5_VERSION
prompt "ESP32-C5 version"
depends on IDF_TARGET_ESP32C5
default IDF_TARGET_ESP32C5_MP_VERSION
help
ESP32-C5 will support two versions for a period.
This option is for internal use only.
Select the one that matches your chip model.
config IDF_TARGET_ESP32C5_BETA3_VERSION
bool
prompt "ESP32-C5 beta3"
select ESPTOOLPY_NO_STUB
config IDF_TARGET_ESP32C5_MP_VERSION
bool
prompt "ESP32-C5 MP"
select ESPTOOLPY_NO_STUB
select IDF_ENV_FPGA
endchoice
config IDF_TARGET_ESP32P4
bool
default "y" if IDF_TARGET="esp32p4"
@@ -135,28 +153,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
default "y" if IDF_TARGET="esp32c61"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
config IDF_TARGET_ESP32H21
bool
default "y" if IDF_TARGET="esp32h21"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
select IDF_ENV_BRINGUP
select IDF_ENV_FPGA if ESP32H21_SELECTS_REV_MP
config IDF_TARGET_ESP32H4
bool
default "y" if IDF_TARGET="esp32h4"
select IDF_TARGET_ARCH_RISCV
select IDF_ENV_BRINGUP
select IDF_ENV_FPGA if ESP32H4_SELECTS_REV_MP
config IDF_TARGET_ESP32S31
bool
default "y" if IDF_TARGET="esp32s31"
select IDF_TARGET_ARCH_RISCV
select IDF_ENV_FPGA
select IDF_ENV_BRINGUP
config IDF_TARGET_LINUX
bool
@@ -172,11 +169,9 @@ mainmenu "Espressif IoT Development Framework Configuration"
default 0x000D if IDF_TARGET_ESP32C6
default 0x0010 if IDF_TARGET_ESP32H2
default 0x0012 if IDF_TARGET_ESP32P4
default 0x0017 if IDF_TARGET_ESP32C5
default 0x0011 if IDF_TARGET_ESP32C5 && IDF_TARGET_ESP32C5_BETA3_VERSION # TODO: IDF-9197
default 0x0017 if IDF_TARGET_ESP32C5 && IDF_TARGET_ESP32C5_MP_VERSION # TODO: IDF-9197
default 0x0014 if IDF_TARGET_ESP32C61
default 0x0019 if IDF_TARGET_ESP32H21
default 0x001C if IDF_TARGET_ESP32H4
default 0x0020 if IDF_TARGET_ESP32S31
default 0xFFFF
@@ -227,10 +222,10 @@ mainmenu "Espressif IoT Development Framework Configuration"
When loading the BIN with UART, the ROM will jump to ram and run the app after finishing the ROM
startup code, so there's no additional startup initialization required. You can use the
`load-ram` in esptool to load the generated .bin file into ram and execute.
`load_ram` in esptool.py to load the generated .bin file into ram and execute.
Example:
esptool --chip {chip} -p {port} -b {baud} --no-stub load-ram {app.bin}
esptool.py --chip {chip} -p {port} -b {baud} --no-stub load_ram {app.bin}
Recommended sdkconfig.defaults for building loadable ELF files is as follows.
CONFIG_APP_BUILD_TYPE_RAM is required, other options help reduce application
@@ -238,7 +233,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
CONFIG_APP_BUILD_TYPE_RAM=y
CONFIG_VFS_SUPPORT_TERMIOS=
CONFIG_LIBC_NEWLIB_NANO_FORMAT=y
CONFIG_NEWLIB_NANO_FORMAT=y
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_ESP_DEBUG_STUBS_ENABLE=
CONFIG_ESP_ERR_TO_NAME_LOOKUP=
@@ -348,8 +343,8 @@ mainmenu "Espressif IoT Development Framework Configuration"
help
This option sets compiler optimization level (gcc -O argument) for the app.
- The "Debug" setting will add the -Og flag to CFLAGS.
- The "Size" setting will add the -Os flag to CFLAGS (-Oz with Clang).
- The "Debug" setting will add the -0g flag to CFLAGS.
- The "Size" setting will add the -0s flag to CFLAGS.
- The "Performance" setting will add the -O2 flag to CFLAGS.
- The "None" setting will add the -O0 flag to CFLAGS.
@@ -370,7 +365,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
config COMPILER_OPTIMIZATION_DEBUG
bool "Debug (-Og)"
config COMPILER_OPTIMIZATION_SIZE
bool "Optimize for size (-Os with GCC, -Oz with Clang)"
bool "Optimize for size (-Os)"
config COMPILER_OPTIMIZATION_PERF
bool "Optimize for performance (-O2)"
config COMPILER_OPTIMIZATION_NONE
@@ -378,27 +373,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
endchoice
config COMPILER_ENABLE_RISCV_ZCMP
bool "Enable RISCV ZCMP extension"
depends on SOC_CPU_ZCMP_WORKAROUND
default n
help
Enable the RISC-V ZCMP (Compressed Macro) extension to reduce binary size
by optimizing function prologue and epilogue sequences.
Note: Due to a hardware issue on some ESP32 chips (e.g., ESP32C5, ESP32C61,
ESP32H4), executing "cm.push" may re-enable interrupts even when global
interrupts are disabled (mstatus.mie = 0). This can cause unexpected interrupts
during CPU retention or within critical sections.
Workarounds are implemented in the IDF codebase. However, if user code
directly disables interrupts, additional actions may be required. Refer
to code examples under the SOC_CPU_ZCMP_WORKAROUND macro, or disable
the ZCMP extension for source files that contain functions which may
execute while mstatus.mie = 0.
Even with these workarounds, the issue may still affect dual-core variants.
choice COMPILER_OPTIMIZATION_ASSERTION_LEVEL
prompt "Assertion level"
default COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
@@ -434,18 +408,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
endchoice # assertions
config COMPILER_ASSERT_NDEBUG_EVALUATE
bool "Enable the evaluation of the expression inside assert(X) when NDEBUG is set"
default n
help
When NDEBUG is set, assert(X) will not cause code to trigger an assertion.
With this option set, assert(X) will still evaluate the expression X, though
the result will never cause an assertion. This means that if X is a function
then the function will be called.
This is not according to the standard, which states that the assert(X) should
be replaced with ((void)0) if NDEBUG is defined.
choice COMPILER_FLOAT_LIB_FROM
prompt "Compiler float lib source"
default COMPILER_FLOAT_LIB_FROM_RVFPLIB if ESP_ROM_HAS_RVFPLIB
@@ -576,20 +538,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
distribution is more uniform across libraries. On downside, it may increase
the binary size and hence should be used during development phase only.
config COMPILER_ENABLE_TEXT_SECTION_LITERALS
bool
depends on IDF_TOOLCHAIN_GCC
depends on IDF_TARGET_ARCH_XTENSA
default y if ESPTOOLPY_FAST_REFLASHING
help
Intersperse Xtensa literals within the text section to keep
them as close as possible to their references. This prevents
literals from being placed into a separate section in the
output file and prevents the linker from combining literal
pools from different object files. Enabling this is necessary
for fast reflashing to prevent mixing code from mutable and
immutable libraries.
config COMPILER_WARN_WRITE_STRINGS
bool "Enable -Wwrite-strings warning flag"
default "n"
@@ -616,20 +564,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
This option can be enabled for RISC-V targets only.
config COMPILER_DISABLE_DEFAULT_ERRORS
bool "Disable errors for default warnings"
default "n"
help
Enable this option if you do not want default warnings to be considered as errors,
especially when updating IDF.
This is a temporary flag that could help to allow upgrade while having
some time to address the warnings raised by those default warnings.
Alternatives are:
1) fix code (preferred),
2) remove specific warnings,
3) do not consider specific warnings as error.
config COMPILER_DISABLE_GCC12_WARNINGS
bool "Disable new warnings introduced in GCC 12"
default "n"
@@ -644,20 +578,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
Enable this option if use GCC 13 or newer, and want to disable warnings which don't appear with
GCC 12.
config COMPILER_DISABLE_GCC14_WARNINGS
bool "Disable new warnings introduced in GCC 14"
default "n"
help
Enable this option if use GCC 14 or newer, and want to disable warnings which don't appear with
GCC 13.
config COMPILER_DISABLE_GCC15_WARNINGS
bool "Disable new warnings introduced in GCC 15"
default "n"
help
Enable this option if use GCC 15 or newer, and want to disable warnings which don't appear with
GCC 14.
config COMPILER_DUMP_RTL_FILES
bool "Dump RTL files during compilation"
help
@@ -694,7 +614,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
choice COMPILER_ORPHAN_SECTIONS
prompt "Orphan sections handling"
default COMPILER_ORPHAN_SECTIONS_ERROR
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
@@ -702,11 +622,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
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_ERROR
bool "Fail if orphan sections found"
help
Fails the link step with an error if orphan sections are detected.
config COMPILER_ORPHAN_SECTIONS_WARNING
bool "Place with warning"
help
@@ -718,63 +633,10 @@ mainmenu "Espressif IoT Development Framework Configuration"
Places orphan sections without a warning/error message.
endchoice
config COMPILER_STATIC_ANALYZER
bool "Enable compiler static analyzer"
default "n"
depends on IDF_TOOLCHAIN_GCC
help
Enable compiler static analyzer. This may produce false-positive results and increases compile time.
choice COMPILER_CXX_GLIBCXX_CONSTEXPR
prompt "Define _GLIBCXX_CONSTEXPR"
default COMPILER_CXX_GLIBCXX_CONSTEXPR_NO_CHANGE
depends on IDF_TOOLCHAIN_GCC && !IDF_TARGET_LINUX
help
Modify libstdc++ _GLIBCXX20_CONSTEXPR and _GLIBCXX23_CONSTEXPR definitions to provide size
optimizations. The total size optimization depends on the application's structure.
There is no robust way to determine which option would be better in a particular case.
Please try all available options to find the best size optimization.
config COMPILER_CXX_GLIBCXX_CONSTEXPR_NO_CHANGE
bool "No change"
help
Use default _GLIBCXX20_CONSTEXPR and _GLIBCXX23_CONSTEXPR defined in libstdc++
config COMPILER_CXX_GLIBCXX_CONSTEXPR_COLD_CONSTEXPR
bool "_GLIBCXX2X_CONSTEXPR=__attribute__((cold)) constexpr"
help
Define _GLIBCXX20_CONSTEXPR=__attribute__((cold)) constexpr
Define _GLIBCXX23_CONSTEXPR=__attribute__((cold)) constexpr
config COMPILER_CXX_GLIBCXX_CONSTEXPR_COLD
bool "_GLIBCXX2X_CONSTEXPR=__attribute__((cold))"
help
Define _GLIBCXX20_CONSTEXPR=__attribute__((cold)).
Define _GLIBCXX23_CONSTEXPR=__attribute__((cold)).
endchoice
endmenu # Compiler Options
menu "Component config"
comment "!!! MINIMAL_BUILD is enabled !!!"
depends on "${IDF_MINIMAL_BUILD}"
comment "Only common components and those transitively required by the main component are listed"
depends on "${IDF_MINIMAL_BUILD}"
comment "If a component configuration is missing, please add it to the main component's requirements"
depends on "${IDF_MINIMAL_BUILD}"
source "$COMPONENT_KCONFIGS_SOURCE_FILE"
menu "Configuration for components not included in the build"
depends on "${IDF_BUILD_V2}"
osource "$COMPONENT_KCONFIGS_EXCLUDED_SOURCE_FILE"
endmenu
endmenu
menu "Project configuration for components not included in the build"
depends on "${IDF_BUILD_V2}"
osource "$COMPONENT_KCONFIGS_PROJBUILD_EXCLUDED_SOURCE_FILE"
endmenu
config IDF_EXPERIMENTAL_FEATURES
@@ -794,8 +656,3 @@ mainmenu "Espressif IoT Development Framework Configuration"
- CONFIG_ESP_WIFI_EAP_TLS1_3
- CONFIG_ESP_WIFI_ENABLE_ROAMING_APP
- CONFIG_USB_HOST_EXT_PORT_RESET_ATTEMPTS
- CONFIG_LIBC_PICOLIBC
- CONFIG_GDMA_ENABLE_WEIGHTED_ARBITRATION
- CONFIG_I3C_MASTER_ENABLED
- CONFIG_MBEDTLS_ESP_IDF_USE_PSA_CRYPTO
- CONFIG_ESPTOOLPY_FAST_REFLASHING

View File

@@ -15,19 +15,17 @@ ESP-IDF is the development framework for Espressif SoCs supported on Windows, Li
The following table shows ESP-IDF support of Espressif SoCs where ![alt text][preview] and ![alt text][supported] denote preview status and support, respectively. The preview support is usually limited in time and intended for beta versions of chips. Please use an ESP-IDF release where the desired SoC is already supported.
|Chip | v5.1 | v5.2 | v5.3 | v5.4 | v5.5 | v6.0 | |
|:----------- |:---------------------: |:---------------------: |:---------------------: | :---------------------: | :-------------------: | :--------------------: |:------------------------------------------------------------------- |
|ESP32 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-C3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32_S3) |
|ESP32-C2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32-C2) |
|ESP32-C6 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32_C6) |
|ESP32-H2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32_H2) |
|ESP32-P4 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32-P4) |
|ESP32-C5 | | | | | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32-C5) |
|ESP32-C61 | | | | | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/products/socs/esp32-c61) |
|ESP32-H4 | | | | | | ![alt text][preview] |[Announcement](https://www.espressif.com/en/news/ESP32-H4) |
|Chip | v4.4 | v5.0 | v5.1 | v5.2 | v5.3 | |
|:----------- | :---------------------:| :---------------------:| :--------------------: | :--------------------: | :--------------------: | :--------------------------------------------------------- |
|ESP32 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-C3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_S3) |
|ESP32-C2 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32-C2) |
|ESP32-C6 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_C6) |
|ESP32-H2 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_H2) |
|ESP32-P4 | | | | | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32-P4) |
|ESP32-C5 | | | | | ![alt text][preview] | [Announcement](https://www.espressif.com/en/news/ESP32-C5) |
[supported]: https://img.shields.io/badge/-supported-green "supported"
[preview]: https://img.shields.io/badge/-preview-orange "preview"
@@ -83,7 +81,7 @@ See the Getting Started guide links above for a detailed setup guide. This is a
## Flashing the Project
When the build finishes, it will print a command line to use `esptool` to flash the chip. However you can also do this automatically by running:
When the build finishes, it will print a command line to use esptool.py to flash the chip. However you can also do this automatically by running:
`idf.py -p PORT flash`

View File

@@ -15,19 +15,17 @@ ESP-IDF 是乐鑫官方推出的物联网开发框架,支持 Windows、Linux
下表总结了乐鑫芯片在 ESP-IDF 各版本中的支持状态,其中 ![alt text][supported] 代表已支持,![alt text][preview] 代表目前处于预览支持状态。预览支持状态通常有时间限制,而且仅适用于测试版芯片。请确保使用与芯片相匹配的 ESP-IDF 版本。
|芯片 | v5.1 | v5.2 | v5.3 | v5.4 | v5.5 | v6.0 | |
|:----------- | :-------------------: | :--------------------: | :--------------------: | :--------------------: | :-------------------: | :-------------------: |:------------------------------------------------------------------------- |
|ESP32 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | |
|ESP32-S2 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | |
|ESP32-C3 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | |
|ESP32-S3 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_S3) |
|ESP32-C2 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-C2) |
|ESP32-C6 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_C6) |
|ESP32-H2 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_H2) |
|ESP32-P4 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-P4) |
|ESP32-C5 | | | | | ![alt text][supported] |![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-C5) |
|ESP32-C61 | | | | | ![alt text][supported] |![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/products/socs/esp32-c61) |
|ESP32-H4 | | | | | |![alt text][preview] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-H4) |
|芯片 | v4.4 | v5.0 | v5.1 | v5.2 | v5.3 | |
|:----------- | :---------------------:| :---------------------:| :--------------------: | :--------------------: | :--------------------: | :-------------------------------------------------------------- |
|ESP32 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-C3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_S3) |
|ESP32-C2 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-C2) |
|ESP32-C6 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_C6) |
|ESP32-H2 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_H2) |
|ESP32-P4 | | | | | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/en/news/ESP32-P4) |
|ESP32-C5 | | | | | ![alt text][preview] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-C5) |
[supported]: https://img.shields.io/badge/-%E6%94%AF%E6%8C%81-green "supported"
[preview]: https://img.shields.io/badge/-%E9%A2%84%E8%A7%88-orange "preview"
@@ -83,7 +81,7 @@ ESP-IDF 中的子模块采用相对路径([详见 .gitmodules 文件](.gitmodu
## 烧写项目
当构建结束,终端会打印出一条命令行,告知如何使用 `esptool` 工具烧写项目到芯片中。但你也可以运行下面这条命令来自动烧写:
当构建结束,终端会打印出一条命令行,告知如何使用 esptool.py 工具烧写项目到芯片中。但你也可以运行下面这条命令来自动烧写:
`idf.py -p PORT flash`
@@ -124,7 +122,7 @@ ESP-IDF 中的子模块采用相对路径([详见 .gitmodules 文件](.gitmodu
* 最新版的文档https://docs.espressif.com/projects/esp-idf/ ,该文档是由本仓库 [docs 目录](docs) 构建得到。
* [初学者指南:主要概念和资源](https://www.bilibili.com/video/BV1114y1r7du/)
* [初学者指南:主要概念和资源](https://www.bilibili.com/video/BV1114y1r7du/)
* 可以前往 [esp32.com 论坛](https://esp32.com/) 提问,挖掘社区资源。

View File

@@ -1,130 +0,0 @@
# ESP-IDF Project Roadmap2025
* [中文版](./ROADMAP_CN.md)
This document outlines the goals of ESP-IDF project and is shared for the convenience of our customers. It is important to clarify that this document is not a binding commitment to our customers. Instead, its primary purpose is to offer a clear roadmap and direction for the project's development. By openly sharing this information, we aim to enhance our customers' understanding, promote transparency and ensure alignment with the overarching objectives of the ESP-IDF project.
## Project Overview
### Project Goals
In both minor and major releases, we integrate new chip support to enhance our product range. By expanding the chip matrix, we broaden the scope of our offerings, catering to a wider audience with diverse needs. This proactive approach ensures that our products remain at the forefront of technological advancements, consistently meeting and exceeding customer expectations.
Furthermore, we prioritize bugfix releases for active branches, focusing on improving the stability and performance of products already in production. By addressing bugs promptly, we aim to enhance the overall user experience and provide tangible benefits to customers relying on our solutions. This proactive maintenance strategy reflects our commitment to delivering reliable, high-quality products to our valued customer base.
Below are the main objectives that ESP-IDF project/teams would like to implement in 2025.
- New Chip Support
- Add support for ESP32-C5
- Add support for ESP32-C61
- More Minor/Major Releases
- Release IDF v5.5 in the middle of 2025
- Release IDF v6.0 at the end of 2025
- More Bugfix Releases
- Release v5.0.8 and v5.0.9 before ESP-IDF v5.0 goes End of Life in May 2025
- Release v5.1.6 and v5.1.7 before ESP-IDF v5.1 goes End of Life in December 2025
- Do more bugfix releases for IDF v5.2 and IDF v5.3 before release/5.2 and release/5.3 enter maintenance period
- Do more bug fixes releases for release/5.4 and release/5.5, and push the two releases to be more stable and production-ready
- Major Changes
- We plan to upgrade MbedTLS to v4.x series in IDF v6.0. In addition, we will also be migrating to newer PSA crypto API as part of this upgrade. Please note that this may involve some breaking changes on the application side for the crypto API usage.
Please note that support status of previous silicones could be found on [ESP-IDF Release and SoC Compatibility](https://github.com/espressif/esp-idf#esp-idf-release-and-soc-compatibility).
### Roadmap Details
The ESP-IDF project prioritizes consistent maintenance and updates to ensure our customers remain at the forefront of technological advancements. Our commitment to ongoing development ensures that customers continuously benefit from the latest innovations in the field.
Moreover, we are dedicated to empowering our customers to leverage newly implemented features and enhanced functionalities through iterative improvements. Our steadfast commitment to pushing boundaries ensures that clients not only keep pace with evolving technology but also extract optimal value from the cutting-edge capabilities of our products.
Below are the main roadmap details for functional areas inside ESP-IDF.
- New Chip Support
- Add the initial support for the mass production version of ESP32-C5 in ESP-IDF v5.5, refer to [ESP32-C5 Support Status](https://github.com/espressif/esp-idf/issues/14021)
- Add the initial support for the mass production version of ESP32-C61 in ESP-IDF v5.5, refer to [ESP32-C61 Support Status](https://developer.espressif.com/pages/chip-support-status/esp32c61/#esp-idf)
- Bugfix releases
- Do bugfix releases v5.0.8 and v5.0.9 and stop maintaining ESP-IDF v5.0 in May 2025
- Do bugfix releases v5.1.6 and v5.1.7 and stop maintaining ESP-IDF v5.1 in December 2025
- Release bugfix IDF v5.2.4, IDF v5.2.5 and IDF v5.2.6 in 2025, and push release/5.2 to maintenance period from February 2025
- Release bugfix IDF v5.3.3 and IDF v5.3.4 in 2025, and push release/5.3 to maintenance period from July 2025
- Do more bug fixes releases for release/5.4 (IDF v5.4.1, IDF v5.4.2, IDF v5.4.3) and release/5.5 (IDF v5.5.1, IDF v5.5.2), and push releases to be more stable and more production-ready
## ESP-IDF Planning information
For the full list of ESP-IDF releases, please visit https://github.com/espressif/esp-idf/releases
All the information provided here is subject to change without notice, due to business reasons and other factors.
### ESP-IDF Major Releases
```mermaid
timeline
title ESP-IDF Major Releases
section 2025 Q1 <br> Major Release Planning
No version planned : N/A
section 2025 Q2 <br> Major Release Planning
No version planned : N/A
section 2025 Q3 <br> Major Release Planning
No version planned : N/A
section 2025 Q4 <br> Major Release Planning
v6.0-beta1 : 2025/11/13
v6.0-beta2 : 2025/12/05
v6.0-RC1 : 2026/01/14
v6.0-RC2 : 2026/02/06
v6.0 : 2026/02/13
```
### ESP-IDF Minor Releases
```mermaid
timeline
title ESP-IDF Minor Releases
section 2025 Q1 <br> Minor Release Planning
No version planned : N/A
section 2025 Q2 <br> Minor Release Planning
v5.5-beta1 : 2025/05/14
v5.5-beta2 : 2025/06/04
section 2025 Q3 <br> Minor Release Planning
v5.5-RC1 : 2025/07/07
v5.5-RC2 : 2025/07/28
v5.5 : 2025/08/04
section 2025 Q4 <br> Minor Release Planning
No version planned : N/A
```
### ESP-IDF Bugfix Releases
```mermaid
timeline
title ESP-IDF Bugfix Releases
section 2025 Q1 <br> Bugfix Release Planning
v5.0.8 : 2025/01/14
v5.1.6 : 2025/02/18
v5.2.4 : 2025/02/23
v5.2.5 : 2025/02/28
v5.4.1 : 2025/03/27
v5.3.3 : 2025/04/04
section 2025 Q2 <br> Bugfix Release Planning
v5.0.9 : 2025/05/16
v5.4.2 : 2025/06/30
section 2025 Q3 <br> Bugfix Release Planning
v5.3.4 : 2025/08/03
v5.2.6 : 2025/09/04
v5.5.1 : 2025/09/11
v5.4.3 : 2025/10/08
section 2025 Q4 <br> Bugfix Release Planning
v5.5.2 : 2025/11/12
v5.1.7 : 2026/01/06
```

View File

@@ -1,130 +0,0 @@
# ESP-IDF 项目路线图 2025
* [English Version](./ROADMAP.md)
本文档概述了 ESP-IDF 项目的年度计划,方便客户据此规划自己的项目周期。需要说明的是该文档并不是我们对客户的约束性承诺。相反,其主要目的是为客户提供 ESP-IDF 项目开发的路线图和方向。通过公开这些信息,我们希望增进客户对 ESP-IDF 项目的理解,提高透明度,并确保与 ESP-IDF 项目的总体目标保持一致。
## 项目总览
### 项目目标
在 ESP-IDF 的主要版本和次要版本中,我们一般会增加对新芯片的支持,以扩展我们的产品线。通过扩展芯片矩阵,拓宽我们的产品范围,并满足广泛受众的各种需求。这样便能保证我们的产品始终处于技术进步的前沿,不断满足客户的需求并超越客户的期望。
此外ESP-IDF 各活跃分支的 Bugfix 版本发布也是我们项目的重中之重,着力提升已量产产品的稳定性和性能。通过及时解决问题,我们期待提升用户的整体体验,切实惠及使用乐鑫解决方案的客户。通过积极维护 ESP-IDF 的各活跃分支,我们践行了对宝贵的客户群提供可靠、高质量产品的承诺。
以下是 ESP-IDF 项目在 2025 年计划实现的主要目标。
* 新芯片支持
* 增加对 ESP32-C5 芯片的支持
* 增加对 ESP32-C61 芯片的支持
* 发布更多的次要和主要版本
* 在 2025 年中发布 IDF v5.5
* 在 2025 年底发布 IDF v6.0
* 发布更多 bugfix 版本
* 在 2025 年 5 月底 IDF v5.0 停止维护之前,发布 IDF v5.0.8 和 IDF v5.0.9
* 在 2025 年 12 月底 IDF v5.1 停止维护之前,发布 IDF v5.1.6 和 IDF v5.1.7
* 在 release/5.2 分支和 release/5.3 分支进入维护周期之前,发布更多 bugfix 版本
* release/5.4 分支和 release/5.5 分支发布更多 bugfix 版本,使这两个分支更加稳定和产品化
* 重大变更
* 我们计划在 IDF v6.0 中将 MbedTLS 版本升级到 v4.x。另外我们还会在升级中迁移到更新版的 PSA 加密 API但请注意这可能会导致应用程序端在使用加密 API 时出现一些非兼容性更新。
请注意,获取之前芯片的支持状态,请参阅 [ESP-IDF 发布和 SoC 兼容性](https://github.com/espressif/esp-idf/blob/master/README_CN.md#esp-idf-与乐鑫芯片)。
### 路线图细节
ESP-IDF 项目重视持续维护和更新,确保我们的客户始终处于技术进步的前沿。我们承诺持续进行开发,并将该领域的最新创新成果呈现给客户。
此外,我们也在给客户赋能,客户通过迭代改进便能接触到新开发的功能和更高的性能。我们在突破技术界限方面的坚定承诺,使客户不仅能接触到最新的技术,还能从我们产品的尖端功能中获取最大价值。
以下是 ESP-IDF 路线图的主要信息。
* 新芯片支持
* 在 ESP-IDF v5.4 中为 ESP32-C5 提供预览支持,并在 ESP-IDF v5.5 中为 ESP32-C5 提供完整支持,参考 [ESP32-C5 支持状态](https://github.com/espressif/esp-idf/issues/14021)
* 在 ESP-IDF v5.4 中增加对 ESP32-C61 早期样品的预览支持,并在 IDF v5.5 中增加对 ESP32-C61 量产版本的完整支持,参考 [ESP32-C61 支持状态](https://developer.espressif.com/pages/chip-support-status/esp32c61/#esp-idf)
* Bugfix 版本发布
* 发布 Bugfix 版本 IDF v5.0.8 和 IDF v5.0.9,并在 2025 年 5 月底停止维护 ESP-IDF v5.0
* 发布 Bugfix 版本 IDF v5.1.6 和 IDF v5.1.7,并在 2025 年 12 月底停止维护 ESP-IDF v5.1
* 发布 Bugfix 版本 IDF v5.2.4IDF v5.2.5 和 IDF v5.2.6release/5.2 分支自 2025 年 2 月进入维护周期
* 发布 Bugfix 版本 IDF v5.3.3 和 IDF v5.3.4release/5.3 分支自 2025 年 7 月进入维护周期
* release/5.4 分支发布更多 bugfix 版本,包括 IDF v5.4.1、IDF v5.4.2、IDF v5.4.3release/5.5 分支发布更多 bugfix 版本,包括 IDF v5.5.1、IDF v5.5.2。通过发布这些 Bugfix 版本,使 release/5.4 分支和 release/5.5 分支更加稳定和产品化。
## ESP-IDF 发布计划
获取 ESP-IDF 的完整发布列表,请访问 https://github.com/espressif/esp-idf/releases
此处提供的所有信息均可因业务原因及其他因素而在没有通知的情况下进行更改。
### ESP-IDF 主要版本发布
```mermaid
timeline
title ESP-IDF Major Releases
section 2025 Q1 <br> Major Release Planning
No version planned : N/A
section 2025 Q2 <br> Major Release Planning
No version planned : N/A
section 2025 Q3 <br> Major Release Planning
No version planned : N/A
section 2025 Q4 <br> Major Release Planning
v6.0-beta1 : 2025/11/13
v6.0-beta2 : 2025/12/05
v6.0-RC1 : 2026/01/14
v6.0-RC2 : 2026/02/06
v6.0 : 2026/02/13
```
### ESP-IDF 次要版本发布
```mermaid
timeline
title ESP-IDF Minor Releases
section 2025 Q1 <br> Minor Release Planning
No version planned : N/A
section 2025 Q2 <br> Minor Release Planning
v5.5-beta1 : 2025/05/14
v5.5-beta2 : 2025/06/04
section 2025 Q3 <br> Minor Release Planning
v5.5-RC1 : 2025/07/07
v5.5-RC2 : 2025/07/28
v5.5 : 2025/08/04
section 2025 Q4 <br> Minor Release Planning
No version planned : N/A
```
### ESP-IDF Bugfix 版本发布
```mermaid
timeline
title ESP-IDF Bugfix Releases
section 2025 Q1 <br> Bugfix Release Planning
v5.0.8 : 2025/01/14
v5.1.6 : 2025/02/18
v5.2.4 : 2025/02/23
v5.2.5 : 2025/02/28
v5.4.1 : 2025/03/27
v5.3.3 : 2025/04/04
section 2025 Q2 <br> Bugfix Release Planning
v5.0.9 : 2025/05/16
v5.4.2 : 2025/06/30
section 2025 Q3 <br> Bugfix Release Planning
v5.3.4 : 2025/08/03
v5.2.6 : 2025/09/04
v5.5.1 : 2025/09/11
v5.4.3 : 2025/10/08
section 2025 Q4 <br> Bugfix Release Planning
v5.5.2 : 2025/11/12
v5.1.7 : 2026/01/06
```

View File

@@ -10,7 +10,7 @@ The core components are organized into two groups.
The first group (referred to as `G0`) includes `hal`, `arch` (where `arch` is either `riscv` or `xtensa` depending on the chip), `esp_rom`, `esp_common`, and `soc`. This group contains information about and provides low-level access to the underlying hardware. In the case of `esp_common`, it contains hardware-agnostic code and utilities. These components may have dependencies on each other within the group, but outside dependencies should be minimized. The reason for this approach is that these components are fundamental, and many other components may require them. Ideally, the dependency relationship only goes one way, making it easier for this group to be usable in other projects.
The second group (referred to as `G1`) operates at a higher level than the first group. `G1` includes the components `esp_hw_support`, `esp_system`, `esp_libc`, `spi_flash`, `freertos`, `log`, and `heap`. Like the first group, circular dependencies within this group are allowed, and these components can have dependencies on the first group. G1 components represent essential software mechanisms for building other components.
The second group (referred to as `G1`) operates at a higher level than the first group. `G1` includes the components `esp_hw_support`, `esp_system`, `newlib`, `spi_flash`, `freertos`, `log`, and `heap`. Like the first group, circular dependencies within this group are allowed, and these components can have dependencies on the first group. G1 components represent essential software mechanisms for building other components.
## Descriptions
@@ -40,7 +40,7 @@ Example:
#### `esp_common`
Contains hardware-agnostic definitions, constants, macros, utilities, 'pure' and/or algorithmic functions that is usable by all other components (that is, barring there being a more appropriate component to put them in).
Contains hardware-agnostic definitions, constants, macros, utilities, 'pure' and/or algorithmic functions that is useable by all other components (that is, barring there being a more appropriate component to put them in).
Example:
@@ -85,7 +85,7 @@ Logging library.
Heap implementation.
#### `esp_libc`
#### `newlib`
Some functions n the standard library are implemented here, especially those needing other `G1` components.

View File

@@ -4,38 +4,133 @@ if(${target} STREQUAL "linux")
return() # This component is not supported by the POSIX/Linux simulator
endif()
if(CONFIG_ESP_TRACE_TRANSPORT_APPTRACE)
set(srcs
"app_trace.c"
"app_trace_util.c"
"host_file_io.c"
)
if(NOT CONFIG_APPTRACE_DEST_UART) # JTAG or None
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
list(APPEND srcs "port/xtensa/port_jtag.c")
elseif(CONFIG_IDF_TARGET_ARCH_RISCV)
list(APPEND srcs "port/riscv/port_jtag.c")
endif()
list(APPEND srcs "app_trace_membufs_proto.c")
endif()
if(NOT CONFIG_APPTRACE_DEST_JTAG) # UART or None
list(APPEND srcs "port/port_uart.c")
endif()
endif()
set(srcs
"app_trace.c"
"app_trace_util.c"
"host_file_io.c")
if(CONFIG_ESP_DEBUG_STUBS_ENABLE)
list(APPEND srcs "debug_stubs.c")
list(APPEND srcs
"debug_stubs.c")
endif()
if(CONFIG_APPTRACE_GCOV_ENABLE)
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
list(APPEND srcs
"gcov/gcov_rtio.c")
else()
fail_at_build_time(app_trace "Only GNU compiler can link with Gcov library")
endif()
endif()
set(include_dirs "include")
set(priv_include_dirs "private_include" "port/include")
if(CONFIG_APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE)
list(APPEND srcs
"app_trace_membufs_proto.c")
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
list(APPEND srcs
"port/xtensa/port.c")
endif()
if(CONFIG_IDF_TARGET_ARCH_RISCV)
list(APPEND srcs
"port/riscv/port.c")
endif()
endif()
list(APPEND srcs
"port/port_uart.c")
if(CONFIG_APPTRACE_SV_ENABLE)
list(APPEND include_dirs
sys_view/Config
sys_view/SEGGER
sys_view/Sample/FreeRTOSV10.4)
list(APPEND srcs
"sys_view/SEGGER/SEGGER_SYSVIEW.c"
"sys_view/Sample/FreeRTOSV10.4/Config/esp/SEGGER_SYSVIEW_Config_FreeRTOS.c"
"sys_view/Sample/FreeRTOSV10.4/SEGGER_SYSVIEW_FreeRTOS.c"
"sys_view/esp/SEGGER_RTT_esp.c"
"sys_view/ext/heap_trace_module.c"
"sys_view/ext/logging.c")
endif()
if(CONFIG_HEAP_TRACING_TOHOST)
list(APPEND srcs "heap_trace_tohost.c")
set_source_files_properties(heap_trace_tohost.c
PROPERTIES COMPILE_FLAGS
-Wno-frame-address)
endif()
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
PRIV_REQUIRES esp_driver_gptimer
REQUIRES esp_timer esp_driver_uart
PRIV_REQUIRES esp_driver_gptimer esp_driver_gpio esp_driver_uart
REQUIRES esp_timer
LDFRAGMENTS linker.lf)
# Force app_trace to also appear later than gcov in link line
idf_component_get_property(app_trace app_trace COMPONENT_LIB)
if(CONFIG_APPTRACE_GCOV_ENABLE)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
# Coverage info is not supported when clang is used
# TODO: LLVM-214
message(FATAL_ERROR "Coverage info is not supported when building with Clang!")
endif()
# The original Gcov library from toolchain will be objcopy with symbols redefinitions (see file gcov/io_sym.map).
# This needs because ESP has no file-system onboard, and redefined functions solves this problem and transmits
# output file to host PC.
# Set a name for Gcov library
set(GCOV_LIB libgcov_rtio)
# Set include direcrory of Gcov internal headers
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=plugin
OUTPUT_VARIABLE gcc_plugin_dir
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
set_source_files_properties(gcov/gcov_rtio.c
PROPERTIES COMPILE_FLAGS "-I${gcc_plugin_dir}/include")
# Copy libgcov.a with symbols redefinition
find_library(GCOV_LIBRARY_PATH gcov ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
add_custom_command(OUTPUT ${GCOV_LIB}.a
COMMAND ${_CMAKE_TOOLCHAIN_PREFIX}objcopy
--redefine-syms ${CMAKE_CURRENT_LIST_DIR}/gcov/io_sym.map
${GCOV_LIBRARY_PATH} ${GCOV_LIB}.a
MAIN_DEPENDENCY ${GCOV_LIBRARY_PATH}
VERBATIM)
add_custom_target(${GCOV_LIB}_target DEPENDS ${GCOV_LIB}.a)
add_library(${GCOV_LIB} STATIC IMPORTED)
set_target_properties(${GCOV_LIB}
PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${GCOV_LIB}.a)
add_dependencies(${GCOV_LIB} ${GCOV_LIB}_target)
add_dependencies(${COMPONENT_LIB} ${GCOV_LIB})
# disable --coverage for this component, as it is used as transport for gcov
target_compile_options(${COMPONENT_LIB} PRIVATE "-fno-profile-arcs" "-fno-test-coverage")
target_link_options(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=__gcov_init")
target_link_libraries(${COMPONENT_LIB} INTERFACE ${GCOV_LIB} $<TARGET_FILE:${app_trace}> c)
else()
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${app_trace}> c)
endif()
# This function adds a dependency on the given component if the component is included into the build.
function(maybe_add_component component_name)
idf_build_get_property(components BUILD_COMPONENTS)
if(${component_name} IN_LIST components)
idf_component_get_property(lib_name ${component_name} COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} PUBLIC ${lib_name})
endif()
endfunction()
if(CONFIG_APPTRACE_DEST_UART0 OR CONFIG_APPTRACE_DEST_UART1 OR CONFIG_APPTRACE_DEST_UART2)
maybe_add_component(driver)
endif()

View File

@@ -0,0 +1,399 @@
menu "Application Level Tracing"
choice APPTRACE_DESTINATION1
prompt "Data Destination 1"
default APPTRACE_DEST_NONE
help
Select destination for application trace: JTAG or none (to disable).
config APPTRACE_DEST_JTAG
bool "JTAG"
select APPTRACE_DEST_TRAX if IDF_TARGET_ARCH_XTENSA
select APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE
select APPTRACE_ENABLE
config APPTRACE_DEST_NONE
bool "None"
endchoice
config APPTRACE_DEST_UART
bool
config APPTRACE_DEST_UART_NOUSB
bool
choice APPTRACE_DESTINATION2
prompt "Data Destination 2"
default APPTRACE_DEST_UART_NONE
help
Select destination for application trace: UART(XX) or none (to disable).
config APPTRACE_DEST_UART0
bool "UART0"
select APPTRACE_ENABLE
select APPTRACE_DEST_UART
select APPTRACE_DEST_UART_NOUSB
depends on (ESP_CONSOLE_UART_NUM !=0)
config APPTRACE_DEST_UART1
bool "UART1"
select APPTRACE_ENABLE
select APPTRACE_DEST_UART
select APPTRACE_DEST_UART_NOUSB
depends on (ESP_CONSOLE_UART_NUM !=1)
config APPTRACE_DEST_UART2
bool "UART2"
select APPTRACE_ENABLE
select APPTRACE_DEST_UART
select APPTRACE_DEST_UART_NOUSB
depends on (ESP_CONSOLE_UART_NUM !=2) && (SOC_UART_NUM > 2)
config APPTRACE_DEST_USB_CDC
bool "USB_CDC"
select APPTRACE_ENABLE
select APPTRACE_DEST_UART
depends on !ESP_CONSOLE_USB_CDC && (IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3) && !USB_ENABLED
config APPTRACE_DEST_UART_NONE
bool "None"
endchoice
config APPTRACE_UART_TX_GPIO
int "UART TX on GPIO#"
depends on APPTRACE_DEST_UART_NOUSB
range 0 46
default 12 if IDF_TARGET_ESP32
default 12 if IDF_TARGET_ESP32C3
default 12
help
This GPIO is used for UART TX pin.
config APPTRACE_UART_RX_GPIO
int "UART RX on GPIO#"
depends on APPTRACE_DEST_UART_NOUSB
range 0 46
default 13 if IDF_TARGET_ESP32
default 13 if IDF_TARGET_ESP32C3
default 13
help
This GPIO is used for UART RX pin.
config APPTRACE_UART_BAUDRATE
int
prompt "UART baud rate" if APPTRACE_DEST_UART
depends on APPTRACE_DEST_UART
default 1000000
range 1200 8000000
range 1200 1000000
help
This baud rate is used for UART.
The app's maximum baud rate depends on the UART clock source. If Power Management is disabled,
the UART clock source is the APB clock and all baud rates in the available range will be sufficiently
accurate. If Power Management is enabled, REF_TICK clock source is used so the baud rate is divided
from 1MHz. Baud rates above 1Mbps are not possible and values between 500Kbps and 1Mbps may not be
accurate.
config APPTRACE_UART_RX_BUFF_SIZE
int
prompt "UART RX ring buffer size" if APPTRACE_DEST_UART
depends on APPTRACE_DEST_UART
default 128
range 64 32768
help
Size of the UART input ring buffer.
This size related to the baudrate, system tick frequency and amount of data to transfer.
The data placed to this buffer before sent out to the interface.
config APPTRACE_UART_TX_BUFF_SIZE
int
prompt "UART TX ring buffer size" if APPTRACE_DEST_UART
depends on APPTRACE_DEST_UART
default 4096
range 2048 32768
help
Size of the UART output ring buffer.
This size related to the baudrate, system tick frequency and amount of data to transfer.
config APPTRACE_UART_TX_MSG_SIZE
int
prompt "UART TX message size" if APPTRACE_DEST_UART
depends on APPTRACE_DEST_UART
default 128
range 64 32768
help
Maximum size of the single message to transfer.
config APPTRACE_UART_TASK_PRIO
int
prompt "UART Task Priority" if APPTRACE_DEST_UART
default 1
range 1 32
help
UART task priority. In case of high events rate,
this parameter could be changed up to (configMAX_PRIORITIES-1).
config APPTRACE_DEST_TRAX
bool
depends on IDF_TARGET_ARCH_XTENSA && !ESP32_TRAX && !ESP32S2_TRAX && !ESP32S3_TRAX
select ESP32_MEMMAP_TRACEMEM
select ESP32S2_MEMMAP_TRACEMEM
select ESP32S3_MEMMAP_TRACEMEM
select ESP32_MEMMAP_TRACEMEM_TWOBANKS
select ESP32S2_MEMMAP_TRACEMEM_TWOBANKS
select ESP32S3_MEMMAP_TRACEMEM_TWOBANKS
default n
help
Enables/disable TRAX tracing HW.
config APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE
bool
default n
help
Enables/disable swapping memory buffers tracing protocol.
config APPTRACE_ENABLE
bool
default n
help
Enables/disable application tracing module.
config APPTRACE_LOCK_ENABLE
bool
default !APPTRACE_SV_ENABLE
help
Enables/disable application tracing module internal sync lock.
config APPTRACE_ONPANIC_HOST_FLUSH_TMO
int "Timeout for flushing last trace data to host on panic"
depends on APPTRACE_ENABLE
range -1 5000
default -1
help
Timeout for flushing last trace data to host in case of panic. In ms.
Use -1 to disable timeout and wait forever.
config APPTRACE_POSTMORTEM_FLUSH_THRESH
int "Threshold for flushing last trace data to host on panic"
depends on APPTRACE_ENABLE
range 0 16384
default 0
help
Threshold for flushing last trace data to host on panic in post-mortem mode.
This is minimal amount of data needed to perform flush. In bytes.
config APPTRACE_BUF_SIZE
int "Size of the apptrace buffer"
depends on APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE && !APPTRACE_DEST_TRAX
default 16384
help
Size of the memory buffer for trace data in bytes.
config APPTRACE_PENDING_DATA_SIZE_MAX
int "Size of the pending data buffer"
depends on APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE
default 0
help
Size of the buffer for events in bytes. It is useful for buffering events from
the time critical code (scheduler, ISRs etc). If this parameter is 0 then
events will be discarded when main HW buffer is full.
menu "FreeRTOS SystemView Tracing"
depends on APPTRACE_ENABLE
config APPTRACE_SV_ENABLE
bool "SystemView Tracing Enable"
depends on APPTRACE_ENABLE
default n
help
Enables supporrt for SEGGER SystemView tracing functionality.
choice APPTRACE_SV_DEST
prompt "SystemView destination"
depends on APPTRACE_SV_ENABLE
default APPTRACE_SV_DEST_JTAG
help
SystemView witt transfer data trough defined interface.
config APPTRACE_SV_DEST_JTAG
bool "Data destination JTAG"
depends on !PM_ENABLE && !APPTRACE_DEST_NONE
help
Send SEGGER SystemView events through JTAG interface.
config APPTRACE_SV_DEST_UART
bool "Data destination UART"
depends on APPTRACE_DEST_UART
help
Send SEGGER SystemView events through UART interface.
endchoice
choice APPTRACE_SV_CPU
prompt "CPU to trace"
depends on APPTRACE_SV_DEST_UART && !ESP_SYSTEM_SINGLE_CORE_MODE
default APPTRACE_SV_DEST_CPU_0
help
Define the CPU to trace by SystemView.
config APPTRACE_SV_DEST_CPU_0
bool "CPU0"
help
Send SEGGER SystemView events for Pro CPU.
config APPTRACE_SV_DEST_CPU_1
bool "CPU1"
help
Send SEGGER SystemView events for App CPU.
endchoice
choice APPTRACE_SV_TS_SOURCE
prompt "Timer to use as timestamp source"
depends on APPTRACE_SV_ENABLE
default APPTRACE_SV_TS_SOURCE_CCOUNT if ESP_SYSTEM_SINGLE_CORE_MODE && !PM_ENABLE && !IDF_TARGET_ESP32C3
default APPTRACE_SV_TS_SOURCE_GPTIMER if !ESP_SYSTEM_SINGLE_CORE_MODE && !PM_ENABLE && !IDF_TARGET_ESP32C3
default APPTRACE_SV_TS_SOURCE_ESP_TIMER if PM_ENABLE || IDF_TARGET_ESP32C3
help
SystemView needs to use a hardware timer as the source of timestamps
when tracing. This option selects the timer for it.
config APPTRACE_SV_TS_SOURCE_CCOUNT
bool "CPU cycle counter (CCOUNT)"
depends on ESP_SYSTEM_SINGLE_CORE_MODE && !PM_ENABLE && !IDF_TARGET_ESP32C3
config APPTRACE_SV_TS_SOURCE_GPTIMER
bool "General Purpose Timer (Timer Group)"
depends on !PM_ENABLE && !IDF_TARGET_ESP32C3
config APPTRACE_SV_TS_SOURCE_ESP_TIMER
bool "esp_timer high resolution timer"
endchoice
config APPTRACE_SV_MAX_TASKS
int "Maximum supported tasks"
depends on APPTRACE_SV_ENABLE
range 1 64
default 16
help
Configures maximum supported tasks in sysview debug
config APPTRACE_SV_BUF_WAIT_TMO
int "Trace buffer wait timeout"
depends on APPTRACE_SV_ENABLE
default 500
help
Configures timeout (in us) to wait for free space in trace buffer.
Set to -1 to wait forever and avoid lost events.
config APPTRACE_SV_EVT_OVERFLOW_ENABLE
bool "Trace Buffer Overflow Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Trace Buffer Overflow" event.
config APPTRACE_SV_EVT_ISR_ENTER_ENABLE
bool "ISR Enter Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "ISR Enter" event.
config APPTRACE_SV_EVT_ISR_EXIT_ENABLE
bool "ISR Exit Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "ISR Exit" event.
config APPTRACE_SV_EVT_ISR_TO_SCHED_ENABLE
bool "ISR Exit to Scheduler Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "ISR to Scheduler" event.
config APPTRACE_SV_EVT_TASK_START_EXEC_ENABLE
bool "Task Start Execution Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Task Start Execution" event.
config APPTRACE_SV_EVT_TASK_STOP_EXEC_ENABLE
bool "Task Stop Execution Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Task Stop Execution" event.
config APPTRACE_SV_EVT_TASK_START_READY_ENABLE
bool "Task Start Ready State Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Task Start Ready State" event.
config APPTRACE_SV_EVT_TASK_STOP_READY_ENABLE
bool "Task Stop Ready State Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Task Stop Ready State" event.
config APPTRACE_SV_EVT_TASK_CREATE_ENABLE
bool "Task Create Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Task Create" event.
config APPTRACE_SV_EVT_TASK_TERMINATE_ENABLE
bool "Task Terminate Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Task Terminate" event.
config APPTRACE_SV_EVT_IDLE_ENABLE
bool "System Idle Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "System Idle" event.
config APPTRACE_SV_EVT_TIMER_ENTER_ENABLE
bool "Timer Enter Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Timer Enter" event.
config APPTRACE_SV_EVT_TIMER_EXIT_ENABLE
bool "Timer Exit Event"
depends on APPTRACE_SV_ENABLE
default y
help
Enables "Timer Exit" event.
endmenu
config APPTRACE_GCOV_ENABLE
bool "GCOV to Host Enable"
depends on APPTRACE_ENABLE && !APPTRACE_SV_ENABLE
select ESP_DEBUG_STUBS_ENABLE
default n
help
Enables support for GCOV data transfer to host.
config APPTRACE_GCOV_DUMP_TASK_STACK_SIZE
int "Gcov dump task stack size"
depends on APPTRACE_GCOV_ENABLE
default 2048
help
Configures stack size of Gcov dump task
endmenu

View File

@@ -1,134 +0,0 @@
menu "Application Level Tracing"
depends on ESP_TRACE_TRANSPORT_APPTRACE
choice APPTRACE_DESTINATION
prompt "Data Destination"
default APPTRACE_DEST_JTAG if !PM_ENABLE
default APPTRACE_DEST_UART if PM_ENABLE
help
Select destination for application trace: JTAG, UART, or both.
config APPTRACE_DEST_JTAG
bool "JTAG"
select APPTRACE_TRAX_ENABLE if IDF_TARGET_ARCH_XTENSA
depends on !PM_ENABLE
config APPTRACE_DEST_UART
bool "UART"
config APPTRACE_DEST_ALL
bool "All (runtime selection)"
help
Compile both JTAG and UART interfaces in advance (higher IRAM usage).
Allows runtime switching between JTAG and UART via esp_apptrace_get_user_params().
If esp_apptrace_get_user_params() is not provided by the
application, JTAG is used by default with the default
configuration defined in components/app_trace/include/esp_app_trace_config.h.
endchoice
config APPTRACE_BUF_SIZE
int "Size of the apptrace buffer"
depends on APPTRACE_DEST_JTAG && !APPTRACE_TRAX_ENABLE
default 16384
help
Size of the memory buffer for trace data in bytes.
config APPTRACE_DEST_UART_NUM
int "UART port number"
depends on APPTRACE_DEST_UART
range 0 1 if (SOC_UART_HP_NUM <= 2)
range 0 2 if (SOC_UART_HP_NUM <= 3)
range 0 4 if (SOC_UART_HP_NUM <= 5)
default 1
help
UART communication port number for the apptrace destination.
See UART documentation for available port numbers.
config APPTRACE_UART_TX_GPIO
int "UART TX on GPIO<num>"
depends on APPTRACE_DEST_UART
range 0 46
default 12
help
This GPIO is used for UART TX pin.
config APPTRACE_UART_RX_GPIO
int "UART RX on GPIO<num>"
depends on APPTRACE_DEST_UART
range 0 46
default 13
help
This GPIO is used for UART RX pin.
config APPTRACE_UART_BAUDRATE
int
prompt "UART baud rate" if APPTRACE_DEST_UART
depends on APPTRACE_DEST_UART
default 1000000
range 1200 8000000
range 1200 1000000
help
This baud rate is used for UART.
The app's maximum baud rate depends on the UART clock source. If Power Management is disabled,
the UART clock source is the APB clock and all baud rates in the available range will be sufficiently
accurate. If Power Management is enabled, REF_TICK clock source is used so the baud rate is divided
from 1MHz. Baud rates above 1Mbps are not possible and values between 500Kbps and 1Mbps may not be
accurate.
config APPTRACE_UART_TX_BUFF_SIZE
int
prompt "UART TX ring buffer size" if APPTRACE_DEST_UART
depends on APPTRACE_DEST_UART
default 4096
range 2048 32768
help
Size of the UART output ring buffer. Must be power of two.
This size related to the baudrate, system tick frequency and amount of data to transfer.
config APPTRACE_UART_TX_MSG_SIZE
int
prompt "UART TX message size" if APPTRACE_DEST_UART
depends on APPTRACE_DEST_UART
default 128
range 64 32768
help
Maximum size of the single message to transfer.
config APPTRACE_TRAX_ENABLE
bool
depends on IDF_TARGET_ARCH_XTENSA && !ESP32_TRAX && !ESP32S2_TRAX && !ESP32S3_TRAX
select ESP32_MEMMAP_TRACEMEM
select ESP32S2_MEMMAP_TRACEMEM
select ESP32S3_MEMMAP_TRACEMEM
select ESP32_MEMMAP_TRACEMEM_TWOBANKS
select ESP32S2_MEMMAP_TRACEMEM_TWOBANKS
select ESP32S3_MEMMAP_TRACEMEM_TWOBANKS
default n
help
Enables/disable TRAX tracing HW.
config APPTRACE_LOCK_ENABLE
bool "Internal Sync Lock Enable"
default n
help
Enables/disable application tracing module internal sync lock to prevent data corruption
when multiple tasks are writing to the same trace buffer.
Keep in mind this will slow down the trace data transfer to the host.
config APPTRACE_ONPANIC_HOST_FLUSH_TMO
int "Timeout for flushing last trace data to host on panic"
range -1 5000
default -1
help
Timeout for flushing last trace data to host in case of panic. In ms.
Use -1 to disable timeout and wait forever.
config APPTRACE_POSTMORTEM_FLUSH_THRESH
int "Threshold for flushing last trace data to host on panic"
range 0 16384
default 0
help
Threshold for flushing last trace data to host on panic in post-mortem mode.
This is minimal amount of data needed to perform flush. In bytes.
endmenu

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
@@ -7,224 +7,290 @@
#include <string.h>
#include "esp_cpu.h"
#include "esp_log.h"
#include "esp_rom_sys.h"
#include "esp_app_trace.h"
#include "esp_app_trace_port.h"
#include "esp_app_trace_types.h"
#include "esp_private/startup_internal.h"
#if CONFIG_ESP_CONSOLE_UART && CONFIG_APPTRACE_DEST_UART && (CONFIG_APPTRACE_DEST_UART_NUM == CONFIG_ESP_CONSOLE_UART_NUM)
#error "Application trace UART and console UART cannot use the same port number"
#ifdef CONFIG_APPTRACE_DEST_UART0
#define ESP_APPTRACE_DEST_UART_NUM 0
#elif CONFIG_APPTRACE_DEST_UART1
#define ESP_APPTRACE_DEST_UART_NUM 1
#elif CONFIG_APPTRACE_DEST_UART2
#define ESP_APPTRACE_DEST_UART_NUM 2
#elif CONFIG_APPTRACE_DEST_USB_CDC
#define ESP_APPTRACE_DEST_UART_NUM 10
#else
#define ESP_APPTRACE_DEST_UART_NUM 0
#endif
#define ESP_APPTRACE_MAX_VPRINTF_ARGS 256
#define ESP_APPTRACE_HOST_BUF_SIZE 256
#define ESP_APPTRACE_PRINT_LOCK 0
const static char *TAG = "esp_apptrace";
/** tracing module internal data */
typedef struct {
esp_apptrace_hw_t *hw;
void *hw_data;
esp_apptrace_dest_t dest;
} esp_apptrace_channel_t;
static esp_apptrace_channel_t s_trace_ch;
static volatile int s_trace_ch_hw_initialized = 0;
static esp_apptrace_channel_t s_trace_channels[ESP_APPTRACE_DEST_MAX];
static bool s_inited;
esp_err_t esp_apptrace_init(const esp_apptrace_config_t *config)
esp_err_t esp_apptrace_init(void)
{
__attribute__((unused)) void *hw_data = NULL;
int res;
esp_apptrace_hw_t *hw = NULL;
void *hw_data = NULL;
// 'esp_apptrace_init()' is called on every core, so ensure to do main initialization only once
if (esp_cpu_get_core_id() == 0) {
#if CONFIG_APPTRACE_DEST_JTAG
s_trace_ch.hw = esp_apptrace_jtag_hw_get(&hw_data);
s_trace_ch.hw_data = hw_data;
#elif CONFIG_APPTRACE_DEST_UART
const esp_apptrace_uart_config_t *uart_config = &config->dest_cfg.uart;
s_trace_ch.hw = esp_apptrace_uart_hw_get(uart_config->uart_num, &hw_data);
s_trace_ch.hw_data = hw_data;
#else // CONFIG_APPTRACE_DEST_ALL allows runtime selection between destinations
if (config->dest == ESP_APPTRACE_DEST_JTAG) {
s_trace_ch.hw = esp_apptrace_jtag_hw_get(&hw_data);
s_trace_ch.hw_data = hw_data;
} else if (config->dest == ESP_APPTRACE_DEST_UART) {
const esp_apptrace_uart_config_t *uart_config = &config->dest_cfg.uart;
s_trace_ch.hw = esp_apptrace_uart_hw_get(uart_config->uart_num, &hw_data);
s_trace_ch.hw_data = hw_data;
} else {
s_trace_ch.hw = NULL;
s_trace_ch.hw_data = NULL;
ESP_APPTRACE_LOGE("Invalid destination type (%d)!", config->dest);
return ESP_ERR_INVALID_ARG;
memset(&s_trace_channels, 0, sizeof(s_trace_channels));
hw = esp_apptrace_jtag_hw_get(&hw_data);
ESP_APPTRACE_LOGD("HW interface %p", hw);
if (hw != NULL) {
s_trace_channels[ESP_APPTRACE_DEST_JTAG].hw = hw;
s_trace_channels[ESP_APPTRACE_DEST_JTAG].hw_data = hw_data;
}
hw = esp_apptrace_uart_hw_get(ESP_APPTRACE_DEST_UART_NUM, &hw_data);
if (hw != NULL) {
s_trace_channels[ESP_APPTRACE_DEST_UART].hw = hw;
s_trace_channels[ESP_APPTRACE_DEST_UART].hw_data = hw_data;
}
s_inited = true;
}
// esp_apptrace_init() is called on every core, so initialize trace channel on every core
for (int i = 0; i < sizeof(s_trace_channels) / sizeof(s_trace_channels[0]); i++) {
esp_apptrace_channel_t *ch = &s_trace_channels[i];
if (ch->hw) {
res = ch->hw->init(ch->hw_data);
if (res != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to init trace channel HW interface (%d)!", res);
return res;
}
}
}
return ESP_OK;
}
ESP_SYSTEM_INIT_FN(esp_apptrace_init, SECONDARY, ESP_SYSTEM_INIT_ALL_CORES, 115)
{
return esp_apptrace_init();
}
void esp_apptrace_down_buffer_config(uint8_t *buf, uint32_t size)
{
esp_apptrace_channel_t *ch;
if (!s_inited) {
return;
}
// currently down buffer is supported for JTAG interface only
// TODO: one more argument should be added to this function to specify HW inteface: JTAG, UART0 etc
ch = &s_trace_channels[ESP_APPTRACE_DEST_JTAG];
if (ch->hw != NULL) {
if (ch->hw->down_buffer_config != NULL) {
ch->hw->down_buffer_config(ch->hw_data, buf, size);
}
#endif
s_trace_ch.dest = config->dest;
s_trace_ch_hw_initialized = 1;
} else {
// There is NO guarantee that system init functions will execute on core 0 first
// So we need to wait for core 0 to set up the hardware interface
while (!s_trace_ch_hw_initialized) {
esp_rom_delay_us(10);
}
ESP_APPTRACE_LOGD("Trace destination for JTAG not supported!");
}
if (s_trace_ch.hw) {
int res = s_trace_ch.hw->init(s_trace_ch.hw_data, config);
if (res != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to init trace channel HW interface (%d)!", res);
return res;
ch = &s_trace_channels[ESP_APPTRACE_DEST_UART];
if (ch->hw != NULL) {
if (ch->hw->down_buffer_config != NULL) {
ch->hw->down_buffer_config(ch->hw_data, buf, size);
}
} else {
ESP_APPTRACE_LOGD("Trace destination for UART not supported!");
}
return ESP_OK;
}
esp_err_t esp_apptrace_down_buffer_config(uint8_t *buf, uint32_t size)
uint8_t *esp_apptrace_down_buffer_get(esp_apptrace_dest_t dest, uint32_t *size, uint32_t user_tmo)
{
if (!buf || size == 0) {
return ESP_ERR_INVALID_ARG;
}
if (!s_trace_ch.hw) {
return ESP_ERR_INVALID_STATE;
}
if (s_trace_ch.hw->down_buffer_config) {
s_trace_ch.hw->down_buffer_config(s_trace_ch.hw_data, buf, size);
}
return ESP_OK;
}
uint8_t *esp_apptrace_down_buffer_get(uint32_t *size, uint32_t user_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (!size || *size == 0) {
return NULL;
}
if (!s_trace_ch.hw) {
return NULL;
}
if (!s_trace_ch.hw->get_down_buffer) {
return NULL;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, user_tmo);
esp_apptrace_channel_t *ch;
return s_trace_ch.hw->get_down_buffer(s_trace_ch.hw_data, size, &tmo);
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return NULL;
}
if (size == NULL || *size == 0) {
return NULL;
}
if (!s_inited) {
return NULL;
}
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return NULL;
}
if (ch->hw->get_down_buffer == NULL) {
return NULL;
}
esp_apptrace_tmo_init(&tmo, user_tmo);
return ch->hw->get_down_buffer(ch->hw_data, size, &tmo);
}
esp_err_t esp_apptrace_down_buffer_put(uint8_t *ptr, uint32_t user_tmo)
esp_err_t esp_apptrace_down_buffer_put(esp_apptrace_dest_t dest, uint8_t *ptr, uint32_t user_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
if (!ptr) {
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return ESP_ERR_INVALID_ARG;
}
if (!s_trace_ch.hw) {
if (ptr == NULL) {
return ESP_ERR_INVALID_ARG;
}
if (!s_inited) {
return ESP_ERR_INVALID_STATE;
}
if (!s_trace_ch.hw->get_down_buffer) {
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return ESP_ERR_NOT_SUPPORTED;
}
if (ch->hw->get_down_buffer == NULL) {
return ESP_ERR_NOT_SUPPORTED;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, user_tmo);
return s_trace_ch.hw->put_down_buffer(s_trace_ch.hw_data, ptr, &tmo);
return ch->hw->put_down_buffer(ch->hw_data, ptr, &tmo);
}
esp_err_t esp_apptrace_read(void *buf, uint32_t *size, uint32_t user_tmo)
esp_err_t esp_apptrace_read(esp_apptrace_dest_t dest, void *buf, uint32_t *size, uint32_t user_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
int res = ESP_OK;
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
if (!buf || !size || *size == 0) {
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return ESP_ERR_INVALID_ARG;
}
if (!s_trace_ch.hw) {
if (buf == NULL || size == NULL || *size == 0) {
return ESP_ERR_INVALID_ARG;
}
if (!s_inited) {
return ESP_ERR_INVALID_STATE;
}
if (!s_trace_ch.hw->get_down_buffer || !s_trace_ch.hw->put_down_buffer) {
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return ESP_ERR_NOT_SUPPORTED;
}
if (ch->hw->get_down_buffer == NULL || ch->hw->put_down_buffer == NULL) {
return ESP_ERR_NOT_SUPPORTED;
}
//TODO: callback system
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, user_tmo);
uint32_t act_sz = *size;
*size = 0;
uint8_t *ptr = s_trace_ch.hw->get_down_buffer(s_trace_ch.hw_data, &act_sz, &tmo);
uint8_t *ptr = ch->hw->get_down_buffer(ch->hw_data, &act_sz, &tmo);
if (ptr && act_sz > 0) {
ESP_APPTRACE_LOGD("Read %" PRIu32 " bytes from host", act_sz);
memcpy(buf, ptr, act_sz);
res = ch->hw->put_down_buffer(ch->hw_data, ptr, &tmo);
*size = act_sz;
return s_trace_ch.hw->put_down_buffer(s_trace_ch.hw_data, ptr, &tmo);
} else {
res = ESP_ERR_TIMEOUT;
}
return ESP_ERR_TIMEOUT;
return res;
}
uint8_t *esp_apptrace_buffer_get(uint32_t size, uint32_t user_tmo)
uint8_t *esp_apptrace_buffer_get(esp_apptrace_dest_t dest, uint32_t size, uint32_t user_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return NULL;
}
if (size == 0) {
return NULL;
}
if (!s_trace_ch.hw) {
if (!s_inited) {
return NULL;
}
if (!s_trace_ch.hw->get_up_buffer) {
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return NULL;
}
if (ch->hw->get_up_buffer == NULL) {
return NULL;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, user_tmo);
return s_trace_ch.hw->get_up_buffer(s_trace_ch.hw_data, size, &tmo);
return ch->hw->get_up_buffer(ch->hw_data, size, &tmo);
}
esp_err_t esp_apptrace_buffer_put(uint8_t *ptr, uint32_t user_tmo)
esp_err_t esp_apptrace_buffer_put(esp_apptrace_dest_t dest, uint8_t *ptr, uint32_t user_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
if (!ptr) {
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return ESP_ERR_INVALID_ARG;
}
if (!s_trace_ch.hw) {
if (ptr == NULL) {
return ESP_ERR_INVALID_ARG;
}
if (!s_inited) {
return ESP_ERR_INVALID_STATE;
}
if (!s_trace_ch.hw->put_up_buffer) {
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return ESP_ERR_NOT_SUPPORTED;
}
if (ch->hw->put_up_buffer == NULL) {
return ESP_ERR_NOT_SUPPORTED;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, user_tmo);
return s_trace_ch.hw->put_up_buffer(s_trace_ch.hw_data, ptr, &tmo);
return ch->hw->put_up_buffer(ch->hw_data, ptr, &tmo);
}
esp_err_t esp_apptrace_write(const void *data, uint32_t size, uint32_t user_tmo)
esp_err_t esp_apptrace_write(esp_apptrace_dest_t dest, const void *data, uint32_t size, uint32_t user_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
uint8_t *ptr = NULL;
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
if (!data || size == 0) {
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return ESP_ERR_INVALID_ARG;
}
if (!s_trace_ch.hw) {
if (data == NULL || size == 0) {
return ESP_ERR_INVALID_ARG;
}
if (!s_inited) {
return ESP_ERR_INVALID_STATE;
}
if (!s_trace_ch.hw->get_up_buffer || !s_trace_ch.hw->put_up_buffer) {
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return ESP_ERR_NOT_SUPPORTED;
}
if (ch->hw->get_up_buffer == NULL || ch->hw->put_up_buffer == NULL) {
return ESP_ERR_NOT_SUPPORTED;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, user_tmo);
uint8_t *ptr = s_trace_ch.hw->get_up_buffer(s_trace_ch.hw_data, size, &tmo);
if (!ptr) {
ptr = ch->hw->get_up_buffer(ch->hw_data, size, &tmo);
if (ptr == NULL) {
return ESP_ERR_NO_MEM;
}
@@ -233,29 +299,36 @@ esp_err_t esp_apptrace_write(const void *data, uint32_t size, uint32_t user_tmo)
memcpy(ptr, data, size);
// now indicate that this buffer is ready to be sent off to host
return s_trace_ch.hw->put_up_buffer(s_trace_ch.hw_data, ptr, &tmo);
return ch->hw->put_up_buffer(ch->hw_data, ptr, &tmo);
}
int esp_apptrace_vprintf_to(uint32_t user_tmo, const char *fmt, va_list ap)
int esp_apptrace_vprintf_to(esp_apptrace_dest_t dest, uint32_t user_tmo, const char *fmt, va_list ap)
{
uint16_t nargs = 0;
uint8_t *pout, *p = (uint8_t *)fmt;
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (!fmt) {
if (dest >= ESP_APPTRACE_DEST_MAX) {
return -1;
}
if (!s_trace_ch.hw) {
if (fmt == NULL) {
return -1;
}
if (!s_trace_ch.hw->get_up_buffer || !s_trace_ch.hw->put_up_buffer) {
if (!s_inited) {
return -1;
}
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return -1;
}
if (ch->hw->get_up_buffer == NULL || ch->hw->put_up_buffer == NULL) {
return -1;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, user_tmo);
ESP_APPTRACE_LOGD("fmt %p", fmt);
while ((p = (uint8_t *)strchr((char *)p, '%')) && nargs < ESP_APPTRACE_MAX_VPRINTF_ARGS) {
p++;
@@ -268,8 +341,8 @@ int esp_apptrace_vprintf_to(uint32_t user_tmo, const char *fmt, va_list ap)
ESP_APPTRACE_LOGE("Failed to store all printf args!");
}
pout = s_trace_ch.hw->get_up_buffer(s_trace_ch.hw_data, 1 + sizeof(char *) + nargs * sizeof(uint32_t), &tmo);
if (!pout) {
pout = ch->hw->get_up_buffer(ch->hw_data, 1 + sizeof(char *) + nargs * sizeof(uint32_t), &tmo);
if (pout == NULL) {
ESP_APPTRACE_LOGE("Failed to get buffer!");
return -1;
}
@@ -285,7 +358,7 @@ int esp_apptrace_vprintf_to(uint32_t user_tmo, const char *fmt, va_list ap)
ESP_APPTRACE_LOGD("arg %" PRIx32, arg);
}
int ret = s_trace_ch.hw->put_up_buffer(s_trace_ch.hw_data, p, &tmo);
int ret = ch->hw->put_up_buffer(ch->hw_data, p, &tmo);
if (ret != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to put printf buf (%d)!", ret);
return -1;
@@ -296,87 +369,85 @@ int esp_apptrace_vprintf_to(uint32_t user_tmo, const char *fmt, va_list ap)
int esp_apptrace_vprintf(const char *fmt, va_list ap)
{
return esp_apptrace_vprintf_to(0, fmt, ap);
return esp_apptrace_vprintf_to(ESP_APPTRACE_DEST_JTAG, 0, fmt, ap);
}
esp_err_t esp_apptrace_flush_nolock(uint32_t min_sz, uint32_t usr_tmo)
esp_err_t esp_apptrace_flush_nolock(esp_apptrace_dest_t dest, uint32_t min_sz, uint32_t usr_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
if (!s_trace_ch.hw) {
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return ESP_ERR_INVALID_ARG;
}
if (!s_inited) {
return ESP_ERR_INVALID_STATE;
}
if (!s_trace_ch.hw->flush_up_buffer_nolock) {
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return ESP_ERR_NOT_SUPPORTED;
}
if (ch->hw->flush_up_buffer_nolock == NULL) {
return ESP_ERR_NOT_SUPPORTED;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, usr_tmo);
return s_trace_ch.hw->flush_up_buffer_nolock(s_trace_ch.hw_data, min_sz, &tmo);
return ch->hw->flush_up_buffer_nolock(ch->hw_data, min_sz, &tmo);
}
esp_err_t esp_apptrace_flush(uint32_t usr_tmo)
esp_err_t esp_apptrace_flush(esp_apptrace_dest_t dest, uint32_t usr_tmo)
{
ESP_APPTRACE_LOGV("%s(): enter", __func__);
esp_apptrace_tmo_t tmo;
esp_apptrace_channel_t *ch;
if (!s_trace_ch.hw) {
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (dest >= ESP_APPTRACE_DEST_MAX) {
return ESP_ERR_INVALID_ARG;
}
if (!s_inited) {
return ESP_ERR_INVALID_STATE;
}
if (!s_trace_ch.hw->flush_up_buffer) {
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return ESP_ERR_NOT_SUPPORTED;
}
if (ch->hw->flush_up_buffer == NULL) {
return ESP_ERR_NOT_SUPPORTED;
}
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, usr_tmo);
return s_trace_ch.hw->flush_up_buffer(s_trace_ch.hw_data, &tmo);
return ch->hw->flush_up_buffer(ch->hw_data, &tmo);
}
bool esp_apptrace_host_is_connected(void)
bool esp_apptrace_host_is_connected(esp_apptrace_dest_t dest)
{
esp_apptrace_channel_t *ch;
ESP_APPTRACE_LOGV("%s(): enter", __func__);
if (!s_trace_ch.hw) {
if (dest >= ESP_APPTRACE_DEST_MAX) {
return false;
}
if (!s_trace_ch.hw->host_is_connected) {
if (!s_inited) {
return false;
}
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return false;
}
if (ch->hw->host_is_connected == NULL) {
return false;
}
return s_trace_ch.hw->host_is_connected(s_trace_ch.hw_data);
return ch->hw->host_is_connected(ch->hw_data);
}
esp_apptrace_dest_t esp_apptrace_get_destination(void)
#if !CONFIG_APPTRACE_DEST_JTAG
esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data)
{
return s_trace_ch.dest;
}
esp_err_t esp_apptrace_set_header_size(esp_apptrace_header_size_t header_size)
{
if (!s_trace_ch.hw) {
return ESP_ERR_INVALID_STATE;
}
if (s_trace_ch.hw->set_header_size) {
s_trace_ch.hw->set_header_size(s_trace_ch.hw_data, header_size);
}
return ESP_OK;
}
/* If any trace library (sysview or external) is selected with the apptrace transport,
* initialization will be handled by the esp_trace component
*/
#if CONFIG_ESP_TRACE_LIB_NONE && CONFIG_ESP_TRACE_TRANSPORT_APPTRACE
esp_apptrace_config_t __attribute__((weak)) esp_apptrace_get_user_params(void)
{
esp_apptrace_config_t default_config = APPTRACE_CONFIG_DEFAULT();
return default_config;
}
ESP_SYSTEM_INIT_FN(apptrace_early_init, SECONDARY, ESP_SYSTEM_INIT_ALL_CORES, 115)
{
esp_apptrace_config_t config = esp_apptrace_get_user_params();
return esp_apptrace_init(&config);
return NULL;
}
#endif

View File

@@ -18,16 +18,13 @@
* In this case host SW will see that wr_sz < block_sz and will report error.
*/
typedef struct {
union {
struct {
uint8_t block_sz_8;
uint8_t wr_sz_8;
};
struct {
uint16_t block_sz_16;
uint16_t wr_sz_16;
};
};
#if CONFIG_APPTRACE_SV_ENABLE
uint8_t block_sz; // size of allocated block for user data
uint8_t wr_sz; // size of actually written data
#else
uint16_t block_sz; // size of allocated block for user data
uint16_t wr_sz; // size of actually written data
#endif
} esp_tracedata_hdr_t;
/** TODO: docs
@@ -36,29 +33,41 @@ typedef struct {
uint16_t block_sz; // size of allocated block for user data
} esp_hostdata_hdr_t;
#define ESP_APPTRACE_INBLOCK_MARKER(_hw_data_) \
((_hw_data_)->state.markers[(_hw_data_)->state.in_block % 2])
#if CONFIG_APPTRACE_SV_ENABLE
#define ESP_APPTRACE_USR_BLOCK_CORE(_cid_) (0)
#define ESP_APPTRACE_USR_BLOCK_LEN(_v_) (_v_)
#define ESP_APPTRACE_USR_DATA_LEN_MAX(_hw_data_) 255UL
#else
#define ESP_APPTRACE_USR_BLOCK_CORE(_cid_) ((_cid_) << 15)
#define ESP_APPTRACE_USR_BLOCK_LEN(_v_) (~(1 << 15) & (_v_))
#define ESP_APPTRACE_USR_DATA_LEN_MAX(_hw_data_) (ESP_APPTRACE_INBLOCK(_hw_data_)->sz - sizeof(esp_tracedata_hdr_t))
#endif
#define ESP_APPTRACE_USR_BLOCK_RAW_SZ(_s_) ((_s_) + sizeof(esp_tracedata_hdr_t))
#define ESP_APPTRACE_INBLOCK(_hw_data_) \
(&(_hw_data_)->blocks[(_hw_data_)->state.in_block % 2])
#define ESP_APPTRACE_INBLOCK_MARKER(_hw_data_) ((_hw_data_)->state.markers[(_hw_data_)->state.in_block % 2])
#define ESP_APPTRACE_INBLOCK_MARKER_UPD(_hw_data_, _v_) do {(_hw_data_)->state.markers[(_hw_data_)->state.in_block % 2] += (_v_);}while(0)
#define ESP_APPTRACE_INBLOCK(_hw_data_) (&(_hw_data_)->blocks[(_hw_data_)->state.in_block % 2])
const static char *TAG = "esp_apptrace";
static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membufs_proto_data_t *proto,
uint8_t *data, uint32_t size);
static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membufs_proto_data_t *proto, uint8_t *data, uint32_t size);
esp_err_t esp_apptrace_membufs_init(esp_apptrace_membufs_proto_data_t *proto,
const esp_apptrace_mem_block_t blocks_cfg[2])
esp_err_t esp_apptrace_membufs_init(esp_apptrace_membufs_proto_data_t *proto, const esp_apptrace_mem_block_t blocks_cfg[2])
{
// disabled by default
esp_apptrace_rb_init(&proto->rb_down, NULL, 0);
// membufs proto init
for (unsigned int i = 0; i < 2; i++) {
for (unsigned i = 0; i < 2; i++) {
proto->blocks[i].start = blocks_cfg[i].start;
proto->blocks[i].sz = blocks_cfg[i].sz;
proto->state.markers[i] = 0;
}
proto->state.in_block = 0;
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
esp_apptrace_rb_init(&proto->rb_pend, proto->pending_data,
sizeof(proto->pending_data));
#endif
return ESP_OK;
}
@@ -72,10 +81,10 @@ static esp_err_t esp_apptrace_membufs_swap(esp_apptrace_membufs_proto_data_t *pr
{
int prev_block_num = proto->state.in_block % 2;
int new_block_num = prev_block_num ? (0) : (1);
esp_err_t res = ESP_OK;
esp_err_t res = proto->hw->swap_start(proto->state.in_block);
res = proto->hw->swap_start(proto->state.in_block);
if (res != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to swap to new block: %d", res);
return res;
}
@@ -83,7 +92,7 @@ static esp_err_t esp_apptrace_membufs_swap(esp_apptrace_membufs_proto_data_t *pr
// switch to new block
proto->state.in_block++;
proto->hw->swap(new_block_num, proto->state.markers[prev_block_num]);
proto->hw->swap(new_block_num);
// handle data from host
esp_hostdata_hdr_t *hdr = (esp_hostdata_hdr_t *)proto->blocks[new_block_num].start;
@@ -92,19 +101,40 @@ static esp_err_t esp_apptrace_membufs_swap(esp_apptrace_membufs_proto_data_t *pr
// TODO: add support for multiple blocks from host, currently there is no need for that
uint8_t *p = proto->blocks[new_block_num].start + proto->blocks[new_block_num].sz;
ESP_APPTRACE_LOGD("Recvd %" PRIu16 " bytes from host (@ %p) [%x %x %x %x %x %x %x %x .. %x %x %x %x %x %x %x %x]",
hdr->block_sz, proto->blocks[new_block_num].start,
*(proto->blocks[new_block_num].start + 0), *(proto->blocks[new_block_num].start + 1),
*(proto->blocks[new_block_num].start + 2), *(proto->blocks[new_block_num].start + 3),
*(proto->blocks[new_block_num].start + 4), *(proto->blocks[new_block_num].start + 5),
*(proto->blocks[new_block_num].start + 6), *(proto->blocks[new_block_num].start + 7),
*(p - 8), *(p - 7), *(p - 6), *(p - 5), *(p - 4), *(p - 3), *(p - 2), *(p - 1));
uint32_t sz = esp_apptrace_membufs_down_buffer_write_nolock(proto, (uint8_t *)(hdr + 1), hdr->block_sz);
hdr->block_sz, proto->blocks[new_block_num].start,
*(proto->blocks[new_block_num].start+0), *(proto->blocks[new_block_num].start+1),
*(proto->blocks[new_block_num].start+2), *(proto->blocks[new_block_num].start+3),
*(proto->blocks[new_block_num].start+4), *(proto->blocks[new_block_num].start+5),
*(proto->blocks[new_block_num].start+6), *(proto->blocks[new_block_num].start+7),
*(p-8), *(p-7), *(p-6), *(p-5), *(p-4), *(p-3), *(p-2), *(p-1));
uint32_t sz = esp_apptrace_membufs_down_buffer_write_nolock(proto, (uint8_t *)(hdr+1), hdr->block_sz);
if (sz != hdr->block_sz) {
ESP_APPTRACE_LOGE("Failed to write %" PRIu32 " bytes to down buffer (%" PRIu16 " %" PRIu32 ")!",
hdr->block_sz - sz, hdr->block_sz, sz);
ESP_APPTRACE_LOGE("Failed to write %" PRIu32 " bytes to down buffer (%" PRIu16 " %" PRIu32 ")!", hdr->block_sz - sz, hdr->block_sz, sz);
}
hdr->block_sz = 0;
}
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
// copy pending data to block if any
while (proto->state.markers[new_block_num] < proto->blocks[new_block_num].sz) {
uint32_t read_sz = esp_apptrace_rb_read_size_get(&proto->rb_pend);
if (read_sz == 0) {
break; // no more data in pending buffer
}
if (read_sz > proto->blocks[new_block_num].sz - proto->state.markers[new_block_num]) {
read_sz = proto->blocks[new_block_num].sz - proto->state.markers[new_block_num];
}
uint8_t *ptr = esp_apptrace_rb_consume(&proto->rb_pend, read_sz);
if (!ptr) {
assert(false && "Failed to consume pended bytes!!");
break;
}
ESP_APPTRACE_LOGD("Pump %d pend bytes [%x %x %x %x : %x %x %x %x : %x %x %x %x : %x %x...%x %x]",
read_sz, *(ptr+0), *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4),
*(ptr+5), *(ptr+6), *(ptr+7), *(ptr+8), *(ptr+9), *(ptr+10), *(ptr+11), *(ptr+12), *(ptr+13), *(ptr+read_sz-2), *(ptr+read_sz-1));
memcpy(proto->blocks[new_block_num].start + proto->state.markers[new_block_num], ptr, read_sz);
proto->state.markers[new_block_num] += read_sz;
}
#endif
proto->hw->swap_end(proto->state.in_block, proto->state.markers[prev_block_num]);
return res;
}
@@ -134,8 +164,7 @@ static esp_err_t esp_apptrace_membufs_swap_waitus(esp_apptrace_membufs_proto_dat
return res;
}
uint8_t *esp_apptrace_membufs_down_buffer_get(esp_apptrace_membufs_proto_data_t *proto,
uint32_t *size, esp_apptrace_tmo_t *tmo)
uint8_t *esp_apptrace_membufs_down_buffer_get(esp_apptrace_membufs_proto_data_t *proto, uint32_t *size, esp_apptrace_tmo_t *tmo)
{
uint8_t *ptr = NULL;
@@ -168,21 +197,19 @@ uint8_t *esp_apptrace_membufs_down_buffer_get(esp_apptrace_membufs_proto_data_t
return ptr;
}
esp_err_t esp_apptrace_membufs_down_buffer_put(esp_apptrace_membufs_proto_data_t *proto,
uint8_t *ptr, esp_apptrace_tmo_t *tmo)
esp_err_t esp_apptrace_membufs_down_buffer_put(esp_apptrace_membufs_proto_data_t *proto, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
/* nothing todo */
return ESP_OK;
}
static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membufs_proto_data_t *proto,
uint8_t *data, uint32_t size)
static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membufs_proto_data_t *proto, uint8_t *data, uint32_t size)
{
uint32_t total_sz = 0;
while (total_sz < size) {
ESP_APPTRACE_LOGD("esp_apptrace_trax_down_buffer_write_nolock WRS %" PRIu32 "-%" PRIu32 "-%" PRIu32 " %" PRIu32, proto->rb_down.wr, proto->rb_down.rd,
proto->rb_down.cur_size, size);
proto->rb_down.cur_size, size);
uint32_t wr_sz = esp_apptrace_rb_write_size_get(&proto->rb_down);
if (wr_sz == 0) {
break;
@@ -204,55 +231,126 @@ static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membu
return total_sz;
}
static inline uint32_t esp_apptrace_membufs_usr_data_len_max(esp_apptrace_membufs_proto_data_t *proto)
static inline uint8_t *esp_apptrace_membufs_wait4buf(esp_apptrace_membufs_proto_data_t *proto, uint16_t size, esp_apptrace_tmo_t *tmo, int *pended)
{
return proto->header_size == ESP_APPTRACE_HEADER_SIZE_32 ?
ESP_APPTRACE_INBLOCK(proto)->sz - ESP_APPTRACE_HEADER_SIZE_32 : 255;
uint8_t *ptr = NULL;
int res = esp_apptrace_membufs_swap_waitus(proto, tmo);
if (res != ESP_OK) {
return NULL;
}
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
// check if we still have pending data
if (esp_apptrace_rb_read_size_get(&proto->rb_pend) > 0) {
// if after block switch we still have pending data (not all pending data have been pumped to block)
// alloc new pending buffer
*pended = 1;
ptr = esp_apptrace_rb_produce(&proto->rb_pend, size);
if (!ptr) {
ESP_APPTRACE_LOGE("Failed to alloc pend buf 1: w-r-s %d-%d-%d!", proto->rb_pend.wr, proto->rb_pend.rd, proto->rb_pend.cur_size);
}
} else
#endif
{
// update block pointers
if (ESP_APPTRACE_INBLOCK_MARKER(proto) + size > ESP_APPTRACE_INBLOCK(proto)->sz) {
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
*pended = 1;
ptr = esp_apptrace_rb_produce(&proto->rb_pend, size);
if (ptr == NULL) {
ESP_APPTRACE_LOGE("Failed to alloc pend buf 2: w-r-s %d-%d-%d!", proto->rb_pend.wr, proto->rb_pend.rd, proto->rb_pend.cur_size);
}
#endif
} else {
*pended = 0;
ptr = ESP_APPTRACE_INBLOCK(proto)->start + ESP_APPTRACE_INBLOCK_MARKER(proto);
}
}
return ptr;
}
uint8_t *esp_apptrace_membufs_up_buffer_get(esp_apptrace_membufs_proto_data_t *proto,
uint32_t size, esp_apptrace_tmo_t *tmo)
static inline uint8_t *esp_apptrace_membufs_pkt_start(uint8_t *ptr, uint16_t size)
{
if (size > esp_apptrace_membufs_usr_data_len_max(proto)) {
// it is safe to use esp_cpu_get_core_id() in macro call because arg is used only once inside it
((esp_tracedata_hdr_t *)ptr)->block_sz = ESP_APPTRACE_USR_BLOCK_CORE(esp_cpu_get_core_id()) | size;
((esp_tracedata_hdr_t *)ptr)->wr_sz = 0;
return ptr + sizeof(esp_tracedata_hdr_t);
}
static inline void esp_apptrace_membufs_pkt_end(uint8_t *ptr)
{
esp_tracedata_hdr_t *hdr = (esp_tracedata_hdr_t *)(ptr - sizeof(esp_tracedata_hdr_t));
// update written size
hdr->wr_sz = hdr->block_sz;
}
uint8_t *esp_apptrace_membufs_up_buffer_get(esp_apptrace_membufs_proto_data_t *proto, uint32_t size, esp_apptrace_tmo_t *tmo)
{
uint8_t *buf_ptr = NULL;
if (size > ESP_APPTRACE_USR_DATA_LEN_MAX(proto)) {
ESP_APPTRACE_LOGE("Too large user data size %" PRIu32 "!", size);
return NULL;
}
if (ESP_APPTRACE_INBLOCK_MARKER(proto) + size + proto->header_size > ESP_APPTRACE_INBLOCK(proto)->sz) {
int res = esp_apptrace_membufs_swap_waitus(proto, tmo);
if (res != ESP_OK) {
return NULL;
// check for data in the pending buffer
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
if (esp_apptrace_rb_read_size_get(&proto->rb_pend) > 0) {
// if we have buffered data try to switch block
esp_apptrace_membufs_swap(proto);
// if switch was successful, part or all pended data have been copied to block
}
if (esp_apptrace_rb_read_size_get(&proto->rb_pend) > 0) {
// if we have buffered data alloc new pending buffer
ESP_APPTRACE_LOGD("Get %d bytes from PEND buffer", size);
buf_ptr = esp_apptrace_rb_produce(&proto->rb_pend, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
if (buf_ptr == NULL) {
int pended_buf;
buf_ptr = esp_apptrace_membufs_wait4buf(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size), tmo, &pended_buf);
if (buf_ptr && !pended_buf) {
ESP_APPTRACE_LOGD("Get %d bytes from block", size);
// update cur block marker
ESP_APPTRACE_INBLOCK_MARKER_UPD(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
}
}
} else {
#else
if (1) {
#endif
if (ESP_APPTRACE_INBLOCK_MARKER(proto) + ESP_APPTRACE_USR_BLOCK_RAW_SZ(size) > ESP_APPTRACE_INBLOCK(proto)->sz) {
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
ESP_APPTRACE_LOGD("Block full. Get %" PRIu32 " bytes from PEND buffer", size);
buf_ptr = esp_apptrace_rb_produce(&proto->rb_pend, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
#endif
if (buf_ptr == NULL) {
int pended_buf;
ESP_APPTRACE_LOGD(" full. Get %" PRIu32 " bytes from pend buffer", size);
buf_ptr = esp_apptrace_membufs_wait4buf(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size), tmo, &pended_buf);
if (buf_ptr && !pended_buf) {
ESP_APPTRACE_LOGD("Got %" PRIu32 " bytes from block", size);
// update cur block marker
ESP_APPTRACE_INBLOCK_MARKER_UPD(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
}
}
} else {
ESP_APPTRACE_LOGD("Get %" PRIu32 " bytes from buffer", size);
// fit to curr nlock
buf_ptr = ESP_APPTRACE_INBLOCK(proto)->start + ESP_APPTRACE_INBLOCK_MARKER(proto);
// update cur block marker
ESP_APPTRACE_INBLOCK_MARKER_UPD(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
}
}
uint8_t *buf_ptr = ESP_APPTRACE_INBLOCK(proto)->start + ESP_APPTRACE_INBLOCK_MARKER(proto);
// update cur block marker
proto->state.markers[proto->state.in_block % 2] += size + proto->header_size;
// update header
esp_tracedata_hdr_t *hdr = (esp_tracedata_hdr_t *)buf_ptr;
if (proto->header_size == ESP_APPTRACE_HEADER_SIZE_32) {
hdr->block_sz_16 = (esp_cpu_get_core_id() << 15) | size;
hdr->wr_sz_16 = 0;
} else {
hdr->block_sz_8 = size;
hdr->wr_sz_8 = 0;
if (buf_ptr) {
buf_ptr = esp_apptrace_membufs_pkt_start(buf_ptr, size);
}
ESP_APPTRACE_LOGD("Got %" PRIu32 " bytes from block", size);
return buf_ptr + proto->header_size;
return buf_ptr;
}
esp_err_t esp_apptrace_membufs_up_buffer_put(esp_apptrace_membufs_proto_data_t *proto,
uint8_t *ptr, esp_apptrace_tmo_t *tmo)
esp_err_t esp_apptrace_membufs_up_buffer_put(esp_apptrace_membufs_proto_data_t *proto, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
// update header
esp_tracedata_hdr_t *hdr = (esp_tracedata_hdr_t *)(ptr - proto->header_size);
if (proto->header_size == ESP_APPTRACE_HEADER_SIZE_32) {
hdr->wr_sz_16 = hdr->block_sz_16;
} else {
hdr->wr_sz_8 = hdr->block_sz_8;
}
esp_apptrace_membufs_pkt_end(ptr);
// TODO: mark block as busy in order not to reuse it for other tracing calls until it is completely written
// TODO: avoid potential situation when all memory is consumed by low prio tasks which can not complete writing due to
// higher prio tasks and the latter can not allocate buffers at all
@@ -261,8 +359,7 @@ esp_err_t esp_apptrace_membufs_up_buffer_put(esp_apptrace_membufs_proto_data_t *
return ESP_OK;
}
esp_err_t esp_apptrace_membufs_flush_nolock(esp_apptrace_membufs_proto_data_t *proto,
uint32_t min_sz, esp_apptrace_tmo_t *tmo)
esp_err_t esp_apptrace_membufs_flush_nolock(esp_apptrace_membufs_proto_data_t *proto, uint32_t min_sz, esp_apptrace_tmo_t *tmo)
{
int res = ESP_OK;
@@ -270,16 +367,15 @@ esp_err_t esp_apptrace_membufs_flush_nolock(esp_apptrace_membufs_proto_data_t *p
ESP_APPTRACE_LOGI("Ignore flush request for min %" PRIu32 " bytes. Bytes in block: %" PRIu32, min_sz, ESP_APPTRACE_INBLOCK_MARKER(proto));
return ESP_OK;
}
// switch block while size of data is more than min size
// switch block while size of data (including that in pending buffer) is more than min size
while (ESP_APPTRACE_INBLOCK_MARKER(proto) > min_sz) {
ESP_APPTRACE_LOGD("Try to flush %" PRIu32 " bytes", ESP_APPTRACE_INBLOCK_MARKER(proto));
ESP_APPTRACE_LOGD("Try to flush %" PRIu32 " bytes. Wait until block switch for %" PRIi64 " us", ESP_APPTRACE_INBLOCK_MARKER(proto), tmo->tmo);
res = esp_apptrace_membufs_swap_waitus(proto, tmo);
if (res != ESP_OK) {
if (res == ESP_ERR_TIMEOUT) {
ESP_APPTRACE_LOGW("Failed to switch to another block in %" PRId32 " us!", (int32_t)tmo->elapsed);
} else {
ESP_APPTRACE_LOGE("Failed to switch to another block, res: %d", res);
}
if (tmo->tmo != ESP_APPTRACE_TMO_INFINITE)
ESP_APPTRACE_LOGW("Failed to switch to another block in %lld us!", tmo->tmo);
else
ESP_APPTRACE_LOGE("Failed to switch to another block in %lld us!", tmo->tmo);
return res;
}
}

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
@@ -9,14 +9,12 @@
#include "esp_app_trace_util.h"
#include "sdkconfig.h"
#define ESP_APPTRACE_PRINT_LOCK 0
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////// Locks /////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#if ESP_APPTRACE_PRINT_LOCK
static esp_apptrace_lock_t s_log_lock = { .mux = portMUX_INITIALIZER_UNLOCKED };
static esp_apptrace_lock_t s_log_lock = {.irq_stat = 0, .portmux = portMUX_INITIALIZER_UNLOCKED};
#endif
int esp_apptrace_log_lock(void)
@@ -33,7 +31,7 @@ int esp_apptrace_log_lock(void)
void esp_apptrace_log_unlock(void)
{
#if ESP_APPTRACE_PRINT_LOCK
#if ESP_APPTRACE_PRINT_LOCK
esp_apptrace_lock_give(&s_log_lock);
#endif
}
@@ -44,7 +42,7 @@ void esp_apptrace_log_unlock(void)
esp_err_t esp_apptrace_tmo_check(esp_apptrace_tmo_t *tmo)
{
if (tmo->tmo != (int64_t) -1) {
if (tmo->tmo != (int64_t)-1) {
tmo->elapsed = esp_timer_get_time() - tmo->start;
if (tmo->elapsed >= tmo->tmo) {
return ESP_ERR_TIMEOUT;
@@ -57,12 +55,6 @@ esp_err_t esp_apptrace_tmo_check(esp_apptrace_tmo_t *tmo)
///////////////////////////////// LOCK ////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
void esp_apptrace_lock_init(esp_apptrace_lock_t *lock)
{
portMUX_INITIALIZE(&lock->mux);
lock->int_state = 0;
}
esp_err_t esp_apptrace_lock_take(esp_apptrace_lock_t *lock, esp_apptrace_tmo_t *tmo)
{
esp_err_t ret;
@@ -95,7 +87,7 @@ esp_err_t esp_apptrace_lock_give(esp_apptrace_lock_t *lock)
uint8_t *esp_apptrace_rb_produce(esp_apptrace_rb_t *rb, uint32_t size)
{
uint8_t *ptr = rb->data + rb->wr;
// check for available space
// check for avalable space
if (rb->rd <= rb->wr) {
// |?R......W??|
if (rb->wr + size >= rb->size) {

View File

@@ -9,11 +9,11 @@
//
#include "esp_private/startup_internal.h"
#include "esp_dbg_stubs.h"
#include "dbg_stubs.h"
#include "esp_attr.h"
/*
Debug stubs is actually a table of 4-byte entries. Every entry is equal to zero or must contain meaningful data.
Debug stubs is actually a table of 4-byte entries. Every entry is equal to zero or must contain meaningfull data.
The first entry is a service one and has the followinf format:
- tramp_addr, 4 bytes; Address of buffer for trampoline/code. Max size is ESP_DBG_STUBS_CODE_BUF_SIZE.
- min_stack_addr, 4 bytes; Start of the buffer for minimal onboard stack or data. Max size is ESP_DBG_STUBS_STACK_MIN_SIZE.

View File

@@ -0,0 +1,197 @@
/*
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This module implements runtime file I/O API for GCOV.
#include <string.h>
#include "esp_task_wdt.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "soc/timer_periph.h"
#include "esp_app_trace.h"
#include "esp_freertos_hooks.h"
#include "dbg_stubs.h"
#include "esp_private/esp_ipc.h"
#include "esp_attr.h"
#include "hal/wdt_hal.h"
#if CONFIG_APPTRACE_GCOV_ENABLE
#define ESP_GCOV_DOWN_BUF_SIZE 4200
#include "esp_log.h"
const static char *TAG = "esp_gcov_rtio";
static volatile bool s_create_gcov_task = false;
static volatile bool s_gcov_task_running = false;
extern void __gcov_dump(void);
extern void __gcov_reset(void);
void gcov_dump_task(void *pvParameter)
{
int dump_result = 0;
bool *running = (bool *)pvParameter;
ESP_EARLY_LOGV(TAG, "%s stack use in %d", __FUNCTION__, uxTaskGetStackHighWaterMark(NULL));
ESP_EARLY_LOGV(TAG, "Alloc apptrace down buf %d bytes", ESP_GCOV_DOWN_BUF_SIZE);
void *down_buf = malloc(ESP_GCOV_DOWN_BUF_SIZE);
if (down_buf == NULL) {
ESP_EARLY_LOGE(TAG, "Could not allocate memory for the buffer");
dump_result = ESP_ERR_NO_MEM;
goto gcov_exit;
}
ESP_EARLY_LOGV(TAG, "Config apptrace down buf");
esp_apptrace_down_buffer_config(down_buf, ESP_GCOV_DOWN_BUF_SIZE);
ESP_EARLY_LOGV(TAG, "Dump data...");
__gcov_dump();
// reset dump status to allow incremental data accumulation
__gcov_reset();
free(down_buf);
ESP_EARLY_LOGV(TAG, "Finish file transfer session");
dump_result = esp_apptrace_fstop(ESP_APPTRACE_DEST_TRAX);
if (dump_result != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send files transfer stop cmd (%d)!", dump_result);
}
gcov_exit:
ESP_EARLY_LOGV(TAG, "dump_result %d", dump_result);
if (running) {
*running = false;
}
ESP_EARLY_LOGV(TAG, "%s stack use out %d", __FUNCTION__, uxTaskGetStackHighWaterMark(NULL));
vTaskDelete(NULL);
}
void gcov_create_task(void *arg)
{
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
xTaskCreatePinnedToCore(&gcov_dump_task, "gcov_dump_task", CONFIG_APPTRACE_GCOV_DUMP_TASK_STACK_SIZE,
(void *)&s_gcov_task_running, configMAX_PRIORITIES - 1, NULL, 0);
}
static IRAM_ATTR
void gcov_create_task_tick_hook(void)
{
if (s_create_gcov_task) {
if (esp_ipc_call_nonblocking(xPortGetCoreID(), &gcov_create_task, NULL) == ESP_OK) {
s_create_gcov_task = false;
}
}
}
/**
* @brief Triggers gcov info dump task
* This function is to be called by OpenOCD, not by normal user code.
* TODO: what about interrupted flash access (when cache disabled)
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
static int esp_dbg_stub_gcov_entry(void)
{
/* we are in isr context here */
s_create_gcov_task = true;
return ESP_OK;
}
void gcov_rtio_init(void)
{
uint32_t stub_entry = 0;
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
assert(esp_dbg_stub_entry_get(ESP_DBG_STUB_ENTRY_GCOV, &stub_entry) == ESP_OK);
if (stub_entry != 0) {
/* "__gcov_init()" can be called several times. We must avoid multiple tick hook registration */
return;
}
esp_dbg_stub_entry_set(ESP_DBG_STUB_ENTRY_GCOV, (uint32_t)&esp_dbg_stub_gcov_entry);
assert(esp_dbg_stub_entry_get(ESP_DBG_STUB_ENTRY_CAPABILITIES, &stub_entry) == ESP_OK);
esp_dbg_stub_entry_set(ESP_DBG_STUB_ENTRY_CAPABILITIES, stub_entry | ESP_DBG_STUB_CAP_GCOV_TASK);
esp_register_freertos_tick_hook(gcov_create_task_tick_hook);
}
void esp_gcov_dump(void)
{
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
while (!esp_apptrace_host_is_connected(ESP_APPTRACE_DEST_TRAX)) {
vTaskDelay(pdMS_TO_TICKS(10));
}
/* We are not in isr context here. Waiting for the completion is safe */
s_gcov_task_running = true;
s_create_gcov_task = true;
while (s_gcov_task_running) {
vTaskDelay(pdMS_TO_TICKS(10));
}
}
void *gcov_rtio_fopen(const char *path, const char *mode)
{
ESP_EARLY_LOGV(TAG, "%s '%s' '%s'", __FUNCTION__, path, mode);
void *f = esp_apptrace_fopen(ESP_APPTRACE_DEST_TRAX, path, mode);
ESP_EARLY_LOGV(TAG, "%s ret %p", __FUNCTION__, f);
return f;
}
int gcov_rtio_fclose(void *stream)
{
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
return esp_apptrace_fclose(ESP_APPTRACE_DEST_TRAX, stream);
}
size_t gcov_rtio_fread(void *ptr, size_t size, size_t nmemb, void *stream)
{
ESP_EARLY_LOGV(TAG, "%s read %u", __FUNCTION__, size * nmemb);
size_t sz = esp_apptrace_fread(ESP_APPTRACE_DEST_TRAX, ptr, size, nmemb, stream);
ESP_EARLY_LOGV(TAG, "%s actually read %u", __FUNCTION__, sz);
return sz;
}
size_t gcov_rtio_fwrite(const void *ptr, size_t size, size_t nmemb, void *stream)
{
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
return esp_apptrace_fwrite(ESP_APPTRACE_DEST_TRAX, ptr, size, nmemb, stream);
}
int gcov_rtio_fseek(void *stream, long offset, int whence)
{
int ret = esp_apptrace_fseek(ESP_APPTRACE_DEST_TRAX, stream, offset, whence);
ESP_EARLY_LOGV(TAG, "%s(%p %ld %d) = %d", __FUNCTION__, stream, offset, whence, ret);
return ret;
}
long gcov_rtio_ftell(void *stream)
{
long ret = esp_apptrace_ftell(ESP_APPTRACE_DEST_TRAX, stream);
ESP_EARLY_LOGV(TAG, "%s(%p) = %ld", __FUNCTION__, stream, ret);
return ret;
}
int gcov_rtio_feof(void *stream)
{
int ret = esp_apptrace_feof(ESP_APPTRACE_DEST_TRAX, stream);
ESP_EARLY_LOGV(TAG, "%s(%p) = %d", __FUNCTION__, stream, ret);
return ret;
}
void gcov_rtio_setbuf(void *arg1 __attribute__ ((unused)), void *arg2 __attribute__ ((unused)))
{
return;
}
/* Wrappers for Gcov functions */
extern void __real___gcov_init(void *info);
void __wrap___gcov_init(void *info)
{
__real___gcov_init(info);
gcov_rtio_init();
}
#endif

View File

@@ -0,0 +1,8 @@
fopen gcov_rtio_fopen
fclose gcov_rtio_fclose
fwrite gcov_rtio_fwrite
fread gcov_rtio_fread
fseek gcov_rtio_fseek
ftell gcov_rtio_ftell
setbuf gcov_rtio_setbuf
feof gcov_rtio_feof

View File

@@ -0,0 +1,115 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sdkconfig.h>
#define HEAP_TRACE_SRCFILE /* don't warn on inclusion here */
#include "esp_heap_trace.h"
#undef HEAP_TRACE_SRCFILE
#include "esp_heap_caps.h"
#if CONFIG_APPTRACE_SV_ENABLE
#include "esp_app_trace.h"
#include "esp_sysview_trace.h"
#endif
#define STACK_DEPTH CONFIG_HEAP_TRACING_STACK_DEPTH
#ifdef CONFIG_HEAP_TRACING_TOHOST
#if !CONFIG_APPTRACE_SV_ENABLE
#error None of the heap tracing backends is enabled! You must enable SystemView compatible tracing to use this feature.
#endif
static bool s_tracing;
esp_err_t heap_trace_init_tohost(void)
{
if (s_tracing) {
return ESP_ERR_INVALID_STATE;
}
return ESP_OK;
}
esp_err_t heap_trace_start(heap_trace_mode_t mode_param)
{
#if CONFIG_APPTRACE_SV_ENABLE
esp_err_t ret = esp_sysview_heap_trace_start((uint32_t)-1);
if (ret != ESP_OK) {
return ret;
}
#endif
s_tracing = true;
return ESP_OK;
}
esp_err_t heap_trace_stop(void)
{
esp_err_t ret = ESP_ERR_NOT_SUPPORTED;
#if CONFIG_APPTRACE_SV_ENABLE
ret = esp_sysview_heap_trace_stop();
#endif
s_tracing = false;
return ret;
}
esp_err_t heap_trace_resume(void)
{
return heap_trace_start(HEAP_TRACE_ALL);
}
size_t heap_trace_get_count(void)
{
return 0;
}
esp_err_t heap_trace_get(size_t index, heap_trace_record_t *record)
{
return ESP_ERR_NOT_SUPPORTED;
}
esp_err_t heap_trace_summary(heap_trace_summary_t *summary)
{
return ESP_ERR_NOT_SUPPORTED;
}
void heap_trace_dump(void)
{
return;
}
void heap_trace_dump_caps(__attribute__((unused)) const uint32_t caps)
{
return;
}
/* Add a new allocation to the heap trace records */
static HEAP_IRAM_ATTR void record_allocation(const heap_trace_record_t *record)
{
if (!s_tracing) {
return;
}
#if CONFIG_APPTRACE_SV_ENABLE
esp_sysview_heap_trace_alloc(record->address, record->size, record->alloced_by);
#endif
}
/* record a free event in the heap trace log
For HEAP_TRACE_ALL, this means filling in the freed_by pointer.
For HEAP_TRACE_LEAKS, this means removing the record from the log.
*/
static HEAP_IRAM_ATTR void record_free(void *p, void **callers)
{
if (!s_tracing) {
return;
}
#if CONFIG_APPTRACE_SV_ENABLE
esp_sysview_heap_trace_free(p, callers);
#endif
}
#include "heap_trace.inc"
#endif /*CONFIG_HEAP_TRACING_TOHOST*/

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -17,6 +17,8 @@
#include <string.h>
#include "esp_app_trace.h"
#if CONFIG_APPTRACE_ENABLE
#include "esp_log.h"
const static char *TAG = "esp_host_file_io";
@@ -77,13 +79,13 @@ typedef struct {
void *file;
} esp_apptrace_ftell_args_t;
static esp_err_t esp_apptrace_file_cmd_send(uint8_t cmd, void (*prep_args)(uint8_t *, void *), void *args, uint32_t args_len)
static esp_err_t esp_apptrace_file_cmd_send(esp_apptrace_dest_t dest, uint8_t cmd, void (*prep_args)(uint8_t *, void *), void *args, uint32_t args_len)
{
esp_err_t ret;
esp_apptrace_fcmd_hdr_t *hdr;
ESP_EARLY_LOGV(TAG, "%s %d", __func__, cmd);
uint8_t *ptr = esp_apptrace_buffer_get(sizeof(*hdr) + args_len, ESP_APPTRACE_TMO_INFINITE); //TODO: finite tmo
uint8_t *ptr = esp_apptrace_buffer_get(dest, sizeof(*hdr) + args_len, ESP_APPTRACE_TMO_INFINITE); //TODO: finite tmo
if (ptr == NULL) {
return ESP_ERR_NO_MEM;
}
@@ -95,13 +97,13 @@ static esp_err_t esp_apptrace_file_cmd_send(uint8_t cmd, void (*prep_args)(uint8
}
// now indicate that this buffer is ready to be sent off to host
ret = esp_apptrace_buffer_put(ptr, ESP_APPTRACE_TMO_INFINITE);//TODO: finite tmo
ret = esp_apptrace_buffer_put(dest, ptr, ESP_APPTRACE_TMO_INFINITE);//TODO: finite tmo
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to put apptrace buffer (%d)!", ret);
return ret;
}
ret = esp_apptrace_flush(ESP_APPTRACE_TMO_INFINITE);//TODO: finite tmo
ret = esp_apptrace_flush(dest, ESP_APPTRACE_TMO_INFINITE);//TODO: finite tmo
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to flush apptrace buffer (%d)!", ret);
return ret;
@@ -110,12 +112,12 @@ static esp_err_t esp_apptrace_file_cmd_send(uint8_t cmd, void (*prep_args)(uint8
return ESP_OK;
}
static esp_err_t esp_apptrace_file_rsp_recv(uint8_t *buf, uint32_t buf_len)
static esp_err_t esp_apptrace_file_rsp_recv(esp_apptrace_dest_t dest, uint8_t *buf, uint32_t buf_len)
{
uint32_t tot_rd = 0;
while (tot_rd < buf_len) {
uint32_t rd_size = buf_len - tot_rd;
esp_err_t ret = esp_apptrace_read(buf + tot_rd, &rd_size, ESP_APPTRACE_TMO_INFINITE); //TODO: finite tmo
esp_err_t ret = esp_apptrace_read(dest, buf + tot_rd, &rd_size, ESP_APPTRACE_TMO_INFINITE); //TODO: finite tmo
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read (%d)!", ret);
return ret;
@@ -135,7 +137,7 @@ static void esp_apptrace_fopen_args_prepare(uint8_t *buf, void *priv)
memcpy(buf + args->path_len, args->mode, args->mode_len);
}
void *esp_apptrace_fopen(const char *path, const char *mode)
void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char *mode)
{
esp_apptrace_fopen_args_t cmd_args;
@@ -149,8 +151,8 @@ void *esp_apptrace_fopen(const char *path, const char *mode)
cmd_args.mode = mode;
cmd_args.mode_len = strlen(mode) + 1;
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_FOPEN, esp_apptrace_fopen_args_prepare,
&cmd_args, cmd_args.path_len + cmd_args.mode_len);
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FOPEN, esp_apptrace_fopen_args_prepare,
&cmd_args, cmd_args.path_len+cmd_args.mode_len);
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return NULL;
@@ -158,7 +160,7 @@ void *esp_apptrace_fopen(const char *path, const char *mode)
// now read the answer
void *resp;
ret = esp_apptrace_file_rsp_recv((uint8_t *)&resp, sizeof(resp));
ret = esp_apptrace_file_rsp_recv(dest, (uint8_t *)&resp, sizeof(resp));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return NULL;
@@ -174,13 +176,13 @@ static void esp_apptrace_fclose_args_prepare(uint8_t *buf, void *priv)
memcpy(buf, &args->file, sizeof(args->file));
}
int esp_apptrace_fclose(void *stream)
int esp_apptrace_fclose(esp_apptrace_dest_t dest, void *stream)
{
esp_apptrace_fclose_args_t cmd_args;
cmd_args.file = stream;
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_FCLOSE, esp_apptrace_fclose_args_prepare,
&cmd_args, sizeof(cmd_args));
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FCLOSE, esp_apptrace_fclose_args_prepare,
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return EOF;
@@ -188,7 +190,7 @@ int esp_apptrace_fclose(void *stream)
// now read the answer
int resp;
ret = esp_apptrace_file_rsp_recv((uint8_t *)&resp, sizeof(resp));
ret = esp_apptrace_file_rsp_recv(dest, (uint8_t *)&resp, sizeof(resp));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return EOF;
@@ -205,11 +207,11 @@ static void esp_apptrace_fwrite_args_prepare(uint8_t *buf, void *priv)
memcpy(buf + sizeof(args->file), args->buf, args->size);
}
size_t esp_apptrace_fwrite(const void *ptr, size_t size, size_t nmemb, void *stream)
size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t size, size_t nmemb, void *stream)
{
esp_apptrace_fwrite_args_t cmd_args;
ESP_EARLY_LOGV(TAG, "esp_apptrace_fwrite f %p l %d", stream, size * nmemb);
ESP_EARLY_LOGV(TAG, "esp_apptrace_fwrite f %p l %d", stream, size*nmemb);
if (ptr == NULL) {
return 0;
@@ -218,8 +220,8 @@ size_t esp_apptrace_fwrite(const void *ptr, size_t size, size_t nmemb, void *str
cmd_args.buf = (void *)ptr;
cmd_args.size = size * nmemb;
cmd_args.file = stream;
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_FWRITE, esp_apptrace_fwrite_args_prepare,
&cmd_args, sizeof(cmd_args.file) + cmd_args.size);
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FWRITE, esp_apptrace_fwrite_args_prepare,
&cmd_args, sizeof(cmd_args.file)+cmd_args.size);
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return 0;
@@ -227,7 +229,7 @@ size_t esp_apptrace_fwrite(const void *ptr, size_t size, size_t nmemb, void *str
// now read the answer
size_t resp;
ret = esp_apptrace_file_rsp_recv((uint8_t *)&resp, sizeof(resp));
ret = esp_apptrace_file_rsp_recv(dest, (uint8_t *)&resp, sizeof(resp));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return 0;
@@ -247,11 +249,11 @@ static void esp_apptrace_fread_args_prepare(uint8_t *buf, void *priv)
memcpy(buf + sizeof(args->file), &args->size, sizeof(args->size));
}
size_t esp_apptrace_fread(void *ptr, size_t size, size_t nmemb, void *stream)
size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size_t nmemb, void *stream)
{
esp_apptrace_fread_args_t cmd_args;
ESP_EARLY_LOGV(TAG, "esp_apptrace_fread f %p l %d", stream, size * nmemb);
ESP_EARLY_LOGV(TAG, "esp_apptrace_fread f %p l %d", stream, size*nmemb);
if (ptr == NULL) {
return 0;
@@ -259,8 +261,8 @@ size_t esp_apptrace_fread(void *ptr, size_t size, size_t nmemb, void *stream)
cmd_args.size = size * nmemb;
cmd_args.file = stream;
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_FREAD, esp_apptrace_fread_args_prepare,
&cmd_args, sizeof(cmd_args));
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FREAD, esp_apptrace_fread_args_prepare,
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return 0;
@@ -268,7 +270,7 @@ size_t esp_apptrace_fread(void *ptr, size_t size, size_t nmemb, void *stream)
// now read the answer
size_t resp;
ret = esp_apptrace_file_rsp_recv((uint8_t *)&resp, sizeof(resp));
ret = esp_apptrace_file_rsp_recv(dest, (uint8_t *)&resp, sizeof(resp));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return 0;
@@ -277,7 +279,7 @@ size_t esp_apptrace_fread(void *ptr, size_t size, size_t nmemb, void *stream)
return 0;
}
ret = esp_apptrace_file_rsp_recv(ptr, resp);
ret = esp_apptrace_file_rsp_recv(dest, ptr, resp);
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read file data (%d)!", ret);
return 0;
@@ -286,7 +288,7 @@ size_t esp_apptrace_fread(void *ptr, size_t size, size_t nmemb, void *stream)
* fread(buf, 1 ,size, file);
* So, total read bytes count returns
*/
return resp / size; // return the number of items read
return resp/size; // return the number of items read
}
static void esp_apptrace_fseek_args_prepare(uint8_t *buf, void *priv)
@@ -298,7 +300,7 @@ static void esp_apptrace_fseek_args_prepare(uint8_t *buf, void *priv)
memcpy(buf + sizeof(args->file) + sizeof(args->offset), &args->whence, sizeof(args->whence));
}
int esp_apptrace_fseek(void *stream, long offset, int whence)
int esp_apptrace_fseek(esp_apptrace_dest_t dest, void *stream, long offset, int whence)
{
esp_apptrace_fseek_args_t cmd_args;
@@ -307,8 +309,8 @@ int esp_apptrace_fseek(void *stream, long offset, int whence)
cmd_args.file = stream;
cmd_args.offset = offset;
cmd_args.whence = whence;
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_FSEEK, esp_apptrace_fseek_args_prepare,
&cmd_args, sizeof(cmd_args));
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FSEEK, esp_apptrace_fseek_args_prepare,
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return -1;
@@ -316,7 +318,7 @@ int esp_apptrace_fseek(void *stream, long offset, int whence)
// now read the answer
int resp;
ret = esp_apptrace_file_rsp_recv((uint8_t *)&resp, sizeof(resp));
ret = esp_apptrace_file_rsp_recv(dest, (uint8_t *)&resp, sizeof(resp));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return -1;
@@ -332,13 +334,13 @@ static void esp_apptrace_ftell_args_prepare(uint8_t *buf, void *priv)
memcpy(buf, &args->file, sizeof(args->file));
}
int esp_apptrace_ftell(void *stream)
int esp_apptrace_ftell(esp_apptrace_dest_t dest, void *stream)
{
esp_apptrace_ftell_args_t cmd_args;
cmd_args.file = stream;
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_FTELL, esp_apptrace_ftell_args_prepare,
&cmd_args, sizeof(cmd_args));
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FTELL, esp_apptrace_ftell_args_prepare,
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return -1;
@@ -346,7 +348,7 @@ int esp_apptrace_ftell(void *stream)
// now read the answer
int resp;
ret = esp_apptrace_file_rsp_recv((uint8_t *)&resp, sizeof(resp));
ret = esp_apptrace_file_rsp_recv(dest, (uint8_t *)&resp, sizeof(resp));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return -1;
@@ -355,10 +357,10 @@ int esp_apptrace_ftell(void *stream)
return resp;
}
int esp_apptrace_fstop(void)
int esp_apptrace_fstop(esp_apptrace_dest_t dest)
{
ESP_EARLY_LOGV(TAG, "%s", __func__);
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_STOP, NULL, NULL, 0);
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_STOP, NULL, NULL, 0);
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send files transfer stop cmd (%d)!", ret);
}
@@ -372,13 +374,13 @@ static void esp_apptrace_feof_args_prepare(uint8_t *buf, void *priv)
memcpy(buf, &args->file, sizeof(args->file));
}
int esp_apptrace_feof(void *stream)
int esp_apptrace_feof(esp_apptrace_dest_t dest, void *stream)
{
esp_apptrace_feof_args_t cmd_args;
cmd_args.file = stream;
esp_err_t ret = esp_apptrace_file_cmd_send(ESP_APPTRACE_FILE_CMD_FEOF, esp_apptrace_feof_args_prepare,
&cmd_args, sizeof(cmd_args));
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FEOF, esp_apptrace_feof_args_prepare,
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return EOF;
@@ -386,7 +388,7 @@ int esp_apptrace_feof(void *stream)
// now read the answer
int resp;
ret = esp_apptrace_file_rsp_recv((uint8_t *)&resp, sizeof(resp));
ret = esp_apptrace_file_rsp_recv(dest, (uint8_t *)&resp, sizeof(resp));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to read response (%d)!", ret);
return EOF;
@@ -394,3 +396,5 @@ int esp_apptrace_feof(void *stream)
return resp;
}
#endif

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -8,7 +8,6 @@
#include <stdarg.h>
#include "esp_err.h"
#include "esp_app_trace_config.h"
#include "esp_app_trace_util.h" // ESP_APPTRACE_TMO_INFINITE
#ifdef __cplusplus
@@ -16,70 +15,82 @@ extern "C" {
#endif
/**
* @brief Initializes application tracing module for the selected destination and configuration.
* Application trace data destinations bits.
*/
typedef enum {
ESP_APPTRACE_DEST_JTAG = 1, ///< JTAG destination
ESP_APPTRACE_DEST_TRAX = ESP_APPTRACE_DEST_JTAG, ///< xxx_TRAX name is obsolete, use more common xxx_JTAG
ESP_APPTRACE_DEST_UART, ///< UART destination
ESP_APPTRACE_DEST_MAX = ESP_APPTRACE_DEST_UART+1,
ESP_APPTRACE_DEST_NUM
} esp_apptrace_dest_t;
/**
* @brief Initializes application tracing module.
*
* @note Should be called before any esp_apptrace_xxx call.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_init(const esp_apptrace_config_t *config);
esp_err_t esp_apptrace_init(void);
/**
* @brief Configures down buffer.
*
* @note Needs to be called before attempting to receive any data using esp_apptrace_down_buffer_get and
* esp_apptrace_read. This function does not protect internal data by lock.
* @note Needs to be called before attempting to receive any data using esp_apptrace_down_buffer_get and esp_apptrace_read.
* This function does not protect internal data by lock.
*
* @param buf Address of buffer to use for down channel (host to target) data.
* @param size Size of the buffer.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_down_buffer_config(uint8_t *buf, uint32_t size);
void esp_apptrace_down_buffer_config(uint8_t *buf, uint32_t size);
/**
* @brief Allocates buffer for trace data.
* Once the data in the buffer is ready to be sent, esp_apptrace_buffer_put must be called to indicate it.
*
* @param dest Indicates HW interface to send data.
* @param size Size of data to write to trace buffer.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return non-NULL on success, otherwise NULL.
*/
uint8_t *esp_apptrace_buffer_get(uint32_t size, uint32_t tmo);
uint8_t *esp_apptrace_buffer_get(esp_apptrace_dest_t dest, uint32_t size, uint32_t tmo);
/**
* @brief Indicates that the data in the buffer is ready to be sent.
* This function is a counterpart of and must be preceded by esp_apptrace_buffer_get.
*
* @param dest Indicates HW interface to send data. Should be identical to the same parameter in call to esp_apptrace_buffer_get.
* @param ptr Address of trace buffer to release. Should be the value returned by call to esp_apptrace_buffer_get.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_buffer_put(uint8_t *ptr, uint32_t tmo);
esp_err_t esp_apptrace_buffer_put(esp_apptrace_dest_t dest, uint8_t *ptr, uint32_t tmo);
/**
* @brief Writes data to trace buffer.
*
* @param dest Indicates HW interface to send data.
* @param data Address of data to write to trace buffer.
* @param size Size of data to write to trace buffer.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_write(const void *data, uint32_t size, uint32_t tmo);
esp_err_t esp_apptrace_write(esp_apptrace_dest_t dest, const void *data, uint32_t size, uint32_t tmo);
/**
* @brief vprintf-like function to send log messages to host via specified HW interface.
*
* @param dest Indicates HW interface to send data.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
* @param fmt Address of format string.
* @param ap List of arguments.
*
* @return Number of bytes written.
*/
int esp_apptrace_vprintf_to(uint32_t tmo, const char *fmt, va_list ap);
int esp_apptrace_vprintf_to(esp_apptrace_dest_t dest, uint32_t tmo, const char *fmt, va_list ap);
/**
* @brief vprintf-like function to send log messages to host.
@@ -94,198 +105,172 @@ int esp_apptrace_vprintf(const char *fmt, va_list ap);
/**
* @brief Flushes remaining data in trace buffer to host.
*
* @param dest Indicates HW interface to flush data on.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_flush(uint32_t tmo);
esp_err_t esp_apptrace_flush(esp_apptrace_dest_t dest, uint32_t tmo);
/**
* @brief Flushes remaining data in trace buffer to host without locking internal data.
* This is a special version of esp_apptrace_flush which should be called from panic handler.
*
* @param min_sz Threshold for flushing data. If current filling level is above this value, data will be flushed. JTAG destinations only.
* @param dest Indicates HW interface to flush data on.
* @param min_sz Threshold for flushing data. If current filling level is above this value, data will be flushed. TRAX destinations only.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_flush_nolock(uint32_t min_sz, uint32_t tmo);
esp_err_t esp_apptrace_flush_nolock(esp_apptrace_dest_t dest, uint32_t min_sz, uint32_t tmo);
/**
* @brief Reads host data from trace buffer.
*
* @param dest Indicates HW interface to read the data on.
* @param data Address of buffer to put data from trace buffer.
* @param size Pointer to store size of read data. Before call to this function pointed memory must hold requested size of data
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_read(void *data, uint32_t *size, uint32_t tmo);
esp_err_t esp_apptrace_read(esp_apptrace_dest_t dest, void *data, uint32_t *size, uint32_t tmo);
/**
* @brief Retrieves incoming data buffer if any.
* Once data in the buffer is processed, esp_apptrace_down_buffer_put must be called to indicate it.
*
* @param dest Indicates HW interface to receive data.
* @param size Address to store size of available data in down buffer. Must be initialized with requested value.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return non-NULL on success, otherwise NULL.
*/
uint8_t *esp_apptrace_down_buffer_get(uint32_t *size, uint32_t tmo);
uint8_t *esp_apptrace_down_buffer_get(esp_apptrace_dest_t dest, uint32_t *size, uint32_t tmo);
/**
* @brief Indicates that the data in the down buffer is processed.
* This function is a counterpart of and must be preceded by esp_apptrace_down_buffer_get.
*
* @param dest Indicates HW interface to receive data. Should be identical to the same parameter in call to esp_apptrace_down_buffer_get.
* @param ptr Address of trace buffer to release. Should be the value returned by call to esp_apptrace_down_buffer_get.
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_down_buffer_put(uint8_t *ptr, uint32_t tmo);
esp_err_t esp_apptrace_down_buffer_put(esp_apptrace_dest_t dest, uint8_t *ptr, uint32_t tmo);
/**
* @brief Checks whether host is connected.
*
* @param dest Indicates HW interface to use.
*
* @return true if host is connected, otherwise false
*/
bool esp_apptrace_host_is_connected(void);
/**
* @brief Gets the destination of the application trace.
*
* @return The destination of the application trace.
*/
esp_apptrace_dest_t esp_apptrace_get_destination(void);
/**
* @brief Sets the header size of the application trace packet.
*
* @param header_size The header size to set.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_apptrace_set_header_size(esp_apptrace_header_size_t header_size);
bool esp_apptrace_host_is_connected(esp_apptrace_dest_t dest);
/**
* @brief Opens file on host.
* This function has the same semantic as 'fopen' except for the first argument.
* This function has the same semantic as 'fopen' except for the first argument.
*
* @param dest Indicates HW interface to use.
* @param path Path to file.
* @param mode Mode string. See fopen for details.
*
* @return non zero file handle on success, otherwise 0
*/
void *esp_apptrace_fopen(const char *path, const char *mode);
void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char *mode);
/**
* @brief Closes file on host.
* This function has the same semantic as 'fclose' except for the first argument.
* This function has the same semantic as 'fclose' except for the first argument.
*
* @param dest Indicates HW interface to use.
* @param stream File handle returned by esp_apptrace_fopen.
*
* @return Zero on success, otherwise non-zero. See fclose for details.
*/
int esp_apptrace_fclose(void *stream);
int esp_apptrace_fclose(esp_apptrace_dest_t dest, void *stream);
/**
* @brief Writes to file on host.
* This function has the same semantic as 'fwrite' except for the first argument.
* This function has the same semantic as 'fwrite' except for the first argument.
*
* @param ptr Address of data to write.
* @param size Size of an item.
* @param dest Indicates HW interface to use.
* @param ptr Address of data to write.
* @param size Size of an item.
* @param nmemb Number of items to write.
* @param stream File handle returned by esp_apptrace_fopen.
*
* @return Number of written items. See fwrite for details.
*/
size_t esp_apptrace_fwrite(const void *ptr, size_t size, size_t nmemb, void *stream);
size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t size, size_t nmemb, void *stream);
/**
* @brief Read file on host.
* This function has the same semantic as 'fread' except for the first argument.
* This function has the same semantic as 'fread' except for the first argument.
*
* @param ptr Address to store read data.
* @param size Size of an item.
* @param dest Indicates HW interface to use.
* @param ptr Address to store read data.
* @param size Size of an item.
* @param nmemb Number of items to read.
* @param stream File handle returned by esp_apptrace_fopen.
*
* @return Number of read items. See fread for details.
*/
size_t esp_apptrace_fread(void *ptr, size_t size, size_t nmemb, void *stream);
size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size_t nmemb, void *stream);
/**
* @brief Set position indicator in file on host.
* This function has the same semantic as 'fseek' except for the first argument.
* This function has the same semantic as 'fseek' except for the first argument.
*
* @param dest Indicates HW interface to use.
* @param stream File handle returned by esp_apptrace_fopen.
* @param offset Offset. See fseek for details.
* @param whence Position in file. See fseek for details.
*
* @return Zero on success, otherwise non-zero. See fseek for details.
*/
int esp_apptrace_fseek(void *stream, long offset, int whence);
int esp_apptrace_fseek(esp_apptrace_dest_t dest, void *stream, long offset, int whence);
/**
* @brief Get current position indicator for file on host.
* This function has the same semantic as 'ftell' except for the first argument.
* This function has the same semantic as 'ftell' except for the first argument.
*
* @param dest Indicates HW interface to use.
* @param stream File handle returned by esp_apptrace_fopen.
*
* @return Current position in file. See ftell for details.
*/
int esp_apptrace_ftell(void *stream);
int esp_apptrace_ftell(esp_apptrace_dest_t dest, void *stream);
/**
* @brief Indicates to the host that all file operations are complete.
* This function should be called after all file operations are finished and
* indicate to the host that it can perform cleanup operations (close open files etc.).
* This function should be called after all file operations are finished and
* indicate to the host that it can perform cleanup operations (close open files etc.).
*
* @param dest Indicates HW interface to use.
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
int esp_apptrace_fstop(void);
int esp_apptrace_fstop(esp_apptrace_dest_t dest);
/**
* @brief Test end-of-file indicator on a stream.
* This function has the same semantic as 'feof' except for the first argument.
* This function has the same semantic as 'feof' except for the first argument.
*
* @param dest Indicates HW interface to use.
* @param stream File handle returned by esp_apptrace_fopen.
*
* @return Non-Zero if end-of-file indicator is set for stream. See feof for details.
*/
int esp_apptrace_feof(void *stream);
int esp_apptrace_feof(esp_apptrace_dest_t dest, void *stream);
#if !CONFIG_APPTRACE_DEST_UART // JTAG or NONE
#define APPTRACE_JTAG_CONFIG_DEFAULT() { \
.dest = ESP_APPTRACE_DEST_JTAG, \
.dest_cfg.jtag = {0}, \
.flush_tmo = CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO, \
.flush_thresh = CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH, \
}
#endif
#if !CONFIG_APPTRACE_DEST_JTAG // UART or NONE
#define APPTRACE_UART_CONFIG_DEFAULT() { \
.dest = ESP_APPTRACE_DEST_UART, \
.dest_cfg.uart = { \
.uart_num = CONFIG_APPTRACE_DEST_UART_NUM, \
.tx_pin_num = CONFIG_APPTRACE_UART_TX_GPIO, \
.rx_pin_num = CONFIG_APPTRACE_UART_RX_GPIO, \
.baud_rate = CONFIG_APPTRACE_UART_BAUDRATE, \
.tx_buff_size = CONFIG_APPTRACE_UART_TX_BUFF_SIZE, \
.tx_msg_size = CONFIG_APPTRACE_UART_TX_MSG_SIZE, \
}, \
.flush_tmo = CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO, \
.flush_thresh = CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH, \
}
#endif
// Default picks JTAG if available, otherwise UART
#if !CONFIG_APPTRACE_DEST_UART
#define APPTRACE_CONFIG_DEFAULT() APPTRACE_JTAG_CONFIG_DEFAULT()
#else
#define APPTRACE_CONFIG_DEFAULT() APPTRACE_UART_CONFIG_DEFAULT()
#endif
/**
* @brief Triggers gcov info dump.
* This function waits for the host to connect to target before dumping data.
*/
void esp_gcov_dump(void);
#ifdef __cplusplus
}

View File

@@ -1,51 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ESP_APP_TRACE_CONFIG_H_
#define ESP_APP_TRACE_CONFIG_H_
#include "sdkconfig.h"
/* Default configurations for runtime selection (APPTRACE_DEST_ALL)
* These values are used when building with both JTAG and UART enabled
* to allow runtime selection. You can switch between destinations
* via esp_apptrace_get_user_params(). If this function is
* not provided by the application, JTAG is used by default with the
* configuration defined below. See esp_app_trace.h for details.
*/
#if !defined(CONFIG_APPTRACE_UART_TX_GPIO) || !defined(CONFIG_APPTRACE_UART_RX_GPIO)
#include "soc/uart_pins.h"
#endif
#ifndef CONFIG_APPTRACE_BUF_SIZE
#define CONFIG_APPTRACE_BUF_SIZE 16384
#endif
#ifndef CONFIG_APPTRACE_UART_TX_BUFF_SIZE
#define CONFIG_APPTRACE_UART_TX_BUFF_SIZE 4096
#endif
#ifndef CONFIG_APPTRACE_UART_TX_MSG_SIZE
#define CONFIG_APPTRACE_UART_TX_MSG_SIZE 128
#endif
#ifndef CONFIG_APPTRACE_UART_BAUDRATE
#define CONFIG_APPTRACE_UART_BAUDRATE 1000000
#endif
#ifndef CONFIG_APPTRACE_UART_TX_GPIO
#define CONFIG_APPTRACE_UART_TX_GPIO U1TXD_GPIO_NUM
#endif
#ifndef CONFIG_APPTRACE_UART_RX_GPIO
#define CONFIG_APPTRACE_UART_RX_GPIO U1RXD_GPIO_NUM
#endif
#ifndef CONFIG_APPTRACE_DEST_UART_NUM
#define CONFIG_APPTRACE_DEST_UART_NUM 1
#endif
#endif /* ESP_APP_TRACE_CONFIG_H_ */

View File

@@ -1,95 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ESP_APP_TRACE_TYPES_H_
#define ESP_APP_TRACE_TYPES_H_
#include <stdint.h>
#include "spinlock.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Structure which holds data necessary for measuring time intervals.
*
* After initialization via esp_apptrace_tmo_init() user needs to call esp_apptrace_tmo_check()
* periodically to check timeout for expiration.
*/
typedef struct {
int64_t start; ///< time interval start (in us)
int64_t tmo; ///< timeout value (in us)
int64_t elapsed; ///< elapsed time (in us)
} esp_apptrace_tmo_t;
/** Tracing module synchronization lock */
typedef struct {
spinlock_t mux;
unsigned int int_state;
} esp_apptrace_lock_t;
/** Ring buffer control structure.
*
* @note For purposes of application tracing module if there is no enough space for user data and write pointer can be wrapped
* current ring buffer size can be temporarily shrunk in order to provide buffer with requested size.
*/
typedef struct {
uint8_t *data; ///< pointer to data storage
volatile uint32_t size; ///< size of data storage
volatile uint32_t cur_size; ///< current size of data storage
volatile uint32_t rd; ///< read pointer
volatile uint32_t wr; ///< write pointer
} esp_apptrace_rb_t;
/**
* Application trace data destinations
*/
typedef enum {
ESP_APPTRACE_DEST_JTAG,
ESP_APPTRACE_DEST_UART,
} esp_apptrace_dest_t;
/**
* Application trace configuration for UART destination
*/
typedef struct {
int uart_num; ///< Port number
int tx_pin_num; ///< TX pin number
int rx_pin_num; ///< RX pin number
int baud_rate; ///< Baud rate
uint32_t tx_buff_size; ///< TX ring buffer size
uint32_t tx_msg_size; ///< Maximum size of the single message to transfer.
} esp_apptrace_uart_config_t;
/**
* Application trace trace header size in bytes. It is 2 bytes for SEGGER SystemView
*/
typedef enum {
ESP_APPTRACE_HEADER_SIZE_16 = 2,
ESP_APPTRACE_HEADER_SIZE_32 = 4,
} esp_apptrace_header_size_t;
/**
* Application trace configuration
*/
typedef struct {
esp_apptrace_dest_t dest; ///< Destination type (JTAG or UART)
union {
esp_apptrace_uart_config_t uart; ///< UART configuration (when dest is ESP_APPTRACE_DEST_UART)
struct { ///< Reserved for JTAG (when dest is ESP_APPTRACE_DEST_JTAG)
uint8_t _unused;
} jtag;
} dest_cfg; ///< Destination-specific configuration
uint32_t flush_tmo; ///< Flush timeout in milliseconds
uint32_t flush_thresh; ///< Flush threshold in bytes
} esp_apptrace_config_t;
#ifdef __cplusplus
}
#endif
#endif /* ESP_APP_TRACE_TYPES_H_ */

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -10,23 +10,34 @@
extern "C" {
#endif
#include "freertos/FreeRTOS.h"
#include "esp_err.h"
#include "esp_timer.h"
#include "esp_app_trace_types.h"
/** Infinite waiting timeout */
#define ESP_APPTRACE_TMO_INFINITE ((uint32_t)-1)
/** Structure which holds data necessary for measuring time intervals.
*
* After initialization via esp_apptrace_tmo_init() user needs to call esp_apptrace_tmo_check()
* periodically to check timeout for expiration.
*/
typedef struct {
int64_t start; ///< time interval start (in us)
int64_t tmo; ///< timeout value (in us)
int64_t elapsed; ///< elapsed time (in us)
} esp_apptrace_tmo_t;
/**
* @brief Initializes timeout structure.
*
* @param tmo Pointer to timeout structure to be initialized.
* @param user_tmo Timeout value (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
* @param user_tmo Timeout value (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinetly.
*/
static inline void esp_apptrace_tmo_init(esp_apptrace_tmo_t *tmo, uint32_t user_tmo)
{
tmo->start = esp_timer_get_time();
tmo->tmo = user_tmo == ESP_APPTRACE_TMO_INFINITE ? (int64_t) -1 : (int64_t)user_tmo;
tmo->tmo = user_tmo == ESP_APPTRACE_TMO_INFINITE ? (int64_t)-1 : (int64_t)user_tmo;
tmo->elapsed = 0;
}
@@ -41,15 +52,25 @@ esp_err_t esp_apptrace_tmo_check(esp_apptrace_tmo_t *tmo);
static inline uint32_t esp_apptrace_tmo_remaining_us(esp_apptrace_tmo_t *tmo)
{
return tmo->tmo != (int64_t) -1 ? (tmo->elapsed - tmo->tmo) : ESP_APPTRACE_TMO_INFINITE;
return tmo->tmo != (int64_t)-1 ? (tmo->elapsed - tmo->tmo) : ESP_APPTRACE_TMO_INFINITE;
}
/** Tracing module synchronization lock */
typedef struct {
spinlock_t mux;
unsigned int_state;
} esp_apptrace_lock_t;
/**
* @brief Initializes lock structure.
*
* @param lock Pointer to lock structure to be initialized.
*/
void esp_apptrace_lock_init(esp_apptrace_lock_t *lock);
static inline void esp_apptrace_lock_init(esp_apptrace_lock_t *lock)
{
portMUX_INITIALIZE(&lock->mux);
lock->int_state = 0;
}
/**
* @brief Tries to acquire lock in specified time period.
@@ -70,6 +91,19 @@ esp_err_t esp_apptrace_lock_take(esp_apptrace_lock_t *lock, esp_apptrace_tmo_t *
*/
esp_err_t esp_apptrace_lock_give(esp_apptrace_lock_t *lock);
/** Ring buffer control structure.
*
* @note For purposes of application tracing module if there is no enough space for user data and write pointer can be wrapped
* current ring buffer size can be temporarily shrinked in order to provide buffer with requested size.
*/
typedef struct {
uint8_t *data; ///< pointer to data storage
volatile uint32_t size; ///< size of data storage
volatile uint32_t cur_size; ///< current size of data storage
volatile uint32_t rd; ///< read pointer
volatile uint32_t wr; ///< write pointer
} esp_apptrace_rb_t;
/**
* @brief Initializes ring buffer control structure.
*

View File

@@ -1,69 +0,0 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ESP_DBG_STUBS_H_
#define ESP_DBG_STUBS_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_err.h"
/**
* Debug stubs entries IDs
*/
typedef enum {
ESP_DBG_STUB_MAGIC_NUM,
ESP_DBG_STUB_TABLE_SIZE,
ESP_DBG_STUB_CONTROL_DATA, ///< stubs descriptor entry
ESP_DBG_STUB_ENTRY_FIRST,
ESP_DBG_STUB_ENTRY_GCOV ///< GCOV entry
= ESP_DBG_STUB_ENTRY_FIRST,
ESP_DBG_STUB_ENTRY_CAPABILITIES,
ESP_DBG_STUB_ENTRY_MAX
} esp_dbg_stub_id_t;
#define ESP_DBG_STUB_MAGIC_NUM_VAL 0xFEEDBEEF
#define ESP_DBG_STUB_CAP_GCOV_TASK (1 << 0)
/**
* @brief Initializes debug stubs.
*
* @note Must be called after esp_apptrace_init() if app tracing is enabled.
*/
void esp_dbg_stubs_init(void);
/**
* @brief Initializes application tracing module.
*
* @note Should be called before any esp_apptrace_xxx call.
*
* @param id Stub ID.
* @param entry Stub entry. Usually it is stub entry function address,
* but can be any value meaningful for OpenOCD command/code
* such as capabilities
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_dbg_stub_entry_set(esp_dbg_stub_id_t id, uint32_t entry);
/**
* @brief Retrieves the corresponding stub entry
*
* @param id Stub ID.
* @param entry Stub entry. Usually it is stub entry function address,
* but can be any value meaningful for OpenOCD command/code
* such as capabilities
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_dbg_stub_entry_get(esp_dbg_stub_id_t id, uint32_t *entry);
#ifdef __cplusplus
}
#endif
#endif // ESP_DBG_STUBS_H_

View File

@@ -0,0 +1,80 @@
/*
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ESP_SYSVIEW_TRACE_H_
#define ESP_SYSVIEW_TRACE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdarg.h>
#include "esp_err.h"
#include "SEGGER_RTT.h" // SEGGER_RTT_ESP_Flush
#include "esp_app_trace_util.h" // ESP_APPTRACE_TMO_INFINITE
/**
* @brief Flushes remaining data in SystemView trace buffer to host.
*
* @param tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinetly.
*
* @return ESP_OK.
*/
static inline esp_err_t esp_sysview_flush(uint32_t tmo)
{
SEGGER_RTT_ESP_Flush(0, tmo);
return ESP_OK;
}
/**
* @brief vprintf-like function to sent log messages to the host.
*
* @param format Address of format string.
* @param args List of arguments.
*
* @return Number of bytes written.
*/
int esp_sysview_vprintf(const char * format, va_list args);
/**
* @brief Starts SystemView heap tracing.
*
* @param tmo Timeout (in us) to wait for the host to be connected. Use -1 to wait forever.
*
* @return ESP_OK on success, ESP_ERR_TIMEOUT if operation has been timed out.
*/
esp_err_t esp_sysview_heap_trace_start(uint32_t tmo);
/**
* @brief Stops SystemView heap tracing.
*
* @return ESP_OK.
*/
esp_err_t esp_sysview_heap_trace_stop(void);
/**
* @brief Sends heap allocation event to the host.
*
* @param addr Address of allocated block.
* @param size Size of allocated block.
* @param callers Pointer to array with callstack addresses.
* Array size must be CONFIG_HEAP_TRACING_STACK_DEPTH.
*/
void esp_sysview_heap_trace_alloc(void *addr, uint32_t size, const void *callers);
/**
* @brief Sends heap de-allocation event to the host.
*
* @param addr Address of de-allocated block.
* @param callers Pointer to array with callstack addresses.
* Array size must be CONFIG_HEAP_TRACING_STACK_DEPTH.
*/
void esp_sysview_heap_trace_free(void *addr, const void *callers);
#ifdef __cplusplus
}
#endif
#endif //ESP_SYSVIEW_TRACE_H_

View File

@@ -1,11 +1,23 @@
[mapping:app_trace]
archive: libapp_trace.a
entries:
if ESP_TRACE_TRANSPORT_APPTRACE = y:
app_trace (noflash)
app_trace_util (noflash)
if APPTRACE_DEST_JTAG = y || APPTRACE_DEST_ALL = y:
port_jtag (noflash)
app_trace_membufs_proto (noflash)
if APPTRACE_DEST_UART = y || APPTRACE_DEST_ALL = y:
port_uart (noflash)
app_trace (noflash)
port_uart (noflash)
app_trace_util (noflash)
if APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE:
app_trace_membufs_proto (noflash)
if APPTRACE_DEST_JTAG = y:
port (noflash)
if APPTRACE_SV_ENABLE = y:
SEGGER_SYSVIEW (noflash)
SEGGER_RTT_esp (noflash)
SEGGER_SYSVIEW_Config_FreeRTOS (noflash)
SEGGER_SYSVIEW_FreeRTOS (noflash)
[mapping:app_trace_driver]
archive: libesp_driver_gptimer.a
entries:
if APPTRACE_SV_TS_SOURCE_GPTIMER = y:
gptimer (noflash)
else:
* (default)

View File

@@ -15,7 +15,7 @@ extern "C" {
/** Apptrace HW interface. */
typedef struct {
esp_err_t (*init)(void *hw_data, const esp_apptrace_config_t *config);
esp_err_t (*init)(void *hw_data);
uint8_t *(*get_up_buffer)(void *hw_data, uint32_t, esp_apptrace_tmo_t *);
esp_err_t (*put_up_buffer)(void *hw_data, uint8_t *, esp_apptrace_tmo_t *);
esp_err_t (*flush_up_buffer_nolock)(void *hw_data, uint32_t, esp_apptrace_tmo_t *);
@@ -24,7 +24,6 @@ typedef struct {
uint8_t *(*get_down_buffer)(void *hw_data, uint32_t *, esp_apptrace_tmo_t *);
esp_err_t (*put_down_buffer)(void *hw_data, uint8_t *, esp_apptrace_tmo_t *);
bool (*host_is_connected)(void *hw_data);
void (*set_header_size)(void *hw_data, esp_apptrace_header_size_t header_size);
} esp_apptrace_hw_t;
esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data);

View File

@@ -1,126 +1,93 @@
/*
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <inttypes.h>
#include "esp_err.h"
#include "soc/soc.h"
#include "esp_log.h"
#include "esp_cpu.h"
#include "esp_attr.h"
#include "esp_private/uart_share_hw_ctrl.h"
#include "hal/uart_hal.h"
#include "hal/gpio_hal.h"
#include "driver/uart.h"
#include "soc/uart_periph.h"
#include "esp_clk_tree.h"
#include "esp_private/esp_clk_tree_common.h"
#include "soc/gpio_periph.h"
#include "esp_rom_gpio.h"
#include "hal/uart_ll.h"
#include "esp_intr_alloc.h"
#include "esp_heap_caps.h"
#include "esp_private/esp_gpio_reserve.h"
#include "esp_app_trace_port.h"
#include "esp_app_trace_util.h"
#include "esp_app_trace_types.h"
static const char *TAG = "esp_apptrace_uart";
#include "driver/uart.h"
#include "hal/uart_ll.h"
#include "string.h"
#include "driver/gpio.h"
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#define APPTRACE_DEST_UART (CONFIG_APPTRACE_DEST_UART0 | CONFIG_APPTRACE_DEST_UART1 | CONFIG_APPTRACE_DEST_UART2)
#define APP_TRACE_MAX_TX_BUFF_UART CONFIG_APPTRACE_UART_TX_BUFF_SIZE
#define APP_TRACE_MAX_TX_MSG_UART CONFIG_APPTRACE_UART_TX_MSG_SIZE
/** UART HW transport data */
typedef struct {
uint8_t *buffer; ///< Ring buffer data
uint32_t max_size; ///< Ring buffer maximum size (must be power of 2)
volatile uint32_t count; ///< Number of bytes currently in the buffer
volatile uint32_t head; ///< Write pointer index
volatile uint32_t tail; ///< Read pointer index
} esp_apptrace_uart_rb_t;
typedef struct {
int inited;
volatile bool tx_busy; ///< TX busy flag
uart_hal_context_t hal_ctx; ///< UART HAL context
esp_apptrace_uart_rb_t tx_ring; ///< TX ring buffer
intr_handle_t intr_handle; ///< Interrupt handle
/* TX message buffer */
uint8_t *tx_msg_buff; ///< TX message buffer to provide with get_up_buffer
uint32_t tx_msg_buff_size; ///< TX message buffer size & maximum size of the single message to transfer.
uint32_t tx_pending_msg_size; ///< Pending message size to send with put_up_buffer
/* RX message buffer */
uint8_t *rx_msg_buff; ///< RX message buffer provided with down_buffer_config function
uint32_t rx_msg_buff_size; ///< RX message buffer size provided with down_buffer_config function
uint8_t inited;
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_t lock; ///< Sync lock
esp_apptrace_lock_t lock; // sync lock
#endif
uart_port_t port_num;
// TX data ring buffer
uint8_t *tx_data_buff;
int32_t tx_data_buff_in;
int32_t tx_data_buff_out;
// TX message buffer
uint8_t *tx_msg_buff;
uint32_t tx_msg_buff_size;
// RX message buffer
uint8_t *down_buffer;
uint32_t down_buffer_size;
// Buffer overflow flags
bool message_buff_overflow;
bool circular_buff_overflow;
} esp_apptrace_uart_data_t;
static inline bool is_power_of_two(uint32_t n)
#if APPTRACE_DEST_UART
static esp_err_t esp_apptrace_uart_init(esp_apptrace_uart_data_t *hw_data);
static esp_err_t esp_apptrace_uart_flush(esp_apptrace_uart_data_t *hw_data, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_uart_flush_nolock(esp_apptrace_uart_data_t *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo);
static uint8_t *esp_apptrace_uart_up_buffer_get(esp_apptrace_uart_data_t *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_uart_up_buffer_put(esp_apptrace_uart_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
static void esp_apptrace_uart_down_buffer_config(esp_apptrace_uart_data_t *hw_data, uint8_t *buf, uint32_t size);
static uint8_t *esp_apptrace_uart_down_buffer_get(esp_apptrace_uart_data_t *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_uart_down_buffer_put(esp_apptrace_uart_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
static bool esp_apptrace_uart_host_is_connected(esp_apptrace_uart_data_t *hw_data);
#endif // APPTRACE_DEST_UART
const static char *TAG = "esp_apptrace_uart";
esp_apptrace_hw_t *esp_apptrace_uart_hw_get(int num, void **data)
{
return n != 0 && (n & (n - 1)) == 0;
ESP_LOGD(TAG,"esp_apptrace_uart_hw_get - %i", num);
#if APPTRACE_DEST_UART
static esp_apptrace_uart_data_t s_uart_hw_data = {
};
static esp_apptrace_hw_t s_uart_hw = {
.init = (esp_err_t (*)(void *))esp_apptrace_uart_init,
.get_up_buffer = (uint8_t *(*)(void *, uint32_t, esp_apptrace_tmo_t *))esp_apptrace_uart_up_buffer_get,
.put_up_buffer = (esp_err_t (*)(void *, uint8_t *, esp_apptrace_tmo_t *))esp_apptrace_uart_up_buffer_put,
.flush_up_buffer_nolock = (esp_err_t (*)(void *, uint32_t, esp_apptrace_tmo_t *))esp_apptrace_uart_flush_nolock,
.flush_up_buffer = (esp_err_t (*)(void *, esp_apptrace_tmo_t *))esp_apptrace_uart_flush,
.down_buffer_config = (void (*)(void *, uint8_t *, uint32_t ))esp_apptrace_uart_down_buffer_config,
.get_down_buffer = (uint8_t *(*)(void *, uint32_t *, esp_apptrace_tmo_t *))esp_apptrace_uart_down_buffer_get,
.put_down_buffer = (esp_err_t (*)(void *, uint8_t *, esp_apptrace_tmo_t *))esp_apptrace_uart_down_buffer_put,
.host_is_connected = (bool (*)(void *))esp_apptrace_uart_host_is_connected,
};
s_uart_hw_data.port_num = num;
*data = &s_uart_hw_data;
return &s_uart_hw;
#else
return NULL;
#endif
}
static inline uint32_t ring_buffer_mask(const esp_apptrace_uart_rb_t *rb)
{
return rb->max_size - 1;
}
#if APPTRACE_DEST_UART
/* Get the length of the data in the ring buffer */
static inline uint32_t ring_buffer_data_len(const esp_apptrace_uart_rb_t *rb)
{
return rb->count;
}
/* Get the length of the free space in the ring buffer */
static inline uint32_t ring_buffer_free_len(const esp_apptrace_uart_rb_t *rb)
{
return rb->max_size - rb->count;
}
static inline void ring_buffer_advance_tail(esp_apptrace_uart_rb_t *rb, uint32_t count)
{
rb->tail = (rb->tail + count) & ring_buffer_mask(rb);
rb->count -= count;
}
static inline void ring_buffer_advance_head(esp_apptrace_uart_rb_t *rb, uint32_t count)
{
rb->head = (rb->head + count) & ring_buffer_mask(rb);
rb->count += count;
}
static inline uint32_t ring_buffer_calc_to_send(const esp_apptrace_uart_rb_t *rb, uint32_t tx_msg_size)
{
uint32_t used = ring_buffer_data_len(rb);
if (used == 0) {
return 0;
}
uint32_t cont = rb->max_size - rb->tail;
uint32_t n = MIN(used, cont);
/* Apply message size limit if specified */
if (tx_msg_size && tx_msg_size < n) {
return tx_msg_size;
}
return n;
}
static esp_err_t esp_apptrace_uart_lock(void *hw_data, esp_apptrace_tmo_t *tmo)
static esp_err_t esp_apptrace_uart_lock(esp_apptrace_uart_data_t *hw_data, esp_apptrace_tmo_t *tmo)
{
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_uart_data_t *uart_data = hw_data;
esp_err_t ret = esp_apptrace_lock_take(&uart_data->lock, tmo);
esp_err_t ret = esp_apptrace_lock_take(&hw_data->lock, tmo);
if (ret != ESP_OK) {
return ESP_FAIL;
}
@@ -128,395 +95,254 @@ static esp_err_t esp_apptrace_uart_lock(void *hw_data, esp_apptrace_tmo_t *tmo)
return ESP_OK;
}
static esp_err_t esp_apptrace_uart_unlock(void *hw_data)
static esp_err_t esp_apptrace_uart_unlock(esp_apptrace_uart_data_t *hw_data)
{
esp_err_t ret = ESP_OK;
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_uart_data_t *uart_data = hw_data;
ret = esp_apptrace_lock_give(&uart_data->lock);
assert(ret == ESP_OK && "Failed to unlock apptrace uart lock!");
ret = esp_apptrace_lock_give(&hw_data->lock);
#endif
return ret;
}
static esp_err_t ring_buffer_put(esp_apptrace_uart_rb_t *rb, const uint8_t *data, uint32_t len)
static inline void esp_apptrace_uart_hw_init(void)
{
/* Drop oldest. Make available space if needed */
uint32_t free_len = ring_buffer_free_len(rb);
if (len > free_len) {
uint32_t need = len - free_len;
ring_buffer_advance_tail(rb, need);
ESP_APPTRACE_LOGI("Initialized UART on CPU%d", esp_cpu_get_core_id());
}
/*****************************************************************************************/
/***************************** Apptrace HW iface *****************************************/
/*****************************************************************************************/
static esp_err_t esp_apptrace_send_uart_data(esp_apptrace_uart_data_t *hw_data, const char *data, uint32_t size, esp_apptrace_tmo_t *tmo)
{
esp_err_t res = esp_apptrace_uart_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
}
// We store current out position to handle it without lock
volatile int32_t out_position = hw_data->tx_data_buff_out;
uint32_t head = rb->head;
uint32_t space_to_end = rb->max_size - head;
if (len <= space_to_end) {
memcpy(&rb->buffer[head], data, len);
int len_free = APP_TRACE_MAX_TX_BUFF_UART - (hw_data->tx_data_buff_in - out_position);
if (out_position > hw_data->tx_data_buff_in) {
len_free = out_position - hw_data->tx_data_buff_in;
}
int check_len = APP_TRACE_MAX_TX_BUFF_UART - hw_data->tx_data_buff_in;
if (size <= len_free)
{
if ( check_len >= size) {
memcpy(&hw_data->tx_data_buff[hw_data->tx_data_buff_in], data, size);
hw_data->tx_data_buff_in += size;
} else {
memcpy(&hw_data->tx_data_buff[hw_data->tx_data_buff_in], data, APP_TRACE_MAX_TX_BUFF_UART - hw_data->tx_data_buff_in);
memcpy(&hw_data->tx_data_buff[0], &data[APP_TRACE_MAX_TX_BUFF_UART - hw_data->tx_data_buff_in], size - (APP_TRACE_MAX_TX_BUFF_UART - hw_data->tx_data_buff_in));
hw_data->tx_data_buff_in = size - (APP_TRACE_MAX_TX_BUFF_UART - hw_data->tx_data_buff_in);
}
if (hw_data->tx_data_buff_in >= APP_TRACE_MAX_TX_BUFF_UART) {
hw_data->tx_data_buff_in = 0;
}
} else {
memcpy(&rb->buffer[head], data, space_to_end);
memcpy(&rb->buffer[0], &data[space_to_end], len - space_to_end);
hw_data->circular_buff_overflow = true;
}
ring_buffer_advance_head(rb, len);
if (esp_apptrace_uart_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ESP_OK;
}
static esp_err_t ring_buffer_init(esp_apptrace_uart_rb_t *rb, uint32_t size)
static void send_buff_data(esp_apptrace_uart_data_t *hw_data, esp_apptrace_tmo_t *tmo)
{
rb->buffer = heap_caps_malloc(size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
if (!rb->buffer) {
return ESP_ERR_NO_MEM;
if (hw_data->tx_data_buff_in == hw_data->tx_data_buff_out) {
return;
}
rb->max_size = size;
rb->count = 0;
rb->head = 0;
rb->tail = 0;
return ESP_OK;
}
static void IRAM_ATTR esp_apptrace_uart_isr_handler(void *arg)
{
esp_apptrace_uart_data_t *uart_data = arg;
esp_apptrace_uart_rb_t *rb = &uart_data->tx_ring;
uint32_t intr_status = uart_hal_get_intsts_mask(&uart_data->hal_ctx);
if (intr_status & UART_INTR_TXFIFO_EMPTY) {
uart_hal_clr_intsts_mask(&uart_data->hal_ctx, UART_INTR_TXFIFO_EMPTY);
uint32_t to_send = ring_buffer_calc_to_send(rb, uart_data->tx_msg_buff_size);
if (to_send > 0) {
uint32_t written = 0;
uart_hal_write_txfifo(&uart_data->hal_ctx, &rb->buffer[rb->tail], to_send, &written);
ring_buffer_advance_tail(rb, written);
}
/* If ring buffer is empty, disable TX interrupt */
if (ring_buffer_data_len(rb) == 0) {
uart_ll_disable_intr_mask(uart_data->hal_ctx.dev, UART_INTR_TXFIFO_EMPTY);
uart_data->tx_busy = false;
// We store current in position to handle it without lock
volatile int32_t in_position = hw_data->tx_data_buff_in;
if (in_position > hw_data->tx_data_buff_out) {
int bytes_sent = uart_write_bytes(hw_data->port_num, &hw_data->tx_data_buff[hw_data->tx_data_buff_out], in_position - hw_data->tx_data_buff_out);
hw_data->tx_data_buff_out += bytes_sent;
} else {
int bytes_sent = uart_write_bytes(hw_data->port_num, &hw_data->tx_data_buff[hw_data->tx_data_buff_out], APP_TRACE_MAX_TX_BUFF_UART - hw_data->tx_data_buff_out);
hw_data->tx_data_buff_out += bytes_sent;
if (hw_data->tx_data_buff_out >= APP_TRACE_MAX_TX_BUFF_UART) {
hw_data->tx_data_buff_out = 0;
}
}
}
static esp_err_t esp_apptrace_uart_init(void *hw_data, const esp_apptrace_config_t *config)
{
esp_err_t ret = ESP_ERR_INVALID_ARG;
uint64_t gpio_mask = 0;
esp_apptrace_uart_data_t *uart_data = hw_data;
const esp_apptrace_uart_config_t *uart_config = &config->dest_cfg.uart;
#define APP_TRACE_UART_STOP_WAIT_TMO 1000000 //us
/* Init function is called on every core, so ensure to do main setup only once */
static void esp_apptrace_send_uart_tx_task(void *arg)
{
esp_apptrace_uart_data_t *hw_data = (esp_apptrace_uart_data_t *)arg;
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, APP_TRACE_UART_STOP_WAIT_TMO);
vTaskDelay(10);
while (1) {
send_buff_data(hw_data, &tmo);
vTaskDelay(10);
if (hw_data->circular_buff_overflow == true)
{
hw_data->circular_buff_overflow = false;
ESP_LOGE(TAG, "Buffer overflow. Please increase UART baudrate, or increase UART TX ring buffer size in menuconfig.");
}
if (hw_data->message_buff_overflow == true)
{
hw_data->message_buff_overflow = false;
ESP_LOGE(TAG, "Message size more then message buffer!");
}
}
}
static const int APP_TRACE_UART_RX_BUF_SIZE = 4024;
static esp_err_t esp_apptrace_uart_init(esp_apptrace_uart_data_t *hw_data)
{
int core_id = esp_cpu_get_core_id();
if (core_id == 0) {
if (uart_config->uart_num == CONFIG_ESP_CONSOLE_UART_NUM) {
ESP_APPTRACE_LOGE("Application trace UART and console UART cannot use the same port number");
return ESP_ERR_INVALID_ARG;
hw_data->tx_data_buff = (uint8_t *)heap_caps_malloc(APP_TRACE_MAX_TX_BUFF_UART, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
if (hw_data->tx_data_buff == NULL){
return ESP_ERR_NO_MEM;
}
if (uart_config->uart_num >= SOC_UART_HP_NUM) {
ESP_APPTRACE_LOGE("UART port number %d is not supported!", uart_config->uart_num);
return ESP_ERR_NOT_SUPPORTED;
hw_data->tx_data_buff_in = 0;
hw_data->tx_data_buff_out = 0;
hw_data->tx_msg_buff = (uint8_t *)heap_caps_malloc(APP_TRACE_MAX_TX_MSG_UART, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
if (hw_data->tx_msg_buff == NULL)
{
return ESP_ERR_NO_MEM;
}
hw_data->tx_msg_buff_size = 0;
hw_data->down_buffer_size = 0;
hw_data->message_buff_overflow = false;
hw_data->circular_buff_overflow = false;
if (GPIO_IS_VALID_GPIO(uart_config->tx_pin_num)) {
gpio_mask |= BIT64(uart_config->tx_pin_num);
}
if (GPIO_IS_VALID_GPIO(uart_config->rx_pin_num)) {
gpio_mask |= BIT64(uart_config->rx_pin_num);
}
if (gpio_mask == 0) {
ESP_LOGE(TAG, "No valid GPIOs to reserve");
return ESP_ERR_INVALID_STATE;
}
const uart_config_t uart_config = {
.baud_rate = CONFIG_APPTRACE_UART_BAUDRATE,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
.source_clk = UART_SCLK_DEFAULT,
};
ESP_LOGI(TAG, "UART baud rate: %i", CONFIG_APPTRACE_UART_BAUDRATE);
// We won't use a buffer for sending data.
esp_err_t err = uart_driver_install(hw_data->port_num, APP_TRACE_UART_RX_BUF_SIZE, APP_TRACE_UART_RX_BUF_SIZE, 0, NULL, 0);
assert((err == ESP_OK) && "Not possible to install UART. Please check and change menuconfig parameters!");
err = uart_param_config(hw_data->port_num, &uart_config);
assert((err == ESP_OK) && "Not possible to configure UART. Please check and change menuconfig parameters!");
err = uart_set_pin(hw_data->port_num, CONFIG_APPTRACE_UART_TX_GPIO, CONFIG_APPTRACE_UART_RX_GPIO, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
assert((err == ESP_OK) && "Not possible to configure UART RX/TX pins. Please check and change menuconfig parameters!");
uint64_t r = esp_gpio_reserve(gpio_mask);
if (r & gpio_mask) {
ESP_LOGE(TAG, "GPIO(s) are already reserved: 0x%"PRIx64, r & gpio_mask);
return ESP_ERR_INVALID_STATE;
}
uart_data->hal_ctx.dev = UART_LL_GET_HW(uart_config->uart_num);
HP_UART_BUS_CLK_ATOMIC() {
uart_ll_enable_bus_clock(uart_config->uart_num, true);
uart_ll_reset_register(uart_config->uart_num);
}
HP_UART_SRC_CLK_ATOMIC() {
uart_ll_sclk_enable(uart_data->hal_ctx.dev);
}
uint32_t sclk_hz;
esp_clk_tree_src_get_freq_hz(UART_SCLK_DEFAULT, ESP_CLK_TREE_SRC_FREQ_PRECISION_CACHED, &sclk_hz);
/* Enable the default clock source */
esp_clk_tree_enable_src(UART_SCLK_DEFAULT, true);
/* Initialize UART HAL (sets default 8N1 mode) */
uart_hal_init(&uart_data->hal_ctx, uart_config->uart_num);
ESP_LOGI(TAG, "uart_hal_init: %d", uart_config->uart_num);
HP_UART_SRC_CLK_ATOMIC() {
uart_hal_set_sclk(&uart_data->hal_ctx, UART_SCLK_DEFAULT);
uart_hal_set_baudrate(&uart_data->hal_ctx, uart_config->baud_rate, sclk_hz);
}
/* Configure FIFO thresholds */
uart_hal_set_txfifo_empty_thr(&uart_data->hal_ctx, 16); /* Slow down IRQ rate */
uart_hal_set_rxfifo_full_thr(&uart_data->hal_ctx, 1);
/* Initialize TX ring buffer */
if (uart_config->tx_buff_size == 0 || !is_power_of_two(uart_config->tx_buff_size)) {
ESP_APPTRACE_LOGE("TX ring buffer size (%u) must be a power of two and greater than 0",
uart_config->tx_buff_size);
goto err_init_ring_buff;
}
ret = ring_buffer_init(&uart_data->tx_ring, uart_config->tx_buff_size);
if (ret != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to initialize TX ring buffer");
goto err_init_ring_buff;
}
/* Initialize TX message buffer for providing with get_up_buffer */
uart_data->tx_msg_buff_size = uart_config->tx_msg_size;
uart_data->tx_msg_buff = heap_caps_malloc(uart_data->tx_msg_buff_size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
if (uart_data->tx_msg_buff == NULL) {
ESP_APPTRACE_LOGE("Failed to initialize TX message buffer");
ret = ESP_ERR_NO_MEM;
goto err_alloc_msg_buff;
}
/* Disable all interrupts and clear status */
uart_ll_disable_intr_mask(uart_data->hal_ctx.dev, UART_LL_INTR_MASK);
uart_ll_clr_intsts_mask(uart_data->hal_ctx.dev, UART_LL_INTR_MASK);
/* Install interrupt handler */
int intr_alloc_flags = 0;
ret = esp_intr_alloc(uart_periph_signal[uart_config->uart_num].irq, intr_alloc_flags,
esp_apptrace_uart_isr_handler, uart_data, &uart_data->intr_handle);
if (ret != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to allocate interrupt: %s", esp_err_to_name(ret));
goto err_alloc_intr;
}
/* Reset FIFOs */
uart_hal_rxfifo_rst(&uart_data->hal_ctx);
uart_hal_txfifo_rst(&uart_data->hal_ctx);
/* Configure GPIO pins for RX and TX */
const uint32_t tx_idx = UART_PERIPH_SIGNAL(uart_config->uart_num, SOC_UART_PERIPH_SIGNAL_TX);
const uint32_t rx_idx = UART_PERIPH_SIGNAL(uart_config->uart_num, SOC_UART_PERIPH_SIGNAL_RX);
/* Configure TX pin */
gpio_ll_func_sel(&GPIO, uart_config->tx_pin_num, PIN_FUNC_GPIO);
esp_rom_gpio_pad_pullup_only(uart_config->tx_pin_num);
esp_rom_gpio_connect_out_signal(uart_config->tx_pin_num, tx_idx, 0, 0);
/* Configure RX pin */
gpio_ll_input_enable(&GPIO, uart_config->rx_pin_num);
esp_rom_gpio_pad_pullup_only(uart_config->rx_pin_num);
esp_rom_gpio_connect_in_signal(uart_config->rx_pin_num, rx_idx, 0);
int uart_prio = CONFIG_APPTRACE_UART_TASK_PRIO;
if (uart_prio >= (configMAX_PRIORITIES-1)) uart_prio = configMAX_PRIORITIES - 1;
err = xTaskCreate(esp_apptrace_send_uart_tx_task, "app_trace_uart_tx_task", 2500, hw_data, uart_prio, NULL);
assert((err == pdPASS) && "Not possible to configure UART. Not possible to create task!");
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_init(&uart_data->lock);
esp_apptrace_lock_init(&hw_data->lock);
#endif
}
uart_data->inited |= 1 << core_id;
uart_data->tx_busy = false;
// init UART on this CPU
esp_apptrace_uart_hw_init();
hw_data->inited |= 1 << core_id;
return ESP_OK;
err_alloc_intr:
heap_caps_free(uart_data->tx_msg_buff);
err_alloc_msg_buff:
heap_caps_free(uart_data->tx_ring.buffer);
err_init_ring_buff:
esp_clk_tree_enable_src(UART_SCLK_DEFAULT, false);
HP_UART_SRC_CLK_ATOMIC() {
uart_ll_sclk_disable(uart_data->hal_ctx.dev);
}
HP_UART_BUS_CLK_ATOMIC() {
uart_ll_enable_bus_clock(uart_config->uart_num, false);
}
esp_gpio_revoke(gpio_mask);
return ret;
}
static uint8_t *esp_apptrace_uart_up_buffer_get(void *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo)
static uint8_t *esp_apptrace_uart_up_buffer_get(esp_apptrace_uart_data_t *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_uart_data_t *uart_data = hw_data;
if (size == 0 || size > uart_data->tx_msg_buff_size) {
uint8_t *ptr;
if (size > APP_TRACE_MAX_TX_MSG_UART) {
hw_data->message_buff_overflow = true;
return NULL;
}
if (esp_apptrace_uart_lock(uart_data, tmo) != ESP_OK) {
return NULL;
}
if (uart_data->tx_pending_msg_size != 0) {
if (hw_data->tx_msg_buff_size != 0)
{
// A previous message was not sent.
esp_apptrace_uart_unlock(uart_data);
return NULL;
}
uart_data->tx_pending_msg_size = size;
esp_apptrace_uart_unlock(uart_data);
return uart_data->tx_msg_buff;
}
static esp_err_t esp_apptrace_uart_up_buffer_put(void *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_uart_data_t *uart_data = hw_data;
esp_apptrace_uart_rb_t *rb = &uart_data->tx_ring;
esp_err_t res = esp_apptrace_uart_lock(uart_data, tmo);
esp_err_t res = esp_apptrace_uart_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
return NULL;
}
ptr = hw_data->tx_msg_buff;
hw_data->tx_msg_buff_size = size;
/* Add data to ring buffer */
ring_buffer_put(rb, ptr, uart_data->tx_pending_msg_size);
uart_data->tx_pending_msg_size = 0;
esp_apptrace_uart_unlock(uart_data);
// Trigger transmission if not already in progress
if (!uart_data->tx_busy) {
uart_data->tx_busy = true;
/* Enable TX interrupt */
uart_ll_clr_intsts_mask(uart_data->hal_ctx.dev, UART_INTR_TXFIFO_EMPTY);
uart_ll_ena_intr_mask(uart_data->hal_ctx.dev, UART_INTR_TXFIFO_EMPTY);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_uart_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ESP_OK;
return ptr;
}
static void esp_apptrace_uart_down_buffer_config(void *hw_data, uint8_t *buf, uint32_t size)
static esp_err_t esp_apptrace_uart_up_buffer_put(esp_apptrace_uart_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_uart_data_t *uart_data = hw_data;
assert(buf != NULL && "Down buffer cannot be NULL");
assert(size > 0 && "Down buffer size must be greater than 0");
uart_data->rx_msg_buff = buf;
uart_data->rx_msg_buff_size = size;
esp_err_t res = esp_apptrace_send_uart_data(hw_data, (const char *)ptr, hw_data->tx_msg_buff_size, tmo);
// Clear size to indicate that we've sent data
hw_data->tx_msg_buff_size = 0;
return res;
}
static uint8_t *esp_apptrace_uart_down_buffer_get(void *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo)
static void esp_apptrace_uart_down_buffer_config(esp_apptrace_uart_data_t *hw_data, uint8_t *buf, uint32_t size)
{
esp_apptrace_uart_data_t *uart_data = hw_data;
if (!size || *size == 0) {
hw_data->down_buffer = (uint8_t *)malloc(size);
if (hw_data->down_buffer == NULL){
assert(false && "Failed to allocate apptrace uart down buffer!");
}
hw_data->down_buffer_size = size;
}
static uint8_t *esp_apptrace_uart_down_buffer_get(esp_apptrace_uart_data_t *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo)
{
uint8_t *ptr = NULL;
if (*size > hw_data->down_buffer_size) {
return NULL;
}
if (!uart_data->rx_msg_buff) {
ESP_APPTRACE_LOGE("RX message buffer is not configured. Call down_buffer_config() first.");
esp_err_t res = esp_apptrace_uart_lock(hw_data, tmo);
if (res != ESP_OK) {
return NULL;
}
if (esp_apptrace_uart_lock(uart_data, tmo) != ESP_OK) {
return NULL;
}
uint32_t rx_len = uart_ll_get_rxfifo_len(uart_data->hal_ctx.dev);
int to_read = MIN(rx_len, MIN(uart_data->rx_msg_buff_size, *size));
if (to_read) {
uart_hal_read_rxfifo(&uart_data->hal_ctx, uart_data->rx_msg_buff, &to_read);
}
*size = to_read;
esp_apptrace_uart_unlock(uart_data);
return (*size > 0) ? uart_data->rx_msg_buff : NULL;
}
static esp_err_t esp_apptrace_uart_down_buffer_put(void *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
(void)hw_data;
(void)ptr;
(void)tmo;
/* No action needed - data was already read in get function */
return ESP_OK;
}
static bool esp_apptrace_uart_host_is_connected(void *hw_data)
{
esp_apptrace_uart_data_t *uart_data = hw_data;
return uart_data->inited & 1;
}
static esp_err_t esp_apptrace_uart_flush_nolock(void *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_uart_data_t *uart_data = hw_data;
esp_apptrace_uart_rb_t *rb = &uart_data->tx_ring;
uint32_t pending = ring_buffer_data_len(rb);
if (pending < min_sz) {
ESP_APPTRACE_LOGD("Ignore UART flush request for min %" PRIu32 " bytes. Pending bytes: %" PRIu32, min_sz, pending);
return ESP_OK;
}
/* Trigger transmission if there's data but not busy */
if (pending > 0 && !uart_data->tx_busy) {
uart_data->tx_busy = true;
uart_ll_clr_intsts_mask(uart_data->hal_ctx.dev, UART_INTR_TXFIFO_EMPTY);
uart_ll_ena_intr_mask(uart_data->hal_ctx.dev, UART_INTR_TXFIFO_EMPTY);
}
while (uart_data->tx_busy || ring_buffer_data_len(rb) > 0) {
if (esp_apptrace_tmo_check(tmo) != ESP_OK) {
return ESP_ERR_TIMEOUT;
size_t uart_fifolen = 0;
uart_get_buffered_data_len(hw_data->port_num, &uart_fifolen);
if (uart_fifolen > 0) {
if (*size < uart_fifolen) {
uart_fifolen = *size;
}
esp_rom_delay_us(100);
*size = uart_fifolen;
ptr = hw_data->down_buffer;
*size =uart_read_bytes(hw_data->port_num, ptr, uart_fifolen, 0);
}
if (esp_apptrace_uart_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_uart_down_buffer_put(esp_apptrace_uart_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
return ESP_OK;
}
static esp_err_t esp_apptrace_uart_flush(void *hw_data, esp_apptrace_tmo_t *tmo)
static bool esp_apptrace_uart_host_is_connected(esp_apptrace_uart_data_t *hw_data)
{
esp_apptrace_uart_data_t *uart_data = hw_data;
esp_err_t res = esp_apptrace_uart_lock(uart_data, tmo);
if (res != ESP_OK) {
return res;
}
esp_err_t ret = esp_apptrace_uart_flush_nolock(hw_data, 0, tmo);
esp_apptrace_uart_unlock(uart_data);
return ret;
return hw_data->inited & 1;
}
esp_apptrace_hw_t *esp_apptrace_uart_hw_get(int num, void **data)
static esp_err_t esp_apptrace_uart_flush_nolock(esp_apptrace_uart_data_t *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo)
{
ESP_APPTRACE_LOGD("esp_apptrace_uart_hw_get - %i", num);
static esp_apptrace_uart_data_t s_uart_hw_data;
static esp_apptrace_hw_t s_uart_hw = {
.init = esp_apptrace_uart_init,
.get_up_buffer = esp_apptrace_uart_up_buffer_get,
.put_up_buffer = esp_apptrace_uart_up_buffer_put,
.flush_up_buffer_nolock = esp_apptrace_uart_flush_nolock,
.flush_up_buffer = esp_apptrace_uart_flush,
.down_buffer_config = esp_apptrace_uart_down_buffer_config,
.get_down_buffer = esp_apptrace_uart_down_buffer_get,
.put_down_buffer = esp_apptrace_uart_down_buffer_put,
.host_is_connected = esp_apptrace_uart_host_is_connected,
};
*data = &s_uart_hw_data;
return &s_uart_hw;
return ESP_OK;
}
static esp_err_t esp_apptrace_uart_flush(esp_apptrace_uart_data_t *hw_data, esp_apptrace_tmo_t *tmo)
{
return ESP_OK;
}
#endif // APPTRACE_DEST_UART

View File

@@ -0,0 +1,367 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#include "sdkconfig.h"
#include "esp_cpu.h"
#include "esp_log.h"
#include "esp_app_trace_membufs_proto.h"
#include "esp_app_trace_port.h"
#include "riscv/semihosting.h"
/** RISCV HW transport data */
typedef struct {
uint8_t inited; // initialization state flags for every core
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_t lock; // sync lock
#endif
esp_apptrace_membufs_proto_data_t membufs;
} esp_apptrace_riscv_data_t;
/** RISCV memory host iface control block */
typedef struct {
uint32_t ctrl;
// - Guard field. If this register is not zero then CPU is changing this struct and
// this guard field holds address of the instruction which application will execute when CPU finishes with those modifications.
uint32_t stat;
esp_apptrace_mem_block_t * mem_blocks;
} esp_apptrace_riscv_ctrl_block_t;
#define ESP_APPTRACE_RISCV_BLOCK_LEN_MSK 0x7FFFUL
#define ESP_APPTRACE_RISCV_BLOCK_LEN(_l_) ((_l_) & ESP_APPTRACE_RISCV_BLOCK_LEN_MSK)
#define ESP_APPTRACE_RISCV_BLOCK_LEN_GET(_v_) ((_v_) & ESP_APPTRACE_RISCV_BLOCK_LEN_MSK)
#define ESP_APPTRACE_RISCV_BLOCK_ID_MSK 0x7FUL
#define ESP_APPTRACE_RISCV_BLOCK_ID(_id_) (((_id_) & ESP_APPTRACE_RISCV_BLOCK_ID_MSK) << 15)
#define ESP_APPTRACE_RISCV_BLOCK_ID_GET(_v_) (((_v_) >> 15) & ESP_APPTRACE_RISCV_BLOCK_ID_MSK)
#define ESP_APPTRACE_RISCV_HOST_DATA (1 << 22)
#define ESP_APPTRACE_RISCV_HOST_CONNECT (1 << 23)
#define ESP_APPTRACE_RISCV_INITED(_hw_) ((_hw_)->inited & (1 << 0/*esp_cpu_get_core_id()*/))
static esp_err_t esp_apptrace_riscv_init(esp_apptrace_riscv_data_t *hw_data);
static esp_err_t esp_apptrace_riscv_flush(esp_apptrace_riscv_data_t *hw_data, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_riscv_flush_nolock(esp_apptrace_riscv_data_t *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo);
static uint8_t *esp_apptrace_riscv_up_buffer_get(esp_apptrace_riscv_data_t *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_riscv_up_buffer_put(esp_apptrace_riscv_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
static void esp_apptrace_riscv_down_buffer_config(esp_apptrace_riscv_data_t *hw_data, uint8_t *buf, uint32_t size);
static uint8_t *esp_apptrace_riscv_down_buffer_get(esp_apptrace_riscv_data_t *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_riscv_down_buffer_put(esp_apptrace_riscv_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
static bool esp_apptrace_riscv_host_is_connected(esp_apptrace_riscv_data_t *hw_data);
static esp_err_t esp_apptrace_riscv_buffer_swap_start(uint32_t curr_block_id);
static esp_err_t esp_apptrace_riscv_buffer_swap(uint32_t new_block_id);
static esp_err_t esp_apptrace_riscv_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len);
static bool esp_apptrace_riscv_host_data_pending(void);
const static char *TAG = "esp_apptrace";
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
#define APPTRACE_DRAM_ATTR TCM_DRAM_ATTR
#else
#define APPTRACE_DRAM_ATTR
#endif
static APPTRACE_DRAM_ATTR esp_apptrace_riscv_ctrl_block_t s_tracing_ctrl[CONFIG_FREERTOS_NUMBER_OF_CORES];
esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data)
{
#if CONFIG_APPTRACE_DEST_JTAG
static esp_apptrace_membufs_proto_hw_t s_trace_proto_hw = {
.swap_start = esp_apptrace_riscv_buffer_swap_start,
.swap = esp_apptrace_riscv_buffer_swap,
.swap_end = esp_apptrace_riscv_buffer_swap_end,
.host_data_pending = esp_apptrace_riscv_host_data_pending,
};
static esp_apptrace_riscv_data_t s_trace_hw_data = {
.membufs = {
.hw = &s_trace_proto_hw,
},
};
static esp_apptrace_hw_t s_trace_hw = {
.init = (esp_err_t (*)(void *))esp_apptrace_riscv_init,
.get_up_buffer = (uint8_t *(*)(void *, uint32_t, esp_apptrace_tmo_t *))esp_apptrace_riscv_up_buffer_get,
.put_up_buffer = (esp_err_t (*)(void *, uint8_t *, esp_apptrace_tmo_t *))esp_apptrace_riscv_up_buffer_put,
.flush_up_buffer_nolock = (esp_err_t (*)(void *, uint32_t, esp_apptrace_tmo_t *))esp_apptrace_riscv_flush_nolock,
.flush_up_buffer = (esp_err_t (*)(void *, esp_apptrace_tmo_t *))esp_apptrace_riscv_flush,
.down_buffer_config = (void (*)(void *, uint8_t *, uint32_t ))esp_apptrace_riscv_down_buffer_config,
.get_down_buffer = (uint8_t *(*)(void *, uint32_t *, esp_apptrace_tmo_t *))esp_apptrace_riscv_down_buffer_get,
.put_down_buffer = (esp_err_t (*)(void *, uint8_t *, esp_apptrace_tmo_t *))esp_apptrace_riscv_down_buffer_put,
.host_is_connected = (bool (*)(void *))esp_apptrace_riscv_host_is_connected,
};
*data = &s_trace_hw_data;
return &s_trace_hw;
#else
return NULL;
#endif
}
/* Advertises apptrace control block address to host.
This function can be overridden with custom implementation,
e.g. OpenOCD flasher stub use own implementation of it. */
__attribute__((weak)) int esp_apptrace_advertise_ctrl_block(void *ctrl_block_addr)
{
if (!esp_cpu_dbgr_is_attached()) {
return 0;
}
return (int) semihosting_call_noerrno(ESP_SEMIHOSTING_SYS_APPTRACE_INIT, (long*)ctrl_block_addr);
}
/* Returns up buffers config.
This function can be overridden with custom implementation,
e.g. OpenOCD flasher stub use own implementation of it. */
__attribute__((weak)) void esp_apptrace_get_up_buffers(esp_apptrace_mem_block_t mem_blocks_cfg[2])
{
static uint8_t s_mem_blocks[2][CONFIG_APPTRACE_BUF_SIZE];
mem_blocks_cfg[0].start = s_mem_blocks[0];
mem_blocks_cfg[0].sz = CONFIG_APPTRACE_BUF_SIZE;
mem_blocks_cfg[1].start = s_mem_blocks[1];
mem_blocks_cfg[1].sz = CONFIG_APPTRACE_BUF_SIZE;
}
static esp_err_t esp_apptrace_riscv_lock(esp_apptrace_riscv_data_t *hw_data, esp_apptrace_tmo_t *tmo)
{
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_err_t ret = esp_apptrace_lock_take(&hw_data->lock, tmo);
if (ret != ESP_OK) {
return ESP_FAIL;
}
#endif
return ESP_OK;
}
static esp_err_t esp_apptrace_riscv_unlock(esp_apptrace_riscv_data_t *hw_data)
{
esp_err_t ret = ESP_OK;
#if CONFIG_APPTRACE_LOCK_ENABLE
ret = esp_apptrace_lock_give(&hw_data->lock);
#endif
return ret;
}
/*****************************************************************************************/
/***************************** Apptrace HW iface *****************************************/
/*****************************************************************************************/
static esp_err_t esp_apptrace_riscv_init(esp_apptrace_riscv_data_t *hw_data)
{
int core_id = esp_cpu_get_core_id();
if (hw_data->inited == 0) {
esp_apptrace_mem_block_t mem_blocks_cfg[2];
esp_apptrace_get_up_buffers(mem_blocks_cfg);
esp_err_t res = esp_apptrace_membufs_init(&hw_data->membufs, mem_blocks_cfg);
if (res != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to init membufs proto (%d)!", res);
return res;
}
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_init(&hw_data->lock);
#endif
}
hw_data->inited |= 1 << core_id;
ESP_APPTRACE_LOGI("Apptrace initialized on CPU%d. Tracing control block @ %p.", core_id, &s_tracing_ctrl[core_id]);
s_tracing_ctrl[core_id].mem_blocks = hw_data->membufs.blocks;
for (int i = 0; i < 2; i++) {
ESP_APPTRACE_LOGD("Mem buf[%d] %" PRIu32 " bytes @ %p (%p/%p)", i,
s_tracing_ctrl[core_id].mem_blocks[i].sz, s_tracing_ctrl[core_id].mem_blocks[i].start,
&(s_tracing_ctrl[core_id].mem_blocks[i].start), &(s_tracing_ctrl[core_id].mem_blocks[i].sz));
}
// notify host about control block address
int res = esp_apptrace_advertise_ctrl_block(&s_tracing_ctrl[core_id]);
assert(res == 0 && "Failed to send config to host!");
return ESP_OK;
}
static uint8_t *esp_apptrace_riscv_up_buffer_get(esp_apptrace_riscv_data_t *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo)
{
uint8_t *ptr;
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_riscv_lock(hw_data, tmo);
if (res != ESP_OK) {
return NULL;
}
ptr = esp_apptrace_membufs_up_buffer_get(&hw_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_riscv_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_riscv_up_buffer_put(esp_apptrace_riscv_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_up_buffer_put() just modifies buffer's header
esp_err_t res = esp_apptrace_membufs_up_buffer_put(&hw_data->membufs, ptr, tmo);
return res;
}
static void esp_apptrace_riscv_down_buffer_config(esp_apptrace_riscv_data_t *hw_data, uint8_t *buf, uint32_t size)
{
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return;
}
esp_apptrace_membufs_down_buffer_config(&hw_data->membufs, buf, size);
}
static uint8_t *esp_apptrace_riscv_down_buffer_get(esp_apptrace_riscv_data_t *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo)
{
uint8_t *ptr;
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_riscv_lock(hw_data, tmo);
if (res != ESP_OK) {
return NULL;
}
ptr = esp_apptrace_membufs_down_buffer_get(&hw_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_riscv_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_riscv_down_buffer_put(esp_apptrace_riscv_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_down_buffer_put() does nothing
/*esp_err_t res = esp_apptrace_riscv_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
}*/
esp_err_t res = esp_apptrace_membufs_down_buffer_put(&hw_data->membufs, ptr, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
/*if (esp_apptrace_riscv_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}*/
return res;
}
static bool esp_apptrace_riscv_host_is_connected(esp_apptrace_riscv_data_t *hw_data)
{
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return false;
}
return s_tracing_ctrl[esp_cpu_get_core_id()].ctrl & ESP_APPTRACE_RISCV_HOST_CONNECT ? true : false;
}
static esp_err_t esp_apptrace_riscv_flush_nolock(esp_apptrace_riscv_data_t *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
return esp_apptrace_membufs_flush_nolock(&hw_data->membufs, min_sz, tmo);
}
static esp_err_t esp_apptrace_riscv_flush(esp_apptrace_riscv_data_t *hw_data, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_RISCV_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
esp_err_t res = esp_apptrace_riscv_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
}
res = esp_apptrace_membufs_flush_nolock(&hw_data->membufs, 0, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_riscv_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return res;
}
/*****************************************************************************************/
/************************** Membufs proto HW iface ***************************************/
/*****************************************************************************************/
static inline void esp_apptrace_riscv_buffer_swap_lock(void)
{
extern uint32_t __esp_apptrace_riscv_updated;
// indicate to host that we are about to update.
// this is used only to place CPU into streaming mode at tracing startup
// before starting streaming host can halt us after we read ESP_APPTRACE_RISCV_CTRL_REG and before we updated it
// HACK: in this case host will set breakpoint just after ESP_APPTRACE_RISCV_CTRL_REG update,
// here we set address to set bp at
// enter ERI update critical section
s_tracing_ctrl[esp_cpu_get_core_id()].stat = (uint32_t)&__esp_apptrace_riscv_updated;
}
static __attribute__((noinline)) void esp_apptrace_riscv_buffer_swap_unlock(void)
{
// exit ERI update critical section
s_tracing_ctrl[esp_cpu_get_core_id()].stat = 0;
// TODO: currently host sets breakpoint, use break instruction to stop;
// it will allow to use ESP_APPTRACE_RISCV_STAT_REG for other purposes
asm volatile (
" .global __esp_apptrace_riscv_updated\n"
"__esp_apptrace_riscv_updated:\n"); // host will set bp here to resolve collision at streaming start
}
static esp_err_t esp_apptrace_riscv_buffer_swap_start(uint32_t curr_block_id)
{
esp_err_t res = ESP_OK;
esp_apptrace_riscv_buffer_swap_lock();
uint32_t ctrl_reg = s_tracing_ctrl[esp_cpu_get_core_id()].ctrl;
uint32_t host_connected = ESP_APPTRACE_RISCV_HOST_CONNECT & ctrl_reg;
if (host_connected) {
uint32_t acked_block = ESP_APPTRACE_RISCV_BLOCK_ID_GET(ctrl_reg);
uint32_t host_to_read = ESP_APPTRACE_RISCV_BLOCK_LEN_GET(ctrl_reg);
if (host_to_read != 0 || acked_block != (curr_block_id & ESP_APPTRACE_RISCV_BLOCK_ID_MSK)) {
ESP_APPTRACE_LOGD("[%d]: Can not switch %" PRIx32 " %" PRIu32 " %" PRIx32 " %" PRIx32 "/%" PRIx32, esp_cpu_get_core_id(), ctrl_reg, host_to_read, acked_block,
curr_block_id & ESP_APPTRACE_RISCV_BLOCK_ID_MSK, curr_block_id);
res = ESP_ERR_NO_MEM;
goto _on_err;
}
}
return ESP_OK;
_on_err:
esp_apptrace_riscv_buffer_swap_unlock();
return res;
}
static esp_err_t esp_apptrace_riscv_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len)
{
uint32_t ctrl_reg = s_tracing_ctrl[esp_cpu_get_core_id()].ctrl;
uint32_t host_connected = ESP_APPTRACE_RISCV_HOST_CONNECT & ctrl_reg;
s_tracing_ctrl[esp_cpu_get_core_id()].ctrl = ESP_APPTRACE_RISCV_BLOCK_ID(new_block_id) |
host_connected | ESP_APPTRACE_RISCV_BLOCK_LEN(prev_block_len);
esp_apptrace_riscv_buffer_swap_unlock();
return ESP_OK;
}
static esp_err_t esp_apptrace_riscv_buffer_swap(uint32_t new_block_id)
{
/* do nothing */
return ESP_OK;
}
static bool esp_apptrace_riscv_host_data_pending(void)
{
uint32_t ctrl_reg = s_tracing_ctrl[esp_cpu_get_core_id()].ctrl;
// ESP_APPTRACE_LOGV("%s() 0x%x", __func__, ctrl_reg);
return (ctrl_reg & ESP_APPTRACE_RISCV_HOST_DATA) ? true : false;
}

View File

@@ -1,373 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#include "sdkconfig.h"
#include "esp_cpu.h"
#include "esp_log.h"
#include "esp_app_trace_config.h"
#include "esp_app_trace_membufs_proto.h"
#include "esp_app_trace_port.h"
#include "riscv/semihosting.h"
/** RISCV HW transport data */
typedef struct {
uint8_t inited; // initialization state flags for every core
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_t lock; // sync lock
#endif
esp_apptrace_membufs_proto_data_t membufs;
} esp_apptrace_riscv_data_t;
/** RISCV memory host iface control block */
typedef struct {
uint32_t ctrl;
// - Guard field. If this register is not zero then CPU is changing this struct and
// this guard field holds address of the instruction which application will execute when CPU finishes with those modifications.
uint32_t stat;
esp_apptrace_mem_block_t * mem_blocks;
} esp_apptrace_riscv_ctrl_block_t;
#define ESP_APPTRACE_RISCV_BLOCK_LEN_MSK 0x7FFFUL
#define ESP_APPTRACE_RISCV_BLOCK_LEN(_l_) ((_l_) & ESP_APPTRACE_RISCV_BLOCK_LEN_MSK)
#define ESP_APPTRACE_RISCV_BLOCK_LEN_GET(_v_) ((_v_) & ESP_APPTRACE_RISCV_BLOCK_LEN_MSK)
#define ESP_APPTRACE_RISCV_BLOCK_ID_MSK 0x7FUL
#define ESP_APPTRACE_RISCV_BLOCK_ID(_id_) (((_id_) & ESP_APPTRACE_RISCV_BLOCK_ID_MSK) << 15)
#define ESP_APPTRACE_RISCV_BLOCK_ID_GET(_v_) (((_v_) >> 15) & ESP_APPTRACE_RISCV_BLOCK_ID_MSK)
#define ESP_APPTRACE_RISCV_HOST_DATA (1 << 22)
#define ESP_APPTRACE_RISCV_HOST_CONNECT (1 << 23)
#define ESP_APPTRACE_RISCV_INITED(_hw_) ((_hw_)->inited & (1 << 0/*esp_cpu_get_core_id()*/))
const static char *TAG = "esp_apptrace";
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
#define APPTRACE_DRAM_ATTR TCM_DRAM_ATTR
#else
#define APPTRACE_DRAM_ATTR
#endif
static APPTRACE_DRAM_ATTR esp_apptrace_riscv_ctrl_block_t s_tracing_ctrl[CONFIG_FREERTOS_NUMBER_OF_CORES];
/* Advertises apptrace control block address to host.
This function can be overridden with custom implementation,
e.g. OpenOCD flasher stub use own implementation of it. */
__attribute__((weak)) int esp_apptrace_advertise_ctrl_block(void *ctrl_block_addr)
{
if (!esp_cpu_dbgr_is_attached()) {
return 0;
}
return (int) semihosting_call_noerrno(ESP_SEMIHOSTING_SYS_APPTRACE_INIT, (long*)ctrl_block_addr);
}
/* Returns up buffers config.
This function can be overridden with custom implementation,
e.g. OpenOCD flasher stub use own implementation of it. */
__attribute__((weak)) void esp_apptrace_get_up_buffers(esp_apptrace_mem_block_t mem_blocks_cfg[2])
{
static uint8_t s_mem_blocks[2][CONFIG_APPTRACE_BUF_SIZE];
mem_blocks_cfg[0].start = s_mem_blocks[0];
mem_blocks_cfg[0].sz = CONFIG_APPTRACE_BUF_SIZE;
mem_blocks_cfg[1].start = s_mem_blocks[1];
mem_blocks_cfg[1].sz = CONFIG_APPTRACE_BUF_SIZE;
}
static esp_err_t esp_apptrace_riscv_lock(void *hw_data, esp_apptrace_tmo_t *tmo)
{
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_riscv_data_t *riscv_data = hw_data;
esp_err_t ret = esp_apptrace_lock_take(&riscv_data->lock, tmo);
if (ret != ESP_OK) {
return ESP_FAIL;
}
#endif
return ESP_OK;
}
static esp_err_t esp_apptrace_riscv_unlock(void *hw_data)
{
esp_err_t ret = ESP_OK;
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_riscv_data_t *riscv_data = hw_data;
ret = esp_apptrace_lock_give(&riscv_data->lock);
#endif
return ret;
}
/*****************************************************************************************/
/***************************** Apptrace HW iface *****************************************/
/*****************************************************************************************/
static esp_err_t esp_apptrace_riscv_init(void *hw_data, const esp_apptrace_config_t *config)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
/* esp_apptrace_riscv_init() is called on every core, so ensure to do main initialization only once */
int core_id = esp_cpu_get_core_id();
if (core_id == 0) {
esp_apptrace_mem_block_t mem_blocks_cfg[2];
esp_apptrace_get_up_buffers(mem_blocks_cfg);
riscv_data->membufs.header_size = ESP_APPTRACE_HEADER_SIZE_32;
esp_err_t res = esp_apptrace_membufs_init(&riscv_data->membufs, mem_blocks_cfg);
if (res != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to init membufs proto (%d)!", res);
return res;
}
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_init(&riscv_data->lock);
#endif
}
riscv_data->inited |= 1 << core_id;
ESP_APPTRACE_LOGI("Apptrace initialized on CPU%d. Tracing control block @ %p.", core_id, &s_tracing_ctrl[core_id]);
s_tracing_ctrl[core_id].mem_blocks = riscv_data->membufs.blocks;
for (int i = 0; i < 2; i++) {
ESP_APPTRACE_LOGD("Mem buf[%d] %" PRIu32 " bytes @ %p (%p/%p)", i,
s_tracing_ctrl[core_id].mem_blocks[i].sz, s_tracing_ctrl[core_id].mem_blocks[i].start,
&(s_tracing_ctrl[core_id].mem_blocks[i].start), &(s_tracing_ctrl[core_id].mem_blocks[i].sz));
}
// notify host about control block address
int __attribute__((unused)) res = esp_apptrace_advertise_ctrl_block(&s_tracing_ctrl[core_id]);
assert(res == 0 && "Failed to send config to host!");
return ESP_OK;
}
static uint8_t *esp_apptrace_riscv_up_buffer_get(void *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_riscv_lock(riscv_data, tmo);
if (res != ESP_OK) {
return NULL;
}
uint8_t *ptr = esp_apptrace_membufs_up_buffer_get(&riscv_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_riscv_unlock(riscv_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_riscv_up_buffer_put(void *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_up_buffer_put() just modifies buffer's header
esp_err_t res = esp_apptrace_membufs_up_buffer_put(&riscv_data->membufs, ptr, tmo);
return res;
}
static void esp_apptrace_riscv_down_buffer_config(void *hw_data, uint8_t *buf, uint32_t size)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return;
}
esp_apptrace_membufs_down_buffer_config(&riscv_data->membufs, buf, size);
}
static uint8_t *esp_apptrace_riscv_down_buffer_get(void *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_riscv_lock(riscv_data, tmo);
if (res != ESP_OK) {
return NULL;
}
uint8_t *ptr = esp_apptrace_membufs_down_buffer_get(&riscv_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_riscv_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_riscv_down_buffer_put(void *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_down_buffer_put() does nothing
/*esp_err_t res = esp_apptrace_riscv_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
}*/
esp_err_t res = esp_apptrace_membufs_down_buffer_put(&riscv_data->membufs, ptr, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
/*if (esp_apptrace_riscv_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}*/
return res;
}
static bool esp_apptrace_riscv_host_is_connected(void *hw_data)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return false;
}
return s_tracing_ctrl[esp_cpu_get_core_id()].ctrl & ESP_APPTRACE_RISCV_HOST_CONNECT ? true : false;
}
static esp_err_t esp_apptrace_riscv_flush_nolock(void *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return ESP_ERR_INVALID_STATE;
}
return esp_apptrace_membufs_flush_nolock(&riscv_data->membufs, min_sz, tmo);
}
static esp_err_t esp_apptrace_riscv_flush(void *hw_data, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
if (!ESP_APPTRACE_RISCV_INITED(riscv_data)) {
return ESP_ERR_INVALID_STATE;
}
esp_err_t res = esp_apptrace_riscv_lock(riscv_data, tmo);
if (res != ESP_OK) {
return res;
}
res = esp_apptrace_membufs_flush_nolock(&riscv_data->membufs, 0, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_riscv_unlock(riscv_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return res;
}
/*****************************************************************************************/
/************************** Membufs proto HW iface ***************************************/
/*****************************************************************************************/
static inline void esp_apptrace_riscv_buffer_swap_lock(void)
{
extern uint32_t __esp_apptrace_riscv_updated;
// indicate to host that we are about to update.
// this is used only to place CPU into streaming mode at tracing startup
// before starting streaming host can halt us after we read ESP_APPTRACE_RISCV_CTRL_REG and before we updated it
// HACK: in this case host will set breakpoint just after ESP_APPTRACE_RISCV_CTRL_REG update,
// here we set address to set bp at
// enter ERI update critical section
s_tracing_ctrl[esp_cpu_get_core_id()].stat = (uint32_t)&__esp_apptrace_riscv_updated;
}
static __attribute__((noinline)) void esp_apptrace_riscv_buffer_swap_unlock(void)
{
// exit ERI update critical section
s_tracing_ctrl[esp_cpu_get_core_id()].stat = 0;
// TODO: currently host sets breakpoint, use break instruction to stop;
// it will allow to use ESP_APPTRACE_RISCV_STAT_REG for other purposes
asm volatile(
" .global __esp_apptrace_riscv_updated\n"
"__esp_apptrace_riscv_updated:\n"); // host will set bp here to resolve collision at streaming start
}
static esp_err_t esp_apptrace_riscv_buffer_swap_start(uint32_t curr_block_id)
{
esp_err_t res = ESP_OK;
esp_apptrace_riscv_buffer_swap_lock();
uint32_t ctrl_reg = s_tracing_ctrl[esp_cpu_get_core_id()].ctrl;
uint32_t host_connected = ESP_APPTRACE_RISCV_HOST_CONNECT & ctrl_reg;
if (host_connected) {
uint32_t acked_block = ESP_APPTRACE_RISCV_BLOCK_ID_GET(ctrl_reg);
uint32_t host_to_read = ESP_APPTRACE_RISCV_BLOCK_LEN_GET(ctrl_reg);
if (host_to_read != 0 || acked_block != (curr_block_id & ESP_APPTRACE_RISCV_BLOCK_ID_MSK)) {
ESP_APPTRACE_LOGD("[%d]: Can not switch %" PRIx32 " %" PRIu32 " %" PRIx32 " %" PRIx32 "/%" PRIx32, esp_cpu_get_core_id(), ctrl_reg, host_to_read, acked_block,
curr_block_id & ESP_APPTRACE_RISCV_BLOCK_ID_MSK, curr_block_id);
res = ESP_ERR_NO_MEM;
goto _on_err;
}
}
return ESP_OK;
_on_err:
esp_apptrace_riscv_buffer_swap_unlock();
return res;
}
static esp_err_t esp_apptrace_riscv_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len)
{
uint32_t ctrl_reg = s_tracing_ctrl[esp_cpu_get_core_id()].ctrl;
uint32_t host_connected = ESP_APPTRACE_RISCV_HOST_CONNECT & ctrl_reg;
s_tracing_ctrl[esp_cpu_get_core_id()].ctrl = ESP_APPTRACE_RISCV_BLOCK_ID(new_block_id) |
host_connected | ESP_APPTRACE_RISCV_BLOCK_LEN(prev_block_len);
esp_apptrace_riscv_buffer_swap_unlock();
return ESP_OK;
}
static esp_err_t esp_apptrace_riscv_buffer_swap(uint32_t new_block_id, uint32_t prev_block_len)
{
/* do nothing */
return ESP_OK;
}
static bool esp_apptrace_riscv_host_data_pending(void)
{
uint32_t ctrl_reg = s_tracing_ctrl[esp_cpu_get_core_id()].ctrl;
// ESP_APPTRACE_LOGV("%s() 0x%x", __func__, ctrl_reg);
return (ctrl_reg & ESP_APPTRACE_RISCV_HOST_DATA) ? true : false;
}
static void esp_apptrace_riscv_set_header_size(void *hw_data, esp_apptrace_header_size_t header_size)
{
esp_apptrace_riscv_data_t *riscv_data = hw_data;
riscv_data->membufs.header_size = header_size;
}
esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data)
{
static esp_apptrace_membufs_proto_hw_t s_trace_proto_hw = {
.swap_start = esp_apptrace_riscv_buffer_swap_start,
.swap = esp_apptrace_riscv_buffer_swap,
.swap_end = esp_apptrace_riscv_buffer_swap_end,
.host_data_pending = esp_apptrace_riscv_host_data_pending,
};
static esp_apptrace_riscv_data_t s_trace_hw_data = {
.membufs = {
.hw = &s_trace_proto_hw,
},
};
static esp_apptrace_hw_t s_trace_hw = {
.init = esp_apptrace_riscv_init,
.get_up_buffer = esp_apptrace_riscv_up_buffer_get,
.put_up_buffer = esp_apptrace_riscv_up_buffer_put,
.flush_up_buffer_nolock = esp_apptrace_riscv_flush_nolock,
.flush_up_buffer = esp_apptrace_riscv_flush,
.down_buffer_config = esp_apptrace_riscv_down_buffer_config,
.get_down_buffer = esp_apptrace_riscv_down_buffer_get,
.put_down_buffer = esp_apptrace_riscv_down_buffer_put,
.host_is_connected = esp_apptrace_riscv_host_is_connected,
.set_header_size = esp_apptrace_riscv_set_header_size,
};
*data = &s_trace_hw_data;
return &s_trace_hw;
}

View File

@@ -0,0 +1,552 @@
/*
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
//
// How It Works
// ************
// 1. Components Overview
// ======================
// Xtensa has useful feature: TRAX debug module. It allows recording program execution flow at run-time without disturbing CPU.
// Execution flow data are written to configurable Trace RAM block. Besides accessing Trace RAM itself TRAX module also allows to read/write
// trace memory via its registers by means of JTAG, APB or ERI transactions.
// ESP32 has two Xtensa cores with separate TRAX modules on them and provides two special memory regions to be used as trace memory.
// Chip allows muxing access to those trace memory blocks in such a way that while one block is accessed by CPUs another one can be accessed by host
// by means of reading/writing TRAX registers via JTAG. Blocks muxing is configurable at run-time and allows switching trace memory blocks between
// accessors in round-robin fashion so they can read/write separate memory blocks without disturbing each other.
// This module implements application tracing feature based on above mechanisms. It allows to transfer arbitrary user data to/from
// host via JTAG with minimal impact on system performance. This module is implied to be used in the following tracing scheme.
// ------>------ ----- (host components) -----
// | | | |
// ------------------- ----------------------- ----------------------- ---------------- ------ --------- -----------------
// |trace data source|-->|target tracing module|<--->|TRAX_MEM0 | TRAX_MEM1|---->|TRAX_DATA_REGS|<-->|JTAG|<--->|OpenOCD|-->|trace data sink|
// ------------------- ----------------------- ----------------------- ---------------- ------ --------- -----------------
// | | | |
// | ------<------ ---------------- |
// |<------------------------------------------->|TRAX_CTRL_REGS|<---->|
// ----------------
// In general tracing goes in the following way. User application requests tracing module to send some data by calling esp_apptrace_buffer_get(),
// module allocates necessary buffer in current input trace block. Then user fills received buffer with data and calls esp_apptrace_buffer_put().
// When current input trace block is filled with app data it is exposed to host and the second block becomes input one and buffer filling restarts.
// While target application fills one TRAX block host reads another one via JTAG.
// This module also allows communication in the opposite direction: from host to target. As it was said ESP32 and host can access different TRAX blocks
// simultaneously, so while target writes trace data to one block host can write its own data (e.g. tracing commands) to another one then when
// blocks are switched host receives trace data and target receives data written by host application. Target user application can read host data
// by calling esp_apptrace_read() API.
// To control buffer switching and for other communication purposes this implementation uses some TRAX registers. It is safe since HW TRAX tracing
// can not be used along with application tracing feature so these registers are freely readable/writeable via JTAG from host and via ERI from ESP32 cores.
// Overhead of this implementation on target CPU is produced only by allocating/managing buffers and copying of data.
// On the host side special OpenOCD command must be used to read trace data.
// 2. TRAX Registers layout
// ========================
// This module uses two TRAX HW registers and one Performance Monitor register to communicate with host SW (OpenOCD).
// - Control register uses TRAX_DELAYCNT as storage. Only lower 24 bits of TRAX_DELAYCNT are writable. Control register has the following bitfields:
// | 31..XXXXXX..24 | 23 .(host_connect). 23| 22..(block_id)..15 | 14..(block_len)..0 |
// 14..0 bits - actual length of user data in trace memory block. Target updates it every time it fills memory block and exposes it to host.
// Host writes zero to this field when it finishes reading exposed block;
// 21..15 bits - trace memory block transfer ID. Block counter. It can overflow. Updated by target, host should not modify it. Actually can be 2 bits;
// 22 bit - 'host data present' flag. If set to one there is data from host, otherwise - no host data;
// 23 bit - 'host connected' flag. If zero then host is not connected and tracing module works in post-mortem mode, otherwise in streaming mode;
// - Status register uses TRAX_TRIGGERPC as storage. If this register is not zero then current CPU is changing TRAX registers and
// this register holds address of the instruction which application will execute when it finishes with those registers modifications.
// See 'Targets Connection' section for details.
// - CRC16 register uses ERI_PERFMON_PM1 as storage. This register is used to store CRC16 checksum of the exposed trace memory block.
// The register has the following format:
// | 31..16 (CRC indicator) | 15..0 (CRC16 value) |
// CRC indicator (0xA55A) is used to distinguish valid CRC values from other data that might be in the register.
// CRC16 is calculated over the entire exposed block and is updated every time a block is exposed to the host.
// This allows the host to verify data integrity of the received trace data.
// 3. Modes of operation
// =====================
// This module supports two modes of operation:
// - Post-mortem mode. This is the default mode. In this mode application tracing module does not check whether host has read all the data from block
// exposed to it and switches block in any case. The mode does not need host interaction for operation and so can be useful when only the latest
// trace data are necessary, e.g. for analyzing crashes. On panic the latest data from current input block are exposed to host and host can read them.
// It can happen that system panic occurs when there are very small amount of data which are not exposed to host yet (e.g. crash just after the
// TRAX block switch). In this case the previous 16KB of collected data will be dropped and host will see the latest, but very small piece of trace.
// It can be insufficient to diagnose the problem. To avoid such situations there is menuconfig option
// CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH
// which controls the threshold for flushing data in case of panic.
// - Streaming mode. Tracing module enters this mode when host connects to target and sets respective bits in control registers (per core).
// In this mode before switching the block tracing module waits for the host to read all the data from the previously exposed block.
// On panic tracing module also waits (timeout is configured via menuconfig via CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO) for the host to read all data.
// 4. Communication Protocol
// =========================
// 4.1 Trace Memory Blocks
// -----------------------
// Communication is controlled via special register. Host periodically polls control register on each core to find out if there are any data available.
// When current input memory block is filled it is exposed to host and 'block_len' and 'block_id' fields are updated in the control register.
// Host reads new register value and according to it's value starts reading data from exposed block. Meanwhile target starts filling another trace block.
// When host finishes reading the block it clears 'block_len' field in control register indicating to the target that it is ready to accept the next one.
// If the host has some data to transfer to the target it writes them to trace memory block before clearing 'block_len' field. Then it sets
// 'host_data_present' bit and clears 'block_len' field in control register. Upon every block switch target checks 'host_data_present' bit and if it is set
// reads them to down buffer before writing any trace data to switched TRAX block.
// 4.2 User Data Chunks Level
// --------------------------
// Since trace memory block is shared between user data chunks and data copying is performed on behalf of the API user (in its normal context) in
// multithreading environment it can happen that task/ISR which copies data is preempted by another high prio task/ISR. So it is possible situation
// that task/ISR will fail to complete filling its data chunk before the whole trace block is exposed to the host. To handle such conditions tracing
// module prepends all user data chunks with header which contains allocated buffer size and actual data length within it. OpenOCD command
// which reads application traces reports error when it reads incomplete user data block.
// Data which are transffered from host to target are also prepended with a header. Down channel data header is simple and consists of one two bytes field
// containing length of host data following the header.
// 4.3 Data Buffering
// ------------------
// It takes some time for the host to read TRAX memory block via JTAG. In streaming mode it can happen that target has filled its TRAX block, but host
// has not completed reading of the previous one yet. So in this case time critical tracing calls (which can not be delayed for too long time due to
// the lack of free memory in TRAX block) can be dropped. To avoid such scenarios tracing module implements data buffering. Buffered data will be sent
// to the host later when TRAX block switch occurs. The maximum size of the buffered data is controlled by menuconfig option
// CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX.
// 4.4 Target Connection/Disconnection
// -----------------------------------
// When host is going to start tracing in streaming mode it needs to put both ESP32 cores into initial state when 'host connected' bit is set
// on both cores. To accomplish this host halts both cores and sets this bit in TRAX registers. But target code can be halted in state when it has read control
// register but has not updated its value. To handle such situations target code indicates to the host that it is updating control register by writing
// non-zero value to status register. Actually it writes address of the instruction which it will execute when it finishes with
// the registers update. When target is halted during control register update host sets breakpoint at the address from status register and resumes CPU.
// After target code finishes with register update it is halted on breakpoint, host detects it and safely sets 'host connected' bit. When both cores
// are set up they are resumed. Tracing starts without further intrusion into CPUs work.
// When host is going to stop tracing in streaming mode it needs to disconnect targets. Disconnection process is done using the same algorithm
// as for connecting, but 'host connected' bits are cleared on ESP32 cores.
// 5. Module Access Synchronization
// ================================
// Access to internal module's data is synchronized with custom mutex. Mutex is a wrapper for portMUX_TYPE and uses almost the same sync mechanism as in
// vPortCPUAcquireMutex/vPortCPUReleaseMutex. The mechanism uses S32C1I Xtensa instruction to implement exclusive access to module's data from tasks and
// ISRs running on both cores. Also custom mutex allows specifying timeout for locking operation. Locking routine checks underlying mutex in cycle until
// it gets its ownership or timeout expires. The differences of application tracing module's mutex implementation from vPortCPUAcquireMutex/vPortCPUReleaseMutex are:
// - Support for timeouts.
// - Local IRQs for CPU which owns the mutex are disabled till the call to unlocking routine. This is made to avoid possible task's prio inversion.
// When low prio task takes mutex and enables local IRQs gets preempted by high prio task which in its turn can try to acquire mutex using infinite timeout.
// So no local task switch occurs when mutex is locked. But this does not apply to tasks on another CPU.
// WARNING: Priority inversion can happen when low prio task works on one CPU and medium and high prio tasks work on another.
// WARNING: Care must be taken when selecting timeout values for trace calls from ISRs. Tracing module does not care about watchdogs when waiting
// on internal locks and for host to complete previous block reading, so if timeout value exceeds watchdog's one it can lead to the system reboot.
// 6. Timeouts
// ===========
// Timeout mechanism is based on xthal_get_ccount() routine and supports timeout values in microseconds.
// There are two situations when task/ISR can be delayed by tracing API call. Timeout mechanism takes into account both conditions:
// - Trace data are locked by another task/ISR. When waiting on trace data lock.
// - Current TRAX memory input block is full when working in streaming mode (host is connected). When waiting for host to complete previous block reading.
// When waiting for any of above conditions xthal_get_ccount() is called periodically to calculate time elapsed from trace API routine entry. When elapsed
// time exceeds specified timeout value operation is canceled and ESP_ERR_TIMEOUT code is returned.
#include "sdkconfig.h"
#include "soc/soc.h"
#include "soc/dport_reg.h"
#include "soc/tracemem_config.h"
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
#include "soc/sensitive_reg.h"
#endif
#include "eri.h"
#include "esp_private/trax.h"
#include "esp_cpu.h"
#include "esp_log.h"
#include "esp_app_trace_membufs_proto.h"
#include "esp_app_trace_port.h"
#include "esp_rom_crc.h"
// TRAX is disabled, so we use its registers for our own purposes
// | 31..XXXXXX..24 | 23 .(host_connect). 23 | 22 .(host_data). 22| 21..(block_id)..15 | 14..(block_len)..0 |
#define ESP_APPTRACE_TRAX_CTRL_REG ERI_TRAX_DELAYCNT
#define ESP_APPTRACE_TRAX_STAT_REG ERI_TRAX_TRIGGERPC
#define ESP_APPTRACE_TRAX_CRC16_REG ERI_PERFMON_PM1
#define ESP_APPTRACE_CRC_INDICATOR (0xA55AU << 16)
#define ESP_APPTRACE_TRAX_BLOCK_LEN_MSK 0x7FFFUL
#define ESP_APPTRACE_TRAX_BLOCK_LEN(_l_) ((_l_) & ESP_APPTRACE_TRAX_BLOCK_LEN_MSK)
#define ESP_APPTRACE_TRAX_BLOCK_LEN_GET(_v_) ((_v_) & ESP_APPTRACE_TRAX_BLOCK_LEN_MSK)
#define ESP_APPTRACE_TRAX_BLOCK_ID_MSK 0x7FUL
#define ESP_APPTRACE_TRAX_BLOCK_ID(_id_) (((_id_) & ESP_APPTRACE_TRAX_BLOCK_ID_MSK) << 15)
#define ESP_APPTRACE_TRAX_BLOCK_ID_GET(_v_) (((_v_) >> 15) & ESP_APPTRACE_TRAX_BLOCK_ID_MSK)
#define ESP_APPTRACE_TRAX_HOST_DATA (1 << 22)
#define ESP_APPTRACE_TRAX_HOST_CONNECT (1 << 23)
#define ESP_APPTRACE_TRAX_INITED(_hw_) ((_hw_)->inited & (1 << esp_cpu_get_core_id()))
#define ESP_APPTRACE_TRAX_BLOCK_SIZE (0x4000UL)
/** TRAX HW transport data */
typedef struct {
uint8_t inited;
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_t lock; // sync lock
#endif
esp_apptrace_membufs_proto_data_t membufs;
} esp_apptrace_trax_data_t;
static esp_err_t esp_apptrace_trax_init(esp_apptrace_trax_data_t *hw_data);
static esp_err_t esp_apptrace_trax_flush(esp_apptrace_trax_data_t *hw_data, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_trax_flush_nolock(esp_apptrace_trax_data_t *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo);
static uint8_t *esp_apptrace_trax_up_buffer_get(esp_apptrace_trax_data_t *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_trax_up_buffer_put(esp_apptrace_trax_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
static void esp_apptrace_trax_down_buffer_config(esp_apptrace_trax_data_t *hw_data, uint8_t *buf, uint32_t size);
static uint8_t *esp_apptrace_trax_down_buffer_get(esp_apptrace_trax_data_t *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo);
static esp_err_t esp_apptrace_trax_down_buffer_put(esp_apptrace_trax_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo);
static bool esp_apptrace_trax_host_is_connected(esp_apptrace_trax_data_t *hw_data);
static esp_err_t esp_apptrace_trax_buffer_swap_start(uint32_t curr_block_id);
static esp_err_t esp_apptrace_trax_buffer_swap(uint32_t new_block_id);
static esp_err_t esp_apptrace_trax_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len);
static bool esp_apptrace_trax_host_data_pending(void);
const static char *TAG = "esp_apptrace";
static uint8_t * const s_trax_blocks[] = {
(uint8_t *)TRACEMEM_BLK0_ADDR,
(uint8_t *)TRACEMEM_BLK1_ADDR
};
esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data)
{
#if CONFIG_APPTRACE_DEST_JTAG
static esp_apptrace_membufs_proto_hw_t s_trax_proto_hw = {
.swap_start = esp_apptrace_trax_buffer_swap_start,
.swap = esp_apptrace_trax_buffer_swap,
.swap_end = esp_apptrace_trax_buffer_swap_end,
.host_data_pending = esp_apptrace_trax_host_data_pending,
};
static esp_apptrace_trax_data_t s_trax_hw_data = {
.membufs = {
.hw = &s_trax_proto_hw,
},
};
static esp_apptrace_hw_t s_trax_hw = {
.init = (esp_err_t (*)(void *))esp_apptrace_trax_init,
.get_up_buffer = (uint8_t *(*)(void *, uint32_t, esp_apptrace_tmo_t *))esp_apptrace_trax_up_buffer_get,
.put_up_buffer = (esp_err_t (*)(void *, uint8_t *, esp_apptrace_tmo_t *))esp_apptrace_trax_up_buffer_put,
.flush_up_buffer_nolock = (esp_err_t (*)(void *, uint32_t, esp_apptrace_tmo_t *))esp_apptrace_trax_flush_nolock,
.flush_up_buffer = (esp_err_t (*)(void *, esp_apptrace_tmo_t *))esp_apptrace_trax_flush,
.down_buffer_config = (void (*)(void *, uint8_t *, uint32_t ))esp_apptrace_trax_down_buffer_config,
.get_down_buffer = (uint8_t *(*)(void *, uint32_t *, esp_apptrace_tmo_t *))esp_apptrace_trax_down_buffer_get,
.put_down_buffer = (esp_err_t (*)(void *, uint8_t *, esp_apptrace_tmo_t *))esp_apptrace_trax_down_buffer_put,
.host_is_connected = (bool (*)(void *))esp_apptrace_trax_host_is_connected,
};
*data = &s_trax_hw_data;
return &s_trax_hw;
#else
return NULL;
#endif
}
static esp_err_t esp_apptrace_trax_lock(esp_apptrace_trax_data_t *hw_data, esp_apptrace_tmo_t *tmo)
{
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_err_t ret = esp_apptrace_lock_take(&hw_data->lock, tmo);
if (ret != ESP_OK) {
return ESP_FAIL;
}
#endif
return ESP_OK;
}
static esp_err_t esp_apptrace_trax_unlock(esp_apptrace_trax_data_t *hw_data)
{
esp_err_t ret = ESP_OK;
#if CONFIG_APPTRACE_LOCK_ENABLE
ret = esp_apptrace_lock_give(&hw_data->lock);
#endif
return ret;
}
static inline void esp_apptrace_trax_hw_init(void)
{
// Stop trace, if any (on the current CPU)
eri_write(ERI_TRAX_TRAXCTRL, TRAXCTRL_TRSTP);
eri_write(ERI_TRAX_TRAXCTRL, TRAXCTRL_TMEN);
eri_write(ESP_APPTRACE_TRAX_CTRL_REG, ESP_APPTRACE_TRAX_BLOCK_ID(0));
// this is for OpenOCD to let him know where stub entries vector is resided
// must be read by host before any transfer using TRAX
eri_write(ESP_APPTRACE_TRAX_STAT_REG, 0);
ESP_APPTRACE_LOGI("Initialized TRAX on CPU%d", esp_cpu_get_core_id());
}
static inline void esp_apptrace_trax_select_memory_block(int block_num)
{
// select memory block to be exposed to the TRAX module (accessed by host)
#if CONFIG_IDF_TARGET_ESP32
DPORT_WRITE_PERI_REG(DPORT_TRACEMEM_MUX_MODE_REG, block_num ? TRACEMEM_MUX_BLK0_ONLY : TRACEMEM_MUX_BLK1_ONLY);
#elif CONFIG_IDF_TARGET_ESP32S2
WRITE_PERI_REG(DPORT_PMS_OCCUPY_3_REG, block_num ? BIT(TRACEMEM_MUX_BLK0_NUM-4) : BIT(TRACEMEM_MUX_BLK1_NUM-4));
#elif CONFIG_IDF_TARGET_ESP32S3
// select memory block to be exposed to the TRAX module (accessed by host)
uint32_t block_bits = block_num ? TRACEMEM_CORE0_MUX_BLK_BITS(TRACEMEM_MUX_BLK0_NUM)
: TRACEMEM_CORE0_MUX_BLK_BITS(TRACEMEM_MUX_BLK1_NUM);
block_bits |= block_num ? TRACEMEM_CORE1_MUX_BLK_BITS(TRACEMEM_MUX_BLK0_NUM)
: TRACEMEM_CORE1_MUX_BLK_BITS(TRACEMEM_MUX_BLK1_NUM);
ESP_EARLY_LOGV(TAG, "Select block %d @ %p (bits 0x%" PRIx32 ")", block_num, s_trax_blocks[block_num], block_bits);
DPORT_WRITE_PERI_REG(SENSITIVE_INTERNAL_SRAM_USAGE_2_REG, block_bits);
#endif
}
static inline void esp_apptrace_trax_memory_enable(void)
{
#if CONFIG_IDF_TARGET_ESP32
/* Enable trace memory on PRO CPU */
DPORT_WRITE_PERI_REG(DPORT_PRO_TRACEMEM_ENA_REG, DPORT_PRO_TRACEMEM_ENA_M);
#if CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE == 0
/* Enable trace memory on APP CPU */
DPORT_WRITE_PERI_REG(DPORT_APP_TRACEMEM_ENA_REG, DPORT_APP_TRACEMEM_ENA_M);
#endif
#endif
}
/*****************************************************************************************/
/***************************** Apptrace HW iface *****************************************/
/*****************************************************************************************/
static esp_err_t esp_apptrace_trax_init(esp_apptrace_trax_data_t *hw_data)
{
int core_id = esp_cpu_get_core_id();
// 'esp_apptrace_trax_init()' is called on every core, so ensure to do main initialization only once
if (core_id == 0) {
esp_apptrace_mem_block_t mem_blocks_cfg[2] = {
{
.start = s_trax_blocks[0],
.sz = ESP_APPTRACE_TRAX_BLOCK_SIZE
},
{
.start = s_trax_blocks[1],
.sz = ESP_APPTRACE_TRAX_BLOCK_SIZE
},
};
esp_err_t res = esp_apptrace_membufs_init(&hw_data->membufs, mem_blocks_cfg);
if (res != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to init membufs proto (%d)!", res);
return res;
}
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_init(&hw_data->lock);
#endif
esp_apptrace_trax_memory_enable();
esp_apptrace_trax_select_memory_block(0);
}
// init TRAX on this CPU
esp_apptrace_trax_hw_init();
hw_data->inited |= 1 << core_id;
return ESP_OK;
}
static uint8_t *esp_apptrace_trax_up_buffer_get(esp_apptrace_trax_data_t *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo)
{
uint8_t *ptr;
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_trax_lock(hw_data, tmo);
if (res != ESP_OK) {
return NULL;
}
ptr = esp_apptrace_membufs_up_buffer_get(&hw_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_trax_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_trax_up_buffer_put(esp_apptrace_trax_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_up_buffer_put() just modifies buffer's header
esp_err_t res = esp_apptrace_membufs_up_buffer_put(&hw_data->membufs, ptr, tmo);
return res;
}
static void esp_apptrace_trax_down_buffer_config(esp_apptrace_trax_data_t *hw_data, uint8_t *buf, uint32_t size)
{
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return;
}
esp_apptrace_membufs_down_buffer_config(&hw_data->membufs, buf, size);
}
static uint8_t *esp_apptrace_trax_down_buffer_get(esp_apptrace_trax_data_t *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo)
{
uint8_t *ptr;
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_trax_lock(hw_data, tmo);
if (res != ESP_OK) {
return NULL;
}
ptr = esp_apptrace_membufs_down_buffer_get(&hw_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_trax_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_trax_down_buffer_put(esp_apptrace_trax_data_t *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_down_buffer_put() does nothing
/*esp_err_t res = esp_apptrace_trax_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
}*/
esp_err_t res = esp_apptrace_membufs_down_buffer_put(&hw_data->membufs, ptr, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
/*if (esp_apptrace_trax_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}*/
return res;
}
static bool esp_apptrace_trax_host_is_connected(esp_apptrace_trax_data_t *hw_data)
{
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return false;
}
return eri_read(ESP_APPTRACE_TRAX_CTRL_REG) & ESP_APPTRACE_TRAX_HOST_CONNECT ? true : false;
}
static esp_err_t esp_apptrace_trax_flush_nolock(esp_apptrace_trax_data_t *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
return esp_apptrace_membufs_flush_nolock(&hw_data->membufs, min_sz, tmo);
}
static esp_err_t esp_apptrace_trax_flush(esp_apptrace_trax_data_t *hw_data, esp_apptrace_tmo_t *tmo)
{
if (!ESP_APPTRACE_TRAX_INITED(hw_data)) {
return ESP_ERR_INVALID_STATE;
}
esp_err_t res = esp_apptrace_trax_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
}
res = esp_apptrace_membufs_flush_nolock(&hw_data->membufs, 0, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_trax_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return res;
}
/*****************************************************************************************/
/************************** Membufs proto HW iface ***************************************/
/*****************************************************************************************/
static inline void esp_apptrace_trax_buffer_swap_lock(void)
{
extern uint32_t __esp_apptrace_trax_eri_updated;
// indicate to host that we are about to update.
// this is used only to place CPU into streaming mode at tracing startup
// before starting streaming host can halt us after we read ESP_APPTRACE_TRAX_CTRL_REG and before we updated it
// HACK: in this case host will set breakpoint just after ESP_APPTRACE_TRAX_CTRL_REG update,
// here we set address to set bp at
// enter ERI update critical section
eri_write(ESP_APPTRACE_TRAX_STAT_REG, (uint32_t)&__esp_apptrace_trax_eri_updated);
}
static __attribute__((noinline)) void esp_apptrace_trax_buffer_swap_unlock(void)
{
// exit ERI update critical section
eri_write(ESP_APPTRACE_TRAX_STAT_REG, 0x0);
// TODO: currently host sets breakpoint, use break instruction to stop;
// it will allow to use ESP_APPTRACE_TRAX_STAT_REG for other purposes
asm volatile (
" .global __esp_apptrace_trax_eri_updated\n"
"__esp_apptrace_trax_eri_updated:\n"); // host will set bp here to resolve collision at streaming start
}
static esp_err_t esp_apptrace_trax_buffer_swap_start(uint32_t curr_block_id)
{
esp_err_t res = ESP_OK;
esp_apptrace_trax_buffer_swap_lock();
uint32_t ctrl_reg = eri_read(ESP_APPTRACE_TRAX_CTRL_REG);
uint32_t host_connected = ESP_APPTRACE_TRAX_HOST_CONNECT & ctrl_reg;
if (host_connected) {
uint32_t acked_block = ESP_APPTRACE_TRAX_BLOCK_ID_GET(ctrl_reg);
uint32_t host_to_read = ESP_APPTRACE_TRAX_BLOCK_LEN_GET(ctrl_reg);
if (host_to_read != 0 || acked_block != (curr_block_id & ESP_APPTRACE_TRAX_BLOCK_ID_MSK)) {
ESP_APPTRACE_LOGD("HC[%d]: Can not switch %" PRIx32 " %" PRIu32 " %" PRIx32 " %" PRIx32 "/%" PRIx32,
esp_cpu_get_core_id(), ctrl_reg, host_to_read, acked_block,
curr_block_id & ESP_APPTRACE_TRAX_BLOCK_ID_MSK, curr_block_id);
res = ESP_ERR_NO_MEM;
goto _on_err;
}
}
return ESP_OK;
_on_err:
esp_apptrace_trax_buffer_swap_unlock();
return res;
}
static esp_err_t esp_apptrace_trax_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len)
{
uint32_t ctrl_reg = eri_read(ESP_APPTRACE_TRAX_CTRL_REG);
uint32_t host_connected = ESP_APPTRACE_TRAX_HOST_CONNECT & ctrl_reg;
/* calculate CRC16 of the already switched block */
if (prev_block_len > 0) {
const uint8_t *prev_block_start = s_trax_blocks[!((new_block_id % 2))];
uint16_t crc16 = esp_rom_crc16_le(0, prev_block_start, prev_block_len);
eri_write(ESP_APPTRACE_TRAX_CRC16_REG, crc16 | ESP_APPTRACE_CRC_INDICATOR);
ESP_APPTRACE_LOGD("CRC16:%x %d @%x", crc16, prev_block_len, prev_block_start);
}
eri_write(ESP_APPTRACE_TRAX_CTRL_REG, ESP_APPTRACE_TRAX_BLOCK_ID(new_block_id) |
host_connected | ESP_APPTRACE_TRAX_BLOCK_LEN(prev_block_len));
esp_apptrace_trax_buffer_swap_unlock();
return ESP_OK;
}
static esp_err_t esp_apptrace_trax_buffer_swap(uint32_t new_block_id)
{
esp_apptrace_trax_select_memory_block(new_block_id);
return ESP_OK;
}
static bool esp_apptrace_trax_host_data_pending(void)
{
uint32_t ctrl_reg = eri_read(ESP_APPTRACE_TRAX_CTRL_REG);
return (ctrl_reg & ESP_APPTRACE_TRAX_HOST_DATA) ? true : false;
}

View File

@@ -1,546 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
//
// How It Works
// ************
// 1. Components Overview
// ======================
// Xtensa has useful feature: TRAX debug module. It allows recording program execution flow at run-time without disturbing CPU.
// Execution flow data are written to configurable Trace RAM block. Besides accessing Trace RAM itself TRAX module also allows to read/write
// trace memory via its registers by means of JTAG, APB or ERI transactions.
// ESP32 has two Xtensa cores with separate TRAX modules on them and provides two special memory regions to be used as trace memory.
// Chip allows muxing access to those trace memory blocks in such a way that while one block is accessed by CPUs another one can be accessed by host
// by means of reading/writing TRAX registers via JTAG. Blocks muxing is configurable at run-time and allows switching trace memory blocks between
// accessors in round-robin fashion so they can read/write separate memory blocks without disturbing each other.
// This module implements application tracing feature based on above mechanisms. It allows to transfer arbitrary user data to/from
// host via JTAG with minimal impact on system performance. This module is implied to be used in the following tracing scheme.
// ------>------ ----- (host components) -----
// | | | |
// ------------------- ----------------------- ----------------------- ---------------- ------ --------- -----------------
// |trace data source|-->|target tracing module|<--->|TRAX_MEM0 | TRAX_MEM1|---->|TRAX_DATA_REGS|<-->|JTAG|<--->|OpenOCD|-->|trace data sink|
// ------------------- ----------------------- ----------------------- ---------------- ------ --------- -----------------
// | | | |
// | ------<------ ---------------- |
// |<------------------------------------------->|TRAX_CTRL_REGS|<---->|
// ----------------
// In general tracing goes in the following way. User application requests tracing module to send some data by calling esp_apptrace_buffer_get(),
// module allocates necessary buffer in current input trace block. Then user fills received buffer with data and calls esp_apptrace_buffer_put().
// When current input trace block is filled with app data it is exposed to host and the second block becomes input one and buffer filling restarts.
// While target application fills one TRAX block host reads another one via JTAG.
// This module also allows communication in the opposite direction: from host to target. As it was said ESP32 and host can access different TRAX blocks
// simultaneously, so while target writes trace data to one block host can write its own data (e.g. tracing commands) to another one then when
// blocks are switched host receives trace data and target receives data written by host application. Target user application can read host data
// by calling esp_apptrace_read() API.
// To control buffer switching and for other communication purposes this implementation uses some TRAX registers. It is safe since HW TRAX tracing
// can not be used along with application tracing feature so these registers are freely readable/writeable via JTAG from host and via ERI from ESP32 cores.
// Overhead of this implementation on target CPU is produced only by allocating/managing buffers and copying of data.
// On the host side special OpenOCD command must be used to read trace data.
// 2. TRAX Registers layout
// ========================
// This module uses two TRAX HW registers and one Performance Monitor register to communicate with host SW (OpenOCD).
// - Control register uses TRAX_DELAYCNT as storage. Only lower 24 bits of TRAX_DELAYCNT are writable. Control register has the following bitfields:
// | 31..XXXXXX..24 | 23 .(host_connect). 23| 22..(block_id)..15 | 14..(block_len)..0 |
// 14..0 bits - actual length of user data in trace memory block. Target updates it every time it fills memory block and exposes it to host.
// Host writes zero to this field when it finishes reading exposed block;
// 21..15 bits - trace memory block transfer ID. Block counter. It can overflow. Updated by target, host should not modify it. Actually can be 2 bits;
// 22 bit - 'host data present' flag. If set to one there is data from host, otherwise - no host data;
// 23 bit - 'host connected' flag. If zero then host is not connected and tracing module works in post-mortem mode, otherwise in streaming mode;
// - Status register uses TRAX_TRIGGERPC as storage. If this register is not zero then current CPU is changing TRAX registers and
// this register holds address of the instruction which application will execute when it finishes with those registers modifications.
// See 'Targets Connection' section for details.
// - CRC16 register uses ERI_PERFMON_PM1 as storage. This register is used to store CRC16 checksum of the exposed trace memory block.
// The register has the following format:
// | 31..16 (CRC indicator) | 15..0 (CRC16 value) |
// CRC indicator (0xA55A) is used to distinguish valid CRC values from other data that might be in the register.
// CRC16 is calculated over the entire exposed block and is updated every time a block is exposed to the host.
// This allows the host to verify data integrity of the received trace data.
// 3. Modes of operation
// =====================
// This module supports two modes of operation:
// - Post-mortem mode. This is the default mode. In this mode application tracing module does not check whether host has read all the data from block
// exposed to it and switches block in any case. The mode does not need host interaction for operation and so can be useful when only the latest
// trace data are necessary, e.g. for analyzing crashes. On panic the latest data from current input block are exposed to host and host can read them.
// It can happen that system panic occurs when there are very small amount of data which are not exposed to host yet (e.g. crash just after the
// TRAX block switch). In this case the previous 16KB of collected data will be dropped and host will see the latest, but very small piece of trace.
// It can be insufficient to diagnose the problem. To avoid such situations there is menuconfig option
// CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH
// which controls the threshold for flushing data in case of panic.
// - Streaming mode. Tracing module enters this mode when host connects to target and sets respective bits in control registers (per core).
// In this mode before switching the block tracing module waits for the host to read all the data from the previously exposed block.
// On panic tracing module also waits (timeout is configured via menuconfig via CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO) for the host to read all data.
// 4. Communication Protocol
// =========================
// 4.1 Trace Memory Blocks
// -----------------------
// Communication is controlled via special register. Host periodically polls control register on each core to find out if there are any data available.
// When current input memory block is filled it is exposed to host and 'block_len' and 'block_id' fields are updated in the control register.
// Host reads new register value and according to it's value starts reading data from exposed block. Meanwhile target starts filling another trace block.
// When host finishes reading the block it clears 'block_len' field in control register indicating to the target that it is ready to accept the next one.
// If the host has some data to transfer to the target it writes them to trace memory block before clearing 'block_len' field. Then it sets
// 'host_data_present' bit and clears 'block_len' field in control register. Upon every block switch target checks 'host_data_present' bit and if it is set
// reads them to down buffer before writing any trace data to switched TRAX block.
// 4.2 User Data Chunks Level
// --------------------------
// Since trace memory block is shared between user data chunks and data copying is performed on behalf of the API user (in its normal context) in
// multithreading environment it can happen that task/ISR which copies data is preempted by another high prio task/ISR. So it is possible situation
// that task/ISR will fail to complete filling its data chunk before the whole trace block is exposed to the host. To handle such conditions tracing
// module prepends all user data chunks with header which contains allocated buffer size and actual data length within it. OpenOCD command
// which reads application traces reports error when it reads incomplete user data block.
// Data which are transffered from host to target are also prepended with a header. Down channel data header is simple and consists of one two bytes field
// containing length of host data following the header.
// 4.3 Target Connection/Disconnection
// -----------------------------------
// When host is going to start tracing in streaming mode it needs to put both ESP32 cores into initial state when 'host connected' bit is set
// on both cores. To accomplish this host halts both cores and sets this bit in TRAX registers. But target code can be halted in state when it has read control
// register but has not updated its value. To handle such situations target code indicates to the host that it is updating control register by writing
// non-zero value to status register. Actually it writes address of the instruction which it will execute when it finishes with
// the registers update. When target is halted during control register update host sets breakpoint at the address from status register and resumes CPU.
// After target code finishes with register update it is halted on breakpoint, host detects it and safely sets 'host connected' bit. When both cores
// are set up they are resumed. Tracing starts without further intrusion into CPUs work.
// When host is going to stop tracing in streaming mode it needs to disconnect targets. Disconnection process is done using the same algorithm
// as for connecting, but 'host connected' bits are cleared on ESP32 cores.
// 5. Module Access Synchronization
// ================================
// Access to internal module's data is synchronized with custom mutex. Mutex is a wrapper for portMUX_TYPE and uses almost the same sync mechanism as in
// vPortCPUAcquireMutex/vPortCPUReleaseMutex. The mechanism uses S32C1I Xtensa instruction to implement exclusive access to module's data from tasks and
// ISRs running on both cores. Also custom mutex allows specifying timeout for locking operation. Locking routine checks underlying mutex in cycle until
// it gets its ownership or timeout expires. The differences of application tracing module's mutex implementation from vPortCPUAcquireMutex/vPortCPUReleaseMutex are:
// - Support for timeouts.
// - Local IRQs for CPU which owns the mutex are disabled till the call to unlocking routine. This is made to avoid possible task's prio inversion.
// When low prio task takes mutex and enables local IRQs gets preempted by high prio task which in its turn can try to acquire mutex using infinite timeout.
// So no local task switch occurs when mutex is locked. But this does not apply to tasks on another CPU.
// WARNING: Priority inversion can happen when low prio task works on one CPU and medium and high prio tasks work on another.
// WARNING: Care must be taken when selecting timeout values for trace calls from ISRs. Tracing module does not care about watchdogs when waiting
// on internal locks and for host to complete previous block reading, so if timeout value exceeds watchdog's one it can lead to the system reboot.
// 6. Timeouts
// ===========
// Timeout mechanism is based on xthal_get_ccount() routine and supports timeout values in microseconds.
// There are two situations when task/ISR can be delayed by tracing API call. Timeout mechanism takes into account both conditions:
// - Trace data are locked by another task/ISR. When waiting on trace data lock.
// - Current TRAX memory input block is full when working in streaming mode (host is connected). When waiting for host to complete previous block reading.
// When waiting for any of above conditions xthal_get_ccount() is called periodically to calculate time elapsed from trace API routine entry. When elapsed
// time exceeds specified timeout value operation is canceled and ESP_ERR_TIMEOUT code is returned.
#include "sdkconfig.h"
#include "soc/soc.h"
#include "soc/dport_reg.h"
#include "soc/tracemem_config.h"
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
#include "soc/sensitive_reg.h"
#endif
#include "eri.h"
#include "esp_private/trax.h"
#include "esp_cpu.h"
#include "esp_log.h"
#include "esp_app_trace_membufs_proto.h"
#include "esp_app_trace_port.h"
#include "esp_rom_crc.h"
// TRAX is disabled, so we use its registers for our own purposes
// | 31..XXXXXX..24 | 23 .(host_connect). 23 | 22 .(host_data). 22| 21..(block_id)..15 | 14..(block_len)..0 |
#define ESP_APPTRACE_TRAX_CTRL_REG ERI_TRAX_DELAYCNT
#define ESP_APPTRACE_TRAX_STAT_REG ERI_TRAX_TRIGGERPC
#define ESP_APPTRACE_TRAX_CRC16_REG ERI_PERFMON_PM1
#define ESP_APPTRACE_CRC_INDICATOR (0xA55AU << 16)
#define ESP_APPTRACE_TRAX_BLOCK_LEN_MSK 0x7FFFUL
#define ESP_APPTRACE_TRAX_BLOCK_LEN(_l_) ((_l_) & ESP_APPTRACE_TRAX_BLOCK_LEN_MSK)
#define ESP_APPTRACE_TRAX_BLOCK_LEN_GET(_v_) ((_v_) & ESP_APPTRACE_TRAX_BLOCK_LEN_MSK)
#define ESP_APPTRACE_TRAX_BLOCK_ID_MSK 0x7FUL
#define ESP_APPTRACE_TRAX_BLOCK_ID(_id_) (((_id_) & ESP_APPTRACE_TRAX_BLOCK_ID_MSK) << 15)
#define ESP_APPTRACE_TRAX_BLOCK_ID_GET(_v_) (((_v_) >> 15) & ESP_APPTRACE_TRAX_BLOCK_ID_MSK)
#define ESP_APPTRACE_TRAX_HOST_DATA (1 << 22)
#define ESP_APPTRACE_TRAX_HOST_CONNECT (1 << 23)
#define ESP_APPTRACE_TRAX_INITED(_hw_) ((_hw_)->inited & (1 << esp_cpu_get_core_id()))
#define ESP_APPTRACE_TRAX_BLOCK_SIZE (0x4000UL)
/** TRAX HW transport data */
typedef struct {
uint8_t inited;
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_t lock; // sync lock
#endif
esp_apptrace_membufs_proto_data_t membufs;
} esp_apptrace_trax_data_t;
const static char *TAG = "esp_apptrace";
static uint8_t * const s_trax_blocks[] = {
(uint8_t *)TRACEMEM_BLK0_ADDR,
(uint8_t *)TRACEMEM_BLK1_ADDR
};
static esp_err_t esp_apptrace_trax_lock(void *hw_data, esp_apptrace_tmo_t *tmo)
{
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_trax_data_t *trax_data = hw_data;
esp_err_t ret = esp_apptrace_lock_take(&trax_data->lock, tmo);
if (ret != ESP_OK) {
return ESP_FAIL;
}
#endif
return ESP_OK;
}
static esp_err_t esp_apptrace_trax_unlock(void *hw_data)
{
esp_err_t ret = ESP_OK;
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_trax_data_t *trax_data = hw_data;
ret = esp_apptrace_lock_give(&trax_data->lock);
#endif
return ret;
}
static inline void esp_apptrace_trax_hw_init(void)
{
// Stop trace, if any (on the current CPU)
eri_write(ERI_TRAX_TRAXCTRL, TRAXCTRL_TRSTP);
eri_write(ERI_TRAX_TRAXCTRL, TRAXCTRL_TMEN);
eri_write(ESP_APPTRACE_TRAX_CTRL_REG, ESP_APPTRACE_TRAX_BLOCK_ID(0));
// this is for OpenOCD to let him know where stub entries vector is resided
// must be read by host before any transfer using TRAX
eri_write(ESP_APPTRACE_TRAX_STAT_REG, 0);
ESP_APPTRACE_LOGI("Initialized TRAX on CPU%d", esp_cpu_get_core_id());
}
static inline void esp_apptrace_trax_select_memory_block(int block_num)
{
// select memory block to be exposed to the TRAX module (accessed by host)
#if CONFIG_IDF_TARGET_ESP32
DPORT_WRITE_PERI_REG(DPORT_TRACEMEM_MUX_MODE_REG, block_num ? TRACEMEM_MUX_BLK0_ONLY : TRACEMEM_MUX_BLK1_ONLY);
#elif CONFIG_IDF_TARGET_ESP32S2
WRITE_PERI_REG(DPORT_PMS_OCCUPY_3_REG, block_num ? BIT(TRACEMEM_MUX_BLK0_NUM - 4) : BIT(TRACEMEM_MUX_BLK1_NUM - 4));
#elif CONFIG_IDF_TARGET_ESP32S3
// select memory block to be exposed to the TRAX module (accessed by host)
uint32_t block_bits = block_num ? TRACEMEM_CORE0_MUX_BLK_BITS(TRACEMEM_MUX_BLK0_NUM)
: TRACEMEM_CORE0_MUX_BLK_BITS(TRACEMEM_MUX_BLK1_NUM);
block_bits |= block_num ? TRACEMEM_CORE1_MUX_BLK_BITS(TRACEMEM_MUX_BLK0_NUM)
: TRACEMEM_CORE1_MUX_BLK_BITS(TRACEMEM_MUX_BLK1_NUM);
ESP_EARLY_LOGV(TAG, "Select block %d @ %p (bits 0x%" PRIx32 ")", block_num, s_trax_blocks[block_num], block_bits);
DPORT_WRITE_PERI_REG(SENSITIVE_INTERNAL_SRAM_USAGE_2_REG, block_bits);
#endif
}
static inline void esp_apptrace_trax_memory_enable(void)
{
#if CONFIG_IDF_TARGET_ESP32
/* Enable trace memory on PRO CPU */
DPORT_WRITE_PERI_REG(DPORT_PRO_TRACEMEM_ENA_REG, DPORT_PRO_TRACEMEM_ENA_M);
#if CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE == 0
/* Enable trace memory on APP CPU */
DPORT_WRITE_PERI_REG(DPORT_APP_TRACEMEM_ENA_REG, DPORT_APP_TRACEMEM_ENA_M);
#endif
#endif
}
/*****************************************************************************************/
/***************************** Apptrace HW iface *****************************************/
/*****************************************************************************************/
static esp_err_t esp_apptrace_trax_init(void *hw_data, const esp_apptrace_config_t *config)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
// 'esp_apptrace_trax_init()' is called on every core, so ensure to do main initialization only once
int core_id = esp_cpu_get_core_id();
if (core_id == 0) {
esp_apptrace_mem_block_t mem_blocks_cfg[2] = {
{
.start = s_trax_blocks[0],
.sz = ESP_APPTRACE_TRAX_BLOCK_SIZE
},
{
.start = s_trax_blocks[1],
.sz = ESP_APPTRACE_TRAX_BLOCK_SIZE
},
};
trax_data->membufs.header_size = ESP_APPTRACE_HEADER_SIZE_32;
esp_err_t res = esp_apptrace_membufs_init(&trax_data->membufs, mem_blocks_cfg);
if (res != ESP_OK) {
ESP_APPTRACE_LOGE("Failed to init membufs proto (%d)!", res);
return res;
}
#if CONFIG_APPTRACE_LOCK_ENABLE
esp_apptrace_lock_init(&trax_data->lock);
#endif
esp_apptrace_trax_memory_enable();
esp_apptrace_trax_select_memory_block(0);
}
// init TRAX on this CPU
esp_apptrace_trax_hw_init();
trax_data->inited |= 1 << core_id;
return ESP_OK;
}
static uint8_t *esp_apptrace_trax_up_buffer_get(void *hw_data, uint32_t size, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_trax_lock(trax_data, tmo);
if (res != ESP_OK) {
return NULL;
}
uint8_t *ptr = esp_apptrace_membufs_up_buffer_get(&trax_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_trax_unlock(trax_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_trax_up_buffer_put(void *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_up_buffer_put() just modifies buffer's header
esp_err_t res = esp_apptrace_membufs_up_buffer_put(&trax_data->membufs, ptr, tmo);
return res;
}
static void esp_apptrace_trax_down_buffer_config(void *hw_data, uint8_t *buf, uint32_t size)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return;
}
esp_apptrace_membufs_down_buffer_config(&trax_data->membufs, buf, size);
}
static uint8_t *esp_apptrace_trax_down_buffer_get(void *hw_data, uint32_t *size, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return NULL;
}
esp_err_t res = esp_apptrace_trax_lock(trax_data, tmo);
if (res != ESP_OK) {
return NULL;
}
uint8_t *ptr = esp_apptrace_membufs_down_buffer_get(&trax_data->membufs, size, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_trax_unlock(trax_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return ptr;
}
static esp_err_t esp_apptrace_trax_down_buffer_put(void *hw_data, uint8_t *ptr, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return ESP_ERR_INVALID_STATE;
}
// Can avoid locking because esp_apptrace_membufs_down_buffer_put() does nothing
/*esp_err_t res = esp_apptrace_trax_lock(hw_data, tmo);
if (res != ESP_OK) {
return res;
}*/
esp_err_t res = esp_apptrace_membufs_down_buffer_put(&trax_data->membufs, ptr, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
/*if (esp_apptrace_trax_unlock(hw_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}*/
return res;
}
static bool esp_apptrace_trax_host_is_connected(void *hw_data)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return false;
}
return eri_read(ESP_APPTRACE_TRAX_CTRL_REG) & ESP_APPTRACE_TRAX_HOST_CONNECT ? true : false;
}
static esp_err_t esp_apptrace_trax_flush_nolock(void *hw_data, uint32_t min_sz, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return ESP_ERR_INVALID_STATE;
}
return esp_apptrace_membufs_flush_nolock(&trax_data->membufs, min_sz, tmo);
}
static esp_err_t esp_apptrace_trax_flush(void *hw_data, esp_apptrace_tmo_t *tmo)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
if (!ESP_APPTRACE_TRAX_INITED(trax_data)) {
return ESP_ERR_INVALID_STATE;
}
esp_err_t res = esp_apptrace_trax_lock(trax_data, tmo);
if (res != ESP_OK) {
return res;
}
res = esp_apptrace_membufs_flush_nolock(&trax_data->membufs, 0, tmo);
// now we can safely unlock apptrace to allow other tasks/ISRs to get other buffers and write their data
if (esp_apptrace_trax_unlock(trax_data) != ESP_OK) {
assert(false && "Failed to unlock apptrace data!");
}
return res;
}
/*****************************************************************************************/
/************************** Membufs proto HW iface ***************************************/
/*****************************************************************************************/
static inline void esp_apptrace_trax_buffer_swap_lock(void)
{
extern uint32_t __esp_apptrace_trax_eri_updated;
// indicate to host that we are about to update.
// this is used only to place CPU into streaming mode at tracing startup
// before starting streaming host can halt us after we read ESP_APPTRACE_TRAX_CTRL_REG and before we updated it
// HACK: in this case host will set breakpoint just after ESP_APPTRACE_TRAX_CTRL_REG update,
// here we set address to set bp at
// enter ERI update critical section
eri_write(ESP_APPTRACE_TRAX_STAT_REG, (uint32_t)&__esp_apptrace_trax_eri_updated);
}
static __attribute__((noinline)) void esp_apptrace_trax_buffer_swap_unlock(void)
{
// exit ERI update critical section
eri_write(ESP_APPTRACE_TRAX_STAT_REG, 0x0);
// TODO: currently host sets breakpoint, use break instruction to stop;
// it will allow to use ESP_APPTRACE_TRAX_STAT_REG for other purposes
asm volatile(
" .global __esp_apptrace_trax_eri_updated\n"
"__esp_apptrace_trax_eri_updated:\n"); // host will set bp here to resolve collision at streaming start
}
static esp_err_t esp_apptrace_trax_buffer_swap_start(uint32_t curr_block_id)
{
esp_err_t res = ESP_OK;
esp_apptrace_trax_buffer_swap_lock();
uint32_t ctrl_reg = eri_read(ESP_APPTRACE_TRAX_CTRL_REG);
uint32_t host_connected = ESP_APPTRACE_TRAX_HOST_CONNECT & ctrl_reg;
if (host_connected) {
uint32_t acked_block = ESP_APPTRACE_TRAX_BLOCK_ID_GET(ctrl_reg);
uint32_t host_to_read = ESP_APPTRACE_TRAX_BLOCK_LEN_GET(ctrl_reg);
if (host_to_read != 0 || acked_block != (curr_block_id & ESP_APPTRACE_TRAX_BLOCK_ID_MSK)) {
ESP_APPTRACE_LOGD("HC[%d]: Can not switch %" PRIx32 " %" PRIu32 " %" PRIx32 " %" PRIx32 "/%" PRIx32,
esp_cpu_get_core_id(), ctrl_reg, host_to_read, acked_block,
curr_block_id & ESP_APPTRACE_TRAX_BLOCK_ID_MSK, curr_block_id);
res = ESP_ERR_NO_MEM;
goto _on_err;
}
}
return ESP_OK;
_on_err:
esp_apptrace_trax_buffer_swap_unlock();
return res;
}
static esp_err_t esp_apptrace_trax_buffer_swap_end(uint32_t new_block_id, uint32_t prev_block_len)
{
uint32_t ctrl_reg = eri_read(ESP_APPTRACE_TRAX_CTRL_REG);
uint32_t host_connected = ESP_APPTRACE_TRAX_HOST_CONNECT & ctrl_reg;
eri_write(ESP_APPTRACE_TRAX_CTRL_REG, ESP_APPTRACE_TRAX_BLOCK_ID(new_block_id) |
host_connected | ESP_APPTRACE_TRAX_BLOCK_LEN(prev_block_len));
esp_apptrace_trax_buffer_swap_unlock();
return ESP_OK;
}
static esp_err_t esp_apptrace_trax_buffer_swap(uint32_t new_block_id, uint32_t prev_block_len)
{
/* Before switching to the new block, calculate CRC16 of the current block */
if (prev_block_len > 0) {
const uint8_t *prev_block_start = s_trax_blocks[!((new_block_id % 2))];
uint16_t crc16 = esp_rom_crc16_le(0, prev_block_start, prev_block_len);
eri_write(ESP_APPTRACE_TRAX_CRC16_REG, crc16 | ESP_APPTRACE_CRC_INDICATOR);
ESP_APPTRACE_LOGD("CRC16:%x %d @%x", crc16, prev_block_len, prev_block_start);
}
esp_apptrace_trax_select_memory_block(new_block_id);
return ESP_OK;
}
static bool esp_apptrace_trax_host_data_pending(void)
{
uint32_t ctrl_reg = eri_read(ESP_APPTRACE_TRAX_CTRL_REG);
return (ctrl_reg & ESP_APPTRACE_TRAX_HOST_DATA) ? true : false;
}
static void esp_apptrace_trax_set_header_size(void *hw_data, esp_apptrace_header_size_t header_size)
{
esp_apptrace_trax_data_t *trax_data = hw_data;
trax_data->membufs.header_size = header_size;
}
esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data)
{
static esp_apptrace_membufs_proto_hw_t s_trax_proto_hw = {
.swap_start = esp_apptrace_trax_buffer_swap_start,
.swap = esp_apptrace_trax_buffer_swap,
.swap_end = esp_apptrace_trax_buffer_swap_end,
.host_data_pending = esp_apptrace_trax_host_data_pending,
};
static esp_apptrace_trax_data_t s_trax_hw_data = {
.membufs = {
.hw = &s_trax_proto_hw,
},
};
static esp_apptrace_hw_t s_trax_hw = {
.init = esp_apptrace_trax_init,
.get_up_buffer = esp_apptrace_trax_up_buffer_get,
.put_up_buffer = esp_apptrace_trax_up_buffer_put,
.flush_up_buffer_nolock = esp_apptrace_trax_flush_nolock,
.flush_up_buffer = esp_apptrace_trax_flush,
.down_buffer_config = esp_apptrace_trax_down_buffer_config,
.get_down_buffer = esp_apptrace_trax_down_buffer_get,
.put_down_buffer = esp_apptrace_trax_down_buffer_put,
.host_is_connected = esp_apptrace_trax_host_is_connected,
.set_header_size = esp_apptrace_trax_set_header_size,
};
*data = &s_trax_hw_data;
return &s_trax_hw;
}

View File

@@ -0,0 +1,69 @@
/*
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ESP_DBG_STUBS_H_
#define ESP_DBG_STUBS_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_err.h"
/**
* Debug stubs entries IDs
*/
typedef enum {
ESP_DBG_STUB_MAGIC_NUM,
ESP_DBG_STUB_TABLE_SIZE,
ESP_DBG_STUB_CONTROL_DATA, ///< stubs descriptor entry
ESP_DBG_STUB_ENTRY_FIRST,
ESP_DBG_STUB_ENTRY_GCOV ///< GCOV entry
= ESP_DBG_STUB_ENTRY_FIRST,
ESP_DBG_STUB_ENTRY_CAPABILITIES,
ESP_DBG_STUB_ENTRY_MAX
} esp_dbg_stub_id_t;
#define ESP_DBG_STUB_MAGIC_NUM_VAL 0xFEEDBEEF
#define ESP_DBG_STUB_CAP_GCOV_TASK (1 << 0)
/**
* @brief Initializes debug stubs.
*
* @note Must be called after esp_apptrace_init() if app tracing is enabled.
*/
void esp_dbg_stubs_init(void);
/**
* @brief Initializes application tracing module.
*
* @note Should be called before any esp_apptrace_xxx call.
*
* @param id Stub ID.
* @param entry Stub entry. Usually it is stub entry function address,
* but can be any value meaningfull for OpenOCD command/code
* such as capabilities
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_dbg_stub_entry_set(esp_dbg_stub_id_t id, uint32_t entry);
/**
* @brief Retrives the corresponding stub entry
*
* @param id Stub ID.
* @param entry Stub entry. Usually it is stub entry function address,
* but can be any value meaningfull for OpenOCD command/code
* such as capabilities
*
* @return ESP_OK on success, otherwise see esp_err_t
*/
esp_err_t esp_dbg_stub_entry_get(esp_dbg_stub_id_t id, uint32_t *entry);
#ifdef __cplusplus
}
#endif
#endif // ESP_DBG_STUBS_H_

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -29,7 +29,7 @@ typedef struct {
typedef struct {
esp_err_t (*swap_start)(uint32_t curr_block_id);
esp_err_t (*swap)(uint32_t new_block_id, uint32_t prev_block_len);
esp_err_t (*swap)(uint32_t new_block_id);
esp_err_t (*swap_end)(uint32_t new_block_id, uint32_t prev_block_len);
bool (*host_data_pending)(void);
} esp_apptrace_membufs_proto_hw_t;
@@ -38,9 +38,14 @@ typedef struct {
esp_apptrace_membufs_proto_hw_t * hw;
volatile esp_apptrace_membufs_state_t state; // state
esp_apptrace_mem_block_t blocks[2]; // memory blocks
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
// ring buffer control struct for pending user blocks
esp_apptrace_rb_t rb_pend;
// storage for pending user blocks
uint8_t pending_data[CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX + 1];
#endif
// ring buffer control struct for data from host (down buffer)
esp_apptrace_rb_t rb_down;
int header_size; ///< Size of the trace header (2 or 4 bytes)
} esp_apptrace_membufs_proto_data_t;
esp_err_t esp_apptrace_membufs_init(esp_apptrace_membufs_proto_data_t *proto, const esp_apptrace_mem_block_t blocks_cfg[2]);

View File

@@ -0,0 +1,41 @@
# idf_create_lcov_report
#
# Create coverage report.
function(idf_create_coverage_report report_dir)
set(gcov_tool ${_CMAKE_TOOLCHAIN_PREFIX}gcov)
idf_build_get_property(project_name PROJECT_NAME)
file(TO_NATIVE_PATH "${report_dir}" _report_dir)
file(TO_NATIVE_PATH "${project_dir}" _project_dir)
file(TO_NATIVE_PATH "${report_dir}/html/index.html" _index_path)
add_custom_target(pre-cov-report
COMMENT "Generating coverage report in: ${_report_dir}"
COMMAND ${CMAKE_COMMAND} -E echo "Using gcov: ${gcov_tool}"
COMMAND ${CMAKE_COMMAND} -E make_directory ${_report_dir}/html
)
add_custom_target(lcov-report
COMMENT "WARNING: lcov-report is deprecated. Please use gcovr-report instead."
COMMAND lcov --gcov-tool ${gcov_tool} -c -d ${CMAKE_CURRENT_BINARY_DIR} -o ${_report_dir}/${project_name}.info
COMMAND genhtml -o ${_report_dir}/html ${_report_dir}/${project_name}.info
DEPENDS pre-cov-report
)
add_custom_target(gcovr-report
COMMAND gcovr -r ${_project_dir} --gcov-executable ${gcov_tool} -s --html-details ${_index_path}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS pre-cov-report
)
endfunction()
# idf_clean_coverage_report
#
# Clean coverage report.
function(idf_clean_coverage_report report_dir)
file(TO_CMAKE_PATH "${report_dir}" _report_dir)
add_custom_target(cov-data-clean
COMMENT "Clean coverage report in: ${_report_dir}"
COMMAND ${CMAKE_COMMAND} -E remove_directory ${_report_dir})
endfunction()

View File

@@ -2,11 +2,31 @@
# CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION
CONFIG_ESP32_APPTRACE_DESTINATION CONFIG_APPTRACE_DESTINATION
CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE
CONFIG_ESP32_APPTRACE_DEST_TRAX CONFIG_APPTRACE_DEST_JTAG
CONFIG_ESP32_APPTRACE_ENABLE CONFIG_ESP_TRACE_TRANSPORT_APPTRACE
CONFIG_ESP32_APPTRACE_ENABLE CONFIG_APPTRACE_ENABLE
CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE
CONFIG_ESP32_APPTRACE_ONPANIC_HOST_FLUSH_TMO CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO
CONFIG_ESP32_APPTRACE_POSTMORTEM_FLUSH_TRAX_THRESH CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH
CONFIG_ESP32_APPTRACE_PENDING_DATA_SIZE_MAX CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX
CONFIG_ESP32_GCOV_ENABLE CONFIG_APPTRACE_GCOV_ENABLE
CONFIG_SYSVIEW_TS_SOURCE_CCOUNT CONFIG_ESP_TRACE_TS_SOURCE_CCOUNT
CONFIG_SYSVIEW_TS_SOURCE_ESP_TIMER CONFIG_ESP_TRACE_TS_SOURCE_ESP_TIMER
CONFIG_SYSVIEW_ENABLE CONFIG_APPTRACE_SV_ENABLE
CONFIG_SYSVIEW_TS_SOURCE CONFIG_APPTRACE_SV_TS_SOURCE
CONFIG_SYSVIEW_TS_SOURCE_CCOUNT CONFIG_APPTRACE_SV_TS_SOURCE_CCOUNT
CONFIG_SYSVIEW_TS_SOURCE_ESP_TIMER CONFIG_APPTRACE_SV_TS_SOURCE_ESP_TIMER
CONFIG_SYSVIEW_MAX_TASKS CONFIG_APPTRACE_SV_MAX_TASKS
CONFIG_SYSVIEW_BUF_WAIT_TMO CONFIG_APPTRACE_SV_BUF_WAIT_TMO
CONFIG_SYSVIEW_EVT_OVERFLOW_ENABLE CONFIG_APPTRACE_SV_EVT_OVERFLOW_ENABLE
CONFIG_SYSVIEW_EVT_ISR_ENTER_ENABLE CONFIG_APPTRACE_SV_EVT_ISR_ENTER_ENABLE
CONFIG_SYSVIEW_EVT_ISR_EXIT_ENABLE CONFIG_APPTRACE_SV_EVT_ISR_EXIT_ENABLE
CONFIG_SYSVIEW_EVT_ISR_TO_SCHEDULER_ENABLE CONFIG_APPTRACE_SV_EVT_ISR_TO_SCHED_ENABLE
CONFIG_SYSVIEW_EVT_TASK_START_EXEC_ENABLE CONFIG_APPTRACE_SV_EVT_TASK_START_EXEC_ENABLE
CONFIG_SYSVIEW_EVT_TASK_STOP_EXEC_ENABLE CONFIG_APPTRACE_SV_EVT_TASK_STOP_EXEC_ENABLE
CONFIG_SYSVIEW_EVT_TASK_START_READY_ENABLE CONFIG_APPTRACE_SV_EVT_TASK_START_READY_ENABLE
CONFIG_SYSVIEW_EVT_TASK_STOP_READY_ENABLE CONFIG_APPTRACE_SV_EVT_TASK_STOP_READY_ENABLE
CONFIG_SYSVIEW_EVT_TASK_CREATE_ENABLE CONFIG_APPTRACE_SV_EVT_TASK_CREATE_ENABLE
CONFIG_SYSVIEW_EVT_TASK_TERMINATE_ENABLE CONFIG_APPTRACE_SV_EVT_TASK_TERMINATE_ENABLE
CONFIG_SYSVIEW_EVT_IDLE_ENABLE CONFIG_APPTRACE_SV_EVT_IDLE_ENABLE
CONFIG_SYSVIEW_EVT_TIMER_ENTER_ENABLE CONFIG_APPTRACE_SV_EVT_TIMER_ENTER_ENABLE
CONFIG_SYSVIEW_EVT_TIMER_EXIT_ENABLE CONFIG_APPTRACE_SV_EVT_TIMER_EXIT_ENABLE

View File

@@ -0,0 +1,118 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
----------------------------------------------------------------------
File : Global.h
Purpose : Global types
In case your application already has a Global.h, you should
merge the files. In order to use Segger code, the types
U8, U16, U32, I8, I16, I32 need to be defined in Global.h;
additional definitions do not hurt.
Revision: $Rev: 12501 $
---------------------------END-OF-HEADER------------------------------
*/
#ifndef GLOBAL_H // Guard against multiple inclusion
#define GLOBAL_H
#define U8 unsigned char
#define I8 signed char
#define U16 unsigned short
#define I16 signed short
#ifdef __x86_64__
#define U32 unsigned
#define I32 int
#else
#define U32 unsigned long
#define I32 signed long
#endif
//
// CC_NO_LONG_SUPPORT can be defined to compile test
// without long support for compilers that do not
// support C99 and its long type.
//
#ifdef CC_NO_LONG_SUPPORT
#define PTR_ADDR U32
#else // Supports long type.
#if defined(_WIN32) && !defined(__clang__) && !defined(__MINGW32__)
//
// Microsoft VC6 compiler related
//
#define U64 unsigned __int64
#define U128 unsigned __int128
#define I64 __int64
#define I128 __int128
#if _MSC_VER <= 1200
#define U64_C(x) x##UI64
#else
#define U64_C(x) x##ULL
#endif
#else
//
// C99 compliant compiler
//
#define U64 unsigned long long
#define I64 signed long long
#define U64_C(x) x##ULL
#endif
#if (defined(_WIN64) || defined(__LP64__)) // 64-bit symbols used by Visual Studio and GCC, maybe others as well.
#define PTR_ADDR U64
#else
#define PTR_ADDR U32
#endif
#endif // Supports long type.
#endif // Avoid multiple inclusion
/*************************** End of file ****************************/

View File

@@ -0,0 +1,433 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
---------------------------END-OF-HEADER------------------------------
File : SEGGER_RTT_Conf.h
Purpose : Implementation of SEGGER real-time transfer (RTT) which
allows real-time communication on targets which support
debugger memory accesses while the CPU is running.
Revision: $Rev: 24316 $
*/
#ifndef SEGGER_RTT_CONF_H
#define SEGGER_RTT_CONF_H
#ifdef __IAR_SYSTEMS_ICC__
#include <intrinsics.h>
#endif
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
//
// Take in and set to correct values for Cortex-A systems with CPU cache
//
//#define SEGGER_RTT_CPU_CACHE_LINE_SIZE (32) // Largest cache line size (in bytes) in the current system
//#define SEGGER_RTT_UNCACHED_OFF (0xFB000000) // Address alias where RTT CB and buffers can be accessed uncached
//
// Most common case:
// Up-channel 0: RTT
// Up-channel 1: SystemView
//
#ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS
#define SEGGER_RTT_MAX_NUM_UP_BUFFERS (3) // Max. number of up-buffers (T->H) available on this target (Default: 3)
#endif
//
// Most common case:
// Down-channel 0: RTT
// Down-channel 1: SystemView
//
#ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS
#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (3) // Max. number of down-buffers (H->T) available on this target (Default: 3)
#endif
#ifndef BUFFER_SIZE_UP
#define BUFFER_SIZE_UP (1024) // Size of the buffer for terminal output of target, up to host (Default: 1k)
#endif
#ifndef BUFFER_SIZE_DOWN
#define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16)
#endif
#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE
#define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64)
#endif
#ifndef SEGGER_RTT_MODE_DEFAULT
#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0)
#endif
/*********************************************************************
*
* RTT memcpy configuration
*
* memcpy() is good for large amounts of data,
* but the overhead is big for small amounts, which are usually stored via RTT.
* With SEGGER_RTT_MEMCPY_USE_BYTELOOP a simple byte loop can be used instead.
*
* SEGGER_RTT_MEMCPY() can be used to replace standard memcpy() in RTT functions.
* This is may be required with memory access restrictions,
* such as on Cortex-A devices with MMU.
*/
#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP
#define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop
#endif
//
// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets
//
//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__))
// #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) SEGGER_memcpy((pDest), (pSrc), (NumBytes))
//#endif
//
// Target is not allowed to perform other RTT operations while string still has not been stored completely.
// Otherwise we would probably end up with a mixed string in the buffer.
// If using RTT from within interrupts, multiple tasks or multi processors, define the SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK() function here.
//
// SEGGER_RTT_MAX_INTERRUPT_PRIORITY can be used in the sample lock routines on Cortex-M3/4.
// Make sure to mask all interrupts which can send RTT data, i.e. generate SystemView events, or cause task switches.
// When high-priority interrupts must not be masked while sending RTT data, SEGGER_RTT_MAX_INTERRUPT_PRIORITY needs to be adjusted accordingly.
// (Higher priority = lower priority number)
// Default value for embOS: 128u
// Default configuration in FreeRTOS: configMAX_SYSCALL_INTERRUPT_PRIORITY: ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
// In case of doubt mask all interrupts: 1 << (8 - BASEPRI_PRIO_BITS) i.e. 1 << 5 when 3 bits are implemented in NVIC
// or define SEGGER_RTT_LOCK() to completely disable interrupts.
//
#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY
#define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) // Interrupt priority to lock on SEGGER_RTT_LOCK on Cortex-M3/4 (Default: 0x20)
#endif
/*********************************************************************
*
* RTT lock configuration for SEGGER Embedded Studio,
* Rowley CrossStudio and GCC
*/
#if ((defined(__SES_ARM) || defined(__SES_RISCV) || defined(__CROSSWORKS_ARM) || defined(__GNUC__) || defined(__clang__)) && !defined (__CC_ARM) && !defined(WIN32))
#if (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__))
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
__asm volatile ("mrs %0, primask \n\t" \
"movs r1, #1 \n\t" \
"msr primask, r1 \n\t" \
: "=r" (_SEGGER_RTT__LockState) \
: \
: "r1", "cc" \
);
#define SEGGER_RTT_UNLOCK() __asm volatile ("msr primask, %0 \n\t" \
: \
: "r" (_SEGGER_RTT__LockState) \
: \
); \
}
#elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__))
#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY
#define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20)
#endif
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
__asm volatile ("mrs %0, basepri \n\t" \
"mov r1, %1 \n\t" \
"msr basepri, r1 \n\t" \
: "=r" (_SEGGER_RTT__LockState) \
: "i"(SEGGER_RTT_MAX_INTERRUPT_PRIORITY) \
: "r1", "cc" \
);
#define SEGGER_RTT_UNLOCK() __asm volatile ("msr basepri, %0 \n\t" \
: \
: "r" (_SEGGER_RTT__LockState) \
: \
); \
}
#elif (defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__))
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
__asm volatile ("mrs r1, CPSR \n\t" \
"mov %0, r1 \n\t" \
"orr r1, r1, #0xC0 \n\t" \
"msr CPSR_c, r1 \n\t" \
: "=r" (_SEGGER_RTT__LockState) \
: \
: "r1", "cc" \
);
#define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \
"mrs r1, CPSR \n\t" \
"bic r1, r1, #0xC0 \n\t" \
"and r0, r0, #0xC0 \n\t" \
"orr r1, r1, r0 \n\t" \
"msr CPSR_c, r1 \n\t" \
: \
: "r" (_SEGGER_RTT__LockState) \
: "r0", "r1", "cc" \
); \
}
#elif defined(__riscv) || defined(__riscv_xlen)
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
__asm volatile ("csrr %0, mstatus \n\t" \
"csrci mstatus, 8 \n\t" \
"andi %0, %0, 8 \n\t" \
: "=r" (_SEGGER_RTT__LockState) \
: \
: \
);
#define SEGGER_RTT_UNLOCK() __asm volatile ("csrr a1, mstatus \n\t" \
"or %0, %0, a1 \n\t" \
"csrs mstatus, %0 \n\t" \
: \
: "r" (_SEGGER_RTT__LockState) \
: "a1" \
); \
}
#else
#define SEGGER_RTT_LOCK()
#define SEGGER_RTT_UNLOCK()
#endif
#endif
/*********************************************************************
*
* RTT lock configuration for IAR EWARM
*/
#ifdef __ICCARM__
#if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) || \
(defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__))
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
_SEGGER_RTT__LockState = __get_PRIMASK(); \
__set_PRIMASK(1);
#define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \
}
#elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) || \
(defined (__ARM7M__) && (__CORE__ == __ARM7M__)) || \
(defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) || \
(defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__))
#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY
#define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20)
#endif
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
_SEGGER_RTT__LockState = __get_BASEPRI(); \
__set_BASEPRI(SEGGER_RTT_MAX_INTERRUPT_PRIORITY);
#define SEGGER_RTT_UNLOCK() __set_BASEPRI(_SEGGER_RTT__LockState); \
}
#elif (defined (__ARM7A__) && (__CORE__ == __ARM7A__)) || \
(defined (__ARM7R__) && (__CORE__ == __ARM7R__))
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
__asm volatile ("mrs r1, CPSR \n\t" \
"mov %0, r1 \n\t" \
"orr r1, r1, #0xC0 \n\t" \
"msr CPSR_c, r1 \n\t" \
: "=r" (_SEGGER_RTT__LockState) \
: \
: "r1", "cc" \
);
#define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \
"mrs r1, CPSR \n\t" \
"bic r1, r1, #0xC0 \n\t" \
"and r0, r0, #0xC0 \n\t" \
"orr r1, r1, r0 \n\t" \
"msr CPSR_c, r1 \n\t" \
: \
: "r" (_SEGGER_RTT__LockState) \
: "r0", "r1", "cc" \
); \
}
#endif
#endif
/*********************************************************************
*
* RTT lock configuration for IAR RX
*/
#ifdef __ICCRX__
#define SEGGER_RTT_LOCK() { \
unsigned long _SEGGER_RTT__LockState; \
_SEGGER_RTT__LockState = __get_interrupt_state(); \
__disable_interrupt();
#define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \
}
#endif
/*********************************************************************
*
* RTT lock configuration for IAR RL78
*/
#ifdef __ICCRL78__
#define SEGGER_RTT_LOCK() { \
__istate_t _SEGGER_RTT__LockState; \
_SEGGER_RTT__LockState = __get_interrupt_state(); \
__disable_interrupt();
#define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \
}
#endif
/*********************************************************************
*
* RTT lock configuration for KEIL ARM
*/
#ifdef __CC_ARM
#if (defined __TARGET_ARCH_6S_M)
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
register unsigned char _SEGGER_RTT__PRIMASK __asm( "primask"); \
_SEGGER_RTT__LockState = _SEGGER_RTT__PRIMASK; \
_SEGGER_RTT__PRIMASK = 1u; \
__schedule_barrier();
#define SEGGER_RTT_UNLOCK() _SEGGER_RTT__PRIMASK = _SEGGER_RTT__LockState; \
__schedule_barrier(); \
}
#elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY
#define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20)
#endif
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
register unsigned char BASEPRI __asm( "basepri"); \
_SEGGER_RTT__LockState = BASEPRI; \
BASEPRI = SEGGER_RTT_MAX_INTERRUPT_PRIORITY; \
__schedule_barrier();
#define SEGGER_RTT_UNLOCK() BASEPRI = _SEGGER_RTT__LockState; \
__schedule_barrier(); \
}
#endif
#endif
/*********************************************************************
*
* RTT lock configuration for TI ARM
*/
#ifdef __TI_ARM__
#if defined (__TI_ARM_V6M0__)
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
_SEGGER_RTT__LockState = __get_PRIMASK(); \
__set_PRIMASK(1);
#define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \
}
#elif (defined (__TI_ARM_V7M3__) || defined (__TI_ARM_V7M4__))
#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY
#define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20)
#endif
#define SEGGER_RTT_LOCK() { \
unsigned int _SEGGER_RTT__LockState; \
_SEGGER_RTT__LockState = _set_interrupt_priority(SEGGER_RTT_MAX_INTERRUPT_PRIORITY);
#define SEGGER_RTT_UNLOCK() _set_interrupt_priority(_SEGGER_RTT__LockState); \
}
#endif
#endif
/*********************************************************************
*
* RTT lock configuration for CCRX
*/
#ifdef __RX
#include <machine.h>
#define SEGGER_RTT_LOCK() { \
unsigned long _SEGGER_RTT__LockState; \
_SEGGER_RTT__LockState = get_psw() & 0x010000; \
clrpsw_i();
#define SEGGER_RTT_UNLOCK() set_psw(get_psw() | _SEGGER_RTT__LockState); \
}
#endif
/*********************************************************************
*
* RTT lock configuration for embOS Simulation on Windows
* (Can also be used for generic RTT locking with embOS)
*/
#if defined(WIN32) || defined(SEGGER_RTT_LOCK_EMBOS)
void OS_SIM_EnterCriticalSection(void);
void OS_SIM_LeaveCriticalSection(void);
#define SEGGER_RTT_LOCK() { \
OS_SIM_EnterCriticalSection();
#define SEGGER_RTT_UNLOCK() OS_SIM_LeaveCriticalSection(); \
}
#endif
/*********************************************************************
*
* RTT lock configuration fallback
*/
#ifndef SEGGER_RTT_LOCK
#define SEGGER_RTT_LOCK() // Lock RTT (nestable) (i.e. disable interrupts)
#endif
#ifndef SEGGER_RTT_UNLOCK
#define SEGGER_RTT_UNLOCK() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state)
#endif
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,90 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_Conf.h
Purpose : SEGGER SystemView configuration file.
Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here.
Revision: $Rev: 21292 $
Additional information:
Required defines which must be set are:
SEGGER_SYSVIEW_GET_TIMESTAMP
SEGGER_SYSVIEW_GET_INTERRUPT_ID
For known compilers and cores, these might be set to good defaults
in SEGGER_SYSVIEW_ConfDefaults.h.
SystemView needs a (nestable) locking mechanism.
If not defined, the RTT locking mechanism is used,
which then needs to be properly configured.
*/
#ifndef SEGGER_SYSVIEW_CONF_H
#define SEGGER_SYSVIEW_CONF_H
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
/*********************************************************************
* TODO: Add your defines here. *
**********************************************************************
*/
#endif // SEGGER_SYSVIEW_CONF_H
/*************************** End of file ****************************/

View File

@@ -0,0 +1,255 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
----------------------------------------------------------------------
File : SEGGER.h
Purpose : Global types etc & general purpose utility functions
Revision: $Rev: 18102 $
---------------------------END-OF-HEADER------------------------------
*/
#ifndef SEGGER_H // Guard against multiple inclusion
#define SEGGER_H
#include <stdarg.h> // For va_list.
#include "Global.h" // Type definitions: U8, U16, U32, I8, I16, I32
#if defined(__cplusplus)
extern "C" { /* Make sure we have C-declarations in C++ programs */
#endif
/*********************************************************************
*
* Keywords/specifiers
*
**********************************************************************
*/
#ifndef INLINE
#if (defined(__ICCARM__) || defined(__RX) || defined(__ICCRX__))
//
// Other known compilers.
//
#define INLINE inline
#else
#if (defined(_WIN32) && !defined(__clang__))
//
// Microsoft VC6 and newer.
// Force inlining without cost checking.
//
#define INLINE __forceinline
#elif defined(__GNUC__) || defined(__clang__)
//
// Force inlining with GCC + clang
//
#define INLINE inline __attribute__((always_inline))
#elif (defined(__CC_ARM))
//
// Force inlining with ARMCC (Keil)
//
#define INLINE __inline
#else
//
// Unknown compilers.
//
#define INLINE
#endif
#endif
#endif
/*********************************************************************
*
* Function-like macros
*
**********************************************************************
*/
#define SEGGER_COUNTOF(a) (sizeof((a))/sizeof((a)[0]))
#define SEGGER_MIN(a,b) (((a) < (b)) ? (a) : (b))
#define SEGGER_MAX(a,b) (((a) > (b)) ? (a) : (b))
#ifndef SEGGER_USE_PARA // Some compiler complain about unused parameters.
#define SEGGER_USE_PARA(Para) (void)Para // This works for most compilers.
#endif
#define SEGGER_ADDR2PTR(Type, Addr) (/*lint -e(923) -e(9078)*/((Type*)((PTR_ADDR)(Addr)))) // Allow cast from address to pointer.
#define SEGGER_PTR2ADDR(p) (/*lint -e(923) -e(9078)*/((PTR_ADDR)(p))) // Allow cast from pointer to address.
#define SEGGER_PTR2PTR(Type, p) (/*lint -e(740) -e(826) -e(9079) -e(9087)*/((Type*)(p))) // Allow cast from one pointer type to another (ignore different size).
#define SEGGER_PTR_DISTANCE(p0, p1) (SEGGER_PTR2ADDR(p0) - SEGGER_PTR2ADDR(p1))
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
#define SEGGER_PRINTF_FLAG_ADJLEFT (1 << 0)
#define SEGGER_PRINTF_FLAG_SIGNFORCE (1 << 1)
#define SEGGER_PRINTF_FLAG_SIGNSPACE (1 << 2)
#define SEGGER_PRINTF_FLAG_PRECEED (1 << 3)
#define SEGGER_PRINTF_FLAG_ZEROPAD (1 << 4)
#define SEGGER_PRINTF_FLAG_NEGATIVE (1 << 5)
/*********************************************************************
*
* Types
*
**********************************************************************
*/
typedef struct {
char* pBuffer;
int BufferSize;
int Cnt;
} SEGGER_BUFFER_DESC;
typedef struct {
unsigned int CacheLineSize; // 0: No Cache. Most Systems such as ARM9 use a 32 bytes cache line size.
void (*pfDMB) (void); // Optional DMB function for Data Memory Barrier to make sure all memory operations are completed.
void (*pfClean) (void *p, unsigned long NumBytes); // Optional clean function for cached memory.
void (*pfInvalidate)(void *p, unsigned long NumBytes); // Optional invalidate function for cached memory.
} SEGGER_CACHE_CONFIG;
typedef struct SEGGER_SNPRINTF_CONTEXT_struct SEGGER_SNPRINTF_CONTEXT;
struct SEGGER_SNPRINTF_CONTEXT_struct {
void* pContext; // Application specific context.
SEGGER_BUFFER_DESC* pBufferDesc; // Buffer descriptor to use for output.
void (*pfFlush)(SEGGER_SNPRINTF_CONTEXT* pContext); // Callback executed once the buffer is full. Callback decides if the buffer gets cleared to store more or not.
};
typedef struct {
void (*pfStoreChar) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, char c);
int (*pfPrintUnsigned) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, U32 v, unsigned Base, char Flags, int Width, int Precision);
int (*pfPrintInt) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, I32 v, unsigned Base, char Flags, int Width, int Precision);
} SEGGER_PRINTF_API;
typedef void (*SEGGER_pFormatter)(SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, const SEGGER_PRINTF_API* pApi, va_list* pParamList, char Lead, int Width, int Precision);
typedef struct SEGGER_PRINTF_FORMATTER {
struct SEGGER_PRINTF_FORMATTER* pNext; // Pointer to next formatter.
SEGGER_pFormatter pfFormatter; // Formatter function.
char Specifier; // Format specifier.
} SEGGER_PRINTF_FORMATTER;
typedef struct {
U32 (*pfGetHPTimestamp)(void); // Mandatory, pfGetHPTimestamp
int (*pfGetUID) (U8 abUID[16]); // Optional, pfGetUID
} SEGGER_BSP_API;
/*********************************************************************
*
* Utility functions
*
**********************************************************************
*/
//
// Memory operations.
//
void SEGGER_ARM_memcpy(void* pDest, const void* pSrc, int NumBytes);
void SEGGER_memcpy (void* pDest, const void* pSrc, unsigned NumBytes);
void SEGGER_memxor (void* pDest, const void* pSrc, unsigned NumBytes);
//
// String functions.
//
int SEGGER_atoi (const char* s);
int SEGGER_isalnum (int c);
int SEGGER_isalpha (int c);
unsigned SEGGER_strlen (const char* s);
int SEGGER_tolower (int c);
int SEGGER_strcasecmp (const char* sText1, const char* sText2);
int SEGGER_strncasecmp(const char *sText1, const char *sText2, unsigned Count);
//
// Buffer/printf related.
//
void SEGGER_StoreChar (SEGGER_BUFFER_DESC* pBufferDesc, char c);
void SEGGER_PrintUnsigned(SEGGER_BUFFER_DESC* pBufferDesc, U32 v, unsigned Base, int Precision);
void SEGGER_PrintInt (SEGGER_BUFFER_DESC* pBufferDesc, I32 v, unsigned Base, int Precision);
int SEGGER_snprintf (char* pBuffer, int BufferSize, const char* sFormat, ...);
int SEGGER_vsnprintf (char* pBuffer, int BufferSize, const char* sFormat, va_list ParamList);
int SEGGER_vsnprintfEx (SEGGER_SNPRINTF_CONTEXT* pContext, const char* sFormat, va_list ParamList);
int SEGGER_PRINTF_AddFormatter (SEGGER_PRINTF_FORMATTER* pFormatter, SEGGER_pFormatter pfFormatter, char c);
void SEGGER_PRINTF_AddDoubleFormatter (void);
void SEGGER_PRINTF_AddIPFormatter (void);
void SEGGER_PRINTF_AddBLUEFormatter (void);
void SEGGER_PRINTF_AddCONNECTFormatter(void);
void SEGGER_PRINTF_AddSSLFormatter (void);
void SEGGER_PRINTF_AddSSHFormatter (void);
void SEGGER_PRINTF_AddHTMLFormatter (void);
//
// BSP abstraction API.
//
int SEGGER_BSP_GetUID (U8 abUID[16]);
int SEGGER_BSP_GetUID32(U32* pUID);
void SEGGER_BSP_SetAPI (const SEGGER_BSP_API* pAPI);
void SEGGER_BSP_SeedUID (void);
//
// Other API.
//
void SEGGER_VERSION_GetString(char acText[8], unsigned Version);
#if defined(__cplusplus)
} /* Make sure we have C-declarations in C++ programs */
#endif
#endif // Avoid multiple inclusion
/*************************** End of file ****************************/

View File

@@ -0,0 +1,502 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
---------------------------END-OF-HEADER------------------------------
File : SEGGER_RTT.h
Purpose : Implementation of SEGGER real-time transfer which allows
real-time communication on targets which support debugger
memory accesses while the CPU is running.
Revision: $Rev: 25842 $
----------------------------------------------------------------------
*/
#ifndef SEGGER_RTT_H
#define SEGGER_RTT_H
#include "../Config/SEGGER_RTT_Conf.h"
/*********************************************************************
*
* Defines, defaults
*
**********************************************************************
*/
#ifndef RTT_USE_ASM
//
// Some cores support out-of-order memory accesses (reordering of memory accesses in the core)
// For such cores, we need to define a memory barrier to guarantee the order of certain accesses to the RTT ring buffers.
// Needed for:
// Cortex-M7 (ARMv7-M)
// Cortex-M23 (ARM-v8M)
// Cortex-M33 (ARM-v8M)
// Cortex-A/R (ARM-v7A/R)
//
// We do not explicitly check for "Embedded Studio" as the compiler in use determines what we support.
// You can use an external toolchain like IAR inside ES. So there is no point in checking for "Embedded Studio"
//
#if (defined __CROSSWORKS_ARM) // Rowley Crossworks
#define _CC_HAS_RTT_ASM_SUPPORT 1
#if (defined __ARM_ARCH_7M__) // Cortex-M3
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#elif (defined __ARM_ARCH_7EM__) // Cortex-M4/M7
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif (defined __ARM_ARCH_8M_BASE__) // Cortex-M23
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif (defined __ARM_ARCH_8M_MAIN__) // Cortex-M33
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#else
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#endif
#elif (defined __ARMCC_VERSION)
//
// ARM compiler
// ARM compiler V6.0 and later is clang based.
// Our ASM part is compatible to clang.
//
#if (__ARMCC_VERSION >= 6000000)
#define _CC_HAS_RTT_ASM_SUPPORT 1
#else
#define _CC_HAS_RTT_ASM_SUPPORT 0
#endif
#if (defined __ARM_ARCH_6M__) // Cortex-M0 / M1
#define _CORE_HAS_RTT_ASM_SUPPORT 0 // No ASM support for this architecture
#elif (defined __ARM_ARCH_7M__) // Cortex-M3
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#elif (defined __ARM_ARCH_7EM__) // Cortex-M4/M7
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif (defined __ARM_ARCH_8M_BASE__) // Cortex-M23
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif (defined __ARM_ARCH_8M_MAIN__) // Cortex-M33
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif ((defined __ARM_ARCH_7A__) || (defined __ARM_ARCH_7R__)) // Cortex-A/R 32-bit ARMv7-A/R
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#else
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#endif
#elif ((defined __GNUC__) || (defined __clang__))
//
// GCC / Clang
//
#define _CC_HAS_RTT_ASM_SUPPORT 1
// ARM 7/9: __ARM_ARCH_5__ / __ARM_ARCH_5E__ / __ARM_ARCH_5T__ / __ARM_ARCH_5T__ / __ARM_ARCH_5TE__
#if (defined __ARM_ARCH_7M__) // Cortex-M3
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#elif (defined __ARM_ARCH_7EM__) // Cortex-M4/M7
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1 // Only Cortex-M7 needs a DMB but we cannot distinguish M4 and M7 here...
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif (defined __ARM_ARCH_8M_BASE__) // Cortex-M23
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif (defined __ARM_ARCH_8M_MAIN__) // Cortex-M33
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#elif ((defined __ARM_ARCH_7A__) || (defined __ARM_ARCH_7R__)) // Cortex-A/R 32-bit ARMv7-A/R
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() __asm volatile ("dmb\n" : : :);
#else
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#endif
#elif ((defined __IASMARM__) || (defined __ICCARM__))
//
// IAR assembler/compiler
//
#define _CC_HAS_RTT_ASM_SUPPORT 1
#if (__VER__ < 6300000)
#define VOLATILE
#else
#define VOLATILE volatile
#endif
#if (defined __ARM7M__) // Needed for old versions that do not know the define yet
#if (__CORE__ == __ARM7M__) // Cortex-M3
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#endif
#endif
#if (defined __ARM7EM__)
#if (__CORE__ == __ARM7EM__) // Cortex-M4/M7
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() asm VOLATILE ("DMB");
#endif
#endif
#if (defined __ARM8M_BASELINE__)
#if (__CORE__ == __ARM8M_BASELINE__) // Cortex-M23
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() asm VOLATILE ("DMB");
#endif
#endif
#if (defined __ARM8M_MAINLINE__)
#if (__CORE__ == __ARM8M_MAINLINE__) // Cortex-M33
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() asm VOLATILE ("DMB");
#endif
#endif
#if (defined __ARM8EM_MAINLINE__)
#if (__CORE__ == __ARM8EM_MAINLINE__) // Cortex-???
#define _CORE_HAS_RTT_ASM_SUPPORT 1
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() asm VOLATILE ("DMB");
#endif
#endif
#if (defined __ARM7A__)
#if (__CORE__ == __ARM7A__) // Cortex-A 32-bit ARMv7-A
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() asm VOLATILE ("DMB");
#endif
#endif
#if (defined __ARM7R__)
#if (__CORE__ == __ARM7R__) // Cortex-R 32-bit ARMv7-R
#define _CORE_NEEDS_DMB 1
#define RTT__DMB() asm VOLATILE ("DMB");
#endif
#endif
// TBD: __ARM8A__ => Cortex-A 64-bit ARMv8-A
// TBD: __ARM8R__ => Cortex-R 64-bit ARMv8-R
#else
//
// Other compilers
//
#define _CC_HAS_RTT_ASM_SUPPORT 0
#define _CORE_HAS_RTT_ASM_SUPPORT 0
#endif
//
// If IDE and core support the ASM version, enable ASM version by default
//
#ifndef _CORE_HAS_RTT_ASM_SUPPORT
#define _CORE_HAS_RTT_ASM_SUPPORT 0 // Default for unknown cores
#endif
#if (_CC_HAS_RTT_ASM_SUPPORT && _CORE_HAS_RTT_ASM_SUPPORT)
#define RTT_USE_ASM (1)
#else
#define RTT_USE_ASM (0)
#endif
#endif
#ifndef _CORE_NEEDS_DMB
#define _CORE_NEEDS_DMB 0
#endif
#ifndef RTT__DMB
#if _CORE_NEEDS_DMB
#error "Don't know how to place inline assembly for DMB"
#else
#define RTT__DMB()
#endif
#endif
#ifndef SEGGER_RTT_CPU_CACHE_LINE_SIZE
#define SEGGER_RTT_CPU_CACHE_LINE_SIZE (0) // On most target systems where RTT is used, we do not have a CPU cache, therefore 0 is a good default here
#endif
#ifndef SEGGER_RTT_UNCACHED_OFF
#if SEGGER_RTT_CPU_CACHE_LINE_SIZE
#error "SEGGER_RTT_UNCACHED_OFF must be defined when setting SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0"
#else
#define SEGGER_RTT_UNCACHED_OFF (0)
#endif
#endif
#if RTT_USE_ASM
#if SEGGER_RTT_CPU_CACHE_LINE_SIZE
#error "RTT_USE_ASM is not available if SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0"
#endif
#endif
#ifndef SEGGER_RTT_ASM // defined when SEGGER_RTT.h is included from assembly file
#include <stdlib.h>
#include <stdarg.h>
/*********************************************************************
*
* Defines, fixed
*
**********************************************************************
*/
//
// Determine how much we must pad the control block to make it a multiple of a cache line in size
// Assuming: U8 = 1B
// U16 = 2B
// U32 = 4B
// U8/U16/U32* = 4B
//
#if SEGGER_RTT_CPU_CACHE_LINE_SIZE // Avoid division by zero in case we do not have any cache
#define SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(NumBytes) (((NumBytes + SEGGER_RTT_CPU_CACHE_LINE_SIZE - 1) / SEGGER_RTT_CPU_CACHE_LINE_SIZE) * SEGGER_RTT_CPU_CACHE_LINE_SIZE)
#else
#define SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(NumBytes) (NumBytes)
#endif
#define SEGGER_RTT__CB_SIZE (16 + 4 + 4 + (SEGGER_RTT_MAX_NUM_UP_BUFFERS * 24) + (SEGGER_RTT_MAX_NUM_DOWN_BUFFERS * 24))
#define SEGGER_RTT__CB_PADDING (SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(SEGGER_RTT__CB_SIZE) - SEGGER_RTT__CB_SIZE)
/*********************************************************************
*
* Types
*
**********************************************************************
*/
//
// Description for a circular buffer (also called "ring buffer")
// which is used as up-buffer (T->H)
//
typedef struct {
const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4"
char* pBuffer; // Pointer to start of buffer
unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty.
unsigned WrOff; // Position of next item to be written by either target.
volatile unsigned RdOff; // Position of next item to be read by host. Must be volatile since it may be modified by host.
unsigned Flags; // Contains configuration flags. Flags[31:24] are used for validity check and must be zero. Flags[23:2] are reserved for future use. Flags[1:0] = RTT operating mode.
} SEGGER_RTT_BUFFER_UP;
//
// Description for a circular buffer (also called "ring buffer")
// which is used as down-buffer (H->T)
//
typedef struct {
const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4"
char* pBuffer; // Pointer to start of buffer
unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty.
volatile unsigned WrOff; // Position of next item to be written by host. Must be volatile since it may be modified by host.
unsigned RdOff; // Position of next item to be read by target (down-buffer).
unsigned Flags; // Contains configuration flags. Flags[31:24] are used for validity check and must be zero. Flags[23:2] are reserved for future use. Flags[1:0] = RTT operating mode.
} SEGGER_RTT_BUFFER_DOWN;
//
// RTT control block which describes the number of buffers available
// as well as the configuration for each buffer
//
//
typedef struct {
char acID[16]; // Initialized to "SEGGER RTT"
int MaxNumUpBuffers; // Initialized to SEGGER_RTT_MAX_NUM_UP_BUFFERS (type. 2)
int MaxNumDownBuffers; // Initialized to SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (type. 2)
SEGGER_RTT_BUFFER_UP aUp[SEGGER_RTT_MAX_NUM_UP_BUFFERS]; // Up buffers, transferring information up from target via debug probe to host
SEGGER_RTT_BUFFER_DOWN aDown[SEGGER_RTT_MAX_NUM_DOWN_BUFFERS]; // Down buffers, transferring information down from host via debug probe to target
#if SEGGER_RTT__CB_PADDING
unsigned char aDummy[SEGGER_RTT__CB_PADDING];
#endif
} SEGGER_RTT_CB;
/*********************************************************************
*
* Global data
*
**********************************************************************
*/
extern SEGGER_RTT_CB _SEGGER_RTT;
/*********************************************************************
*
* RTT API functions
*
**********************************************************************
*/
#ifdef __cplusplus
extern "C" {
#endif
int SEGGER_RTT_AllocDownBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
int SEGGER_RTT_AllocUpBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
int SEGGER_RTT_ConfigUpBuffer (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
int SEGGER_RTT_ConfigDownBuffer (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags);
int SEGGER_RTT_GetKey (void);
unsigned SEGGER_RTT_HasData (unsigned BufferIndex);
int SEGGER_RTT_HasKey (void);
unsigned SEGGER_RTT_HasDataUp (unsigned BufferIndex);
void SEGGER_RTT_Init (void);
unsigned SEGGER_RTT_Read (unsigned BufferIndex, void* pBuffer, unsigned BufferSize);
unsigned SEGGER_RTT_ReadNoLock (unsigned BufferIndex, void* pData, unsigned BufferSize);
int SEGGER_RTT_SetNameDownBuffer (unsigned BufferIndex, const char* sName);
int SEGGER_RTT_SetNameUpBuffer (unsigned BufferIndex, const char* sName);
int SEGGER_RTT_SetFlagsDownBuffer (unsigned BufferIndex, unsigned Flags);
int SEGGER_RTT_SetFlagsUpBuffer (unsigned BufferIndex, unsigned Flags);
int SEGGER_RTT_WaitKey (void);
unsigned SEGGER_RTT_Write (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
unsigned SEGGER_RTT_WriteNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
unsigned SEGGER_RTT_WriteSkipNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
unsigned SEGGER_RTT_ASM_WriteSkipNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
unsigned SEGGER_RTT_WriteString (unsigned BufferIndex, const char* s);
void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
unsigned SEGGER_RTT_PutChar (unsigned BufferIndex, char c);
unsigned SEGGER_RTT_PutCharSkip (unsigned BufferIndex, char c);
unsigned SEGGER_RTT_PutCharSkipNoLock (unsigned BufferIndex, char c);
unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex);
unsigned SEGGER_RTT_GetBytesInBuffer (unsigned BufferIndex);
void SEGGER_RTT_ESP_FlushNoLock (unsigned long min_sz, unsigned long tmo);
void SEGGER_RTT_ESP_Flush (unsigned long min_sz, unsigned long tmo);
//
// Function macro for performance optimization
//
// @AGv: This macro is used inside SEGGER SystemView code.
// For ESP32 we use our own implementation of RTT, so this macro should not check SEGGER's RTT buffer state.
#define SEGGER_RTT_HASDATA(n) (1)
#if RTT_USE_ASM
#define SEGGER_RTT_WriteSkipNoLock SEGGER_RTT_ASM_WriteSkipNoLock
#endif
/*********************************************************************
*
* RTT transfer functions to send RTT data via other channels.
*
**********************************************************************
*/
unsigned SEGGER_RTT_ReadUpBuffer (unsigned BufferIndex, void* pBuffer, unsigned BufferSize);
unsigned SEGGER_RTT_ReadUpBufferNoLock (unsigned BufferIndex, void* pData, unsigned BufferSize);
unsigned SEGGER_RTT_WriteDownBuffer (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
unsigned SEGGER_RTT_WriteDownBufferNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes);
#define SEGGER_RTT_HASDATA_UP(n) (((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->WrOff - ((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->RdOff) // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly
/*********************************************************************
*
* RTT "Terminal" API functions
*
**********************************************************************
*/
int SEGGER_RTT_SetTerminal (unsigned char TerminalId);
int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s);
/*********************************************************************
*
* RTT printf functions (require SEGGER_RTT_printf.c)
*
**********************************************************************
*/
int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...);
int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList);
#ifdef __cplusplus
}
#endif
#endif // ifndef(SEGGER_RTT_ASM)
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
//
// Operating modes. Define behavior if buffer is full (not enough space for entire message)
//
#define SEGGER_RTT_MODE_NO_BLOCK_SKIP (0) // Skip. Do not block, output nothing. (Default)
#define SEGGER_RTT_MODE_NO_BLOCK_TRIM (1) // Trim: Do not block, output as much as fits.
#define SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL (2) // Block: Wait until there is space in the buffer.
#define SEGGER_RTT_MODE_MASK (3)
//
// Control sequences, based on ANSI.
// Can be used to control color, and clear the screen
//
#define RTT_CTRL_RESET "\x1B[0m" // Reset to default colors
#define RTT_CTRL_CLEAR "\x1B[2J" // Clear screen, reposition cursor to top left
#define RTT_CTRL_TEXT_BLACK "\x1B[2;30m"
#define RTT_CTRL_TEXT_RED "\x1B[2;31m"
#define RTT_CTRL_TEXT_GREEN "\x1B[2;32m"
#define RTT_CTRL_TEXT_YELLOW "\x1B[2;33m"
#define RTT_CTRL_TEXT_BLUE "\x1B[2;34m"
#define RTT_CTRL_TEXT_MAGENTA "\x1B[2;35m"
#define RTT_CTRL_TEXT_CYAN "\x1B[2;36m"
#define RTT_CTRL_TEXT_WHITE "\x1B[2;37m"
#define RTT_CTRL_TEXT_BRIGHT_BLACK "\x1B[1;30m"
#define RTT_CTRL_TEXT_BRIGHT_RED "\x1B[1;31m"
#define RTT_CTRL_TEXT_BRIGHT_GREEN "\x1B[1;32m"
#define RTT_CTRL_TEXT_BRIGHT_YELLOW "\x1B[1;33m"
#define RTT_CTRL_TEXT_BRIGHT_BLUE "\x1B[1;34m"
#define RTT_CTRL_TEXT_BRIGHT_MAGENTA "\x1B[1;35m"
#define RTT_CTRL_TEXT_BRIGHT_CYAN "\x1B[1;36m"
#define RTT_CTRL_TEXT_BRIGHT_WHITE "\x1B[1;37m"
#define RTT_CTRL_BG_BLACK "\x1B[24;40m"
#define RTT_CTRL_BG_RED "\x1B[24;41m"
#define RTT_CTRL_BG_GREEN "\x1B[24;42m"
#define RTT_CTRL_BG_YELLOW "\x1B[24;43m"
#define RTT_CTRL_BG_BLUE "\x1B[24;44m"
#define RTT_CTRL_BG_MAGENTA "\x1B[24;45m"
#define RTT_CTRL_BG_CYAN "\x1B[24;46m"
#define RTT_CTRL_BG_WHITE "\x1B[24;47m"
#define RTT_CTRL_BG_BRIGHT_BLACK "\x1B[4;40m"
#define RTT_CTRL_BG_BRIGHT_RED "\x1B[4;41m"
#define RTT_CTRL_BG_BRIGHT_GREEN "\x1B[4;42m"
#define RTT_CTRL_BG_BRIGHT_YELLOW "\x1B[4;43m"
#define RTT_CTRL_BG_BRIGHT_BLUE "\x1B[4;44m"
#define RTT_CTRL_BG_BRIGHT_MAGENTA "\x1B[4;45m"
#define RTT_CTRL_BG_BRIGHT_CYAN "\x1B[4;46m"
#define RTT_CTRL_BG_BRIGHT_WHITE "\x1B[4;47m"
#endif
/*************************** End of file ****************************/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,388 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW.h
Purpose : System visualization API.
Revision: $Rev: 28237 $
*/
#ifndef SEGGER_SYSVIEW_H
#define SEGGER_SYSVIEW_H
/*********************************************************************
*
* #include Section
*
**********************************************************************
*/
#include "SEGGER.h"
#include "SEGGER_SYSVIEW_ConfDefaults.h"
#ifdef __cplusplus
extern "C" {
#endif
/*********************************************************************
*
* Defines, fixed
*
**********************************************************************
*/
#define SEGGER_SYSVIEW_MAJOR 3
#define SEGGER_SYSVIEW_MINOR 32
#define SEGGER_SYSVIEW_REV 0
#define SEGGER_SYSVIEW_VERSION ((SEGGER_SYSVIEW_MAJOR * 10000) + (SEGGER_SYSVIEW_MINOR * 100) + SEGGER_SYSVIEW_REV)
#define SEGGER_SYSVIEW_INFO_SIZE 9 // Minimum size, which has to be reserved for a packet. 1-2 byte of message type, 0-2 byte of payload length, 1-5 bytes of timestamp.
#define SEGGER_SYSVIEW_QUANTA_U32 5 // Maximum number of bytes to encode a U32, should be reserved for each 32-bit value in a packet.
#define SEGGER_SYSVIEW_LOG (0u)
#define SEGGER_SYSVIEW_WARNING (1u)
#define SEGGER_SYSVIEW_ERROR (2u)
#define SEGGER_SYSVIEW_FLAG_APPEND (1u << 6)
#define SEGGER_SYSVIEW_PREPARE_PACKET(p) (p) + 4
//
// SystemView events. First 32 IDs from 0 .. 31 are reserved for these
//
#define SYSVIEW_EVTID_NOP 0 // Dummy packet.
#define SYSVIEW_EVTID_OVERFLOW 1
#define SYSVIEW_EVTID_ISR_ENTER 2
#define SYSVIEW_EVTID_ISR_EXIT 3
#define SYSVIEW_EVTID_TASK_START_EXEC 4
#define SYSVIEW_EVTID_TASK_STOP_EXEC 5
#define SYSVIEW_EVTID_TASK_START_READY 6
#define SYSVIEW_EVTID_TASK_STOP_READY 7
#define SYSVIEW_EVTID_TASK_CREATE 8
#define SYSVIEW_EVTID_TASK_INFO 9
#define SYSVIEW_EVTID_TRACE_START 10
#define SYSVIEW_EVTID_TRACE_STOP 11
#define SYSVIEW_EVTID_SYSTIME_CYCLES 12
#define SYSVIEW_EVTID_SYSTIME_US 13
#define SYSVIEW_EVTID_SYSDESC 14
#define SYSVIEW_EVTID_MARK_START 15
#define SYSVIEW_EVTID_MARK_STOP 16
#define SYSVIEW_EVTID_IDLE 17
#define SYSVIEW_EVTID_ISR_TO_SCHEDULER 18
#define SYSVIEW_EVTID_TIMER_ENTER 19
#define SYSVIEW_EVTID_TIMER_EXIT 20
#define SYSVIEW_EVTID_STACK_INFO 21
#define SYSVIEW_EVTID_MODULEDESC 22
#define SYSVIEW_EVTID_INIT 24
#define SYSVIEW_EVTID_NAME_RESOURCE 25
#define SYSVIEW_EVTID_PRINT_FORMATTED 26
#define SYSVIEW_EVTID_NUMMODULES 27
#define SYSVIEW_EVTID_END_CALL 28
#define SYSVIEW_EVTID_TASK_TERMINATE 29
#define SYSVIEW_EVTID_EX 31
//
// SystemView extended events. Sent with ID 31.
//
#define SYSVIEW_EVTID_EX_MARK 0
#define SYSVIEW_EVTID_EX_NAME_MARKER 1
#define SYSVIEW_EVTID_EX_HEAP_DEFINE 2
#define SYSVIEW_EVTID_EX_HEAP_ALLOC 3
#define SYSVIEW_EVTID_EX_HEAP_ALLOC_EX 4
#define SYSVIEW_EVTID_EX_HEAP_FREE 5
//
// Event masks to disable/enable events
//
#define SYSVIEW_EVTMASK_NOP (1 << SYSVIEW_EVTID_NOP)
#define SYSVIEW_EVTMASK_OVERFLOW (1 << SYSVIEW_EVTID_OVERFLOW)
#define SYSVIEW_EVTMASK_ISR_ENTER (1 << SYSVIEW_EVTID_ISR_ENTER)
#define SYSVIEW_EVTMASK_ISR_EXIT (1 << SYSVIEW_EVTID_ISR_EXIT)
#define SYSVIEW_EVTMASK_TASK_START_EXEC (1 << SYSVIEW_EVTID_TASK_START_EXEC)
#define SYSVIEW_EVTMASK_TASK_STOP_EXEC (1 << SYSVIEW_EVTID_TASK_STOP_EXEC)
#define SYSVIEW_EVTMASK_TASK_START_READY (1 << SYSVIEW_EVTID_TASK_START_READY)
#define SYSVIEW_EVTMASK_TASK_STOP_READY (1 << SYSVIEW_EVTID_TASK_STOP_READY)
#define SYSVIEW_EVTMASK_TASK_CREATE (1 << SYSVIEW_EVTID_TASK_CREATE)
#define SYSVIEW_EVTMASK_TASK_INFO (1 << SYSVIEW_EVTID_TASK_INFO)
#define SYSVIEW_EVTMASK_TRACE_START (1 << SYSVIEW_EVTID_TRACE_START)
#define SYSVIEW_EVTMASK_TRACE_STOP (1 << SYSVIEW_EVTID_TRACE_STOP)
#define SYSVIEW_EVTMASK_SYSTIME_CYCLES (1 << SYSVIEW_EVTID_SYSTIME_CYCLES)
#define SYSVIEW_EVTMASK_SYSTIME_US (1 << SYSVIEW_EVTID_SYSTIME_US)
#define SYSVIEW_EVTMASK_SYSDESC (1 << SYSVIEW_EVTID_SYSDESC)
#define SYSVIEW_EVTMASK_USER_START (1 << SYSVIEW_EVTID_USER_START)
#define SYSVIEW_EVTMASK_USER_STOP (1 << SYSVIEW_EVTID_USER_STOP)
#define SYSVIEW_EVTMASK_IDLE (1 << SYSVIEW_EVTID_IDLE)
#define SYSVIEW_EVTMASK_ISR_TO_SCHEDULER (1 << SYSVIEW_EVTID_ISR_TO_SCHEDULER)
#define SYSVIEW_EVTMASK_TIMER_ENTER (1 << SYSVIEW_EVTID_TIMER_ENTER)
#define SYSVIEW_EVTMASK_TIMER_EXIT (1 << SYSVIEW_EVTID_TIMER_EXIT)
#define SYSVIEW_EVTMASK_STACK_INFO (1 << SYSVIEW_EVTID_STACK_INFO)
#define SYSVIEW_EVTMASK_MODULEDESC (1 << SYSVIEW_EVTID_MODULEDESC)
#define SYSVIEW_EVTMASK_INIT (1 << SYSVIEW_EVTID_INIT)
#define SYSVIEW_EVTMASK_NAME_RESOURCE (1 << SYSVIEW_EVTID_NAME_RESOURCE)
#define SYSVIEW_EVTMASK_PRINT_FORMATTED (1 << SYSVIEW_EVTID_PRINT_FORMATTED)
#define SYSVIEW_EVTMASK_NUMMODULES (1 << SYSVIEW_EVTID_NUMMODULES)
#define SYSVIEW_EVTMASK_END_CALL (1 << SYSVIEW_EVTID_END_CALL)
#define SYSVIEW_EVTMASK_TASK_TERMINATE (1 << SYSVIEW_EVTID_TASK_TERMINATE)
#define SYSVIEW_EVTMASK_EX (1 << SYSVIEW_EVTID_EX)
#define SYSVIEW_EVTMASK_ALL_INTERRUPTS ( SYSVIEW_EVTMASK_ISR_ENTER \
| SYSVIEW_EVTMASK_ISR_EXIT \
| SYSVIEW_EVTMASK_ISR_TO_SCHEDULER)
#define SYSVIEW_EVTMASK_ALL_TASKS ( SYSVIEW_EVTMASK_TASK_START_EXEC \
| SYSVIEW_EVTMASK_TASK_STOP_EXEC \
| SYSVIEW_EVTMASK_TASK_START_READY \
| SYSVIEW_EVTMASK_TASK_STOP_READY \
| SYSVIEW_EVTMASK_TASK_CREATE \
| SYSVIEW_EVTMASK_TASK_INFO \
| SYSVIEW_EVTMASK_STACK_INFO \
| SYSVIEW_EVTMASK_TASK_TERMINATE)
/*********************************************************************
*
* Structures
*
**********************************************************************
*/
typedef struct {
U32 TaskID;
const char* sName;
U32 Prio;
U32 StackBase;
U32 StackSize;
} SEGGER_SYSVIEW_TASKINFO;
typedef struct SEGGER_SYSVIEW_MODULE_STRUCT SEGGER_SYSVIEW_MODULE;
struct SEGGER_SYSVIEW_MODULE_STRUCT {
const char* sModule;
U32 NumEvents;
U32 EventOffset;
void (*pfSendModuleDesc)(void);
SEGGER_SYSVIEW_MODULE* pNext;
};
typedef void (SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC)(void);
/*********************************************************************
*
* Global data
*
**********************************************************************
*/
#ifdef EXTERN
#undef EXTERN
#endif
#ifndef SEGGER_SYSVIEW_C // Defined in SEGGER_SYSVIEW.c which includes this header beside other C-files
#define EXTERN extern
#else
#define EXTERN
#endif
EXTERN unsigned int SEGGER_SYSVIEW_TickCnt;
EXTERN unsigned int SEGGER_SYSVIEW_InterruptId;
#undef EXTERN
/*********************************************************************
*
* API functions
*
**********************************************************************
*/
typedef struct {
U64 (*pfGetTime) (void);
void (*pfSendTaskList) (void);
} SEGGER_SYSVIEW_OS_API;
/*********************************************************************
*
* Control and initialization functions
*/
void SEGGER_SYSVIEW_Init (U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc);
void SEGGER_SYSVIEW_SetRAMBase (U32 RAMBaseAddress);
void SEGGER_SYSVIEW_Start (void);
void SEGGER_SYSVIEW_Stop (void);
void SEGGER_SYSVIEW_GetSysDesc (void);
void SEGGER_SYSVIEW_SendTaskList (void);
void SEGGER_SYSVIEW_SendTaskInfo (const SEGGER_SYSVIEW_TASKINFO* pInfo);
void SEGGER_SYSVIEW_SendSysDesc (const char* sSysDesc);
int SEGGER_SYSVIEW_IsStarted (void);
int SEGGER_SYSVIEW_GetChannelID (void);
// Checks whether tracing has been started
U8 SEGGER_SYSVIEW_Started(void);
/*********************************************************************
*
* Event recording functions
*/
void SEGGER_SYSVIEW_RecordVoid (unsigned int EventId);
void SEGGER_SYSVIEW_RecordU32 (unsigned int EventId, U32 Para0);
void SEGGER_SYSVIEW_RecordU32x2 (unsigned int EventId, U32 Para0, U32 Para1);
void SEGGER_SYSVIEW_RecordU32x3 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2);
void SEGGER_SYSVIEW_RecordU32x4 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3);
void SEGGER_SYSVIEW_RecordU32x5 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4);
void SEGGER_SYSVIEW_RecordU32x6 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5);
void SEGGER_SYSVIEW_RecordU32x7 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6);
void SEGGER_SYSVIEW_RecordU32x8 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7);
void SEGGER_SYSVIEW_RecordU32x9 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8);
void SEGGER_SYSVIEW_RecordU32x10 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9);
void SEGGER_SYSVIEW_RecordString (unsigned int EventId, const char* pString);
void SEGGER_SYSVIEW_RecordSystime (void);
void SEGGER_SYSVIEW_RecordEnterISR (U32 IrqId);
void SEGGER_SYSVIEW_RecordExitISR (void);
void SEGGER_SYSVIEW_RecordExitISRToScheduler (void);
void SEGGER_SYSVIEW_RecordEnterTimer (U32 TimerId);
void SEGGER_SYSVIEW_RecordExitTimer (void);
void SEGGER_SYSVIEW_RecordEndCall (unsigned int EventID);
void SEGGER_SYSVIEW_RecordEndCallU32 (unsigned int EventID, U32 Para0);
void SEGGER_SYSVIEW_OnIdle (void);
void SEGGER_SYSVIEW_OnTaskCreate (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskTerminate (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskStartExec (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskStopExec (void);
void SEGGER_SYSVIEW_OnTaskStartReady (U32 TaskId);
void SEGGER_SYSVIEW_OnTaskStopReady (U32 TaskId, unsigned int Cause);
void SEGGER_SYSVIEW_MarkStart (unsigned int MarkerId);
void SEGGER_SYSVIEW_MarkStop (unsigned int MarkerId);
void SEGGER_SYSVIEW_Mark (unsigned int MarkerId);
void SEGGER_SYSVIEW_NameMarker (unsigned int MarkerId, const char* sName);
void SEGGER_SYSVIEW_HeapDefine (void* pHeap, void* pBase, unsigned int HeapSize, unsigned int MetadataSize);
void SEGGER_SYSVIEW_HeapAlloc (void* pHeap, void* pUserData, unsigned int UserDataLen);
void SEGGER_SYSVIEW_HeapAllocEx (void* pHeap, void* pUserData, unsigned int UserDataLen, unsigned int Tag);
void SEGGER_SYSVIEW_HeapFree (void* pHeap, void* pUserData);
void SEGGER_SYSVIEW_NameResource (U32 ResourceId, const char* sName);
int SEGGER_SYSVIEW_SendPacket (U8* pPacket, U8* pPayloadEnd, unsigned int EventId);
/*********************************************************************
*
* Event parameter encoding functions
*/
U8* SEGGER_SYSVIEW_EncodeU32 (U8* pPayload, U32 Value);
U8* SEGGER_SYSVIEW_EncodeData (U8* pPayload, const char* pSrc, unsigned int Len);
U8* SEGGER_SYSVIEW_EncodeString (U8* pPayload, const char* s, unsigned int MaxLen);
U8* SEGGER_SYSVIEW_EncodeId (U8* pPayload, U32 Id);
U32 SEGGER_SYSVIEW_ShrinkId (U32 Id);
/*********************************************************************
*
* Middleware module registration
*/
void SEGGER_SYSVIEW_RegisterModule (SEGGER_SYSVIEW_MODULE* pModule);
void SEGGER_SYSVIEW_RecordModuleDescription (const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription);
void SEGGER_SYSVIEW_SendModule (U8 ModuleId);
void SEGGER_SYSVIEW_SendModuleDescription (void);
void SEGGER_SYSVIEW_SendNumModules (void);
/*********************************************************************
*
* printf-Style functions
*/
#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list
void SEGGER_SYSVIEW_PrintfHostEx (const char* s, U32 Options, ...);
void SEGGER_SYSVIEW_PrintfTargetEx (const char* s, U32 Options, ...);
void SEGGER_SYSVIEW_PrintfHost (const char* s, ...);
void SEGGER_SYSVIEW_PrintfTarget (const char* s, ...);
void SEGGER_SYSVIEW_WarnfHost (const char* s, ...);
void SEGGER_SYSVIEW_WarnfTarget (const char* s, ...);
void SEGGER_SYSVIEW_ErrorfHost (const char* s, ...);
void SEGGER_SYSVIEW_ErrorfTarget (const char* s, ...);
#endif
void SEGGER_SYSVIEW_Print (const char* s);
void SEGGER_SYSVIEW_Warn (const char* s);
void SEGGER_SYSVIEW_Error (const char* s);
/*********************************************************************
*
* Run-time configuration functions
*/
void SEGGER_SYSVIEW_EnableEvents (U32 EnableMask);
void SEGGER_SYSVIEW_DisableEvents (U32 DisableMask);
/*********************************************************************
*
* Application-provided functions
*/
void SEGGER_SYSVIEW_Conf (void);
U32 SEGGER_SYSVIEW_X_GetTimestamp (void);
U32 SEGGER_SYSVIEW_X_GetInterruptId (void);
void SEGGER_SYSVIEW_X_StartComm (void);
void SEGGER_SYSVIEW_X_OnEventRecorded (unsigned NumBytes);
#ifdef __cplusplus
}
#endif
/*********************************************************************
*
* Compatibility API defines
*/
#define SEGGER_SYSVIEW_OnUserStart SEGGER_SYSVIEW_MarkStart
#define SEGGER_SYSVIEW_OnUserStop SEGGER_SYSVIEW_MarkStop
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,588 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_ConfDefaults.h
Purpose : Defines defaults for configurable defines used in
SEGGER SystemView.
Revision: $Rev: 26230 $
*/
#ifndef SEGGER_SYSVIEW_CONFDEFAULTS_H
#define SEGGER_SYSVIEW_CONFDEFAULTS_H
/*********************************************************************
*
* #include Section
*
**********************************************************************
*/
#include "SEGGER_SYSVIEW_Conf.h"
#include "SEGGER_RTT_Conf.h"
#ifdef __cplusplus
extern "C" {
#endif
/*********************************************************************
*
* Defines, fixed
*
**********************************************************************
*/
//
// Use auto-detection for SEGGER_SYSVIEW_CORE define
// based on compiler-/toolchain-specific defines
// to define SEGGER_SYSVIEW_GET_INTERRUPT_ID and SEGGER_SYSVIEW_GET_TIMESTAMP
//
#define SEGGER_SYSVIEW_CORE_OTHER 0
#define SEGGER_SYSVIEW_CORE_CM0 1 // Cortex-M0/M0+/M1
#define SEGGER_SYSVIEW_CORE_CM3 2 // Cortex-M3/M4/M7
#define SEGGER_SYSVIEW_CORE_RX 3 // Renesas RX
#ifndef SEGGER_SYSVIEW_CORE
#if (defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __SEGGER_CC__) || (defined __GNUC__) || (defined __clang__)
#if (defined __ARM_ARCH_6M__) || (defined __ARM_ARCH_8M_BASE__)
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__ICCARM__)
#if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) \
|| (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) \
|| (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) \
|| (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) \
|| (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__CC_ARM)
#if (defined(__TARGET_ARCH_6S_M))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__TI_ARM__)
#ifdef __TI_ARM_V6M0__
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0
#elif (defined(__TI_ARM_V7M3__) || defined(__TI_ARM_V7M4__))
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
#endif
#elif defined(__ICCRX__)
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
#elif defined(__RX)
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX
#endif
#ifndef SEGGER_SYSVIEW_CORE
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_OTHER
#endif
#endif
/*********************************************************************
*
* Defines, defaults
*
**********************************************************************
*/
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_APP_NAME
*
* Description
* The application name to be displayed in SystemView.
* Default
* "SystemView-enabled Application"
* Notes
* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc().
*/
#ifndef SEGGER_SYSVIEW_APP_NAME
#define SEGGER_SYSVIEW_APP_NAME "SystemView-enabled Application"
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_DEVICE_NAME
*
* Description
* The target device name to be displayed in SystemView.
* Default
* "undefined device"
* Notes
* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc().
*/
#ifndef SEGGER_SYSVIEW_DEVICE_NAME
#define SEGGER_SYSVIEW_DEVICE_NAME "undefined device"
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_GET_INTERRUPT_ID()
*
* Description
* Function macro to retrieve the Id of the currently active
* interrupt.
* Default
* Call user-supplied function SEGGER_SYSVIEW_X_GetInterruptId().
* Notes
* For some known compilers and cores, a ready-to-use, core-specific
* default is set.
* ARMv7M: Read ICSR[8:0] (active vector)
* ARMv6M: Read ICSR[5:0] (active vector)
*/
#ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID
#if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x1FF) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[8:0] = active vector)
#elif SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM0
#if defined(__ICCARM__)
#if (__VER__ > 6010000)
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() (__get_IPSR()) // Workaround for IAR, which might do a byte-access to 0xE000ED04. Read IPSR instead.
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Older versions of IAR do not include __get_IPSR, but might also not optimize to byte-access.
#endif
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[5:0] = active vector)
#endif
#else
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() // Get the currently active interrupt Id from the user-provided function.
#endif
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_GET_TIMESTAMP()
*
* Description
* Function macro to retrieve a system timestamp for SYSVIEW events.
* Default
* Call user-supplied function SEGGER_SYSVIEW_X_GetTimestamp().
* Notes
* For some known compilers and cores, a ready-to-use, core-specific
* default is set.
* ARMv7M: Read Cortex-M Cycle Count register.
*
* The system timestamp clock frequency has to be passed in
* SEGGER_SYSVIEW_Init().
*/
#ifndef SEGGER_SYSVIEW_GET_TIMESTAMP
#if defined (SEGGER_SYSVIEW_CORE) && (SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3)
#define SEGGER_SYSVIEW_GET_TIMESTAMP() (*(U32 *)(0xE0001004)) // Retrieve a system timestamp. Cortex-M cycle counter.
#else
#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() // Retrieve a system timestamp via user-defined function
#endif
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_TIMESTAMP_BITS
*
* Description
* Number of valid (low-order) bits delivered in system timestamp.
* Default
* 32
* Notes
* Value has to match system timestamp clock source.
*/
// Define number of valid bits low-order delivered by clock source.
#ifndef SEGGER_SYSVIEW_TIMESTAMP_BITS
#define SEGGER_SYSVIEW_TIMESTAMP_BITS 32
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_RTT_CHANNEL
*
* Description
* The RTT channel that SystemView will use.
* Default
* 0: Auto selection.
* Notes
* Value has to be lower than SEGGER_RTT_MAX_NUM_UP_BUFFERS.
*/
#ifndef SEGGER_SYSVIEW_RTT_CHANNEL
#define SEGGER_SYSVIEW_RTT_CHANNEL 1
#endif
// Sanity check of RTT channel
#if (SEGGER_SYSVIEW_RTT_CHANNEL == 0) && (SEGGER_RTT_MAX_NUM_UP_BUFFERS < 2)
#error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > 1!"
#elif (SEGGER_SYSVIEW_RTT_CHANNEL >= SEGGER_RTT_MAX_NUM_UP_BUFFERS)
#error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > SEGGER_SYSVIEW_RTT_CHANNEL!"
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_RTT_BUFFER_SIZE
*
* Description
* Number of bytes that SystemView uses for the RTT buffer.
* Default
* 1024
*/
#ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE
#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_SECTION
*
* Description
* Section to place the SystemView RTT Buffer into.
* Default
* undefined: Do not place into a specific section.
* Notes
* If SEGGER_RTT_SECTION is defined, the default changes to use
* this section for the SystemView RTT Buffer, too.
*/
#if !(defined SEGGER_SYSVIEW_SECTION) && (defined SEGGER_RTT_SECTION)
#define SEGGER_SYSVIEW_SECTION SEGGER_RTT_SECTION
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE
*
* Description
* Largest cache line size (in bytes) in the target system.
* Default
* 0
* Notes
* Required in systems with caches to make sure that the SystemView
* RTT buffer can be aligned accordingly.
*/
#ifndef SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE
#define SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_ID_BASE
*
* Description
* Lowest Id reported by the application.
* Default
* 0
* Notes
* Value is usually subtracted from mailboxes, semaphores, tasks,
* .... addresses, to compress event parameters.
* Should be the lowest RAM address of the system.
*/
#ifndef SEGGER_SYSVIEW_ID_BASE
#define SEGGER_SYSVIEW_ID_BASE 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_ID_SHIFT
*
* Description
* Number of bits to shift Ids.
* Default
* 0
* Notes
* Ids are shifted to compress event parameters.
* Should match the alignment of Ids (addresses),
* e.g. 2 when Ids are 4 byte aligned.
*/
#ifndef SEGGER_SYSVIEW_ID_SHIFT
#define SEGGER_SYSVIEW_ID_SHIFT 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_MAX_ARGUMENTS
*
* Description
* Maximum number of arguments which are handled with SystemView
* print routines or may be encoded in one recording function.
* routines.
* Default
* 16
*/
#ifndef SEGGER_SYSVIEW_MAX_ARGUMENTS
#define SEGGER_SYSVIEW_MAX_ARGUMENTS 16
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_MAX_STRING_LEN
*
* Description
* Maximum string length which can be used in SystemView print and
* system description routines.
* Default
* 128
*/
#ifndef SEGGER_SYSVIEW_MAX_STRING_LEN
#define SEGGER_SYSVIEW_MAX_STRING_LEN 128
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_SUPPORT_LONG_ID
*
* Description
* It set, support enconding Evend Ids longer than 14 bit.
* Default
* 1
*/
#ifndef SEGGER_SYSVIEW_SUPPORT_LONG_ID
#define SEGGER_SYSVIEW_SUPPORT_LONG_ID 1
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_SUPPORT_LONG_DATA
*
* Description
* It set, support enconding event data longer than 14 bit.
* Default
* 0
*/
#ifndef SEGGER_SYSVIEW_SUPPORT_LONG_DATA
#define SEGGER_SYSVIEW_SUPPORT_LONG_DATA 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT
*
* Description
* If enabled, on SEGGER_SYSVIEW_PrintHost, check the format string
* and if it includes unsupported formatters, use formatting on the
* target instead.
* Default
* 0: Disabled.
*/
#ifndef SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT
#define SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_USE_INTERNAL_RECORDER
*
* Description
* If set, an internal recorder, such as UART or IP is used.
* Default
* 0: Disabled.
* Notes
* Convenience define to be used by SEGGER_SYSVIEW_Conf(),
* such as in embOS configuration to enable Cortex-M cycle counter.
*/
#ifndef SEGGER_SYSVIEW_USE_INTERNAL_RECORDER
#define SEGGER_SYSVIEW_USE_INTERNAL_RECORDER 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_CAN_RESTART
*
* Description
* If enabled, send the SystemView start sequence on every start
* command, not just on the first one.
* Enables restart when SystemView disconnected unexpectedly.
* Default
* 1: Enabled
*/
#ifndef SEGGER_SYSVIEW_CAN_RESTART
#define SEGGER_SYSVIEW_CAN_RESTART 1
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_START_ON_INIT
*
* Description
* Enable calling SEGGER_SYSVIEW_Start() after initialization.
* Default
* 0: Disabled.
* Notes
* Convenience define to be used by SEGGER_SYSVIEW_Conf(),
* such as in embOS configuration.
*/
#ifndef SEGGER_SYSVIEW_START_ON_INIT
#define SEGGER_SYSVIEW_START_ON_INIT 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_USE_STATIC_BUFFER
*
* Description
* If enabled, use a static buffer instead of a buffer on the stack
* for SystemView event packets.
* Default
* 1: Enabled.
* Notes
* If enabled, the static memory use by SystemView is increased by
* the maximum packet size. SystemView is locked on entry of a
* recording function.
* If disabled, the stack usage by SystemView recording functions
* might be increased by up to the maximum packet size. SystemView
* is locked when writing the packet to the RTT buffer.
*/
#ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER
#define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_MAX_PACKET_SIZE
*
* Description
* Maximum packet size for a SystemView event.
* Default
* Automatically calculated.
* Notes
* The maximum packet size is mainly defined by the maximum string
* length and the maximum number of arguments.
*/
#ifndef SEGGER_SYSVIEW_MAX_PACKET_SIZE
#define SEGGER_SYSVIEW_MAX_PACKET_SIZE (SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_ARGUMENTS * SEGGER_SYSVIEW_QUANTA_U32)
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_POST_MORTEM_MODE
*
* Description
* If enabled, SystemView records for post-mortem analysis instead
* of real-time analysis.
* Default
* 0: Disabled.
* Notes
* For more information refer to
* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode
*/
#ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE
#define SEGGER_SYSVIEW_POST_MORTEM_MODE 0
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT
*
* Description
* Configure how frequently syncronization is sent in post-mortem
* mode.
* Default
* 8: (1 << 8) = Every 256 Events.
* Notes
* In post-mortem mode, at least one sync has to be in the RTT buffer.
* Recommended sync frequency: Buffer Size / 16
* For more information refer to
* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode
*/
#ifndef SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT
#define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_ON_EVENT_RECORDED()
*
* Description
* Function macro to notify recorder about a new event in buffer.
* Default
* undefined: Do not notify recorder.
* Notes
* Used for non-J-Link recorder,
* such as to enable transmission via UART or notify IP task.
*/
#ifndef SEGGER_SYSVIEW_ON_EVENT_RECORDED
#define SEGGER_SYSVIEW_ON_EVENT_RECORDED(NumBytes)
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_LOCK()
*
* Description
* Function macro to (nestable) lock SystemView recording.
* Default
* Use RTT Locking mechanism (defined by SEGGER_RTT_LOCK()).
* Notes
* If SystemView recording is not locked, recording events from
* interrupts and tasks may lead to unpredictable, undefined, event
* data.
*/
#ifndef SEGGER_SYSVIEW_LOCK
unsigned SEGGER_SYSVIEW_X_SysView_Lock(void);
#define SEGGER_SYSVIEW_LOCK() unsigned _SYSVIEW_int_state = SEGGER_SYSVIEW_X_SysView_Lock()
#endif
/*********************************************************************
*
* Define: SEGGER_SYSVIEW_UNLOCK
*
* Description
* Function macro to unlock SystemView recording.
* Default
* Use RTT Unlocking mechanism (defined by SEGGER_RTT_UNLOCK()).
*/
#ifndef SEGGER_SYSVIEW_UNLOCK
void SEGGER_SYSVIEW_X_SysView_Unlock(unsigned int_state);
#define SEGGER_SYSVIEW_UNLOCK() SEGGER_SYSVIEW_X_SysView_Unlock(_SYSVIEW_int_state)
#endif
#ifdef __cplusplus
}
#endif
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,104 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_Int.h
Purpose : SEGGER SystemView internal header.
Revision: $Rev: 21281 $
*/
#ifndef SEGGER_SYSVIEW_INT_H
#define SEGGER_SYSVIEW_INT_H
/*********************************************************************
*
* #include Section
*
**********************************************************************
*/
#include "SEGGER_SYSVIEW.h"
#ifdef __cplusplus
extern "C" {
#endif
/*********************************************************************
*
* Private data types
*
**********************************************************************
*/
//
// Commands that Host can send to target
//
typedef enum {
SEGGER_SYSVIEW_COMMAND_ID_START = 1,
SEGGER_SYSVIEW_COMMAND_ID_STOP,
SEGGER_SYSVIEW_COMMAND_ID_GET_SYSTIME,
SEGGER_SYSVIEW_COMMAND_ID_GET_TASKLIST,
SEGGER_SYSVIEW_COMMAND_ID_GET_SYSDESC,
SEGGER_SYSVIEW_COMMAND_ID_GET_NUMMODULES,
SEGGER_SYSVIEW_COMMAND_ID_GET_MODULEDESC,
SEGGER_SYSVIEW_COMMAND_ID_HEARTBEAT = 127,
// Extended commands: Commands >= 128 have a second parameter
SEGGER_SYSVIEW_COMMAND_ID_GET_MODULE = 128
} SEGGER_SYSVIEW_COMMAND_ID;
#ifdef __cplusplus
}
#endif
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,283 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2017-2022 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_Config_FreeRTOS.c
Purpose : Sample setup configuration of SystemView with FreeRTOS.
Revision: $Rev: 7745 $
*/
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "SEGGER_SYSVIEW.h"
#include "esp_app_trace.h"
#include "esp_app_trace_util.h"
#include "esp_intr_alloc.h"
#include "esp_cpu.h"
#include "soc/soc.h"
#include "soc/interrupts.h"
#include "esp_private/esp_clk.h"
extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
// The application name to be displayed in SystemViewer
#define SYSVIEW_APP_NAME "FreeRTOS Application"
// The target device name
#define SYSVIEW_DEVICE_NAME CONFIG_IDF_TARGET
// The target core name
#if CONFIG_IDF_TARGET_ARCH_XTENSA
#define SYSVIEW_CORE_NAME "xtensa"
#elif CONFIG_IDF_TARGET_ARCH_RISCV
#define SYSVIEW_CORE_NAME "riscv"
#endif
// Determine which timer to use as timestamp source
#if CONFIG_APPTRACE_SV_TS_SOURCE_CCOUNT
#define TS_USE_CCOUNT 1
#elif CONFIG_APPTRACE_SV_TS_SOURCE_ESP_TIMER
#define TS_USE_ESP_TIMER 1
#else
#define TS_USE_TIMERGROUP 1
#endif
#if TS_USE_TIMERGROUP
#include "driver/gptimer.h"
// Timer group timer divisor
#define SYSVIEW_TIMER_DIV 2
// Frequency of the timestamp, using APB as GPTimer source clock
#define SYSVIEW_TIMESTAMP_FREQ (esp_clk_apb_freq() / SYSVIEW_TIMER_DIV)
// GPTimer handle
gptimer_handle_t s_sv_gptimer;
#endif // TS_USE_TIMERGROUP
#if TS_USE_ESP_TIMER
// esp_timer provides 1us resolution
#define SYSVIEW_TIMESTAMP_FREQ (1000000)
#endif // TS_USE_ESP_TIMER
#if TS_USE_CCOUNT
// CCOUNT is incremented at CPU frequency
#define SYSVIEW_TIMESTAMP_FREQ (CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ * 1000000)
#endif // TS_USE_CCOUNT
// System Frequency.
#define SYSVIEW_CPU_FREQ (esp_clk_cpu_freq())
// The lowest RAM address used for IDs (pointers)
#define SYSVIEW_RAM_BASE (SOC_DROM_LOW)
#ifdef CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER
#if CONFIG_FREERTOS_CORETIMER_0
#define SYSTICK_INTR_ID (ETS_INTERNAL_TIMER0_INTR_SOURCE+ETS_INTERNAL_INTR_SOURCE_OFF)
#endif
#if CONFIG_FREERTOS_CORETIMER_1
#define SYSTICK_INTR_ID (ETS_INTERNAL_TIMER1_INTR_SOURCE+ETS_INTERNAL_INTR_SOURCE_OFF)
#endif
#elif CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER
#define SYSTICK_INTR_ID (ETS_SYSTIMER_TARGET0_INTR_SOURCE)
#endif // CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER
// SystemView is single core specific: it implies that SEGGER_SYSVIEW_LOCK()
// disables IRQs (disables rescheduling globally). So we can not use finite timeouts for locks and return error
// in case of expiration, because error will not be handled and SEGGER's code will go further implying that
// everything is fine, so for multi-core env we have to wait on underlying lock forever
#define SEGGER_LOCK_WAIT_TMO ESP_APPTRACE_TMO_INFINITE
static esp_apptrace_lock_t s_sys_view_lock = {.mux = portMUX_INITIALIZER_UNLOCKED, .int_state = 0};
/*********************************************************************
*
* _cbSendSystemDesc()
*
* Function description
* Sends SystemView description strings.
*/
static void _cbSendSystemDesc(void) {
char irq_str[32];
SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",C="SYSVIEW_CORE_NAME",O=FreeRTOS");
snprintf(irq_str, sizeof(irq_str), "I#%d=SysTick", SYSTICK_INTR_ID);
SEGGER_SYSVIEW_SendSysDesc(irq_str);
size_t isr_count = sizeof(esp_isr_names)/sizeof(esp_isr_names[0]);
for (size_t i = 0; i < isr_count; ++i) {
if (esp_isr_names[i] == NULL || (ETS_INTERNAL_INTR_SOURCE_OFF + i) == SYSTICK_INTR_ID)
continue;
snprintf(irq_str, sizeof(irq_str), "I#%d=%s", ETS_INTERNAL_INTR_SOURCE_OFF + i, esp_isr_names[i]);
SEGGER_SYSVIEW_SendSysDesc(irq_str);
}
}
/*********************************************************************
*
* Global functions
*
**********************************************************************
*/
static void SEGGER_SYSVIEW_TS_Init(void)
{
/* We only need to initialize something if we use Timer Group.
* esp_timer and ccount can be used as is.
*/
#if TS_USE_TIMERGROUP
gptimer_config_t config = {
.clk_src = GPTIMER_CLK_SRC_DEFAULT,
.direction = GPTIMER_COUNT_UP,
.resolution_hz = SYSVIEW_TIMESTAMP_FREQ,
};
// pick any free GPTimer instance
ESP_ERROR_CHECK(gptimer_new_timer(&config, &s_sv_gptimer));
/* Start counting */
gptimer_enable(s_sv_gptimer);
gptimer_start(s_sv_gptimer);
#endif // TS_USE_TIMERGROUP
}
void SEGGER_SYSVIEW_Conf(void) {
U32 disable_evts = 0;
SEGGER_SYSVIEW_TS_Init();
SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ,
&SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc);
SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE);
#if !CONFIG_APPTRACE_SV_EVT_OVERFLOW_ENABLE
disable_evts |= SYSVIEW_EVTMASK_OVERFLOW;
#endif
#if !CONFIG_APPTRACE_SV_EVT_ISR_ENTER_ENABLE
disable_evts |= SYSVIEW_EVTMASK_ISR_ENTER;
#endif
#if !CONFIG_APPTRACE_SV_EVT_ISR_EXIT_ENABLE
disable_evts |= SYSVIEW_EVTMASK_ISR_EXIT;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TASK_START_EXEC_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TASK_START_EXEC;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TASK_STOP_EXEC_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TASK_STOP_EXEC;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TASK_START_READY_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TASK_START_READY;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TASK_STOP_READY_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TASK_STOP_READY;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TASK_CREATE_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TASK_CREATE;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TASK_TERMINATE_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TASK_TERMINATE;
#endif
#if !CONFIG_APPTRACE_SV_EVT_IDLE_ENABLE
disable_evts |= SYSVIEW_EVTMASK_IDLE;
#endif
#if !CONFIG_APPTRACE_SV_EVT_ISR_TO_SCHED_ENABLE
disable_evts |= SYSVIEW_EVTMASK_ISR_TO_SCHEDULER;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TIMER_ENTER_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TIMER_ENTER;
#endif
#if !CONFIG_APPTRACE_SV_EVT_TIMER_EXIT_ENABLE
disable_evts |= SYSVIEW_EVTMASK_TIMER_EXIT;
#endif
SEGGER_SYSVIEW_DisableEvents(disable_evts);
}
U32 SEGGER_SYSVIEW_X_GetTimestamp(void)
{
#if TS_USE_TIMERGROUP
uint64_t ts = 0;
gptimer_get_raw_count(s_sv_gptimer, &ts);
return (U32) ts; // return lower part of counter value
#elif TS_USE_CCOUNT
return esp_cpu_get_cycle_count();
#elif TS_USE_ESP_TIMER
return (U32) esp_timer_get_time(); // return lower part of counter value
#endif
}
void SEGGER_SYSVIEW_X_RTT_Lock(void)
{
}
void SEGGER_SYSVIEW_X_RTT_Unlock(void)
{
}
unsigned SEGGER_SYSVIEW_X_SysView_Lock(void)
{
esp_apptrace_tmo_t tmo;
esp_apptrace_tmo_init(&tmo, SEGGER_LOCK_WAIT_TMO);
esp_apptrace_lock_take(&s_sys_view_lock, &tmo);
// to be recursive save IRQ status on the stack of the caller to keep it from overwriting
return s_sys_view_lock.int_state;
}
void SEGGER_SYSVIEW_X_SysView_Unlock(unsigned int_state)
{
s_sys_view_lock.int_state = int_state;
esp_apptrace_lock_give(&s_sys_view_lock);
}
/*************************** End of file ****************************/

View File

@@ -0,0 +1,270 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_FreeRTOS.c
Purpose : Interface between FreeRTOS and SystemView.
Revision: $Rev: 7947 $
*/
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "SEGGER_SYSVIEW.h"
#include "SEGGER_SYSVIEW_FreeRTOS.h"
#include "string.h" // Required for memset
typedef struct SYSVIEW_FREERTOS_TASK_STATUS SYSVIEW_FREERTOS_TASK_STATUS;
struct SYSVIEW_FREERTOS_TASK_STATUS {
U32 xHandle;
const char* pcTaskName;
unsigned uxCurrentPriority;
U32 pxStack;
unsigned uStackHighWaterMark;
};
static SYSVIEW_FREERTOS_TASK_STATUS _aTasks[SYSVIEW_FREERTOS_MAX_NOF_TASKS];
static unsigned _NumTasks;
/*********************************************************************
*
* _cbSendTaskList()
*
* Function description
* This function is part of the link between FreeRTOS and SYSVIEW.
* Called from SystemView when asked by the host, it uses SYSVIEW
* functions to send the entire task list to the host.
*/
static void _cbSendTaskList(void) {
unsigned n;
for (n = 0; n < _NumTasks; n++) {
#if INCLUDE_uxTaskGetStackHighWaterMark // Report Task Stack High Watermark
_aTasks[n].uStackHighWaterMark = uxTaskGetStackHighWaterMark((TaskHandle_t)_aTasks[n].xHandle);
#endif
SYSVIEW_SendTaskInfo((U32)_aTasks[n].xHandle, _aTasks[n].pcTaskName, (unsigned)_aTasks[n].uxCurrentPriority, (U32)_aTasks[n].pxStack, (unsigned)_aTasks[n].uStackHighWaterMark);
}
}
/*********************************************************************
*
* _cbGetTime()
*
* Function description
* This function is part of the link between FreeRTOS and SYSVIEW.
* Called from SystemView when asked by the host, returns the
* current system time in micro seconds.
*/
__attribute__((unused)) static U64 _cbGetTime(void) {
U64 Time;
Time = xTaskGetTickCountFromISR();
Time *= portTICK_PERIOD_MS;
Time *= 1000;
return Time;
}
/*********************************************************************
*
* Global functions
*
**********************************************************************
*/
/*********************************************************************
*
* SYSVIEW_AddTask()
*
* Function description
* Add a task to the internal list and record its information.
*/
void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
/* On multi-core we have several idle tasks with 'IDLEx' names
Not best solution, because we can filter out user tasks starting with 'IDLE'.
But we can not use 'xTaskGetIdleTaskHandle' because at the moment when this
function is called array of idle tasks handles are not initialized yet. */
if (memcmp(pcTaskName, "IDLE", 4) == 0) {
return;
}
if (_NumTasks >= SYSVIEW_FREERTOS_MAX_NOF_TASKS) {
SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached.");
return;
}
_aTasks[_NumTasks].xHandle = xHandle;
_aTasks[_NumTasks].pcTaskName = pcTaskName;
_aTasks[_NumTasks].uxCurrentPriority = uxCurrentPriority;
_aTasks[_NumTasks].pxStack = pxStack;
_aTasks[_NumTasks].uStackHighWaterMark = uStackHighWaterMark;
_NumTasks++;
SYSVIEW_SendTaskInfo(xHandle, pcTaskName,uxCurrentPriority, pxStack, uStackHighWaterMark);
}
/*********************************************************************
*
* SYSVIEW_UpdateTask()
*
* Function description
* Update a task in the internal list and record its information.
*/
void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) {
unsigned n;
/* On multi-core we have several idle tasks with 'IDLEx' names
Not best solution, because we can filter out user tasks starting with 'IDLE'.
But we can not use 'xTaskGetIdleTaskHandle' because at the moment when this
function is called array of idle tasks handles are not initialized yet. */
if (memcmp(pcTaskName, "IDLE", 4) == 0) {
return;
}
for (n = 0; n < _NumTasks; n++) {
if (_aTasks[n].xHandle == xHandle) {
break;
}
}
if (n < _NumTasks) {
_aTasks[n].pcTaskName = pcTaskName;
_aTasks[n].uxCurrentPriority = uxCurrentPriority;
_aTasks[n].pxStack = pxStack;
_aTasks[n].uStackHighWaterMark = uStackHighWaterMark;
SYSVIEW_SendTaskInfo(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark);
} else {
SYSVIEW_AddTask(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark);
}
}
/*********************************************************************
*
* SYSVIEW_DeleteTask()
*
* Function description
* Delete a task from the internal list.
*/
void SYSVIEW_DeleteTask(U32 xHandle) {
unsigned n;
if (_NumTasks == 0) {
return; // Early out
}
for (n = 0; n < _NumTasks; n++) {
if (_aTasks[n].xHandle == xHandle) {
break;
}
}
if (n == (_NumTasks - 1)) {
//
// Task is last item in list.
// Simply zero the item and decrement number of tasks.
//
memset(&_aTasks[n], 0, sizeof(_aTasks[n]));
_NumTasks--;
} else if (n < _NumTasks) {
//
// Task is in the middle of the list.
// Move last item to current position and decrement number of tasks.
// Order of tasks does not really matter, so no need to move all following items.
//
_aTasks[n].xHandle = _aTasks[_NumTasks - 1].xHandle;
_aTasks[n].pcTaskName = _aTasks[_NumTasks - 1].pcTaskName;
_aTasks[n].uxCurrentPriority = _aTasks[_NumTasks - 1].uxCurrentPriority;
_aTasks[n].pxStack = _aTasks[_NumTasks - 1].pxStack;
_aTasks[n].uStackHighWaterMark = _aTasks[_NumTasks - 1].uStackHighWaterMark;
memset(&_aTasks[_NumTasks - 1], 0, sizeof(_aTasks[_NumTasks - 1]));
_NumTasks--;
}
}
/*********************************************************************
*
* SYSVIEW_SendTaskInfo()
*
* Function description
* Record task information.
*/
void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) {
SEGGER_SYSVIEW_TASKINFO TaskInfo;
memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code
TaskInfo.TaskID = TaskID;
TaskInfo.sName = sName;
TaskInfo.Prio = Prio;
TaskInfo.StackBase = StackBase;
TaskInfo.StackSize = StackSize;
SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo);
}
/*********************************************************************
*
* Public API structures
*
**********************************************************************
*/
// Callbacks provided to SYSTEMVIEW by FreeRTOS
const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = {
/* Callback _cbGetTime locks xKernelLock inside xTaskGetTickCountFromISR, this can cause deadlock on multi-core.
To prevent deadlock, always lock xKernelLock before s_sys_view_lock. Omitting the callback here results in sending
SYSVIEW_EVTID_SYSTIME_CYCLES events instead of SYSVIEW_EVTID_SYSTIME_US */
NULL,
_cbSendTaskList,
};
/*************************** End of file ****************************/

View File

@@ -0,0 +1,367 @@
/*
* SPDX-FileCopyrightText: 1995-2021 SEGGER Microcontroller GmbH
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2023 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 1995 - 2021 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: support@segger.com *
* *
**********************************************************************
* *
* SEGGER SystemView * Real-time application analysis *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* SEGGER strongly recommends to not make any changes *
* to or modify the source code of this software in order to stay *
* compatible with the SystemView and RTT protocol, and J-Link. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* o Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************
* *
* SystemView version: 3.42 *
* *
**********************************************************************
-------------------------- END-OF-HEADER -----------------------------
File : SEGGER_SYSVIEW_FreeRTOS.h
Purpose : Interface between FreeRTOS and SystemView.
Tested with FreeRTOS V10.4.3
Revision: $Rev: 7745 $
Notes:
(1) Include this file at the end of FreeRTOSConfig.h
*/
#ifndef SYSVIEW_FREERTOS_H
#define SYSVIEW_FREERTOS_H
#include "SEGGER_SYSVIEW.h"
/*********************************************************************
*
* Defines, configurable
*
**********************************************************************
*/
#define SYSVIEW_FREERTOS_MAX_NOF_TASKS CONFIG_APPTRACE_SV_MAX_TASKS
/*********************************************************************
*
* Defines, fixed
*
**********************************************************************
*/
// for dual-core targets we use event ID to keep core ID bit (0 or 1)
// use the highest - 1 bit of event ID to indicate core ID
// the highest bit can not be used due to event ID encoding method
// this reduces supported ID range to [0..63] (for 1 byte IDs) plus [128..16383] (for 2 bytes IDs)
// so original continuous event IDs range is split into two sub-ranges for 1-bytes IDs and 2-bytes ones
// events which use apiFastID_OFFSET will have 1 byte ID,
// so for the sake of bandwidth economy events which are generated more frequently should use this ID offset
// currently all used events fall into this range
#define apiFastID_OFFSET (32u)
#define apiID_VTASKDELETE (1u)
#define apiID_VTASKDELAY (2u)
#define apiID_VTASKDELAYUNTIL (3u)
#define apiID_VTASKSUSPEND (4u)
#define apiID_ULTASKNOTIFYTAKE (5u)
#define apiID_VTASKNOTIFYGIVEFROMISR (6u)
#define apiID_VTASKPRIORITYINHERIT (7u)
#define apiID_VTASKRESUME (8u)
#define apiID_VTASKSTEPTICK (9u)
#define apiID_XTASKPRIORITYDISINHERIT (10u)
#define apiID_XTASKRESUMEFROMISR (11u)
#define apiID_XTASKGENERICNOTIFY (12u)
#define apiID_XTASKGENERICNOTIFYFROMISR (13u)
#define apiID_XTASKNOTIFYWAIT (14u)
#define apiID_XQUEUEGENERICCREATE (15u)
#define apiID_VQUEUEDELETE (16u)
#define apiID_XQUEUEGENERICRECEIVE (17u)
#define apiID_XQUEUEPEEKFROMISR (18u)
#define apiID_XQUEUERECEIVEFROMISR (19u)
#define apiID_VQUEUEADDTOREGISTRY (20u)
#define apiID_XQUEUEGENERICSEND (21u)
#define apiID_XQUEUEGENERICSENDFROMISR (22u)
#define apiID_VTASKPRIORITYSET (23u)
#define apiID_UXTASKPRIORITYGETFROMISR (24u)
#define apiID_XTASKGETTICKCOUNTFROMISR (25u)
#define apiID_XEVENTGROUPCLEARBITSFROMISR (26u)
#define apiID_XEVENTGROUPSETBITSFROMISR (27u)
#define apiID_XEVENTGROUPGETBITSFROMISR (28u)
#define apiID_XQUEUEGIVEFROMISR (29u)
#define apiID_XQUEUEISQUEUEEMPTYFROMISR (30u)
#define apiID_XQUEUEISQUEUEFULLFROMISR (31u) // the maximum allowed apiID for the first ID range
// events which use apiSlowID_OFFSET will have 2-bytes ID
#define apiSlowID_OFFSET (127u)
#define apiID_VTASKALLOCATEMPUREGIONS (1u)
#define apiID_UXTASKPRIORITYGET (2u)
#define apiID_ETASKGETSTATE (3u)
#define apiID_VTASKSTARTSCHEDULER (4u)
#define apiID_VTASKENDSCHEDULER (5u)
#define apiID_VTASKSUSPENDALL (6u)
#define apiID_XTASKRESUMEALL (7u)
#define apiID_XTASKGETTICKCOUNT (8u)
#define apiID_UXTASKGETNUMBEROFTASKS (9u)
#define apiID_PCTASKGETTASKNAME (10u)
#define apiID_UXTASKGETSTACKHIGHWATERMARK (11u)
#define apiID_VTASKSETAPPLICATIONTASKTAG (12u)
#define apiID_XTASKGETAPPLICATIONTASKTAG (13u)
#define apiID_VTASKSETTHREADLOCALSTORAGEPOINTER (14u)
#define apiID_PVTASKGETTHREADLOCALSTORAGEPOINTER (15u)
#define apiID_XTASKCALLAPPLICATIONTASKHOOK (16u)
#define apiID_XTASKGETIDLETASKHANDLE (17u)
#define apiID_UXTASKGETSYSTEMSTATE (18u)
#define apiID_VTASKLIST (19u)
#define apiID_VTASKGETRUNTIMESTATS (20u)
#define apiID_XTASKNOTIFYSTATECLEAR (21u)
#define apiID_XTASKGETCURRENTTASKHANDLE (22u)
#define apiID_VTASKSETTIMEOUTSTATE (23u)
#define apiID_XTASKCHECKFORTIMEOUT (24u)
#define apiID_VTASKMISSEDYIELD (25u)
#define apiID_XTASKGETSCHEDULERSTATE (26u)
#define apiID_XTASKGENERICCREATE (27u)
#define apiID_UXTASKGETTASKNUMBER (28u)
#define apiID_VTASKSETTASKNUMBER (29u)
#define apiID_ETASKCONFIRMSLEEPMODESTATUS (30u)
#define apiID_XTIMERCREATE (31u)
#define apiID_PVTIMERGETTIMERID (32u)
#define apiID_VTIMERSETTIMERID (33u)
#define apiID_XTIMERISTIMERACTIVE (34u)
#define apiID_XTIMERGETTIMERDAEMONTASKHANDLE (35u)
#define apiID_XTIMERPENDFUNCTIONCALLFROMISR (36u)
#define apiID_XTIMERPENDFUNCTIONCALL (37u)
#define apiID_PCTIMERGETTIMERNAME (38u)
#define apiID_XTIMERCREATETIMERTASK (39u)
#define apiID_XTIMERGENERICCOMMAND (40u)
#define apiID_UXQUEUEMESSAGESWAITING (41u)
#define apiID_UXQUEUESPACESAVAILABLE (42u)
#define apiID_UXQUEUEMESSAGESWAITINGFROMISR (43u)
#define apiID_XQUEUEALTGENERICSEND (44u)
#define apiID_XQUEUEALTGENERICRECEIVE (45u)
#define apiID_XQUEUECRSENDFROMISR (46u)
#define apiID_XQUEUECRRECEIVEFROMISR (47u)
#define apiID_XQUEUECRSEND (48u)
#define apiID_XQUEUECRRECEIVE (49u)
#define apiID_XQUEUECREATEMUTEX (50u)
#define apiID_XQUEUECREATECOUNTINGSEMAPHORE (51u)
#define apiID_XQUEUEGETMUTEXHOLDER (52u)
#define apiID_XQUEUETAKEMUTEXRECURSIVE (53u)
#define apiID_XQUEUEGIVEMUTEXRECURSIVE (54u)
#define apiID_VQUEUEUNREGISTERQUEUE (55u)
#define apiID_XQUEUECREATESET (56u)
#define apiID_XQUEUEADDTOSET (57u)
#define apiID_XQUEUEREMOVEFROMSET (58u)
#define apiID_XQUEUESELECTFROMSET (59u)
#define apiID_XQUEUESELECTFROMSETFROMISR (60u)
#define apiID_XQUEUEGENERICRESET (61u)
#define apiID_VLISTINITIALISE (62u)
#define apiID_VLISTINITIALISEITEM (63u)
#define apiID_VLISTINSERT (64u)
#define apiID_VLISTINSERTEND (65u)
#define apiID_UXLISTREMOVE (66u)
#define apiID_XEVENTGROUPCREATE (67u)
#define apiID_XEVENTGROUPWAITBITS (68u)
#define apiID_XEVENTGROUPCLEARBITS (69u)
#define apiID_XEVENTGROUPSETBITS (70u)
#define apiID_XEVENTGROUPSYNC (71u)
#define apiID_VEVENTGROUPDELETE (72u)
#define apiID_UXEVENTGROUPGETNUMBER (73u)
#define apiID_XSTREAMBUFFERCREATE (74u)
#define apiID_VSTREAMBUFFERDELETE (75u)
#define apiID_XSTREAMBUFFERRESET (76u)
#define apiID_XSTREAMBUFFERSEND (77u)
#define apiID_XSTREAMBUFFERSENDFROMISR (78u)
#define apiID_XSTREAMBUFFERRECEIVE (79u)
#define apiID_XSTREAMBUFFERRECEIVEFROMISR (80u)
#ifdef CONFIG_FREERTOS_SMP
#define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0u, 0u, 0u)
#else // CONFIG_FREERTOS_SMP
#if ( configUSE_QUEUE_SETS != 1 )
#define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition)
#else
#define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0u, 0u, 0u)
#endif
#endif // CONFIG_FREERTOS_SMP
#define traceSTART() SEGGER_SYSVIEW_Conf()
#define traceTASK_NOTIFY_TAKE(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_ULTASKNOTIFYTAKE, xClearCountOnExit, xTicksToWait)
#define traceTASK_DELAY() SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_VTASKDELAY, xTicksToDelay)
#define traceTASK_DELAY_UNTIL(xTimeToWake) SEGGER_SYSVIEW_RecordVoid (apiFastID_OFFSET + apiID_VTASKDELAYUNTIL)
#define traceTASK_NOTIFY_GIVE_FROM_ISR(uxIndexToNotify) SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_VTASKNOTIFYGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), (U32)pxHigherPriorityTaskWoken)
#define traceTASK_PRIORITY_INHERIT( pxTCB, uxPriority ) SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_VTASKPRIORITYINHERIT, (U32)pxMutexHolder)
#define traceTASK_RESUME( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_VTASKRESUME, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB))
#define traceINCREASE_TICK_COUNT( xTicksToJump ) SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_VTASKSTEPTICK, xTicksToJump)
#define traceTASK_SUSPEND( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_VTASKSUSPEND, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB))
#define traceTASK_PRIORITY_DISINHERIT( pxTCB, uxBasePriority ) SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_XTASKPRIORITYDISINHERIT, (U32)pxMutexHolder)
#define traceTASK_RESUME_FROM_ISR( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_XTASKRESUMEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB))
#define traceTASK_NOTIFY(uxIndexToNotify) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XTASKGENERICNOTIFY, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue)
#define traceTASK_NOTIFY_FROM_ISR(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x5(apiFastID_OFFSET + apiID_XTASKGENERICNOTIFYFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue, (U32)pxHigherPriorityTaskWoken)
#define traceTASK_NOTIFY_WAIT(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XTASKNOTIFYWAIT, ulBitsToClearOnEntry, ulBitsToClearOnExit, (U32)pulNotificationValue, xTicksToWait)
#define traceQUEUE_CREATE( pxNewQueue ) SEGGER_SYSVIEW_RecordU32x3(apiFastID_OFFSET + apiID_XQUEUEGENERICCREATE, uxQueueLength, uxItemSize, ucQueueType)
#define traceQUEUE_DELETE( pxQueue ) SEGGER_SYSVIEW_RecordU32 (apiFastID_OFFSET + apiID_VQUEUEDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue))
#define traceQUEUE_PEEK( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, 1)
#define traceQUEUE_PEEK_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer))
#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer))
#define traceQUEUE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1)
#define traceQUEUE_RECEIVE_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1)
#define traceQUEUE_SEMAPHORE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 0)
#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiFastID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken)
#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiFastID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken)
#define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ) SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_VQUEUEADDTOREGISTRY, SEGGER_SYSVIEW_ShrinkId((U32)xQueue), (U32)pcQueueName)
#define traceQUEUE_SEND_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition)
#define traceQUEUE_SEND_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, (U32)pxHigherPriorityTaskWoken, xCopyPosition)
#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiFastID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, (U32)pxHigherPriorityTaskWoken, xCopyPosition)
#define traceQUEUE_GIVE_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
#define traceQUEUE_GIVE_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET + apiID_XQUEUEGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken)
#define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, (U32)pxStreamBuffer)
#define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, 0u)
#define traceSTREAM_BUFFER_DELETE( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiSlowID_OFFSET + apiID_VSTREAMBUFFERDELETE, (U32)xStreamBuffer)
#define traceSTREAM_BUFFER_RESET( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiSlowID_OFFSET + apiID_XSTREAMBUFFERRESET, (U32)xStreamBuffer)
#define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, (U32)xBytesSent)
#define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, 0u)
#define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERSENDFROMISR, (U32)xStreamBuffer, (U32)xBytesSent)
#define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, (U32)xReceivedLength)
#define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, 0u)
#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiSlowID_OFFSET + apiID_XSTREAMBUFFERRECEIVEFROMISR, (U32)xStreamBuffer, (U32)xReceivedLength)
#define traceTASK_DELETE( pxTCB ) do { \
SEGGER_SYSVIEW_RecordU32(apiFastID_OFFSET + apiID_VTASKDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)); \
SYSVIEW_DeleteTask((U32)pxTCB); \
} while(0)
#if( portSTACK_GROWTH < 0 )
#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \
SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \
SYSVIEW_AddTask((U32)pxNewTCB, \
&(pxNewTCB->pcTaskName[0]), \
pxNewTCB->uxPriority, \
(U32)pxNewTCB->pxStack, \
((U32)pxNewTCB->pxTopOfStack - (U32)pxNewTCB->pxStack) \
); \
}
#else
#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \
SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \
SYSVIEW_AddTask((U32)pxNewTCB, \
&(pxNewTCB->pcTaskName[0]), \
pxNewTCB->uxPriority, \
(U32)pxNewTCB->pxStack, \
(U32)(pxNewTCB->pxStack-pxNewTCB->pxTopOfStack) \
); \
}
#endif
#define traceTASK_PRIORITY_SET(pxTask, uxNewPriority) { \
SEGGER_SYSVIEW_RecordU32x2(apiFastID_OFFSET+apiID_VTASKPRIORITYSET, \
SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), \
uxNewPriority \
); \
SYSVIEW_UpdateTask((U32)pxTask, \
&(pxTask->pcTaskName[0]), \
uxNewPriority, \
(U32)pxTask->pxStack, \
0 \
); \
}
//
// Define INCLUDE_xTaskGetIdleTaskHandle as 1 in FreeRTOSConfig.h to allow identification of Idle state.
//
// SMP FreeRTOS uses unpinned IDLE tasks, so sometimes IDEL0 runs on CPU1, IDLE1 runs on CPU0 and so on.
// So IDLE state detection based on 'xTaskGetIdleTaskHandle' does not work for SMP kernel.
// We could compare current task handle with every element of the array returned by 'xTaskGetIdleTaskHandle',
// but it deos not seem to be efficient enough to be worth of making code more complex and less readabl.
// So always use task name comparison mechanism for SMP kernel.
#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 && !defined(CONFIG_FREERTOS_SMP))
#define traceTASK_SWITCHED_IN() if(prvGetTCBFromHandle(NULL) == xTaskGetIdleTaskHandle()) { \
SEGGER_SYSVIEW_OnIdle(); \
} else { \
SEGGER_SYSVIEW_OnTaskStartExec((U32)prvGetTCBFromHandle(NULL)); \
}
#else
#define traceTASK_SWITCHED_IN() { \
if (memcmp(prvGetTCBFromHandle(NULL)->pcTaskName, "IDLE", 4) != 0) { \
SEGGER_SYSVIEW_OnTaskStartExec((U32)prvGetTCBFromHandle(NULL)); \
} else { \
SEGGER_SYSVIEW_OnIdle(); \
} \
}
#endif
#define traceMOVED_TASK_TO_READY_STATE(pxTCB) SEGGER_SYSVIEW_OnTaskStartReady((U32)pxTCB)
#define traceREADDED_TASK_TO_READY_STATE(pxTCB)
#define traceMOVED_TASK_TO_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)prvGetTCBFromHandle(NULL), (1u << 2))
#define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)prvGetTCBFromHandle(NULL), (1u << 2))
#define traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB) SEGGER_SYSVIEW_OnTaskStopReady((U32)pxTCB, ((3u << 3) | 3))
#define traceISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler()
#define traceISR_EXIT() SEGGER_SYSVIEW_RecordExitISR()
#define traceISR_ENTER(n) SEGGER_SYSVIEW_RecordEnterISR(n)
/*********************************************************************
*
* API functions
*
**********************************************************************
*/
#ifdef __cplusplus
extern "C" {
#endif
void SYSVIEW_AddTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark);
void SYSVIEW_UpdateTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark);
void SYSVIEW_DeleteTask (U32 xHandle);
void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize);
#ifdef __cplusplus
}
#endif
#endif
/*************************** End of file ****************************/

View File

@@ -0,0 +1,306 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "string.h"
#include "freertos/FreeRTOS.h"
#include "SEGGER_RTT.h"
#include "SEGGER_SYSVIEW.h"
#include "SEGGER_SYSVIEW_Conf.h"
#include "esp_app_trace.h"
#include "esp_log.h"
#include "esp_cpu.h"
#include "esp_private/startup_internal.h"
const static char *TAG = "segger_rtt";
#define SYSVIEW_EVENTS_BUF_SZ 255U
// size of down channel data buf
#define SYSVIEW_DOWN_BUF_SIZE 32
#define SEGGER_STOP_WAIT_TMO 1000000 //us
#if CONFIG_APPTRACE_SV_BUF_WAIT_TMO == -1
#define SEGGER_HOST_WAIT_TMO ESP_APPTRACE_TMO_INFINITE
#else
#define SEGGER_HOST_WAIT_TMO CONFIG_APPTRACE_SV_BUF_WAIT_TMO
#endif
static uint8_t s_events_buf[SYSVIEW_EVENTS_BUF_SZ];
static uint16_t s_events_buf_filled;
static uint8_t s_down_buf[SYSVIEW_DOWN_BUF_SIZE];
#if CONFIG_APPTRACE_SV_DEST_UART
#define ESP_APPTRACE_DEST_SYSVIEW ESP_APPTRACE_DEST_UART
#if CONFIG_APPTRACE_SV_DEST_CPU_0 || CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
#define APPTRACE_SV_DEST_CPU 0
#else
#define APPTRACE_SV_DEST_CPU 1
#endif // CONFIG_APPTRACE_SV_DEST_CPU_0
#elif CONFIG_APPTRACE_SV_DEST_JTAG || (CONFIG_APPTRACE_ENABLE && CONFIG_APPTRACE_DEST_UART_NONE)
#define ESP_APPTRACE_DEST_SYSVIEW ESP_APPTRACE_DEST_TRAX
#endif
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* SEGGER_RTT_ESP_FlushNoLock()
*
* Function description
* Flushes buffered events.
*
* Parameters
* min_sz Threshold for flushing data. If current filling level is above this value, data will be flushed. TRAX destinations only.
* tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinetly.
*
* Return value
* None.
*/
void SEGGER_RTT_ESP_FlushNoLock(unsigned long min_sz, unsigned long tmo)
{
esp_err_t res;
if (s_events_buf_filled > 0) {
res = esp_apptrace_write(ESP_APPTRACE_DEST_SYSVIEW, s_events_buf, s_events_buf_filled, tmo);
if (res != ESP_OK) {
ESP_LOGE(TAG, "Failed to flush buffered events (%d)!", res);
}
}
// flush even if we failed to write buffered events, because no new events will be sent after STOP
res = esp_apptrace_flush_nolock(ESP_APPTRACE_DEST_SYSVIEW, min_sz, tmo);
if (res != ESP_OK) {
ESP_LOGE(TAG, "Failed to flush apptrace data (%d)!", res);
}
s_events_buf_filled = 0;
}
/*********************************************************************
*
* SEGGER_RTT_ESP_Flush()
*
* Function description
* Flushes buffered events.
*
* Parameters
* min_sz Threshold for flushing data. If current filling level is above this value, data will be flushed. TRAX destinations only.
* tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinetly.
*
* Return value
* None.
*/
void SEGGER_RTT_ESP_Flush(unsigned long min_sz, unsigned long tmo)
{
SEGGER_SYSVIEW_LOCK();
SEGGER_RTT_ESP_FlushNoLock(min_sz, tmo);
SEGGER_SYSVIEW_UNLOCK();
}
/*********************************************************************
*
* SEGGER_RTT_ReadNoLock()
*
* Function description
* Reads characters from SEGGER real-time-terminal control block
* which have been previously stored by the host.
* Do not lock against interrupts and multiple access.
*
* Parameters
* BufferIndex Index of Down-buffer to be used (e.g. 0 for "Terminal").
* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-down-buffer to.
* BufferSize Size of the target application buffer.
*
* Return value
* Number of bytes that have been read.
*/
unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned BufferSize) {
uint32_t size = BufferSize;
esp_err_t res = esp_apptrace_read(ESP_APPTRACE_DEST_SYSVIEW, pData, &size, 0);
if (res != ESP_OK) {
return 0;
}
return size;
}
/*********************************************************************
*
* SEGGER_RTT_WriteSkipNoLock
*
* Function description
* Stores a specified number of characters in SEGGER RTT
* control block which is then read by the host.
* SEGGER_RTT_WriteSkipNoLock does not lock the application and
* skips all data, if the data does not fit into the buffer.
*
* Parameters
* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal").
* pBuffer Pointer to character array. Does not need to point to a \0 terminated string.
* NumBytes Number of bytes to be stored in the SEGGER RTT control block.
*
* Return value
* Number of bytes which have been stored in the "Up"-buffer.
*
* Notes
* (1) If there is not enough space in the "Up"-buffer, all data is dropped.
* (2) For performance reasons this function does not call Init()
* and may only be called after RTT has been initialized.
* Either by calling SEGGER_RTT_Init() or calling another RTT API function first.
*/
unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) {
uint8_t *pbuf = (uint8_t *)pBuffer;
uint8_t event_id = *pbuf;
#if CONFIG_APPTRACE_SV_DEST_UART
if (
(APPTRACE_SV_DEST_CPU != esp_cpu_get_core_id()) &&
(
(event_id == SYSVIEW_EVTID_ISR_ENTER) ||
(event_id == SYSVIEW_EVTID_ISR_EXIT) ||
(event_id == SYSVIEW_EVTID_TASK_START_EXEC) ||
(event_id == SYSVIEW_EVTID_TASK_STOP_EXEC) ||
(event_id == SYSVIEW_EVTID_TASK_START_READY) ||
(event_id == SYSVIEW_EVTID_TASK_STOP_READY) ||
(event_id == SYSVIEW_EVTID_MARK_START) ||
(event_id == SYSVIEW_EVTID_MARK_STOP) ||
(event_id == SYSVIEW_EVTID_TIMER_ENTER) ||
(event_id == SYSVIEW_EVTID_TIMER_EXIT) ||
(event_id == SYSVIEW_EVTID_STACK_INFO) ||
(event_id == SYSVIEW_EVTID_MODULEDESC)
)
){
return NumBytes;
}
// This is workaround for SystemView!
// Without this line SystemView will hangs on when heap tracing enabled.
if(event_id == SYSVIEW_EVTID_MODULEDESC){
return NumBytes;
}
#endif // CONFIG_APPTRACE_SV_DEST_UART
if (NumBytes > SYSVIEW_EVENTS_BUF_SZ) {
ESP_LOGE(TAG, "Too large event %u bytes!", NumBytes);
return 0;
}
#if CONFIG_APPTRACE_SV_DEST_JTAG
if (esp_cpu_get_core_id()) { // dual core specific code
// use the highest - 1 bit of event ID to indicate core ID
// the highest bit can not be used due to event ID encoding method
// this reduces supported ID range to [0..63] (for 1 byte IDs) plus [128..16383] (for 2 bytes IDs)
if (*pbuf & 0x80) { // 2 bytes ID
*(pbuf + 1) |= (1 << 6);
} else if (NumBytes != 10 || *pbuf != 0) { // ignore sync sequence
*pbuf |= (1 << 6);
}
}
#endif // CONFIG_APPTRACE_SV_DEST_JTAG
#if CONFIG_APPTRACE_SV_DEST_JTAG
if (s_events_buf_filled + NumBytes > SYSVIEW_EVENTS_BUF_SZ) {
esp_err_t res = esp_apptrace_write(ESP_APPTRACE_DEST_SYSVIEW, s_events_buf, s_events_buf_filled, SEGGER_HOST_WAIT_TMO);
if (res != ESP_OK) {
return 0; // skip current data buffer only, accumulated events are kept
}
s_events_buf_filled = 0;
}
#endif
memcpy(&s_events_buf[s_events_buf_filled], pBuffer, NumBytes);
s_events_buf_filled += NumBytes;
#if CONFIG_APPTRACE_SV_DEST_UART
esp_err_t res = esp_apptrace_write(ESP_APPTRACE_DEST_SYSVIEW, pBuffer, NumBytes, SEGGER_HOST_WAIT_TMO);
if (res != ESP_OK)
{
return 0; // skip current data buffer only, accumulated events are kept
}
s_events_buf_filled = 0;
#endif
if (event_id == SYSVIEW_EVTID_TRACE_STOP)
{
SEGGER_RTT_ESP_FlushNoLock(0, SEGGER_STOP_WAIT_TMO);
}
return NumBytes;
}
/*********************************************************************
*
* SEGGER_RTT_ConfigUpBuffer
*
* Function description
* Run-time configuration of a specific up-buffer (T->H).
* Buffer to be configured is specified by index.
* This includes: Buffer address, size, name, flags, ...
*
* Parameters
* BufferIndex Index of the buffer to configure.
* sName Pointer to a constant name string.
* pBuffer Pointer to a buffer to be used.
* BufferSize Size of the buffer.
* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message).
*
* Return value
* >= 0 - O.K.
* < 0 - Error
*
* Additional information
* Buffer 0 is configured on compile-time.
* May only be called once per buffer.
* Buffer name and flags can be reconfigured using the appropriate functions.
*/
int SEGGER_RTT_ConfigUpBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) {
s_events_buf_filled = 0;
return 0;
}
/*********************************************************************
*
* SEGGER_RTT_ConfigDownBuffer
*
* Function description
* Run-time configuration of a specific down-buffer (H->T).
* Buffer to be configured is specified by index.
* This includes: Buffer address, size, name, flags, ...
*
* Parameters
* BufferIndex Index of the buffer to configure.
* sName Pointer to a constant name string.
* pBuffer Pointer to a buffer to be used.
* BufferSize Size of the buffer.
* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message).
*
* Return value
* >= 0 O.K.
* < 0 Error
*
* Additional information
* Buffer 0 is configured on compile-time.
* May only be called once per buffer.
* Buffer name and flags can be reconfigured using the appropriate functions.
*/
int SEGGER_RTT_ConfigDownBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) {
esp_apptrace_down_buffer_config(s_down_buf, sizeof(s_down_buf));
return 0;
}
/*************************** Init hook ****************************
*
* This init function is placed here because this port file will be
* linked whenever SystemView is used.
*/
ESP_SYSTEM_INIT_FN(sysview_init, SECONDARY, BIT(0), 120)
{
SEGGER_SYSVIEW_Conf();
return ESP_OK;
}
/*************************** End of file ****************************/

View File

@@ -0,0 +1,92 @@
/*
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include <sdkconfig.h>
#include "SEGGER_SYSVIEW.h"
#include "SEGGER_RTT.h"
#include "esp_app_trace.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
const static char *TAG = "sysview_heap_trace";
#ifdef CONFIG_HEAP_TRACING_STACK_DEPTH
#define CALLSTACK_SIZE CONFIG_HEAP_TRACING_STACK_DEPTH
#else
#define CALLSTACK_SIZE 0
#endif
static SEGGER_SYSVIEW_MODULE s_esp_sysview_heap_module = {
.sModule = "M=ESP32 SystemView Heap Tracing Module",
.NumEvents = 2,
};
static bool s_mod_registered;
esp_err_t esp_sysview_heap_trace_start(uint32_t tmo)
{
uint32_t tmo_ticks = tmo/(1000*portTICK_PERIOD_MS);
ESP_EARLY_LOGV(TAG, "%s", __func__);
do {
if (tmo != (uint32_t)-1) {
// Currently timeout implementation is simple and has granularity of 1 OS tick,
// so just count down the number of times to call vTaskDelay
if (tmo_ticks-- == 0) {
return ESP_ERR_TIMEOUT;
}
}
vTaskDelay(1);
} while(!SEGGER_SYSVIEW_Started());
SEGGER_SYSVIEW_RegisterModule(&s_esp_sysview_heap_module);
s_mod_registered = true;
return ESP_OK;
}
esp_err_t esp_sysview_heap_trace_stop(void)
{
ESP_EARLY_LOGV(TAG, "%s", __func__);
SEGGER_RTT_ESP_Flush(0, ESP_APPTRACE_TMO_INFINITE);
return ESP_OK;
}
void esp_sysview_heap_trace_alloc(const void *addr, uint32_t size, const void *callers)
{
U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + (2+CALLSTACK_SIZE)*SEGGER_SYSVIEW_QUANTA_U32];
U8* pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket);
U32 *calls = (U32 *)callers;
if (!s_mod_registered) {
return;
}
ESP_EARLY_LOGV(TAG, "%s %p %lu", __func__, addr, size);
pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, (U32)addr);
pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, size);
for (int i = 0; i < CALLSTACK_SIZE; i++) {
pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, calls[i]);
}
SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, s_esp_sysview_heap_module.EventOffset + 0);
}
void esp_sysview_heap_trace_free(const void *addr, const void *callers)
{
U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + (1+CALLSTACK_SIZE)*SEGGER_SYSVIEW_QUANTA_U32];
U8* pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket);
U32 *calls = (U32 *)callers;
if (!s_mod_registered) {
return;
}
ESP_EARLY_LOGV(TAG, "%s %p", __func__, addr);
pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, (U32)addr);
for (int i = 0; i < CALLSTACK_SIZE; i++) {
pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, calls[i]);
}
SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, s_esp_sysview_heap_module.EventOffset + 1);
}

View File

@@ -0,0 +1,26 @@
/*
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <stdarg.h>
#include <sdkconfig.h>
#include "SEGGER_SYSVIEW_Int.h"
#include "freertos/FreeRTOS.h"
static portMUX_TYPE s_log_mutex = portMUX_INITIALIZER_UNLOCKED;
int esp_sysview_vprintf(const char * format, va_list args)
{
static char log_buffer[SEGGER_SYSVIEW_MAX_STRING_LEN];
portENTER_CRITICAL(&s_log_mutex);
size_t len = vsnprintf(log_buffer, sizeof(log_buffer), format, args);
if (len > sizeof(log_buffer) - 1) {
log_buffer[sizeof(log_buffer) - 1] = 0;
}
SEGGER_SYSVIEW_Print(log_buffer);
portEXIT_CRITICAL(&s_log_mutex);
return len;
}

View File

@@ -2,9 +2,12 @@
components/app_trace/test_apps:
depends_components:
- esp_trace
- esp_driver_gptimer
- app_trace
- esp_timer
- soc
- driver
- esp_hw_support
disable:
- if: IDF_TARGET in ["esp32h21", "esp32h4"]
- if: IDF_TARGET == "esp32c5"
temporary: true
reason: not support yet # TODO: [ESP32H21] IDF-11539 [ESP32H4] IDF-12325
reason: not support yet # TODO: [ESP32C5] IDF-8705

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.22)
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(COMPONENTS main)

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
# app_trace test
@@ -8,4 +8,9 @@ To build and run this test app for app_trace related tests:
IDF_TARGET=esp32 idf.py @app_trace build flash monitor
```
`@app_trace` argument apply additional `idf.py` options, from [app_trace](app_trace) and file.
To build and run this test app for SystemView related tests:
```bash
IDF_TARGET=esp32 idf.py @sysview build flash monitor
```
`@app_trace` and `@sysview` arguments apply additional `idf.py` options, from [app_trace](app_trace) and [sysview](sysview) files.

View File

@@ -1,4 +1,4 @@
idf_component_register(SRCS "test_app_trace_main.c" "test_trace.c"
INCLUDE_DIRS "."
PRIV_REQUIRES esp_trace unity esp_driver_gptimer
PRIV_REQUIRES app_trace unity esp_driver_gptimer
WHOLE_ARCHIVE)

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -16,16 +16,17 @@
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/task.h"
#include "esp_app_trace.h"
#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
#include "esp_log.h"
#include "esp_app_trace.h"
#include "esp_app_trace_util.h"
#define ESP_APPTRACE_TEST_USE_PRINT_LOCK 0
#define ESP_APPTRACE_TEST_PRN_WRERR_MAX 5
#define ESP_APPTRACE_TEST_BLOCKS_BEFORE_CRASH 100
#define ESP_APPTRACE_TEST_BLOCK_SIZE 1024
#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
#include "esp_log.h"
const static char *TAG = "esp_apptrace_test";
#if ESP_APPTRACE_TEST_USE_PRINT_LOCK == 1
@@ -65,9 +66,10 @@ const static char *TAG = "esp_apptrace_test";
#define ESP_APPTRACE_TEST_LOGV( format, ... ) ESP_APPTRACE_TEST_LOG_LEVEL(V, ESP_LOG_VERBOSE, format, ##__VA_ARGS__)
#define ESP_APPTRACE_TEST_LOGO( format, ... ) ESP_APPTRACE_TEST_LOG_LEVEL(E, ESP_LOG_NONE, format, ##__VA_ARGS__)
#define ESP_APPTRACE_TEST_WRITE(_b_, _s_) esp_apptrace_write(_b_, _s_, ESP_APPTRACE_TMO_INFINITE)
#define ESP_APPTRACE_TEST_WRITE_FROM_ISR(_b_, _s_) esp_apptrace_write(_b_, _s_, 0UL)
#define ESP_APPTRACE_TEST_WRITE_NOWAIT(_b_, _s_) esp_apptrace_write(_b_, _s_, 0)
#if CONFIG_APPTRACE_SV_ENABLE == 0
#define ESP_APPTRACE_TEST_WRITE(_b_, _s_) esp_apptrace_write(ESP_APPTRACE_DEST_TRAX, _b_, _s_, ESP_APPTRACE_TMO_INFINITE)
#define ESP_APPTRACE_TEST_WRITE_FROM_ISR(_b_, _s_) esp_apptrace_write(ESP_APPTRACE_DEST_TRAX, _b_, _s_, 0UL)
#define ESP_APPTRACE_TEST_WRITE_NOWAIT(_b_, _s_) esp_apptrace_write(ESP_APPTRACE_DEST_TRAX, _b_, _s_, 0)
typedef struct {
uint8_t *buf;
@@ -623,7 +625,7 @@ static int esp_logtrace_printf(const char *fmt, ...)
va_start(ap, fmt);
int ret = esp_apptrace_vprintf_to(ESP_APPTRACE_TMO_INFINITE, fmt, ap);
int ret = esp_apptrace_vprintf_to(ESP_APPTRACE_DEST_TRAX, ESP_APPTRACE_TMO_INFINITE, fmt, ap);
va_end(ap);
@@ -655,7 +657,7 @@ static void esp_logtrace_task(void *p)
break;
}
}
esp_err_t ret = esp_apptrace_flush(ESP_APPTRACE_TMO_INFINITE);
esp_err_t ret = esp_apptrace_flush(ESP_APPTRACE_DEST_TRAX, ESP_APPTRACE_TMO_INFINITE);
if (ret != ESP_OK) {
ESP_APPTRACE_TEST_LOGE("Failed to flush printf buf (%d)!", ret);
}
@@ -692,3 +694,233 @@ TEST_CASE("Log trace test (2 tasks)", "[trace][ignore]")
xSemaphoreTake(arg2.done, portMAX_DELAY);
vSemaphoreDelete(arg2.done);
}
#else // #if CONFIG_APPTRACE_SV_ENABLE == 0
typedef struct {
gptimer_handle_t gptimer;
uint32_t period;
int flags;
uint32_t id;
} esp_sysviewtrace_timer_arg_t;
typedef struct {
SemaphoreHandle_t done;
SemaphoreHandle_t *sync;
esp_sysviewtrace_timer_arg_t *timer;
uint32_t work_count;
uint32_t sleep_tmo;
uint32_t id;
} esp_sysviewtrace_task_arg_t;
static bool esp_sysview_test_timer_isr(gptimer_handle_t timer, const gptimer_alarm_event_data_t *edata, void *user_ctx)
{
esp_sysviewtrace_timer_arg_t *tim_arg = (esp_sysviewtrace_timer_arg_t *)user_ctx;
(void) tim_arg;
return false;
}
static void esp_sysviewtrace_test_task(void *p)
{
esp_sysviewtrace_task_arg_t *arg = (esp_sysviewtrace_task_arg_t *) p;
volatile uint32_t tmp = 0;
printf("%p: run sysview task\n", xTaskGetCurrentTaskHandle());
if (arg->timer) {
gptimer_alarm_config_t alarm_config = {
.reload_count = 0,
.alarm_count = arg->timer->period,
.flags.auto_reload_on_alarm = true,
};
gptimer_event_callbacks_t cbs = {
.on_alarm = esp_sysview_test_timer_isr,
};
TEST_ESP_OK(gptimer_register_event_callbacks(arg->timer->gptimer, &cbs, arg->timer));
TEST_ESP_OK(gptimer_enable(arg->timer->gptimer));
TEST_ESP_OK(gptimer_set_alarm_action(arg->timer->gptimer, &alarm_config));
TEST_ESP_OK(gptimer_start(arg->timer->gptimer));
}
int i = 0;
while (1) {
static uint32_t count;
printf("%" PRIu32, arg->id);
if ((++count % 80) == 0) {
printf("\n");
}
if (arg->sync) {
xSemaphoreTake(*arg->sync, portMAX_DELAY);
}
for (uint32_t k = 0; k < arg->work_count; k++) {
tmp++;
}
vTaskDelay(arg->sleep_tmo / portTICK_PERIOD_MS);
i++;
if (arg->sync) {
xSemaphoreGive(*arg->sync);
}
}
ESP_APPTRACE_TEST_LOGI("%p: finished", xTaskGetCurrentTaskHandle());
xSemaphoreGive(arg->done);
vTaskDelay(1);
vTaskDelete(NULL);
}
TEST_CASE("SysView trace test 1", "[trace][ignore]")
{
TaskHandle_t thnd;
esp_sysviewtrace_timer_arg_t tim_arg1 = {
.flags = ESP_INTR_FLAG_SHARED,
.id = 0,
.period = 500,
};
esp_sysviewtrace_task_arg_t arg1 = {
.done = xSemaphoreCreateBinary(),
.sync = NULL,
.work_count = 10000,
.sleep_tmo = 1,
.timer = &tim_arg1,
.id = 0,
};
esp_sysviewtrace_timer_arg_t tim_arg2 = {
.flags = 0,
.id = 1,
.period = 100,
};
esp_sysviewtrace_task_arg_t arg2 = {
.done = xSemaphoreCreateBinary(),
.sync = NULL,
.work_count = 10000,
.sleep_tmo = 1,
.timer = &tim_arg2,
.id = 1,
};
gptimer_config_t timer_config = {
.clk_src = GPTIMER_CLK_SRC_DEFAULT,
.direction = GPTIMER_COUNT_UP,
.resolution_hz = 1000000,
};
timer_config.flags.intr_shared = (tim_arg1.flags & ESP_INTR_FLAG_SHARED) == ESP_INTR_FLAG_SHARED;
TEST_ESP_OK(gptimer_new_timer(&timer_config, &tim_arg1.gptimer));
timer_config.flags.intr_shared = (tim_arg2.flags & ESP_INTR_FLAG_SHARED) == ESP_INTR_FLAG_SHARED;
TEST_ESP_OK(gptimer_new_timer(&timer_config, &tim_arg2.gptimer));
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svtrace0", 2048, &arg1, 3, &thnd, 0);
ESP_APPTRACE_TEST_LOGI("Created task %p", thnd);
#if CONFIG_FREERTOS_UNICORE == 0
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svtrace1", 2048, &arg2, 5, &thnd, 1);
#else
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svtrace1", 2048, &arg2, 5, &thnd, 0);
#endif
ESP_APPTRACE_TEST_LOGI("Created task %p", thnd);
xSemaphoreTake(arg1.done, portMAX_DELAY);
vSemaphoreDelete(arg1.done);
xSemaphoreTake(arg2.done, portMAX_DELAY);
vSemaphoreDelete(arg2.done);
TEST_ESP_OK(gptimer_stop(tim_arg1.gptimer));
TEST_ESP_OK(gptimer_disable(tim_arg1.gptimer));
TEST_ESP_OK(gptimer_del_timer(tim_arg1.gptimer));
TEST_ESP_OK(gptimer_stop(tim_arg2.gptimer));
TEST_ESP_OK(gptimer_disable(tim_arg2.gptimer));
TEST_ESP_OK(gptimer_del_timer(tim_arg2.gptimer));
}
TEST_CASE("SysView trace test 2", "[trace][ignore]")
{
TaskHandle_t thnd;
esp_sysviewtrace_timer_arg_t tim_arg1 = {
.flags = ESP_INTR_FLAG_SHARED,
.id = 0,
.period = 500,
};
esp_sysviewtrace_task_arg_t arg1 = {
.done = xSemaphoreCreateBinary(),
.sync = NULL,
.work_count = 10000,
.sleep_tmo = 1,
.timer = &tim_arg1,
.id = 0,
};
esp_sysviewtrace_timer_arg_t tim_arg2 = {
.flags = 0,
.id = 1,
.period = 100,
};
esp_sysviewtrace_task_arg_t arg2 = {
.done = xSemaphoreCreateBinary(),
.sync = NULL,
.work_count = 10000,
.sleep_tmo = 1,
.timer = &tim_arg2,
.id = 1,
};
SemaphoreHandle_t test_sync = xSemaphoreCreateBinary();
xSemaphoreGive(test_sync);
esp_sysviewtrace_task_arg_t arg3 = {
.done = xSemaphoreCreateBinary(),
.sync = &test_sync,
.work_count = 1000,
.sleep_tmo = 1,
.timer = NULL,
.id = 2,
};
esp_sysviewtrace_task_arg_t arg4 = {
.done = xSemaphoreCreateBinary(),
.sync = &test_sync,
.work_count = 10000,
.sleep_tmo = 1,
.timer = NULL,
.id = 3,
};
gptimer_config_t timer_config = {
.clk_src = GPTIMER_CLK_SRC_DEFAULT,
.direction = GPTIMER_COUNT_UP,
.resolution_hz = 1000000,
};
timer_config.flags.intr_shared = (tim_arg1.flags & ESP_INTR_FLAG_SHARED) == ESP_INTR_FLAG_SHARED;
TEST_ESP_OK(gptimer_new_timer(&timer_config, &tim_arg1.gptimer));
timer_config.flags.intr_shared = (tim_arg2.flags & ESP_INTR_FLAG_SHARED) == ESP_INTR_FLAG_SHARED;
TEST_ESP_OK(gptimer_new_timer(&timer_config, &tim_arg2.gptimer));
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svtrace0", 2048, &arg1, 3, &thnd, 0);
printf("Created task %p\n", thnd);
#if CONFIG_FREERTOS_UNICORE == 0
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svtrace1", 2048, &arg2, 4, &thnd, 1);
#else
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svtrace1", 2048, &arg2, 4, &thnd, 0);
#endif
printf("Created task %p\n", thnd);
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svsync0", 2048, &arg3, 3, &thnd, 0);
printf("Created task %p\n", thnd);
#if CONFIG_FREERTOS_UNICORE == 0
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svsync1", 2048, &arg4, 5, &thnd, 1);
#else
xTaskCreatePinnedToCore(esp_sysviewtrace_test_task, "svsync1", 2048, &arg4, 5, &thnd, 0);
#endif
printf("Created task %p\n", thnd);
xSemaphoreTake(arg1.done, portMAX_DELAY);
vSemaphoreDelete(arg1.done);
xSemaphoreTake(arg2.done, portMAX_DELAY);
vSemaphoreDelete(arg2.done);
xSemaphoreTake(arg3.done, portMAX_DELAY);
vSemaphoreDelete(arg3.done);
xSemaphoreTake(arg4.done, portMAX_DELAY);
vSemaphoreDelete(arg4.done);
vSemaphoreDelete(test_sync);
TEST_ESP_OK(gptimer_stop(tim_arg1.gptimer));
TEST_ESP_OK(gptimer_disable(tim_arg1.gptimer));
TEST_ESP_OK(gptimer_del_timer(tim_arg1.gptimer));
TEST_ESP_OK(gptimer_stop(tim_arg2.gptimer));
TEST_ESP_OK(gptimer_disable(tim_arg2.gptimer));
TEST_ESP_OK(gptimer_del_timer(tim_arg2.gptimer));
}
#endif // #if CONFIG_APPTRACE_SV_ENABLE == 0

View File

@@ -1,3 +1 @@
CONFIG_ESP_TRACE_LIB_NONE=y
CONFIG_ESP_TRACE_TRANSPORT_APPTRACE=y
CONFIG_APPTRACE_DEST_JTAG=y
# app_trace is already enabled by sdkconfig.defaults, so no options are needed here

View File

@@ -0,0 +1 @@
CONFIG_APPTRACE_SV_ENABLE=y

View File

@@ -1,2 +1,2 @@
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=n
CONFIG_ESP_TRACE_ENABLE=y
CONFIG_APPTRACE_DEST_JTAG=y

View File

@@ -0,0 +1 @@
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.ci.sysview" -B build/sysview -DSDKCONFIG=build/sysview/sdkconfig

View File

@@ -4,7 +4,7 @@ if(${target} STREQUAL "linux")
return() # This component is not supported by the POSIX/Linux simulator
endif()
idf_component_register(SRCS "esp_ota_ops.c"
idf_component_register(SRCS "esp_ota_ops.c" "esp_ota_app_desc.c"
INCLUDE_DIRS "include"
REQUIRES partition_table bootloader_support esp_app_format esp_bootloader_format esp_partition
PRIV_REQUIRES esptool_py efuse spi_flash)
@@ -29,9 +29,7 @@ if(NOT BOOTLOADER_BUILD)
add_custom_target(blank_ota_data ALL DEPENDS ${blank_otadata_file})
add_dependencies(flash blank_ota_data)
if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT)
add_dependencies(encrypted-flash blank_ota_data)
endif()
add_dependencies(encrypted-flash blank_ota_data)
set(otatool_py "${python}" "${COMPONENT_DIR}/otatool.py")

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