Compare commits

...

2984 Commits

Author SHA1 Message Date
morris ab149384e1 Merge branch 'refactor/clean_soc_caps_gptimer' into 'master'
refactor(hal): graduate watch dog hal driver into a new component: esp_hal_wdt

Closes IDF-14091

See merge request espressif/esp-idf!42338
2025-10-15 17:18:20 +08:00
Marius Vikhammer 668ce92cc3 Merge branch 'ci/test_apps_ulp_dep' into 'master'
ci(network): fixed dependencies for misc network and wifi related test apps

Closes IDF-14193, IDF-14201, IDF-14205, IDF-14204, IDF-14192, and IDF-14196

See merge request espressif/esp-idf!42592
2025-10-15 17:16:56 +08:00
morris a1f765b68f Merge branch 'feat/support_parlio_cs_on_p4_eco5' into 'master'
feat(parlio_tx): support cs signal on esp32p4 eco5

Closes IDF-13519 and IDF-12219

See merge request espressif/esp-idf!41787
2025-10-15 16:39:26 +08:00
Rahul Tank 03dd5e31e0 Merge branch 'feat/channel_sounding_nimble' into 'master'
feat(nimble): Add initial support for CS HCI

See merge request espressif/esp-idf!41865
2025-10-15 12:46:15 +05:30
Marius Vikhammer 4b2a8b946f ci(network): fixed dependencies for misc network and wifi related test apps 2025-10-15 09:37:00 +08:00
morris f4e999fd3e Merge branch 'reproduce/32_spi_slave_hold_miso_when_deactive' into 'master'
fix(driver_spi): add some parameter checks

Closes IDFGH-7020, IDFGH-262, and IDFGH-16313

See merge request espressif/esp-idf!21648
2025-10-15 05:27:13 +08:00
Jiang Jiang Jian 1d2147cbf2 Merge branch 'bugfix/mac_deinit_esp32' into 'master'
fix(esp_wifi): fix esp32 mac deinit stuck issue

See merge request espressif/esp-idf!42487
2025-10-14 23:56:22 +08:00
wanckl a0f8df9a9a doc(driver_spi): added note for esp32 slave hardware limitaion
Closes https://github.com/espressif/esp-idf/issues/8638
2025-10-14 20:29:27 +08:00
wanckl b7adf3e7db fix(driver_spi): added warning for esp32 dma translength unalign to 4 byte
Closes https://github.com/espressif/esp-idf/issues/2085
2025-10-14 20:29:27 +08:00
wanckl 30af6c59b1 fix(driver_spi): override_freq_hz add validation check
Closes https://github.com/espressif/esp-idf/issues/17460
2025-10-14 20:29:27 +08:00
Jiang Jiang Jian 29fe500e2c Merge branch 'fix/improve_get_start_doc_notes' into 'master'
fix(doc): fix get start process in port notes

See merge request espressif/esp-idf!38524
2025-10-14 19:23:22 +08:00
Jiang Jiang Jian 785ace5ea0 Merge branch 'bugfix/static_analyzer_rsnxe_fix' into 'master'
fix(esp_wifi): Add validation before accessing RSNXE

Closes IDF-14257

See merge request espressif/esp-idf!42403
2025-10-14 19:03:17 +08:00
Chen Chen a8ace9db09 Merge branch 'feat/i2c_slave_reset_tx_fifo' into 'master'
feat(i2c_slave): Add API to perform slave tx buffer reset

Closes IDFGH-15612

See merge request espressif/esp-idf!42091
2025-10-14 19:00:57 +08:00
Rahul Tank 38364c0ef3 fix(nimble): Added CS service support 2025-10-14 16:21:17 +05:30
Wang Meng Yang d822e9bbbe Merge branch 'bugfix/fix_ble_deinit_crash' into 'master'
fix(ble/bluedroid): prevent crash when deinit/disable host during scan

Closes BLERP-2266, BLERP-2267, BLERP-2268, BLERP-2270, and BLERP-2274

See merge request espressif/esp-idf!42134
2025-10-14 18:00:45 +08:00
chenjianxing 23ee556379 fix(esp_wifi): fix esp32 mac deinit stuck issue 2025-10-14 16:38:40 +08:00
Zhang Shu Xian 5ab96242e8 Merge branch 'docs/add_note_for_rom' into 'master'
docs: Add a note about ROM version in the boot log

Closes DOC-12460

See merge request espressif/esp-idf!42228
2025-10-14 15:29:54 +08:00
C.S.M 5a14ccfe64 Merge branch 'fix/add_error_check' into 'master'
fix(jpeg): Add check for jpeg marker parser in order to enhance safety

See merge request espressif/esp-idf!42435
2025-10-14 15:04:31 +08:00
Rahul Tank 300bf85b45 feat(nimble): Base support for Channel sounding HCI command and events 2025-10-14 12:08:38 +05:30
C.S.M 79cc42a940 Merge branch 'fix/cache_32m_map' into 'master'
fix(spi_flash): Fix the cache map 32M flash failed on esp32c5

See merge request espressif/esp-idf!42506
2025-10-14 14:28:02 +08:00
Rahul Tank 7c1700b0ee Merge branch 'bugfix/use_nimble_mem_apis' into 'master'
fix(nimble): Use nimble platform mem malloc / free APIs

Closes BLERP-2279

See merge request espressif/esp-idf!42234
2025-10-14 11:49:52 +05:30
C.S.M 12c633fd75 Merge branch 'fix/i2c_wdt_after_nack' into 'master'
fix(i2c): Fix the potential wdt might happen after nack

Closes IDFGH-16612

See merge request espressif/esp-idf!42554
2025-10-14 13:58:26 +08:00
morris e8de5b5a95 refactor(gptimer): clean up SOC capabilities for GPTIMER and Timer Group
- Remove GPTIMER and TIMG related definitions from soc_caps_full.h files
- Move timer peripheral definitions to appropriate HAL layer files
- Update references across components to use proper HAL abstractions
- Consolidate timer group and GPTIMER capabilities organization
- Ensure consistent timer configuration across all ESP32 variants

This refactoring improves the separation of concerns between SOC
capabilities and HAL implementations for timer-related functionality.
2025-10-14 11:44:38 +08:00
morris 56c3dc4755 feat(wdt): graduate watch dog hal driver into a new component: esp_hal_wdt 2025-10-14 11:44:32 +08:00
Wang Meng Yang 1904fd4d9c Merge branch 'fix/incorrect_assert_in_acl_data_process' into 'master'
fix(bt): avoid asserting when previous data hasn't finished transmitting

See merge request espressif/esp-idf!42532
2025-10-13 19:03:41 +08:00
Frantisek Hrbata 91f7664571 Merge branch 'docs/minimal_build_migration' into 'master'
docs(migration): add note about MINIMAL_BUILD to 5.5 migration guide

Closes DOC-12499

See merge request espressif/esp-idf!41192
2025-10-13 11:29:46 +02:00
C.S.M 2523fee9cd fix(i2c): Fix the potential wdt might happen after nack,
Closes https://github.com/espressif/esp-idf/issues/17720
2025-10-13 16:07:22 +08:00
Laukik Hase 6e51fac96e Merge branch 'fix/esp_tee_flash_op_bound_checks' into 'master'
fix(esp_tee): Correct flash operation bound checks to handle all overlap cases

Closes IDF-14129

See merge request espressif/esp-idf!41946
2025-10-13 13:31:03 +05:30
Island 6b40ac65cb Merge branch 'fix/ble_log_acl_data_copy' into 'master'
fix(ble): copy acl data by omdata buffer copy

Closes BLERP-2294

See merge request espressif/esp-idf!42444
2025-10-13 14:26:29 +08:00
Island 53249ade21 Merge branch 'feat/ble_mesh_long_package_support' into 'master'
feat(ble_mesh): long packet mode support

Closes BLERP-2273

See merge request espressif/esp-idf!39175
2025-10-13 14:25:55 +08:00
Mahavir Jain 269acda53c Merge branch 'cleanup/use_cjson_from_registry' into 'master'
cleanup: move cJSON to component manager

See merge request espressif/esp-idf!42379
2025-10-13 11:54:10 +05:30
zhanghaipeng ca2c78f53e fix(ble/bluedroid): prevent crash when deinit/disable host during scan
Crash occurs if the BLE host is deinitialized or disabled while scanning is still active.
This usage is not recommended.
2025-10-13 13:27:04 +08:00
Island 6424b52fb7 Merge branch 'bugfix/fix_cble50y25_305' into 'master'
Fixed GPIO matrix function calls on ESP32-C3 and ESP32-S3(18b5cbe)

Closes BLERP-2299

See merge request espressif/esp-idf!42507
2025-10-13 12:07:35 +08:00
Laukik Hase 88444df58b Merge branch 'docs/esp_tee_c5' into 'master'
docs(esp_tee): Enable ESP-TEE documentation for ESP32-C5

Closes IDF-10432

See merge request espressif/esp-idf!42390
2025-10-13 09:29:20 +05:30
Chen Jichang dde8fac6b8 feat(parlio_tx): support cs signal on esp32p4 eco5 2025-10-13 11:48:47 +08:00
Song Ruo Jing 9056974051 feat(gpio): ESP32P4 ECO5 GPIO related update 2025-10-13 11:48:47 +08:00
Chen Ji Chang 3b0d8508c0 Merge branch 'fix/fix_esp32_rmt_disable_timeout_in_special_condition' into 'master'
fix(rmt): use memset to clear entire RMT memory block instead of single word

Closes IDFGH-16574

See merge request espressif/esp-idf!42510
2025-10-13 10:49:12 +08:00
gongyantao 3a1a579d9a fix(bt): avoid asserting when previous data hasn't finished transmitting 2025-10-13 09:44:33 +08:00
morris 5c3a562af1 Merge branch 'chor/clean_driver_dependency_in_build_system' into 'master'
refactor: remove unnecessary driver dependencies from build rules

Closes IDF-10696

See merge request espressif/esp-idf!42405
2025-10-12 17:19:43 +08:00
Zhang Shuxian 2ce0c51e8e docs: Update translation for build-system.rst 2025-10-12 02:16:56 +08:00
Frantisek Hrbata f2f5a4ff80 docs(migration): add note about MINIMAL_BUILD to 5.5 migration guide
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-12 02:16:56 +08:00
chenjianhua 25adf4c934 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(18b5cbe)
- Fixed GPIO matrix function calls
2025-10-11 19:38:41 +08:00
Wang Meng Yang e11789a999 Merge branch 'bugfix/bt_idf_ci' into 'master'
fix(example/classic_bt): Fix the potential stack overflow tasks

Closes IDFCI-4308

See merge request espressif/esp-idf!42513
2025-10-11 16:59:53 +08:00
morris f348a101f9 Merge branch 'refactor/remove_deprecated_periph_module_enable_disable_functions' into 'master'
refactor(hw_support): remove unused periph_module_t members

Closes IDF-11855

See merge request espressif/esp-idf!42147
2025-10-11 16:43:56 +08:00
yangfeng 4606fa87c7 fix(example/classic_bt): Fix potential stack overflow tasks 2025-10-11 16:40:43 +08:00
Wang Meng Yang 549a7272bf Merge branch 'bugfix/several_esp32_bugs' into 'master'
fix(bt/controller): fixed several controller bugs

Closes BT-4103 and BT-4100

See merge request espressif/esp-idf!41644
2025-10-11 16:02:36 +08:00
Zhou Xiao 322eb33f0d fix(ble): copy acl data by omdata buffer copy 2025-10-11 14:14:40 +08:00
He Binglin f2b6070837 Merge branch 'feat/support_esp32h4_psram' into 'master'
feat(esp_hw_support): support psram during sleep for esp32h4

See merge request espressif/esp-idf!41780
2025-10-11 14:11:17 +08:00
Zhang Shu Xian 5b59fdcd0b Merge branch 'docs/update_translation_for_esp_netif' into 'master'
docs: Update translation for esp_netif

Closes DOC-12459

See merge request espressif/esp-idf!42239
2025-10-11 14:08:03 +08:00
morris cd41b6a640 refactor: remove unnecessary driver dependencies from build rules 2025-10-11 14:02:29 +08:00
Wu Zheng Hui 3a0eba4c46 Merge branch 'fix/fix_32k_config_revoke_breaks_io_holding' into 'master'
fix(esp_system): fix ext 32k io revoking breaks sleep io holding

Closes IDFGH-16262

See merge request espressif/esp-idf!41380
2025-10-11 12:59:35 +08:00
Chen Jichang 9e28a8d05c fix(rmt): use memset to clear entire RMT memory block instead of single word
closes https://github.com/espressif/esp-idf/issues/17692
2025-10-11 11:27:52 +08:00
C.S.M 942f2dd0f9 fix(spi_flash): Fix the cache map 32M flash failed on esp32c5 2025-10-11 11:05:47 +08:00
luoxu 93a36fbf99 feat(ble_mesh): add BLE 5.0 extended advertising and long packet support
- Add extended advertising configuration with customizable PHY selection (1M, 2M, Coded)
- Implement long packet mode to overcome standard BLE Mesh packet length limitations
- Add configurable advertising parameters: interval, count, channel map, TX power
- Introduce enhanced message context structure for fine-grained advertising control
- Add Kconfig options for buffer management and segment count configuration
- Support both forced and preferred long packet transmission modes
- Update advertising buffer pools to accommodate extended and long packet types
- Add validation for enhanced advertising parameters and packet length limits
- Maintain backward compatibility with existing BLE Mesh functionality
2025-10-11 10:57:46 +08:00
wuzhenghui 4bb6a01959 fix(esp_system): fix ext 32k io revoking breaks sleep io holding 2025-10-10 19:44:07 +08:00
C.S.M c38a6691b9 fix(jpeg): Add check for jpeg marker parser in order to enhance safety 2025-10-10 18:44:27 +08:00
Roland Dobai d816c3fb5b Merge branch 'contrib/github_pr_17594' into 'master'
fix(depgraph): Add double quotes around dependency names (GitHub PR)

Closes IDFGH-16471

See merge request espressif/esp-idf!41989
2025-10-10 11:27:06 +02:00
Jiang Jiang Jian 5f5f96384c Merge branch 'feat/support_esp32c5_cert_test_example' into 'master'
Feat/support esp32c5 cert test example

See merge request espressif/esp-idf!42103
2025-10-10 17:03:31 +08:00
morris d331400e7a Merge branch 'fix/gcc_analyzer_warning_on_preview_targets' into 'master'
refactor(sleep_cpu): suppress infinite loop warnings with compiler diagnostics

See merge request espressif/esp-idf!42457
2025-10-10 16:45:32 +08:00
Wang Meng Yang 1d0db55941 Merge branch 'bugfix/bt_idf_ci' into 'master'
fix(example/classic_bt): Fix the stack overflow of the SPPAppT and mouse_move_task tasks

Closes IDFCI-3985 and IDFCI-3631

See merge request espressif/esp-idf!42474
2025-10-10 16:09:36 +08:00
yangfeng dc1c22f090 fix(example/classic_bt): Fix the stack overflow of the SPPAppT and mouse_move_task tasks 2025-10-10 14:42:01 +08:00
Nilesh Kale 20098cb71c Merge branch 'bugfix/ota_resumption_saved_size_alignmnet' into 'master'
fix: Ensure OTA written size for 16-byte alignment

See merge request espressif/esp-idf!41887
2025-10-10 13:49:24 +08:00
morris efe05d829b refactor(sleep_cpu): suppress infinite loop warnings with compiler diagnostics 2025-10-10 13:37:29 +08:00
Wang Meng Yang b92235223a Merge branch 'bugfix/fix_some_bt_bugs' into 'master'
fix(bt): fix some bluetooth bugs

Closes IDFGH-16334 and IDFGH-15166

See merge request espressif/esp-idf!42261
2025-10-10 12:10:25 +08:00
Wang Meng Yang 3e0545f28b Merge branch 'bugfix/fix_bt_security' into 'master'
fix(bt/bluedroid): Fix the boundary conditions when checking EIR data

See merge request espressif/esp-idf!42253
2025-10-10 09:07:49 +08:00
morris 4e62b0e44e Merge branch 'refactor/mcpwm_generator_remove_varg_api' into 'master'
refactor(mcpwm): remove varg action setting functions for timer, compare, and brake events

Closes IDF-13901, IDF-13890, IDF-13865, and IDF-13880

See merge request espressif/esp-idf!42259
2025-10-10 03:25:40 +08:00
Martin Vychodil 1e1b95cfa1 Merge branch 'feature/esp_partition_bdl_support' into 'master'
Feat(storage): esp_partition BDL support

Closes IDF-12748

See merge request espressif/esp-idf!40288
2025-10-10 01:55:35 +08:00
Fu Hanxi c27bccaf81 Merge branch 'ci/fix-pipeline-commit-sha-in-build-docker' into 'master'
Ci/fix pipeline commit sha in build docker

Closes IDFCI-3918

See merge request espressif/esp-idf!42381
2025-10-09 13:22:45 +02:00
Fu Hanxi f10537a76d Merge branch 'ci/remove-extra-custom-yml' into 'master'
ci: move extra targets need to be built by default to `--additional-build-targets`

Closes IDFCI-3230

See merge request espressif/esp-idf!42230
2025-10-09 12:48:23 +02:00
Igor Masar 4f578d8375 Merge branch 'feat/usb-h4-support' into 'master'
feat(soc/usb): Add USB support for ESP32-H4

Closes IDF-12341 and IDF-12342

See merge request espressif/esp-idf!41642
2025-10-09 18:28:16 +08:00
Samuel Obuch 86b39c6315 Merge branch 'esp_rom_fix_defalut_typos' into 'master'
fix(esp_rom):  correct typos defalut -> default

Closes IDFGH-16547

See merge request espressif/esp-idf!42294
2025-10-09 17:25:05 +08:00
muhaidong 57aa42bb43 fix(phy): fix cmd get_rx_result log error issue 2025-10-09 16:48:52 +08:00
muhaidong a5bc5a3f7f fix(phy): add tx_contain_en cmd for esp32c5 2025-10-09 16:40:01 +08:00
muhaidong 68f0386405 feat(phy): support esp32c5 cert test 2025-10-09 16:40:01 +08:00
morris b76254895c refactor(mcpwm): remove varg action setting functions for timer, compare, and brake events 2025-10-09 16:38:39 +08:00
Mahavir Jain 02af1db1dd Merge branch 'feat(esp-tls)/add_more_server_configurations' into 'master'
feat(esp_tls): supports setting tls version and ciphersuite in server config

Closes IDFGH-16537

See merge request espressif/esp-idf!42323
2025-10-09 13:43:38 +05:30
Chen Chen 8b8b5df141 feat(i2c_slave): Add API to perform slave tx buffer reset
Closes https://github.com/espressif/esp-idf/issues/16241
2025-10-09 16:08:19 +08:00
Wei Yu Han 51d5e8fd08 Merge branch 'docs/update_nimble_pts_info' into 'master'
docs(ble): Updated NimBLE certification info

See merge request espressif/esp-idf!42264
2025-10-09 15:46:05 +08:00
Chen Jichang d0e24e4a81 refactor(hw_support): remove unused periph_module_t members 2025-10-09 15:27:20 +08:00
C.S.M 068c8ab965 Merge branch 'refactor/temperature_cpp' into 'master'
refactor(temperature_sensor): Make temperature sensor adapt to cpp

Closes IDFGH-16532 and IDF-14190

See merge request espressif/esp-idf!42247
2025-10-09 15:24:52 +08:00
Martin Vychodil 3ce5725282 fix(esp_partition): read-only and encrypted partition support 2025-10-09 09:06:54 +02:00
Martin Vychodil 5c8a10e61e fix(esp_partition): fixes related to BDL update 2025-10-09 09:06:40 +02:00
Mahavir Jain 56098593d9 Merge branch 'fix/http_async_handler_ci_test_failure' into 'master'
fix(http_server): Fix CI test failure async_handler

Closes IDFCI-3119

See merge request espressif/esp-idf!42037
2025-10-09 12:26:05 +05:30
Rahul Tank 26636cebac fix(nimble): Use nimble platform mem malloc / free APIs 2025-10-09 10:37:21 +05:30
Kapil Gupta 092338b78d fix(esp_wifi): Add validation before accessing RSNXE 2025-10-09 09:32:56 +05:30
morris c76d25edc1 Merge branch 'fix/lwip_rename_task_docs' into 'master'
[lwip]: Mention lwip task name change in migration-docs

See merge request espressif/esp-idf!42346
2025-10-09 10:32:26 +08:00
Fu Hanxi b207b3320b ci: use merged result commit in build_docker job
also change to shanghai runners
2025-10-08 13:59:18 +02:00
Frantisek Hrbata a73644800d fix(test_apps): reflect changes in component_deps.dot in the g1_components test
The commit 51f3c02115 ("Add quotes around node ID in dependency
graph") introduced proper quoting for node IDs in the generated dot
file. Since the dot format does not allow dashes in node names without
quoting, and dashes are used in component names, the component names in
the generated dot file are now correctly quoted. Adjust the
g1_components test to accommodate this change by stripping the quotes.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-08 19:55:21 +08:00
Vincent-Dalstra a36c8b8725 fix: Add quotes around node ID in dependency graph
Graphviz node ID's are represented as strings, that can only use a
restricted set of characters (characters, digits, and underscores), and
must not match a reserved keyword. These restrictions do not apply when
the string is wrapped in double quotes. This allows for component names
with dashes in them, for example.

Closes https://github.com/espressif/esp-idf/pull/17594
2025-10-08 19:55:21 +08:00
Ondrej Kosta 08e4aba740 Merge branch 'fix/eth_connect' into 'master'
fix(protocol_examples_common): Temporal fix of backwards compatibility

See merge request espressif/esp-idf!42398
2025-10-08 17:06:47 +08:00
radek.tandler b695279ee8 feat(storage): esp_blockdev added to G1 components 2025-10-08 10:18:10 +02:00
Alexey Gerenkov 3316e9d706 Merge branch 'feature/update-esp-clang-to-esp-20.1.1_20250829' into 'master'
feat(tools): update esp-clang version to esp-20.1.1_20250829

See merge request espressif/esp-idf!41728
2025-10-07 21:23:08 +08:00
Roland Dobai d44fca613c Merge branch 'change/use_esptool_to_list_ports' into 'master'
change(tools): Use esptool to detect available ports

See merge request espressif/esp-idf!42380
2025-10-07 14:32:24 +02:00
Ondrej Kosta 8619f96018 fix(protocol_examples_common): Temporal fix of backwards compatibility 2025-10-07 13:28:45 +02:00
Fu Hanxi 1f69dbf456 ci: populate PIPELINE_COMMIT_SHA in pipeline_variables 2025-10-07 11:18:36 +02:00
Martin Vychodil 4493b39d18 feat(storage): Added Block Device Layer support for esp_partition component 2025-10-07 14:55:36 +08:00
nilesh.kale 873fd18c5a fix: add check to ensure OTA buffer size for 16-byte aligned
This commit added guide to, round off OTA written size to allowed
aignmnet when flash ecnryption enabled.
2025-10-07 11:19:35 +05:30
Martin Vychodil 46def9972a Merge branch 'feature/esp_blockdev_updates' into 'master'
fix(storage): BDL interface comprehensive update

See merge request espressif/esp-idf!42371
2025-10-07 01:27:49 +08:00
Alexey Gerenkov e1f647906d fix(build): Add missing '-nostartfiles' option in Clang toolchain files 2025-10-06 22:37:41 +08:00
Alexey Gerenkov 8d8d7de672 feat(tools): update esp-clang version to esp-20.1.1_20250829 2025-10-06 22:37:41 +08:00
Martin Vychodil 832b8f8b83 fix(storage): BDL interface comprehensive update
Closes https://github.com/espressif/esp-idf/issues/17654
2025-10-06 15:38:34 +02:00
Laukik Hase afe8fea489 docs(esp_tee): Enable ESP-TEE documentation for ESP32-C5 2025-10-06 18:49:01 +05:30
Guillaume Souchere 75305c2719 Merge branch 'feat/make-use-of-exec-cap-compile-time-error' into 'master'
feat(heap): Make MALLOC_CAP_EXEC illegal use a compile time error

Closes IDFGH-14014 and IDF-11690

See merge request espressif/esp-idf!34903
2025-10-06 13:34:16 +02:00
Roland Dobai 7832985037 Merge branch 'fix/deprecated-opts-in-lf' into 'master'
fix: Ensure deprecated options are correctly handled in linker fragments

Closes IDF-13571

See merge request espressif/esp-idf!42096
2025-10-06 10:39:26 +02:00
Mahavir Jain 439b1d6d08 cleanup: move cJSON to component manager 2025-10-06 14:08:06 +05:30
Jaroslav Burian 64379596dd change(tools): Use esptool to detect available ports
This changes how available ports are detected. It removes code duplication
for MacOS filtering which already is in esptool and prepares for port
prioritization to be used from esptool.
2025-10-06 09:50:18 +02:00
Rahul Tank 448b5c08a1 Merge branch 'bugfix/fix_os_mbuf_dup' into 'master'
fix(nimble): Address mbuf from different chains traversal during copying

See merge request espressif/esp-idf!41893
2025-10-06 11:53:21 +05:30
David Čermák 9f4a28fc8f Merge branch 'fix/lwip_remove_unused_flags' into 'master'
[lwip]: Removed unused lwip flags

Closes IDF-10227

See merge request espressif/esp-idf!42123
2025-10-05 02:20:24 +08:00
Kevin (Lao Kaiyao) a3a86438f3 Merge branch 'refactor/clean_up_touch_soc_caps' into 'master'
refactor(touch): clean up touch sensor caps

Closes IDF-13698

See merge request espressif/esp-idf!42149
2025-10-04 16:42:22 +08:00
David Cermak 69baa8f998 fix(lwip): Removed unused lwip flags 2025-10-03 14:41:31 +02:00
Roland Dobai c613d438da Merge branch 'ci/bump_up_kconfcheck_precommit' into 'master'
ci(pre-commit): bump up kconfcheck pre-commit hook version to 3.2.0

See merge request espressif/esp-idf!42339
2025-10-03 14:24:36 +02:00
Roland Dobai d6609597aa Merge branch 'fix/missing_version_in_extension_test_files' into 'master'
fix(test_idf_py): Added extension API version into test extensions files

See merge request espressif/esp-idf!42354
2025-10-03 14:15:12 +02:00
Fu Hanxi a322abb127 Merge branch 'ci/fix-windows-test-download-map-prefix' into 'master'
ci: fix windows test jobs download source

See merge request espressif/esp-idf!42361
2025-10-03 14:12:26 +02:00
Fu Hanxi 31431069d4 ci: fix windows test jobs download source 2025-10-03 12:47:01 +02:00
Rahul Tank 39fe3d5037 fix(nimble): Address mbuf from different chains traversal during copying 2025-10-03 15:16:02 +05:30
Ashish Sharma 62f852a93b feat(esp_tls): supports setting tls version and ciphersuite in server config
Closes https://github.com/espressif/esp-idf/issues/17660
2025-10-03 15:19:41 +08:00
Rahul Tank f8935f87e7 Merge branch 'bugfix/update_hci_log_datalen' into 'master'
fix(nimble): update HCI log functions to use uint16_t for data length

See merge request espressif/esp-idf!42013
2025-10-03 11:43:32 +05:30
laokaiyao cc949123ee refactor(touch): clean up touch sensor caps 2025-10-03 13:39:11 +08:00
igor.masar c74ce1c201 feat(usb/h4): Add USB OTG host support for ESP32-H4
- hal: add DWC OTG core LL (usb_dwc_ll.h) and USB wrap LL (usb_wrap_ll.h)
- soc: add DWC register map/cfg (usb_dwc_struct.h, usb_dwc_cfg.h) and caps
- soc/kconfig: enable SOC_USB_OTG_SUPPORTED=1, SOC_USB_OTG_PERIPH_NUM=1
- docs: add ESP32-H4 to usb_phy test app “Supported Targets”
- ld: export USB_WRAP symbol
- doxygen: include USB Host headers for H4 to emit .inc files
2025-10-02 23:21:08 +02:00
Roland Dobai eff16d4981 Merge branch 'fix/small-limit-for-kconfserver' into 'master'
fix: allow larger buffer size for commands (especially for idf.py confserver)

Closes IDFCI-3569 and IDF-13919

See merge request espressif/esp-idf!42312
2025-10-02 18:52:03 +02:00
David Čermák 44767e48f9 Merge branch 'feat/dhcps_support_hostname_per_client_cleanup' into 'master'
fix(esp_netif): Simplify reporting clients hostname

See merge request espressif/esp-idf!42233
2025-10-02 23:33:30 +08:00
Marek Fiala 854f6b0a3e fix(test_idf_py): Added extension API version into test extensions files 2025-10-02 15:37:29 +02:00
Marek Fiala 248c3a996e change(test_idf_py): ruff formatting idf_ext.py & some_ext.py 2025-10-02 15:34:31 +02:00
Radek Tandler 207199a2bb Merge branch 'refactor/nvs_header_cleanup' into 'master'
Cleanup of NVS copyright notices, header pragma once and NVS related constants

See merge request espressif/esp-idf!42353
2025-10-02 15:08:45 +02:00
Radek Tandler 69d20790b7 Merge branch 'bugfix/storage_nvs_tool_keys' into 'master'
Bugfix/storage nvs tool keys

See merge request espressif/esp-idf!37068
2025-10-02 14:38:46 +02:00
Jan Beran b51329bdb1 fix: set sufficient buffer limit for idf.py confserver 2025-10-02 13:19:30 +02:00
radek.tandler 801091c079 refactor(nvs_flash): NVS constants were consolidated
- Constant definitions depending on spi_flash were added to nvs_constants
2025-10-02 12:39:37 +02:00
radek.tandler a11c30a3e3 refactor(nvs_flash): Adjusted copyright notices and header file pragma once 2025-10-02 12:35:50 +02:00
Samuel Obuch 66de4ef8ca fix(esp_rom): correct typos defalut -> default 2025-10-02 17:41:40 +08:00
David Cermak 35b47648e0 fix(esp_netif): Simplify reporting clients hostname 2025-10-02 16:58:15 +08:00
David Čermák 9063a6c279 Merge branch 'feat/lwip_netif_callbacks' into 'master'
[lwip]: Add support for netif link callback

Closes IDFGH-16317

See merge request espressif/esp-idf!42097
2025-10-02 12:37:37 +08:00
radek.tandler 1c6e2d2f88 fix(nvs_flash): Parsing NVS partition containing non ASCII keys 2025-10-02 05:59:14 +02:00
Kevin (Lao Kaiyao) 726a4304d6 Merge branch 'refactor/clean_up_some_soc_caps' into 'master'
refactor(i2s): clean up i2s soc caps

Closes IDF-13685 and IDF-10014

See merge request espressif/esp-idf!41944
2025-10-02 03:21:33 +08:00
laokaiyao fec96035be refactor(i2s): replace the enum i2s_port_t with int type 2025-10-01 21:53:55 +08:00
laokaiyao 91a6387005 refactor(i2s): clean up i2s soc caps 2025-10-01 21:51:58 +08:00
David Cermak 4e82073310 fix(docs): Mention lwip task name change in migration-docs 2025-10-01 21:00:56 +08:00
David Čermák 31602cbe66 Merge branch 'fix/lwip_rename_task' into 'master'
[lwip]: Rename TCPIP_THREAD_NAME "tiT" -> "tcpip" (GitHub PR)

Closes IDFGH-12516

See merge request espressif/esp-idf!41915
2025-10-01 21:00:48 +08:00
Roland Dobai 18d6b53195 Merge branch 'fix/dont-regenerate-unnecessary-config-files' into 'master'
fix(kconfig.cmake): Do not regenerate unnecessary config files

Closes IDF-14220

See merge request espressif/esp-idf!42231
2025-10-01 14:52:04 +02:00
Peter Marcisovsky 4dc77d1976 Merge branch 'refactor/usb_host_remove_usb_component' into 'master'
Refactor/usb host remove usb component

Closes IDF-14022

See merge request espressif/esp-idf!41690
2025-10-01 12:59:06 +02:00
Rahul Tank 7a876031e1 Merge branch 'bugfix/re_organize_nimble_kconfig' into 'master'
fix(nimble): Declutter the nimble menu config options

Closes BLERP-2227

See merge request espressif/esp-idf!41829
2025-10-01 16:28:31 +05:30
David Cermak 16b02aeb7a feat(lwip): Add support for netif link callback 2025-10-01 17:58:47 +08:00
Shreeyash 222e62ae3e fix(nimble): update HCI log functions to use uint16_t for data length 2025-10-01 15:23:08 +05:30
Alexey Lapshin 8939bdad63 Merge branch 'feature/update-toolchain-to-esp-15.2.0_20250929' into 'master'
feat(tools): update toolchain version to esp-15.2.0_20250929

See merge request espressif/esp-idf!42271
2025-10-01 11:43:58 +04:00
Guillaume Souchere 7a24a8aef6 Merge branch 'fix/console-coverity-findings' into 'master'
fix(console): Remove dead code findings from coverity

Closes IDF-13098 and IDF-13134

See merge request espressif/esp-idf!42324
2025-10-01 08:39:12 +02:00
Peter Dragun 800f141f94 Merge branch 'feat/esptool_v5' into 'master'
Update esptool to v5: replace deprecated commands, documentation updates and cleanup

Closes IDF-12564

See merge request espressif/esp-idf!41176
2025-10-01 14:36:26 +08:00
Nebojša Cvetković 8760e3f38f feat(lwip): TCPIP_THREAD_NAME "tcpip" 2025-10-01 14:07:18 +08:00
Rahul Tank 9ba0b373bd Merge branch 'bugfix/fix_ext_adv_data_reattempt' into 'master'
fix(nimble): Avoid ext adv data in reattempt advertising

Closes BLERP-2234

See merge request espressif/esp-idf!41789
2025-10-01 09:32:41 +05:30
Alexey Lapshin 2df79c2671 feat(tools): update toolchain version to esp-15.2.0_20250929 2025-10-01 10:36:31 +08:00
morris 310870784b Merge branch 'fix/mcpwm_prescale_regression' into 'master'
fix(mcpwm): fix division by zero error in prescale

Closes IDFGH-16544

See merge request espressif/esp-idf!42322
2025-10-01 08:10:47 +08:00
David Čermák 5c7a237161 Merge branch 'fix/lwip_port_consistent_alloc' into 'master'
[lwip]: Make lwip alloc/free consistend in port layer

Closes IDFGH-10271

See merge request espressif/esp-idf!42081
2025-10-01 05:39:02 +08:00
morris 22a0f9aecb Merge branch 'refactor/remove_driver_dependency' into 'master'
refator(driver): remove unnecessary driver dependencies

Closes IDF-11475

See merge request espressif/esp-idf!41747
2025-10-01 03:09:57 +08:00
Kapil Gupta 04174c4928 Merge branch 'bugfix/concurrency_issue_roam_app' into 'master'
fix(esp_wifi): Add some fixes in roaming app

See merge request espressif/esp-idf!42262
2025-09-30 23:25:48 +05:30
Konstantin Kondrashov a249714f3b Merge branch 'fix/esp_efuse_enable_rom_secure_download_mode' into 'master'
fix(efuse): Fix enabling ROM secure download mode

See merge request espressif/esp-idf!41541
2025-10-01 01:38:16 +08:00
Mahavir Jain b9cf9ea31f Merge branch 'fix/mmu_psram_anti_fi' into 'master'
fix(security): add anti-FI checks while setting up PSRAM encryption

Closes IDF-13761

See merge request espressif/esp-idf!41750
2025-09-30 21:18:01 +05:30
Peter Dragun 4c53f42dc7 fix: Execute esptool scripts in interactive mode
The new version of esptool has a quite interactive output that supports
folding steps and overriding progress bar. Using interactive mode to run
esptool scripts will make the output propagate to the terminal immediately.
2025-09-30 15:28:55 +02:00
Peter Dragun 9eb07f92ba docs: Update unify and update espefuse command outputs 2025-09-30 15:28:55 +02:00
Peter Dragun 1ce7513222 change: Accept --fill-flash-size in merge-bin as deprecated option 2025-09-30 15:28:55 +02:00
Peter Dragun b22d45146f change: Remove esptool.py deprecated warnings from ignore_build_warnings.txt 2025-09-30 15:28:55 +02:00
Peter Dragun e3198fff3c feat: Update esptool to v5 2025-09-30 15:28:55 +02:00
Jan Beran 94c59a9755 fix: Ensure deprecated options are correctly handled in linker fragments 2025-09-30 14:55:54 +02:00
Jan Beran f7e1c5ec6c ci(pre-commit): bump up kconfcheck pre-commit hook version to 3.2.0 2025-09-30 14:40:18 +02:00
Sonika Rathi 053fb47e78 Merge branch 'fix/esp_partition_api_with_error_reporting' into 'master'
feat(esp_partition): add error-returning variants for partition find APIs

Closes IDFGH-7740

See merge request espressif/esp-idf!42089
2025-09-30 18:11:54 +08:00
Rahul Tank 303d9b0624 fix(nimble): Declutter the nimble menu config options 2025-09-30 14:38:31 +05:30
David Cermak d744d16fb0 fix(lwip): Make lwip alloc/free consistend in port layer
Merges https://github.com/espressif/esp-idf/pull/11534
2025-09-30 17:07:44 +08:00
Ashish Sharma 59f5bb4540 Merge branch 'contrib/github_pr_17652' into 'master'
fix(esp_tls_conn_new_sync): Fix `esp_tls_conn_new_sync`'s doc to reflect its implementation (GitHub PR)

Closes IDFGH-16528 and IDFGH-16475

See merge request espressif/esp-idf!42263
2025-09-30 16:46:37 +08:00
Chen Chen a4710cc206 refactor(driver): remove redundant driver dependencies
now the driver component only contains legacy code for i2c, twai and
touch sensor
2025-09-30 15:47:45 +08:00
Roland Dobai af1ceb322f Merge branch 'feat/remove_legacy_esp_size' into 'master'
Tools/esp-idf-size: Remove --legacy argument and replace JSON format with JSON2

Closes IDF-8772 and DOC-12437

See merge request espressif/esp-idf!41743
2025-09-30 09:47:44 +02:00
Guillaume Souchere b6b7337f5b fix(console): Remove dead code findings from coverity 2025-09-30 09:31:34 +02:00
C.S.M a417158514 Merge branch 'feat/mspi_suspend_p4_eco5' into 'master'
feat(spi_flash): Support flash suspend on esp32p4 resivion 3

Closes IDF-13511

See merge request espressif/esp-idf!42104
2025-09-30 15:14:09 +08:00
Konstantin Kondrashov be280d3431 fix(efuse): Fix enabling ROM secure download mode 2025-09-30 15:08:27 +08:00
C.S.M 023981bebf refactor(temperature_sensor): Make temperature sensor adapt to cpp,
Closes https://github.com/espressif/esp-idf/issues/17656
2025-09-30 14:57:54 +08:00
Laukik Hase 466c1d66b6 refactor(esp_tee): Remove the spi_flash_erase_chip service call
- Also fix coverity bug from TEE HMAC-PBKDF2 routine
2025-09-30 12:22:26 +05:30
Laukik Hase 8b92f3603f fix(esp_tee): Correct flash operation bound checks to handle all overlap cases
- Ensure bound checks correctly handle all scenarios, including
  when a requested operation's (SPI0/1) range fully contains the
  TEE-protected region.
- Disable delegation of INTWDT timeout and Cache error interrupts as they reset
  the device after the panic handler
2025-09-30 12:22:25 +05:30
Peter Marcisovsky 19cc026b0c Merge branch 'feat/usb_host_suspend_status_hal_check' into 'master'
feat(usb_host): Add hal check for the global root port suspend

See merge request espressif/esp-idf!42098
2025-09-30 08:50:05 +02:00
Kapil Gupta cf65928773 fix(esp_wifi): Cancel roaming_app_periodic_scan_internal_handler correctly 2025-09-30 14:18:29 +08:00
Kapil Gupta a75a3710c4 fix(esp_wifi): Add some fixes in roaming app 2025-09-30 14:18:29 +08:00
Harshal Patil f088a128ac Merge branch 'test/set_minimal_build_for_security_test_apps' into 'master'
test(security): Use minimal build in the security test apps

Closes IDF-14203

See merge request espressif/esp-idf!42292
2025-09-30 11:38:21 +05:30
Mahavir Jain 343fd79462 Merge branch 'fix/allow_pre_programmed_efuse_pseudo_round_level_when_set_release_mode' into 'master'
Allow pre-programmed XTS-AES psuedo round level efuses

See merge request espressif/esp-idf!42041
2025-09-30 11:09:43 +05:30
harshal.patil 1d4a634b98 test(security): Use minimal build in the security test apps 2025-09-30 10:52:03 +05:30
Mahavir Jain ad059d385b fix(security): add anti-FI checks while setting up PSRAM encryption 2025-09-30 10:22:53 +05:30
Jiang Jiang Jian 729be4656b Merge branch 'fix/increase_c5_pau_work_time' into 'master'
fix(esp_hw_support): increase esp32c5 wifi link working cost

See merge request espressif/esp-idf!41620
2025-09-30 12:44:01 +08:00
Meet Patel 0f776d31ae Merge branch 'feature/ulp_riscv_pulse_counter_example' into 'master'
feat(ulp_riscv): Add pulse counter example code for ulp riscv

Closes IDF-14106

See merge request espressif/esp-idf!42107
2025-09-30 10:13:21 +05:30
Chen Jichang 0c95b8c267 fix(mcpwm): fix division by zero error in prescale
Closes https://github.com/espressif/esp-idf/issues/17665
2025-09-30 12:21:33 +08:00
Jiang Jiang Jian 7bd0eeff5e Merge branch 'fix/controll_dcdc_switch_by_pmu_in_dslp' into 'master'
fix(esp_hw_support): control DCDC switch by PMU FSM while control DCDC_EN by software

See merge request espressif/esp-idf!41310
2025-09-30 11:50:55 +08:00
Jiang Jiang Jian b23594125b Merge branch 'bugfix/fix_regdomain_information_of_pk_incorrect' into 'master'
fix(wifi): fix regdomain information of PK is incorrect

See merge request espressif/esp-idf!42001
2025-09-30 11:50:49 +08:00
Chen Ji Chang 01a27c8a70 Merge branch 'feat/rmt_support_psram' into 'master'
feat(rmt): support receive buffer to psram

Closes IDF-8997

See merge request espressif/esp-idf!41327
2025-09-30 11:03:22 +08:00
Jared Pon 2b42a6aa2b fix(esp_tls_conn_new_sync): Fix esp_tls_conn_new_sync's doc to reflect its implementation
Closes https://github.com/espressif/esp-idf/pull/17652
Closes https://github.com/espressif/esp-idf/issues/17598
2025-09-30 10:02:20 +08:00
Jiang Jiang Jian b7deee951e Merge branch 'feat/ft_with_sae' into 'master'
Add FT with SAE feature for station

See merge request espressif/esp-idf!39994
2025-09-30 10:01:21 +08:00
Samuel Obuch b5ba537bcd Merge branch 'feat/esp32h4_unicore_stop_other_core' into 'master'
feat(esp_system): stop other core for unicore esp32h4

See merge request espressif/esp-idf!41640
2025-09-30 04:12:34 +08:00
Roland Dobai e0d86d8e8c Merge branch 'fix/component_validation' into 'master'
Build & config: correct component targets property name in validation

See merge request espressif/esp-idf!42170
2025-09-29 21:57:23 +02:00
Wan Lei 7a2f6a8254 Merge branch 'fix/twai_hid_provider_word_ctu' into 'master'
fix(driver_twai): hide the provider keyword ctu in idf

See merge request espressif/esp-idf!42142
2025-09-30 00:58:32 +08:00
peter.marcisovsky b3bb053160 refactor(usb_host): Remove usb component form esp-idf
- usb component was relocated from esp-idf to esp-usb
    - the component is now a managed component
2025-09-29 17:15:17 +02:00
Roland Dobai 52f7cebcd3 ci: Support known failure cases in pytests on Windows runners 2025-09-29 15:38:43 +02:00
Roland Dobai bc01141098 fix(cmake): correct component targets property name in validation
The component validation script was using an incorrect property name
'__COMPONENT_TARGETS' when retrieving component targets. This should be
'__BUILD_COMPONENT_TARGETS' to match the actual property name used
throughout the build system.

This fix ensures the component validation can properly access the list
of component targets and perform validation checks correctly.
2025-09-29 15:37:54 +02:00
Abhik Roy 57013ba404 Merge branch 'lwip/dhcps_add_dns_remove' into 'master'
feat(lwip): Remove deprecated LWIP_DHCPS_ADD_DNS Kconfig option

Closes IDF-11334 and DOC-12462

See merge request espressif/esp-idf!42119
2025-09-29 21:26:01 +08:00
Abhik Roy d574382d7b feat(lwip): Remove deprecated LWIP_DHCPS_ADD_DNS Kconfig option 2025-09-29 21:26:01 +08:00
tarun.kumar 324337369d feat(wifi) : Add FT with SAE feature 2025-09-29 18:40:47 +05:30
sonika.rathi 5b65634b49 feat(esp_partition): add error-returning variants for partition find APIs
Add esp_partition_find_err() and esp_partition_find_first_err() to provide
error reporting while maintaining backward compatibility.

Closes https://github.com/espressif/esp-idf/issues/9281
2025-09-29 15:00:41 +02:00
Song Ruo Jing f1e6e66fb5 Merge branch 'bugfix/usb_dp_pin_unusable_after_cpu_reset' into 'master'
fix(gpio): fix USB DP pin unusable after CPU reset for S3/C3

Closes IDFGH-16345

See merge request espressif/esp-idf!41694
2025-09-29 20:10:53 +08:00
Alexey Lapshin e0b693493e Merge branch 'feature/enable_zc_extensions_for_esp32p4' into 'master'
feat(tools): enable zc* extensions for esp32p4 revision >= 3.0

See merge request espressif/esp-idf!42166
2025-09-29 15:57:47 +04:00
Rocha Euripedes 050de89fa7 Merge branch 'removes_mqtt_host_test' into 'master'
ci: Removes esp-mqtt host test

See merge request espressif/esp-idf!42285
2025-09-29 19:51:45 +08:00
Fu Hanxi 1cf5d3115b ci: print with color 2025-09-29 13:22:46 +02:00
Fu Hanxi 3175db5346 ci: move extra targets need to be built by default to --additional-build-targets 2025-09-29 13:22:42 +02:00
Lv Xin Yue 508618432b Merge branch 'docs/improve_camera_controller' into 'master'
update camera driver document

See merge request espressif/esp-idf!42102
2025-09-29 17:15:06 +08:00
Euripedes Rocha Filho a87d3e1040 ci: Removes esp-mqtt host test
Test is failing and was moves to esp-mqtt already
2025-09-29 10:05:12 +02:00
Jan Beran f7393ab305 fix(kconfig.cmake): Do not regenerate unnecessary config files 2025-09-29 10:03:47 +02:00
yinqingzhao 2826580a2d fix(wifi): fix pre_commit issue of reg_parse.py 2025-09-29 14:52:59 +08:00
yinqingzhao 76d43feca4 fix(wifi): fix country code PK miss 2.4G permission 2025-09-29 14:52:59 +08:00
wuzhenghui 464392bfc3 fix(esp_hw_support): increase esp32c5 wifi link working cost 2025-09-29 14:37:52 +08:00
Kevin (Lao Kaiyao) 9ef6d3eac4 Merge branch 'bugfix/fixed_possible_i2s_failure_on_p4' into 'master'
ci(i2s): fixed occationally failure on P4

Closes IDFCI-3185, IDFCI-3186, IDFCI-3191, IDFCI-3192, IDFCI-3193, IDFCI-3194, IDFCI-3195, IDFCI-3196, IDFCI-3197, IDFCI-3198, IDFCI-3199, IDFCI-3200, IDFCI-3201, IDFCI-3202, IDFCI-3203, IDFCI-3204, IDFCI-3205, IDFCI-3206, IDFCI-3207, and IDFCI-3208

See merge request espressif/esp-idf!42229
2025-09-29 14:24:25 +08:00
zhanghaipeng 7ce921ed95 fix(ble/bluedroid): Fixed resolve adv data crash if host deinitialized or disabled 2025-09-29 11:57:30 +08:00
Mahavir Jain 5cf6b6d36d Merge branch 'contrib/github_pr_17582' into 'master'
fix(mbedtls): prevent vectorization fault in clang O2 optimization (GitHub PR)

Closes IDFGH-16450

See merge request espressif/esp-idf!41973
2025-09-29 09:19:05 +05:30
hebinglin f4bc3c72f0 feat(esp_hw_support): support psram during sleep for esp32h4 2025-09-29 11:41:54 +08:00
Kevin (Lao Kaiyao) b8a0d88a68 Merge branch 'doc/fix_i2s_es8311_ffmpeg_instruction' into 'master'
docs(i2s_es8311): fixed ffmpeg instruction in README

Closes IDFGH-16529

See merge request espressif/esp-idf!42260
2025-09-29 11:17:31 +08:00
Lv Xin Yue e559d93da3 update camera driver document 2025-09-29 11:17:16 +08:00
morris a15ab238fb Merge branch 'feat/mipi_dsi_vsync_event' into 'master'
feat(dsi): add vsync interrupt handling

Closes IDF-13503

See merge request espressif/esp-idf!42163
2025-09-29 10:54:58 +08:00
Guillaume Souchere 0f3f44be62 feat(heap): Add hidden Kconfig option to allow exec cap 2025-09-29 10:45:33 +08:00
Guillaume Souchere da9d8a143a feat(heap): Report prohibited usage of MALLOC_CAPS_EXEC at compile time
Add a condition on the definition of the MALLOC_CAP_EXEC macro to
prevent it from being defined if ESP_SYSTEM_MEMPROT_FEATURE or
ESP_SYSTEM_PMP_IDRAM_SPLIT is enabled, thus throwing a compile time
error when using it.

Closes https://github.com/espressif/esp-idf/issues/14837
2025-09-29 10:45:32 +08:00
Ondrej Kosta 61aaaf3a8b Merge branch 'feat/remove_eth_drivers' into 'master'
Feat/remove eth drivers

Closes IDF-13553 and IDF-5865

See merge request espressif/esp-idf!42021
2025-09-29 10:14:42 +08:00
wuzhenghui 198e789ea2 change(esp_hw_support): remove DCDC-to-LDO power switch support in ESP32P4 lightsleep 2025-09-29 10:07:20 +08:00
wuzhenghui be88f84bcc change(esp_hw_support): control DCDC switch by PMU FSM while control DCDC_EN by software 2025-09-29 10:07:20 +08:00
Jiang Jiang Jian a44c3d444d Merge branch 'bugfix/ndp_wait_events_issue' into 'master'
fix(esp_wifi): Fix false wait events during NAN datapath setup

Closes WIFIBUG-1170 and WIFIBUG-1171

See merge request espressif/esp-idf!39151
2025-09-29 10:07:06 +08:00
Wei Yuhan 661ca1abf2 docs(ble): Updated NimBLE certification info 2025-09-29 10:06:03 +08:00
Jin Cheng 3fa9d23ad2 fix(bt/controller): fixed several controller bugs 2025-09-29 09:59:42 +08:00
Marius Vikhammer 6efd36f475 Merge branch 'feature/gcc_error_on_default_warnings_disable_final' into 'master'
feat(build): Default warnings to be considered as errors

Closes IDF-9675

See merge request espressif/esp-idf!42184
2025-09-29 09:19:56 +08:00
Adam Múdry 94083867a7 Merge branch 'refactor/fatfs_vfs_functions' into 'master'
fix(storage): Refactor FATFS VFS functions to be easier to understand

Closes IDF-14044

See merge request espressif/esp-idf!41679
2025-09-28 22:54:49 +02:00
Zhang Shuxian 4aaf5a1c29 docs: Update CN translation 2025-09-29 01:54:38 +08:00
Marek Fiala 56fa45c741 revert(tools): Removed --legacy option for esp-idf-size 2025-09-29 01:54:38 +08:00
Marek Fiala 8f4c52a358 change(tools): ruff formatting core_ext.py 2025-09-29 01:54:38 +08:00
Nachiket Kukade 5c73eef918 fix(esp_wifi): Partially revert NAN event API change from b0498569c8 2025-09-28 22:58:28 +05:30
Nachiket Kukade 783b80f9d5 fix(esp_wifi): NAN improvements and bugfixes
- Add NDP Peer inactivity detection and termination support
- Add NDP Action frames internal retries
- Fix NAN API return status to match with Tx status
- Fix false wait events during NAN datapath setup
- Replace NAN default event handlers with callbacks to
  avoid race conditions between wifi and user tasks
- Fix parsing Availability of third party devices

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

Co-authored-by: akshat <akshat.agrawal@espressif.com>
2025-09-28 22:58:22 +05:30
Kapil Gupta e8f75f97b0 Merge branch 'feat/roaming_app_blacklist' into 'master'
fix(esp_wifi): Add blacklist logic in roaming app

Closes WIFIBUG-1219, WIFIBUG-1208, WIFIBUG-1109, WIFIBUG-1203, and WIFIBUG-1428

See merge request espressif/esp-idf!40802
2025-09-28 21:44:31 +05:30
Jiang Jiang Jian 37322d4a61 Merge branch 'feat/add_154_status_for_coex' into 'master'
feat(coex): add 802.15.4 status for coex

See merge request espressif/esp-idf!41627
2025-09-28 23:01:01 +08:00
C.S.M 3e4e6918fd Merge branch 'refactor/make_mspi_hal_independent' into 'master'
refactor(mspi): Make mspi hal layer independent

See merge request espressif/esp-idf!42035
2025-09-28 22:23:59 +08:00
Ondrej Kosta d622d4d9ac feat(esp_eth): removed SPI Ethernet and PHY drivers from IDF 2025-09-28 16:19:42 +02:00
morris f54c09e81e Merge branch 'feat/esp_hal_timg' into 'master'
feat(timg): graduate the hal driver into a single component

Closes IDF-14095

See merge request espressif/esp-idf!42202
2025-09-28 21:26:37 +08:00
laokaiyao 8ac2f4cc45 docs(i2s_es8311): fixed ffmpeg instruction in README
Closes https://github.com/espressif/esp-idf/issues/17653
2025-09-28 20:03:43 +08:00
Island 33321e59b1 Merge branch 'opt/opt_ble_log' into 'master'
feat(ble/bluedroid): Added BLE debug LOG for bluedroid

Closes BLERP-2258

See merge request espressif/esp-idf!41567
2025-09-28 19:18:03 +08:00
Xu Si Yu 036aedad6a feat(coex): add 802.15.4 status for coex 2025-09-28 18:44:10 +08:00
yangfeng 743036ad77 fix(bt/bluedroid): Fix the boundary conditions when checking EIR data 2025-09-28 17:50:48 +08:00
Jiang Jiang Jian bdda8300d4 Merge branch 'bugfix/dont_use_flexible_arr_in_union' into 'master'
fix(bluedroid): removed the code relying on compiler-specific extension for FAM in union

Closes BT-4126

See merge request espressif/esp-idf!42236
2025-09-28 17:40:22 +08:00
laokaiyao 37ed3e0904 ci(i2s): fixed occationally failure on P4
read write case can sometimes failed due to the low frequency of the default I2S clock source on P4.
2025-09-28 17:13:16 +08:00
Jiang Jiang Jian b2335ebe74 Merge branch 'fix/ci_add_supp_for_h2' into 'master'
Add supp for esp32h2 in softAP and station examples

See merge request espressif/esp-idf!41246
2025-09-28 17:09:27 +08:00
Wang Meng Yang c4a2511659 Merge branch 'bugfix/enter_sniff_failed' into 'master'
fix(bt/controller): fixed the sniff anchor point can be mismatch from central and peripheral

Closes BTQABR2023-553

See merge request espressif/esp-idf!42240
2025-09-28 16:59:45 +08:00
Jiang Jiang Jian 44736c8bd2 Merge branch 'bugfix/sae_identifier_nvs' into 'master'
fix(esp_wifi): Set default nvs value for sae identifier to NULL

See merge request espressif/esp-idf!42047
2025-09-28 16:37:06 +08:00
C.S.M f022b67486 feat(spi_flash): Support flash suspend on esp32p4 resivion 3 2025-09-28 16:25:28 +08:00
linruihao 8104d4578f fix(bt): fix btbb may not reinit when coex with wifi
Closes https://github.com/espressif/esp-idf/issues/15841
2025-09-28 15:56:55 +08:00
linruihao 8713de3b57 fix(bt/bluedroid): fix hfp ag external codec datapath issue
Closes https://github.com/espressif/esp-idf/issues/17480
2025-09-28 15:56:55 +08:00
Armando (Dou Yiwen) 53f96d8595 Merge branch 'feat/p4_rev3_isp_awb_wbg' into 'master'
isp: awb white balance gain feature and subwindow feature support on P4 ECO5

Closes IDF-13936

See merge request espressif/esp-idf!41858
2025-09-28 07:53:48 +00:00
wanckl cee541614e fix(driver_twai): update twaifd register description 2025-09-28 14:45:27 +08:00
Jiang Jiang Jian 2812a4e745 Merge branch 'bugfix/fix_pm_offchan_execute_ready_cb_miss_issue' into 'master'
fix(wifi): fix pm offchan execute ready cb miss issue

Closes WIFI-7020

See merge request espressif/esp-idf!42154
2025-09-28 13:53:26 +08:00
Shreyas Sheth 0b0b38ea4c fix(esp_wifi): Set default nvs value for sae identifier to NULL
Resolves regression introduced in 6f7cf98ffe
which may impact WPA3 station connection in certain conditions
2025-09-28 10:37:19 +05:30
Zhang Shu Xian f305d69ba1 Merge branch 'docs/correct_wrong_description_in_secure_boot_v2' into 'master'
docs: Correct wrong description in secure-boot-v2.rst

Closes DOC-12271

See merge request espressif/esp-idf!42090
2025-09-28 12:13:43 +08:00
tarun.kumar fdda62267e fix(wifi) : Resetting current bssid for every roaming connection intiated
- Bssid reset after btm or legacy roam
     - Making few changes in CMake for wpa_supplicant and esp_wifi
2025-09-28 11:53:01 +08:00
Kapil Gupta 0f3034586b fix(esp_wifi): Address some review comments and issues 2025-09-28 11:53:01 +08:00
Kapil Gupta 7d18b82575 feat(roaming): ignore WPA2-only APs on transition disable
This commit introduces a new feature to the roaming logic. If the
currently connected AP has the 'transition disable' bit set in its
RSN IE, the roaming logic will now ignore any scanned APs that only
support WPA2-PSK. This prevents a security downgrade when roaming in a
mixed WPA2/WPA3 environment.

A new Kconfig option, CONFIG_ESP_WIFI_IGNORE_WPA2_ONLY_ON_TRANSITION_DISABLE,
has been added to control this feature. It is disabled by default.
2025-09-28 11:53:01 +08:00
Kapil Gupta 074b2d0f93 fix(roaming_app): resolve issues in blacklisting logic
This commit addresses several issues in the BSSID blacklisting
feature of the roaming application:

- Merged duplicate  functions into a single,
  unified function, resolving a compilation error.
- Corrected  and
  to properly access the  member of the
  struct, fixing invalid memory access.
- Introduced  in Kconfig to enable
  the manual blacklisting feature and made auto-blacklisting
  dependent on it.
- Updated  to use the
  correct BSSID from .
- Optimized the removal of expired blacklist entries by using
   for better efficiency.
2025-09-28 11:53:01 +08:00
Kapil Gupta a7d2066913 fix(esp_wifi): Add blacklist logic in roaming app 2025-09-28 11:53:01 +08:00
Song Ruo Jing 15c5178d5a fix(gpio): fix USB DP pin unusable after CPU reset for S3/C3
Closes https://github.com/espressif/esp-idf/issues/17488
2025-09-28 11:45:37 +08:00
Shreyas Sheth 28219461ee fix(esp_wifi): Resolve comments for wpa3_compat mode documentation 2025-09-28 09:10:50 +05:30
Shreyas Sheth 1753f5ee63 fix(esp_wifi): Resolve some comments for wpa3_compatible_mode support 2025-09-28 09:10:42 +05:30
Shreyas Sheth 3eca66cc0d fix(esp_wifi): Resolve comments for wpa3_compatible_mode 2025-09-28 09:10:30 +05:30
Shreyas Sheth a7f32f5a2a feat(esp_wifi): Add compile flag for wpa3 compatible mode 2025-09-28 09:10:29 +05:30
Shreyas Sheth 1b33c9daae fix(esp_wifi): Resolve comments for wpa3 compatible mode 2025-09-28 09:10:29 +05:30
Shreyas Sheth fbfa3aa0e0 feat(esp_wifi): Add support of wpa3 compatible more for ap and sta 2025-09-28 09:10:29 +05:30
Sai Pratyusha Magam e8a19841f4 RSNO: Generate IGTK if any of the RSN variants has PMF enabled
With RSN overriding enabled, AP can be configured to set MFPC to 0 and
MFPR to 0 in the RSNE and MFPC to 1 and MFPR to 1 in the RSNOE and
RSNO2E. IGTK generation, configuration to the driver, and inclusion of
the IGTK KDE in 4-way handshake should also take into account the
management frame protection settings in the override variants.

Signed-off-by: Sai Pratyusha Magam <quic_smagam@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen c3d6a1ce73 Avoid undefined behavior in RSNXE capability bit checker
Integer promotion converts u8 rsnxe[i] to an int which is not
sufficiently large to be able to handle the maximum shift left of 24
bits here. Type cast rsnxe[i] to u32 explicitly to get rid of the sign
bit and avoid this undefined behavior from the shift operation.

Credit to OSS-Fuzz: https://issues.oss-fuzz.com/issues/376786400
Fixes: d675d3b15b40 ("Add helper functions for parsing RSNXE capabilities")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen 22a15585fd RSNO: Omit RSNXE in (Re)Association Response frame like in Beacon frame
When rsn_override_omit_rsnxe=1 is used to omit the RSNXE from Beacon and
Probe Response frames, it should also be omitted from (Re)Association
Response frames since there is a general expectation on the RSNXE being
used consistently between these frames. This is unlikely to have much of
a difference for most use cases in practice, but this could impact FILS
association if the non-AP STA were to confirm that the unprotected and
protected version of the RSNXE from the AP were identical.

Fixes: 8b2ddfdbb688 ("RSNO: Allow RSNXE to be omitted")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Veerendranath Jakkam 1848be2f06 RSNO: Always enable SNonce cookie and RSN Override elements validation
Always set SNonce cookie and enable RSN Override elements validation
irrespective of the RSN Selection element usage in (Re)Association
Request frame when RSN overriding supported.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen 5e1e2cd4ea RSNO: Do not enforce SNonce cookie and RSN Selection match if RSNO not used
A STA that supports RSN overriding will always use the SNonce cookie. An
AP that does not advertise RSN overriding elements must not enforce that
SNonce cookie is used with RSN Selection element since a STA includes
the latter only when it sees the AP advertising RSN overriding elements.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Veerendranath Jakkam 60643b71e7 RSNO: Add debug prints for RSN override elements in EAPOL frames
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2025-09-28 09:10:29 +05:30
Shreyas Sheth 35e73c0147 fix(esp_wifi): Cosmetic changes for wpa_supplicant 2025-09-28 09:10:29 +05:30
Jouni Malinen f7e886bfed RSNO: Include all RSNE/RSNXE variants in EAPOL-Key message 3/4
This allows all variants to be verified based on a protected frame to
achieve robust downgrade protection.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen 8b8d5ebfc9 RSNO: Use SNonce cookie to indicate support for RSN overriding
This provides an implicitly protected (SNonce is used as an input to PTK
derivation) mechanism for a STA to indicate support for RSN overriding
in a manner that does not cause interopability issues with deployed APs.

In addition, update sm->SNonce on the Authenticator only based on
message 2/4 since that is the only EAPOL-Key message that is defined to
provide the actual SNonce value. While clearing of this internal buffer
on message 4/4 might not cause issues, it is better to keep the actual
SNonce value here since the SNonce cookie can be used at a later point
in the sequence.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen 7ec6fbd49a RSNO: Use the RSN Selection element to indicate which variant was used
This replaces the use of the RSNE Override and RSNE Override 2 elements
with empty payload to indicate which RSNE variant was used.

In addition, this adds stricter validation of the RSNE in
(Re)Association Request frame to allow only the pairwise cipher suites
and AKMs listed in the indicated RSNE variant to be used.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Shreyas Sheth a743612f6c fix(wifi): Restructure wpa_parse_kde_ies same as upstream 2025-09-28 09:10:29 +05:30
Jouni Malinen 8e71c23a0e RSNO: Remove unused override element generation
The separate RSNOE/RSNO2E/RSNXOE buffers were not actually used on the
Authenticator, so remove them.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Adil Saeed Musthafa c5161c4012 RSNO: Protect wpa_ie_buf3 from reuse explicitly
Use else-if check for better clarity regarding usage of wpa_ie_buf3 to
make it explicit that memory is allocated for this pointer only once.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen b347db7af7 RSNO: Remove override elements from EAPOL-Key msg 3/4
This was not done in case the STA did not use RSN overriding.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen 34336d28b9 RSNO: Support over two octets of RSNXOE capabilities
The RSNXE generation function was extended to support this earlier, but
that update was missed from the RSNXOE variant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen 5a713f89d7 RSNO: Allow RSNXE to be omitted
Add an explicit rsn_override_omit_rsnxe=1 configuration parameter to
allow the RSNXE to be omitted when using the RSNXOE and wanting to
minimize interoperability issues with STAs that might recognize the
RSNXE, but not handle it correctly, e.g., when multiple octets of
payload is included.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Shreyas Sheth 1e7dfd7896 feat(esp_wifi): Restructure wpa_supplicant for wpa3_compatible mode 2025-09-28 09:10:29 +05:30
Jouni Malinen 18db88ab4a RSNE/RSNXE overriding for STA
Add support for RSNE/RSNXE Override elements. Use these elements to
determine AP's extended RSN parameters.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Shreyas Sheth ee3723b922 feat(wifi): Add support for wpa3 compatible flag for softap 2025-09-28 09:10:29 +05:30
Jouni Malinen 434671f5e6 RSNE/RSNXE overriding for AP
Allow hostapd to be configured to advertised two separate sets of
RSNE/RSNXE parameters so that RSNE/RSNXE can use a reduced set of
capabilities (e.g., WPA2-Personal only) for supporting deployed STAs
that have issues with transition modes while the new override elements
can use a newer security option (e.g., WPA3-Personal only) for STAs that
support the new mechanism.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Shreyas Sheth 86f8c88161 fix(wifi): Restructure esp supplicant for softap 2025-09-28 09:10:29 +05:30
Jouni Malinen 21ec067ef8 Allow RSNXE Override element to override RSNXE contents during parsing
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Jouni Malinen 7ed2e8cf7e Add helper functions for parsing RSNXE capabilities
Simplify the implementation by using shared functions for parsing the
capabilities instead of using various similar but not exactly identical
checks throughout the implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
2025-09-28 09:10:29 +05:30
Jouni Malinen 25e0d46688 Add RSN overriding elements into IE parsing
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Shreyas Sheth 071bedda27 feat(wifi): restructure ieee802_11_parse_elems similar to upstream suppliant 2025-09-28 09:10:29 +05:30
Jouni Malinen 67771bab39 Define WFA vendor specific element types for RSNE/RSNXE overriding
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2025-09-28 09:10:29 +05:30
Jin Cheng ac2be3a58e fix(bt/controller): fixed the sniff anchor point can be mismatch from central and peripheral 2025-09-28 11:33:25 +08:00
Marius Vikhammer f3dedf6f62 Merge branch 'bugfix/pthread_sem_timeout_test_failure' into 'master'
test(pthread): fixed test-case overflow calc issue

Closes IDFCI-3520, IDFCI-3466, and IDFCI-3176

See merge request espressif/esp-idf!42237
2025-09-28 11:23:13 +08:00
Zhang Shuxian dbb50edf5e docs: Update translation for esp_netif 2025-09-28 11:20:32 +08:00
Marius Vikhammer 90897a9df4 test(pthread): fixed test-case overflow calc issue 2025-09-28 10:14:46 +08:00
muhaidong 15fd77bbb0 fix(wifi): fix pm offchan execute ready cb miss issue 2025-09-28 10:13:46 +08:00
Jiang Jiang Jian bdd8d25761 Merge branch 'bugfix/remove_depricated_code' into 'master'
WiFi: remove deprecated code

See merge request espressif/esp-idf!40576
2025-09-28 09:56:20 +08:00
armando c8029ace8c feat(isp): support AWB driver setting wbgain and subwindow feature 2025-09-28 01:15:18 +00:00
Kapil Gupta 8b68791996 fix(tool): increase buffer size for kconfig server 2025-09-27 17:55:28 +05:30
morris 71cb24caab feat(timg): graduate the hal driver into a single component 2025-09-27 17:33:10 +08:00
morris 415d1aba79 feat(dsi): add vsync interrupt handling 2025-09-27 17:05:29 +08:00
morris 37e9ba55d1 feat(axi_icm): support esp32-p4 rev3.0 2025-09-27 16:55:42 +08:00
Jack 17f7fd5ba6 fix migration guide build error 2025-09-27 11:44:29 +05:30
David Čermák 82d8f9f605 Merge branch 'feat/esp_netif_status_event' into 'master'
[esp_netif]: Add support for netif status events

Closes IDF-13357

See merge request espressif/esp-idf!42143
2025-09-27 13:36:03 +08:00
JinCheng 5a6193ae14 fix(bluedroid): removed the code relying on compiler-specific extension for FAM in union 2025-09-27 11:28:54 +08:00
David Čermák 7ab29a89e5 Merge branch 'fix/esp_netif_minor_leak' into 'master'
Fix tiny memory leak when PPP connection creation fails in esp_netif_new_ppp (GitHub PR)

Closes IDFGH-16327

See merge request espressif/esp-idf!42126
2025-09-27 03:59:32 +08:00
Samuel Obuch 38498e67cf feat(esp_system): stop other core for unicore esp32h4 2025-09-27 01:41:48 +08:00
Kapil Gupta 552a8653ad fix(esp_wifi): Fix some compilation issues in examples 2025-09-26 21:51:38 +05:30
Kapil Gupta 7b665b6512 fix(esp_wifi): Correct some documentation 2025-09-26 21:43:32 +05:30
Nachiket Kukade a82788180c fix(esp_wifi): Remove deprecated NAN API variables in examples 2025-09-26 21:43:26 +05:30
Kapil Gupta f12debf4f5 fix(esp_wifi): Updated some documentation 2025-09-26 21:43:05 +05:30
Kapil Gupta ce00aa9b78 fix(esp_wifi): Address review comments 2025-09-26 21:42:46 +05:30
Nachiket Kukade b0498569c8 fix(esp_wifi): Remove deprecated fields in NAN & FTM API's
- Update wifi libs to remove references to deprecated API's, enums
and variables
2025-09-26 21:42:39 +05:30
Kapil Gupta 2563d6a2e8 fix(esp_wifi): Add dummy value for deprecated enums 2025-09-26 21:42:30 +05:30
Kapil Gupta 0f63b92501 fix(esp_wifi): remove esp_interface.h and update usages 2025-09-26 21:42:30 +05:30
Kapil Gupta a28fefcf73 docs: add Wi-Fi migration guide for v6.0 2025-09-26 21:42:30 +05:30
Kapil Gupta 5898086eca fix(esp_wifi): Remove some more deprecated enum/functions 2025-09-26 21:42:30 +05:30
Kapil Gupta f189052386 fix(esp_wifi): Remove esp_interface.h 2025-09-26 21:42:30 +05:30
Kapil Gupta 35f8d9d42c fix(esp_wifi): Remove deprecated arguments from some APIs 2025-09-26 21:42:30 +05:30
Kapil Gupta f2cd005473 fix(esp_wifi): Removed deprecated rrm function 2025-09-26 21:42:30 +05:30
Kapil Gupta b6e632900b fix(esp_wifi): Remove deprecated event for DPP 2025-09-26 21:42:29 +05:30
Kapil Gupta 6bb3306154 fix(esp_wifi): Remove deprecated esp_wpa2.h 2025-09-26 21:42:29 +05:30
David Čermák 747c172fdc Merge branch 'feat/dhcps_support_hostname_per_client' into 'master'
[lwip/dhcps]: Add support for reporting clients hostname

Closes IDFGH-9326

See merge request espressif/esp-idf!42094
2025-09-26 21:47:50 +08:00
Roland Dobai bb3055b37e Merge branch 'ci/test_tool_ignore_list' into 'master'
ci: Support known failure cases in pytests of test_tools

See merge request espressif/esp-idf!42203
2025-09-26 15:07:27 +02:00
Shen Meng Jing d170949daa Merge branch 'docs/sync_en_and_cn_docs' into 'master'
docs: Sync CN and EN docs missing translation labels

Closes DOC-12424

See merge request espressif/esp-idf!42145
2025-09-26 21:03:18 +08:00
Jiang Jiang Jian 369d464151 Merge branch 'feat/support_esp32h21_sleep_feature' into 'master'
feat: support esp32h21 lowpower features

Closes PM-425, PM-426, PM-427, PM-428, PM-430, PM-432, IDF-11512, IDF-11515, IDF-11516, IDF-11517, IDF-11519, and IDF-11520

See merge request espressif/esp-idf!40116
2025-09-26 20:17:46 +08:00
zhanghaipeng 45775a3e35 feat(ble/bluedroid): Added BLE debug LOG for bluedroid 2025-09-26 20:10:32 +08:00
Shen Meng Jing e4015962ed Merge branch 'docs/update_random_cn' into 'master'
docs: Update CN translation for random.rst

Closes DOC-12345

See merge request espressif/esp-idf!42141
2025-09-26 19:05:29 +08:00
Zhang Shuxian 0f20366ea8 docs: Add a note about ROM version in the boot log 2025-09-26 18:57:27 +08:00
Meet Patel af895be8f6 feat(ulp_riscv): Add pulse counter example code for ulp riscv
Added a pulse counter example code for ulp riscv chips. The example
works by HP core generating high frequency pulses on a GPIO, which
are counted by ULP core to find out the highest possible frequency
of pulses that can be achieved without missing any edges.
2025-09-26 15:59:07 +05:30
Adam Múdry beaf579f9b fix(storage): Refactor FATFS VFS functions to be easier to understand 2025-09-26 18:17:15 +08:00
Zhang Shuxian ff8c82169f docs: Correct wrong description in secure-boot-v2.rst 2025-09-26 17:23:05 +08:00
Gao Xu 26e77d1940 Merge branch 'refactor/adc_hal_no_config' into 'master'
refactor(adc): Remove sdkconfig dependency in adc hal layer

Closes IDF-13624

See merge request espressif/esp-idf!42015
2025-09-26 17:19:17 +08:00
Chen Jichang 51b253e945 feat(rmt): support receive buffer to psram 2025-09-26 16:42:33 +08:00
Chen Jichang ddef1d3d52 refactor(gdma): move buffer aligment to buffer mount config 2025-09-26 16:42:33 +08:00
Chen Jichang f2f62b590d fix(rmt): alloc channel memory from internal 2025-09-26 16:42:33 +08:00
Omar Chebib 056c40424c Merge branch 'feature/mailbox' into 'master'
feat(mailbox): define and implement a mailbox API for the ESP32-P4

See merge request espressif/esp-idf!39925
2025-09-26 16:34:41 +08:00
Jiang Jiang Jian 9fee9cc1f0 Merge branch 'bugfix/ftm_last_dial_tok' into 'master'
bugfix(wifi): Set the dialog token of last FTM resp to zero

Closes IDFGH-16186

See merge request espressif/esp-idf!41154
2025-09-26 16:00:49 +08:00
Xu Si Yu 29d8fbe896 Merge branch 'feat/add_openthread_start_stop_api' into 'master'
feat(openthread): add openthread start stop APIs

See merge request espressif/esp-idf!40349
2025-09-26 15:35:20 +08:00
Island f514bd56f7 Merge branch 'feat/add_safe_unity_component' into 'master'
feat(ble): added safe unity component

Closes BLERP-2272

See merge request espressif/esp-idf!42190
2025-09-26 15:22:35 +08:00
Konstantin Kondrashov 0096599660 feat(build): Default warnings to be considered as errors 2025-09-26 10:15:46 +03:00
Wang Qixiang 105a64ab9e Merge branch 'component/remove_wifi_prov' into 'master'
change(wifi_prov): Remove wifi_provisioning component and esp_prov tool

See merge request espressif/esp-idf!41866
2025-09-26 15:15:17 +08:00
Alexey Lapshin d081549979 feat(tools): enable zc* extensions for esp32p4 revision >= 3.0 2025-09-26 15:09:23 +08:00
Harshal Patil fd7d9c9ee9 Merge branch 'fix/key_mgr_use_default_efuse_key' into 'master'
Configure the Key Manager to use XTS-AES efuse key by-default

Closes IDFCI-3135 and IDFCI-3136

See merge request espressif/esp-idf!42032
2025-09-26 12:34:19 +05:30
C.S.M b145ede835 refactor(mspi): Make mspi hal layer independent 2025-09-26 14:57:54 +08:00
Island 76b28d8257 Merge branch 'feat/support_blecrt_489' into 'master'
feat(ble/bluedroid): Added API to set channel map for scanning

Closes BLERP-2204

See merge request espressif/esp-idf!41681
2025-09-26 14:36:58 +08:00
Roland Dobai cb84b6860a ci: Support known failure cases in pytests of test_tools 2025-09-26 08:29:55 +02:00
hebinglin 97d01f229c change(soc): add TODO jira tickets for some changes in esp32h21 2025-09-26 14:02:55 +08:00
hebinglin ac6fd31296 change(esp_hw_support): support mem pd during deepsleep for esp32h21 and esp32h4 2025-09-26 14:02:55 +08:00
hebinglin 225b1d8a37 change(esp_hw_support): change some pmu params for esp32h21 & esp32h4 2025-09-26 14:02:55 +08:00
hebinglin 92b2d1d4f2 change(esp_hw_support): need be reverted after supporting corresponding features in esp32h21 2025-09-26 14:02:55 +08:00
hebinglin 89795f6281 change(esp_hw_support): support static and dynamic sleep cpu retention for esp32h21 2025-09-26 14:02:55 +08:00
hebinglin 74b8939b50 fix(esp_hw_support): remove the dependency of not esp32h21 or esdp32h4 for PM_SLP_IRAM_OPT 2025-09-26 14:02:55 +08:00
wuzhenghui 9e0f49d57b feat(esp_hw_support): support PD_CPU and PD_TOP retention on esp32h21 2025-09-26 14:02:55 +08:00
wuzhenghui 3e7892122e feat(esp_hw_support): support lightsleep and deepsleep on esp32h21 2025-09-26 14:02:55 +08:00
wuzhenghui ae34067f11 feat(soc): update esp32h21 lowpower related caps 2025-09-26 14:02:55 +08:00
David Cermak 75e0d62739 feat(lwip/dhcps): Add support for reporting clients hostname 2025-09-26 07:54:20 +02:00
David Cermak 48af385311 fix(esp_netif): Add support for netif status events 2025-09-26 07:11:04 +02:00
Xu Si Yu 4876f122cc feat(openthread): examples adaptation of new APIs 2025-09-26 10:59:59 +08:00
Xu Si Yu 41dbd0d03a feat(openthread): add common components for openthread examples 2025-09-26 10:59:59 +08:00
Xu Si Yu c3035bb382 feat(openthread): add openthread start stop APIs 2025-09-26 10:59:52 +08:00
Island 9fe51958ae Merge branch 'change/ble_update_lib_20250925' into 'master'
change(ble): [AUTO_MR] 20250925 - Update ESP BLE Controller Lib

Closes BLERP-1350, BLERP-2254, BLERP-2253, BLERP-2271, BLERP-2223, BLERP-2221, BLERP-2269, BLERP-2224, BLERP-2213, BLERP-2226, BLERP-2225, and BLERP-2222

See merge request espressif/esp-idf!42158
2025-09-26 10:41:41 +08:00
Zhou Xiao 64ef451586 feat(ble): added safe unity component 2025-09-26 10:25:25 +08:00
gaoxu 41a6a7daa2 refactor(adc): Remove sdkconfig dependency in adc hal layer 2025-09-26 10:15:41 +08:00
Shen Mengjing 573058f0ad docs: Sync CN and EN docs missing translation labels 2025-09-26 09:57:56 +08:00
WanqQixiang 6b503d0db5 component: Remove wifi_provisioning component and esp_prov tool 2025-09-26 09:48:50 +08:00
Wang Meng Yang bf695d08d4 Merge branch 'bugfix/possible_buffer_overflow' into 'master'
Bugfix/possible buffer overflow

Closes BT-4111

See merge request espressif/esp-idf!41878
2025-09-26 09:39:31 +08:00
Marius Vikhammer 25c40d4563 Merge branch 'fix/usb_host_uvc_example_uvc_desc' into 'master'
fix(usb_host): Updaing changed Kconfig value from usb_host_uvc

See merge request espressif/esp-idf!42172
2025-09-26 08:58:52 +08:00
tarun.kumar ee248d6b6d fix(ci) : Add supp for esp32h2 in softAP and station examples 2025-09-26 03:02:04 +05:30
peter.marcisovsky bb4c016d59 fix(usb_host): Updaing changed Kconfig value from usb_host_uvc component in UVC example 2025-09-26 03:41:37 +08:00
David Čermák ba0b61d98d Merge branch 'fix/esp_netif_remove_deprecated_api' into 'master'
[esp_netif]: Remove deprecated APIs

Closes IDF-10213

See merge request espressif/esp-idf!42125
2025-09-25 21:23:01 +08:00
Nilesh Kale d73cf17616 Merge branch 'docs/move_ecdsa_related_documentation_under_soc_capability' into 'master'
docs: move ecdsa documentation under soc capability for esp_http_client.rst

See merge request espressif/esp-idf!42169
2025-09-25 20:00:04 +08:00
Marius Vikhammer 56949379e0 Merge branch 'fix/fix_eth_build' into 'master'
fix(esp_eth): fixed ETH builds by forcing Ethernet init ver

See merge request espressif/esp-idf!42164
2025-09-25 18:45:22 +08:00
Shen Mengjing 10b4e56dca docs: Update CN translation for random.rst 2025-09-25 17:23:27 +08:00
nilesh.kale f3dd701289 docs: move ecdsa documentation under soc capability for esp_http_client.rst 2025-09-25 13:53:55 +05:30
Sudeep Mohanty 25ffd0f128 Merge branch 'task/refactor_freertos_port_files' into 'master'
refactor(freertos): Refactor FreeRTOS port files

Closes IDF-4172

See merge request espressif/esp-idf!41981
2025-09-25 09:03:01 +02:00
Gao Xu 53a250b1aa Merge branch 'feat/p4_eco5_ccm' into 'master'
ISP:  support ccm on P4 eco5

Closes IDF-13934

See merge request espressif/esp-idf!42004
2025-09-25 15:02:35 +08:00
akshat dfdf3d5a22 bugfix(wifi): Set the dialog token of last FTM resp to zero
This MR also adds the implementation to perform FTM in 40Mhz in disconnected State.

Closes https://github.com/espressif/esp-idf/issues/17235
2025-09-25 12:26:47 +05:30
Ondrej Kosta 9662963a3d fix(esp_eth): fixed ETH builds by forcing Ethernet init ver 2025-09-25 07:28:12 +02:00
Akiyama Kohane 4358d21a06 fix(mbedtls): prevent vectorization fault in clang O2 optimization
Closes https://github.com/espressif/esp-idf/pull/17582
2025-09-25 13:22:12 +08:00
zwl 4d2d49f736 change(ble): [AUTO_MR] Update lib_esp32c2 to aabb0f68 2025-09-25 12:49:36 +08:00
zwl 810d7e0ec7 change(ble): [AUTO_MR] Update lib_esp32c6 to f0e815be 2025-09-25 12:49:36 +08:00
zwl c99ebc69c4 change(ble): [AUTO_MR] Update lib_esp32c5 to f0e815be 2025-09-25 12:49:36 +08:00
zwl 0b203abf4b change(ble): [AUTO_MR] Update lib_esp32h2 to f0e815be 2025-09-25 12:49:36 +08:00
Alexey Lapshin 22cae61ee1 Merge branch 'feature/enable_zc_extensions' into 'master'
Enable zc* extensions for riscv chips supported them

Closes IDF-13918

See merge request espressif/esp-idf!40074
2025-09-25 08:42:07 +04:00
Wei Yu Han 6588b008d9 Merge branch 'docs/update_6.0_ble_feature_status' into 'master'
docs(ble): Added BLE 6.0 features support status

See merge request espressif/esp-idf!41982
2025-09-25 11:51:58 +08:00
Omar Chebib 32bb32b598 fix(ulp): fix warning in lp core I2C driver 2025-09-25 10:25:15 +08:00
Omar Chebib 324446da95 feat(mailbox): define and implement a mailbox API with hardware and software support 2025-09-25 10:25:15 +08:00
Marius Vikhammer 88c9af78a7 Merge branch 'change/allow_esp_timer_init_from_user_code' into 'master'
change(esp_timer): esp_timer_init_os now returns ESP_OK if esp_timer already initialized

Closes IDFGH-8182

See merge request espressif/esp-idf!42069
2025-09-25 10:23:11 +08:00
JinCheng 075ed218ca fix(bt/bluedroid): fixed potential OOB in Bluedroid 2025-09-25 10:20:10 +08:00
Marius Vikhammer 392226b37f Merge branch 'feat/remove-catch-from-tools' into 'master'
feat(tools): Remove tools/catch

Closes IDF-9203

See merge request espressif/esp-idf!40413
2025-09-25 10:16:55 +08:00
Li Shuai 661898c90a Merge branch 'feat/support_esp32h4_sleep_feature' into 'master'
change(esp_hw_support): support sleep features for esp32h4mp

Closes IDF-13838

See merge request espressif/esp-idf!41951
2025-09-25 10:05:51 +08:00
Alexey Gerenkov f3dba4f778 Merge branch 'feature/add-constexpr-noinline-for-libstdcxx' into 'master'
feat(build): add CONFIG_COMPILER_CXX_GLIBCXX_CONSTEXPR choise option

See merge request espressif/esp-idf!42079
2025-09-25 09:26:23 +08:00
Roland Dobai 746acf4632 Merge branch 'feat/check_external_component_includes' into 'master'
Produce cmake warnings if component includes or builds from outside the component

Closes IDF-12583

See merge request espressif/esp-idf!40800
2025-09-24 20:39:49 +02:00
Alexey Lapshin dfac1a162c change(esp_tee): disable zcmp extension for esp_tee builds 2025-09-24 21:32:02 +07:00
gaoxiaojie fab0bb1056 fix(esp_system): clear cache error interrupt in panic handler 2025-09-24 21:30:56 +07:00
Alexey Lapshin 73edc2903b fix(esp_wifi): fix bin_size_apsta test 2025-09-24 21:30:56 +07:00
Alexey Lapshin 6ed3fe13ca fix(build): add workaround for cm.push that triggers interrupt 2025-09-24 21:30:56 +07:00
Alexey Lapshin a5b54a7ea3 feat(build): enable zc* extensions for riscv chips 2025-09-24 21:30:56 +07:00
Fu Hanxi 6fa8b5ff14 Merge branch 'ci/improve-git-changed-files' into 'master'
ci: improve git diff, avoid gitlab bug on CI_MERGE_REQUEST_DIFF_BASE_SHA

See merge request espressif/esp-idf!42092
2025-09-24 15:27:47 +02:00
Fu Hanxi de12e8911d ci: improve git diff, avoid gitlab bug on CI_MERGE_REQUEST_DIFF_BASE_SHA 2025-09-24 14:25:33 +02:00
David Cermak c9c3e4e972 fix(esp_netif): Remove deprecated APIs 2025-09-24 14:17:36 +02:00
Roland Dobai 5dad2a4884 ci(test): Improve test failures on Windows
Tests are made cancellable and to print STDOUT and STDERR upon failures.
2025-09-24 13:43:23 +02:00
Roland Dobai 36fb960e5f change(tools): Fix pre-commit checks for tools.py 2025-09-24 13:43:23 +02:00
Roland Dobai ef878f4d25 ci(test): Test requiring pexpect.spawn cannot be run on Windows 2025-09-24 13:43:23 +02:00
Roland Dobai 9e8962c6cc change(tools): Fix pre-commit checks for test_idf_qemu.py 2025-09-24 13:43:23 +02:00
Roland Dobai 26ae9e8589 ci(gitlab): Split up Windows tests into (more) parallel jobs 2025-09-24 13:43:23 +02:00
Roland Dobai adb2d5deee feat(cmake): Produce warnings when component dependencies are not defined
There are idf.py hints for helping the user to set component
dependencies properly instead of building sources out-of-component or
including headers from outside the component directory. These are
produced with
tools/idf_py_actions/hint_modules/component_requirements.py.

However, idf.py hints are printed only when the build fails. If the user
starts with a buildable solution then the suggestions to add component
dependencies are not printed.

This commit introduces cmake-level warnings for building source files
from outside the component and including header files without setting up
proper component dependencies.
2025-09-24 13:43:23 +02:00
Roland Dobai c3729929a8 change(tools): Fix pre-commit checks for test_components.py 2025-09-24 13:43:23 +02:00
Roland Dobai 7cf02797d9 Merge branch 'ci/fix-unused-keyword' into 'master'
ci: remove unused keyword

See merge request espressif/esp-idf!42150
2025-09-24 13:41:07 +02:00
Fu Hanxi 809161fb19 ci: remove unused keyword 2025-09-24 13:06:58 +02:00
Roland Dobai 34f658a2c6 Merge branch 'feat/load_idf_ext_from_components' into 'master'
feat(tools): Load idf.py extensions from project's component directories and python packages

Closes IDF-5736 and IDF-4121

See merge request espressif/esp-idf!39875
2025-09-24 12:24:05 +02:00
Sudeep Mohanty f620ab6dbd Merge branch 'feat/move_bootloader_part_table_flash_deps' into 'master'
refactor(build-system): Simplify flash target creation

See merge request espressif/esp-idf!41777
2025-09-24 11:43:48 +02:00
Guillaume Souchere 4c589d6282 Merge branch 'feat/add-ringbuf-reset' into 'master'
feat(esp_ringbuf): Add vRingbufferReset

Closes IDFGH-16385

See merge request espressif/esp-idf!41717
2025-09-24 10:11:07 +02:00
Mahavir Jain b614744808 Merge branch 'fix(esp_tls)/dynamic_buffer_ssl_crash' into 'master'
fix(esp_tls): fix potential ssl crash with dynamic buffer

Closes IDF-14135

See merge request espressif/esp-idf!42120
2025-09-24 12:39:03 +05:30
David Čermák fe059bc551 Merge branch 'fix/esp_netif_const_correct' into 'master'
[esp_netif]: Make esp_netif_ip6_get_addr_type() const correct

Closes IDFGH-15212

See merge request espressif/esp-idf!42085
2025-09-24 14:39:49 +08:00
morris 3124e04773 Merge branch 'fix/clear_force_on_reg_for_cache' into 'master'
fix(clk): do not clear force_on reg for cache

Closes IDFCI-2944, IDFCI-2988, and IDFCI-2953

See merge request espressif/esp-idf!42023
2025-09-24 14:27:16 +08:00
Jiang Jiang Jian c0dc3323fe Merge branch 'refactor/wps_eap_cleanup' into 'master'
refactor(esp_wifi): Remove WPS task code

Closes WIFIBUG-1254 and WIFIBUG-1095

See merge request espressif/esp-idf!38555
2025-09-24 12:52:52 +08:00
Kapil Gupta 1e1d5601de refactor(esp_wifi): Remove WPS task code 2025-09-24 12:52:52 +08:00
Rahul Tank 19176ee11d fix(nimble): Avoid ext adv data in reattempt advertising 2025-09-24 09:28:21 +05:30
Gao Xu ca1e19842d Merge branch 'refactor/rng_ll_s2' into 'master'
refactor(rng): refactor to use hal/ll apis for S2

Closes IDF-12538

See merge request espressif/esp-idf!42060
2025-09-24 11:55:02 +08:00
Rahul Tank b722615489 Merge branch 'feat/separate_indicate' into 'master'
fix(nimble): Added code to handle sending indicate

See merge request espressif/esp-idf!41632
2025-09-24 09:08:56 +05:30
morris e05d890ea1 Merge branch 'fix/enable_dsi_phy_cfg_clk' into 'master'
fix(dsi): enable dsi phy cfg clk

See merge request espressif/esp-idf!42043
2025-09-24 10:33:40 +08:00
Island 448f89e223 Merge branch 'feat/ble_log_v2_with_log_compression' into 'master'
feat(ble): Support ble log compression(draft)

Closes BLERP-2109

See merge request espressif/esp-idf!41758
2025-09-24 10:28:13 +08:00
gaoxu 294868362f feat(isp_color): support ISP color on P4 2025-09-24 10:23:42 +08:00
Gao Xu 3ec9502526 Merge branch 'bugfix/fix_temp_sensor_affect_by_adc' into 'master'
ADC: fix temp sensor affect by adc continuous reset

Closes IDFGH-14786

See merge request espressif/esp-idf!38921
2025-09-24 10:05:03 +08:00
Ashish Sharma 9cb348789c fix(esp_tls): limit ret code from esp_mbedtls_handshake 2025-09-24 09:36:38 +08:00
Armando (Dou Yiwen) e13699a652 Merge branch 'feat/p4_rev3_isp_blc' into 'master'
isp: black level correction driver support on p4 eco5

Closes IDF-13931

See merge request espressif/esp-idf!41714
2025-09-24 01:10:40 +00:00
Armando (Dou Yiwen) 8bb5f0292a Merge branch 'change/g0_test_uses_p4_rev3' into 'master'
g0: use hw_ver3 to build g0 components test app

See merge request espressif/esp-idf!42106
2025-09-24 01:10:24 +00:00
Ivan Grokhotkov 0367cfea8e Merge branch 'feature/rename-bootloader_ld' into 'master'
change(bootloader): rename bootloader.ld -> bootloader.ld.in

Closes IDF-9793

See merge request !42014
2025-09-23 23:20:15 +02:00
Ivan Grokhotkov c4f907a62c Merge branch 'feature/update-toolchain-to-esp-15.2.0_20250920' into 'master'
feat(tools): update toolchain version to esp-15.2.0_20250920

See merge request !42056
2025-09-23 23:14:27 +02:00
morris 4589f33c15 Merge branch 'refactor/remove_nt35510' into 'master'
refactor(lcd)!: moved nt35510 device driver to component registry

Closes IDF-13717

See merge request espressif/esp-idf!41864
2025-09-24 01:43:23 +08:00
Alexey Lapshin d9389ba082 change(bootloader): rename bootloader.ld -> bootloader.ld.in
This change passes file through compiler preprocessor which unlocks
future code refactoring.
2025-09-24 00:51:54 +08:00
Harshal Patil c6e65586e3 Merge branch 'feat/support_aes_block_and_dma_modes_during_runtime' into 'master'
Support AES block and DMA modes during runtime

Closes IDFGH-15251 and IDF-2594

See merge request espressif/esp-idf!40917
2025-09-23 19:46:49 +05:30
Alexey Lapshin 897f95ab1c feat(tools): update toolchain version to esp-15.2.0_20250920 2025-09-23 21:06:14 +07:00
Ondrej Kosta 64df28678c Merge branch 'fix/update-eth-init-calls' into 'master'
fix(ethernet_init): Update Ethernet Init Calls

See merge request espressif/esp-idf!41916
2025-09-23 22:02:11 +08:00
Roland Dobai 5872fe6c07 Merge branch 'test/run_supported_cmake_tests' into 'master'
test(tools): Added minimal supported cmake version tests

Closes IDF-11449

See merge request espressif/esp-idf!40839
2025-09-23 14:41:39 +02:00
Kapil Gupta 9b2f439ce2 Merge branch 'bugfix/eloop_lock' into 'master'
Made changes related to registering eloop timeout for eloop lock

Closes WIFIBUG-1306

See merge request espressif/esp-idf!40384
2025-09-23 18:10:52 +05:30
morris ab7ee70c6f refactor(lcd)!: moved nt35510 device driver to component registry 2025-09-23 20:33:28 +08:00
Shu Chen 2f4c63b11c Merge branch 'feat/update_ot_upstream' into 'master'
feat(openthread): update OT upstream to 3b3dd203b

See merge request espressif/esp-idf!42040
2025-09-23 10:57:24 +00:00
Chen Jichang 40ebbc279f fix(dsi): enable dsi phy cfg clk 2025-09-23 18:12:06 +08:00
David Čermák c33b88db13 Merge branch 'fix/esp_netif_docs' into 'master'
fix(docs): Remove esp_netif doxygen groups

Closes IDFGH-16050

See merge request espressif/esp-idf!40779
2025-09-23 17:25:36 +08:00
Kapil Gupta 0f215a4057 Merge branch 'bugfix/roam_app_neighbor_crash' into 'master'
fix(wifi_apps): Fix crash due to neighbor_list lock

Closes IDFGH-16029

See merge request espressif/esp-idf!40854
2025-09-23 14:24:18 +05:30
Armando (Dou Yiwen) dfe8ee582d Merge branch 'change/remove_gpio_public_require_from_sdmmc' into 'master'
sdmmc: removed public requirement to esp_driver_gpio

Closes IDF-12851

See merge request espressif/esp-idf!42105
2025-09-23 08:40:44 +00:00
renpeiying f53f02f3b5 docs(size): update CN translation for size.rst 2025-09-23 15:13:31 +07:00
Alexey Lapshin 6d1d5ccb1c feat(build): add CONFIG_COMPILER_CXX_GLIBCXX_CONSTEXPR choise option
Allow to disable implicit inlining of constexpr functions from libstdc++.
This is a known GCC issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008
that may affect C++ application size depending on its structure.
2025-09-23 15:13:28 +07:00
Guillaume Souchere cdef6dce44 Merge branch 'feat/allow-adc-unit-2-ulp' into 'master'
feat(ulp): Allow usage of ADC unit 2 on RISCV co processor

Closes IDFGH-16376

See merge request espressif/esp-idf!41863
2025-09-23 10:00:16 +02:00
Chen Jichang 236c10c9a4 fix(clk): clear force_on reg for cache 2025-09-23 15:49:47 +08:00
renpeiying 6c6b8a5ee0 docs: Add CN translation to idf-py.rst 2025-09-23 15:26:33 +08:00
Marek Fiala 96ff174dac feat(tools): idf.py extension - added interface version 2025-09-23 15:26:33 +08:00
Marek Fiala 7ac1c541fd docs(tools): Updated documentation about extension options 2025-09-23 15:26:33 +08:00
Marek Fiala 74f75feb3a test(tools): Added idf extensions build system tests 2025-09-23 15:26:33 +08:00
Marek Fiala 4f8fb84caa feat(tools): Added check for duplicit action names/aliases from external extensions 2025-09-23 15:26:33 +08:00
Marek Fiala 732f68a2a5 feat(tools): Load idf_ext.py from build component directories & python entrypoints
Extend search for idf_ext.py beyond the project directory to include
all build components involved in the build. Also discover idf_ext.py
modules via Python entrypoints.
2025-09-23 15:26:33 +08:00
Marek Fiala 2ec170b2fb change(tools): idf.py & tools.py ruff formatting 2025-09-23 15:26:33 +08:00
armando aeb590e1a3 change(g0): use hw_ver3 to build g0 components test app 2025-09-23 15:09:11 +08:00
Guillaume Souchere 1798034d3f feat(tools): Remove old copy of Catch2 in tools 2025-09-23 08:49:58 +02:00
tarun.kumar 20541fb8ee fix(wifi) : Made changes related to registering eloop timeout for eloop lock 2025-09-23 14:48:47 +08:00
glmfe 0b330482a7 fix(ethernet_init): Update Ethernet Init Calls
Removed references to components/ethernet_init to use new managed component ethernet_init.
2025-09-23 08:48:08 +02:00
Guillaume Souchere c03987ca49 feat(esp_ringbuf): Update vRingbufferReset to return an error
when items are not sent, complete or returned, make the function
return an error instead of checking the state in an assert.
2025-09-23 08:42:09 +02:00
Shu Chen 22383e6be8 Merge branch 'feature/optimize-zb-utility-path' into 'master'
feat(zigbee): optimize the path of zcl_utility to compatible different platforms

See merge request espressif/esp-idf!41734
2025-09-23 06:24:14 +00:00
Shu Chen 185d4711c5 Merge branch 'fix/fix_openthread_cli' into 'master'
fix(openthread): check if the command is valid before calling the input function

See merge request espressif/esp-idf!42002
2025-09-23 06:23:19 +00:00
C.S.M 5aceeadd89 Merge branch 'contrib/github_pr_13963' into 'master'
fix(i2c): Don't print developer notes to ESP_LOG (GitHub PR)

Closes IDFGH-13015

See merge request espressif/esp-idf!31472
2025-09-23 14:19:40 +08:00
Armando (Dou Yiwen) 4447fdc018 Merge branch 'fix/use_heap_caps_to_maintain_desc_alignment' into 'master'
sdmmc: use heap_caps_alloc to maintain desc alignment

See merge request espressif/esp-idf!42038
2025-09-23 06:08:41 +00:00
Chen Chen 2d9b6c1179 Merge branch 'feat/p4eco5_hue_update' into 'master'
feat(isp): p4eco5 hue update

Closes IDF-13935

See merge request espressif/esp-idf!41705
2025-09-23 14:07:10 +08:00
armando c136400c3b change(sd): removed public requirement to esp_driver_gpio 2025-09-23 13:58:28 +08:00
xieqinan@espressif.com fa793efda0 feat(zigbee): move the zcl_utility into the examples_utils of zb_common_components 2025-09-23 12:14:01 +08:00
Shreyas Sheth 4757853836 fix(wifi_apps): Fix crash due to neighbor_list lock
Closes https://github.com/espressif/esp-idf/issues/16976
2025-09-23 12:01:39 +08:00
Marius Vikhammer fb79d92005 Merge branch 'change/remove_deprecated_vfs_driver_funcs' into 'master'
change(vfs): removed uart and uart-jtag-serial API

See merge request espressif/esp-idf!41988
2025-09-23 10:17:54 +08:00
Armando (Dou Yiwen) d7c975d9b6 Merge branch 'refactor/cache_hal_no_sdkconfig' into 'master'
cache: cache/mmu hal no sdkconfig

Closes IDF-13586

See merge request espressif/esp-idf!41929
2025-09-23 01:32:54 +00:00
Lu Wei Ke 17288256b7 Merge branch 'docs/add_qemu_extra_args' into 'master'
docs: Add --qemu-extra-args option to QEMU guide

Closes DOC-11842

See merge request espressif/esp-idf!42042
2025-09-23 09:15:40 +08:00
armando 70acf169e0 fix(sd): use heap_caps_alloc to maintain desc alignment 2025-09-23 01:15:33 +00:00
Marius Vikhammer ac3c7ddb6f Merge branch 'docs/remove_readthedocs_link' into 'master'
docs(readthedocs): removed old leftover readthedocs references

See merge request espressif/esp-idf!41483
2025-09-23 09:13:00 +08:00
Rahul Tank 4e8b48e677 fix(nimble): Added code to handle sending indicate 2025-09-22 21:48:51 +05:30
chenjianhua fd4bb69357 feat(ble/bluedroid): Added API to set channel map for scanning 2025-09-23 00:05:48 +08:00
peter.marcisovsky 57d48ef234 feat(usb_host): Add hal check for the global root port suspend 2025-09-22 17:56:20 +02:00
Marek Fiala 7e5b0a8bb0 feat(test): Used dockerfile with updated cmake versions 2025-09-22 16:47:50 +02:00
Marek Fiala efa75a9b60 test(tools): Added minimal supported cmake versions build system tests 2025-09-22 16:47:42 +02:00
David Cermak 8c8a680082 fix(esp_netif): Remove doxygen groups as esp-docs is flat docs style
Closes https://github.com/espressif/esp-idf/issues/16993
2025-09-22 20:37:49 +08:00
Zhang Shu Xian 019bb7fa72 Merge branch 'docs/update_cn_translation_for_system' into 'master'
docs: Update CN translation for system.rst

Closes DOC-12310, DOC-12344, DOC-12354, DOC-12367, and DOC-12385

See merge request espressif/esp-idf!41999
2025-09-22 19:05:27 +08:00
Guillaume Souchere 1e0463673b feat(ulp): Allow usage oof ADC unit 2 on RISCV co processor 2025-09-22 12:38:37 +02:00
David Cermak a7627b0ce2 fix(esp_netif): Make esp_netif_ip6_get_addr_type() const correct
Closes https://github.com/espressif/esp-idf/issues/15882
2025-09-22 11:42:44 +02:00
luoxu ed0ae79d24 feat(ble): add libraries related to ble log compression 2025-09-22 17:09:58 +08:00
luoxu eece778e55 feat(ble): Support ble log compression(draft) 2025-09-22 17:09:58 +08:00
Mahavir Jain 4e082efc24 Merge branch 'fix/change_write_protection_bit_of_shared_security_efuses' into 'master'
Reorder write protection bits of some shared security efuses

See merge request espressif/esp-idf!41619
2025-09-22 14:38:21 +05:30
Wan Lei e8ec9546e4 Merge branch 'fix/c5_twai_listen_only_workaround' into 'master'
fix(driver_twai): added ctu_official workaround, fixed error count info

Closes IDFGH-16314, IDFGH-16278, IDFGH-16364, IDFGH-16383, IDFCI-3106, and IDFCI-3107

See merge request espressif/esp-idf!41570
2025-09-22 16:35:26 +08:00
hebinglin c30ecd8777 change(esp_hw_support): support sleep features for esp32h4mp 2025-09-22 16:13:27 +08:00
Guillaume Souchere ce9563d85c Merge branch 'fix/argtable3-coverity-findings' into 'master'
fix(console): Add input validation in arg_utils.c functions

Closes IDF-13986 and IDF-13987

See merge request espressif/esp-idf!41736
2025-09-22 09:45:44 +02:00
luweike bfe6b51ac9 docs: Add --qemu-extra-args option to QEMU guide 2025-09-22 15:37:46 +08:00
Sudeep Mohanty cf12478049 refactor(freertos): Deprecate xPortGetTickRateHz()
This commit deprecates xPortGetTickRateHz() from the FreeRTOS port API
as the FreeRTOS tickrate is constant for an application and can be
inferred using the CONFIG_FREERTOS_HZ config option.
2025-09-22 09:23:07 +02:00
Sudeep Mohanty 141e62806c feat(freertos-smp): Enabled FreeRTOS Runtime stats gathering for Amazon SMP Kernel 2025-09-22 09:23:07 +02:00
Sudeep Mohanty 9a4341bb87 refactor(freertos): Moved FreeRTOS Run Time Stats gathering to port.c
This commit creates a new port layer API xPortGetRunTimeCounterValue()
in port.c files. This helps to remove inclusion of header files such as
esp_timer.h and xtensa/hal.h from portmacro.h
2025-09-22 09:23:01 +02:00
harshal.patil 8b663ebe4d fix(esp_security): Configure the Key Manager to use XTS-AES efuse key by-default 2025-09-22 12:22:07 +05:30
Zhang Shuxian 8d88ea874d docs: Update CN translation for system.rst 2025-09-22 14:13:15 +08:00
Marius Vikhammer 16cdbd9f5c change(esp_timer): esp_timer_init_os now returns ESP_OK if already initialized
Previously it would return ESP_ERR_INVALID_STATE, which meant that if called from
user-code before the system tries to initialize the timer then esp-idf would
fail to boot.

This could happen if a user wanted to use esp-timer from a cpp constructor.

Closes https://github.com/espressif/esp-idf/issues/9679
2025-09-22 14:01:56 +08:00
Laukik Hase 649741fa9d Merge branch 'feat/nvs_flash_deregister_sec_scheme' into 'master'
feat(nvs_flash): Added an API to deregister the NVS security scheme context

Closes IDF-12456 and IDFGH-16210

See merge request espressif/esp-idf!41073
2025-09-22 11:11:34 +05:30
Marius Vikhammer 33f92c8fc8 Merge branch 'change/disable_assert_ndebug_eval_by_default' into 'master'
change(newlib): COMPILER_ASSERT_NDEBUG_EVALUATE default value changed to 'n'

Closes IDFGH-479 and IDF-10857

See merge request espressif/esp-idf!40295
2025-09-22 13:10:15 +08:00
Nebojsa Cvetkovic 298bd047f6 fix(i2c): Don't print developer notes to ESP_LOG,
Closes https://github.com/espressif/esp-idf/pull/13963
2025-09-22 11:55:40 +08:00
Marius Vikhammer 19337d2708 change(vfs): deleted deprecated uart and uart-jtag-serial API 2025-09-22 11:46:07 +08:00
Wei Yuhan 5e4c16410b docs(ble): Added BLE 6.0 features support status 2025-09-22 09:49:27 +08:00
armando 7a58274c73 feat(isp): support BLC driver 2025-09-22 09:22:58 +08:00
armando 8ebce9b805 change(cache): no use sdkconfig in cache/mmu hal 2025-09-22 01:01:03 +00:00
gaoxu e5c6b87c10 fix(tsens): fix temp_sensor affect by adc reset 2025-09-22 08:19:46 +08:00
gaoxu 9619d2b05a ci(adc): add adc oneshot/continuous work with temp_sensor 2025-09-22 08:19:46 +08:00
Mahavir Jain 4c8833b6b6 Merge branch 'fix/ecdsa_efuse_purpose_check' into 'master'
fix(ecdsa): Fixed ECDSA efuse purpose check condition

See merge request espressif/esp-idf!41926
2025-09-21 19:41:10 +05:30
Mahavir Jain 0fa59a254c Merge branch 'fix/improve_rng_documentation' into 'master'
fix(docs): Improved RNG documentation

Closes IDFGH-13813

See merge request espressif/esp-idf!36038
2025-09-21 19:20:27 +05:30
Mahavir Jain 572119684c Merge branch 'fix/add_missing_event_tracter_capture_duirng_mbedtls_read' into 'master'
fix(esp-tls): added missing event tracker capture during mbedtls read operation

Closes IDFGH-15609

See merge request espressif/esp-idf!41266
2025-09-21 19:13:13 +05:30
Aditya Patwardhan 41b37f813b feat(docs): Added svg file for the RNG 2025-09-21 18:37:20 +05:30
Aditya Patwardhan d2cd0e72ef fix(docs): Improved RNG documentation
Updated the RNG documentation to add more details
about the High speed ADC as a noise source
and its limitations.

Closes https://github.com/espressif/esp-idf/issues/14665
2025-09-21 18:37:13 +05:30
Alexey Lapshin 262a70a1f0 Merge branch 'feature/gdbinit-files-generation-update' into 'master'
gdbinit files generation update

Closes IDF-11667 and IDF-11692

See merge request espressif/esp-idf!41549
2025-09-20 17:35:00 +04:00
Tomas Rezucha ecc1144054 Merge branch 'feature/usb_p4_ver2' into 'master'
feat(usb/host): Add USB support to ESP32-P4 v3 (ECO5)

Closes IDF-13507 and IDF-13742

See merge request espressif/esp-idf!41602
2025-09-20 14:57:53 +02:00
Jiang Jiang Jian 44a66c7521 Merge branch 'feature/add_channel_switch_api_for_espnow' into 'master'
feat(wifi): Added switch channel api for espnow

Closes WIFI-6379 and WIFI-5499

See merge request espressif/esp-idf!38767
2025-09-20 13:33:33 +08:00
harshal.patil ade76189c5 test(hal/crypto): Update AES test app to remove redundant block operation 2025-09-20 10:55:07 +05:30
harshal.patil c36aef9c19 change(mbedtls/port): Wrap headers with relevant soc_caps
- Needed to fix builds for the targets that are yet to supported
2025-09-20 10:55:07 +05:30
harshal.patil 8992f08bef feat(mbedtls/aes): Add config to support AES block and DMA modes during runtime
- Dynamically switch the AES operation modes based on the buffer operating length
- Shorter AES and SHA operations can now run faster and concurrently as well

Closes https://github.com/espressif/esp-idf/issues/15914
2025-09-20 10:55:07 +05:30
Laukik Hase ac89a6f896 Merge branch 'feature/esp_tee_sec_stg_sign_w_pbkdf2' into 'master'
feat(esp_tee): Support for PBKDF2-based (HMAC) ECDSA signing

See merge request espressif/esp-idf!41074
2025-09-20 10:28:00 +05:30
Jiang Jiang Jian c0de85c7a5 Merge branch 'change/ble_update_lib_20250919' into 'master'
change(ble): [AUTO_MR] 20250919 - Update ESP BLE Controller Lib

See merge request espressif/esp-idf!42026
2025-09-20 12:08:37 +08:00
morris 4e4d97fed5 Merge branch 'refactor/update_component_dependency' into 'master'
feat: Update driver dependency for new version external components

See merge request espressif/esp-idf!41976
2025-09-20 05:06:23 +08:00
Tomas Rezucha 0ac4b9a94b Merge branch 'fix/usb_host_intr_prio' into 'master'
fix(usb/host): Use ESP_INTR_FLAG_LOWMED interrupt priority for USB examples

See merge request espressif/esp-idf!42048
2025-09-19 17:33:05 +02:00
Tomas Rezucha 617a608027 fix(usb/host): Use ESP_INTR_FLAG_LOWMED interrupt priority for USB examples 2025-09-19 14:12:53 +02:00
gaoxu 5ba8f6a13f refactor(rng): refactor to use hal/ll apis for S2 2025-09-19 20:02:04 +08:00
Shen Mengjing 71f8405742 docs: Add the updated CN translation 2025-09-19 17:01:29 +05:30
harshal.patil 5aa5366e7f fix(bootloader_support): Reorder write disabling ECDSA_CURVE_MODE 2025-09-19 17:01:23 +05:30
cjin 41ecf44cb3 feat(ble): get wakeup cause when wake up on ESP32-H2 2025-09-19 16:47:57 +08:00
cjin 470e02ea6b feat(ble): get wakeup cause when wake up on ESP32-C5 2025-09-19 16:47:45 +08:00
cjin 622b7cf425 feat(ble): get wakeup cause when wake up on ESP32-C6 2025-09-19 16:47:35 +08:00
cjin 6ae338de34 feat(ble): get wakeup cause when wake up on ESP32-C2 2025-09-19 16:47:18 +08:00
Tan Yan Quan 25b70b0756 feat(openthread): update thread-lib for new OT upstream 3b3dd203
* esp-openthread: thread_zigbee/esp-openthread@d9c9e535e
* openthread: espressif/openthread@3b3dd203b
* esp-idf: espressif/esp-idf@bab69aec4
2025-09-19 08:31:47 +00:00
harshal.patil 6be7a17ce0 fix(bootloader_support): Allow pre-programmed XTS-AES psuedo round level efuses
- The API esp_flash_encryption_set_release_mode() by defualt programs
the XTS-AES pseudo round level efuse to level low but did not considered
any existing value that would have been programmed in the efuse bit.
2025-09-19 13:55:50 +05:30
Tan Yan Quan bab69aec4a feat(openthread): update OT upstream to 3b3dd203b 2025-09-19 16:09:07 +08:00
Sudeep Mohanty 75619d8ef5 Merge branch 'task/remove_vportcleanuptcb_support' into 'master'
remove(freertos): Remove legacy vPortCleanUpTCB user hook

Closes IDF-8097

See merge request espressif/esp-idf!41867
2025-09-19 10:03:07 +02:00
Lu Wei Ke b4e6cd62db Merge branch 'docs/add_idf_docker_related_doc' into 'master'
docs: Add Related Documents to IDF Docker Image

Closes DOC-11665

See merge request espressif/esp-idf!42011
2025-09-19 16:03:01 +08:00
Marius Vikhammer 9d4ea4f365 fix(parlio): fixed funcition with side-effect called in assert() 2025-09-19 15:42:09 +08:00
Marius Vikhammer 484d2c5c2f fix(system): fixed issues with unused variable warnings when compiling with NDEBUG 2025-09-19 15:42:07 +08:00
Marius Vikhammer b46d001f6d change(newlib): COMPILER_ASSERT_NDEBUG_EVALUATE default value changed to 'n'
Closes https://github.com/espressif/esp-idf/issues/2758
2025-09-19 15:41:18 +08:00
hrushikesh.bhosale 896c8ecc80 fix(http_server): Fix CI test failure async_handler
pytest trying to hit the server, before registration
of URI handlers or starting of server
2025-09-19 13:07:45 +05:30
Ondrej Kosta bc421db41b Merge branch 'feat/kconfig_clk_rm' into 'master'
feat(esp_eth): removed RMII CLK Kconfig option

Closes IDF-9724

See merge request espressif/esp-idf!41853
2025-09-19 15:35:50 +08:00
harshal.patil d6c1184676 fix(bootloader_support): Reorder write protection bits of some shared security efuses 2025-09-19 13:02:00 +05:30
C.S.M 79c69cfa17 Merge branch 'test/add_c5_p4_usj_test' into 'master'
test(usj): add esp32-p4 usj test

See merge request espressif/esp-idf!41733
2025-09-19 15:00:47 +08:00
Omar Chebib e1c2ddeab6 Merge branch 'fix/esp32p4_eco5_clic' into 'master'
fix: get rid of the hardware workarounds for the latest ESP32P4 revision

Closes IDF-13409, IDF-13781, and IDF-13782

See merge request espressif/esp-idf!41719
2025-09-19 15:00:21 +08:00
Marius Vikhammer 0ac9dfbbe0 Merge branch 'feature/lp_core_exception_wake' into 'master'
feat(ulp): added lp-core exception as wake-up source

See merge request espressif/esp-idf!39159
2025-09-19 14:48:33 +08:00
Konstantin Kondrashov b7da740f12 Merge branch 'feature/log_v2_optimization' into 'master'
feat(log): Optimize idf components for binary logging

Closes IDF-12775

See merge request espressif/esp-idf!40289
2025-09-19 14:45:43 +08:00
Laukik Hase c152663408 feat(esp_tee): Added support for PBKDF2-based (HMAC) ECDSA signing 2025-09-19 12:06:02 +05:30
renpeiying 536ec82dd3 docs: Update translation for nvs_encryption and security docs 2025-09-19 10:38:39 +05:30
Laukik Hase 1ea0fc261d change(nvs_sec_provider): Make the HMAC-based NVS security scheme default for supported SoCs
- When NVS encryption is enabled on SoCs with the HMAC peripheral that have flash encryption
  enabled, the HMAC-based NVS encryption scheme is now selected as default instead of the
  flash encryption-based scheme.
- If your application previously used the flash encryption-based scheme, you need to manually
  configure the NVS encryption scheme to flash encryption from HMAC through ``menuconfig``
  or your project's ``sdkconfig`` (i.e., setting ``CONFIG_NVS_SEC_KEY_PROTECT_USING_FLASH_ENC=y``).
2025-09-19 10:38:38 +05:30
Laukik Hase f565fc2481 change(nvs_flash): Add a private dependency of the nvs_sec_provider component
- Closes https://github.com/espressif/esp-idf/issues/17256
2025-09-19 10:17:46 +05:30
Laukik Hase f60bcaaa4d feat(nvs_flash): Added an API to deregister the NVS security scheme context 2025-09-19 10:17:45 +05:30
Zhou Xiao 09a3b29d01 change(ble): [AUTO_MR] updated rom linker script for ESP32-C2 2025-09-19 11:22:47 +08:00
Zhou Xiao a56e7df710 change(ble): [AUTO_MR] Update lib_esp32c2 to 58398575 2025-09-19 11:22:44 +08:00
Zhou Xiao 26dcd59599 change(ble): [AUTO_MR] Update lib_esp32c6 to 390a8efd 2025-09-19 11:22:44 +08:00
Zhou Xiao b75f862797 change(ble): [AUTO_MR] Update lib_esp32c5 to 390a8efd 2025-09-19 11:22:44 +08:00
Zhou Xiao a7b87fe832 change(ble): [AUTO_MR] Update lib_esp32h2 to 390a8efd 2025-09-19 11:22:44 +08:00
Konstantin Kondrashov 333a2c0ebc Merge branch 'fix/coverity_newlib' into 'master'
fix(newlib): Fixes Coverity issues

Closes IDF-13926 and IDF-13927

See merge request espressif/esp-idf!41491
2025-09-19 10:35:34 +08:00
Chen Chen 7ea6b7ea52 feat: Update driver dependency for new version outside components 2025-09-19 10:35:11 +08:00
Alexey Lapshin 0c00523235 Merge branch 'fix/newlib-asm-inlining-issue' into 'master'
fix(newlib): fix riscv asm inlining for mem functions

See merge request espressif/esp-idf!41623
2025-09-19 06:17:04 +04:00
Chen Ji Chang a3bf1b1a09 Merge branch 'feat/enable_esptool_stub_for_p4eco5' into 'master'
feat(hw_support): enable esptool stub for p4eco5

See merge request espressif/esp-idf!41965
2025-09-18 20:44:20 +08:00
Sonika Rathi 94b81282c6 Merge branch 'feat/support_larger_than_4m_partition_on_linux_target' into 'master'
feat(esp_partition): add support for partition tables larger than 4MB with linux target

See merge request espressif/esp-idf!41312
2025-09-18 19:04:02 +08:00
Aditya Patwardhan b0cdc82996 fix(ecdsa): Fixed ECDSA efuse purpose check condition 2025-09-18 15:29:25 +05:30
luweike 7e669d3a71 docs: Add Related Documents to IDF Docker Image 2025-09-18 17:12:38 +08:00
He Binglin 28c4172ae9 Merge branch 'bugfix/esp_idf_esp32_reject_sleep' into 'master'
fix(esp_hw_support): fix the configuration of reject sources

Closes IDFGH-15823

See merge request espressif/esp-idf!41852
2025-09-18 16:46:57 +08:00
Radek Tandler 553d1034b0 Merge branch 'bugfix/nvs_blob_overwrite' into 'master'
Bugfix of old NVS Blobs handling when legacy compatibility option is set

See merge request espressif/esp-idf!41741
2025-09-18 10:45:42 +02:00
Xu Si Yu a0777a0ee5 fix(openthread): check if the command is valid before calling the input function 2025-09-18 16:21:13 +08:00
Guillaume Souchere f8cb539e29 feat(heap): Update test to CMake and use Catch2 component 2025-09-18 10:07:08 +02:00
Guillaume Souchere 903d613a4e feat(esp_gdbstub): Update test to CMake and use Catch2 component 2025-09-18 10:07:08 +02:00
morris 4680b976f4 Merge branch 'feat/spi_p4_eco5_support' into 'master'
feat(driver_spi): update p4 eco5 spi and twai support

Closes IDF-13509, IDF-13434, and IDF-13726

See merge request espressif/esp-idf!41676
2025-09-18 15:18:46 +08:00
Kapil Gupta b789198c9b Merge branch 'bugfix/cleanup_ctr_drbg' into 'master'
wpa_supplicant: Replace use of mbedtls_ctr_drbg with esp_mbedtls_random()

Closes IDFGH-14978

See merge request espressif/esp-idf!39221
2025-09-18 11:30:10 +05:30
Hrushikesh Bhosale fd5b86d005 Merge branch 'fix/http_server_async_requests_on_same_socket_blocks' into 'master'
Fix async requests on same socket blocking server

Closes IDFGH-16057 and IDF-13859

See merge request espressif/esp-idf!41724
2025-09-18 13:51:54 +08:00
wanckl 550e98970b fix(driver_twai): fixed dual_filter with extid, more accurate sample point
Closes https://github.com/espressif/esp-idf/issues/17504
Closes https://github.com/espressif/esp-idf/issues/17522
2025-09-18 12:01:12 +08:00
wanckl 89578cb372 fix(driver_twai): fixed tec_rec empty from get_info
Closes https://github.com/espressif/esp-idf/issues/17434
2025-09-18 12:01:12 +08:00
wanckl 1e1bf5aea3 fix(driver_twai): added ctu_official listen only workaround
Closes https://github.com/espressif/esp-idf/issues/17461
2025-09-18 12:01:06 +08:00
Chen Chen 0e84ce7e69 feat(isp): Update hue for esp32p4eco5 2025-09-18 11:39:37 +08:00
C.S.M 464a0f432a test(usj): add p4 usj test 2025-09-18 11:29:23 +08:00
Marius Vikhammer 04fdae2f67 feat(ulp): added lp-core exception as wake-up source 2025-09-18 11:14:02 +08:00
Omar Chebib 63ad383c2a Merge branch 'fix/eh_frame_parser_warnings' into 'master'
fix(esp_system): fix potential warnings related to array size in .eh_frame parser

See merge request espressif/esp-idf!41935
2025-09-18 10:09:18 +08:00
Guilherme Ferreira 54b5210584 Merge branch 'contrib/github_pr_16199' into 'master'
Fix/ws transport reject multisec (GitHub PR)

Closes IDFGH-15569

See merge request espressif/esp-idf!41873
2025-09-18 06:37:06 +08:00
Ondrej Kosta 5c5eb99eab Merge branch 'fix/emac_test_tmo' into 'master'
fix(ci): increased timeout for ethernet_int_emac_test

Closes IDFCI-3118

See merge request espressif/esp-idf!41909
2025-09-17 20:20:32 +08:00
Kapil Gupta 2d1b94cdc7 Merge branch 'bugfix/add_dependency_suiteb_on_enterprise' into 'master'
fix(esp_wifi): Add depenedency of 192 bit config on wifi enterprise

Closes IDFGH-16434

See merge request espressif/esp-idf!41836
2025-09-17 16:40:52 +05:30
Ondrej Kosta 5aa97623c1 feat(esp_eth): removed RMII CLK Kconfig option 2025-09-17 11:46:06 +02:00
Nachiket Kukade cd757f7bb4 Merge branch 'ci/fix_wifi_testcase' into 'master'
fix(unit_test): Fix esp_wifi and wpa_supplicant unit tests

Closes IDF-5046

See merge request espressif/esp-idf!38808
2025-09-17 17:35:04 +08:00
Tomas Rezucha ce590e4bae feat(usb/device): Add USB device support to ESP32-P4 v3 2025-09-17 11:17:25 +02:00
Tomas Rezucha 1711ed88aa feat(usb/host): Add USB Host support to ESP32-P4 v3 2025-09-17 11:17:25 +02:00
Alexey Lapshin 3d056ad1e2 fix(newlib): fix riscv asm inlining for mem functions 2025-09-17 17:15:57 +08:00
Ivan Grokhotkov 714b7445e2 Merge branch 'feature/update-gdb-to-16.3_20250913'
feat(tools): update gdb version to 16.3_20250913

See merge request !41877
2025-09-17 11:14:05 +02:00
Armando (Dou Yiwen) 4a383012b3 Merge branch 'feature/p4_rev3_sdmmc' into 'master'
sdmmc: supported sdmmc on p4 ECO5 real chip, and UHS-I SDR104 (200MHz)

Closes IDF-12222, IDF-13731, and IDF-14050

See merge request espressif/esp-idf!41563
2025-09-17 09:09:24 +00:00
Alexey Lapshin 2d12315b62 fix(tools): clean gdbinit files generation 2025-09-17 16:58:02 +08:00
Alexey Lapshin 612b5f88db fix(tools): apply pre-commit hook changes 2025-09-17 16:58:02 +08:00
Sudeep Mohanty df1e1c2b73 Merge branch 'task/make_task_snapshot_public' into 'master'
refactor(freertos): Make task snapshot debug API public

Closes IDF-10038 and IDF-8143

See merge request espressif/esp-idf!41871
2025-09-17 10:48:43 +02:00
Chen Jichang 16ea481a6f feat(hw_support): enable esptool stub for p4eco5 2025-09-17 16:25:02 +08:00
Marius Vikhammer 37855ef350 Merge branch 'docs/ulp_gpio_wakeup_supported_c5' into 'master'
docs(ulp): fixed ETM and LP_IO wakeup sources saying not supported

See merge request espressif/esp-idf!41798
2025-09-17 16:21:42 +08:00
Rahul Tank d84d8ab1e1 Merge branch 'fix/connect_gap_event_status_handling' into 'master'
fix(nimble): Fixed incorrect HCI status in connect event

See merge request espressif/esp-idf!41847
2025-09-17 13:47:03 +05:30
Laukik Hase 537b36de7a Merge branch 'fix/esp_tee_misc' into 'master'
feat(esp_tee): Miscellaneous fixes and updates

Closes IDF-13856, IDFCI-3085, IDFCI-3094, and IDFCI-3105

See merge request espressif/esp-idf!41433
2025-09-17 13:36:22 +05:30
Tomas Rezucha 961c10bffc Merge branch 'fix/usj_disable_help' into 'master'
fix: Add clarifying note to USJ_ENABLE_USB_SERIAL_JTAG

Closes IDFGH-13778

See merge request espressif/esp-idf!41874
2025-09-17 09:23:29 +02:00
Marius Vikhammer 292107a8b4 docs(ulp): fixed ETM and LP_IO wakeup sources saying not supported 2025-09-17 15:21:18 +08:00
Sonika Rathi e2954eb315 Merge branch 'fix/sdio_init_for_io_card_only' into 'master'
fix(sdmmc): Allow disabling SDIO specific steps in sdmmc card init

See merge request espressif/esp-idf!40735
2025-09-17 14:34:26 +08:00
C.S.M 92b90afa77 Merge branch 'fix/log_safe_in_timing_tuning' into 'master'
fix(flash): Modify the log safety in timing tuning

See merge request espressif/esp-idf!41922
2025-09-17 14:31:11 +08:00
Ondrej Kosta 7a35466da7 Merge branch 'feat/phy802_rst' into 'master'
feat(esp_eth): changed ETH PHY API of esp_eth_phy_802_3_reset_hw

Closes IDF-11362

See merge request espressif/esp-idf!41759
2025-09-17 14:20:27 +08:00
Chen Ji Chang 9dc9d7de9f Merge branch 'refactor/remove_legacy_rmt_driver' into 'master'
remove(legacy_rmt)!: remove legacy rmt driver in IDF v6.0

Closes IDF-13175

See merge request espressif/esp-idf!40092
2025-09-17 14:07:31 +08:00
Kapil Gupta 65ab48229e fix(esp_wifi): Add depenedency of 192 bit config on wifi enterprise
Closes https://github.com/espressif/esp-idf/issues/17567
2025-09-17 14:03:23 +08:00
nilesh.kale 54d97fdac1 fix(esp-tls): removed unncessary log for certificate verification
This commit removed unnecessary and confusing log for
certificate verify if there is another issue during tls connection.
2025-09-17 13:04:16 +08:00
nilesh.kale 421b9abd0d fix(esp-tls): added missing event tracker capture during mbedtls read operation
This commit fixed missing event tracker capture and
added new error code ESP_ERR_MBEDTLS_SSL_READ_FAILED.

Closes https://github.com/espressif/esp-idf/issues/16239
2025-09-17 13:04:16 +08:00
morris d0557133f5 Merge branch 'feat/ast_grep_scan_more_hal_components' into 'master'
fix(ci): update ast-grep rules to include esp_hal components

See merge request espressif/esp-idf!41954
2025-09-17 12:33:33 +08:00
Song Ruo Jing e1aabf036a Merge branch 'bugfix/add_usb_phy1_io_support_esp32h4' into 'master'
fix(gpio): add USB PHY1 (USB OTG) pin support for ESP32H4

See merge request espressif/esp-idf!41727
2025-09-17 12:24:13 +08:00
morris 72979fb6c2 fix(ci): update ast-grep rules to include esp_hal components 2025-09-17 12:05:37 +08:00
Wang Meng Yang c0667e61fd Merge branch 'bugfix/fix_bt_coverity' into 'master'
bugfix: Fix array compared against 0 in btc_manage.c and the issue of uninitialized pointer reading in coexist_printf

Closes IDF-13868

See merge request espressif/esp-idf!41455
2025-09-17 11:03:30 +08:00
Island d883eaa2c1 Merge branch 'fix/fix_ble_log_config_for_esp32c3' into 'master'
fix(ble): fixed ble log config for ESP32-C3/ESP32-S3

See merge request espressif/esp-idf!41949
2025-09-17 10:58:23 +08:00
Song Ruo Jing addfa2aa01 Merge branch 'feature/esp32h21_esp32h4_ledc_support' into 'master'
feat(ledc): Add LEDC support for ESP32H21 and ESP32H4

Closes IDF-12343, IDF-12344, IDF-12920, IDF-11568, IDF-11569, IDF-12115, and IDF-13672

See merge request espressif/esp-idf!41172
2025-09-17 10:55:00 +08:00
Island a3b8073d96 Merge branch 'change/ble_update_lib_20250828' into 'master'
change(ble): [AUTO_MR] 20250828 - Update ESP BLE Controller Lib

Closes BLERP-2183, BLERP-2083, BLERP-2195, and BLERP-2196

See merge request espressif/esp-idf!41601
2025-09-17 10:33:14 +08:00
Armando (Dou Yiwen) aec7c03724 Merge branch 'feat/p4_rev3_isp' into 'master'
isp: basic support on p4 eco5

Closes IDF-13439

See merge request espressif/esp-idf!41682
2025-09-17 01:45:10 +00:00
radek.tandler 96f4f78054 ci(nvs_flash): Enabled nvs_host_test in ci 2025-09-16 20:45:25 +02:00
radek.tandler ccb455fc63 fix(nvs_flash): Fixed host test case when legacy compatibility mode is enabled 2025-09-16 20:45:25 +02:00
radek.tandler 0f5c963a03 fix(nvs_flash): Host test adopted to the new clang initializer rules 2025-09-16 20:45:08 +02:00
Kapil Gupta 88d71da23f fix(mbedtls): Addressed comments on PR15679 2025-09-16 22:10:53 +05:30
sonika.rathi 4d91eac13f fix(sdmmc): Allow disabling SDIO specific steps in sdmmc card init 2025-09-16 22:24:10 +08:00
sonika.rathi 2fa2010aa4 feat(esp_partition): add support for partition tables larger than 4MB with linux target 2025-09-16 22:23:06 +08:00
Fu Hanxi 863d682614 Merge branch 'ci/use-new-bucket' into 'master'
ci: use new minio server

See merge request espressif/esp-idf!41894
2025-09-16 15:59:35 +02:00
Armando (Dou Yiwen) a4c03ceb01 Merge branch 'change/remove_deprecated_items' into 'master'
change: remove deprecated items

See merge request espressif/esp-idf!41769
2025-09-16 13:43:28 +00:00
Sonika Rathi bd3b9291e1 Merge branch 'fix/cid_481432_overflowed_constant' into 'master'
fix(fatfs): fix overflowed constant issue observed in mount_volume of ff.c

See merge request espressif/esp-idf!41542
2025-09-16 20:58:36 +08:00
Zhou Xiao 4247876b36 fix(ble): fixed ble log config for ESP32-C3/ESP32-S3 2025-09-16 20:18:22 +08:00
Roland Dobai 4e4378a765 Merge branch 'contrib/github_pr_17586' into 'master'
Fix warning message in install.sh. (GitHub PR)

Closes IDFGH-16454

See merge request espressif/esp-idf!41890
2025-09-16 12:57:01 +02:00
C.S.M f00755319a Merge branch 'refactor/make_i2c_hal_independent' into 'master'
refactor(i2c): Make i2c hal layer independent

See merge request espressif/esp-idf!41562
2025-09-16 18:51:57 +08:00
Ondrej Kosta 2ed090ba3d feat(esp_eth): changed ETH PHY API of esp_eth_phy_802_3_reset_hw 2025-09-16 17:54:35 +08:00
Island 06f84d323d Merge branch 'feat/ble_log_v2_esp_target_support' into 'master'
Feat/ble log v2 esp target support

Closes BLERP-2169

See merge request espressif/esp-idf!41891
2025-09-16 17:54:35 +08:00
hrushikesh.bhosale dee9d760cd feat(esp_http_server/async_handler): Add CI test for request on same socket
Added a CI test to request on same socket one after the another
2025-09-16 15:02:28 +05:30
hrushikesh.bhosale cfc056018c fix(esp_http_server): Fix async requests on same socket blocking issue
1. In async requests, if the two or more requests are made on same
socket then it used to block the second request.
2. The main thread is used to block on select call. And there done
no FD_SET for particular fd.

Closes https://github.com/espressif/esp-idf/issues/16998
2025-09-16 15:02:05 +05:30
Tomas Rezucha aaa72fcc19 fix: Add clarifying note to USJ_ENABLE_USB_SERIAL_JTAG
Closes https://github.com/espressif/esp-idf/issues/14638
2025-09-16 17:31:39 +08:00
Laukik Hase 57432bb336 fix(esp_tee): Skip taking the service call mutex when in critical sections
- Fixes INT_WDT timeouts with mmap operations
- Add test-case for verifying parallel service calls
2025-09-16 14:57:27 +05:30
Laukik Hase d8edbc8acf feat(esp_tee): ASM routine fixes and improvements
- Fix incorrect setting in the edge interrupt acknowledgement API
- Avoid executing the service call dispatcher in the U-mode ecall,
  rather execute `mret` to jump it
- Avoid `t1` register corruption when processing `ecall`
- Switch back to the bootloader stack from TEE stack after the
  execution of the entire TEE initialization routine
2025-09-16 14:57:10 +05:30
Laukik Hase 8b812d4192 feat(esp_tee): Miscellaneous fixes and updates
- Rename `tee_test_fw` app configs for better CI tracking
- Decrease the lower bound of TEE I/DRAM config options
- Trim the TEE test-apps build
- Improve the TEE/REE OTA pytest script with additional checks
- Fix build issues when `tee_sec_storage`/`tee_ota_ops` are a
  a part of the project build but ESP-TEE is disabled
2025-09-16 14:54:06 +05:30
Fu Hanxi 02531c5dce Merge branch 'ci/generate-build-child-pipeline' into 'master'
fix: union the build test set

See merge request espressif/esp-idf!41914
2025-09-16 11:20:39 +02:00
yangfeng 4e39ac7d49 fix(bt/btc): Fix array compared against 0 in btc_manage.c 2025-09-16 17:10:36 +08:00
yangfeng d5758cd823 fix(esp_coex): Fix the issue of uninitialized pointer reading in coexist_printf 2025-09-16 17:10:36 +08:00
morris 1af474b1ae Merge branch 'bugfix/some_lcd_improvement' into 'master'
fix(lcd): allow i80 lcd to skip the setting of clk_src as default choice

See merge request espressif/esp-idf!41928
2025-09-16 16:54:10 +08:00
Roland Dobai 9e5304a77f change(tools): Fix ruff linting issues in idf_tools.py 2025-09-16 10:44:55 +02:00
Roland Dobai 791a70e6f3 fix(tools): Fix warning message from idf_tools.py 2025-09-16 16:35:03 +08:00
Artyom Lebedev b13dcadfa2 fix(tools): Fix warning message from idf_tools.py
Closes https://github.com/espressif/esp-idf/pull/17586
2025-09-16 16:35:03 +08:00
Chen Jichang 092aa00be4 fix(rmt): fix the regression from gdma link refactor 2025-09-16 15:20:30 +08:00
Chen Jichang 883ead113d remove(legacy_rmt): remove legacy rmt driver in IDF v6.0 2025-09-16 15:20:10 +08:00
Zhou Xiao 10649fddc5 feat(ble): supported ble log v2 for ESP32 2025-09-16 14:43:07 +08:00
Zhou Xiao 1edaf8ebc1 feat(ble): supported ble log v2 for ESP32-C3/ESP32-S3 2025-09-16 14:43:03 +08:00
Omar Chebib f2d6cbd832 fix(esp_system): fix potential warnings related to array size in .eh_frame parser 2025-09-16 14:41:22 +08:00
Zhou Xiao 66504599ba feat(ble): supported ble log v2 for ESP32-C5 2025-09-16 14:31:36 +08:00
Zhou Xiao 4a408af219 feat(ble): supported ble log v2 for ESP32-C2 2025-09-16 14:31:36 +08:00
Zhou Xiao 6758a47044 feat(ble): supported ble log v2 for ESP32-H2 2025-09-16 14:31:36 +08:00
Zhou Xiao a9a7677ea8 feat(ble): supported ble log v2 for ESP32-C6 2025-09-16 14:31:36 +08:00
Zhou Xiao d8a62a827d fix(ble): fixed ble log v2 configuration issues 2025-09-16 14:31:32 +08:00
morris 8e33c73451 fix(lcd): allow i80 lcd to skip the setting of clk_src as default choice 2025-09-16 14:22:26 +08:00
C.S.M 1b0b5ece97 fix(flash): Modify the log safety in timing tuning 2025-09-16 14:08:39 +08:00
morris 48ad332fd2 Merge branch 'docs/update_32khz_oscillator_amplitude_instructions' into 'master'
docs: Update the amplitude constraints for external 32 kHz oscillator

Closes DOC-12245

See merge request espressif/esp-idf!41693
2025-09-16 14:08:24 +08:00
Meet Patel b59b3665c5 Merge branch 'refactor/lp_core_i2c_esp32c5_support' into 'master'
refactor(lp_core_i2c): Modify lp_core_i2c header to support ESP32C5

Closes IDF-14065

See merge request espressif/esp-idf!41885
2025-09-16 10:55:43 +05:30
Shen Mengjing 7943b1ff58 docs: Update the amplitude constraints for external 32 kHz oscillator 2025-09-16 12:12:06 +08:00
armando 28786d0732 feat(sdmmc): supported UHS-I SDR104 (200 MHz) on ESP32-P4 rev3 2025-09-16 12:03:03 +08:00
Song Ruo Jing da785a8f71 fix(gpio): add USB PHY1 (USB OTG) pin support for ESP32H4 2025-09-16 11:59:04 +08:00
Song Ruo Jing 1cb1acd02e fix(ledc): update LEDC test file to cpp style 2025-09-16 11:18:10 +08:00
Song Ruo Jing 24a9cb7dde refactor(dedic_gpio): clean up dedic gpio soc caps 2025-09-16 11:18:10 +08:00
Song Ruo Jing 3e464a508e feat(ledc): Add channel deconfiguration option to release the occupied IOs
Closes https://github.com/espressif/esp-idf/issues/15666
2025-09-16 11:17:59 +08:00
morris f4c40f7e69 Merge branch 'feat/dsi_bridge_new_feat' into 'master'
feat(dsi): More DPHY Clock sources supported on ESP32-P4 ECO5

Closes IDF-13537 and IDF-13538

See merge request espressif/esp-idf!41766
2025-09-16 10:24:36 +08:00
Kevin (Lao Kaiyao) ac24f96a87 Merge branch 'feature/support_touch_on_p4_eco5' into 'master'
feat(touch): support touch sensor on p4 eco5

Closes IDF-13423 and IDF-13424

See merge request espressif/esp-idf!41802
2025-09-16 10:06:44 +08:00
Kevin (Lao Kaiyao) e8ea973d50 Merge branch 'feature/support_i2s_on_p4_eco5' into 'master'
change(i2s): update i2s soc and hal for p4 hw_ver3

Closes IDF-13732

See merge request espressif/esp-idf!41688
2025-09-16 09:55:28 +08:00
Marius Vikhammer 166269fb93 Merge branch 'change/remove_deprecated_esp_rom_status' into 'master'
change(rom): removed deprecated STATUS enum, use ETS_STATUS instead

Closes IDF-7044 and DOC-12309

See merge request espressif/esp-idf!41860
2025-09-16 09:41:31 +08:00
armando 9a4d37f109 feat(isp): support on p4 rev3 2025-09-16 01:10:28 +00:00
zwl c58f07ed1e feat(ble): add console command to get dtm rx rssi in hci example 2025-09-16 00:06:40 +08:00
zwl b40f7c773b feat(ble): add console command to get dtm rx rssi on ESP32-C6 2025-09-16 00:06:40 +08:00
zwl fc293cf672 fix(ble): update ext_version on ESP32-C5 2025-09-16 00:06:40 +08:00
zwl b091ec843c fix(ble): update ext_version on ESP32-H2 2025-09-16 00:06:40 +08:00
zwl 3558f20a4e fix(ble): update ext_version on ESP32-C6 2025-09-16 00:06:40 +08:00
zwl 32c3556c7a change(ble): [AUTO_MR] updated rom linker script for ESP32-C2 2025-09-16 00:06:40 +08:00
zwl 0ec2a92d79 change(ble): [AUTO_MR] Update lib_esp32c2 to e08d6058 2025-09-16 00:06:40 +08:00
zwl 32a510900c change(ble): [AUTO_MR] Update lib_esp32c6 to 000475d3 2025-09-16 00:06:40 +08:00
zwl 77cf75ed53 change(ble): [AUTO_MR] Update lib_esp32c5 to 000475d3 2025-09-16 00:06:40 +08:00
zwl 141362fe48 change(ble): [AUTO_MR] Update lib_esp32h2 to 000475d3 2025-09-16 00:06:40 +08:00
Sajia e68a552cbf fix(unit_test): Fix esp_wifi and wpa_supplicant unit tests
- Fixed offchan and eloop unit tests
 - Added more targets for wpa_supplicant unit tests
 - Removed ESP_WIFI_TESTING_OPTIONS from esp_wifi Kconfig
2025-09-15 20:30:20 +05:30
morris 42be8c8dbf feat(dsi): can use gray8 image as input 2025-09-15 22:52:01 +08:00
morris eedbd9f8e3 feat(dsi): split the dphy config clock and pll reference clock
this is a breaking change in the esp32p4 ver3.0 silicon.
2025-09-15 22:52:01 +08:00
morris b7fc7acb23 refactor(dsi): deprecate pixel_format configuration in favor of in_color_format 2025-09-15 22:52:01 +08:00
morris 9cee386af9 Merge branch 'refactor/remove_i2c_lcd_legacy' into 'master'
refactor(lcd_i2c): Remove legacy driver version used in lcd driver

Closes IDF-13719

See merge request espressif/esp-idf!39799
2025-09-15 22:17:45 +08:00
radek.tandler 233a76e808 fix(nvs_flash): Fixed overwrite of V1 BLOB when legacy compatibility mode is in place 2025-09-15 16:16:28 +02:00
Sudeep Mohanty bb0f072c7a refactor(freertos): Make task snapshot debug API public
This commit makes the task snapshot related API public under the header
freertos_debug.h.
2025-09-15 16:13:29 +02:00
Song Ruo Jing f56ce6334b feat(ledc): Add LEDC support for ESP32H21 and ESP32H4 2025-09-15 22:04:35 +08:00
hebinglin ad0eb8ee87 fix(esp_hw_support): fix the configuration of reject sources 2025-09-15 21:21:41 +08:00
Fu Hanxi 54f57d0f47 fix: union the build test set 2025-09-15 15:11:18 +02:00
Konstantin Kondrashov 16d73cdab3 feat(log): Adds ESP_LOG_ATTR macro to control section placement 2025-09-15 15:59:52 +03:00
Konstantin Kondrashov dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
Fu Hanxi a2db7b56aa ci: use new minio server 2025-09-15 14:55:43 +02:00
Konstantin Kondrashov 00e90bea33 feat(log): Optimization of log buffers for bin log mode 2025-09-15 15:40:46 +03:00
Konstantin Kondrashov 8e7ed24eb6 feat(log): Reserve first 4 bytes as zero for vars pointed to NULL
For bin log, reserve the first 4 bytes as zero for variables that are pointed to NULL
and should not be printed in the log. So the esp-idf-monitor will skip printing
those variables.
2025-09-15 15:40:45 +03:00
Meet Patel 93cbfcf139 refactor(lp_core_i2c): Modify lp_core_i2c header to support ESP32C5
lp_core_i2c.h header file has sda and scl pins hardcoded to GPIO6 and
GPIO7 which works only for ESP32C6. ESP32C5 uses GPIO2 and GPIO3 for
I2C SDA and SCL. Hence, added LP_I2C_SCL_IO and LP_I2C_SDA_IO macros
under conditional compilation in library header file, so there is no
need to hardcode I2C GPIO pins and any other test apps or examples
that are including the LP I2C header file can also use Macro directly.
2025-09-15 17:30:20 +05:30
Ondrej Kosta f7c4178103 fix(ci): increased timeout for ethernet_int_emac_test 2025-09-15 13:55:25 +02:00
Mahavir Jain b05300be39 Merge branch 'bugfix/encrypt_len_for_sb_update_case' into 'master'
fix(bootloader): correct encryption length for secure update without secure boot

See merge request espressif/esp-idf!41665
2025-09-15 15:48:26 +05:30
Martin Vychodil d4e58bf7dc Merge branch 'feature/esp_blockdev_component' into 'master'
feat(storage): Added block device layer interface component

Closes IDF-13495

See merge request espressif/esp-idf!40152
2025-09-15 17:46:13 +08:00
Armando (Dou Yiwen) e95945bc59 Merge branch 'feat/p4_rev3_csi' into 'master'
csi: support on p4 eco5

Closes IDF-13736

See merge request espressif/esp-idf!41670
2025-09-15 07:40:33 +00:00
Tomas Rezucha a9ba907a31 Merge branch 'docs/usb-ext-phy-tusb1106' into 'master'
docs(usb): add TUSB1106 to tested external PHY list

See merge request espressif/esp-idf!41855
2025-09-15 09:29:11 +02:00
Tomas Rezucha 5efa5ab9f5 Merge branch 'feature/usb_device_examples_update_v2.0.0' into 'master'
feature(usb_device): Examples update to esp_tinyusb v2.0.0

Closes IDF-13618

See merge request espressif/esp-idf!41610
2025-09-15 09:28:49 +02:00
Mahavir Jain a148c61bef test: add test case for secure update with FE case 2025-09-15 12:31:57 +05:30
Mahavir Jain e46313568b fix(bootloader): correct encryption length for secure update without secure boot
For secure update without secure boot case, the encryption length for
app image must consider signature block length as well. This was
correctly handled for secure boot case but not for secure update without
secure boot.
2025-09-15 12:31:56 +05:30
Astha Verma e25ae45614 fix(nimble): Fixed incorrect HCI status in connect event 2025-09-15 10:54:46 +05:30
C.S.M 5ce39e8878 refactor(i2c): Make i2c hal layer independent 2025-09-15 11:26:48 +08:00
wanckl 7cb69a825f feat(driver_twai): update p4 eco5 twai support on real chip 2025-09-15 11:15:48 +08:00
wanckl 17e8ea18e5 feat(driver_spi): update p4 eco5 spi support on real chip 2025-09-15 11:15:48 +08:00
Deomid rojer Ryabkov f933e51ad9 change(wpa_supplicant): Replace use of mbedtls_ctr_drbg with esp_mbedtls_random()
This way wpa_supplicant does not require ctr_drbg that saves some space
2025-09-15 11:09:21 +08:00
Deomid rojer Ryabkov aa581523c9 feat(mbedtls): Add mbedtls_esp_random()
Suitable for passing as f_rng to various Mbed-TLS APIs that require it
2025-09-15 11:09:21 +08:00
zhangyanjiao 0f80318327 feat(wifi/espnow): Added switch channel API and remain on channel API for espnow 2025-09-15 11:07:00 +08:00
C.S.M 5ae6f626fc refactor(lcd_i2c): Remove legacy driver version used in lcd driver 2025-09-15 11:04:54 +08:00
armando 00022a379a change: remove deprecated items 2025-09-15 10:52:28 +08:00
Zhang Shuxian 8833953070 docs: Update translation for ROM Headers 2025-09-15 10:50:28 +08:00
laokaiyao 15c48ef1bc change(i2s): update i2s soc and hal for p4 hw_ver3 2025-09-15 10:38:14 +08:00
laokaiyao 87b19c10ad feat(touch): support touch sensor on p4 eco5 2025-09-15 10:36:49 +08:00
Marius Vikhammer af91aa771b change(rom): removed deprecated STATUS enum, use ETS_STATUS instead 2025-09-15 10:36:16 +08:00
Marius Vikhammer ab2829d65f Merge branch 'change/remove_legacy_unit_test_app' into 'master'
change(tools): removed the old legacy unit-test-app

Closes IDF-13565

See merge request espressif/esp-idf!41859
2025-09-15 10:12:13 +08:00
armando 406c54ebfb feat(csi): support csi on p4 rev3 2025-09-15 01:10:47 +00:00
armando 08d38349e4 change(dsi): add dpi_type configs 2025-09-15 01:10:47 +00:00
Marius Vikhammer 582bf08eb5 change(tools): removed the old legacy unit-test-app 2025-09-15 08:57:01 +08:00
Kapil Gupta f82bcd2a65 Merge branch 'bugfix/dpp_roc_loop_error' into 'master'
fix(esp_wifi): Correctly set roc_in_progress flag

Closes WIFI-7013

See merge request espressif/esp-idf!41722
2025-09-14 22:52:56 +05:30
Shreyas Sheth 0e00b0f45b fix(esp_wifi): Correctly set roc_in_progress flag
Fix roc_in_progress flag to be set in `dpp_listen_next_channel` right after calling
`esp_wifi_remain_on_channel` to correctly reflect the ROC status.
2025-09-14 22:23:34 +05:30
morris 14ee268b3e Merge branch 'feat/update_h264_struct_bitfield' into 'master'
fix: standardize bitfield format in H264 struct headers

See merge request espressif/esp-idf!41598
2025-09-14 22:11:08 +08:00
Martin Vychodil 2d2f381bc3 feat(storage): Added Block Device Layer interface component 2025-09-14 14:48:35 +02:00
Alexey Lapshin dba0925068 feat(tools): update gdb version to 16.3_20250913 2025-09-13 13:28:44 +00:00
igor.masar 06a32f2467 docs(usb): add TUSB1106 to tested external PHY list 2025-09-12 17:19:23 +02:00
Richard Allen ec09815ed5 fix(transport_ws): Reject multiple Sec-WebSocket-Accept headers
Enforce RFC6455 requirement:
    The |Sec-WebSocket-Accept| header MUST NOT
    appear more than once in an HTTP response.
2025-09-12 10:03:42 -03:00
Guilherme Ferreira eaa552f0fc Merge branch 'contrib/github_pr_16119' into 'master'
feat(ws_transport): add header callback hook (GitHub PR)

Closes IDFGH-15479

See merge request espressif/esp-idf!41596
2025-09-12 20:21:21 +08:00
C.S.M e49093a2e2 Merge branch 'feat/jpeg_eco5' into 'master'
feat(jpeg): Add yuv444 yuv420 format support for encoder on esp32p4 eco5

Closes IDF-13532

See merge request espressif/esp-idf!41768
2025-09-12 20:13:07 +08:00
Hrushikesh Bhosale eb1f0f4c6f Merge branch 'fix/build_failure_when_sbv2_ecdsa_enabled' into 'master'
fix(esp_tls): Fixed build failure for sbv2 ecdsa

See merge request espressif/esp-idf!41778
2025-09-12 20:06:13 +08:00
Ashish Sharma 030ba7d8cf Merge branch 'contrib/github_pr_17470' into 'master'
fix(http_server): Corrected initialization value for lru_counter at h… (GitHub PR)

Closes IDFGH-16325

See merge request espressif/esp-idf!41639
2025-09-12 19:59:20 +08:00
Harshal Patil de36c80335 Merge branch 'fix/key_mgr_state_management' into 'master'
Fix incorrect key manager state management

See merge request espressif/esp-idf!41796
2025-09-12 17:09:52 +05:30
Rahul Tank d1b3fd17db Merge branch 'bugfix/fix_periodic_reattempt' into 'master'
fix(nimble): Fixed reattempt count handling for perdiodic adv

Closes BLERP-2217, BLERP-2218, BLERP-2219, and BLERP-2220

See merge request espressif/esp-idf!41735
2025-09-12 16:21:46 +05:30
Roman Leonov 852ecc3338 feat(network): Update sta2eth example to esp_tinyusb v2.0.0 2025-09-12 11:28:38 +02:00
Roman Leonov e55b7fe2b5 feat(usb_device): Update examples to esp_tinyusb v2.0.0 2025-09-12 11:28:35 +02:00
Ren Peiying 8c43f5491c Merge branch 'docs/add_link_to_qemu_doc' into 'master'
docs: add qemu doc link

See merge request espressif/esp-idf!41746
2025-09-12 17:13:43 +08:00
Xu Si Yu 1e0f4d8c82 Merge branch 'fix/fix_usb_ot_rcp_send' into 'master'
fix(openthread): resolve the RCP data transmission issue over USB Serial JTAG

See merge request espressif/esp-idf!41715
2025-09-12 17:08:58 +08:00
houhaiyan 9618527603 fix: standardize bitfield format in H264 struct headers 2025-09-12 17:06:28 +08:00
C.S.M 01a362ccb4 feat(jpeg_encoder): Add yuv444 and yuv420 jpeg encoder format on esp32p4 eco5 2025-09-12 16:45:13 +08:00
morris 609bf37fa0 Merge branch 'fix/cherry_usb_component_version_fix' into 'master'
feat(cherry_usb): Pin cherryusb component version

See merge request espressif/esp-idf!41818
2025-09-12 16:17:51 +08:00
Joonline 9e7074dd35 fix(http_server): Corrected initialization value for lru_counter at http session creation
Closes https://github.com/espressif/esp-idf/pull/17470
2025-09-12 15:31:27 +08:00
peter.marcisovsky af4f9cbaed feat(cherry_usb): Pin cherryusb component version
- prerequisite for usb component migration from esp-idf
2025-09-12 09:13:29 +02:00
glmfe 11f8534266 feat(ws_transport): Merged set_header_hook and set_header_userp functions 2025-09-12 13:39:41 +08:00
Richard Allen 58befcae26 feat(transport_ws): add header callback hook
Move to a line-by-line header parser.
Support a callback hook for each header-line.
Migrate "Location" and "Sec-WebSocket-Accept" parsing.

Part of https://github.com/espressif/esp-protocols/issues/715
2025-09-12 13:39:41 +08:00
Richard Allen cd4982a14f feat(transport_ws): buffer redir_host separately
Buffer separately to simplify future improvements.
2025-09-12 13:39:41 +08:00
harshal.patil 854ec3590f fix(esp_key_mgr): Fix incorrect key manager state management 2025-09-12 11:02:45 +05:30
Mahavir Jain e6f945978e Merge branch 'fix/trigger_finish_event_if_data_retreived_successfully' into 'master'
fix(esp_http_client): fix dispatching of finish event condition

Closes IDFGH-16285

See merge request espressif/esp-idf!41624
2025-09-12 09:30:21 +05:30
Marius Vikhammer 2ca22098a8 Merge branch 'docs/freertos_watermark_bytes' into 'master'
docs(freertos): fixed stack watermark documentation bytes vs words issue

See merge request espressif/esp-idf!41667
2025-09-12 10:23:03 +08:00
Marius Vikhammer 365c8a3c37 Merge branch 'fix/remove_intr_types_header' into 'master'
fix(interrupts): removed deprecated intr_types.h header

Closes IDF-8190

See merge request espressif/esp-idf!41668
2025-09-12 10:22:52 +08:00
Marius Vikhammer 1ed1e95129 Merge branch 'bugfix/duplicate_lf_usb_console' into 'master'
fix(console): fixed leftover linker fragmentfile

See merge request espressif/esp-idf!41710
2025-09-12 00:01:07 +08:00
Sudeep Mohanty c76cc9a24d remove(freertos): Remove legacy vPortCleanUpTCB user hook
This commit removes support for the vPortCleanUpTCB() user hook as well
as drops support for associated Kconfig option,
CONFIG_FREERTOS_STATIC_TASK_CLEAN_UP.
2025-09-11 16:05:11 +02:00
Alexey Gerenkov 4f90f3c507 Merge branch 'coredump_conditional_builds' into 'master'
change(coredump): make conditional build in cmake based on config options

Closes IDF-13794

See merge request espressif/esp-idf!41698
2025-09-11 20:13:25 +08:00
Alexey Gerenkov ffad794b02 Merge branch 'docs/update_esp32h4_jtag_debugging' into 'master'
docs: update esp32h4 debugging docs (jtag + coredump)

Closes IDF-12954 and IDF-12958

See merge request espressif/esp-idf!41696
2025-09-11 18:22:18 +08:00
Rahul Tank b72bbfdec9 Merge branch 'bugfix/set_tx_power_in_example' into 'master'
fix(nimble): Add Tx power information in adv data

Closes BLERP-2235

See merge request espressif/esp-idf!41797
2025-09-11 14:25:09 +05:30
morris 516a46c395 Merge branch 'revert/spi_lcd_mode_auto_detect' into 'master'
revert(lcd): data line number auto detect

See merge request espressif/esp-idf!41795
2025-09-11 16:33:27 +08:00
Ivan Grokhotkov 0d10158016 Merge branch 'feature/rename-newlib-to-esp_libc' into 'master'
change(esp_libc): rename newlib component to esp_libc

Closes IDF-11226

See merge request espressif/esp-idf!41584
2025-09-11 09:34:43 +02:00
Rahul Tank 0c9e215685 fix(nimble): Fixed reattempt count handling for perdiodic adv 2025-09-11 12:46:54 +05:30
Mahavir Jain cf38555647 Merge branch 'refactor/move_api_to_set_ecdsa_key_blk_to_ecdsa_ll.h' into 'master'
refactor(hal): moved API efuse_ll_set_ecdsa_key_blk() to ecdsa_ll.h

Closes IDF-13549

See merge request espressif/esp-idf!41149
2025-09-11 12:27:32 +05:30
Kevin (Lao Kaiyao) be099ca81f Merge branch 'refactor/move_touch_element_to_managed_component' into 'master'
remove(touch_element): remove touch_element from idf

Closes IDF-6155 and IDF-13348

See merge request espressif/esp-idf!41702
2025-09-11 14:55:55 +08:00
Wang Tao 67e149c9c0 Merge branch 'fix/dhcp_decline_restart_issue' into 'master'
fix(lwip): fix dhcp arp check issue

See merge request espressif/esp-idf!41605
2025-09-11 14:43:57 +08:00
Mahavir Jain cde30c2407 Merge branch 'fix/rng_entropy_mixing_with_rtc_timer' into 'master'
fix(esp_hw_support): Fixed entropy mixing of RTC timer with RNG

See merge request espressif/esp-idf!41723
2025-09-11 12:01:39 +05:30
nilesh.kale 845275c6f1 fix(esp_http_client): fix dispatching of finish event condition
This commit updates the condition for dispatching of FINISH event.
With this, FINISH event will be dispatched after complete data is read.

Closes https://github.com/espressif/esp-idf/issues/17437
2025-09-11 14:18:28 +08:00
morris 08dc794e25 revert(lcd): data line number auto detect
quad_mode and octal_mode are not bus attribute but transaction attribute
in esp-idf SPI master driver

Closes https://github.com/espressif/esp-idf/issues/17455
2025-09-11 13:34:15 +08:00
morris e3190c630a Merge branch 'refactor/remove_deprecated_driver_header_files' into 'master'
refactor(driver): remove deprecated header files && update P4 ECO5 registers for BS and LCD_CAM

Closes IDF-13733 and IDF-13745

See merge request espressif/esp-idf!41745
2025-09-11 13:29:10 +08:00
wangtao@espressif.com c2d87d962b fix(lwip): fix dhcp arp check issue 2025-09-11 13:23:49 +08:00
Aditya Patwardhan 0cd73dfb43 fix(esp_hw_support): Fixed entropy mixing of RTC timer with RNG
Previously the RTC timer entropy was being mixed with the RNG timer
    in a wrong way. Which led to the overwriting of the LSB with rtc
    timer value.
    This change fixes that behaviour
2025-09-11 09:41:25 +05:30
Mahavir Jain b8b4a4f065 Merge branch 'change/exclude_cve-2025-57052' into 'master'
change(cjson): Update to v1.7.19

See merge request espressif/esp-idf!41749
2025-09-11 09:40:49 +05:30
Mahavir Jain ea24d5a0bf Merge branch 'fix/cjson_cpe' into 'master'
fix(cjson): add CPE with davegamble as vendor

See merge request espressif/esp-idf!41781
2025-09-11 09:39:10 +05:30
Island 208c7d2b87 Merge branch 'feat/ble_log_v2' into 'master'
feat(ble): refactored ble log module with layered design

Closes BLERP-2177, BLERP-2176, BLERP-2175, BLERP-2174, BLERP-2173, BLERP-2172, BLERP-2171, BLERP-2170, BLERP-2169, and BLERP-2185

See merge request espressif/esp-idf!41574
2025-09-11 10:50:18 +08:00
Marius Vikhammer ecf0accf00 fix(console): fixed leftover linker fragmentfile
Placement rules now lives in the usb-cdc console component, but the old unused
file was still in esp-vfs
2025-09-11 10:35:45 +08:00
Island 07d9bb90de Merge branch 'fix/uninited_local_var_in_nimble_example' into 'master'
fix(ble): init return code in nimble example

Closes BLERP-2233

See merge request espressif/esp-idf!41783
2025-09-10 22:00:44 +08:00
Roland Dobai 6c1b6b6c99 Merge branch 'feat/readme_preview_chip_support' into 'master'
Add ESP32-H4 into the chip support matrix

Closes IDF-12242

See merge request espressif/esp-idf!41784
2025-09-10 13:02:52 +02:00
Ashish Sharma 70d9308f16 change(cjson): update cjson version to 1.7.19 2025-09-10 18:29:18 +08:00
Rahul Tank 035735ea2d fix(nimble): Add Tx power information in adv data 2025-09-10 15:40:24 +05:30
Roland Dobai 032b070cf8 feat(tools): Add ESP32-H4 into the chip support matrix 2025-09-10 10:55:24 +02:00
Mahavir Jain b789445a67 Merge branch 'contrib/github_pr_17501' into 'master'
fix(esp_http_server): fix memory leak in httpd_req_async_handler_begin (GitHub PR)

Closes IDFGH-16361

See merge request espressif/esp-idf!41748
2025-09-10 13:15:36 +05:30
Chen Chen 02b2f6994c Merge branch 'example/i2c_u8g2' into 'master'
feat(i2c_u8g2_example): Add example for porting u8g2 display lib

Closes IDF-13798

See merge request espressif/esp-idf!41645
2025-09-10 15:41:24 +08:00
Marius Vikhammer 99935402b9 fix(interrupts): removed deprecated intr_types.h and interrupt_deprecated.h headers
intr_types.h has been replaced by esp_intr_types.h and the deprecated esprv_intc_*
from interrupt_deprecated.h have been replaced by the more generic
esprv_* functions.
2025-09-10 15:06:27 +08:00
Fu Hanxi 8f09a81463 Merge branch 'ci/increase_job_timeout' into 'master'
ci: increase build timeout

See merge request espressif/esp-idf!41496
2025-09-10 09:02:58 +02:00
Zhou Xiao 916f87b333 fix(ble): init return code in nimble example
* Closes https://github.com/espressif/esp-idf/issues/17547
2025-09-10 13:17:39 +08:00
Michael (XIAO Xufeng) 760e88a758 Merge branch 'feat/add_c5_c61_supported_master' into 'master'
feat(tools): add c5, c61 into supported targets list

See merge request espressif/esp-idf!41654
2025-09-10 11:36:11 +08:00
Marius Vikhammer 926817e872 docs(freertos): fixed stack watermark documentation bytes vs words issue
Upstream freertos reports stack sizes in words, while IDF-kernel uses bytes.
2025-09-10 08:50:16 +08:00
Erhan Kurubas 0d97c63885 change(coredump): make conditional build in cmake based on config options 2025-09-10 05:23:20 +08:00
Frantisek Hrbata 3263bb36b0 fix(cjson): add CPE with davegamble as vendor
The latest cJSON vulnerabilities appear to list "davegamble" as the
vendor instead of "cjson_project." Add a new CPE with "davegamble" as
the vendor.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-09-09 16:30:52 +02:00
Alexey Lapshin 9281e78381 change(esp_libc): rename newlib component to esp_libc 2025-09-09 22:00:44 +08:00
hrushikesh.bhosale bf7dc18bd6 fix(esp_tls): Fixed build failure for sbv2 ecdsa
Made ESP_TLS_ECDSA_CURVE_SECP384R1 under SOC CAP.
2025-09-09 16:01:04 +05:30
Sudeep Mohanty b719292b75 refactor(build-system): Simplify flash target creation
This commit refactors the flash target creation. Now bootloader and
partition table components add dependencies to the flash target directly
from their component CMakeLists.txt files instead of it being done in
the esptool_py component. The commit also removes the redundant
__esptool_py_setup_main_flash_target() function.
2025-09-09 12:21:31 +02:00
nilesh.kale efb29736bb refactor(hal): moved ECDSA APIs from efuse to ecdsa 2025-09-09 15:01:32 +05:30
Xu Si Yu 132db34cfe fix(openthread): resolve the RCP data transmission issue over USB Serial JTAG 2025-09-09 14:08:09 +08:00
Lu Wei Ke aae5071dff Merge branch 'docs/external_ram_vddspi' into 'master'
docs: Update external RAM voltage control for ESP32-S2/S3

Closes DOC-11795

See merge request espressif/esp-idf!41666
2025-09-09 10:46:56 +08:00
Zhou Xiao b9dbc2ece7 feat(ble): refactored ble log module with layered design 2025-09-08 22:12:51 +08:00
Sergei Silnov ee92f1371a Merge branch 'feat/jira_webhook' into 'master'
Set up GitHub Actions workflow to trigger JIRA issue comment webhook

See merge request espressif/esp-idf!41492
2025-09-08 14:19:22 +02:00
Shen Meng Jing ab2ebaa26e Merge branch 'docs/update_cn_build_system' into 'master'
docs: Update the CN translation for build-system.rst

Closes DOC-12214

See merge request espressif/esp-idf!41692
2025-09-08 14:32:14 +08:00
renpeiying 5b7f668a35 docs: add qemu doc link 2025-09-08 11:42:27 +08:00
morris c6f02a638d feat(soc):update lcd registers on esp32p4 rev3.0 2025-09-08 11:05:25 +08:00
morris 2991bcaa91 feat(ds18b20): upgrade the example to use ds18b20 version 0.2 2025-09-08 11:05:25 +08:00
morris a157181399 refactor(driver): remove deprecated header files
use esp_private/periph_ctrl.h and esp_private/rtc_cntl.h in favor of
driver/periph_ctrl.h and driver/rtc_cntl.h
2025-09-08 11:05:25 +08:00
Xiao Xufeng 826db0f90f feat(tools): add c5, c61 into supported targets list 2025-09-08 02:44:59 +08:00
wangtao@espressif.com d49ebfbae3 fix(doc): fix get start process in port notes 2025-09-04 16:25:23 +08:00
Jiang Jiang Jian d85ad74c7f Merge branch 'feat/add_usj_notes_to_sleep_examples' into 'master'
change(example): adds USB-Serial-JTAG console usage notes to sleep examples

Closes IDFGH-15488

See merge request espressif/esp-idf!40990
2025-09-04 15:33:58 +08:00
Guillaume Souchere dea3fd2ceb fix(console): Add input validation in arg_utils.c functions 2025-09-04 08:33:44 +02:00
Zhang Shu Xian 6b57250f8f Merge branch 'docs/update_translation_for_system' into 'master'
docs: Update CN translation for system.rst

Closes DOC-12244

See merge request espressif/esp-idf!41725
2025-09-04 14:10:26 +08:00
Ren Peiying 32f3fc37ff Merge branch 'feat/update_cn_chatbot_ui_language' into 'master'
Localize CN chatbot UI

See merge request espressif/esp-idf!41712
2025-09-04 14:06:39 +08:00
Mahavir Jain 9ddb3cda20 Merge branch 'fix/cleanup_ota_src_file' into 'master'
cleanup: remove ota app descriptor source

See merge request espressif/esp-idf!41703
2025-09-04 09:21:48 +05:30
Chen Chen 4ca0a9ffbe feat(i2c_u8g2_example): Add example and test for porting u8g2 display lib 2025-09-04 11:39:30 +08:00
laokaiyao f15a60f2f6 remove(touch_element): remove touch_element from idf
Touch Element Library is moved to managed component.
(https://components.espressif.com/components/espressif/touch_element/versions/1.0.0/readme)
2025-09-04 11:26:17 +08:00
Shen Mengjing 5914456b52 docs: Update the CN translation for build-system.rst 2025-09-04 10:08:40 +08:00
Zhang Shuxian 58c976a262 docs: Update CN translation for system.rst 2025-09-03 19:15:44 +08:00
Omar Chebib cea17beaba fix: get rid of the hardware workarounds for the latest ESP32P4 revision 2025-09-03 17:35:26 +08:00
morris 012318db96 Merge branch 'feat/support_pcnt_on_h4' into 'master'
feat(pcnt): support pcnt on esp32h4

Closes IDF-12338 and IDF-13637

See merge request espressif/esp-idf!41526
2025-09-03 17:15:11 +08:00
Darian Leung 589d5b132d feat(esp_ringbuf): Add vRingbufferReset
Function has similar behavior to xQueueReset() where...
    - Buffer is emptied
    - Blocked sender is unblocked

Aslo added associated unit test cases.
2025-09-03 10:55:23 +02:00
Li Shuai 6e45f4df9a Merge branch 'feat/support_esp32h4_top' into 'master'
Support cpu & modem & top domain and minimum system peripherals retention in esp32h4 beta5

Closes PM-449, PM-484, PM-448, PM-451, PM-497, IDF-12283, and IDF-12286

See merge request espressif/esp-idf!40605
2025-09-03 16:28:33 +08:00
renpeiying 9e1096c41a Localize CN chatbot UI 2025-09-03 14:42:32 +08:00
C.S.M 13ec7d2d2a Merge branch 'docs/uhci_doc_compiling' into 'master'
docs(uhci): Fix uhci compiling on non-supported target

See merge request espressif/esp-idf!41677
2025-09-03 13:45:20 +08:00
Mahavir Jain ce4ef7a2bf cleanup: remove ota app descriptor source
Leftover from earlier cleanup commit 42914e01ee
2025-09-03 09:09:04 +05:30
C.S.M 1b4ad917c5 docs(uhci): Fix uhci compiling on non-supported target 2025-09-03 10:35:38 +08:00
Li Peng 36229958d9 Merge branch 'feat/add_cherryusb_demo' into 'master'
feat(usb): add CherryUSB serial device and host example

See merge request espressif/esp-idf!39467
2025-09-03 10:14:46 +08:00
Veranika Saltanava 804c119556 ci(github-actions): set up GitHub Actions workflow to trigger JIRA issue comment webhook 2025-09-02 15:48:43 +02:00
Erhan Kurubas fa472d0e41 docs(coredump): update docs_not_updated for esp32h4 2025-09-02 15:01:26 +03:00
Erhan Kurubas 2661c994db docs(jtag): update esp32h4 jtag debugging guide 2025-09-02 14:42:55 +03:00
Alexey Lapshin 0a7ace356d Merge branch 'change/remove-sys_dirent_h-include' into 'master'
change(newlib): prepare dirent.h to remove

Closes IDF-10675 and LLVM-330

See merge request espressif/esp-idf!41608
2025-09-02 13:42:18 +04:00
morris 7c369baf7a Merge branch 'feat/p4_eco5_pcnt' into 'master'
feat(pcnt,mcpwm,rmt): update struct on p4 eco5

Closes IDF-13734, IDF-13517, IDF-13738, IDF-13440, and IDF-13520

See merge request espressif/esp-idf!41571
2025-09-02 17:22:48 +08:00
Armando (Dou Yiwen) f259da6a99 Merge branch 'fix/add_esp_video_url_in_camera_readme' into 'master'
doc: add esp-video link in camera isp examples

See merge request espressif/esp-idf!41646
2025-09-02 06:44:07 +00:00
Wang Yu Xin 7cd612a74b doc: add esp-video link in camera isp examples 2025-09-02 06:44:07 +00:00
Mahavir Jain 632dac5feb Merge branch 'doc/adds_sni_documentation' into 'master'
docs(esp_http): adds documentation regarding sni

See merge request espressif/esp-idf!41586

Related https://github.com/espressif/esp-idf/issues/9392
2025-09-02 09:26:12 +05:30
Gao Xu 8222f884cb Merge branch 'fix/wrong_channel_gpio_num_on_p4_adc2' into 'master'
ADC: add continuous parse data API

See merge request espressif/esp-idf!40243
2025-09-02 11:17:51 +08:00
Chen Ji Chang 290e3d655d Merge branch 'feat/p4_eco5_gdma' into 'master'
feat(gdma): update gdma struct on p4 eco5

Closes IDF-13729

See merge request espressif/esp-idf!41569
2025-09-02 11:12:37 +08:00
LiPeng 1f76ea953e fix(usb): fix ths bug that ALT escape input for USB HID keyboard 2025-09-02 10:42:39 +08:00
Shen Meng Jing 5e4f67cc68 Merge branch 'docs/update_cn_toolchain' into 'master'
docs: Update CN translation for toolchain.rst and ram-usage.rst

Closes DOC-12092

See merge request espressif/esp-idf!41477
2025-09-01 21:54:19 +08:00
Rahul Tank 7ef3215011 Merge branch 'fix/table_structure' into 'master'
fix(nimble): Restructure the table in README.md file

See merge request espressif/esp-idf!41647
2025-09-01 17:14:22 +05:30
Shen Mengjing 8777791852 docs: Update CN translation for toolchain.rst and ram-usage.rst 2025-09-01 17:00:22 +08:00
Chen Jichang 444346d3b3 feat(gdma): update gdma struct on p4 eco5 2025-09-01 15:29:21 +08:00
Chen Jichang c2a95b1bcf feat(pcnt,mcpwm,rmt): update struct on p4 eco5 2025-09-01 15:29:05 +08:00
luweike 3a2185b5e8 docs: Update external RAM voltage control for ESP32-S2/S3 2025-09-01 15:15:42 +08:00
Armando (Dou Yiwen) a92168b934 Merge branch 'fix/improve_adc_oneshot_example_adc2_channel_selection' into 'master'
adc: removed oneshot example dead code for channel selection

See merge request espressif/esp-idf!41631
2025-09-01 06:56:35 +00:00
morris 151f943105 Merge branch 'refactor/i2c_tool_clean_up' into 'master'
refactor(i2c): clean up the i2ctool example

See merge request espressif/esp-idf!41638
2025-09-01 14:48:56 +08:00
renpeiying e1eca70d2b docs: Update CN translation for esp_tls.rst 2025-09-01 12:09:05 +08:00
Chen Jichang ad5bdc83a7 feat(pcnt): support pcnt on esp32h4 2025-09-01 10:50:55 +08:00
Gao Xu abaa608074 Merge branch 'feat/dvp_format_trans' into 'master'
feat(cam): support format conversion function

See merge request espressif/esp-idf!40890
2025-09-01 10:16:38 +08:00
hebinglin 852aab4b64 change(esp_hw_support): replace pmu reg operation with pmu ll layer code 2025-09-01 10:13:52 +08:00
hebinglin cfecbc99ce change(esp_hw_support): update sleep cpu flow 2025-09-01 10:13:52 +08:00
hebinglin e2534b1b5f change(esp_hw_support): update wait pll calibration done in sleep_clock 2025-09-01 10:13:52 +08:00
hebinglin 752ca902f6 feat(esp_hw_support): support rtcio & extio wakeup in esp32h4 beta5 2025-09-01 10:13:52 +08:00
hebinglin b0c8bd7236 change(esp_hw_support): optimize sleep retated parameters in esp32h4beta5 2025-09-01 10:13:52 +08:00
hebinglin 88fb870346 change(soc): support xtal32k in esp32h4beta5 2025-09-01 10:13:52 +08:00
hebinglin ea2aaea88c change(hal): update lpperiph structure file and support rtcio for esp32h4beta5 2025-09-01 10:13:51 +08:00
hebinglin 0f04aa2359 change(esp_hw_support): support light sleep with top domain power down for esp32h4beta5 2025-09-01 10:13:51 +08:00
hebinglin 6078f64be4 change(esp_hw_support): update pau regdma register driver for esp32h4beta5 2025-09-01 10:13:51 +08:00
hebinglin 1a367fa649 fix(esp_hw_support): esp32h4 beta5 i2c config retention when pd modem refer to PM-487 2025-09-01 10:13:51 +08:00
hebinglin cd294435dd change(esp_hw_support): support light sleep with modem domain power down for esp32h4beta5 2025-09-01 10:13:51 +08:00
hebinglin bc4c9952bb change(esp_hw_support): support cpu domain power down and cpu retention for esp32h4 beta5 2025-09-01 10:13:51 +08:00
hebinglin 909573f8e7 Revert "change(esp_hw_support): comment out for ci pass in esp32h4beta5"
This reverts commit 9f4a568163.
2025-09-01 10:13:51 +08:00
gaoxu 3c7e54c422 feat(adc): add adc_continuous_parse_data api 2025-09-01 09:30:24 +08:00
gaoxu 622c07e0b2 fix(adc): fix ESP32-P4 ADC2 wrong channel num 2025-09-01 09:30:24 +08:00
Michael (XIAO Xufeng) f236d29aee Merge branch 'test/gen_disabled_report' into 'master'
ci: generate report for disabled apps

See merge request espressif/esp-idf!40354
2025-08-31 23:43:27 +08:00
Xiao Xufeng 5c6150033a ci: generate report for disabled apps 2025-08-31 00:24:24 +08:00
Alexey Lapshin bc4a9ad406 change(newlib): remove sys/dirent.h from newlib component 2025-08-30 19:52:33 +07:00
Shreeyash 5fd48c8393 fix(nimble): Restructure the table in README.md file 2025-08-29 18:13:30 +05:30
Chen Jichang 04b934951e refactor(pcnt): clean up the soc_caps.h file for PCNT 2025-08-29 17:13:46 +08:00
Sergei Silnov 3a42fd8ca8 Merge branch 'ci/pre-commit-fix' into 'master'
ci(github-actions/pre-commit): Wrap Python version in quotes

See merge request espressif/esp-idf!41630
2025-08-29 10:40:15 +02:00
Ashish Sharma 08a4a2b506 docs(esp_tls): adds documentation regarding sni 2025-08-29 16:13:42 +08:00
Chen Chen 00e5effb42 Merge branch 'doc/fix_i2c_typo' into 'master'
docs(i2c_master): Fix a typo in description

Closes IDFGH-16329

See merge request espressif/esp-idf!41439
2025-08-29 16:01:29 +08:00
morris 5db3254999 Merge branch 'fix/p4_edma_size' into 'master'
fix(gdma): correct the max burst size of p4 edma

See merge request espressif/esp-idf!41594
2025-08-29 15:54:53 +08:00
morris 57034c3bcf refactor(i2c): clean up the i2ctool example
removed unused console cli.
removed unnecessary dependencies.
behaviour changed: user must run the i2cconfig command before others
updated pytest as well
2025-08-29 15:52:02 +08:00
Mahavir Jain 6f5ec4b5a5 Merge branch 'bugfix/update_documentation_for_esp_http_client' into 'master'
fix(esp_http_client): fixed documentation for API esp_http_client_set_post_field()

Closes IDFGH-16112

See merge request espressif/esp-idf!41561
2025-08-29 13:21:02 +05:30
Alexey Lapshin 1275129a62 Merge branch 'fix/actulize_newlib_kconfig_variables' into 'master'
fix(config): actualize newlib Kcongig options

See merge request espressif/esp-idf!41301
2025-08-29 11:37:44 +04:00
Erhan Kurubas 9f38fa1b9a Merge branch 'test/sysview_uart' into 'master'
test(app_trace): add SystemView UART tracing tests for all targets

Closes IDF-11919, IDF-11920, IDF-11921, DOC-12212, and IDF-7660

See merge request espressif/esp-idf!41552
2025-08-29 09:37:37 +02:00
He Binglin 829f8d7835 Merge branch 'feat/esp_idf_c5_doc' into 'master'
docs(pm): update power management related docs for esp32c5

Closes IDF-9439

See merge request espressif/esp-idf!41389
2025-08-29 15:24:18 +08:00
armando ae184a0682 change(adc): improve oneshot example channel selection 2025-08-29 15:21:20 +08:00
Peter Dragun f212ddbd6d ci(github-actions/pre-commit): Wrap Python version in quotes 2025-08-29 08:53:32 +02:00
Alexey Lapshin 620d1cb519 Merge branch 'feature/enable_esp_chip_tuning' into 'master'
feat(build): enable -mtune=esp-base option for RISCV targets

See merge request espressif/esp-idf!40164
2025-08-29 10:52:03 +04:00
Jakub Kocka 117919d7d6 Merge branch 'fix/click_version' into 'master'
Fixed click deprecation warnings

Closes IDF-13075 and IDF-13088

See merge request espressif/esp-idf!40765
2025-08-29 14:48:55 +08:00
hebinglin 616991dd40 docs(pm): update power management related docs for esp32c5 2025-08-29 13:01:17 +08:00
Chen Chen 91d00fbbd7 docs(i2c_master): Fix a typo in description
Closes https://github.com/espressif/esp-idf/issues/17475
2025-08-29 11:22:41 +08:00
morris 6c968cee04 Merge branch 'feature/p4_eco5_real_chip' into 'master'
p4: p4 eco5 real chip

Closes IDF-13574 and IDF-13410

See merge request espressif/esp-idf!41396
2025-08-29 10:59:28 +08:00
Marius Vikhammer 5d98c9010b Merge branch 'bugfix/lp_core_array_bounds_p4' into 'master'
fix(lp_core): fixed array-bound warning when compiling on P4 with -Os

Closes IDFGH-16115

See merge request espressif/esp-idf!41583
2025-08-29 09:55:12 +08:00
Marius Vikhammer adf05d99da Merge branch 'ci/fix_cpp_leak_test_case' into 'master'
test(cpp): fixed cpp test case mem leak

Closes IDFCI-3108

See merge request espressif/esp-idf!41585
2025-08-29 09:53:59 +08:00
Salvatore Mesoraca fd33d02563 fix(esp_http_server): fix memory leak in httpd_req_async_handler_begin
Free scratch memory when response headers allocation fails
2025-08-29 02:11:13 +02:00
Jiang Jiang Jian 7a650c6d90 Merge branch 'bugfix/fixed_c5_rx_data_err' into 'master'
feat(ble): fixed ble rx pdu error issue on ESP32-C5

Closes BLERP-2193, BLERP-2192, and BLERP-2194

See merge request espressif/esp-idf!41572
2025-08-28 21:42:06 +08:00
Sudeep Mohanty 5eb8e746fc Merge branch 'fix/build_system_create_bin_gen_tgts' into 'master'
feat(build-system): Create build system hooks for post-elf processing

Closes IDFGH-16204

See merge request espressif/esp-idf!41097
2025-08-28 14:35:21 +02:00
armando 179d00a6f8 feat(p4): p4 rev3 real chip support 2025-08-28 17:56:16 +08:00
yanzihan@espressif.com d4a821a03e feat(clk): add 100m/200m/400m cpu freq & change clk cal & change blk version 2025-08-28 17:40:37 +08:00
nilesh.kale 2d437a6d9a fix(esp_http_client): fixed documentation for API esp_http_client_set_post_data()
Closes https://github.com/espressif/esp-idf/issues/17053
2025-08-28 14:55:55 +05:30
morris 3655d4cdca Merge branch 'feat/mipi_dsi_p4_eco5' into 'master'
ESP32P4 ECO5 register update: DSI/TIMG/ETM/DW_GDMA

Closes IDF-13735, IDF-13429, IDF-13422, and IDF-13428

See merge request espressif/esp-idf!41568
2025-08-28 17:11:38 +08:00
Chen Jichang a9959455ce fix(gdma): p4 ahb dma can assess psram 2025-08-28 17:02:50 +08:00
Chen Jichang 4df8aa247b fix(gdma): correct the max burst size of p4 edma 2025-08-28 17:01:44 +08:00
Zhang Shuxian f8e0b79867 docs: Update CN translation for system 2025-08-28 16:44:52 +08:00
Ashish Sharma 6acdf78438 Merge branch 'doc/add_tls_client_session_management_doc' into 'master'
docs: Adds doc for client session tickets

Closes IDF-13019

See merge request espressif/esp-idf!39521
2025-08-28 16:12:58 +08:00
Jiang Jiang Jian 0bc2286c2a Merge branch 'docs/esp32c5_programming_guide' into 'master'
docs(wifi): support esp32c5 wifi programming guide docs

See merge request espressif/esp-idf!35218
2025-08-28 16:07:55 +08:00
Konstantin Kondrashov eeb4ec56d0 Merge branch 'fix/esp_ringbuf_nosplit_full_return_one' into 'master'
feat(esp_ringbuf): Fixes full no-split buffer frees item incorrectly

Closes IDFGH-16320

See merge request espressif/esp-idf!41437
2025-08-28 15:31:51 +08:00
Marius Vikhammer 9c059738d3 Merge branch 'ci/ulp_defaults_config' into 'master'
ci(ulp): fixed default config not running in CI

See merge request espressif/esp-idf!41564
2025-08-28 15:13:58 +08:00
renpeiying 773c6ba164 docs: Update translation for esp_tls.rst 2025-08-28 14:26:09 +08:00
gaoxu 1e674fa044 feat(cam): support format conversion function 2025-08-28 14:14:36 +08:00
yinqingzhao ab5dd9dd2d feat(docs): support esp32c5 wifi programming guide docs 2025-08-28 14:05:55 +08:00
Marius Vikhammer 140effda53 fix(lp_core): fixed array-bound warning when compiling on P4 with -Os
Closes https://github.com/espressif/esp-idf/issues/17054
2025-08-28 13:19:56 +08:00
Alexey Lapshin 28ced4efad fix(config): actualize newlib Kconfig options 2025-08-28 12:25:09 +08:00
Kevin (Lao Kaiyao) 42b065bdce Merge branch 'bugfix/add_modem_etm_into_cmake' into 'master'
fix(modem_etm): fixed the compile issue

See merge request espressif/esp-idf!41379
2025-08-28 12:13:16 +08:00
Alexey Lapshin 4ecb6c4f9f Merge branch 'change/remove_roms_json_from_tools' into 'master'
move roms json from tools to components

Closes IDF-11693

See merge request espressif/esp-idf!41436
2025-08-28 07:12:44 +04:00
morris 626fad990d chore(soc): checked P4-ECO5 regsiters for dw_gdma,timg,etm,dsi
chore(mipi_dsi): checked the register on P4 ECO5

checked timg and etm registers
2025-08-28 11:02:27 +08:00
Chen Chen c4957f8cf1 Merge branch 'feat/esp32p4_i2c_eco5_support' into 'master'
refactor(i2c_p4eco5): update i2c_struct.h on P4 ECO5

Closes IDF-13728

See merge request espressif/esp-idf!41502
2025-08-28 11:01:08 +08:00
Marius Vikhammer cb36cd3a94 Merge branch 'bugfix/esp_event_remove_freertos_header' into 'master'
change(esp_event): removed unnecessary freertos header includes

Closes IDF-5130

See merge request espressif/esp-idf!41476
2025-08-28 09:50:25 +08:00
Li Shuai 3549016311 Merge branch 'feat/static_sleep_cpu_retention_buffer_support' into 'master'
Support static sleep cpu retention

See merge request espressif/esp-idf!40778
2025-08-28 09:47:59 +08:00
Marius Vikhammer 1207e2cb7a test(cpp): fixed cpp test case mem leak 2025-08-28 09:38:40 +08:00
Omar Chebib 686165a7fc Merge branch 'fix/eh_frame_infinite_loop' into 'master'
fix(esp_system): prevent .eh_frame-based unwinding from looping indefinitely

Closes IDF-13814, BLERP-2140, BLERP-2152, BLERP-2153, and BLERP-2154

See merge request espressif/esp-idf!41164
2025-08-28 09:36:56 +08:00
Alexey Lapshin c7db23458e Merge branch 'feature/gdbstub_q_and_xesppie_registers_support' into 'master'
GDBStub: riscv: support f- and q-registers

Closes IDF-7279 and IDF-12552

See merge request espressif/esp-idf!37484
2025-08-28 04:45:47 +04:00
Konstantin Kondrashov e2a1a7be35 Merge branch 'fix/coverity_console' into 'master'
fix(system): Fixes Coverity issues

Closes IDF-13862, IDF-13869, IDF-13872, IDF-13873, IDF-13910, IDF-13908, IDF-13863, IDF-13878, IDF-13903, IDF-13902, and IDF-13907

See merge request espressif/esp-idf!41414
2025-08-28 03:15:35 +08:00
zwl eaf12518af feat(ble): fixed ble rx pdu error issue on ESP32-C5 2025-08-27 19:58:45 +08:00
Konstantin Kondrashov 3ef17fe231 feat(esp_ringbuf): Fixes full no-split buffer frees item incorrectly
Closes https://github.com/espressif/esp-idf/issues/17466#issuecomment-3209730773
2025-08-27 14:02:20 +03:00
Erhan Kurubas a4e06f0792 test(app_trace): add SystemView UART tracing tests for all targets 2025-08-27 13:44:16 +03:00
Marius Vikhammer a791f7e85d ci(ulp): fixed default config not running in CI 2025-08-27 17:13:46 +08:00
LiPeng 8f9eeedae1 feat(usb): add CherryUSB support for multiple USB controllers selection 2025-08-27 16:59:37 +08:00
LiPeng 0ac445cbd6 feat(usb): add CherryUSB host msc example 2025-08-27 16:59:37 +08:00
LiPeng 4366f118ed feat(usb): add ALT escape input for USB HID keyboard 2025-08-27 16:59:37 +08:00
LiPeng 6069bdcdca feat(examples/peripherals/usb/cherryusb/host/cherryusb_host): add CherryUSB host example 2025-08-27 16:59:37 +08:00
LiPeng f866fbd9bc feat(examples/peripherals/usb/cherryusb/device/cherryusb_serial_device): add CherryUSB serial device example 2025-08-27 16:59:37 +08:00
C.S.M b191c34647 Merge branch 'fix/update_eco5_i3c_struct' into 'master'
fix(i3c): Update i3c master register struct

Closes IDF-13730

See merge request espressif/esp-idf!41508
2025-08-27 16:50:50 +08:00
Omar Chebib 11f3c47b95 fix(esp_system): prevent .eh_frame-based unwinding from looping indefinitely 2025-08-27 16:01:06 +08:00
laokaiyao 093a444d74 fix(modem_etm): fixed the compile issue 2025-08-27 15:48:35 +08:00
Alexey Lapshin c8ff79a023 fix(gdbstub): remove unsupported options in qSupported packet 2025-08-27 14:45:10 +07:00
Alexey Lapshin 9958287a64 feat(gdbstub): add f- and q-registers support 2025-08-27 14:45:06 +07:00
Kevin (Lao Kaiyao) a5bd9d2d13 Merge branch 'feature/i2s_support_merge_simplex_to_duplex' into 'master'
feat(i2s): support to lazy constitute full-duplex mode

Closes IDF-11696

See merge request espressif/esp-idf!39428
2025-08-27 14:46:56 +08:00
Alexey Lapshin ecc37c12d7 feat(build): enable -mtune=esp-base option for RISC-V targets
The `-mtune=esp-base` option is identical to the default tuning profile,
except that `slow_unaligned_access` is set to false.

This reduces the instruction count for built-in `memcpy` and improves
performance, since our chips can handle misaligned access with minimal
penalty (without triggering exceptions).

Example:

  void load(uint32_t *r, char* x) {
    memcpy(r, x, sizeof(uint32_t));
  }
  void store(char* x, uint32_t v) {
    memcpy(x, &v, sizeof(uint32_t));
  }

Previously generated code:

  load:
        lbu     a5,2(a1)
        lbu     a3,0(a1)
        lbu     a4,1(a1)
        sb      a5,2(a0)
        sb      a3,0(a0)
        sb      a4,1(a0)
        lbu     a5,3(a1)
        sb      a5,3(a0)
        ret
  store:
        srli    a3,a1,8
        srli    a4,a1,16
        srli    a5,a1,24
        addi    sp,sp,-16
        sb      a1,0(a0)
        sb      a3,1(a0)
        sb      a4,2(a0)
        sb      a5,3(a0)
        addi    sp,sp,16
        jr      ra

With `-mtune=esp-base`:

  load:
        lw      a5,0(a1)
        sw      a5,0(a0)
        ret
  store:
        sw      a1,0(a0)
        ret

Inlining behavior
=================

Without `-mtune=esp-base`:
  - `memcpy()` is inlined only when the compile-time size is ≤ 12 bytes.
    - Maximum cost: ~25 instructions

With `-mtune=esp-base`:
  - `memcpy()` is inlined for all compile-time constant sizes.
    - Maximum cost: ~14 instructions

As a result, some applications may see reduced code size, while others
may increase slightly. However, performance always improves because
extra `memcpy` calls are eliminated.

Performance results
===================

esp32p4 (Ethernet iperf):
  - No noticeable difference

esp32c61 (Wi-Fi iperf):
  - ~2 Mb/s increase for TCP and UDP TX (may be within measurement error)

NOTE
====

Applies only to RISC-V chips that do not have the hardware issue marked
by the SOC_CPU_MISALIGNED_ACCESS_ON_PMP_MISMATCH_ISSUE macro.
2025-08-27 12:46:41 +07:00
Chen Ji Chang 2044fba6e7 Merge branch 'feat/h4_mp_update_rom_linker' into 'master'
feat(h4mp): update rom linker (part3)

Closes IDF-13770

See merge request espressif/esp-idf!41213
2025-08-27 11:43:40 +08:00
morris 5efe1dbe33 Merge branch 'contrib/github_pr_17422' into 'master'
fix: I2C driver should use I2C_CLK_SRC_REF_TICK e (GitHub PR)

Closes IDFGH-16266

See merge request espressif/esp-idf!41188
2025-08-27 11:04:46 +08:00
Li Shuai d208a27ef5 feat(sleep): Increased/modified files for static sleep cpu retention buffer support 2025-08-27 09:51:51 +08:00
Li Shuai b43f0ddc70 feat(sleep): Modify the build system 2025-08-27 09:50:21 +08:00
Fu Hanxi b111672f42 Merge branch 'fix/kconfig-optional-dependency' into 'master'
fix(build): pass sdkconfig.json during injection to add kconfig optional dependencies correctly

See merge request espressif/esp-idf!41470
2025-08-26 16:38:52 +02:00
Fu Hanxi de098b9a5f Merge branch 'fix/menuconfig-reload-sdkconfig-json' into 'master'
fix: make sure sdkconfig.json is updated after running the menuconfig

See merge request espressif/esp-idf!41495
2025-08-26 16:36:54 +02:00
Konstantin Kondrashov 91a2744d44 fix(rt): Fixes Coverity false positive in va_list initialization 2025-08-26 22:13:50 +08:00
Konstantin Kondrashov 1ca82baec3 fix(heap): Fixes Coverity false positive in va_list initialization 2025-08-26 22:13:50 +08:00
Konstantin Kondrashov ca2ccf164c fix(log): Fixes Coverity false positive in va_list initialization 2025-08-26 22:13:50 +08:00
Konstantin Kondrashov 9b11b69a46 fix(console): Fixes Coverity false positive in va_list initialization 2025-08-26 22:13:50 +08:00
Jiang Jiang Jian e6a11ba88e Merge branch 'fix/wrong_auth_mode_in_sta_connected_evt' into 'master'
fix(wifi): send correct wifi_auth_mode_t in WIFI_EVENT_STA_CONNECTED and logs

See merge request espressif/esp-idf!40769
2025-08-26 21:43:19 +08:00
sonika.rathi b6956d7bc8 fix(fatfs): fix overflowed constant issue observed in mount_volume of ff.c 2025-08-26 13:58:56 +02:00
Jakub Kocka 6a8e47baf8 ci(pre-commit): Enhanced ruff pre-commit check to show fixes for better debugging 2025-08-26 13:50:45 +02:00
Jakub Kocka 2affbb9509 refactor(tools): Updated tests to corespond with massage changes 2025-08-26 13:50:45 +02:00
Jakub Kocka 7b65c5e0b7 refactor(tools): Strings to f-strings conversion an other pre-commit issues 2025-08-26 13:50:45 +02:00
Jakub Kocka f1143b0b93 fix(tools): Fixed click function usage to solve deprecation issue 2025-08-26 13:50:45 +02:00
Jakub Kocka c568e3e3de fix(tools): Avoided using the click's deprecated __version__ 2025-08-26 13:50:45 +02:00
Wan Lei fecbfdc84d Merge branch 'fix/twai_legacy_zero_trans' into 'master'
fix(twai): twai legacy driver fixed zero dlc transmit

Closes IDFGH-16321

See merge request espressif/esp-idf!41425
2025-08-26 18:17:15 +08:00
laokaiyao e3bf25de1c feat(i2s): support to lazy constitute full-duplex mode 2025-08-26 15:49:29 +08:00
Chen Ji Chang f160701c29 Merge branch 'fix/rmt_tx_loop_mode' into 'master'
fix(rmt): correct the condition for warnings in loop mode

See merge request espressif/esp-idf!41060
2025-08-26 14:49:32 +08:00
Lu Wei Ke 14f2d9e6cf Merge branch 'docs/migration_guides_bt_classic' into 'master'
docs: Add SoC conditional flag for Bluetooth Classic in migration guides

Closes DOC-11554

See merge request espressif/esp-idf!41440
2025-08-26 14:37:45 +08:00
C.S.M 93e63944b5 fix(i3c): Update i3c master register struct 2025-08-26 14:27:48 +08:00
Aditya Patwardhan cc37708f98 Merge branch 'feature/remove_ds_and_rsa_support_for_esp32h4' into 'master'
feat: remove ds and mpi support for esp32h4

Closes IDF-12443, IDF-12444, and IDF-12970

See merge request espressif/esp-idf!41339
2025-08-26 11:49:15 +05:30
Chen Ji Chang f54046ae3a Merge branch 'fix/fix_twai_pre_commit' into 'master'
fix(twai): fix cybergear pre-commit check

See merge request espressif/esp-idf!41507
2025-08-26 13:38:05 +08:00
Chen Jichang 2496588185 fix(twai): fix cybergear pre-commit check 2025-08-26 13:25:26 +08:00
Dai Zi Yan 95cd03c724 Merge branch 'docs/clarify_c2_esp8684_relation' into 'master'
docs: add clarification about the relationship between ESP32-C2 and ESP8684

See merge request espressif/esp-idf!41454
2025-08-26 04:23:19 +00:00
Chen Chen 2ff0e32696 refactor(i2c_p4eco5): update i2c_struct.h on P4 ECO5
Update the i2c_struct.h file to support P4ECO5.
2025-08-26 12:10:59 +08:00
morris c6d7d5d412 Merge branch 'feat/twai_xiaomi_motor_example' into 'master'
feat(twai): add cybergear example

Closes IDF-10549

See merge request espressif/esp-idf!40193
2025-08-26 11:37:04 +08:00
Sarvesh Bodakhe f5ff4530a2 fix(wifi): send correct wifi_auth_mode_t in event WIFI_EVENT_STA_CONNECTED and logs
- Fixes the authmode sent in WIFI_EVENT_STA_CONNECTED for WPA3-Enterprise, which
  was previously taken directly from the AKM field. This caused incorrect values in some cases.
- Updates the "security" log to show the correct wifi_auth_mode_t.
- Fixes wrong authmode strength used in the connection path.
2025-08-26 08:35:29 +05:30
Marius Vikhammer 1f0152dd3c Merge branch 'feature/cdcacm_vfs_comp' into 'master'
feat(usb_cdc_console): moved usb-cdc ROM console to new component: esp_usb_cdc_rom_console

Closes IDF-13797

See merge request espressif/esp-idf!41040
2025-08-26 10:40:08 +08:00
daiziyan a536b2b9f3 docs: add clarification about the relationship between ESP32-C2 and ESP8684 2025-08-26 10:32:53 +08:00
Yin Qing Zhao 9b0733ba7d Merge branch 'bugfix/fix_twt_beacon_timeout_and_bss_max_idle_not_enable' into 'master'
fix(wifi): fix twt beacon timeout and active scan on DFS channel

See merge request espressif/esp-idf!41341
2025-08-26 10:26:20 +08:00
morris 6fdaf37e16 Merge branch 'feat/twai_esp32h4' into 'master'
feat(twai): add driver support on esp32h4

Closes IDF-12352 and IDF-12354

See merge request espressif/esp-idf!41434
2025-08-25 23:30:11 +08:00
Fu Hanxi 7b81a731e2 ci: increase build timeout 2025-08-25 17:02:34 +02:00
Alexey Lapshin c433a76325 Merge branch 'feature/xtensa-size-optimize-mno-target-align' into 'master'
change(xtensa): Add -mno-target-align to size-optimized builds

Closes IDFGH-14980

See merge request espressif/esp-idf!39348
2025-08-25 18:50:01 +04:00
Fu Hanxi d65e0e39c6 fix: make sure sdkconfig.json is updated after running the menuconfig 2025-08-25 14:48:58 +02:00
Fu Hanxi 60e9ec429d fix: kconfig optional dependency in transitive dependency 2025-08-25 14:32:05 +02:00
Igor Masar 49ae853ddb Merge branch 'docs/usb-external-phy' into 'master'
docs(usb): add section on external USB PHY configuration

Closes DOC-3308

See merge request espressif/esp-idf!40670
2025-08-25 19:37:09 +08:00
Aditya Patwardhan 646377c622 Merge branch 'fix/http_client_coverity_warnings' into 'master'
fix(esp_http_client): address coverity generated warnings

Closes IDF-13867, IDF-13881, and IDF-13886

See merge request espressif/esp-idf!41411
2025-08-25 17:02:07 +05:30
Konstantin Kondrashov 5c3d03cee4 fix(newlib): Fixes Coverity issues 2025-08-25 14:27:42 +03:00
Rahul Tank 4dd2694760 Merge branch 'bugfix/post_conn_failure' into 'master'
fix(nimble): Add code to post connection failure

See merge request espressif/esp-idf!41062
2025-08-25 16:49:45 +05:30
Jiang Jiang Jian a23fad19df Merge branch 'bugfix/fix_esp32_bt_sw_intr' into 'master'
fix(bt): fixed sw_intr issue with BT register or trigger error core on ESP32

Closes BT-3917

See merge request espressif/esp-idf!40365
2025-08-25 19:03:19 +08:00
Ren Peiying 779698c755 Merge branch 'docs/improve_descr_on_language_standard' into 'master'
docs: Update description on C++ language standard

See merge request espressif/esp-idf!41426
2025-08-25 18:53:35 +08:00
wanckl 7e7f0c5e14 fix(twai): twai legacy driver fixed zero dlc transmit
Closes https://github.com/espressif/esp-idf/issues/17467
2025-08-25 18:52:38 +08:00
Chen Jichang b39507bc30 feat(twai): add cybergear example 2025-08-25 18:30:33 +08:00
Chen Ji Chang f522f9cf3d Merge branch 'feat/h4_mp_breaking_reg_headers' into 'master'
feat(h4mp): update breaking soc headers(part2)

See merge request espressif/esp-idf!41212
2025-08-25 18:17:37 +08:00
Island 83fdd14e2f Merge branch 'doc/update_blufi_doc' into 'master'
docs(ble): add advisory for CVE-2025-55297 found in Blufi example

Closes BLERP-2148

See merge request espressif/esp-idf!41468
2025-08-25 17:25:21 +08:00
Marius Vikhammer 3215a889a5 docs(readthedocs): removed old leftover readthedocs references 2025-08-25 16:35:40 +08:00
Jiang Jiang Jian 610ca26be1 Merge branch 'bugfix/protect_sha_hal_api_call' into 'master'
fix(esp_wifi): skip call to esp_fast_psk() when hardware SHA is not supported

Closes WIFI-6959

See merge request espressif/esp-idf!40609
2025-08-25 16:35:21 +08:00
Peter Dragun 7d19c310c1 Merge branch 'feat/esptool_v5_minimal' into 'master'
Feat: Add minimal esptool v5 support

See merge request espressif/esp-idf!41314
2025-08-25 16:28:51 +08:00
yinqingzhao 7a2d2a5b9c fix(wifi): fix twt beacon timeout and active scan on DFS channel 2025-08-25 16:19:55 +08:00
Erhan Kurubas 38c906bc3d Merge branch 'limit_gcov_build' into 'master'
change(examples): enable minimal build for gcov

Closes IDF-13857

See merge request espressif/esp-idf!41376
2025-08-25 10:01:18 +02:00
morris 5c97f96243 Merge branch 'features/twai_send_isr' into 'master'
features(twai): Added support for calling twai_node_transmit() from ISR contexts

See merge request espressif/esp-idf!41383
2025-08-25 15:19:18 +08:00
luweike 222560ade4 docs: Add SoC conditional flag for Bluetooth Classic in migration guides 2025-08-25 14:20:54 +08:00
zhanghaipeng 1952f0333c docs(ble): add advisory for CVE-2025-55297 found in Blufi example 2025-08-25 14:04:39 +08:00
Alexey Lapshin e5026b2e07 fix(gdbstub): fix segfault when a non-running task is selected 2025-08-25 11:58:27 +07:00
Alexey Lapshin 3f158e7ef2 fix(gdbstub): use separate running and selected tasks
'running' - task that was running when execution stopped
  'selected' - task that was selected by used in GDB (command "thread <id>")

Note that initially, after the program is interrupted 'selected' == 'running'
2025-08-25 11:58:24 +07:00
Alexey Lapshin b25cb2906c fix(freertos): fix xesppie registers save/restore 2025-08-25 11:58:21 +07:00
Alexey Lapshin 1f8096359d fix(riscv): split enable_fpu() to enable_fpu() and clear_fpu() 2025-08-25 11:58:15 +07:00
Mahavir Jain 47a659cd3e Merge branch 'contrib/github_pr_17429' into 'master'
docs(esp_http_client): document default timeout behaviour (GitHub PR)

See merge request espressif/esp-idf!41363
2025-08-25 10:21:53 +05:30
Aditya Patwardhan 4371348039 Merge branch 'contrib/github_pr_17464' into 'master'
Update the QEMU instructions for the security_features_app example (GitHub PR)

Closes IDFGH-16318 and IDFGH-16311

See merge request espressif/esp-idf!41438
2025-08-25 10:04:07 +05:30
Deomid rojer Ryabkov e2e51c08f6 change(xtensa): Add -mno-target-align to size-optimized builds
Saves space, about 6K in our application

Merges https://github.com/espressif/esp-idf/pull/15677
2025-08-25 12:24:18 +08:00
Alexey Lapshin 54ba54b457 change(esp_rom): move roms.json from tools to esp_rom component 2025-08-25 10:52:08 +07:00
Jiang Jiang Jian 6e0fd570b2 Merge branch 'feat/remove_wifi_related_docs_for_esp32h21' into 'master'
feat(docs): remove wifi related docs from docs_not_updated for esp32h21

Closes IDF-12107

See merge request espressif/esp-idf!37823
2025-08-25 11:13:28 +08:00
Yuan Yu e263cd2cfe docs(twai): Update twai_node_transmit function's note 2025-08-25 11:05:52 +08:00
Yuan Yu 37e23a113c fix(twai): Enhance ISR handling for TX queue operations 2025-08-25 11:05:52 +08:00
Kapil Gupta fe9dbc2b1d fix(esp_wifi): skip call to esp_fast_psk() when hardware SHA is not supported 2025-08-25 11:05:25 +08:00
Marius Vikhammer 81dff2c991 change(esp_event): removed unnecessary freertos header includes 2025-08-25 11:00:58 +08:00
morris 921e62b81f fix(twai): busoff and clkout may not available in SOC
return ESP_ERR_NOT_SUPPORTED if these signals are required from user but
not available in SOC
2025-08-25 10:22:02 +08:00
morris c54562ab72 feat(twai): add driver support on esp32h4 2025-08-25 10:22:02 +08:00
Soren Friis 391de423fd docs(security_features_app): Update the QEMU instructions for the security_features_app example
Closes https://github.com/espressif/esp-idf/issues/17458
Closes https://github.com/espressif/esp-idf/pull/17464
2025-08-25 10:12:36 +08:00
Gao Xu a20fc1a717 Merge branch 'docs/update_camera_mipi_docs' into 'master'
docs(cam): add ldo initialization note when use MIPI camera

Closes DOC-11987

See merge request espressif/esp-idf!41316
2025-08-25 10:10:37 +08:00
Marius Vikhammer 097f8a9fea Merge branch 'bugfix/log_sys_time_year' into 'master'
fix(log): fixed wrong year timestamp with LOG_TIMESTAMP_SOURCE_SYSTEM_FULL

Closes IDFGH-16299

See merge request espressif/esp-idf!41328
2025-08-25 09:49:50 +08:00
Marius Vikhammer f25ae4800d Merge branch 'bufix/assert_func_buf_too_small' into 'master'
fix(newlib): added kconfig option for configurable buffer length for assert msgs

Closes IDFGH-16305

See merge request espressif/esp-idf!41394
2025-08-25 09:47:21 +08:00
gaoxu bd20730b80 docs(cam): add ldo initialization note when use MIPI camera 2025-08-25 09:21:05 +08:00
Jiang Jiang Jian c17244b92f Merge branch 'bugfix/add_bt_phy_calibration_independent_support' into 'master'
feat(phy): add phy calibration independent support

Closes WIFIBUG-1409, PHY-348, and PHY-354

See merge request espressif/esp-idf!41391
2025-08-23 10:30:21 +08:00
Alexey Lapshin 177dee612f Merge branch 'feature/enable_misalign_optimization_for_iperf' into 'master'
feat(newlib): enable libc misalign optimized functions

Closes IDF-13820

See merge request espressif/esp-idf!41148
2025-08-22 22:14:53 +04:00
Ivan Grokhotkov 139236741c Merge branch 'feature/update-qemu-to-esp_develop_9.2.2_20250817' into 'master'
feat(tools): update qemu version to esp_develop_9.2.2_20250817

See merge request espressif/esp-idf!41381
2025-08-22 17:18:28 +02:00
Mahavir Jain ed201f4f77 fix(esp_tee): address coverity warnings 2025-08-22 19:14:52 +05:30
Mahavir Jain 70cb9d1a5c fix(esp_http_client): address coverity generated warnings 2025-08-22 19:13:24 +05:30
Yuan Yu 4e5401ec8c Merge branch 'features/twai_ll_parse_frame' into 'master'
refactor(twai): Separate frame header and data parsing logic for Classic TWAI

See merge request espressif/esp-idf!41203
2025-08-22 18:58:14 +08:00
Adam Múdry 56160675e7 Merge branch 'feat/sdspi_option_to_disable_waiting_for_miso_poll_busy' into 'master'
feat(sdspi): Add an option to modify the waiting time for MISO before sending next command

Closes IDFGH-15977 and IDFGH-9089

See merge request espressif/esp-idf!41175
2025-08-22 12:51:45 +02:00
Ivan Grokhotkov 17fd3133d9 fix(tools): use nvram.esp32s3.efuse device in qemu_ext.py
Related to https://github.com/espressif/esp-idf/issues/17258
2025-08-22 11:20:15 +02:00
Ivan Grokhotkov cd1bfdd463 fix(tools): pre-commit fixes for qemu_ext.py 2025-08-22 11:18:06 +02:00
Ivan Grokhotkov e8157d8fde feat(tools): enable PSRAM by default in "idf.py qemu" for ESP32-S3 2025-08-22 11:17:38 +02:00
Rahul Tank e6456654de fix(nimble): Add code to post connection failure
In event of a corner case, where connection is not completed,
connection reattempt is disabled, so need to post connection
failure event to application to make it aware of the failure
2025-08-22 14:22:56 +05:30
Chen Jichang f8480a115a feat(h4mp): update breaking soc headers(part2) 2025-08-22 16:27:39 +08:00
Mahavir Jain 70fb18be3e Merge branch 'bugfix/ota_timeout_and_repetitive_server_start' into 'master'
fix: ota: increase timeout and remove redundant server restart in tests

See merge request espressif/esp-idf!41353
2025-08-22 13:24:31 +05:30
Mahavir Jain f8f5560737 Merge branch 'bugdix/remove_ecdsa_doc_ref_from_docs_not_updated_file' into 'master'
docs: remove reference to ecdsa.rst from docs_not_updated/esp32c5.txt

See merge request espressif/esp-idf!41432
2025-08-22 13:05:57 +05:30
morris 01cba485dd Merge branch 'docs/update_introduction_for_adc_modes' into 'master'
docs: Update introduction for ADC modes

Closes DOC-12094

See merge request espressif/esp-idf!41435
2025-08-22 15:28:21 +08:00
Gao Xu 9dc7d37043 Merge branch 'h21_mp_soc_update' into 'master'
feat(h21_mp): update H21_MP soc headers

See merge request espressif/esp-idf!41224
2025-08-22 15:12:24 +08:00
Marius Vikhammer 32d85658fe Merge branch 'bugfix/esp_timer_dump_corruption' into 'master'
fix(esp_timer): fixed potential buffer overflow with esp_timer_dump()

Closes IDFGH-16067

See merge request espressif/esp-idf!41269
2025-08-22 15:10:59 +08:00
Island b28c6c3102 Merge branch 'bugfix/fixed_ble_init_crash_issue' into 'master'
fix(ble): Invoke ble_transport_ll_init after ble_transport_hs_init for nimble

Closes BLERP-2164

See merge request espressif/esp-idf!41313
2025-08-22 14:23:19 +08:00
Alexey Lapshin b266d829dd change(newlib): enable LIBC_OPTIMIZED_MISALIGNED_ACCESS by default 2025-08-22 13:46:43 +08:00
Alexey Lapshin 913d38ba14 fix(newlib): fix CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS for c2/c3/c6/h2/h21
PMP configurations for load and store addresses may
have different permissions (e.g., "R" vs. "RW").

Due to the timing alignment of internal signals, the address
permission check may be incorrectly applied during the second
part of a misaligned access transaction.

As a workaround, insert two instructions (e.g. ADDI/NOP) between
accessing to different memory regions. This spacing avoids the
false permission check caused by signal timing overlap.
2025-08-22 13:46:43 +08:00
David Čermák 453bd60576 Merge branch 'fix/sdkconfig.rename.docs' into 'master'
fix(docs): Update unclear sdkconfig.rename example

See merge request espressif/esp-idf!41424
2025-08-22 13:23:41 +08:00
Meet Patel 031a2f2f71 Merge branch 'refactor/ulp_riscv_i2c_logs' into 'master'
refactor(ulp_riscv): Modify i2c read/write API for better logging and return error code

Closes IDFGH-16269 and IDFGH-15237

See merge request espressif/esp-idf!41342
2025-08-22 10:35:37 +05:30
nilesh.kale 7fc57dbef5 fix: ota: increase timeout and remove redundant server restart in tests
This comit updated pytest file in advanced ota example and also updates
timeout for example to avoid recurring timeout errors in CI
2025-08-22 09:40:41 +05:30
Zhang Shuxian daf33186c9 docs: Update introduction for ADC modes 2025-08-22 12:06:32 +08:00
nilesh.kale 2e66070862 feat: remove ds and mpi support for esp32h4 2025-08-22 09:08:57 +05:30
Marius Vikhammer 924540d861 Merge branch 'ci/deploy_docs_brew' into 'master'
ci(docs): move deployment to Brew runners

See merge request espressif/esp-idf!41047
2025-08-22 11:26:45 +08:00
yinqingzhao 4a15df3d0f feat(phy): add phy calibration independent support 2025-08-22 10:47:49 +08:00
Marius Vikhammer 56e0c11bb6 feat(usb_cdc_console): moved usb-cdc ROM console to new component: esp_usb_cdc_rom_console 2025-08-22 09:37:47 +08:00
Marius Vikhammer 42316ef7bf fix(newlib): added kconfig option for configurable buffer length for assert msgs
Closes https://github.com/espressif/esp-idf/issues/17454
2025-08-22 09:15:22 +08:00
Peter Dragun eba6b814ba feat: Add support for esptool v5 and keep v4 for now 2025-08-21 15:53:39 +02:00
David Cermak 808ea4b989 fix(docs): Update unclear sdkconfig.rename example 2025-08-21 15:36:57 +02:00
Mastro Gippo 4c7a2159c2 Fix tiny memory leak when PPP connection creation fails in esp_netif_new_ppp 2025-08-21 14:44:39 +02:00
Jiang Jiang Jian 206be17ec9 Merge branch 'fix/fix_psram_cross_page_issue' into 'master'
psram: fixed psram cross page issue on c5 / c61

Closes DIG-717, WIFIBUG-1378, and WIFIBUG-1367

See merge request espressif/esp-idf!41299
2025-08-21 19:59:49 +08:00
C.S.M 3954083d05 Merge branch 'fix/tsens_log' into 'master'
fix(temperature_sensor): Fix temperature sensor hal log causing crash

Closes IDF-13912

See merge request espressif/esp-idf!41418
2025-08-21 18:51:03 +08:00
morris 709d13c89a Merge branch 'fix/lcd_get_frame_buffer' into 'master'
fix(lcd): uninitialized va_list

Closes IDF-13876

See merge request espressif/esp-idf!41402
2025-08-21 18:11:22 +08:00
nilesh.kale 659679adae docs: remove reference to ecdsa.rst from docs_not_updated/esp32c5.txt
This commit removef ecdsa.rst entry from esp32c5.txt as
ECDSA docs already merged
2025-08-21 15:34:25 +05:30
Konstantin Kondrashov 7b621ad88d Merge branch 'feature/adds_pthread_rwlock_timed_locks' into 'master'
feat(pthread): Adds timed locks for pthread_rwlock

Closes IDFGH-15461

See merge request espressif/esp-idf!40146
2025-08-21 17:53:27 +08:00
renpeiying bd387f86fb docs: Update description on C++ language standard 2025-08-21 17:36:06 +08:00
Peter Marcisovsky 350f88e69b Merge branch 'fix/usb_host_full_mock_component_dir' into 'master'
fix(usb_host): Fixing USB Component mock component dir

See merge request espressif/esp-idf!41404
2025-08-21 08:58:33 +02:00
Shen Weilong c3f42161a1 fix(ble): Invoke ble_transport_ll_init after ble_transport_hs_init for nimble 2025-08-21 06:50:57 +00:00
Yuan Yu 6fe547114d refactor(twai): Optimize the TWAI frame parsing function and separate frame header and data parsing logic 2025-08-21 14:45:46 +08:00
Chen Jichang 6c3d275342 fix(rmt): treat loop once as no loop 2025-08-21 14:25:30 +08:00
Chen Jichang 4e03f8df0f fix(rmt): correct the condition for warnings in loop mode 2025-08-21 14:25:30 +08:00
Chen Jichang f041954ec3 change(ci): update regex to match soc headers in check_public_header.py 2025-08-21 14:19:41 +08:00
gaoxu 41f954facf feat(h21_mp): update H21_MP soc headers 2025-08-21 14:19:41 +08:00
Mahavir Jain c91dc3f049 Merge branch 'cleanup/remove_deprecated_apis' into 'master'
feat: remove some deprecated APIs from 6.0 release

Closes IDF-13093

See merge request espressif/esp-idf!41211
2025-08-21 10:05:37 +05:30
Jiang Jiang Jian f3c4f5a08d Merge branch 'fix/increase_c61_sleep_wakeup_ahead_time' into 'master'
change(esp_hw_support): increase esp32c61 s2a_work_time_us

Closes WIFIBUG-1385

See merge request espressif/esp-idf!41367
2025-08-21 11:50:32 +08:00
Wan Lei 54a9c2e1e9 Merge branch 'feat/twai_add_wait_done_api' into 'master'
feat(driver_twai): add tx wait all done api

Closes IDF-13417

See merge request espressif/esp-idf!40616
2025-08-21 11:38:27 +08:00
C.S.M de621fe22d fix(temperature_sensor): Fix temperature sensor hal log causing crash 2025-08-21 10:32:58 +08:00
morris 09fce0cf2a Merge branch 'refactor/etm_driver_soc_caps' into 'master'
refactor(etm): clean up soc macros && enhance thread safety

Closes IDF-13634

See merge request espressif/esp-idf!41201
2025-08-21 10:19:19 +08:00
Wan Lei f5e9a24c90 Merge branch 'contrib/github_pr_17002' into 'master'
fix(driver_twai): modify the calculation description of quanta_resolution_hz (GitHub PR)

Closes IDFGH-16055 and IDFGH-16061

See merge request espressif/esp-idf!41405
2025-08-21 10:18:29 +08:00
armando ad4fe4c394 fix(psram): fixed psram cross page issue 2025-08-21 09:57:07 +08:00
Jiang Jiang Jian 23517c9317 Merge branch 'bugfix/fix_esp32c5_ersu_compatibility_issue' into 'master'
fix(wifi): fix ersu compatibility issue

Closes FCS-1761

See merge request espressif/esp-idf!41382
2025-08-21 00:09:25 +08:00
Harshal Patil 511292ba41 Merge branch 'fix/disable_efuse_xts_aes_256_esp32c5' into 'master'
Disable XTS-AES-256 using efuse key for ESP32-C5

See merge request espressif/esp-idf!41348
2025-08-20 21:33:39 +05:30
Hrushikesh Bhosale 183afd54be Merge branch 'feat/make_https_async_request_under_crt_bundle_config' into 'master'
feat(esp_http_client): Make https_async request under CERT BUNDLE config

See merge request espressif/esp-idf!41128
2025-08-20 23:55:08 +08:00
C.S.M e769a36d8a Merge branch 'fix/i2c_test_fail' into 'master'
test(i2c): fix i2c test failure

See merge request espressif/esp-idf!41407
2025-08-20 23:29:43 +08:00
morris 90a3b66370 fix(lcd): uninitialized va_list 2025-08-20 21:44:47 +08:00
Wang Meng Yang 7cac735da0 Merge branch 'feat/remove_the_deprecated_api_and_parameter' into 'master'
feat(bt): remove the deprecated functions and parameters

Closes BT-4042

See merge request espressif/esp-idf!40435
2025-08-20 19:36:37 +08:00
Rahul Tank a3808c928a Merge branch 'fix/adding_missing_apis_nimble' into 'master'
fix(nimble): Added helper APIs in NimBLE

Closes BLERP-2126 and BLERP-2138

See merge request espressif/esp-idf!40223
2025-08-20 16:01:46 +05:30
hrushikesh.bhosale f38b8fec92 feat(esp_http_client): Make https_async request under CERT BUNDLE config
Make https_async rqeuest under MBEDTLS_CERTIFICATE_BUNDLE config
2025-08-20 18:01:03 +08:00
Mahavir Jain 1a615729d5 Merge branch 'fix/coverity_issue_483747' into 'master'
Fix possible double memory free in esp_http_client

Closes IDF-13757, IDF-13758, and IDF-13755

See merge request espressif/esp-idf!40934
2025-08-20 14:29:20 +05:30
Mahavir Jain 42914e01ee feat: remove some deprecated APIs from 6.0 release 2025-08-20 14:20:37 +05:30
Meet Patel f5b7cb6766 refactor(ulp_riscv): Modify ulp i2c read/write functions to return error code
Updated the i2c read/write APIs ulp_riscv_i2c_master_read_from_device
and ulp_riscv_i2c_master_write_to_device in ulp_riscv component to
return error codes back to the application

Closes https://github.com/espressif/esp-idf/issues/15904
2025-08-20 14:16:44 +05:30
Meet Patel 7abc48157e refactor(ulp_riscv): Modify ESP_EARLY_LOG to ESP_LOG and move it outside critical section
Moved the error logs outside critical section for i2c communication errors
like READ fail, WRITE fail etc. in the ulp_riscv_i2c component

Also changed the error log API from ESP_EARLY_LOG to ESP_LOG, so we can support
tag based filtering and enabling/disabling of logs

Closes https://github.com/espressif/esp-idf/issues/17425
2025-08-20 14:16:44 +05:30
C.S.M 23f09d2617 test(i2c): fix i2c test failure 2025-08-20 16:33:00 +08:00
Tinyu 3aaa2adfe5 fix(driver_twai): modify the calculation description of quanta_resolution_hz
Closes https://github.com/espressif/esp-idf/issues/16996
Closes https://github.com/espressif/esp-idf/pull/17002
2025-08-20 16:25:57 +08:00
wanckl a690789dcf fix(driver_twai): update example using wait_tx_done api 2025-08-20 16:11:42 +08:00
wanckl 6288067296 feat(driver_twai): add tx wait all done api 2025-08-20 16:11:39 +08:00
C.S.M 65a6e9c294 Merge branch 'fix/flash_qio_read_failed' into 'master'
fix(spi_flash): Fix spi flash qio read failed on gpspi flash

See merge request espressif/esp-idf!41204
2025-08-20 16:11:06 +08:00
peter.marcisovsky b61f60ab6a fix(usb_host): Fixing USB Component mock component dir 2025-08-20 09:22:02 +02:00
Adam Múdry 9db29df39a feat(sdspi): Add an option to modify wait time for MISO before sending next command
Closes https://github.com/espressif/esp-idf/issues/16909
2025-08-20 08:57:51 +02:00
Island e31611d6a3 Merge branch 'change/ble_update_lib_20250814' into 'master'
change(ble): [AUTO_MR] 20250814 - Update ESP BLE Controller Lib

Closes BLERP-2160 and BLERP-2159

See merge request espressif/esp-idf!41260
2025-08-20 14:11:54 +08:00
Wang Meng Yang f82e101dcc Merge branch 'bugfix/fix_tmp_key_bug' into 'master'
bugfix/fix_tmp_key_bug

See merge request espressif/esp-idf!41296
2025-08-20 14:07:00 +08:00
Wan Lei 9f43c02e89 Merge branch 'fix/mcpwm_foc_example_fix_angle_calc' into 'master'
fix(driver_mcpwm): in foc example correct the angle calcutation

Closes IDFGH-16074

See merge request espressif/esp-idf!41384
2025-08-20 12:06:15 +08:00
Island dfc67f0876 Merge branch 'bugfix/ble_enhanced_security' into 'master'
Update BluFi document

Closes BLERP-2148

See merge request espressif/esp-idf!41158
2025-08-20 11:29:12 +08:00
renpeiying 8b2b2729bb docs: Add CN translation to usb_host and usb_device.rst 2025-08-20 10:16:27 +08:00
Ivan Grokhotkov 1c6c901730 Merge branch 'feature/api_check_prereq' into 'master'
change(tools): export esp-clang-libs location as ESP_CLANG_LIBS_PATH

See merge request espressif/esp-idf!41144
2025-08-20 00:48:20 +02:00
harshal.patil d59bcb633c fix(soc): Disable XTS-AES-256 using efuse key for ESP32-C5 2025-08-19 21:54:26 +05:30
Roland Dobai 86fc2e116f Merge branch 'revert/legacy_export_scripts' into 'master'
revert(tools): Revert backup option to use legacy export scrips

Closes IDF-11027

See merge request espressif/esp-idf!41309
2025-08-19 16:30:04 +02:00
Roland Dobai c43d311126 Merge branch 'feat/update_cmake_versions' into 'master'
feat(tools): Upgraded cmake versions (supported to 3.22.1, reccomended to 4.0.3)

See merge request espressif/esp-idf!40364
2025-08-19 15:58:04 +02:00
Island 3216dfa3b3 Merge branch 'bugfix/fix_bleqabr25_1004' into 'master'
fix(ble/bluedroid): Fixed the status setting in the HCI event

Closes BLERP-2020

See merge request espressif/esp-idf!40055
2025-08-19 21:10:46 +08:00
Roland Dobai 47d11179f1 fix(components/tcp_transport): Fix missing file extension in the test_app 2025-08-19 14:44:32 +02:00
Marek Fiala af168c75b3 docs(migration-guide): Information on how to update CMake 2025-08-19 14:44:32 +02:00
Marek Fiala 9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Marek Fiala d7faae9ae4 change(tools): ruff formating test_hints.py 2025-08-19 14:44:31 +02:00
Marek Fiala 9aada24169 feat(tools): Updated cmake versions - tools.json
recommended v3.30.2 -> v4.0.3
supported v3.16.3 -> v3.22.1
2025-08-19 14:44:31 +02:00
wanckl fdb292798e fix(driver_mcpwm): in foc example correct the angle calcutation
Closes https://github.com/espressif/esp-idf/issues/17015
2025-08-19 19:40:37 +08:00
muhaidong d0b499ecf3 fix(wifi): fix ersu compatibility issue 2025-08-19 19:26:09 +08:00
Laukik Hase ba80256748 Merge branch 'ci/esp_tee_disable_c5_temp' into 'master'
ci(esp_tee): Disable the TEE test-apps for ESP32-C5 temporarily

See merge request espressif/esp-idf!41356
2025-08-19 16:37:16 +05:30
Alexey Lapshin 03855b90f8 Merge branch 'feature/update-gnu-standards' into 'master'
feat(build): update gnu17->gnu23 and gnu++2b->gnu++26

See merge request espressif/esp-idf!41014
2025-08-19 14:30:34 +04:00
Ivan Grokhotkov 3c4aa1a5a5 feat(tools): update qemu version to esp_develop_9.2.2_20250817 2025-08-19 09:39:18 +00:00
Ivan Grokhotkov a939f410dd Merge branch 'bugfix/ldgen_prebuilt_library_placements' into 'master'
build: pass pre-built libraries to ldgen, clean up how blobs are added

Closes IDF-12049 and IDF-12736

See merge request espressif/esp-idf!40353
2025-08-19 10:50:31 +02:00
Ivan Grokhotkov d9b6d4ed17 change(tools): export esp-clang-libs location as ESP_CLANG_LIBS_PATH
This allows tools which depend on libclang to find the library
location.
2025-08-19 10:48:41 +02:00
Chen Chen 6af87b6287 Merge branch 'change/i2c_return_val' into 'master'
change(i2c_master): Change the I2C return value to ESP_ERR_INVALID_RESPONSE when NACK detected

Closes IDF-13751

See merge request espressif/esp-idf!41251
2025-08-19 16:14:18 +08:00
gongyantao 179a730a03 feat(bt): remove the deprecated functions and parametes 2025-08-19 16:07:05 +08:00
Erhan Kurubas 312261785c change(examples): enable minimal build for gcov 2025-08-19 09:53:33 +03:00
Astha Verma 3c579545a4 fix(nimble): Added missing api in nimble which present in bluedroid 2025-08-19 12:21:04 +05:30
Rocha Euripedes bf9d085bba Merge branch 'reduce_scope_of_mqtt_publish_connet' into 'master'
fix(mqtt): Reduce scope of dependencies for mqtt test

See merge request espressif/esp-idf!39825
2025-08-19 14:47:42 +08:00
Rocha Euripedes a23bc29a84 fix(mqtt): Reduce scope of dependencies for mqtt test 2025-08-19 14:47:42 +08:00
Zhang Shu Xian 702301ad91 Merge branch 'docs/update_cn_translation_for_iram_docs' into 'master'
docs: Update CN translation for IRAM-related docs

Closes DOC-12056

See merge request espressif/esp-idf!41340
2025-08-19 14:35:44 +08:00
Island 74bb9f6563 Merge branch 'feat/ble_iso_nimble_support' into 'master'
feat(ble): ISO minor support for NimBLE Host

See merge request espressif/esp-idf!40268
2025-08-19 14:25:15 +08:00
Chen Chen c35ddc1258 change(i2c_master): Change return value when NACK detected 2025-08-19 12:12:52 +08:00
liqigan 98df3fa714 fix(bt/controller): Fixed some controller bugs 2025-08-19 11:57:10 +08:00
Wang Meng Yang 892ec6a114 Merge branch 'bugfix/fix_bt_security' into 'master'
fix(bt/bluedroid): Prevent out-of-bounds access and add type check when resolving EIR data

Closes BT-4071

See merge request espressif/esp-idf!41167
2025-08-19 11:54:10 +08:00
wuzhenghui 4193bf56c4 change(esp_hw_support): increase s2a_work_time_us 2025-08-19 11:50:03 +08:00
Zhang Shuxian 5b11b017a9 docs: Update CN translation for IRAM-related docs 2025-08-19 11:35:02 +08:00
Alexey Lapshin 4c481c863f feat(build): update gnu17->gnu23 and gnu++2b->gnu++26 2025-08-19 10:29:37 +07:00
He Binglin 316d744845 Merge branch 'feat/support_esp32h4_dfs' into 'master'
Support dfs and light & deep sleep  in esp32h4 beta5

Closes PM-446

See merge request espressif/esp-idf!40595
2025-08-19 10:50:48 +08:00
Alexey Lapshin 5276a56911 Merge branch 'fix/misalign_memory_test_limit_values' into 'master'
fix(newlib): increase limit for misaligned access testcases

Closes IDFCI-2917

See merge request espressif/esp-idf!41209
2025-08-18 19:14:45 +04:00
Shen Wei Long 219e38bfbc Merge branch 'bugfix/check_bd_addr_only_for_bredr' into 'master'
fix(bt): check bd address only for bredr in bluedroid host l2cu_allocate_lcb()

See merge request espressif/esp-idf!40063
2025-08-18 13:18:14 +00:00
Laukik Hase 9b807a253d ci(esp_tee): Disable the TEE test-apps for ESP32-C5 temporarily 2025-08-18 18:42:02 +05:30
cjin 2f7e200fc8 feat(ble): support pawr feature in ble sdk on ESP32-H2 2025-08-18 19:18:10 +08:00
cjin 6c15fccddd feat(ble): support pawr feature in ble sdk on ESP32-C5 2025-08-18 19:18:10 +08:00
cjin 410d904845 feat(ble): support pawr feature in ble sdk on ESP32-C6 2025-08-18 19:18:10 +08:00
cjin 50e7825ba9 feat(ble): add clk source freq change of ble slow clock on ESP32-C5 2025-08-18 19:18:10 +08:00
cjin cb60528f23 feat(ble): add clk source freq change of ble slow clock on ESP32-H2 2025-08-18 19:18:10 +08:00
cjin b5ce766c7f feat(ble): add clk source freq change of ble slow clock on ESP32-C6 2025-08-18 19:18:10 +08:00
Zhou Xiao 236baa7585 change(ble): [AUTO_MR] Update lib_esp32c6 to 9492a0cb 2025-08-18 19:18:10 +08:00
Zhou Xiao 859d762fcf change(ble): [AUTO_MR] Update lib_esp32c5 to 9492a0cb 2025-08-18 19:18:10 +08:00
Zhou Xiao ea32d4cd18 change(ble): [AUTO_MR] Update lib_esp32h2 to 9492a0cb 2025-08-18 19:18:10 +08:00
morris 53a399971f Merge branch 'refactor/i2c_testapp_c++' into 'master'
refactor(i2c_test_apps): Refactor from C to C++

Closes IDF-13806

See merge request espressif/esp-idf!41126
2025-08-18 17:37:41 +08:00
morris 661590940a refactor(etm): enhance thread safety and clean up soc macros 2025-08-18 14:58:24 +08:00
morris 8b96e82077 Merge branch 'contrib/github_pr_17444' into 'master'
fix PuTTY link in establish-serial-connection.rst (GitHub PR)

Closes IDFGH-16292

See merge request espressif/esp-idf!41326
2025-08-18 14:47:05 +08:00
chenjianhua 4ae438cca2 fix(ble/bluedroid): Fixed the status setting in the HCI event 2025-08-18 14:40:36 +08:00
Chen Jichang d0ad1145fc feat(h4mp): update rom linker (part3) 2025-08-18 14:24:12 +08:00
Mahavir Jain 758939caec Merge branch 'fix/enable_ssl_cookie_support_by_default' into 'master'
fix(mbedtls): enable ssl cookie support by default

See merge request espressif/esp-idf!41235
2025-08-18 11:42:24 +05:30
Marius Vikhammer 9fef6e587c Merge branch 'docs/misc_c5_c61' into 'master'
docs(misc): cleanup docs for C5 and C61

Closes IDF-9498

See merge request espressif/esp-idf!41225
2025-08-18 14:12:08 +08:00
Ondrej Kosta 5aab43eb21 Merge branch 'contrib/github_pr_16869' into 'master'
feat(examples): improved example for Ethernet SPI polling mode without interrupt (GitHub PR)

Closes IDFGH-15933

See merge request espressif/esp-idf!41071
2025-08-18 14:05:52 +08:00
Marius Vikhammer 9ec0f18607 fix(log): fixed wrong year timestamp with LOG_TIMESTAMP_SOURCE_SYSTEM_FULL
struct tm contains the number of years since 1900, but the printing code
assumed it contained actual current year.

It would also print it as YYYY, while the documentation and code implies
it should be YY.

Closes https://github.com/espressif/esp-idf/issues/17451
2025-08-18 13:40:39 +08:00
hebinglin 8f8a97787d change(esp_hw_support): change clock kconfig name in eso32h4beta5 2025-08-18 12:55:42 +08:00
Liu Linyan 77c51051b9 feat(ble): ISO minor support for NimBLE Host 2025-08-18 12:02:19 +08:00
Chen Chen 8361d150de fix(i2c_test_apps): Fix the conflict when including spimem_flash_ll
Update to avoid the conflict that C++ compiler complains about low level C
code
2025-08-18 11:20:16 +08:00
Chen Chen 34d2abf533 refactor(i2c_test_apps): Refactor i2c test apps from C to C++ 2025-08-18 11:20:16 +08:00
hebinglin 9f4a568163 change(esp_hw_support): comment out for ci pass in esp32h4beta5 2025-08-18 11:02:16 +08:00
Marius Vikhammer c6f435f390 docs(misc): cleanup docs for C5 and C61 2025-08-18 10:55:01 +08:00
Shen Weilong 61c13ef849 fix(bt): check bd address only for bredr in bluedroid host l2cu_allocate_lcb() 2025-08-18 10:44:22 +08:00
C.S.M 34f9863115 fix(spi_flash): Fix spi flash qio/dio read failed on gpspi flash 2025-08-18 10:37:04 +08:00
C.S.M 185857aee2 fix(spi_flash): Fix spi_flash clock for gpspi on esp32c5/p4 2025-08-18 10:37:04 +08:00
yangfeng a0fe68ce45 fix(bt/bluedroid): Prevent out-of-bounds access and add type check when resolving EIR data 2025-08-18 09:20:05 +08:00
emanulato 81974e696d fix PuTTY link in establish-serial-connection.rst
The link to PuTTY was pointing to putty.org. This domain has no relation to the PuTTY project! Instead, the website run by the actual PuTTY team can be found under https://putty.software , see https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/snps/iotdk/doc/index.rst
2025-08-16 15:04:48 +02:00
Konstantin Kondrashov 659ae57c83 Merge branch 'feature/log_remove_deprecated_items' into 'master'
remove(log): Remove deprecated functions and header file

Closes IDF-9809 and DOC-11832

See merge request espressif/esp-idf!40539
2025-08-16 00:20:11 +08:00
Shen Meng Jing c37d4a6512 Merge branch 'docs/sync_cn_and_en' into 'master'
docs: Sync CN and EN docs

Closes DOC-11933

See merge request espressif/esp-idf!41027
2025-08-15 22:25:46 +08:00
hebinglin afc51051bf change(esp_hw_support): update pmu register context structure and driver for esp32h4 beta5 2025-08-15 20:52:13 +08:00
Sudeep Mohanty 4cfc196680 feat(build-system): Create build system hooks for post-ELF processing
This commit adds new CMake APIs for the build system, viz.,
idf_build_add_post_elf_dependency() and
idf_build_get_post_elf_dependencies().
These APIs allow components to add post-ELF processing hooks before the
binary file is generated.

Closes https://github.com/espressif/esp-idf/issues/17251
2025-08-15 12:22:47 +02:00
Konstantin Kondrashov 6b8d4cc1fb remove(log): Remove deprecated functions and header file 2025-08-15 18:04:08 +08:00
hebinglin 498f78dc40 change(esp_hw_support): support esp32h4beta5 power management dfs flow 2025-08-15 17:49:27 +08:00
Mahavir Jain 14ccee1981 Merge branch 'fix/ecdsa_p384_tee_build_failure' into 'master'
fix(esp_tee): Fix build failure due to ECDSA-P384

See merge request espressif/esp-idf!41302
2025-08-15 14:52:38 +05:30
Marek Fiala d548d283b9 revert(tools): Revert backup option to use legacy export scrips
This reverts commit 7b417fc3f2.
2025-08-15 09:11:02 +02:00
harshal.patil da5dda1131 fix(esp_tee): Fix build failure due to ECDSA-P384 2025-08-15 12:10:36 +05:30
zhanghaipeng 3f4bedd3a5 feat(blufi): Update BluFi document 2025-08-15 14:18:05 +08:00
Island f1572ae61d Merge branch 'fix/spi_ble_log_get_lc_ts_ceva' into 'master'
fix(ble): disabled get lc ts for ESP32-C3 and ESP32-S3

Closes BLERP-2157

See merge request espressif/esp-idf!41226
2025-08-15 13:48:34 +08:00
He Binglin 7e1f3e35e1 Merge branch 'bugfix/es_idf_clkicg_idf-13119' into 'master'
fix(esp_hw_support): fix dead code and out-of-bounds in esp_sleep_clock_config function

Closes IDF-13119 and IDF-13103

See merge request espressif/esp-idf!40989
2025-08-15 13:08:36 +08:00
Shu Chen e36d80e172 Merge branch 'feat/update_phylib_for_c5' into 'master'
feat(esp_phy): update phylib for C5

See merge request espressif/esp-idf!41191
2025-08-15 04:11:48 +00:00
Wang Meng Yang 1979646199 Merge branch 'bugfix/epr_collision' into 'master'
fix(bt/controller): fixed some controller bugs

Closes BT-4034

See merge request espressif/esp-idf!40775
2025-08-15 09:38:08 +08:00
Sudeep Mohanty 11b80a7f11 Merge branch 'feat/freertos_in_flash_by_default' into 'master'
feat(freertos): Place FreeRTOS in flash by default

Closes IDF-12695

See merge request espressif/esp-idf!40579
2025-08-15 02:18:57 +02:00
David Cermak a0802b1e58 Merge branch 'feat/esp32p4_soc_ver2' into 'master'
feat(soc): added emac_reg.h to hw_ver2

See merge request espressif/esp-idf!41248

Note: Merged manaully, due to build errors from both TWAI and EMAC
2025-08-14 17:02:50 +02:00
Konstantin Kondrashov 481c3fc89f Merge branch 'feature/update_esp32c61_efuse_docs' into 'master'
feat(docs): Update ESP32-C61 efuse documentation

Closes IDF-10169

See merge request espressif/esp-idf!41262
2025-08-14 20:33:15 +08:00
Wan Lei 851cd92100 Merge branch 'fix/fix_twai_cpp_build_error' into 'master'
fix(driver_twai): test app fix cpp build error

See merge request espressif/esp-idf!41255
2025-08-14 20:16:56 +08:00
Mahavir Jain 74da6d7a2f Merge branch 'feature/esp_tee_c5' into 'master'
feat(esp_tee): Initial support for ESP32-C5

Closes IDF-10426, IDF-10427, IDF-10428, IDF-10429, and IDF-10430

See merge request espressif/esp-idf!38807
2025-08-14 17:44:12 +05:30
Marius Vikhammer b0b76f3792 fix(esp_timer): fixed potential buffer overflow with esp_timer_dump()
esp_timer_dump could overflow when dumping a large amount of timers

Closes https://github.com/espressif/esp-idf/issues/17008
2025-08-14 20:01:55 +08:00
Island c6923d2a26 Merge branch 'bugfix/ble_enhanced_security_v2' into 'master'
fix(ble/bluedroid): Fixed potential out-of-bounds memory access when resolve adv data

Closes BLERP-2149

See merge request espressif/esp-idf!41160
2025-08-14 17:28:13 +08:00
Sudeep Mohanty 7a6559f7d5 Merge branch 'fix/panic_handler_reboot_before_halt' into 'master'
fix(panic_handler): Fixed a issue where the system reboots before halt

Closes IDFGH-16214

See merge request espressif/esp-idf!41194
2025-08-14 11:00:02 +02:00
Konstantin Kondrashov d834e4333a feat(docs): Update ESP32-C61 efuse documentation 2025-08-14 11:52:03 +03:00
wanckl 7d22590cf9 fix(driver_twai): test app fix cpp build error 2025-08-14 15:55:26 +08:00
Mahavir Jain 05e149ea78 Merge branch 'feature/add_ecdsa_p384_support_and_testcases' into 'master'
feat: add ecdsa-p384 testcases and relative support for ESP32C5 ECO2

Closes IDF-13008 and IDF-12630

See merge request espressif/esp-idf!38857
2025-08-14 12:33:25 +05:30
Ondrej Kosta b62c0feb3b feat(soc): added emac_reg.h to hw_ver2 2025-08-14 08:54:04 +02:00
Konstantin Kondrashov b0f34bd8b5 Merge branch 'featue/allow_custom_key_purposes' into 'master'
feat(efuse): Allow custom key purposes

See merge request espressif/esp-idf!40799
2025-08-14 14:48:37 +08:00
Yuan Yu 0563c8608a Merge branch 'bugfix/twai_utils_down' into 'master'
fix(twai): fix the twai_utils's pytest to turn canbus down

Closes IDFCI-3079

See merge request espressif/esp-idf!41238
2025-08-14 14:48:04 +08:00
Mahavir Jain f0cc4528f5 Merge branch 'feat/disable_protocomm_sec0_1_schemes' into 'master'
feat(protocomm): disable security version 0 and 1 by default

See merge request espressif/esp-idf!41184
2025-08-14 12:01:05 +05:30
Chen Ji Chang 3c60941aa0 Merge branch 'feat/h4_mp_compatibility_changes' into 'master'
feat(h4mp): update compatible soc headers (part1)

See merge request espressif/esp-idf!41205
2025-08-14 14:10:42 +08:00
Mahavir Jain 71d3492124 Merge branch 'fix/handle_error_and_dispatch_event_while_reading_data_from_server' into 'master'
feat(esp_http_client): handle error while reading data from server

Closes IDF-13454

See merge request espressif/esp-idf!40544
2025-08-14 11:27:36 +05:30
Aleksei Apaseev 8880b4e626 Merge branch 'ci/fix_bin_size_report_generation' into 'master'
ci: fix bin size report generation

See merge request espressif/esp-idf!41065
2025-08-14 13:12:01 +08:00
Wan Lei 675fe2d4ba Merge branch 'feat/twai_new_driver_example' into 'master'
feat(driver_twai): update example to using new driver

Closes IDFGH-6837

See merge request espressif/esp-idf!39531
2025-08-14 12:51:08 +08:00
Ashish Sharma 2b8703ef9f fix(mbedtls): enable ssl cookie support by default 2025-08-14 12:05:02 +08:00
Shen Meng Jing 4b43f6cbeb Merge branch 'docs/update_cn_6.0_tools' into 'master'
docs: Update CN translation for tools.rst

Closes DOC-11915

See merge request espressif/esp-idf!41151
2025-08-14 12:04:22 +08:00
Yuan Yu c386170aad fix(twai): make sure that can bus is shut down properly 2025-08-14 11:43:09 +08:00
Ren Peiying 13f422501d Merge branch 'bugfix/update_struct_in_ledc_header' into 'master'
docs: Update struct for correct building of ledc.h

Closes IDFGH-7219

See merge request espressif/esp-idf!41133
2025-08-14 11:03:43 +08:00
Zhou Xiao c17bf63874 fix(ble): disabled get lc ts for ESP32-C3 and ESP32-S3 2025-08-14 11:03:33 +08:00
Chen Ji Chang 7324fc6dd9 Merge branch 'refactor/use_gdma_link_in_rmt' into 'master'
refactor(rmt): use gdma link list driver to mount buffer

Closes IDFGH-15289 and IDFGH-15421

See merge request espressif/esp-idf!39350
2025-08-14 10:49:19 +08:00
Wan Lei 7d1e974f77 Merge branch 'bugfix/twai_driver_cxx_test' into 'master'
fix(twai): fixed build errors in cxx environment

Closes IDFGH-16058

See merge request espressif/esp-idf!40818
2025-08-14 09:41:23 +08:00
Armando (Dou Yiwen) 68cbef3175 Merge branch 'change/change_msync_vaddr_not_cacheable_behaviour' into 'master'
cache: when vaddr is not cacheable, msync will return not supported

See merge request espressif/esp-idf!41105
2025-08-14 01:21:33 +00:00
Armando (Dou Yiwen) 5046f31c1b Merge branch 'change/p4_soc_cmake' into 'master'
soc: simplify p4 soc cmake

See merge request espressif/esp-idf!41161
2025-08-14 01:20:16 +00:00
Fu Hanxi 2dec2f59d5 Merge branch 'ci/fix-extra-default-build-targets' into 'master'
Ci: exclude standalone pytest folders

See merge request espressif/esp-idf!41189
2025-08-14 01:48:49 +02:00
Ondrej Kosta 3fb1f9add3 Merge branch 'feat/p4_emac_sleep' into 'master'
feat(esp_eth): added EMAC sleep retention for ESP32P4

Closes IDF-9919

See merge request espressif/esp-idf!40385
2025-08-14 02:52:29 +08:00
Aditya Patwardhan 286f7fe082 Merge branch 'change/ecdsa_does_not_use_mpi_esp32h2_eco5' into 'master'
The ECDSA module of ESP32-H2 ECO5 does not use the MPI module

See merge request espressif/esp-idf!41156
2025-08-13 23:22:51 +05:30
Erhan Kurubas 5ac81c17cd Merge branch 'move_gcov_to_component_registry' into 'master'
Move gcov to component registry

Closes IDF-13404 and DOC-11978

See merge request espressif/esp-idf!40752
2025-08-13 19:29:34 +02:00
Konstantin Kondrashov 2fdeaa882f feat(pthread): Adds timed locks for pthread_rwlock
Closes https://github.com/espressif/esp-idf/issues/16099
2025-08-13 20:22:27 +03:00
Richard Allen 69404c8d83 docs(esp_http_client): document default timeout behaviour 2025-08-13 10:07:38 -05:00
Konstantin Kondrashov fdc3206767 Merge branch 'feature/ipc_allows_recursion_calls' into 'master'
feat(ipc): Allow IPC recursion calls in esp_ipc_call

Closes IDF-13722

See merge request espressif/esp-idf!40792
2025-08-13 21:49:07 +08:00
Sudeep Mohanty f1ab53eda0 test(panic_handler): Added unit test to verify panic handler can halt
This test verifies that the panic handler can indeed halt when
configured to print and halt instead of rebboting.
2025-08-13 15:40:07 +02:00
wanckl fe8f0f08f3 feat(driver_twai): update and simplify network example using new driver 2025-08-13 19:41:06 +08:00
wanckl 959557d00a feat(driver_twai): update error recover example using new driver
Closes https://github.com/espressif/esp-idf/issues/8461
2025-08-13 19:40:20 +08:00
wanckl 6440f9d5d7 feat(driver_twai): remove self test example since it's meanless 2025-08-13 19:36:41 +08:00
JinCheng 88722d50d5 fix(bt/controller): fixed some controller bugs 2025-08-13 19:27:35 +08:00
JinCheng 81d7ce47db fix(bt/bluedroid): correct a description error in the GAP header file 2025-08-13 19:27:35 +08:00
Yuan Yu c4de1ae390 Merge branch 'features/twai_utils_example' into 'master'
feat(twai/example): Adds a TWAI utility example like can-utils.

Closes IDF-6093

See merge request espressif/esp-idf!39387
2025-08-13 19:25:08 +08:00
Wu Zheng Hui feb1dc97b9 Merge branch 'fix/fix_submode_lost_in_reset' into 'master'
fix(esp_hw_support): fix ESP_SLEEP_RTC_USE_RC_FAST_MODE submode lost in reset

Closes IDFGH-15614

See merge request espressif/esp-idf!41080
2025-08-13 18:58:10 +08:00
Sudeep Mohanty 36eaa2c4a1 fix(panic_handler): Fixed a issue where the system reboots before halt
This commit fixes an issue where the panic handler may reboot even if it
is configured to halt the CPU.

Closes https://github.com/espressif/esp-idf/issues/17260
2025-08-13 12:19:23 +02:00
Laukik Hase bb55b0cefc ci(esp_tee): Enable the TEE test-apps for ESP32-C5 2025-08-13 14:09:00 +05:30
Laukik Hase ab8400df4a ci(esp_tee): Refactor the ESP-TEE test-cases
- Improve the interrupt-related test cases
- Fix potential issues in the task-switching test
  during secure service calls
2025-08-13 14:09:00 +05:30
Laukik Hase 340de9823a feat(esp_tee): Support for ESP32-C5 - the rest of the components 2025-08-13 14:08:59 +05:30
Laukik Hase 11d3a2480f feat(esp_tee): Support for ESP32-C5 - the esp_tee component 2025-08-13 14:08:58 +05:30
Yuan Yu 9a95e2719c docs(twai): update example description for TWAI utilities 2025-08-13 16:31:35 +08:00
Yuan Yu f1da574ae5 feat(twai): add TWAI utility commands and configuration
- Introduced TWAI utility commands for sending, dumping, and managing TWAI frames.
- Added configuration options for TWAI GPIO pins and support for TWAI-FD.
- Created necessary CMake and Kconfig files for building the TWAI utilities.

This enhancement provides a comprehensive interface for TWAI operations.
2025-08-13 16:31:35 +08:00
morris 78f2b2ad10 Merge branch 'doc/mipi_dphy_power' into 'master'
doc(lcd): explain the DPHY power supply

Closes IDF-13816

See merge request espressif/esp-idf!41186
2025-08-13 16:18:06 +08:00
Alexey Lapshin 33cc3511e8 fix(newlib): increase limit for misaligned access testcases 2025-08-13 15:17:33 +07:00
Chen Jichang 18420f8d3d feat(h4mp): part1 update compatible soc headers 2025-08-13 14:05:32 +08:00
Mahavir Jain 056e4a4162 Merge branch 'feat/add_new_client_state_and_update_state_flow' into 'master'
feat(esp_http_client): added new HTTP state HTTP_STATE_CONNECTING and change state flow

Closes IDFGH-15423 and IDFGH-15362

See merge request espressif/esp-idf!40507
2025-08-13 11:29:18 +05:30
Harshal Patil 2f15501cae Merge branch 'ci/enable_flash_enc_test_esp32p4' into 'master'
Enable flash encryption test case for ESP32-P4 in the CI

Closes IDF-10982

See merge request espressif/esp-idf!41026
2025-08-13 09:46:04 +05:30
Mahavir Jain 80adff3cd0 Merge branch 'bugfix/psram_enc_workaround' into 'master'
fix(psram): provide boot warning about PSRAM encryption issue on C5/C61

See merge request espressif/esp-idf!40913
2025-08-12 21:05:10 +05:30
morris d75789beb9 fix(twai): fixed build errors in cxx environment
Closes https://github.com/espressif/esp-idf/issues/16999
2025-08-12 21:25:38 +08:00
Konstantin Kondrashov 1113ef2ff0 feat(ipc): Allow IPC recursion calls in esp_ipc_call 2025-08-12 16:16:09 +03:00
igor.masar 10252a8fb7 docs(usb): add section on external USB PHY configuration
Add top-level section for configuring and initializing external USB PHY
on ESP32-S3. Includes GPIO mapping, code example, and guidance on
suspend and speed selection pins.

Link to ESP USB PHY guide for SP5301 setup to avoid duplicating content.
Add dedicated schematic reference for STUSB03E with analog switch.
2025-08-12 14:26:46 +02:00
Island 5152593a74 Merge branch 'feat/support_blufi_adv_with_name' into 'master'
feat(bt/blufi): Support Blufi start advertising with specified name

Closes BLERP-1405

See merge request espressif/esp-idf!35761
2025-08-12 20:21:18 +08:00
Island fbea0c641f Merge branch 'feat/support_cble50y24_108' into 'master'
Support multi-connection optimization and examples on Bluedroid

Closes BLERP-2088 and BLERP-2089

See merge request espressif/esp-idf!40487
2025-08-12 20:21:12 +08:00
nilesh.kale 7edb4fae49 feat(esp_http_client): avoid dispatching of spurious event while closing closes connection
This commit updated the client closing condition to avoid spurious
dispatching of event HTTP_EVENT_DISCONNECTED while closing closeed connection.

Closes https://github.com/espressif/esp-idf/issues/16070
2025-08-12 17:31:50 +05:30
nilesh.kale 9984cc4aab feat(esp_http_client): added new HTTP state HTTP_STATE_CONNECTING and change state flow
This commit added new http state HTTP_STATE_CONNECTING, and made states public.
Also added public API to get current state.
Updated state flow in esp_http_client_perform()

Closes https://github.com/espressif/esp-idf/issues/16019
2025-08-12 17:30:38 +05:30
Fu Hanxi 7198ae518c ci: remove duplicated new lines 2025-08-12 13:44:35 +02:00
Fu Hanxi e01cc4be89 ci: exclude folders with custom pytest.ini 2025-08-12 13:41:33 +02:00
Fu Hanxi 08d21989a9 ci: fix extra default build targets 2025-08-12 13:41:30 +02:00
Fu Hanxi 4115f5836a ci: update file patterns CMakeList.txt to CMakeLists.txt 2025-08-12 13:37:51 +02:00
Mahavir Jain c3960c810e Merge branch 'fix/handle_return_during_assiging_header_for_range_request' into 'master'
fix(esp_https_ota): fixed missing return check during setting range header

Closes IDF-13825

See merge request espressif/esp-idf!41185
2025-08-12 15:16:48 +05:30
Rahul Tank 92c125d1c2 Merge branch 'fix/update_ble_gatts_show_local_with_cpfd' into 'master'
fix(nimble): Update ble_gatts_show_local with CPFDs and CAFDs

Closes BLERP-2151 and BLERP-2139

See merge request espressif/esp-idf!41028
2025-08-12 14:52:37 +05:30
zwx 55246f0fde feat(esp_phy): update phylib for C5 2025-08-12 17:04:12 +08:00
Peter Marcisovsky ab49455449 Merge branch 'fix/run_esp_usb_pre_commit' into 'master'
Run pre-commit fom esp-usb on usb-related files

See merge request espressif/esp-idf!40864
2025-08-12 10:18:44 +02:00
morris b137fe0227 doc(lcd): explain the DPHY power supply 2025-08-12 16:15:59 +08:00
Darian Leung cc48f7c67d fix: I2C driver should use I2C_CLK_SRC_REF_TICK enum 2025-08-12 15:56:22 +08:00
Jiang Jiang Jian 4b559f6253 Merge branch 'enhancement/protect_from_odd_phy_disable_operations_by_single_modem' into 'master'
esp_phy: Add protection of consecutive disable operations by single modem source

See merge request espressif/esp-idf!41152
2025-08-12 15:46:33 +08:00
C.S.M bb554a74dd Merge branch 'refactor/tsens_hal' into 'master'
refactor(temperature_sensor): Move temperature calculation from hw_support to hal

See merge request espressif/esp-idf!40296
2025-08-12 15:39:06 +08:00
Marius Vikhammer 7aca8b8df2 Merge branch 'bugfix/usb_serial_jtag_tests_console_p4_c5' into 'master'
ci(system): enable usb-serial-jtag console tests for p4 and c5

See merge request espressif/esp-idf!41039
2025-08-12 15:32:23 +08:00
Gao Xu b67635cbd4 Merge branch 'ci/add_s3_eye_test_and_runner' into 'master'
ci(camera): add esp32s3eye test and runner for DVP

See merge request espressif/esp-idf!41109
2025-08-12 14:58:03 +08:00
zinkett 0fdb9e1764 feat(examples): improved example for Ethernet SPI polling mode without interrupt
Update example for polling mode, without interrupt pin
2025-08-12 14:42:10 +08:00
morris 185a1c5a1e Merge branch 'fix/i2c_example' into 'master'
fix(i2x_basic_example): Fix the param passed to i2c API

Closes IDFGH-16197

See merge request espressif/esp-idf!41182
2025-08-12 14:34:12 +08:00
Konstantin Kondrashov 9e07bb10a0 feat(efuse): Allow custom key purposes 2025-08-12 14:32:01 +08:00
Mahavir Jain f9e2ebaea5 feat(protocomm): disable security version 0 and 1 by default
Change default values for protocomm security configuration options to improve
security:
- CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_0 now defaults to 'n'
- CONFIG_ESP_PROTOCOMM_SUPPORT_SECURITY_VERSION_1 now defaults to 'n'

This reduces code size by default and encourages use of more secure protocomm
implementations.
Projects using these security versions must explicitly enable them in their
configuration.
2025-08-12 11:43:12 +05:30
harshal.patil 16873520fd ci(flash_enc): Extend flash encryption and mbedtls test case to test PSRAM encryption 2025-08-12 11:29:00 +05:30
Alexey Lapshin 4339a7eafb Merge branch 'fix/newlib_kconfig_variables' into 'master'
change(newlib): change CONFIG_NEWLIB* prefix to CONFIG_LIBC_NEWLIB*

See merge request espressif/esp-idf!41153
2025-08-12 09:54:45 +04:00
nilesh.kale cc95457c22 fix(esp_https_ota): fixed missing return check during setting range header
This commit added return value check during setting the range header
for partial download procedure of esp_https_ota
2025-08-12 10:26:14 +05:30
chenjianhua b8996f3953 feat(ble/bluedroid): Added BLE multiple connections examples 2025-08-12 12:20:34 +08:00
chenjianhua f0cfb6e33c feat(ble/bluedroid): Support multi-connection optimization vendor hci command 2025-08-12 12:14:51 +08:00
Chen Chen 7d1f5d7d46 fix(i2x_basic_example): Fix the param passed to i2c API
Closes https://github.com/espressif/esp-idf/issues/17246
2025-08-12 11:27:47 +08:00
morris 5df7a0a8c9 Merge branch 'fix/gpio_example_conflict' into 'master'
fix(generic_gpio): Avoid conflict when using USB-OTG

Closes IDFGH-15615

See merge request espressif/esp-idf!41177
2025-08-12 11:22:30 +08:00
Gao Xu d1feaf5b01 Merge branch 'fix/spi_flash_speed_on_fpga' into 'master'
fix(flash): fix H21/H4 error on FPGA because of wrong flash speed

See merge request espressif/esp-idf!41166
2025-08-12 11:22:26 +08:00
chenjianhua 437aba1653 fix(ble/bluedroid): Fixed the connection count limit in multi-connection 2025-08-12 11:02:38 +08:00
xuzhekai 2ccae5330e fix(bt/bluedroid): adjust L2CAP round robin msg send strategy 2025-08-12 11:02:38 +08:00
morris 100a0570e9 Merge branch 'feat/hal_config_macro_func' into 'master'
refactor(hal): use HAL_CONFIG() macro function

Closes IDF-13629

See merge request espressif/esp-idf!41127
2025-08-12 10:49:28 +08:00
Island ee1efc59ad Merge branch 'fix/specify_scan_channel_for_esp32c2' into 'master'
fix(ble): wrapped specify scan channel vs cmd

See merge request espressif/esp-idf!41150
2025-08-12 10:44:53 +08:00
Chen Chen fb4cfde6f5 fix(generic_gpio): Avoid conflict when using USB-OTG
Changed the default GPIO out pins in generic_gpio for ESP32S3, to avoid the pin
conflict at GPIO 19 when using USB-OTG to communicate.

Closes https://github.com/espressif/esp-idf/issues/16244
2025-08-12 09:53:46 +08:00
Lu Wei Ke d87d950abc Merge branch 'docs/update_tcm_to_spm_esp32p4' into 'master'
docs: Update TCM to SPM for ESP32-P4 memory types

Closes DOC-11704

See merge request espressif/esp-idf!40472
2025-08-12 09:25:05 +08:00
Alexey Lapshin 8f97220a48 feat(newlib): add test for newlib_nano with esp32-psram 2025-08-11 21:28:55 +07:00
Wan Lei 4bd3661faf Merge branch 'contrib/github_pr_17268' into 'master'
Add note about drive capability for GPIO pins in SPI slave example (GitHub PR)

Closes IDFGH-16223

See merge request espressif/esp-idf!41157
2025-08-11 21:54:54 +08:00
Mahavir Jain 1a7bf1b2e9 Merge branch 'fix/esp32h21_no_issue_on_block9' into 'master'
fix(efuse): ESP32-H21 no issues on BLOCK9 with AES_XTS and ECDSA keys

See merge request espressif/esp-idf!40698
2025-08-11 19:20:18 +05:30
brahim ghouma b9bb6b5aa4 Add note about drive capability for GPIO pins in SPI slave example 2025-08-11 21:38:30 +08:00
Mahavir Jain d2858847b2 fix(esp_psram): make SPIRAM_USE_MEMMAP depend on ESP32 target 2025-08-11 18:06:11 +05:30
Mahavir Jain 54c7803cd3 fix(psram): provide boot warning about PSRAM encryption issue on C5/C61
For C5/C61 revision 1.0, PSRAM encryption has hardware issue. This will
be addressed in future silicon version. Add explicit warning about this.
2025-08-11 18:06:11 +05:30
Konstantin Kondrashov 4bf5d62683 fix(efuse): ESP32-H21 no issues on BLOCK9 with AES_XTS and ECDSA keys 2025-08-11 17:49:43 +05:30
Alexey Lapshin 4dc6cb3fa1 change(newlib): change CONFIG_NEWLIB* prefix to CONFIG_LIBC_NEWLIB* 2025-08-11 19:06:44 +07:00
Sumeet Singh 1fb909466a fix(nimble): Update ble_gatts_show_local with CPFDs and CAFDs 2025-08-11 17:30:24 +05:30
Cody 6b360dacf6 fix(ble/bluedroid): Update Gatt_Server_Service_Table_Example_Walkthrough.md 2025-08-11 19:48:04 +08:00
BLKDASH 6b212c7d47 fix(ble/bluedroid): Fixed the problem of macro definition error 2025-08-11 19:41:32 +08:00
peter.marcisovsky 4deccbc4a6 fix(usb_host): Run esp-usb pre-commit:
- trailing whitespaces
    - end-of-file-fixer
    - codespell
    - astyle_py: align pointer name
2025-08-11 13:14:36 +02:00
Ondrej Kosta b3e2f89f49 feat(esp_eth): added EMAC sleep retention for ESP32P4 2025-08-11 12:53:24 +02:00
nilesh.kale dedc9889de feat: added config member to store block number for hign part of ecdsa key 2025-08-11 16:01:10 +05:30
nilesh.kale 08e781c876 feat: added new config member to provide ecdsa curve type 2025-08-11 16:01:09 +05:30
nilesh.kale 68f06a94bd feat: add ecdsa-p384 testcases and relative support for ESP32C5 ECO2
This commit adds testcases in crypto/hal and mbedtls testapps.
2025-08-11 16:01:01 +05:30
Erhan Kurubas f5ffef1556 change(app_trace): move gcov component to the esp-component-registry 2025-08-11 13:24:42 +03:00
morris ae221cb24f Merge branch 'feat/sdm_sleep_retention' into 'master'
sdm driver sleep retention support and thread safety enhancement

Closes IDF-12348, IDF-13686, IDF-10700, IDF-9742, IDF-9771, and IDF-10396

See merge request espressif/esp-idf!41088
2025-08-11 18:23:50 +08:00
gaoxu 5433c4c3c5 fix(flash): fix H21/H4 error on FPGA because of wrong flash speed 2025-08-11 18:09:44 +08:00
Shen Mengjing 1319fe05e1 docs: Sync CN and EN docs 2025-08-11 17:42:59 +08:00
Shen Mengjing a130dea2c9 docs: Update CN translation for tools.rst 2025-08-11 16:58:21 +08:00
nilesh.kale 73d8ad9083 feat(esp_http_client): handle error while reading data from server
This commit updated API esp_http_cleint_perform() to handle error and
dispatched error  event if any error occured whiling reading data from server.
2025-08-11 16:39:22 +08:00
Sudeep Mohanty 3ef41363cf Merge branch 'task/remove_freertos_compatibility' into 'master'
remove(freertos): Removed freertos_compatibility.c

Closes IDF-3851 and IDF-8144

See merge request espressif/esp-idf!40652
2025-08-11 10:25:33 +02:00
renpeiying 2f2cb51904 docs: Update struct for correct building of ledc.h
Closes https://github.com/espressif/esp-idf/issues/8813
2025-08-11 16:18:01 +08:00
armando 987c901fa5 change(soc): simplify p4 soc cmake 2025-08-11 15:36:15 +08:00
harshal.patil 9e87b50307 change(mbedtls/ecdsa): The ECDSA module of ESP32-H2 ECO5 does not use MPI module 2025-08-11 12:08:51 +05:30
Chen Jichang e321d3f85f feat(rmt): support unaligned receive buffer with DMA
The driver will help to align the buffer to mem_alignment in DMA mode
2025-08-11 14:22:28 +08:00
Chen Jichang f4a76612fa feat(rmt): allow to set init level before any tx transmission
Closes https://github.com/espressif/esp-idf/issues/16068
2025-08-11 14:22:28 +08:00
Chen Jichang 7d0d7c52db fix(rmt): deal with spurious RX done interrupts on ESP32
Closes https://github.com/espressif/esp-idf/issues/15948
2025-08-11 14:22:28 +08:00
Chen Jichang 4ee0feeb6f refactor(rmt): use gdma link list driver to mount buffer 2025-08-11 14:22:28 +08:00
morris 844dc17b43 Merge branch 'fix/rmt_simple_encoder_done_with_mem_full' into 'master'
fix(rmt): fix the state of simple encoder with mem full

Closes IDFGH-16195

See merge request espressif/esp-idf!41070
2025-08-11 14:01:57 +08:00
Rahul Tank 4f84ba0ae7 Merge branch 'feat/add_vsc_specify_scan_chan' into 'master'
fix(nimble): Add VSC for Set Scan Channel Bitmap

Closes BLERP-2131

See merge request espressif/esp-idf!40933
2025-08-11 11:23:32 +05:30
Wang Mengyang 15d88a149b fix(esp_phy): Add protection of consecutive disable operations by single modem source 2025-08-11 13:47:48 +08:00
Aditya Patwardhan b72e532598 Merge branch 'feature/move_partial_download_code_under_config' into 'master'
feat(esp_http_client): move partial download related code under config

Closes IDF-13464

See merge request espressif/esp-idf!40270
2025-08-11 11:09:49 +05:30
zhanghaipeng 12df54e8d1 fix(ble/bluedroid): Fixed potential out-of-bounds memory access when resolve adv data 2025-08-11 13:08:14 +08:00
Song Ruo Jing 451cfc91c3 Merge branch 'contrib/github_pr_17241' into 'master'
Refactor: Use enum values when assigning "pull_[up|down]_en" fields of "gpio_config" (GitHub PR)

Closes IDFGH-16192

See merge request espressif/esp-idf!41058
2025-08-11 12:08:16 +08:00
C.S.M 0121a14699 refactor(temperature_sensor): Move temperature calculation from hw_support to hal 2025-08-11 11:47:20 +08:00
wuzhenghui a0ca0fe7be fix(esp_hw_support): test ESP_SLEEP_RTC_USE_RC_FAST_MODE sleep submode after reset 2025-08-11 11:28:38 +08:00
wuzhenghui b4aa2de9c4 fix(esp_hw_support): fix ESP_SLEEP_RTC_USE_RC_FAST_MODE sub_mode lost after cpu/sys reset
Closes https://github.com/espressif/esp-idf/issues/16243
2025-08-11 11:28:34 +08:00
Zhang Wen Xu 29af244a49 Merge branch 'feat/add_154_mac_logs_when_ot_assert' into 'master'
feat(openthread): add option to dump 802.15.4 MAC debug info on assert

See merge request espressif/esp-idf!40936
2025-08-11 02:35:43 +00:00
Zhou Xiao 33febd990c fix(ble): wrapped specify scan channel vs cmd 2025-08-11 10:25:56 +08:00
hebinglin 52ef5c8072 fix(esp_hw_support): change if condition to fix idf-13103 2025-08-11 10:24:12 +08:00
hebinglin 1e89698c60 fix(esp_hw_support): change esp_sleep_clock_option_t to fix idf-13119 2025-08-11 10:24:12 +08:00
morris 0eb611a797 feat(sdm): add driver support for esp32-h4 2025-08-11 10:16:03 +08:00
morris f808fb9eaf feat(sdm): add sleep retention support 2025-08-11 10:15:40 +08:00
morris 83512e3e7c feat(sdm): enhance the thread safety 2025-08-11 10:13:57 +08:00
Shen Meng Jing e58562e030 Merge branch 'docs/update_cn_mbedtls' into 'master'
docs: Update the CN translation for mbedtls.rst

Closes DOC-11889

See merge request espressif/esp-idf!40956
2025-08-11 10:06:36 +08:00
armando 71a09b82a4 change(cache): when vaddr is not cacheable, msync will return not supported 2025-08-11 01:53:16 +00:00
gaoxu 178b5802f3 ci(camera): add esp32s3eye test and runner for DVP 2025-08-10 18:45:02 +08:00
Chen Ji Chang 6c8d12a670 Merge branch 'feat/support_pcnt_on_h21' into 'master'
feat(pcnt): support pcnt on esp32h21

Closes IDF-11566, IDF-11567, IDF-9907, IDF-9739, IDF-8469, and IDF-9768

See merge request espressif/esp-idf!40889
2025-08-10 01:36:03 +08:00
Jiang Jiang Jian bba5292866 Merge branch 'bugfix/update_librtc' into 'master'
fix(esp_phy): update esp32 librtc.a for coex problems

See merge request espressif/esp-idf!41046
2025-08-09 00:46:46 +08:00
Jiang Jiang Jian dbb2d4f027 Merge branch 'change/ble_update_lib_20250806' into 'master'
change(ble): [AUTO_MR] 20250806 - Update ESP BLE Controller Lib

Closes BLERP-2128, BLERP-2124, and BLERP-1825

See merge request espressif/esp-idf!41075
2025-08-08 22:49:43 +08:00
Roland Dobai 5caacd42ff Merge branch 'docs/add-config-migration' into 'master'
docs: add link to esp-idf-kconfig migration guide

See merge request espressif/esp-idf!40898
2025-08-08 16:14:24 +02:00
Nachiket Kukade e3269dc618 Merge branch 'bugfix/ftm_example_issues' into 'master'
Improve FTM Query logging for AP-Sta mode

Closes WIFIBUG-1256 and WIFIBUG-1257

See merge request espressif/esp-idf!39741
2025-08-08 21:18:51 +08:00
akshat 13a46dcfcf bugfix(wifi): Improve FTM Query logging for AP-Sta mode 2025-08-08 17:43:45 +05:30
Jiang Jiang Jian 51ed23be67 Merge branch 'bugfix/fix_ht20_check_wrong' into 'master'
Bugfix/fix ht20 check wrong

Closes WIFIBUG-1333 and WIFIBUG-1377

See merge request espressif/esp-idf!41086
2025-08-08 20:00:15 +08:00
LiPeng c99850e50d fix(bt): fixed sw_intr issue with BT register or trigger error core on ESP32 2025-08-08 19:50:37 +08:00
morris afd35e411a refactor(hal): use HAL_CONFIG() macro function 2025-08-08 18:25:24 +08:00
Gao Xu 465c37d5eb Merge branch 'feat/support_uart_on_h4' into 'master'
feat(uart): support uart on ESP32H4

Closes IDF-12398, IDF-12400, and IDF-12948

See merge request espressif/esp-idf!39224
2025-08-08 18:03:30 +08:00
Ren Peiying fbe5dc7c92 Merge branch 'docs/update_struct_in_lcd_spi' into 'master'
docs: Update lcd_io_spi.h for correct documentation building

Closes DOC-11820

See merge request espressif/esp-idf!41087
2025-08-08 17:46:38 +08:00
Erhan Kurubas b98d27c7f9 Merge branch 'fix/coredump_max_tasks_num' into 'master'
fix(coredump): implement CONFIG_ESP_COREDUMP_MAX_TASKS_NUM limitation

Closes IDFGH-13516

See merge request espressif/esp-idf!41008
2025-08-08 10:36:24 +02:00
yinqingzhao 7c490492a0 fix(wifi): fix ht20 state check incorrect 2025-08-08 15:57:48 +08:00
yinqingzhao 9ac8d9c3e5 feat(wifi): improve iperf performance of esp32c61 2025-08-08 15:53:34 +08:00
Jiang Jiang Jian 55086dffc7 Merge branch 'bugfix/fix_espnow_coexist_mode_switch_issue' into 'master'
fix(wifi): fix some esp-now issues and lightsleep issues

Closes WIFIBUG-1124, WIFIBUG-1302, WIFIBUG-1303, WIFIBUG-1312, and WIFIBUG-1304

See merge request espressif/esp-idf!40454
2025-08-08 15:30:18 +08:00
gaoxu db32e42122 feat(uart): support uart on ESP32H4 2025-08-08 14:48:12 +08:00
Chen Jichang e6f5a9ab5a feat(pcnt): support pcnt on esp32h21 2025-08-08 14:45:16 +08:00
Chen Jichang 587583cc5f remove(pcnt): remove unused retention reg 2025-08-08 14:45:16 +08:00
Island 890229d30b Merge branch 'feat/ble_log_uart_dma_out_console' into 'master'
feat(ble): support ble log console

Closes BLERP-2144

See merge request espressif/esp-idf!41081
2025-08-08 14:33:51 +08:00
Island 5540a8c8a0 Merge branch 'opt/opt_ble_stability' into 'master'
Improve ESP32 stability and security

Closes BLERP-2121, BTQABR2023-538, and BTQABR2023-548

See merge request espressif/esp-idf!40791
2025-08-08 14:31:21 +08:00
Armando (Dou Yiwen) b57f726a41 Merge branch 'fix/fix_dvp_dma_desc_type_on_s3_1' into 'master'
camera: fixed dvp dma desc type on s3

See merge request espressif/esp-idf!41104
2025-08-08 06:08:20 +00:00
Jiang Jiang Jian e71760b79e Merge branch 'fix/fix_esp32c5_mac_link_bad_trigger' into 'master'
fix(hal): fix esp32c5 wifimac link bad trigger

See merge request espressif/esp-idf!41057
2025-08-08 13:59:03 +08:00
Rahul Tank b821dfabaa fix(nimble): Add VSC for Set Scan Channel Bitmap 2025-08-08 11:27:59 +05:30
Rahul Tank 6fbc17c945 Merge branch 'bugfix/correct_attr_count_in_get_db_api' into 'master'
fix(nimble): Updating the count parameter when fetching the gatt db

Closes BLERP-2125 and BLERP-2137

See merge request espressif/esp-idf!40771
2025-08-08 11:14:30 +05:30
Marius Vikhammer 4c9c30831a Merge branch 'fix/cdcacm-callback-placement' into 'master'
fix(esp_vfs_console): Update placement of cdcacm_xx_cb when ETS print enabled

Closes IDFGH-16059

See merge request espressif/esp-idf!40945
2025-08-08 13:24:15 +08:00
Aleksei Apaseev d19fc2958d ci: fix bin size report generation 2025-08-08 12:22:17 +08:00
Zhou Xiao 36cdf54b37 feat(ble): added ble log console for ble log uhci out 2025-08-08 12:01:43 +08:00
renpeiying 219c331b50 docs: Update struct for correct building 2025-08-08 11:29:27 +08:00
Omar Chebib 4f4083ecda Merge branch 'feature/dsp_coprocessor_support' into 'master'
feat(riscv): add support for the DSP coprocessor

Closes IDF-13087 and LLVM-369

See merge request espressif/esp-idf!40866
2025-08-08 11:06:22 +08:00
armando 458070b1b6 fix(cam): fixed dvp dma desc type on s3 2025-08-08 10:17:05 +08:00
Marius Vikhammer 706800c56b ci(docs): move deployment to Brew runners 2025-08-08 09:46:08 +08:00
Marius Vikhammer bb8346aad2 Merge branch 'bugfix/enable_misc_test_case' into 'master'
ci: cleanup misc system build-test-rules

See merge request espressif/esp-idf!41067
2025-08-08 09:25:25 +08:00
renpeiying 9f9dbf3270 docs: Add CN trans to tools.rst, Update build-system.rst translation 2025-08-07 19:40:32 +02:00
Jan Beran 152aa6bf63 docs: add link to esp-idf-kconfig migration guide 2025-08-07 19:37:00 +02:00
Erhan Kurubas 55c60e1c34 fix(coredump): implement CONFIG_ESP_COREDUMP_MAX_TASKS_NUM limitation
Closes https://github.com/espressif/esp-idf/issues/14407
2025-08-07 17:17:01 +03:00
Erhan Kurubas 50ab1bff4b fix(coredump): do not build sources when coredump is not enabled 2025-08-07 17:13:44 +03:00
Erhan Kurubas 51f8f625ec fix(coredump): rename uart test config file 2025-08-07 17:13:44 +03:00
zhanghaipeng 8ec5410236 fix(bt): Update esp32 libbtdm_app.a (f1dc7d8)
- Improve ESP32 stability and security
2025-08-07 21:19:06 +08:00
Sudeep Mohanty fe2ee39a99 feat(esp_ringbuf): Place Ring buffer in flash by default
The following updates have been made in this commit:
- The commit places ring buffer code in flash memory by default.
- CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH has been removed.
- CONFIG_RINGBUF_IN_IRAM is added and can be used to restore the
  previous memory placement.
2025-08-07 19:56:30 +08:00
Sudeep Mohanty 26c19928a9 feat(freertos): Place FreeRTOS in flash by default
The following updates have been made in this commit:
- The commit places FreeRTOS code in flash memory by default.
- CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH has been removed.
- CONFIG_FREERTOS_IN_IRAM is unhidden and can be used to restore the
  previous memory placement.
- A test has been added for users to conduct performance impact testing
  based on memory placement configurations.
2025-08-07 19:56:30 +08:00
Zhou Xiao 2818eb91f1 change(ble): enabled specify scan channel vs hci cmd for ESP32-C2 2025-08-07 17:58:39 +08:00
Song Ruo Jing 8651d6c240 Merge branch 'feature/uart_dtr_dsr_support' into 'master'
feat(uart): add DTR and DSR signals support for UART

Closes IDF-13392, IDFGH-4377, and IDFGH-15328

See merge request espressif/esp-idf!40508
2025-08-07 17:28:28 +08:00
Song Ruo Jing 2319386d9d Merge branch 'bugfix/gpio_esp32_workaround' into 'master'
fix(gpio): fix ESP32 GPIO sleep mode handling

Closes IDF-13626

See merge request espressif/esp-idf!40988
2025-08-07 17:14:58 +08:00
Armando (Dou Yiwen) cde7e3af50 Merge branch 'fix/fix_dvp_dma_desc_type_on_s3' into 'master'
camera: fixed dvp dma desc type on s3

See merge request espressif/esp-idf!41082
2025-08-07 07:48:50 +00:00
Omar Chebib 63cf7c06d3 test(freertos): add a test case for the DSP coprocessor 2025-08-07 14:40:30 +08:00
Omar Chebib 03f4744497 feat(riscv): add support for the DSP coprocessor 2025-08-07 14:40:30 +08:00
armando b4a482eae1 fix(cam): fixed dvp dma desc type on s3" 2025-08-07 14:11:20 +08:00
Aditya Patwardhan 4a69fcbdfd Merge branch 'fix/regression_issue_in_digest_auth' into 'master'
fix(esp_http_client): fixed regression issue during enabling digest auth in client

Closes IDFGH-16189

See merge request espressif/esp-idf!41069
2025-08-07 10:53:39 +05:30
C.S.M 6183a566e6 Merge branch 'test/add_i3c_multi_test' into 'master'
test(i3c_master): Add multi test for i3c master, adding i3c slave ll support.

Closes IDFCI-3058

See merge request espressif/esp-idf!41049
2025-08-07 13:19:28 +08:00
Darian Leung 5454499877 refactor: Use enum values for gpio pull up/down fields
Ensure that enum values are used When assigning `pull_up_en` and `pull_down_en`
fields of `gpio_config_t`. Helps avoid `invalid conversion` errors when
building those code snippets in C++.
2025-08-07 11:45:11 +08:00
Chen Jichang 579a744fb3 fix(rmt): fix the state of the simple encoder with mem full
Closes https://github.com/espressif/esp-idf/issues/17244
2025-08-07 11:16:43 +08:00
Jiang Jiang Jian dd73346503 Merge branch 'feat/support_11ax_rate_for_cert_test' into 'master'
Feat/support 11ax rate for cert test

Closes FCS-1715

See merge request espressif/esp-idf!40950
2025-08-07 10:05:36 +08:00
zwl 7f7c8e2c85 change(ble): [AUTO_MR] updated rom linker script for ESP32-C2 2025-08-06 21:05:01 +08:00
zwl 043143ab8b change(ble): [AUTO_MR] Update lib_esp32c2 to dbd33ef2 2025-08-06 21:04:50 +08:00
zwl fe22519bb5 change(ble): [AUTO_MR] Update lib_esp32c6 to 898f73cb 2025-08-06 21:04:50 +08:00
zwl 3abfca1e2c change(ble): [AUTO_MR] Update lib_esp32c5 to 898f73cb 2025-08-06 21:04:50 +08:00
zwl 4990dfdd23 change(ble): [AUTO_MR] Update lib_esp32h2 to 898f73cb 2025-08-06 21:04:50 +08:00
Kevin (Lao Kaiyao) a19ad8df86 Merge branch 'bugfix/fix_multi_pdm_rx_slot_clock_issue' into 'master'
fix(i2s_pdm): fixed pdm multi slot clock issue

Closes IDFGH-16117

See merge request espressif/esp-idf!40855
2025-08-06 19:23:55 +08:00
liuning b9688b97ec fix(wifi): fix some esp-now issues and lightsleep issues
1. fix tbtt issues when wifi_slp_iram_opt is not enabled and light sleep
   enabled
2. support espnow rx all the time at coexistence default mode, fix some
   coexist perfermance issue with coexistence default mode.
3. support connectionless ps with enhanced_light_sleep
4. fix espnow coexist issue when switching to coexistence mode
5. fix concurrent issue of connectionless_interval_set API
2025-08-06 19:17:58 +08:00
Jiang Jiang Jian e6dfb60309 Merge branch 'change/remove_assert_in_esp_sleep_pd_config' into 'master'
change(esp_hw_support): warning in esp_sleep_pd_config instead of assert

Closes IDFGH-15936

See merge request espressif/esp-idf!40608
2025-08-06 19:15:56 +08:00
Guillaume Souchere 5ee5280195 fix(esp_vfs_console): Update placement of cdcacm_xx_cb when ETS print enabled 2025-08-06 12:13:24 +02:00
nilesh.kale ce4a901460 fix(esp_http_client): fixed regression issue during enabling digest auth in client
This commit solved the issue introduced in commit a0bcffcce9
for enabling digest auth for esp_http_client.

Closes https://github.com/espressif/esp-idf/issues/17238
2025-08-06 15:38:25 +05:30
C.S.M 818579b78d test(i3c_master): Add multi test for i3c master 2025-08-06 18:04:29 +08:00
C.S.M cc9aebf0ae feat(i3c_slave): Add hal support for i3c slave 2025-08-06 18:04:29 +08:00
morris 949296e4bd Merge branch 'refactor/i2c_driver_use_gpio_num_t' into 'master'
refactor(i2c): use gpio_num_t to declare GPIO number

See merge request espressif/esp-idf!41061
2025-08-06 18:04:19 +08:00
Konstantin Kondrashov d9241bf545 Merge branch 'fix/ulp_riscv_delay_cycles' into 'master'
fix(ulp_riscv): Fix ulp_riscv_delay_cycles() to handle small delays correctly

Closes IDFGH-15960

See merge request espressif/esp-idf!40708
2025-08-06 18:01:05 +08:00
Marius Vikhammer 43667179f4 ci(system): enabled and cleanup misc system test-apps build-test-rules 2025-08-06 17:50:50 +08:00
muhaidong ccb4e418e8 feat(docs): remove wifi related docs from docs_not_updated for esp32h21 2025-08-06 17:34:43 +08:00
morris 5053084a9e Merge branch 'fix/i2c-master-write-buffer-const' into 'master'
fix(i2c): make write_buffer const in i2c_master_transmit_multi_buffer_info_t

Closes IDFGH-15959

See merge request espressif/esp-idf!40773
2025-08-06 17:22:14 +08:00
Wan Lei fe3c676d13 Merge branch 'feature/h4_spi_support' into 'master'
feat(driver_spi): support esp32h4 spi driver

Closes IDF-12362, IDF-12364, IDF-12366, and IDF-11521

See merge request espressif/esp-idf!40862
2025-08-06 16:26:34 +08:00
Konstantin Kondrashov cd5b581425 fix(ulp_riscv): Fix a delay function to handle small delays correctly
Fixed ulp_riscv_delay_cycles function

Closes https://github.com/espressif/esp-idf/issues/16891
2025-08-06 15:57:03 +08:00
Kevin (Lao Kaiyao) d622116355 Merge branch 'bugfix/fix_touch_isr_safe_issue' into 'master'
fix(legacy_touch): fixed touch read API can't be called in ISR context

Closes IDFGH-16104

See merge request espressif/esp-idf!41021
2025-08-06 15:36:59 +08:00
morris db9bee20b6 refactor(i2c): use gpio_num_t to declare GPIO number 2025-08-06 15:26:09 +08:00
Shen Mengjing dfd3ccf5fd docs: Update the CN translation for mbedtls.rst 2025-08-06 11:32:14 +08:00
laokaiyao b5fd5da6e8 fix(legacy_touch): fixed touch read API can't be called in ISR context
Closes https://github.com/espressif/esp-idf/issues/17045
2025-08-06 11:07:07 +08:00
Chen Ji Chang 6e0dd0581c Merge branch 'fix/fix_psram_incr16' into 'master'
fix(dma): add burst size check when dma access psram

See merge request espressif/esp-idf!40991
2025-08-06 11:02:25 +08:00
wuzhenghui 9a4abbdd3a fix(hal): fix esp32c5 mac link bad trigger 2025-08-06 10:51:30 +08:00
morris 6ea0fa1a57 Merge branch 'refactor/remove_lcd_deprecated' into 'master'
esp_lcd clean up

Closes IDF-13711, IDF-13712, IDF-13713, IDF-13714, and IDF-13715

See merge request espressif/esp-idf!40848
2025-08-06 10:41:20 +08:00
Xiao Xufeng 208fad5616 fix(i2c): make write_buffer const in i2c_master_transmit_multi_buffer_info_t
Fixes https://github.com/espressif/esp-idf/issues/16890
2025-08-06 10:38:48 +08:00
Harshal Patil eae2f70381 Merge branch 'change/remove_esp_security_dependency_from_esp_hw_support' into 'master'
Move security-related modules present in esp_hw_support component to esp_security

Closes IDF-10733

See merge request espressif/esp-idf!39490
2025-08-06 06:27:12 +05:30
Song Ruo Jing 9a2984b4c0 fix(gpio): fix ESP32 GPIO sleep mode handling
The previous workaround does not work, the backup/restore should apply to RTC IO registers.
Also moved the workaround to sleep_gpio.c to avoid gpio hal using kconfig.
2025-08-05 21:02:09 +08:00
Alexey Lapshin 44aeff1319 Merge branch 'feature/libc_init_array-from-toolchain' into 'master'
fix(esp_system): fix .init_array.*/.ctors.* ordering

Closes IDF-1176 and DOC-11527

See merge request espressif/esp-idf!39811
2025-08-05 16:09:00 +04:00
nilesh.kale 2db4bcf87d feat(esp_http_client): move partial download related code under config
This MR added an menuconfig option to enable partial download feature.
2025-08-05 17:38:10 +05:30
Hrushikesh Bhosale 5c15e41d9a Merge branch 'fix/update_postman_root_certificate' into 'master'
Updated postman root certificate

Closes IDF-13779

See merge request espressif/esp-idf!41022
2025-08-05 18:48:10 +08:00
Song Ruo Jing c6dad68e81 refactor(uart): remove UART_FIFO_LEN macro for v6.0 2025-08-05 17:08:32 +08:00
Astha Verma 7f7aedbae5 fix(nimble): Handle count correctly by considering offset. 2025-08-05 14:25:51 +05:30
Song Ruo Jing 6bfdc93593 feat(uart): add DTR and DSR signals support for UART 2025-08-05 16:45:46 +08:00
Astha Verma 6a2d105bf0 fix(nimble): Updating the count parameter when fetching the gatt db 2025-08-05 14:14:53 +05:30
hrushikesh.bhosale 4dd10c458c fix(esp_http_client): Moved httpd_async request from cert_pem to crt_bundle
Moved the httpd_async request from cert_pem to esp_crt_bundle. As cert_pem
is alredy tested for howmyssl URL
2025-08-05 14:06:44 +05:30
morris b8a5ebfa01 refactor(i2c): clean up i2c driver header file
remove unnecessary dependencies
2025-08-05 15:11:07 +08:00
morris 8a3aef7542 refactor(lcd): simplify the spi_lcd_touch example 2025-08-05 15:09:40 +08:00
morris b4e39631d3 refactor(i2c_lcd): test app in cxx environment 2025-08-05 15:09:40 +08:00
morris 414dba5009 refactor(lcd)!: remove deprecated types 2025-08-05 15:09:40 +08:00
wanckl 37c6608ab3 feat(driver_spi): support esp32h4 spi driver 2025-08-05 15:08:02 +08:00
laokaiyao c415c060bd feat(i2s): add PLL240M clock source on S3 and C6
Closes https://github.com/espressif/esp-idf/issues/17056
2025-08-05 15:01:04 +08:00
laokaiyao f7439317f0 fix(i2s_pdm): fixed pdm multi slot clock issue
Fixed the sample rate slow down issue when using more than 4 slots in  pdm rx mode.
2025-08-05 15:01:04 +08:00
Sudeep Mohanty 471a659e84 remove(freertos): Removed freertos_compatibility.c
The freertos_compatibility.c file has been removed and appropriate
guidelines have been added to hints.yml and the migration guide to use
alternatives for the backward compatibility functions that have been
removed.
2025-08-05 08:41:47 +02:00
JinCheng 54f1f22e69 fix(esp_phy): update esp32 librtc.a for coex problems
- ESP32 phy_version: 4861, b71b5ad, Aug, 5 2025
- ESP32 librtc version: 6758f983, Mar 22 2024, 13:39:26
2025-08-05 12:08:57 +08:00
morris 8b41a42372 refactor(lcd)!: use gpio_num_t to define gpio numbers used by LCD driver 2025-08-05 11:51:09 +08:00
Chen Jichang 4957e09e5e fix(dma): add burst size check when dma access psram 2025-08-05 11:36:24 +08:00
Armando (Dou Yiwen) 72cb973022 Merge branch 'feat/cache_panic_h4' into 'master'
cache: panic support on h4

Closes IDF-12288

See merge request espressif/esp-idf!41023
2025-08-05 03:23:56 +00:00
morris 4173af5620 Merge branch 'bugfix/fix_es7210_example_dependency_breaking_change' into 'master'
fix(i2s_es7210): fixed breaking change of dependency migration

See merge request espressif/esp-idf!41041
2025-08-05 11:20:16 +08:00
Armando (Dou Yiwen) ebab455d4d Merge branch 'feat/p4_eco5_soc_part4' into 'master'
feat(soc): p4 hw ver2 registers (part 4, final)

Closes IDF-13573

See merge request espressif/esp-idf!40887
2025-08-05 03:07:11 +00:00
laokaiyao 55482616f7 fix(i2s_es7210): fixed breaking change of dependency migration 2025-08-05 10:59:07 +08:00
Jiang Jiang Jian 07db7c3ca5 Merge branch 'bugfix/fix_scan_done_event_miss_issue' into 'master'
fix(wifi): fix scan done event miss issue

Closes WIFI-6965

See merge request espressif/esp-idf!40983
2025-08-05 10:05:24 +08:00
Marius Vikhammer d8f40df79c ci(system): enable usb-serial-jtag console tests for p4 and c5 2025-08-05 09:56:38 +08:00
Ashish Sharma 414397c048 fix(esp_http_client): fix possible double memory free 2025-08-05 09:48:22 +08:00
Song Ruo Jing df5bff7a07 Merge branch 'contrib/github_pr_17047' into 'master'
change(esp32): Calling gpio_reset_pin on an input only pin should not produce an error message. (GitHub PR)

Closes IDFGH-16106

See merge request espressif/esp-idf!40975
2025-08-04 21:27:48 +08:00
Roland Dobai 138336b9c6 Merge branch 'feat/deprecate-py39' into 'master'
Tools: Deprecate Python 3.9

Closes IDF-7996

See merge request espressif/esp-idf!40851
2025-08-04 15:13:55 +02:00
muhaidong a349edaf76 fix(wifi): fix scan done event miss issue 2025-08-04 21:04:29 +08:00
Samuel Obuch b59bc28553 Merge branch 'feat/esp32c5_lp_debug_example' into 'master'
feat(ulp): esp32c5 and esp32p4 support in debugging example

See merge request espressif/esp-idf!39471
2025-08-04 17:43:00 +08:00
armando e179056b7c fix(rtc): fixed rtc_clk.c not in iram issue 2025-08-04 17:03:34 +08:00
armando 7a1e5f540e feat(cache): supported cache panic driver on h4 2025-08-04 17:03:34 +08:00
armando 2a586022c4 fix(system): fixed wrong CPU_LOCKUP reset reason value 2025-08-04 17:03:34 +08:00
zwx 6b9e4405a6 feat(openthread): add option to dump 802.15.4 MAC debug info on assert 2025-08-04 06:31:42 +00:00
harshal.patil 60ff4bca9b refactor(esp_system): Update all references of the memory protection configs 2025-08-04 11:43:01 +05:30
harshal.patil abaef73667 refactor(esp_system): Place all memory protection options under one option 2025-08-04 11:43:01 +05:30
harshal.patil 5c6c73ece4 change(riscv): Remove redundant definition of MEMPROT_ISR 2025-08-04 11:43:01 +05:30
harshal.patil d70b5000cc remove(esp_hw_support): Remove redundant and unsupported memprot mentions 2025-08-04 11:43:01 +05:30
harshal.patil 55e0730a8d change(esp_hw_support): Move security-related modules to the esp_security component
- Also adds support to whitelist target specific expected dependency violations
in check_dependencies.py
2025-08-04 11:43:01 +05:30
Olivér Remény 9317ecb4ea fix(gpio): Avoid error message when calling reset on an input only pin.
The `gpio_reset_pin` function attempted to enable internal pullup on pins which does not have one. This change adds a guard to `gpio_reset_pin` for calling `gpio_pullup_en` - the same guard that makes `gpio_pullup_en` print the error.
2025-08-04 12:16:31 +08:00
Zhang Shuxian 1d1bba2164 docs: Update cn translation for build-system.rst 2025-08-04 11:33:44 +08:00
Alexey Lapshin 019dc93ae0 feat(esp_system): switch to standard __libc_init_array initialization
Initially, ESP-IDF used the do_global_ctors() function to run global
constructors. This was done to accommodate Xtensa targets that emit
.ctors.* sections, which are ordered in descending order.

For RISC-V, compilation used .init_array.* sections, which are designed
to have ascending order. Priority constructors in .init_array.* sections
were correctly processed in ascending order. However, non-priority
.init_array section was processed in descending order, as it was done
for Xtensa .ctors.

Starting with ESP-IDF v6.0, the implementation switched to the standard
LibC behavior (__libc_init_array()), which processes both priority and
non-priority constructors in ascending order.

To achieve this, a breaking changes were introduced:
  - Xtensa .ctors.* priority entries converted to .init_array.* format
    (ascending), to be passed to __libc_init_array().
  - Processing order of non-priority .init_array and .ctors sections was
    changed from descending to ascending.

Also, this change introduces .preinit_array for linking. This may be
needed for some C++ or sanitizer features.

Related to https://github.com/espressif/esp-idf/issues/15529
2025-08-04 11:33:44 +08:00
armando 9956a6230e feat(soc): p4 hw ver2 registers 2025-08-04 02:14:10 +00:00
muhaidong f1d55e162d feat(phy): update 11ax rate for cert test 2025-08-03 17:07:28 +08:00
muhaidong 8a425253d1 feat(phy): add 11ax rate for cert test 2025-08-03 17:07:28 +08:00
Gao Xu 819970f439 Merge branch 'fix/correct_adc_periph_num_on_c2' into 'master'
fix(adc): fix ESP32-C2/P4 wrong adc periph num

See merge request espressif/esp-idf!40542
2025-08-03 14:45:23 +08:00
Jiang Jiang Jian 397c273ec0 Merge branch 'feat/chip_esp32c61_update_libphy' into 'master'
feat(phy): update libphy for esp32c61/esp32c5/esp32h2

See merge request espressif/esp-idf!40907
2025-08-02 01:29:55 +08:00
Jiang Jiang Jian 47c0e262e0 Merge branch 'bugfix/fix_bt_hci_not_effective' into 'master'
Fixed bt hci event was not report to host when hci command was sent(master)

Closes BTQABR2023-538 and BTQABR2023-548

See merge request espressif/esp-idf!40992
2025-08-02 00:56:07 +08:00
Jiang Jiang Jian 97c4eed16a Merge branch 'bugfix/fixed_ble_dtm_err' into 'master'
Bugfix/fixed ble dtm err

Closes BLERP-2129

See merge request espressif/esp-idf!40935
2025-08-01 22:48:56 +08:00
wuzhenghui 9f53ff77a1 change(example): adds USB-Serial-JTAG console usage notes to sleep examples
Closes https://github.com/espressif/esp-idf/issues/16129
2025-08-01 20:28:09 +08:00
yinqingzhao 5eea5464c4 feat(phy): update libphy for esp32c61/esp32c5/esp32h2 2025-08-01 20:12:54 +08:00
zhanghaipeng 155c32be20 fix(bt/ble): Update esp32 libbtdm_app.a (722c907a)
- Fixed bt hci event was not report to host when hci command was sent
2025-08-01 19:21:28 +08:00
Shen Mengjing a091b84298 docs: Edit the CN translation 2025-08-01 16:40:35 +08:00
Marius Vikhammer 978f2e9720 Merge branch 'bugfix/test_utils_comp_missing' into 'master'
test(system): fixed missing test_utils component dependency

See merge request espressif/esp-idf!40969
2025-08-01 16:17:18 +08:00
Chen Ji Chang ee779a0b72 Merge branch 'feat/support_twai_on_h21' into 'master'
feat(twai): support twai on esp32h21

Closes IDF-11574 and IDF-11575

See merge request espressif/esp-idf!40888
2025-08-01 15:35:35 +08:00
Shen Mengjing cbd1ede64c docs: Update CN translation for linux-macos-setup.rst 2025-08-01 14:39:42 +08:00
Peter Dragun 300ff9fc78 change: fix linting errors in python files 2025-08-01 08:05:13 +02:00
Peter Dragun 519042a1e2 feat: Deprecate Python 3.9
BREAKING CHANGE:
- Minimal supported Python version is now 3.10.
2025-08-01 08:05:10 +02:00
Jiang Jiang Jian 84b4605ffa Merge branch 'fix/wpsreg_crash_due_to_double_reset' into 'master'
fix(wifi): Fix crash in WPS-registrar due to nested 'eap_wsc_reset()' calls

Closes WIFIBUG-1342

See merge request espressif/esp-idf!40751
2025-08-01 13:55:17 +08:00
Marius Vikhammer 73bd521d7a test(system): fixed missing test_utils component dependency 2025-08-01 13:40:47 +08:00
C.S.M 142a8301e8 Merge branch 'fix/make_bootloader_flash_size_correct' into 'master'
fix(bootloader_flash): Make bootloader flash size accurate

See merge request espressif/esp-idf!40847
2025-08-01 12:02:42 +08:00
Armando (Dou Yiwen) 1b22d58779 Merge branch 'feat/h4_mmu' into 'master'
mmu: h4 support

Closes IDF-12305

See merge request espressif/esp-idf!40565
2025-08-01 03:58:33 +00:00
Marius Vikhammer 4065fb20f3 Merge branch 'feature/esp_test_utils_component' into 'master'
change(test_utils): moved test_utils out of unit-test-app project

See merge request espressif/esp-idf!40678
2025-08-01 11:04:37 +08:00
Jiang Jiang Jian 1c08475950 Merge branch 'bugfix/classic_bt-safe-string-handling' into 'master'
Bugfix/classic bt safe string handling

Closes IDFGH-16085

See merge request espressif/esp-idf!40868
2025-08-01 10:39:52 +08:00
Jiang Jiang Jian 2bbf9b6160 Merge branch 'fix/chip_esp32c5_eco2_supp' into 'master'
Get operating class in dual band

Closes IDF-10613

See merge request espressif/esp-idf!38892
2025-08-01 10:27:34 +08:00
Sarvesh Bodakhe 8631f5dafd fix(wifi): prevent crash in WPS-registrar due to nested 'eap_wsc_reset()' calls
When a WPS handshake is already in progress and the enrollee sends another EAPOL-Start
(e.g., due to missed packets or timeout), the registrar resets its state by calling
'eap_wsc_reset()'. This function frees 'sm->eap_method_priv' and then calls
'esp_wifi_ap_wps_disable()', which internally triggers another call to 'eap_wsc_reset()'.

This results in a double reset where the second invocation accesses the already freed
'sm->eap_method_priv', leading to a crash.

This fix sets 'sm->eap_method_priv' to NULL immediately after freeing it to ensure
any subsequent calls to eap_wsc_reset() do not access an invalid pointer.
2025-08-01 10:27:08 +08:00
Marius Vikhammer 96512006c0 Merge branch 'ci/core_tests_use_caps' into 'master'
ci(system): update system pytest apps to use SOC_CAPs

See merge request espressif/esp-idf!40865
2025-08-01 10:25:16 +08:00
JinCheng 720108b220 fix(bt/bluedroid): safe string returns and cleanups for bt_discovery example 2025-08-01 09:40:21 +08:00
Nikheel Savant 90782249c7 fix(bt/bluedroid): safe string returns and cleanups 2025-08-01 09:40:21 +08:00
Alex Lisitsyn be5e48bf83 Merge branch 'feature/modbus_remove_examples' into 'master'
remove(modbus): remove modbus examples in IDF v6.0

Closes IDF-13491

See merge request espressif/esp-idf!40477
2025-07-31 14:44:33 +01:00
tarun.kumar 5a5b20f44d fix(wifi): Get operating class in dual band 2025-07-31 21:01:59 +08:00
Mahavir Jain 8096a2a295 Merge branch 'feat/mbedtls_no_buffer_alloc_on_session_reset' into 'master'
feat(mbedtls): disable unnecessary buffer allocation in dynamic buffer session reset

See merge request espressif/esp-idf!40126
2025-07-31 17:53:50 +05:30
Song Ruo Jing e94d9cee7a Merge branch 'refactor/rtc_cal_clk' into 'master'
refactor(clk): add soc_clk_calibration_clk_src_t for all targets

Closes IDF-11790

See merge request espressif/esp-idf!40737
2025-07-31 19:49:17 +08:00
Samuel Obuch 7024babc31 fix(lp_core): dont reset lp cpu with debug attached 2025-07-31 13:48:45 +02:00
Samuel Obuch 1a49af0fb6 feat(ulp): esp32c5 support in debugging example 2025-07-31 13:48:40 +02:00
Fu Hanxi 6bd8b52ad7 Merge branch 'ci/improve-check_build_test_rules-output' into 'master'
ci: improve the output of check_build_test_rules.py

See merge request espressif/esp-idf!40703
2025-07-31 13:42:26 +02:00
Marius Vikhammer 9788d33351 ci(system): update system pytest apps to use SOC_CAPs 2025-07-31 19:05:58 +08:00
Jiang Jiang Jian 1a25df75a6 Merge branch 'fix/c6_phylib_for_modem_state' into 'master'
fix(esp_phy): fix c6 modem state

Closes TZ-1912 and BT-4020

See merge request espressif/esp-idf!40867
2025-07-31 18:15:12 +08:00
aleks 50e724a534 remove(modbus): remove modbus examples in IDF v6.0 2025-07-31 18:10:34 +08:00
Fu Hanxi fdcc1930d2 ci: improve the output of check_build_test_rules.py 2025-07-31 11:52:13 +02:00
Fu Hanxi 1adb3d6bfe ci: update pre-commit image tag to 2 2025-07-31 11:52:13 +02:00
Aditya Patwardhan a783974d00 Merge branch 'feat/support_authentication_feature_for_ws' into 'master'
Added pre handshake callback for websocket

Closes IDF-13605

See merge request espressif/esp-idf!40706
2025-07-31 15:04:07 +05:30
Peter Dragun dba8cb3f76 Merge branch 'feat/ide_requirements' into 'master'
feat(tools/requirements): Add IDE requirements files

See merge request espressif/esp-idf!40348
2025-07-31 17:31:50 +08:00
Jiang Jiang Jian 73e638ecc0 Merge branch 'feat/softap_gcmp_support' into 'master'
fix(wifi): add GCMP_128 cipher support for SoftAP mode

Closes WIFIBUG-558

See merge request espressif/esp-idf!40764
2025-07-31 16:44:22 +08:00
zwl 6f0a61ab0d fix(ble): fixed dtm function error on ESP32-C5 2025-07-31 14:53:29 +08:00
zwl 43c82b3b20 fix(ble): fixed dtm function error on ESP32-H2 2025-07-31 14:52:59 +08:00
zwl ca0fdad4f2 fix(ble): fixed dtm function error on ESP32-C6 2025-07-31 14:17:07 +08:00
hrushikesh.bhosale a40ceffb19 feat(esp_http_server): Added pre handshake callback for websocket
1. If the user wants authenticate the request, then user needs to do
this before upgrading the protocol to websocket.
2. To achieve this, added pre_handshake_callack, which will execute
before handshake, i.e. before switching protocol.
2025-07-31 11:06:18 +05:30
wuzhenghui bf19cddafd change(esp_hw_support): warning in esp_sleep_pd_config instead of assert
Closes https://github.com/espressif/esp-idf/issues/16872#event-18649904083
2025-07-31 11:56:20 +08:00
armando 67ce0580b5 feat(mmu): supported esp_mmu_map and flash_mmap drivers on esp32h4 2025-07-31 03:43:15 +00:00
Gao Xu 9ac4a3400c Merge branch 'refactor/rng_ll_s3' into 'master'
refactor(rng): refactor to use hal/ll apis for S3

Closes IDF-12536

See merge request espressif/esp-idf!39585
2025-07-31 11:41:21 +08:00
Chen Jichang b670fe9b50 feat(twai): support twai on esp32h21 2025-07-31 10:56:45 +08:00
Sarvesh Bodakhe 3cc59d2cd8 fix(wifi): add GCMP-128 cipher support for SoftAP mode
GCMP-256 SoftAP support was previously added as part of SAE Extended Key handling.
2025-07-31 10:40:28 +08:00
Wu Zheng Hui f1df2f3be6 Merge branch 'fix/fix_lightsleep_pd_modem_breaks_common_fe_clock' into 'master'
fix(esp_hw_support): fix lightsleep pd modem breaks common fe clock

Closes FCS-1741

See merge request espressif/esp-idf!40437
2025-07-31 10:33:16 +08:00
Jiang Jiang Jian dafc793707 Merge branch 'bugfix/snd_chan_update' into 'master'
fix(esp_wifi): Fix incorrect values for negotiated bandwidth for 2040 coex cases

Closes WIFIBUG-1199 and WIFIBUG-1201

See merge request espressif/esp-idf!39577
2025-07-31 10:32:30 +08:00
Mo Fei Fei 9fe514f597 Merge branch 'docs/fix_rmt_loop_transmit_desc' into 'master'
docs: fix rmt loop transmit description

Closes DOC-11696

See merge request espressif/esp-idf!40905
2025-07-31 09:55:18 +08:00
Erhan Kurubas 521f3e3911 Merge branch 'coredump_breaking_changes' into 'master'
change(coredump): drop binary format and crc checksum

Closes IDF-9020 and IDFGH-14364

See merge request espressif/esp-idf!40324
2025-07-30 20:34:27 +02:00
Mahavir Jain 4e036983a7 Merge branch 'feat/restructure_mbedtls_configurations' into 'master'
Restructure mbedTLS configurations

Closes IDF-12984 and IDF-12982

See merge request espressif/esp-idf!39941
2025-07-30 20:11:11 +05:30
Mahavir Jain 08d2d5fe76 Merge branch 'bugfix/brownout_log' into 'master'
fix: change brownout log from INFO to ERROR

See merge request espressif/esp-idf!40817
2025-07-30 19:17:31 +05:30
zwx f7c209c70b fix(esp_phy): fix c6 modem state 2025-07-30 20:43:03 +08:00
Mahavir Jain d72bb81702 Merge branch 'refactor/hide_ecdsa_kconfig_option_from_hal' into 'master'
refactor(hal): Move CONFIG options used in ecdsa_hal.c under config.h

Closes IDF-13584

See merge request espressif/esp-idf!40713
2025-07-30 17:36:57 +05:30
Song Ruo Jing 48233e0e7e refactor(ledc): remove deprecated LEDC_USE_RTC8M_CLK macro for v6.0 2025-07-30 20:01:47 +08:00
Song Ruo Jing f61e780f60 refactor(clk): deprecate rtc_cal_sel_t enum 2025-07-30 20:01:46 +08:00
Song Ruo Jing 2b01b7c6f8 refactor(clk): add soc_clk_calibration_clk_src_t for all targets
Cleaned up RTC calibration clock selection code
2025-07-30 20:01:46 +08:00
Song Ruo Jing 07120c1d38 remove(clk): remove RTC_CLK_SRC_INT_RC32K option for C6 (v6.0) 2025-07-30 20:01:46 +08:00
Song Ruo Jing 248c87ac78 Merge branch 'bugfix/release_console_uart_pins' into 'master'
fix(console): release default console UART pins if console is switched in bootloader

Closes IDFGH-15851

See merge request espressif/esp-idf!40578
2025-07-30 19:27:47 +08:00
C.S.M 5611d88e6a Merge branch 'feat/usb_serial_jtag_h21' into 'master'
feat(usb_serial_jtag): Add usb serial jtag support for esp32h21

Closes IDF-11616

See merge request espressif/esp-idf!40873
2025-07-30 18:46:55 +08:00
Ashish Sharma d9c431268a feat(mbedtls): restructure mbedtls configuration page 2025-07-30 17:47:54 +08:00
Ashish Sharma f7be43c83d feat(mbedtls): adds more configuration options 2025-07-30 17:47:54 +08:00
Ashish Sharma 6259505f18 feat(mbedtls): disable unnecessary buffer allocation in dynamic buffer session reset 2025-07-30 17:45:16 +08:00
Shreyas Sheth 02be35610b fix(esp_wifi): Fix incorrect values for negotiated bandwidth for 2040 coex cases 2025-07-30 15:07:23 +05:30
C.S.M 47218f6291 fix(bootloader_flash): Make bootloader flash size accurate 2025-07-30 17:10:59 +08:00
Mahavir Jain 65cf3d0a20 Merge branch 'bugfix/fix_dangerous_realloc_patterns' into 'master'
fix(security): improve memory allocation handling in multiple components

Closes IDF-13612 and IDF-13622

See merge request espressif/esp-idf!40629
2025-07-30 14:40:43 +05:30
C.S.M de58c6d0a3 Merge branch 'feat/support_gd55' into 'master'
feat(spi_flash): Add support for gd55f flash chip

See merge request espressif/esp-idf!40878
2025-07-30 17:05:48 +08:00
Armando (Dou Yiwen) f2742dffdb Merge branch 'feat/c61_psram_timing_tuning' into 'master'
psram: psram timing tuning support on c61

Closes IDF-9256

See merge request espressif/esp-idf!40844
2025-07-30 08:53:47 +00:00
Wu Zheng Hui e8ef305398 Merge branch 'feat/support_c5_c61_clkoutput' into 'master'
feat(esp_hw_support): support clock output feature on esp32c5/esp32c61

Closes IDF-10968 and IDF-10970

See merge request espressif/esp-idf!40801
2025-07-30 16:13:52 +08:00
mofeifei c654f653fd docs: fix rmt loop transmit description 2025-07-30 15:24:02 +08:00
Chen Ji Chang b0f22503b4 Merge branch 'feat/support_rmt_on_h21' into 'master'
feat(rmt): support rmt on esp32h21

Closes IDF-11622 and IDF-11623

See merge request espressif/esp-idf!40859
2025-07-30 12:24:47 +08:00
C.S.M 1c18d65416 feat(spi_flash): Add support for gd55f flash chip 2025-07-30 11:37:21 +08:00
Zhou Xiao 09f54c7f90 Merge branch 'change/ble_update_lib_20250728' into 'master'
change(ble): [AUTO_MR] 20250728 - Update ESP BLE Controller Lib

Closes BLERP-2091, BLERP-2072, BLERP-2105, BLERP-2054, BLERP-1858, BLERP-2094, BLERP-2093, BLERP-2123, BLERP-2111, and BLERP-2110

See merge request espressif/esp-idf!40846
2025-07-30 11:29:04 +08:00
C.S.M ef299a8d4e feat(usb_serial_jtag): Add usb serial jtag support for esp32h21 2025-07-30 11:17:31 +08:00
renpeiying d1df341c5d docs: Update CN translation 2025-07-29 22:31:40 +03:00
Erhan Kurubas a877a070cb change(coredump): return ESP_ERR_NOT_FOUND for blank partition
Closes https://github.com/espressif/esp-idf/issues/15153
2025-07-29 22:31:40 +03:00
Erhan Kurubas fb53d6e719 change(coredump): drop binary format and crc checksum 2025-07-29 22:31:40 +03:00
Song Ruo Jing a4bd638385 refactor(uart): use U0RXD_GPIO_NUM and U0TXD_GPIO_NUM macros when possible 2025-07-29 21:59:49 +08:00
Song Ruo Jing db1b7fc48c fix(ci): add ci test for gpio etm test cases 2025-07-29 21:59:20 +08:00
Song Ruo Jing 0787da6eea fix(console): release default console UART pins if console is switched in bootloader
Also print out console UART pin number in app cpu_startup stage

Closes https://github.com/espressif/esp-idf/issues/16764
2025-07-29 21:59:10 +08:00
chenjianhua ea8bcdc360 feat(bt/blufi): Support Blufi start advertising with specified name 2025-07-29 21:04:39 +08:00
Jiang Jiang Jian ee064300cd Merge branch 'bugfix/fix_esptouch_v2_fail_on_5g_router' into 'master'
fix(wifi/esptouch): fixed the esptouch v2 fail on 5g router

See merge request espressif/esp-idf!40744
2025-07-29 19:05:21 +08:00
Rahul Tank 72a678da84 Merge branch 'bugfix/minor_update_readme' into 'master'
fix(nimble): Documentation update in btsnoop script README

See merge request espressif/esp-idf!40857
2025-07-29 16:15:58 +05:30
wuzhenghui 5747c1784b change(esp_hw_support): always do hardware clock enable in modem module enabling 2025-07-29 17:02:12 +08:00
wuzhenghui feffdee63b fix(esp_hw_support): fix MODEM_ADC_COMMON_FE destroyed by modem powerdown lightsleep 2025-07-29 17:02:11 +08:00
C.S.M 69224e4f43 Merge branch 'feat/usb_serial_jtag_h4' into 'master'
feat(usb_serial_jtag): Add usb serial jtag support for esp32h4

Closes IDF-12396

See merge request espressif/esp-idf!40736
2025-07-29 16:38:30 +08:00
C.S.M 0313af10a5 Merge branch 'refactor/flash_hal_no_config' into 'master'
refactor(spi_flash): Remove sdkconfig dependency in flash hal layer

Closes IDF-13625

See merge request espressif/esp-idf!40858
2025-07-29 16:34:46 +08:00
Island a3146c7b5c Merge branch 'opt/opt_ble_hid_example_pair_fail' into 'master'
fix(ble/bluedroid): set sec_conn only on successful pairing in ble_hid_device_demo

Closes BLERP-2115

See merge request espressif/esp-idf!40733
2025-07-29 16:16:37 +08:00
Armando (Dou Yiwen) 008b232947 Merge branch 'feat/p4_eco5_soc_part3' into 'master'
p4: eco5 soc registers (part3)

See merge request espressif/esp-idf!40776
2025-07-29 06:45:24 +00:00
Gao Xu 37ba98d29f Merge branch 'fix/fix_dvp_loss_isr' into 'master'
Cam: fixed dvp lose frame issue

See merge request espressif/esp-idf!40679
2025-07-29 14:45:22 +08:00
Island f5e3dc4bb2 Merge branch 'fix/ble_mesh_micellaneous_fix' into 'master'
Fix/ble mesh micellaneous fix

Closes BLERP-2023 and BLERP-2024

See merge request espressif/esp-idf!40078
2025-07-29 14:29:53 +08:00
armando 0189be39a0 feat(psram): psram 80M timing tuning on c61 2025-07-29 14:12:07 +08:00
Armando (Dou Yiwen) b32c31e500 Merge branch 'feat/c5_flash_timing_tuning' into 'master'
flash: flash timing tuning support on c5

Closes IDF-8649

See merge request espressif/esp-idf!40763
2025-07-29 06:09:22 +00:00
Rahul Tank aa1c21fa44 Merge branch 'bugfix/fix_compilation_issue' into 'master'
fix(nimble): Fixed compilation issue with BLE_GATTS flag

See merge request espressif/esp-idf!40725
2025-07-29 11:26:15 +05:30
Chen Jichang bbb78fedbb feat(rmt): support rmt on esp32h21 2025-07-29 10:46:20 +08:00
zhangyanjiao 7c8e8bd72a fix(wifi/esptouch): fixed the esptouch v2 fail on 5g router 2025-07-29 10:27:03 +08:00
gaoxu 9a57629e73 refactor(rng): refactor to use hal/ll apis for S3 2025-07-29 09:52:54 +08:00
armando 65db12cfa6 feat(flash): flash 80M timing tuning on c5 2025-07-29 00:48:58 +00:00
armando 23007ee307 feat(soc): p4 hw ver2 registers 2025-07-29 00:48:46 +00:00
Song Ruo Jing 2fbd8779d6 Merge branch 'feature/esp32h4_rtcio_support' into 'master'
feat(lp_io): Add LP_IO support for ESP32H4

Closes IDF-12393

See merge request espressif/esp-idf!40599
2025-07-28 19:58:05 +08:00
Rahul Tank 1aa93c5522 fix(nimble): Minor documentation update in btsnoop script usage 2025-07-28 16:12:44 +05:30
C.S.M 6ad49c1146 refactor(spi_flash): Remove sdkconfig dependency in flash hal layer 2025-07-28 18:16:19 +08:00
Roland Dobai 757d3432da Merge branch 'change/rename-kconfiglib-module' into 'master'
change: use esp_kconfiglib and esp_menuconfig in ESP-IDF

See merge request espressif/esp-idf!40147
2025-07-28 12:07:25 +02:00
Armando (Dou Yiwen) 9e2d857c9a Merge branch 'feat/h4_psram' into 'master'
psram: h4 support

Closes IDF-12351 and IDF-12350

See merge request espressif/esp-idf!40484
2025-07-28 09:39:41 +00:00
zhanghaipeng 50fe55ca59 fix(ble/bluedroid): set sec_conn only on successful pairing in ble_hid_device_demo 2025-07-28 15:49:59 +08:00
Fu Hanxi 93655332e8 Merge branch 'ci/fix-non-test-related-apps-only' into 'master'
CI: fix non test related apps only

See merge request espressif/esp-idf!40804
2025-07-28 09:47:59 +02:00
C.S.M df8a9d26c2 feat(usb_serial_jtag): Add usb serial jtag support for esp32h4 2025-07-28 15:12:38 +08:00
Zhou Xiao f99389e00d feat(ble): ble log spi out dev phase 5
* supported ts sync for light sleep
* removed controller event queue dependency
* supported get lc ts for ESP32-C3/S3
* optimized ble log spi out code size
2025-07-28 14:11:26 +08:00
zwl 312de57214 feat(ble): add flash only param config api on ESP32-C5 2025-07-28 14:11:22 +08:00
zwl 4c8258ca38 feat(ble): add flash only param config api on ESP32-H2 2025-07-28 14:11:16 +08:00
zwl dc65875e57 feat(ble): add flash only param config api on ESP32-C6 2025-07-28 14:11:10 +08:00
Zhou Xiao ac6acf3629 change(ble): [AUTO_MR] updated rom linker script for ESP32-C2 2025-07-28 14:09:21 +08:00
Zhou Xiao 0a7660d0f3 change(ble): [AUTO_MR] Update lib_esp32c2 to 4556045f 2025-07-28 14:09:18 +08:00
Zhou Xiao f2741f1932 change(ble): [AUTO_MR] Update lib_esp32c6 to 499c41fb 2025-07-28 14:09:18 +08:00
Zhou Xiao 7b921c71b3 change(ble): [AUTO_MR] Update lib_esp32c5 to 499c41fb 2025-07-28 14:09:17 +08:00
Zhou Xiao ee48ef2167 change(ble): [AUTO_MR] Update lib_esp32h2 to 499c41fb 2025-07-28 14:09:17 +08:00
Rahul Tank b9659277c9 fix(nimble): Added code under correct flags to fix compilation warnings 2025-07-28 10:20:02 +05:30
Song Ruo Jing 6b0eb7fcb3 fix(lp_io): w1ts/w1tc register access performance is improved
by avoiding "read-modify-write" operation. The registers designed to be
write only.
2025-07-28 11:17:32 +08:00
Song Ruo Jing 63050580f5 feat(lp_io): Add LP_IO support for ESP32H4 2025-07-28 11:17:32 +08:00
armando 9be8dccef5 feat(psram): psram support on h4 2025-07-28 10:16:48 +08:00
Ashish Sharma 6b02906822 fix(security): improve memory allocation handling in multiple components 2025-07-28 10:05:50 +08:00
gaoxu 5c96c978c9 fix(dvp): fix dvp loss frame error 2025-07-26 17:43:46 +08:00
Mahavir Jain 8886097fe4 Merge branch 'patch/ets_delay_us' into 'master'
fix(esp_tee): Patch the `esp_rom_delay_us` API to use U-mode cycle CSR

See merge request espressif/esp-idf!40105
2025-07-25 19:02:59 +05:30
morris f071b5462e Merge branch 'bugfix/remove_lcd_signals_on_delete' into 'master'
fix(lcd): reserve the GPIOs used by RGB LCD and disconnect the LCD signals when the dirver is uninstalled.

Closes AUD-6545

See merge request espressif/esp-idf!40734
2025-07-25 21:07:54 +08:00
Island a8d3b4808b Merge branch 'bugfix/fix_find_the_oldest_device' into 'master'
Bugfix/fix find the oldest device

Closes BCI-542

See merge request espressif/esp-idf!40464
2025-07-25 19:50:33 +08:00
Chen Ji Chang cfca52255e Merge branch 'feat/support_rmt_on_h4' into 'master'
feat(rmt): support rmt on ESP32-H4

Closes IDF-12402

See merge request espressif/esp-idf!40523
2025-07-25 19:41:24 +08:00
Rahul Tank d1ea45202e Merge branch 'fix/clear_gatt_svc_len' into 'master'
fix(nimble): Clear GATT service entries counter upon GATT deinit

Closes BLERP-2063

See merge request espressif/esp-idf!40351
2025-07-25 16:32:34 +05:30
Jakub Kocka ba08899b90 Merge branch 'delete/virtualenv' into 'master'
remove(tools): Dropping of virtualenv support

Closes IDF-10945

See merge request espressif/esp-idf!40650
2025-07-25 17:53:02 +08:00
Jiang Jiang Jian f356e36f5e Merge branch 'bugfix/offchan_fixes' into 'master'
fix(wifi): Fix issues discovered by customer for offchannel

See merge request espressif/esp-idf!40613
2025-07-25 17:36:30 +08:00
Shu Chen aca957cfaf Merge branch 'fix_ot_src_addr_select' into 'master'
Fix ot src addr select

See merge request espressif/esp-idf!40768
2025-07-25 09:15:59 +00:00
Wei Yu Han 5181747949 Merge branch 'docs/added_release_5.5_readme' into 'master'
Updated ESP-IDF SoC Compatibility for v5.5

See merge request espressif/esp-idf!40680
2025-07-25 16:36:37 +08:00
Mahavir Jain 3886400466 fix: change brownout log from INFO to ERROR 2025-07-25 12:43:41 +05:30
zwx bf12839e08 fix(openthread): use OpenThread API in lwIP source address selection hook 2025-07-25 06:53:53 +00:00
zwx 77660c2dde fix(openthread): fix the preference of the ip6 address set to lwip 2025-07-25 06:53:53 +00:00
Jakub Kocka fb4612778d remove(tools): Dropping of virtualenv support 2025-07-25 14:42:52 +08:00
Shreyas Sheth 6a1f6e2add fix(wifi): Fix issues discovered by customer for offchannel 2025-07-25 14:18:44 +08:00
wuzhenghui bf3c79068d feat(esp_hw_support): support clock output feature on esp32c5/esp32c61 2025-07-25 14:18:04 +08:00
Mahavir Jain 004da6773c Merge branch 'ci/tee_intr_test_app' into 'master'
ci(hal): Extend the PMS hal test-app for verifying TEE-based interrupt scenarios

Closes IDF-12642, IDF-12645, IDF-12873, and IDF-12876

See merge request espressif/esp-idf!40322
2025-07-25 11:08:53 +05:30
chenjianxing 6d996a0634 fix(wifi): fix wifi rom code using ets_delay_us for C5 and C61 2025-07-25 09:55:10 +05:30
Laukik Hase f2b0f256ab fix(esp_rom): Patch the esp_rom_delay_us API to use U-mode cycle CSR 2025-07-25 09:54:42 +05:30
Wei Yuhan 2ed4f6ddb7 Added v6.0 chip support status in README 2025-07-25 11:10:15 +08:00
Wei Yuhan d7ada4d40f Removed v5.0 from SoC Compatibility in README 2025-07-25 10:53:23 +08:00
Wei Yuhan 9664d069df Updated ESP-IDF SoC Compatibility for v5.5 2025-07-25 10:53:23 +08:00
zhanghaipeng b6dc79af47 fix(ble/bluedroid): Fixed fail to disconnect when device record is cleared 2025-07-25 10:30:11 +08:00
zhanghaipeng ac385530af fix(ble/bluedroid): fix incorrect resolving_list_avail_size update 2025-07-25 10:27:53 +08:00
Fu Hanxi 860dd1128e ci: load non-test-related apps list 2025-07-24 22:58:00 +02:00
Jiang Jiang Jian 4235058d9a Merge branch 'bugfix/fix_crash_when_twt_setup' into 'master'
fix(wifi): fix crash issue and tx error 0xa1

See merge request espressif/esp-idf!40783
2025-07-24 23:42:25 +08:00
Mahavir Jain d8a3ef511c Merge branch 'fix/gcm_fallback_must_depend_on_software_gcm_symbol' into 'master'
fix(mbedtls/gcm): Allow enabling GCM fallback only if software GCM is available

See merge request espressif/esp-idf!40780
2025-07-24 19:12:44 +05:30
zhanghaipeng 61606a6f95 fix(ble/bluedroid): ensure resolving list is updated when the oldest device is removed 2025-07-24 21:29:27 +08:00
yinqingzhao 8603c91f47 fix(wifi): fix crash issue and tx error 0xa1 2025-07-24 20:16:44 +08:00
Harshal Patil 7043cbf615 Merge branch 'docs/update_bootloader_max_size' into 'master'
docs(bootloader): Update the maximum supported bootloader size

See merge request espressif/esp-idf!40787
2025-07-24 17:34:06 +05:30
harshal.patil 35944b8a4d docs(bootloader): Change the default value of maximum supported bootloader size 2025-07-24 15:56:41 +05:30
Harshal Patil 8ab9e36eec Merge branch 'docs/update_bootloader_max_size' into 'master'
Update the maximum supported bootloader size

See merge request espressif/esp-idf!40506
2025-07-24 15:42:40 +05:30
Island d26f280415 Merge branch 'bugfix/fix_some_ble_bugs_250628_cjh_esp32' into 'master'
Fixed some BLE bugs 250628 on esp32(d9a3de0)

Closes BLERP-1697, BLERP-1965, BLERP-2075, BLERP-2077, and BLERP-1991

See merge request espressif/esp-idf!40421
2025-07-24 18:06:09 +08:00
harshal.patil c8e4b69e7f fix(mbedtls/gcm): Allow enabling GCM fallback only if software GCM is available 2025-07-24 12:42:57 +05:30
Song Ruo Jing 3fdb473174 Merge branch 'bugfix/ledc_update_duty_wait' into 'master'
fix(ledc): duty_start update bit should wait for its self-clear before next set

Closes IDF-11989

See merge request espressif/esp-idf!39949
2025-07-24 14:55:16 +08:00
Mahavir Jain 22adc7ed75 Merge branch 'feat/secure_boot_ecdsa_p384' into 'master'
Support Secure Boot using ECDSA-P384 curve

Closes IDF-10016, IDF-10221, and IDF-12990

See merge request espressif/esp-idf!38517
2025-07-24 11:59:59 +05:30
morris 1f82b347a6 Merge branch 'feat/upgrade_restful_server_example' into 'master'
Upgrade restful server example (Vue2->Vue3) (The webpage is mostly done by AI with tons of prompts)

See merge request espressif/esp-idf!40669
2025-07-24 13:36:22 +08:00
Jiang Jiang Jian f50f6913fa Merge branch 'bugfix/ftm_failure_40m' into 'master'
bugfix(wifi): Resolved FTM failure in 40M bandwidth

Closes WIFIBUG-1291

See merge request espressif/esp-idf!40345
2025-07-24 13:26:46 +08:00
Rahul Tank d67bc8a5ad Merge branch 'bugfix/retry_packet_alloc' into 'master'
fix(nimble): Add packet allocation retry for limited iteration

Closes BT-4049

See merge request espressif/esp-idf!40677
2025-07-24 10:12:47 +05:30
Aditya Patwardhan 9cd759c3bc Merge branch 'feature/support_rng_sampling' into 'master'
Feature/support rng sampling

See merge request espressif/esp-idf!40433
2025-07-24 09:42:39 +05:30
Chen Jichang d6a9a0f5d5 feat(rmt): support rmt on esp32-h4 2025-07-24 10:47:13 +08:00
akshat 9a77d59b8b fix(wifi): Add suport for FTM in ESP32C61
Resolve FTM failure in 40M Bandwidth
2025-07-23 17:39:35 +05:30
He Binglin 1408adcb47 Merge branch 'bugfix/esp_idf_c5_idfci-3010' into 'master'
feat(esp_hw_support): support xtal as RTC FAST CLK during sleep for esp32c5

Closes IDFCI-3010

See merge request espressif/esp-idf!40702
2025-07-23 19:38:30 +08:00
Rahul Tank 346870a304 Merge branch 'bugfix/add_old_btsnoop_hci_py' into 'master'
fix(nimble): Updated parser script for HCI log creation

See merge request espressif/esp-idf!40726
2025-07-23 16:21:20 +05:30
C.S.M bc58afc758 Merge branch 'test/add_c61_usj_test' into 'master'
test(usj): Add test for usb_seiral_jtag on c61

See merge request espressif/esp-idf!40753
2025-07-23 18:49:20 +08:00
Jiang Jiang Jian 40eefe1d69 Merge branch 'bugfix/fix_inactive_time_reset_when_disconnect' into 'master'
fix(wifi): fix inactive time reset when wifi disconnect

See merge request espressif/esp-idf!40419
2025-07-23 18:43:15 +08:00
morris e0ddcb8013 fix(lcd): reserve the GPIOs used by RGB LCD
and disconnect the LCD signals when the dirver is uninstalled.
2025-07-23 18:15:54 +08:00
Armando (Dou Yiwen) b22fcf6dbd Merge branch 'feat/p4_eco5_soc_part2' into 'master'
p4: eco5 soc registers (part2)

See merge request espressif/esp-idf!40694
2025-07-23 10:08:11 +00:00
Aditya Patwardhan 96170ea10b refactor(hal): Move CONFIG options used in ecdsa_hal.c under config.h 2025-07-23 15:34:05 +05:30
Jiang Jiang Jian 33493d43e0 Merge branch 'bugfix/fix_phy_test_crash' into 'master'
fix(PHY): Fixed phy test example crash

Closes IDFGH-15957 and BLERP-2107

See merge request espressif/esp-idf!40707
2025-07-23 17:47:34 +08:00
Aditya Patwardhan 03ffe90f95 feat(soc): Added soc capabilities related to RNG for ESP32C5 2025-07-23 14:22:09 +05:30
C.S.M 6f7ca07018 Merge branch 'fix/fix_gpspi_flash_frequency' into 'master'
refactor(spi_flash): Refactor gpspi flash for making it's clock accurate

Closes IDF-13566

See merge request espressif/esp-idf!40651
2025-07-23 16:46:30 +08:00
Mahavir Jain a2935a5750 Merge branch 'fix/mqtt_ssl_ds_build_failure' into 'master'
fix(mqtt): Increased partition size to fix build failure

See merge request espressif/esp-idf!40759
2025-07-23 14:11:45 +05:30
Wan Lei 62136054cd Merge branch 'ci/c61_enable_multi_dev_runner' into 'master'
ci(esp32c61): enable multi dut runner for c61 eco3

Closes IDF-10949 and IDFCI-3037

See merge request espressif/esp-idf!40724
2025-07-23 14:57:39 +08:00
Aditya Patwardhan 5cc1e8c0d5 fix(mqtt): Increased partition size to fix build failure 2025-07-23 11:33:15 +05:30
harshal.patil f4b329386f docs(bootloader): Update the maximum supported bootloader size 2025-07-23 11:17:54 +05:30
Laukik Hase 3d402ca938 ci(hal): Extend the PMS hal test-app for verifying TEE-based interrupt scenarios 2025-07-23 10:00:24 +05:30
C.S.M 22cd0d615f test(usj): Add test for usb_seiral_jtag on c61 2025-07-23 12:07:13 +08:00
Chen Jichang d29e7b3bb6 fix(rmt): add pll and rcfast clock src on c5 2025-07-23 11:36:37 +08:00
C.S.M 90d3d658bb Merge branch 'refactor/remove_flash_ut' into 'master'
refactor(spi_flash): Remove the useless flash/psram unit test

See merge request espressif/esp-idf!40739
2025-07-23 11:03:25 +08:00
Kevin (Lao Kaiyao) 1a242d132c Merge branch 'feature/support_i2s_and_etm_on_h4' into 'master'
feat(i2s & etm): support i2s and etm on esp32-h4

Closes IDF-12385, IDF-12355, and IDF-13396

See merge request espressif/esp-idf!39698
2025-07-22 20:27:11 +08:00
Zhang Shuxian b615ab5a40 docs: Update CN translation for secure boot 2025-07-22 19:14:46 +08:00
yinqingzhao 8b67238e85 fix(wifi): fix inactive time reset when wifi disconnect 2025-07-22 17:50:36 +08:00
Jiang Jiang Jian b37a159603 Merge branch 'feature/hosted_examples' into 'master'
feat(hosted_examples): Added ESP-Hosted to Wi-Fi examples

See merge request espressif/esp-idf!37624
2025-07-22 17:48:26 +08:00
wanckl cb257ede27 ci(esp32c61): enable multi dut runner for c61 2025-07-22 17:10:55 +08:00
chenjianhua f20c6a2813 fix(bt): Update bt lib for ESP32(d9a3de0)
- Support BLE vendor HCI related params reset
- Support multi conn optimization vendor hci command
- Fixed the issue where rssi of conn is incorrect when latency is no zero
- Fixed prio setting for BLE events
- Fixed disconnection issue when coexisting with other BLE events
- Fixed crash due to bandwidth full when updating conn params
2025-07-22 16:14:27 +08:00
luoxu 21b934aeb2 feat(ble_mesh): fixed issues with adv evts process 2025-07-22 15:21:58 +08:00
luoxu 4905b6eae1 feat(ble_mesh): add adv lock to avoid allocated buffers 2025-07-22 15:21:58 +08:00
luoxu 334e2bf8ab feat(ble_mesh): Add lock to avoid tx being modified at the same time 2025-07-22 15:21:58 +08:00
Song Ruo Jing 63e2d6828b refactor(ledc): deprecate ledc_isr_register and ledc_channel_config_t::intr_type 2025-07-22 15:10:52 +08:00
Song Ruo Jing dca8f204eb refactor(ledc): remove deprecated API/macro for v6.0 2025-07-22 15:05:10 +08:00
Song Ruo Jing d87de032df fix(ledc): duty_start bit should wait for its self-clear before next set on esp32 2025-07-22 15:05:10 +08:00
Soh Kam Yung 2bec3bc441 feat(hosted_examples): Added ESP-Hosted to Wi-Fi examples
- add ESP32-P4 and ESP32-H2 as Supported Targets to following
  examples, using ESP-Hosted and Wi-Fi Remote as components:
  - iperf (H2)
  - getting_started/softAP
  - getting_started/station
  - scan
  - fast_scan
  - softap_sta
- updated `.build-test-rules.yml` to enable pre-commit to accept ESP-P4
  and ESP-H2 as Supported Targets
- updated iperf sdkconfig.defaults for P4 to use parameters from wifi-remote
2025-07-22 14:28:57 +08:00
Wu Zheng Hui 92b84443f3 Merge branch 'feat/support_modify_regdma_link_skip_flag_dynamically' into 'master'
feat(esp_hw_support): add API to supoport modify retention skip flag dynamically

See merge request espressif/esp-idf!40596
2025-07-22 14:19:29 +08:00
Rahul Tank d2799fa657 fix(nimble): Add packet allocation retry for limited iteration 2025-07-22 11:47:41 +05:30
Kevin (Lao Kaiyao) 3750278c84 Merge branch 'feature/parlio_rx_support_queue_in_callback' into 'master'
feat(parlio_rx): supported to append receive queue in the ISR context.

Closes IDF-8567

See merge request espressif/esp-idf!40311
2025-07-22 14:16:30 +08:00
C.S.M 7e6b11618f Merge branch 'feature/i3c_i2c_support' into 'master'
feat(i3c_master): support i2c mode in i3c driver. 🏋🏻‍♀️

See merge request espressif/esp-idf!36638
2025-07-22 13:29:55 +08:00
C.S.M 6b19cd3932 refactor(spi_flash): Remove the useless flash/psram unit test 2025-07-22 12:02:41 +08:00
C.S.M 332614165b refactor(spi_flash): Refactor gpspi flash for making it's clock accurate 2025-07-22 11:59:45 +08:00
C.S.M f1ebe5d1ce Merge branch 'feat/support_flash_h21' into 'master'
feat(spi_flash): Add basic flash support for esp32h21, esp32h4

Closes IDF-12388 and IDF-11609

See merge request espressif/esp-idf!40643
2025-07-22 11:38:18 +08:00
Wu Zheng Hui 6f8dbe8a89 Merge branch 'fix/fix_submode_assert_in_slowck_changed_ota' into 'master'
fix(esp_hw_support): fix assert when changing 8MD256 RTC slow clock source during OTA

Closes PM-478

See merge request espressif/esp-idf!40292
2025-07-22 11:33:32 +08:00
laokaiyao 263a056486 feat: add i2s & etm sleep retention entry on H4 2025-07-22 10:05:12 +08:00
armando ee68450342 feat(soc): p4 hw ver2 registers 2025-07-22 01:50:34 +00:00
Roland Dobai b1d190826c Merge branch 'feat/extend_shell_classes_uppercase' into 'master'
feat(tools): Normalize detected shell name to lowercase on Windows

Closes IDFGH-15932

See merge request espressif/esp-idf!40598
2025-07-21 17:47:50 +02:00
Jan Beran 806775f54e change: use esp_kconfiglib instead of kconfiglib in Python imports 2025-07-21 16:36:55 +02:00
laokaiyao eee0f0266c docs(parlio_rx): add parlio rx programming guide 2025-07-21 22:26:01 +08:00
Jiang Jiang Jian 8448452e03 Merge branch 'bugfix/add_lib_target_git_reversion_message' into 'master'
fix(wifi):fix open mode rx fragment fail issue

Closes WIFIBUG-1272 and WIFIBUG-1315

See merge request espressif/esp-idf!39426
2025-07-21 22:04:03 +08:00
muhaidong a6a9c41573 fix(wifi): fix open mode rx fragment fail issue 2025-07-21 20:17:38 +08:00
C.S.M b765ad43cf feat(spi_flash): Add flash suspend support on esp32h21, esp32h4 2025-07-21 19:24:00 +08:00
C.S.M 50aee21d33 feat(spi_flash): Add basic support for esp32h4 2025-07-21 19:24:00 +08:00
C.S.M bc9fa040da feat(spi_flash): support spi_flash on esp32h21 2025-07-21 19:24:00 +08:00
C.S.M 9b17b8470e feat(i3c): Add example for i2c mode in i3c peripheral 2025-07-21 19:23:29 +08:00
C.S.M 1d07729b91 test(i3c): Add simple test for i2c mode in i3c peripheral 2025-07-21 19:23:29 +08:00
C.S.M 9bec7c3651 feat(i3c): Add support for i2c mode in i3c peripheral 2025-07-21 19:23:29 +08:00
Ivan Grokhotkov 83ac9be085 Merge branch 'fix/bootloader_secure_boot_target_not_created' into 'master'
fix(bootloader): Fixed bootloader secure boot target creation failure

See merge request espressif/esp-idf!40732
2025-07-21 13:22:12 +02:00
Marek Fiala a6a4f8a705 feat(tools): Normalized detected shell names to lowercase on Windows
Closes https://github.com/espressif/esp-idf/issues/16868
2025-07-21 11:16:10 +02:00
Marek Fiala b7efec31d2 change(tools): shell_types.py ruff formatting 2025-07-21 11:16:10 +02:00
Roman Leonov 75809d4397 Merge branch 'refactor/usb_host_hid_example_open_proto_only' into 'master'
refactor(usb_host_example): Added opening only for HID device with proto

See merge request espressif/esp-idf!40228
2025-07-21 16:01:23 +08:00
Sudeep Mohanty 5d9ee7cc1a fix(bootloader): Fixed bootloader secure boot target creation failure
This commit fixes an issue where the bootloader POST_BUILD target
depended on the signed bootloader image even if it is not created.
2025-07-21 09:40:41 +02:00
Rahul Tank 54e65df985 fix(nimble): Add support to parser script to parse logs with/without ts
Introduced a new "--has-ts" input parameter to script to detect if logs
has timestamp information or not
2025-07-21 12:10:21 +05:30
Marius Vikhammer bf84ab652a change(test_utils): moved test_utils component to tools/test_apps/components/ 2025-07-21 14:05:50 +08:00
morris 70d62b1a54 feat(restful_server): upgrade the example to use vue3+vuetify3
also cleaned up the backend firmware to use littlefs filesystem.
2025-07-21 12:03:10 +08:00
Sudeep Mohanty 52e2f17378 Merge branch 'fix/bootloader_add_custom_command_incorrect' into 'master'
fix(bootloader): Correct add_custom_command 'DEPENDS' usage

See merge request espressif/esp-idf!40510
2025-07-21 06:01:08 +02:00
Ivan Grokhotkov a5d53fc6a6 Merge branch 'doc/remove_cpp_section_placement_limitation' into 'master'
docs(cplusplus): remove the limitation on IRAM_ATTR for templates

See merge request espressif/esp-idf!40688
2025-07-21 05:58:07 +02:00
harshal.patil 4fc9fd4891 fix(esp_system): Remove redundant crypto clock source selection 2025-07-21 09:19:42 +05:30
harshal.patil 94019776bd ci(security): Security test app updated yml
- Also fixes the errors generated by the check-test-scripts command
2025-07-21 09:19:42 +05:30
harshal.patil dbcaddb745 docs(secure-boot-v2): Update the signature verification timings
- THe timings are calculated for the ROM verifying the bootloader's signature
2025-07-21 09:19:42 +05:30
harshal.patil 37e5c0701a docs(secure_boot_v2): Add documentation for Secure Boot V2 using ECDSA-P384 2025-07-21 09:19:42 +05:30
harshal.patil 0f51640674 test(secure_boot): Add tests for ECDSA-based secure boot scheme 2025-07-21 09:19:42 +05:30
harshal.patil 5699619606 test(examples/efuse): Add test for secure boot v2 using ecdsa-p384 2025-07-21 09:19:42 +05:30
harshal.patil 130e72f82b feat(bootloader_support): Support Secure Boot using ECDSA-P384 curve 2025-07-21 09:19:42 +05:30
harshal.patil 03ea07155a change(bootloader_support/secure_boot): Allow NULL as verified_digest for app build
The esp_secure_boot_verify_sbv2_signature_block() and esp_secure_boot_verify_rsa_signature_block()
APIs need and use the verified_digest argument only for BOOTLOADER_BUILD, but the argument is
not used in the application code, and the value present in verified_digest is considered invalid.
Thus, allow passing NULL as the verified_digest parameter to help some save space.
2025-07-21 09:19:42 +05:30
harshal.patil 3f9ab5d5e7 fix(bootloader_support/secure_boot): Fix incorrect usage of ESP_SECURE_BOOT_KEY_DIGEST_LEN 2025-07-21 09:19:42 +05:30
Wang Meng Yang 61ccbbe7f0 Merge branch 'bugfix/fix_external_codec_build_issue' into 'master'
fix(bt/bluedroid): Fix build issue when using external sbc codec

Closes BT-4051

See merge request espressif/esp-idf!40554
2025-07-21 10:44:02 +08:00
zhiweijian e2e5d4915b fix(rf/example): Fixed phy test example crash 2025-07-21 10:21:55 +08:00
Kevin (Lao Kaiyao) 1c74e1a8a2 Merge branch 'docs/check_ana_cmpr_and_touch_for_c61' into 'master'
docs: remove touch_pad.rst from C61 not_updated list

Closes IDF-10146, IDF-10136, IDF-10128, IDF-10122, IDF-10139, and IDF-10131

See merge request espressif/esp-idf!40681
2025-07-20 14:36:48 +08:00
Jiang Jiang Jian 7add0c1547 Merge branch 'fix/disconnect_sta_in_wps_start' into 'master'
fix(wifi): Disconnect station from previous AP in wps_start instead of wps_enable

Closes WIFIBUG-1263

See merge request espressif/esp-idf!40306
2025-07-19 09:05:47 +08:00
Sarvesh Bodakhe 762a5c68e0 fix(wifi): Disconnect station in wps_start instead of wps_enable
Modifies changes from 3ee449bc5d
2025-07-18 23:50:09 +08:00
Jiang Jiang Jian 0d6f8e3930 Merge branch 'fix/fix_esp32c2_eco4_ld_issue' into 'master'
fix(wifi): fix esp32c2 eco4 ld issue

See merge request espressif/esp-idf!40224
2025-07-18 22:10:08 +08:00
wangtao@espressif.com d32b2f6ca6 fix(wifi): fix esp32c2 eco4 ld issue 2025-07-18 17:54:44 +08:00
hebinglin 7981d1743f feat(esp_hw_support): support xtal as RTC FAST CLK during sleep 2025-07-18 17:47:47 +08:00
laokaiyao 8fa39ee0fe docs: remove touch_pad.rst from C61 not_updated list 2025-07-18 17:25:39 +08:00
Gao Xu c03ab39028 Merge branch 'feat/support_sdio_on_c61' into 'master'
feat(sdio): supported slave sdio on esp32c61

Closes IDF-12883, IDF-12594, and IDF-10151

See merge request espressif/esp-idf!40485
2025-07-18 16:37:48 +08:00
Armando (Dou Yiwen) 7611a37de3 Merge branch 'feat/h4_cache_msync' into 'master'
cache: h4 cache msync support

Closes IDF-12289

See merge request espressif/esp-idf!40491
2025-07-18 08:06:02 +00:00
laokaiyao 424991faaf feat(i2s): support new sync feature on H4 2025-07-18 15:51:37 +08:00
laokaiyao 0a110478ea feat(modem_etm): support modem etm on h4 2025-07-18 15:51:34 +08:00
laokaiyao 026370e5b3 feat(etm): support etm on esp32-h4 2025-07-18 15:51:00 +08:00
laokaiyao 3992f734bf feat(i2s): support i2s on esp32-h4 2025-07-18 15:48:02 +08:00
wuzhenghui d7e1a747a6 fix(esp_hw_support): enable ESP_SLEEP_RTC_FAST_USE_XTAL_MODE only once in RTC_FAST selection 2025-07-18 15:29:07 +08:00
wuzhenghui 80cde5f3e6 fix(esp_hw_support): fix assert when changing 8MD256 RTC slow clock source during OTA 2025-07-18 15:25:34 +08:00
Gao Xu fae24cfcda Merge branch 'feat/c61_adc_calibration' into 'master'
ESP32C61 ADC calibration and add runner

Closes IDF-9303

See merge request espressif/esp-idf!40500
2025-07-18 15:18:33 +08:00
Guillaume Souchere 361c1b1fd6 Merge branch 'fix/linenoise-arrow-usage' into 'master'
fix(linenoise): Read escape sequences one character at a time

Closes IDFGH-15849

See merge request espressif/esp-idf!40601
2025-07-18 08:57:15 +02:00
Jiang Jiang Jian 3c3ee159c5 Merge branch 'bugfix/fix_mesh_sta_send_data_error_on_c61' into 'master'
fix(wifi/mesh): fixed the mesh STA sends data error on c61

Closes WIFIBUG-1330

See merge request espressif/esp-idf!40630
2025-07-18 14:48:06 +08:00
morris c8fcebd9bd Merge branch 'fix/spi_slave_dma_stop_unexpectly_when_start' into 'master'
fix(driver_spi): fixed esp32c5 spi slave dma potential rx error

Closes IDFCI-2919, IDFCI-2915, and IDFCI-2918

See merge request espressif/esp-idf!40446
2025-07-18 14:46:13 +08:00
laokaiyao f0c45b7115 feat(parlio_rx): support to receive in isr context 2025-07-18 14:23:52 +08:00
Ivan Grokhotkov 5b71cc29bd docs(cplusplus): remove the limitation on IRAM_ATTR for templates
The issue has been fixed since GCC 14.

Related to https://github.com/espressif/esp-idf/issues/4542
2025-07-18 14:16:25 +08:00
C.S.M 5812b19e91 Merge branch 'refactor/gpio_valid_2_soc' into 'master'
refactor(gpio): Move valid gpio_caps macro from driver layer to soc layer

Closes IDF-13564

See merge request espressif/esp-idf!40521
2025-07-18 13:18:46 +08:00
Armando (Dou Yiwen) bfcba51ca1 Merge branch 'feat/p4_eco5_soc_part1' into 'master'
p4: soc support (part 1, move hw ver1 registers to `hw_ver1` dir)

See merge request espressif/esp-idf!40518
2025-07-18 01:51:31 +00:00
Zhang Shu Xian 5636a2fad2 Merge branch 'docs/remove_incorrect_info_for_esp32p4_sdmmc' into 'master'
docs: Remove incorrect description for ESP32-P4 SDMMC

Closes DOC-11817

See merge request espressif/esp-idf!40631
2025-07-18 09:35:09 +08:00
gaoxu a4bbc07ad8 docs(sdio): update c61 sdio support docs 2025-07-18 09:29:37 +08:00
gaoxu d3e2177342 ci(sdio): enable 32_c61 sdio test and runner 2025-07-18 09:29:37 +08:00
gaoxu 01080bb062 fix(sdio): supported slave sdio on esp32c61 2025-07-18 09:29:37 +08:00
wanckl 0992a1db62 fix(driver_spi): fixed esp32c5 spi slave dma potential rx error 2025-07-18 09:29:27 +08:00
gaoxu 33560f506e ci(adc): enable esp32c61 adc test 2025-07-18 09:29:23 +08:00
gaoxu 1e76669a8b feat(adc): support ADC calibration on ESP32C61 2025-07-18 09:29:23 +08:00
Marius Vikhammer 2e619615de Merge branch 'bugfix/c61_systimer_etm' into 'master'
fix(systimer): fixed ETM not working with systimer on C61 ECO3

Closes IDFCI-3000, IDFCI-3002, and IDFCI-3003

See merge request espressif/esp-idf!40526
2025-07-18 09:17:13 +08:00
armando b25bde3378 change(cache): use bus id to get cache vaddr bus 2025-07-18 01:15:06 +00:00
armando 84ae601fef feat(cache): msync driver support on h4 2025-07-18 01:15:06 +00:00
Erhan Kurubas fb3e616750 Merge branch 'apptrace_breaking_changes' into 'master'
Apptrace breaking changes

Closes IDF-9993 and IDF-4316

See merge request espressif/esp-idf!40380
2025-07-17 17:45:31 +02:00
Sudeep Mohanty c8f68c72a7 Merge branch 'feat/remove_global_cmake_vars' into 'master'
change(esptool_py): Make esptool_py component idempotent in the build

Closes IDF-13073

See merge request espressif/esp-idf!39589
2025-07-17 17:13:49 +02:00
morris e1213c8874 Merge branch 'feat/soc_config_h' into 'master'
split soc_caps.h and standardize its name/usage

Closes IDF-11815

See merge request espressif/esp-idf!35445
2025-07-17 21:46:44 +08:00
Mahavir Jain 4e12ed0655 Merge branch 'contrib/github_pr_16076' into 'master'
fix(esp_http_client): fix spurious async open error (GitHub PR)

Closes IDFGH-15428

See merge request espressif/esp-idf!40273
2025-07-17 14:38:34 +05:30
armando 9477f88a0d change(g0): use hw_ver1 to build g0 components test app 2025-07-17 08:57:03 +00:00
armando df7cd41765 change(ci): update regex to match soc headers in check_public_header.py 2025-07-17 08:57:03 +00:00
armando 4ea2ea5f02 p4: move hw ver1 registers 2025-07-17 08:57:03 +00:00
Mahavir Jain c6cc403060 Merge branch 'bugfix/fix_memory_leak_on_http_header_fetch_failure' into 'master'
fix(esp_http_client): free header in case of ESP_ERR_HTTP_FETCH_HEADER

See merge request espressif/esp-idf!40528
2025-07-17 14:26:31 +05:30
C.S.M 001d01f93a refactor(gpio): Move valid gpio_caps macro from driver layer to hal 2025-07-17 16:54:54 +08:00
Igor Udot b65366d5c4 Merge branch 'ci/fix-test-skip-ci-issue' into 'master'
ci: fix temp_skip_ci issue where test job was not skipped

Closes IDFCI-3032

See merge request espressif/esp-idf!40628
2025-07-17 16:53:01 +08:00
igor.udot ab85534fb7 ci: fix temp_skip_ci issue where test job was not skipped 2025-07-17 16:27:00 +08:00
Ivan Grokhotkov f45154b347 change(bt): use add_prebuilt_library to add blobs 2025-07-17 15:10:16 +08:00
Ivan Grokhotkov 71f481e9ae change(esp_phy): use add_prebuilt_library to add blobs 2025-07-17 15:10:16 +08:00
Island 918b2cfd7e Merge branch 'feat/support_ble_log_uart_dma_out' into 'master'
Feat/support ble log uart dma out

Closes BLERP-1935

See merge request espressif/esp-idf!40597
2025-07-17 14:17:35 +08:00
Rahul Tank 635169fdd8 Merge branch 'feat/add_timestamp' into 'master'
fix(nimble): Enhanced HCI logging by adding timestamp information

See merge request espressif/esp-idf!40620
2025-07-17 10:14:14 +05:30
Rahul Tank 2a1a76d6a6 Merge branch 'bugfix/make_blufi_adv_custom' into 'master'
feat(nimble): Add a way to make blufi advertising customizable

See merge request espressif/esp-idf!40453
2025-07-17 10:12:58 +05:30
Erhan Kurubas 8a2692edb6 change(app_trace): add dest parameter to down buffer config 2025-07-17 12:36:39 +08:00
Erhan Kurubas 3d7d7813c9 refactor(apptrace): replace xxx_TRAX with xxx_JTAG 2025-07-17 12:36:39 +08:00
Zhang Shuxian 907cf6390f docs: Remove incorrect description for ESP32-P4 SDMMC 2025-07-17 11:56:05 +08:00
zhangyanjiao 96e39022b3 fix(wifi/mesh): fixed the mesh STA sends data error on c61 2025-07-17 11:43:08 +08:00
Zhou Xiao 3671d7b59b feat(ble): support ble log uart dma out for ESP32-C5 2025-07-17 10:48:22 +08:00
Zhou Xiao d45778f784 feat(ble): support ble log uart dma out for ESP32-H2 2025-07-17 10:48:22 +08:00
Zhou Xiao ae8a7c8117 feat(ble): support ble log uart dma out for ESP32-C6 2025-07-17 10:48:22 +08:00
Zhou Xiao 534b43e85a feat(ble): support ble log uart dma out 2025-07-17 10:48:17 +08:00
morris 0999aeedbd refactor(timg): clean up soc layer meta data 2025-07-17 10:33:08 +08:00
morris ccd092d7dc refactor(hal): clean up some hal file dependency on sdkconfig.h 2025-07-17 10:33:08 +08:00
morris 0296c30908 feat(soc): introduce the soc_caps_full.h for internal use only 2025-07-17 10:33:08 +08:00
Ashish Sharma 801ea1fc4e fix(esp_http_client): fix memory leak in current_header_value buffer
Fixed memory leak in esp_http_client_cleanup() where current_header_value
buffer was not being freed when ESP_ERR_HTTP_FETCH_HEADER is returned
during header parsing failures.
2025-07-17 10:32:50 +08:00
Marius Vikhammer 296bc7ddcc Merge branch 'feature/h4_reset_reasons' into 'master'
feat(system): updated H4 reset reasons

Closes IDF-12307

See merge request espressif/esp-idf!40499
2025-07-17 10:10:28 +08:00
Ivan Grokhotkov 425ff5f03f change(esp_wifi): use add_prebuilt_library to add blobs 2025-07-17 09:33:21 +08:00
Ivan Grokhotkov 47f695a930 change(xtensa): use add_prebuilt_library to add blobs 2025-07-17 09:33:21 +08:00
Ivan Grokhotkov 1a8a573ea8 test(ldgen): add test for placements of symbols in prebuilt libraries 2025-07-17 09:33:21 +08:00
Ivan Grokhotkov e76e0673fc change(cmake): targets created by add_prebuilt_library are now GLOBAL
This allows the prebuilt libraries to be processed by ldgen.
2025-07-17 09:33:20 +08:00
Marius Vikhammer 36834844b2 fix(systimer): fixed ETM not working with systimer on C61 ECO3 2025-07-17 09:16:47 +08:00
Fu Hanxi 138a0941ca Merge branch 'ci/fixes' into 'master'
ci: a few fixes

Closes IDFCI-3018

See merge request espressif/esp-idf!40610
2025-07-17 03:13:52 +02:00
Fu Hanxi d4cc559709 chore: add ci config files to CODEOWNER 2025-07-16 14:16:19 +02:00
Fu Hanxi c5a562e6e0 ci: add examples/openthread to PYTHONPATH 2025-07-16 14:11:09 +02:00
Fu Hanxi 76181e5fce ci: skip app downloader for host test cases 2025-07-16 14:11:08 +02:00
Fu Hanxi 158eb78555 ci: add CI_JOB_ID as suffix to help ci-dashboard parse info easier 2025-07-16 14:09:44 +02:00
Fu Hanxi 95fbd6b81a ci: make sure test child pipeline only triggered when all build jobs succeeded 2025-07-16 14:09:44 +02:00
Fu Hanxi d280d36405 tests: fix special characters in parametrize with variables 2025-07-16 14:09:44 +02:00
Jiang Jiang Jian 4324c48388 Merge branch 'bugfix/ci_release_zip_base_image' into 'master'
Bump ubuntu version for release zips workflow

See merge request espressif/esp-idf!40442
2025-07-16 19:40:23 +08:00
Guilherme Ferreira 8884211036 Merge branch 'fix/idfg-15478' into 'master'
fix(tcp_transport): off-by-one buffer corruption when WS header buffer full

Closes IDFGH-15478

See merge request espressif/esp-idf!39878
2025-07-16 18:18:06 +08:00
Rahul Tank 2823aac1a7 fix(nimble): Enhanced HCI logging by adding timestamp information 2025-07-16 15:31:39 +05:30
Ondrej Kosta c76202c0a8 Merge branch 'fix/bridge_test_ssh' into 'master'
fix(esp_eth): bridge test to use SSH key when connect to endnode

Closes IDFCI-2994

See merge request espressif/esp-idf!40540
2025-07-16 17:37:38 +08:00
Mahavir Jain 464d03f999 Merge branch 'contrib/github_pr_15767' into 'master'
fix(esp_http_server): WebSocket frame parsing errors (GitHub PR)

Closes IDFGH-15086 and IDFGH-14461

See merge request espressif/esp-idf!40076
2025-07-16 13:58:37 +05:30
Zhang Wen Xu 9207ca0b45 Merge branch 'fix/ieee802154_example_rx' into 'master'
fix(ieee802154): set rx_when_idle to false when Rx stop

See merge request espressif/esp-idf!40475
2025-07-16 07:49:21 +00:00
Jiang Jiang Jian bd557f9e5c Merge branch 'bugfix/crash_ap_mode_switch' into 'master'
fix(wifi): Fix crash due to BIP when ap mode change

Closes WIFIBUG-1323

See merge request espressif/esp-idf!40564
2025-07-16 15:12:27 +08:00
Fu Hanxi d1a860bda5 ci: use fixed telnetlib since python 3.13 removed this from stdlib 2025-07-16 09:12:03 +02:00
Fu Hanxi 288fc561b7 tests: fix skipif markers. use temp_skip instead 2025-07-16 09:12:03 +02:00
Guillaume Souchere b46f4689bd fix(linenoise): Read escape sequences one character at a time 2025-07-16 08:28:22 +02:00
Shen Meng Jing c55e913b8d Merge branch 'docs/update_esp_crt_bundle_cn' into 'master'
docs: Update the CN translation for esp_crt_bundle.rst

Closes DOC-11550

See merge request espressif/esp-idf!40527
2025-07-16 12:19:56 +08:00
Wan Lei cd945b22de Merge branch 'fix/twai_ci_repaire' into 'master'
fix(driver_twai): improve twai ci test

Closes IDFCI-3015 and IDFCI-3016

See merge request espressif/esp-idf!40585
2025-07-16 11:02:12 +08:00
shenmengjing 8f5e74ee86 docs: Update the CN translation for esp_crt_bundle.rst 2025-07-16 10:19:48 +08:00
Armando (Dou Yiwen) c9ed1cee58 Merge branch 'doc/update_docs_c61' into 'master'
doc: update docs

Closes IDF-10130, IDF-10142, and IDF-10125

See merge request espressif/esp-idf!40581
2025-07-16 01:23:33 +00:00
wanckl d9fdb0b241 fix(driver_twai): improve twai ci test 2025-07-16 08:45:08 +08:00
Marius Vikhammer 9319fcebf3 Merge branch 'ci/reenable_c5_lp_core_test' into 'master'
test(lp_core): re-enabled C5 lp-core test

Closes IDF-13583

See merge request espressif/esp-idf!40517
2025-07-16 08:40:55 +08:00
Samuel Obuch 037af2d40a Merge branch 'ci/enable_sysview_tests' into 'master'
ci: enable sysview example tests for all chips

Closes IDF-13342

See merge request espressif/esp-idf!39532
2025-07-15 21:52:41 +08:00
Fu Hanxi 2b29146881 Merge branch 'ci/fix-master-pipeline-artifact-downloading' into 'master'
ci: fix master pipeline artifacts downloading

Closes IDFCI-3008

See merge request espressif/esp-idf!40563
2025-07-15 13:17:02 +02:00
Samuel Obuch 824d54e707 ci: fix appimage_offset for esp32p4 in sysview heap trace example 2025-07-15 12:58:33 +02:00
Samuel Obuch a678721e49 ci: enable c61 usb_serial_jtag tests 2025-07-15 12:58:26 +02:00
Samuel Obuch afe83c15aa fix(sysview): fix timestamp freq when not using APB clock 2025-07-15 12:57:21 +02:00
Samuel Obuch d7eea89e16 ci: enable example tests for esp32p4 2025-07-15 12:57:21 +02:00
Erhan Kurubas 55617bb5e7 feat(tools): add esp32c3 rev1.1 rom version string 2025-07-15 12:57:21 +02:00
Samuel Obuch 7b724fadd3 ci: use shared OpenOCD class for GDB test app 2025-07-15 12:57:21 +02:00
Samuel Obuch ee65205183 ci: OpenOCD class as fixture 2025-07-15 12:57:19 +02:00
Samuel Obuch 66defc0c19 ci: enable sysview examples for all chips 2025-07-15 12:38:24 +02:00
Ondrej Kosta 3bd6e5d4bb fix(esp_eth): bridge test to use SSH key when connect to endnode 2025-07-15 12:26:05 +02:00
wuzhenghui 2dc52022ac feat(esp_hw_support): add API to supoport modify retention skip flag dynamically 2025-07-15 18:05:52 +08:00
Fu Hanxi 6ef01c9c26 ci: fix master pipeline artifacts downloading 2025-07-15 11:49:56 +02:00
Sudeep Mohanty 69702d8666 fix(bootloader): Correct dependency logic for custom commands
The bootloader build script incorrectly used the `DEPENDS` keyword with the
`add_custom_command(TARGET ...)` signature. This is unsupported, causes
warnings with modern CMake versions enforcing the CMP0175 policy.

This commit also updates the POST_BUILD messages generated during the
bootloader build to depend on more precise CMake targets rather than
depending on the generic bootloader.elf target.
2025-07-15 11:00:20 +02:00
armando 651817dc7f doc: update docs 2025-07-15 15:53:24 +08:00
Vincent Hamp ab07377b11 fix(esp_http_server): WebSocket frame parsing errors
Fixes the Websocket frame pasring error, by making sure
that two bytes are read compulsary for length bytes 126.

Closes https://github.com/espressif/esp-idf/pull/15767
Closes https://github.com/espressif/esp-idf/issues/15235
2025-07-15 11:26:35 +05:30
C.S.M 64e49c2aad Merge branch 'fix/i2c_sleep_ci_h4' into 'master'
fix(i2c): Fxi the i2c sleep retention build failed on esp32h4

See merge request espressif/esp-idf!40580
2025-07-15 11:48:46 +08:00
C.S.M f4ffc66927 fix(i2c): Fxi the i2c sleep retention build failed on esp32h4 2025-07-15 10:49:23 +08:00
Shreyas Sheth 98be62fe4e fix(wifi): Fix crash due to BIP when ap mode change 2025-07-15 10:32:53 +08:00
Ivan Grokhotkov 4dee9df0e7 Merge branch 'bugfix/tools_qemu_esp32s3' into 'master'
fix(toolchain): install qemu-xtensa if esp32s3 target is requested

See merge request espressif/esp-idf!37364
2025-07-14 12:04:08 +02:00
Ivan Grokhotkov 90518119d4 Merge branch 'contrib/github_pr_15974' into 'master'
fix(tools/idf-qemu): Append qemu_extra_args after monitor -serial not before (GitHub PR)

Closes IDFGH-15315

See merge request espressif/esp-idf!39257
2025-07-14 12:03:22 +02:00
Jiang Jiang Jian 9425367057 Merge branch 'bugfix/fix_pmksa_cache_expired_after_sntp_issue' into 'master'
fix(wifi): fix pmksa cache expiration caused by sntp time synchronization issue

Closes FCS-1730

See merge request espressif/esp-idf!39550
2025-07-14 15:21:41 +08:00
Sudeep Mohanty 46160b0f3d Merge branch 'task/remove_deprecated_funcs_in_idf_additions_h' into 'master'
remove(freertos): Remove deprecated functions from idf_additions.h

Closes IDF-8499, IDF-8158, and DOC-11732

See merge request espressif/esp-idf!40386
2025-07-14 08:36:54 +02:00
C.S.M 187212ba9d Merge branch 'feature/i2c_bringup_esp32h4' into 'master'
feat(i2c): Bringup i2c peripheral for esp32h4

Closes IDF-12359 and IDF-12357

See merge request espressif/esp-idf!40274
2025-07-14 14:19:45 +08:00
Omar Chebib 54065dda3c Merge branch 'docs/fix_some_broken_links' into 'master'
docs: Fix some broken links to OpenOCD Debugging

Closes DOC-11273

See merge request espressif/esp-idf!40541
2025-07-14 14:14:03 +08:00
Zhang Shuxian 3c012ee327 Provide CN translation 2025-07-14 12:22:07 +08:00
Sudeep Mohanty 7b57540cc4 feat(freertos): Add xTaskGetStackStart and deprecate pxTaskGetStackStart
The following changes have been made:
- Add new xTaskGetStackStart() function with proper StackType_t* return type
- Deprecate pxTaskGetStackStart() with wrapper implementation for backward compatibility
2025-07-14 12:18:05 +08:00
Sudeep Mohanty 669939d786 remove(freertos): Remove deprecated functions from idf_additions.h
This commit removes the following deprecated functions:
- xTaskGetAffinity()
- xTaskGetIdleTaskHandleForCPU()
- xTaskGetCurrentTaskHandleForCPU()
2025-07-14 12:18:05 +08:00
C.S.M 97a6b3bbab feat(i2c): Bringup i2c peripheral for esp32h4 2025-07-14 11:59:28 +08:00
Chen Ji Chang c7561dc4cc Merge branch 'refactor/spi_lcd_detect_bus_mode_automatically' into 'master'
refactor(spi_lcd): detect the bus mode automatically

Closes IDF-11255 and IDFGH-15695

See merge request espressif/esp-idf!40308
2025-07-14 11:45:15 +08:00
linruihao d5b14edec4 fix(bt/bluedroid): Fix build issue when using external sbc codec 2025-07-14 10:47:16 +08:00
gaoxu bc84e7fc99 fix(adc): fix wrong adc periph num on C2/P4 2025-07-14 08:33:18 +08:00
Roland Dobai a71bd0d6c2 Merge branch 'fix/username_special_characters' into 'master'
feat(tools): Added encoding when special characters used with username

Closes IDFGH-15599

See merge request espressif/esp-idf!40416
2025-07-13 17:57:05 +02:00
Roland Dobai fee7256064 Merge branch 'feat/extend_pip_user_option_check' into 'master'
feat(tools): Disabled pip 'user' option, when installing ESP-IDF python virtual environment

Closes IDFGH-15556

See merge request espressif/esp-idf!40312
2025-07-13 17:50:51 +02:00
morris 3f1f3e4b26 Merge branch 'docs/add_a_note' into 'master'
docs: Add a note for temp_sensor

Closes DOC-11374

See merge request espressif/esp-idf!40543
2025-07-12 22:24:08 +08:00
Marek Fiala 8ae487d48e feat(tools): Enforce pip 'user' option to no, when installing python env
Closes https://github.com/espressif/esp-idf/issues/16189
2025-07-11 21:35:39 +08:00
Marek Fiala 285e1edbea feat(tools): Added encoding when special characters used with username
Closes https://github.com/espressif/esp-idf/issues/16229
2025-07-11 21:35:11 +08:00
Igor Masar f4a861964e Merge branch 'refactor/usb-phy' into 'master'
refactor(usb_phy): move USB PHY implementation to esp_hw_support

Closes IDF-11144 and IDF-9021

See merge request espressif/esp-idf!39770
2025-07-11 20:49:36 +08:00
Sumeet Singh 651c6d8128 fix(nimble): Clear GATT service entries counter upon GATT deinit 2025-07-11 17:46:37 +05:30
Wang Meng Yang 706b7c8629 Merge branch 'feat/add_handl_in_sdp_evt' into 'master'
feat(bt): Add record_handle in ESP_SDP_REMOVE_RECORD_COMP_EVT

Closes BTQABR2023-537

See merge request espressif/esp-idf!40409
2025-07-11 19:29:48 +08:00
Wan Lei cb3ddef853 Merge branch 'fix/c61_eco3_open_ci_test_generic' into 'master'
fix(ci): c61 eco3 open ci test

See merge request espressif/esp-idf!40480
2025-07-11 18:37:03 +08:00
Shen Mengjing 51979f5b35 docs: Add a note for temp_sensor 2025-07-11 17:41:49 +08:00
Shen Mengjing ecb21d35ba docs: Fix some broken links 2025-07-11 16:41:15 +08:00
Song Ruo Jing 3519fbd30b Merge branch 'feature/esp32h4_clock_support' into 'master'
feat(clk): Add basic clock support for esp32h4

Closes IDF-12285, IDF-12912, and IDF-12499

See merge request espressif/esp-idf!40166
2025-07-11 15:51:43 +08:00
Marius Vikhammer 39d2225237 Merge branch 'change/cleanup_deprecated_rtc_h' into 'master'
change(hw_support): removed deprecated headers: rtc.h and soc_memory_types.h

Closes IDF-11951

See merge request espressif/esp-idf!40328
2025-07-11 15:50:49 +08:00
Rocha Euripedes eb8833e285 Merge branch 'fix_mqtt_test_app_broker' into 'master'
fix(mqtt): Adds sdkconfig to use test broker

Closes IDFCI-2987

See merge request espressif/esp-idf!40406
2025-07-11 14:27:00 +08:00
Fu Hanxi 682388487a Merge branch 'ci/apply-idf-ci-1' into 'master'
ci: apply `idf-ci`

Closes IDFCI-2719

See merge request espressif/esp-idf!38755
2025-07-11 07:18:32 +02:00
luweike f22f77b22a docs: Update TCM to SPM for ESP32-P4 memory types 2025-07-11 09:47:38 +08:00
Marius Vikhammer 914fc9f899 test(lp_core): re-enabled C5 lp-core test 2025-07-11 09:45:50 +08:00
Armando (Dou Yiwen) c5a7513cb8 Merge branch 'feat/p4_eco5_fpga' into 'master'
esp32p4: eco5 support on FPGA

See merge request espressif/esp-idf!39917
2025-07-11 01:27:22 +00:00
Marius Vikhammer 374b31049b feat(system): updated H4 reset reasons 2025-07-11 09:24:57 +08:00
Marius Vikhammer 9d48db32d9 change(hw_support): removed deprecated headers: rtc. anmd soc_memory_types.h 2025-07-11 09:20:39 +08:00
Wu Zheng Hui dd980b738d Merge branch 'fix/fix_esp32_core1_access_rtc_fast_in_sleep_code' into 'master'
fix(esp_hw_support): fix esp32 APP_CPU accessing RTCFAST memory in sleep code

Closes IDFGH-15614

See merge request espressif/esp-idf!40452
2025-07-10 21:29:21 +08:00
Erhan Kurubas a083766688 Merge branch 'apptrace_changes' into 'master'
Apptrace improvements

Closes IDF-11982

See merge request espressif/esp-idf!40407
2025-07-10 15:07:36 +02:00
igor.masar 84a5812d55 refactor(usb_phy): Move USB PHY implementation to esp_hw_support
Moved USB PHY source and headers from `usb/` to `esp_hw_support/`
to better reflect their hardware-specific nature.
Replaced use of public GPIO driver APIs with internal LL (Low-Level) APIs
for more precise hardware control and alignment with ESP-IDF HAL best practices.
Deleted deprecated PHY helper functions.
Consolidated all SoC-specific declarations under `usb_periph.h`.

BREAKING CHANGE: deprecated USB PHY APIs have been removed; update
callers to use the new interfaces in esp_hw_support/usb_phy.h
2025-07-10 14:52:47 +02:00
Aditya Patwardhan f8ebe0c936 Merge branch 'feat/enable_memory_region_protection_for_h21' into 'master'
feat(esp_hw_support): Enabled support for memory region protection for H21

Closes IDF-11917

See merge request espressif/esp-idf!39312
2025-07-10 17:13:36 +05:30
Island b87b0dd440 Merge branch 'change/ble_update_lib_20250709' into 'master'
change(ble): [AUTO_MR] 20250709 - Update ESP BLE Controller Lib

Closes BLERP-2067

See merge request espressif/esp-idf!40465
2025-07-10 18:53:05 +08:00
Erhan Kurubas f78d6d6366 change(app_trace): remove extra data buffering feature 2025-07-10 12:39:44 +02:00
Erhan Kurubas a0ef187d10 refactor(apptrace): format apptrace component with astyle 2025-07-10 12:37:41 +02:00
Erhan Kurubas 2bb1ae8729 fix(apptrace): refactor timeout handling logs 2025-07-10 12:37:41 +02:00
Sudeep Mohanty 7204704b53 refactor(esptool_py): Move flash target creation and post-build activities into separate files
This commit trims the idf_build_executable() logic and refactors flash
target creation, utility target creation and post-build target creation
into their own separate cmake files/or functions.
2025-07-10 11:26:28 +02:00
Sudeep Mohanty c29f473a78 refactor(esptool_py): Remove elf variable dependencies
This commit updates all test_apps that have dependency on the elf
variable. Such test_apps now fetch the executable target from the build
properties.
2025-07-10 11:26:28 +02:00
Sudeep Mohanty b6ea668e6e refactor(esptool_py): Removed global scope variables from esptool_py project_include.cmake
This commit global variables such as ESPTOOLPY, ESPSECUREPY, ESPEFUSEPY,
ESPMONITOR and ESPTOOLPY_CHIP from the project_include.cmake file of
esptool_py component. All other components which use these variables
have been updated to fetch the same from esptool_py component's
properties.
2025-07-10 11:26:28 +02:00
Sudeep Mohanty 8582294caf refactor(esptool_py): Move utility target creation to project level
This commit refactors the esptool_py component to provide utility
functions for creating utility targets such as erase_flash, merge-bin
and monitor.

The following changes were done in this commit:
- Added __esptool_py_setup_utility_targets() to create utility targets.
- Utility target creation now happens in idf_build_executable() in
  build.cmake.
- Removed more global scope processing and variables from esptool_py
  component project_include.cmake.
2025-07-10 11:26:28 +02:00
Sudeep Mohanty 3a1f34386c refactor(esptool_py): Move flasher_args.json generation to project level
This commit refactors the esptool_py component to move the
flasher_args.json file generation to the main project level cmake file
when idf_build_executable() runs.
2025-07-10 11:26:28 +02:00
Sudeep Mohanty 7c75795a0b refactor(esptool_py): Move binary generation to project level and add utility functions
This commit refactors the esptool_py component to provide utility
functions for binary file generation targets instead of creating the
targets. Binary generation targets are now moved to the respective
projects.

The following changes were done in this commit:
- Added __idf_build_binary() function to esptool_py to create the binary
  file generation target.
- Added __idf_build_secure_binary() as the secure boot equivalent of the
  above function.
- Top level project build now creates its own binary targets in
  idf_build_executable() in build.cmake.
- Bootloader and esp_tee subprojects create their binary file generation
  targets in their respective CMakeLists.txt files.
- All post-build targets such as the app_size_check target are now
  created by the respective projects and not esptool_py.
- General clean-up of the esptool_py cmake files.
2025-07-10 11:26:28 +02:00
Sudeep Mohanty ef4d6462e2 refactor(esptool_py): Move flash target creation to project level and add utility functions
This commit refactors the esptool_py component to provide utility
functions for flash target management instead of creating the targets
directly. Flash target creation is now moved to the project level in
build.cmake file when idf_build_executable() runs.

The following changes were done in this commit:
- Added __esptool_py_setup_tools(), __esptool_py_setup_estool_py_args()
  and __ensure_esptool_py_setup() functions to centralize esptool_py
  setup.
- Added __esptool_py_setup_main_flash_target() which is called by
  idf_build_executable() to create the flash targets.
- Updated esptool_py_flash_target(), esptool_py_custom_target() to
  accept an optional FILENAME_PREFIX argument to enable creation of
  build artifacts based on custom names.
- Create placeholder flash targets early in the build process when
  idf_build_process() is called for components to add dependencies on
  these targets.
- Moved app-flash target creation from esptool_py/CMakeLists.txt to
  build.cmake.
- Added function description to esptool_py functions.
2025-07-10 11:26:28 +02:00
Sudeep Mohanty 30083e07be refactor(esptool_py): Re-evalute dependencies of esptool_py
This commit establishes the foundation for making the esptool_py
component idempotent.

The following changes are made in this commit:

- Removes unnecessary dependency of esp_wifi component on esptool_py.
- Add missing esptool_py dependencies to components which directly use
  esptool_py specific functions or variables but do not declare a public
  or private dependency.
2025-07-10 11:26:28 +02:00
Song Ruo Jing b3fd9b6afa fix(clk): XTAL_X2 clock is not usable on H21 MPW and H4 BETA5 2025-07-10 16:35:58 +08:00
Song Ruo Jing caa382047b fix(clk): ESP32H21 uses RC_SLOW_D4 as RTC slow clock 2025-07-10 16:35:58 +08:00
Song Ruo Jing 28df79aee8 feat(clk): Add basic clock support for esp32h4 2025-07-10 16:35:53 +08:00
morris ce92b0ab60 Merge branch 'refactor/remove_deprecated_uart_rom_functions' into 'master'
refactor(uart)!: deprecate esp_rom_uart.h

See merge request espressif/esp-idf!39423
2025-07-10 15:56:56 +08:00
Hrushikesh Bhosale dee2895ab4 Merge branch 'feat/added_api_to_get_scartch_buffer_data_in_esp_http_server' into 'master'
Added API to get scratch buffer data in esp_http_server

Closes IDFGH-15185

See merge request espressif/esp-idf!39684
2025-07-10 15:09:15 +08:00
Aditya Patwardhan bfc5e1b234 Merge branch 'feature/store_respnse_status_code_before_header_complete' into 'master'
feat(esp_http_client): Add HTTP_EVENT_ON_STATUS_CODE to notify early status code acquisition

Closes IDF-13452

See merge request espressif/esp-idf!40244
2025-07-10 12:35:10 +05:30
armando bcf04e356b resolve comments, to squash 2025-07-10 06:24:32 +00:00
armando dfb0662de2 feat(esp32p4): support eco5 on fpga 2025-07-10 06:24:32 +00:00
Kapil Gupta 76d24d2fe5 Merge branch 'feat/eap_method_limit' into 'master'
feat(esp_wifi): Add support to limit EAP methods

See merge request espressif/esp-idf!40198
2025-07-10 11:44:14 +05:30
Kapil Gupta 6c309b29e9 feat(esp_wifi): Add support to limit EAP methods 2025-07-10 11:44:14 +05:30
Rahul Tank 798a559f81 fix(nimble): Add a way to make blufi advertising customizable
Based on changes in https://github.com/espressif/esp-idf/pull/8958
2025-07-10 11:26:22 +05:30
wanckl e685007490 fix(ci): c61 eco3 open ci test 2025-07-10 07:33:26 +08:00
Fu Hanxi 586d219934 ci: apply idf-ci for debug pipeline 2025-07-09 15:44:27 +02:00
hrushikesh.bhosale 9f6ab55a5b feat(http_server): Added API to get scratch buffer data
1. Added the API in esp_http_server to get the raw headers data
from the scratch buffer.
2. This data will be unparsed.

Closes https://github.com/espressif/esp-idf/issues/15857
2025-07-09 18:36:52 +05:30
Fu Hanxi 7ada32c39a ci: apply idf-ci for artifacts 2025-07-09 10:33:29 +02:00
Fu Hanxi 15b411270e ci: apply idf-ci on generating child pipelines 2025-07-09 10:33:29 +02:00
Fu Hanxi a5257dcc39 ci: apply idf-ci pytest plugin
Removed

- target markers. Now must use target as parametrization in esp-idf
- host test markers. Now will be automatically added with linux target and qemu marker
2025-07-09 10:33:28 +02:00
Fu Hanxi f33469dd63 ci: apply idf-ci build run
removed script:

- tools/ci/dynamic_pipelines/scripts/child_pipeline_build_apps.py -> idf-ci build run
- tools/ci/ci_build_apps.py -> idf-build-apps build

moved from remove from idf_pytest/constants.py to .idf_build_apps.toml

- DEFAULT_FULL_BUILD_TEST_COMPONENTS
- DEFAULT_FULL_BUILD_TEST_FILEPATTERNS
- DEFAULT_IGNORE_WARNING_FILEPATH
- DEFAULT_BUILD_LOG_FILENAME
- DEFAULT_SIZE_JSON_FILENAME
2025-07-09 10:33:28 +02:00
Fu Hanxi c80d0aded4 ci: apply idf-ci gitlab dynamic-pipeline-variables
Renamed env vars:

- TEST_CASE_FILTERS -> IDF_CI_SELECT_BY_FILTER_EXPR
- BUILD_AND_TEST_ALL_APPS -> IDF_CI_SELECT_ALL_PYTEST_CASES

Removed env vars;

- IS_MR_PIPELINE (could use CI_MERGE_REQUEST_IID)
- REPORT_EXIT_CODE -> IDF_CI_IS_DEBUG_PIPELINE (fail fast)
- PYTEST_IGNORE_COLLECT_IMPORT_ERROR -> always skip import error
2025-07-09 10:33:27 +02:00
Fu Hanxi 0d5b3e60ac ci: remove --enable-pytest from install.sh 2025-07-09 10:33:26 +02:00
Fu Hanxi bc15de99e1 ci: sort tools/ci/exclude_check_tools_files.txt 2025-07-09 10:33:25 +02:00
Fu Hanxi 8ca8f611ef ci: cleanup unused code 2025-07-09 10:33:24 +02:00
wuzhenghui 70825a78af feat(esp_hw_support): add core1 enter deepsleep test case 2025-07-09 14:59:56 +08:00
C.S.M e5f155229e Merge branch 'feature/add_120m_clk' into 'master'
feat(clk): Add 120M pll clock support

See merge request espressif/esp-idf!40456
2025-07-09 14:59:27 +08:00
Tan Yan Quan e451e5566e fix(ieee802154): set rx_when_idle to false when Rx stop 2025-07-09 14:56:12 +08:00
Tan Yan Quan f01806f2b8 fix(ieee802154): initialize nvs before enable ieee802154 2025-07-09 14:55:15 +08:00
Rahul Tank f03521b4f3 Merge branch 'fix/ble_ancs_adding_entry_for_chip' into 'master'
fix(nimble): Add ble_ancs example to build-test-rules.yml

See merge request espressif/esp-idf!40439
2025-07-09 10:06:13 +05:30
Zhou Xiao f1838aeec1 fix(ble): updated rom linker script for ESP32-C2 2025-07-09 11:30:44 +08:00
cjin 3d93ce37da feat(ble): enable broker initialization on ESP32-C6 2025-07-09 11:25:23 +08:00
cjin afee51e0ef feat(ble): enable broker initialization on ESP32-C5 2025-07-09 11:25:23 +08:00
cjin 64f216ae5a feat(ble): enable broker initialization on ESP32-H2 2025-07-09 11:25:23 +08:00
cjin 265a8746dc feat(ble): support memory allocation check debug feature on ESP32-H2 2025-07-09 11:25:23 +08:00
cjin 027766e0c2 feat(ble): support memory allocation check debug feature on ESP32-C6 2025-07-09 11:25:23 +08:00
cjin 1ce54a5fe8 feat(ble): support memory allocation check debug feature on ESP32-C5 2025-07-09 11:25:23 +08:00
cjin 7ef90d4113 feat(ble): support memory allocation check debug feature on ESP32-C2 2025-07-09 11:25:23 +08:00
Zhou Xiao 3d45e8578e change(ble): [AUTO_MR] Update lib_esp32c2 to c7732d48 2025-07-09 11:17:37 +08:00
Zhou Xiao 1e236a1feb change(ble): [AUTO_MR] Update lib_esp32c6 to ca6c20bc 2025-07-09 11:17:37 +08:00
Zhou Xiao 91e8ed2a10 change(ble): [AUTO_MR] Update lib_esp32c5 to ca6c20bc 2025-07-09 11:17:37 +08:00
Zhou Xiao 6a650312d4 change(ble): [AUTO_MR] Update lib_esp32h2 to ca6c20bc 2025-07-09 11:17:37 +08:00
C.S.M 92df25e7c0 Merge branch 'fix/i2c_master_multi_read' into 'master'
fix(i2c_master): Fix that master multi-read failed

Closes IDFGH-15601

See merge request espressif/esp-idf!40336
2025-07-09 10:49:44 +08:00
Marius Vikhammer dea84337f5 Merge branch 'change/bootloader_o0_deprecate' into 'master'
change(bootloader): removed support for CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE

Closes IDF-9025

See merge request espressif/esp-idf!40331
2025-07-09 08:58:54 +08:00
Marius Vikhammer cd48833c16 Merge branch 'bugfix/h4_panic_handler_stuck_fix' into 'master'
fix(system): fixed cpu_stall function stuck issue on H4

Closes IDF-12311

See merge request espressif/esp-idf!40420
2025-07-09 08:57:02 +08:00
Wu Zheng Hui 2461b0ca90 Merge branch 'fix/reinit_c5_clk_tree_after_app_changed' into 'master'
feat(esp_hw_support): manage clock tree hw/sw coherence during CPU reset lazily

See merge request espressif/esp-idf!39677
2025-07-08 23:02:44 +08:00
Erhan Kurubas 52e88763b5 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20250707' into 'master'
feat(tools): update openocd version to v0.12.0-esp32-20250707

See merge request espressif/esp-idf!40396
2025-07-08 14:39:07 +02:00
wuzhenghui 56c2831992 fix(esp_hw_support): fix esp32 APP_CPU accessing RTCFAST memory in sleep code
Closes https://github.com/espressif/esp-idf/issues/16243
2025-07-08 20:33:55 +08:00
nilesh.kale 5cc874068d feat(esp_http_client): added event HTTP_EVENT_ON_STATUS_CODE
This commit added event HTTP_EVENT_ON_STATUS_CODE and
acquire response status code before header or data.
2025-07-08 17:45:18 +05:30
Erhan Kurubas 168d95d1ef change(sysview): drop ESP mcore extension 2025-07-08 13:01:48 +02:00
Erhan Kurubas 6ae68c4f86 feat(sysview): update multicore files for testing 2025-07-08 13:01:48 +02:00
Erhan Kurubas 9af60ff085 change(sysview): set default core name as core0 2025-07-08 13:01:48 +02:00
Erhan Kurubas a6ad633622 feat(sysview): Add SEGGER multicore trace file support 2025-07-08 13:01:48 +02:00
Erhan Kurubas adba62ff7b change(docs): replace deprecated openocd cfg files 2025-07-08 13:01:48 +02:00
Erhan Kurubas 75dd466a3c feat(tools): update openocd version to v0.12.0-esp32-20250707 2025-07-08 13:01:48 +02:00
C.S.M 752c9fc805 feat(clk): Add 120M pll clock support 2025-07-08 18:59:31 +08:00
morris c4d7b1cfce refactor(uart)!: deprcated esp_rom_uart.h 2025-07-08 18:56:17 +08:00
Rahul Tank dffb03f00f Merge branch 'bugfix/fix_gatt_cache_server_compile' into 'master'
fix(nimble): Fix compilation issues when gatt caching is enabled in peripheral only mode

See merge request espressif/esp-idf!40343
2025-07-08 16:04:25 +05:30
zhanghaipeng 48235c7b25 fix(ble/bluedroid): Fix issue causing BTM_GetSecurityFlags failed 2025-07-08 17:12:30 +08:00
Dong Heng 20f1700053 Merge branch 'feature/lcd_cam_dvp_driver_only_gen_clock' into 'master'
feat(esp_driver_cam): DVP driver supports only initializing the clock and XCLK pin to generate a clock for the external device

Closes IDF-13385

See merge request espressif/esp-idf!39837
2025-07-08 16:49:51 +08:00
Astha Verma b8833081a4 fix(nimble): Add ble_ancs example to build-test-rules.yml 2025-07-08 14:07:03 +05:30
Mahavir Jain 8cc71168cf Merge branch 'feature/support_ds_peripheral_rsa_decryption' into 'master'
feat(mbedtls): Add support for RSA decryption with DS peripheral

See merge request espressif/esp-idf!39390
2025-07-08 13:56:03 +05:30
Island d73e172d31 Merge branch 'feat/ble_log_spi_out_dev_phase_4' into 'master'
BLE Log SPI Out Dev Phase 4

Closes BLERP-2033, BLERP-2032, BLERP-2014, BLERP-2019, BLERP-2016, and BLERP-2015

See merge request espressif/esp-idf!40190
2025-07-08 14:01:59 +08:00
nilesh.kale d4167fea60 feat(esp_hw_support): Enabled support for memory region protection for H21
This commit enabled CPU region protection for ESP32H21.
This alos updated strture for ESP32C6 and ESP32H2.
2025-07-08 13:45:01 +08:00
Chen Yu Dong 29ea09ffa0 Merge branch 'ci/update_pre_commit_job' into 'master'
ci: update pre commit jobs

See merge request espressif/esp-idf!40337
2025-07-08 11:59:25 +08:00
wuzhenghui 6124c8e30c fix(esp_hw_support): maintain pll ref_cnt in rtc_clk_cpu_freq_set_config_fast 2025-07-08 11:54:49 +08:00
wuzhenghui ff39ac40a1 feat(esp_hw_support): manage clock tree hw/sw coherence during CPU reset lazily 2025-07-08 11:54:48 +08:00
Island 652fe76dca Merge branch 'bugfix/fix_some_ble_bugs_250610_cjh_esp32c3' into 'master'
Fixed some BLE bugs 250220 on esp32c3(2edb0b0)

Closes BLERP-1961, BLERP-1963, BLERP-1967, BLERP-1986, and BLERP-1973

See merge request espressif/esp-idf!39798
2025-07-08 11:40:37 +08:00
Zhang Shu Xian b151b28573 Merge branch 'docs/update_trans_for_wifi_provisioning' into 'master'
docs: Update CN translation for provisioning.rst

Closes DOC-11694

See merge request espressif/esp-idf!40397
2025-07-08 11:23:20 +08:00
Marius Vikhammer a68022f5be fix(system): fixed cpu_stall function stuck issue on H4
cpu_utility_ll_stall_cpu() used to busy-wait check stalled status
after stalling the core. On H4 it turns out that this status will
not be set if the core happens to be in WFI state when stalled.

If this happened the stall function would just wait forever for
the status.
2025-07-08 10:56:58 +08:00
Wan Lei 8d3758b7e2 Merge branch 'fix/twai_c5_errata_warning' into 'master'
fix(driver_twai): added errata warning for c5 listen only mode

See merge request espressif/esp-idf!40304
2025-07-08 06:47:46 +08:00
Sergei Silnov 16ab070093 ci: bump ubuntu version for release zips workflow 2025-07-07 17:11:47 +02:00
Zhou Xiao 5f3ac91d63 change(ble): upgraded spi log frame header 2025-07-07 19:15:23 +08:00
xiongweichao 28404a6324 feat(bt): Add record_handle in ESP_SDP_REMOVE_RECORD_COMP_EVT 2025-07-07 19:12:00 +08:00
Dong Heng c47b72daed feat(esp_driver_cam): DVP driver supports only initializing the clock and XCLK pin to generate a clock for the external device 2025-07-07 19:04:22 +08:00
Zhou Xiao 6e384644c8 fix(ble): nimble host & hci log write race condition workaround 2025-07-07 18:57:02 +08:00
Zhou Xiao 4946a1fe8d change(ble): support task buffer number configuration 2025-07-07 18:57:02 +08:00
Zhou Xiao b8b7e153a7 fix(ble): update error code in controller init for ESP32-S3/ESP32-C3 2025-07-07 18:57:02 +08:00
Zhou Xiao 6ac541aa4a fix(ble): fixed controller log api call for ESP32-C3/ESP32-S3 2025-07-07 18:57:02 +08:00
Zhou Xiao 0088541f54 change(ble): removed esp log to save code size 2025-07-07 18:56:35 +08:00
Zhou Xiao c60dd1a10e change(ble): enable hci log spi out for ESP chips 2025-07-07 18:56:35 +08:00
Zhou Xiao c0d2792b9d change(ble): enable bluedroid logs over debug level through spi output 2025-07-07 18:56:35 +08:00
Zhou Xiao 066e1d3f1b feat(ble): support ble mesh log module 2025-07-07 18:56:35 +08:00
Zhou Xiao dd4cbe5e00 feat(ble): support host & hci log module 2025-07-07 18:56:35 +08:00
Zhou Xiao d353bf2802 change(ble): replaced ul log codes with template 2025-07-07 18:56:35 +08:00
Zhou Xiao feaee0a6fe change(ble): replaced le audio log codes with template 2025-07-07 18:56:35 +08:00
Zhou Xiao 8b2c176eff change(ble): implemented log module template 2025-07-07 18:56:35 +08:00
Zhou Xiao 56e42be859 change(ble): updated ble log spi out ts sync module
* use freertos ts instead of esp ts for better performance
* enable ts sync sleep support by default
* use esp ts as fallback of lc time getter
2025-07-07 18:56:35 +08:00
Chen Jichang 57cbcf388e docs(lcd): fix the wrong hyperlink in readme
Closes https://github.com/espressif/esp-idf/issues/16389
2025-07-07 18:50:19 +08:00
Chen Jichang 08b75523cb refactor(spi_lcd): detect the bus mode automatically 2025-07-07 18:49:30 +08:00
Peter Dragun adbec6eda2 Merge branch 'feat/espefuse_require_port' into 'master'
feat(tools/efuse): Make port mandatory for eFuse commands

Closes IDF-13378

See merge request espressif/esp-idf!40315
2025-07-07 18:21:13 +08:00
morris bfd0c49a38 Merge branch 'refactor/i3c_hal' into 'master'
refactor(i3c): sync controller data structure with TRM

See merge request espressif/esp-idf!40381
2025-07-07 17:25:11 +08:00
Euripedes Rocha a26a54076f fix(mqtt): Adds sdkconfig to use test broker
Changes the configuration to make test to use internal broker on CI
runs.
2025-07-07 11:10:22 +02:00
Armando (Dou Yiwen) dadd027923 Merge branch 'fix/fix_sdmmc_dma_desc_placement_issue_on_s3' into 'master'
sdmmc: fixed dma desc on psram issue on s3

Closes IDF-13550

See merge request espressif/esp-idf!40307
2025-07-07 08:33:50 +00:00
Zhang Shuxian caffcd70b6 docs: Update CN translation for provisioning.rst 2025-07-07 15:58:13 +08:00
morris d5921d835a Merge branch 'docs/update_unsync_cn_translation' into 'master'
docs: Sync CN translation with EN

Closes DOC-11657

See merge request espressif/esp-idf!40262
2025-07-07 15:53:56 +08:00
C.S.M 7d8d1fb98f test(i2c_master): Add test for master multi read job 2025-07-07 15:43:18 +08:00
C.S.M 0e44dcf2ff fix(i2c_master): Fix that master multi-read failed,
Closes https://github.com/espressif/esp-idf/issues/16231
2025-07-07 15:43:18 +08:00
Zhang Shuxian bc90a2e17d docs: Sync CN translation with EN 2025-07-07 14:08:17 +08:00
Gao Xu 4e7bfc3217 Merge branch 'fix/dvp_cam_gdma_wrong_align' into 'master'
feat(cam): add dvp dma buffer alloc function

See merge request espressif/esp-idf!40326
2025-07-07 14:03:31 +08:00
C.S.M 35cb68504b Merge branch 'doc/update_tsens_doc' into 'master'
doc(temperature_sensor): Update temperature snesor docs, remove inaccurate part

See merge request espressif/esp-idf!40369
2025-07-07 13:42:56 +08:00
Ashish Sharma 466a365a02 feat(mbedtls): adds support for RSA decryption with DS peripheral 2025-07-07 13:32:06 +08:00
gaoxu ee3de247e2 feat(cam): add camera buffer alloc function 2025-07-07 11:23:07 +08:00
morris 4a5c630994 refactor(i3c): sync controller data structure with trm 2025-07-07 10:46:03 +08:00
Wang Meng Yang 8bca0ba4fb Merge branch 'fix/incorrect_unit_of_cpb_rx_clk' into 'master'
fix(bt): fixed the incorrect unit of clk in cpb rx event

See merge request espressif/esp-idf!40363
2025-07-07 10:29:22 +08:00
armando df7b39da34 fix(sdmmc): fixed dma desc on psram issue on s3 2025-07-07 10:24:22 +08:00
Gao Xu 6de2b7a58d Merge branch 'ci/enable_emmc_test_on_p4' into 'master'
Ci/enable emmc test on p4

See merge request espressif/esp-idf!40269
2025-07-07 09:54:54 +08:00
Jiang Jiang Jian 48b84cebbe Merge branch 'bugfix/update_ld_files_of_esp32c5' into 'master'
bugfix/fix 11a rate index incorrect and twt sleep issue

See merge request espressif/esp-idf!40264
2025-07-06 15:13:42 +08:00
Jiang Jiang Jian bacb0ce230 Merge branch 'bugfix/fix_c5_tx_pkt_failed' into 'master'
fix(pm): fix c5 tx pkt failed

Closes PM-433 and PM-475

See merge request espressif/esp-idf!40323
2025-07-06 15:08:25 +08:00
Jack 279ac417c5 use 240MHz PLL when necessary 2025-07-05 23:48:33 +08:00
yinqingzhao 9ec9b05163 fix(twt): fix some issus related itwt 2025-07-05 18:03:31 +08:00
Rahul Tank 9df0cb7150 fix(nimble): Fix compilation issues when gatt caching is enabled in server only mode 2025-07-05 15:28:28 +05:30
Rahul Tank c513e95845 Merge branch 'bugfix/handle_3e_rem_feat_read_name' into 'master'
fix(nimble): Handle 0x3e disconnect during rem feat/ read version

See merge request espressif/esp-idf!38871
2025-07-05 14:52:06 +05:30
Mahavir Jain a125326ce8 Merge branch 'fix/remove_mbedtls_gcc_15_cflag' into 'master'
fix(mbedtls): remove Wunterminated-string-initialization

Closes IDF-13375

See merge request espressif/esp-idf!40362
2025-07-04 21:42:38 +05:30
C.S.M 96283dd044 doc(temperature_sensor): Update temperature snesor docs, remove inaccurate part 2025-07-04 18:11:47 +08:00
sibeibei 2cb1fc4365 fix(pm): fix c5 tx pkt failed 2025-07-04 17:54:54 +08:00
yinqingzhao 2325ad7ac1 fix(wifi): update ld files of esp32c5 2025-07-04 16:56:44 +08:00
gongyantao 16f87fb8c8 fix(bt): fixed the incorrect unit of clk in cpb rx event 2025-07-04 14:29:02 +08:00
Jiang Jiang Jian 0fde8d2012 Merge branch 'bugfix/delay_eap_start' into 'master'
fix(wpa_supplicant): Add some fixes for wpa_supplicant

Closes WIFI-6874 and WIFI-6905

See merge request espressif/esp-idf!39750
2025-07-04 14:08:22 +08:00
Island 63f7d7eadf Merge branch 'bugfix/fix_ble_aa_check_v2' into 'master'
Optimize check Access Address when receive connection request PDU

Closes BLERP-2036

See merge request espressif/esp-idf!40162
2025-07-04 14:03:44 +08:00
Mahavir Jain 7c792377e9 fix(mbedtls): remove Wunterminated-string-initialization
- Fixed in upstream release 3.6.4
- Addressed few typos in Kconfig
2025-07-04 09:59:20 +05:30
Marius Vikhammer 3751479217 change(bootloader): removed support for CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE 2025-07-04 12:16:57 +08:00
Mahavir Jain 3f9a8953c4 Merge branch 'doc/update_esp_https_ota_pre_encrypted_doc' into 'master'
docs(system/esp_https_ota): adds ECIES-256 to pre-enc ota design doc

See merge request espressif/esp-idf!39515
2025-07-04 09:35:04 +05:30
Mahavir Jain 5301d39fa7 Merge branch 'feat/update_mbedtls_3.6.4' into 'master'
feat(mbedtls): update to version 3.6.4

See merge request espressif/esp-idf!40272
2025-07-04 09:33:13 +05:30
Kapil Gupta f90f7a5c85 fix (esp_wifi): Set default akm as eap for non AKM APs 2025-07-04 11:04:41 +08:00
Kapil Gupta eae83f993e fix(wpa_supplicant): Delay sending of EAP_START for EAP auth 2025-07-04 11:04:41 +08:00
Aditya Patwardhan 9820fd1d9f Merge branch 'fix/esp_key_mgr_incorrect_overlapping_comparisons' into 'master'
Fix incorrect overlapping comparisons in key manager driver

See merge request espressif/esp-idf!40344
2025-07-04 08:27:07 +05:30
Peter Dragun 24a8797409 change: Fix linting errors in serial_ext.py 2025-07-03 16:15:24 +02:00
Peter Dragun b184766aa4 feat(tools/efuse): Make port mandatory for eFuse commands
BREAKING CHANGE:

Autodetection was removed from idf.py efuse* commands to prevent accidental use of the wrong port.
2025-07-03 16:15:22 +02:00
Peter Dragun 5741a3a0e1 feat(tools/requirements): Add IDE requirements files 2025-07-03 13:22:53 +02:00
Wang Ning 4bdd6b6f7b Merge branch 'contrib/github_pr_16236' into 'master'
docs: Fix idf_component_register  reference CN translation (GitHub PR)

Closes IDFGH-15606

See merge request espressif/esp-idf!40342
2025-07-03 18:54:27 +08:00
ESPCI_TOKEN 993f9622c2 docs: Fix idf_component_register reference CN translation (GitHub PR) 2025-07-03 18:54:27 +08:00
harshal.patil dce0925f40 fix(esp_security/esp_key_mgr): Incorrect overlapping comparisons 2025-07-03 15:05:50 +05:30
Song Ruo Jing d6894a1769 Merge branch 'refactor/remove_legacy_sdm_driver' into 'master'
remove(legacy_sdm)!: remove legacy sdm driver in IDF v6.0

Closes IDF-13174

See merge request espressif/esp-idf!40294
2025-07-03 17:26:02 +08:00
Jiang Jiang Jian 54fe3373ed Merge branch 'chip/add_wifi_support_for_esp32c61_eco3_rebase_master' into 'master'
feat(wifi): add esp32c61 eco3 wifi support

Closes IDF-9244, IDF-9245, IDF-9246, IDF-9247, IDF-9248, IDF-9250, IDF-9513, IDF-10382, IDF-10384, IDF-11003, IDF-11004, IDF-10643, IDF-10642, IDF-10619, IDF-10634, IDF-10632, IDF-10636, IDF-10637, IDF-10626, IDF-10620, IDF-10621, IDF-10623, IDF-10635, IDF-10629, IDF-10622, IDF-10624, and IDF-10625

See merge request espressif/esp-idf!39720
2025-07-03 16:44:35 +08:00
Jiang Jiang Jian 2bd39311b4 Merge branch 'fix/force_enable_uart0_sclk_in_esp_restart' into 'master'
fix(esp_system): force enable uart0 sclk in esp_restart

Closes PM-423 and PM-424

See merge request espressif/esp-idf!40196
2025-07-03 16:43:04 +08:00
gaoxu 26fe24b890 ci(emmc): enable emmc example test on ESP32-P4 2025-07-03 15:42:59 +08:00
Zhang Wen Xu f9c7d37af7 Merge branch 'feat/support_disable_pll_track' into 'master'
Support disable pll track

See merge request espressif/esp-idf!39980
2025-07-03 06:23:49 +00:00
Chen Ji Chang 2200f30323 Merge branch 'refactor/remove_essl_component' into 'master'
remove(essl): remove essl related files

Closes IDF-13433

See merge request espressif/esp-idf!40261
2025-07-03 13:54:15 +08:00
Chen Yudong 3b91d7edc5 ci: update pre commit jobs 2025-07-03 13:11:52 +08:00
Laukik Hase 95efe53cde Merge branch 'ci/tee_apm_pms_test_app' into 'master'
ci(hal): Add HAL/LL-based test app for the TEE and APM peripherals

Closes IDF-8614, IDF-8615, IDF-9229, IDF-9230, IDF-10422, IDF-12646, IDF-12647, IDF-12648, IDF-12649, and IDF-12877

See merge request espressif/esp-idf!39873
2025-07-03 10:08:58 +05:30
renpeiying 7cfcb9308b docs: Update CN translation for esp_http_ota.rst 2025-07-03 12:19:47 +08:00
Mahavir Jain 09202785f8 Merge branch 'contrib/github_pr_16202' into 'master'
fix(esp_http_server): Fix regression in httpd_cookie_key_value introduced by commit 4a47cf8 (GitHub PR)

Closes IDFGH-15573

See merge request espressif/esp-idf!40230
2025-07-03 09:35:00 +05:30
wanckl 579373d5bb fix(driver_twai): added errata warning for c5 listen only mode 2025-07-03 11:53:39 +08:00
Armando (Dou Yiwen) bfe5caf58f Merge branch 'doc/update_32b_addr_limit_in_flash_doc' into 'master'
flash: updated 32bit addr support related doc

See merge request espressif/esp-idf!40290
2025-07-03 03:39:46 +00:00
Chen Jichang 5909a4d685 remove(essl): remove essl related files 2025-07-03 11:36:45 +08:00
Ashish Sharma 9c546002cb feat(mbedtls): update to version 3.6.4 2025-07-03 11:23:34 +08:00
armando bd55fc8a02 doc(flash): updated 32bit addr support doc 2025-07-03 10:34:36 +08:00
zhanghaipeng a663a87fe0 fix(bt/ble): Update esp32 libbtdm_app.a (3a27e2e)
- Optimize check Access Address when receive connection request PDU
2025-07-03 10:26:48 +08:00
Hrushikesh Bhosale b9c224215e Merge branch 'fix/wifi_prov_mgr_deinit_return_type_fixed' into 'master'
fix(wifi_prov_mgr): Fixed wifi_prov_mgr_deinit api return type

Closes IDF-8204

See merge request espressif/esp-idf!39220
2025-07-03 08:00:10 +08:00
Rahul Tank 1140c638c3 fix(nimble): Handle 0x3e disconnect during rem feat/ read version 2025-07-02 16:45:15 +05:30
Chen Ji Chang 22cfc7ef57 Merge branch 'fix/pcnt_miss_accum_value_when_overflow' into 'master'
fix(pcnt): fix the accum_value missing when overflow

See merge request espressif/esp-idf!39967
2025-07-02 19:07:53 +08:00
Rahul Tank 90b88aff5c Merge branch 'bugfix/add_missing_unlock' into 'master'
fix(nimble): Add missing ble_hs_unlock() call

See merge request espressif/esp-idf!40163
2025-07-02 16:20:43 +05:30
hrushikesh.bhosale ccbb885c81 fix(wifi_prov_mgr): Fixed wifi_prov_mgr_deinit api return type
1. Updated the return type for wifi_prov_mgr_deinit api from void
to esp_err_t.
2. Due to void type unable to trace the api failure.
2025-07-02 15:14:53 +05:30
Wu Zheng Hui 60d9ca995c Merge branch 'feat/new_api_to_get_all_wakeup_causes' into 'master'
feat: add new api to get multiple wakeup causes

Closes PM-472

See merge request espressif/esp-idf!40139
2025-07-02 17:36:30 +08:00
Wang Meng Yang 0e92b38244 Merge branch 'bugfix/bt_sleep_log_consistent' into 'master'
fix(ble): keep the log of the bluetooth sleep clock source consistent

See merge request espressif/esp-idf!40281
2025-07-02 17:32:27 +08:00
Zhang Shu Xian 4527c3a7a7 Merge branch 'docs/add_index_page_for_adc' into 'master'
docs: Add index page for ADC

See merge request espressif/esp-idf!40079
2025-07-02 17:17:18 +08:00
Song Ruo Jing a45b684b81 remove(legacy_sdm): remove legacy sdm driver in IDF v6.0 2025-07-02 15:36:29 +08:00
Island 5b11d5b26a Merge branch 'change/ble_update_lib_20250630' into 'master'
change(ble): [AUTO_MR] 20250630 - Update ESP BLE Controller Lib

Closes BLERP-2051, BLERP-2040, BLERP-2052, BLERP-2053, BLERP-2054, BLERP-1800, BLERP-2047, BLERP-2038, BLERP-2037, BLERP-2017, BLERP-2055, and BLERP-2056

See merge request espressif/esp-idf!40253
2025-07-02 14:57:03 +08:00
iranl 42704821d2 fix(esp_http_server): Fix regression in httpd_cookie_key_value
Fix regression in httpd_cookie_key_value introduced by commit 4a47cf8
2025-07-02 08:39:20 +02:00
Zhang Shuxian c26a6f7830 docs: Add index page for ADC 2025-07-02 14:10:57 +08:00
Chen Jichang 6720cf769e fix(pcnt): fix the accum_value missing when overflow 2025-07-02 11:27:15 +08:00
Wan Lei 323e94257d Merge branch 'fix_c5_spi_master_slave_rx_issue' into 'master'
fix(driver_spi): fixed c5/c61/h21 rx issue and support c61 eco3 changes

Closes IDF-12880 and IDF-9300

See merge request espressif/esp-idf!40026
2025-07-02 10:57:09 +08:00
Zhang Shu Xian dc51f79036 Merge branch 'docs/update_trans_for_migration_guides' into 'master'
docs: Provide translation for toolchain

Closes DOC-11604

See merge request espressif/esp-idf!40219
2025-07-02 10:51:50 +08:00
Laukik Hase 15a4d63441 ci(hal): Add HAL/LL-based test app for the TEE and APM peripherals 2025-07-01 17:27:46 +05:30
Laukik Hase d8601f8245 feat(hal): Add CPU_APM support for ESP32-C61 2025-07-01 17:27:45 +05:30
Sonika Rathi 37733a877c Merge branch 'fix/sdspi_cmd52_error' into 'master'
fix(sdmmc): fix sdmmc initialization issue caused by CMD52 CRC error

See merge request espressif/esp-idf!40111
2025-07-01 19:35:48 +08:00
xiongweichao c2d666a6d9 fix(ble): keep the log of the bluetooth sleep clock source consistent 2025-07-01 19:17:20 +08:00
Wu Zheng Hui 450baac52d Merge branch 'feat/support_esp32h4_pmu' into 'master'
feat(esp_hw_support): add esp32h4 pmu initial support

Closes PM-447

See merge request espressif/esp-idf!39867
2025-07-01 17:14:11 +08:00
chenjianhua ad71a2cd33 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(2edb0b0)
- Fixed TX issue when the event is aborted
- Fixed BLE assert llc_llcp.c 487
- Fixed BLE assert sch_prog.c 304
- Fixed anonymous extended adv reporting
- Support vendor HCI related params reset
2025-07-01 16:18:09 +08:00
C.S.M 5aa9d6aeb8 Merge branch 'fix/make_nack_log_debug_lvl' into 'master'
fix(i2c): Make i2c nack log as debug level

See merge request espressif/esp-idf!40221
2025-07-01 15:35:16 +08:00
Adam Múdry a9c5a2ae4a Merge branch 'feat/perf_benchmark_support_esp32p4' into 'master'
feat(storage): Update emmc and perf_benchmark example to work with ESP32-P4, fix SDMMC slot deinit bug in legacy driver

Closes IDF-13394 and IDF-13483

See merge request espressif/esp-idf!39826
2025-07-01 08:59:53 +02:00
Zhang Shuxian 7462166a8d docs: Provide translation for toolchain 2025-07-01 14:23:00 +08:00
Harshal Patil 78faa2535c Merge branch 'feat/support_key_manager_esp32c5' into 'master'
Support key manager esp32c5

Closes IDF-12626, IDF-12628, IDF-12629, IDF-8621, IDF-9007, IDF-12855, IDF-9070, IDF-7902, and IDF-7548

See merge request espressif/esp-idf!38894
2025-07-01 11:36:19 +05:30
Mahavir Jain 5aff8a9d11 Merge branch 'bugfix/ota_failing_for_aws_signed_url_with_partial_download_enabled' into 'master'
fix(esp_http_client): Fix OTA failure with partial download enabled

Closes IDF-12590

See merge request espressif/esp-idf!37843
2025-07-01 09:39:52 +05:30
Song Ruo Jing dc527fbad2 Merge branch 'bugfix/uart_release_pin' into 'master'
fix(uart): fix release pin logic if switching only specific pins

See merge request espressif/esp-idf!40199
2025-07-01 11:22:56 +08:00
Zhou Xiao cbe6f68d3c fix(ble): ensure ble controller disable safety for ESP32-C2 2025-07-01 10:45:36 +08:00
wuzhenghui 971787f0cb feat(esp_hw_support): add esp32h4 pmu initial support 2025-07-01 10:40:20 +08:00
Shu Chen e5d11d11f9 Merge branch 'fix_br_selfhosted_address' into 'master'
feat(openthread): move mesh local address judeging function to public

See merge request espressif/esp-idf!40229
2025-07-01 02:28:22 +00:00
zwl 7b1a7cc4c3 fix(ble): fixed occasional assert triggered during controller disable on ESP32-C2 2025-07-01 10:17:28 +08:00
Xu Si Yu 611176d857 Merge branch 'feat/rcp_over_usb' into 'master'
feat(openthread): support rcp based on USB Serial JTAG

See merge request espressif/esp-idf!40189
2025-07-01 10:09:52 +08:00
zwl 6fac09d0c3 change(ble): [AUTO_MR] Update lib_esp32c2 to 9af627ef 2025-06-30 21:43:42 +08:00
zwl 736cd84967 change(ble): [AUTO_MR] Update lib_esp32c6 to d2d70d40 2025-06-30 21:43:42 +08:00
zwl 8d55aca9e7 change(ble): [AUTO_MR] Update lib_esp32c5 to d2d70d40 2025-06-30 21:43:41 +08:00
zwl 1671932345 change(ble): [AUTO_MR] Update lib_esp32h2 to d2d70d40 2025-06-30 21:43:41 +08:00
Chen Dejin 4aa70712fa fix(openthread/discovery): use mesh local for self-hosted service if OMR is not preferred
* esp-openthread: thread_zigbee/esp-openthread@f54481eb0
* openthread: espressif/openthread@b945928d7
* esp-idf: espressif/esp-idf@2bca368b1
2025-06-30 12:13:19 +00:00
Simonas Kazlauskas 51bcec7ac6 feat(openthread): support rcp based on USB Serial JTAG 2025-06-30 20:12:49 +08:00
morris 76cec451ce Merge branch 'fix/twai_fix_clock_sel_and_c5_errata' into 'master'
fix(driver_twai): fixed clock sel and c5 listen only mode errata

Closes IDF-13144 and IDF-13059

See merge request espressif/esp-idf!40057
2025-06-30 19:42:52 +08:00
wanckl c6e18383b7 feat(driver_spi): c61 eco3 support master rx sample phase config 2025-06-30 19:32:11 +08:00
wanckl a48afb4711 fix(driver_spi): fixed c5/c61/h21 eco spi master rx and slave rx issue 2025-06-30 19:31:17 +08:00
Aditya Patwardhan 9f5c9c7ef6 Merge branch 'feat/adding_hidden_config_for_dynamic_buffer_control_configuration' into 'master'
feat(esp_tls): Added hidden config in esp-tls for dynamic buffer strategy configuration

See merge request espressif/esp-idf!40172
2025-06-30 16:26:03 +05:30
chendejin 2bca368b1e feat(openthread): move mesh local address judeging function to public 2025-06-30 17:25:13 +08:00
Roman Leonov 7fbe72ca27 refactor(usb_host_example): Added opening only for device with proto 2025-06-30 11:19:42 +02:00
Song Ruo Jing 74c36f7660 Merge branch 'feature/esp32h4_regi2c_support' into 'master'
feat(regi2c): add regi2c support for esp32h4

Closes IDF-12315

See merge request espressif/esp-idf!39966
2025-06-30 16:22:58 +08:00
Ashish Sharma 0fa17c40a6 docs(system/esp_https_ota): adds ECIES-256 to pre-enc ota design doc 2025-06-30 16:04:45 +08:00
Armando (Dou Yiwen) a08dff3a5e Merge branch 'change/h21_cache_reg_update' into 'master'
cache: updated cache registers for h21

See merge request espressif/esp-idf!40186
2025-06-30 08:01:57 +00:00
C.S.M 94765b5b7f Merge branch 'contrib/github_pr_16211' into 'master'
fix(temperature_sensor): remove spurious printf (GitHub PR)

Closes IDFGH-15581

See merge request espressif/esp-idf!40218
2025-06-30 15:19:13 +08:00
Mahavir Jain a1b9581a7a Merge branch 'contrib/github_pr_16204' into 'master'
docs(esp_http_client): fix chunky function name (GitHub PR)

Closes IDFGH-15575

See merge request espressif/esp-idf!40212
2025-06-30 12:19:00 +05:30
C.S.M 6c2266473c fix(i2c): Make i2c nack log as debug level 2025-06-30 14:48:58 +08:00
C.S.M c7b069781d Merge branch 'bugfix/fix_io_mux_reg_c61' into 'master'
fix(io_mux): Fix io_mux register on c61

See merge request espressif/esp-idf!40191
2025-06-30 14:26:40 +08:00
nilesh.kale caf828dfaf fix(esp_http_client): Fix OTA failure with partial download enabled
This commit fixes an issue encountered during OTA when partial download
is enabled using an AWS signed URL restricted to GET requests.
It also adds an API to retrieve the OTA image size from the Content-Range header.
2025-06-30 11:18:26 +05:30
nilesh.kale 3e46a73964 fix(esp_https_ota): Check and handle missing image length in OTA HTTP response 2025-06-30 11:13:27 +05:30
Mahavir Jain 1f4612ec7a Merge branch 'feat/support_cross_signed_root_certs' into 'master'
feat(esp_crt): adds support for cross signed root certificates

Closes IDF-13364

See merge request espressif/esp-idf!39797
2025-06-30 10:15:54 +05:30
hrushikesh.bhosale 9c151bcd01 feat(esp_tls): Added hidden config in esp-tls for dynamic buffer strategy configuration
Added the hidden config in the esp-tls component for the dynamic buffer
strategy configuration feature. So that external components like ota
can findout whether this feature is supported or not
2025-06-28 13:17:47 +05:30
Chris Wedgwood eda25c2ebb fix(temperature_sensor): remove spurious printf
remove accidentally included debugging
2025-06-27 23:27:27 -07:00
Richard Allen 561b325a0d docs(esp_http_client): fix chunky function name 2025-06-27 14:55:55 -05:00
wanckl af6f1dcaaa fix(driver_twai): fixed clock source enable/disable 2025-06-27 22:08:24 +08:00
wanckl e6fcaf4e34 fix(driver_twai): fixed c5 listenonly mode errata, add rx buffer check 2025-06-27 22:08:21 +08:00
Song Ruo Jing ec358cfd7c fix(light_sleep/example): fix potential compilation error in light_sleep example
If ESP_CONSOLE_NONE is selected in menuconfig, compilation fails with
undefined CONFIG_ESP_CONSOLE_UART_BAUDRATE macro.
2025-06-27 21:53:54 +08:00
Song Ruo Jing 85f0da63fc fix(uart): fix release pin logic if switching only one pin 2025-06-27 21:53:54 +08:00
Laukik Hase 7f7d0afe40 Merge branch 'fix/esp_tee_coverity_issues' into 'master'
fix(esp_tee): Fix coverity issue from the `attestation` component

Closes IDF-12867

See merge request espressif/esp-idf!40054
2025-06-27 18:24:24 +05:30
wuzhenghui f5cd1d848a fix(esp_system): LOGD for the log printing in sleep process 2025-06-27 20:53:23 +08:00
wuzhenghui 5436d1f0c4 fix(esp_system): force enable uart0 sclk in esp_restart 2025-06-27 20:04:13 +08:00
Rocha Euripedes 01e990e166 Merge branch 'mqtt_event_suback_reason_code' into 'master'
feat(mqtt): Add reason code to SUBSCRIBED event in examples

Closes IDF-6430

See merge request espressif/esp-idf!39970
2025-06-27 18:08:05 +08:00
harshal.patil bba1448128 feat(esp_key_mgr): Support PSRAM XTS-AES key deployments using Key Manager 2025-06-27 15:15:26 +05:30
harshal.patil ffefa9902d test(mbedtls): Extend the mbedtls ecdsa tests 2025-06-27 15:15:26 +05:30
harshal.patil eb7c5654f6 test(esp_security): Extend the key manager tests 2025-06-27 15:15:26 +05:30
harshal.patil ea322ee6ef test(hal/crypto): Add HMAC and DS using Key Manager key tests
- Also updated the test app to use esp_crypto_periph_clk.h
2025-06-27 15:15:26 +05:30
harshal.patil 6ca4d621b5 test(crypto): Change partition address and update the test cases
- Also format key manager test cases generation script
2025-06-27 15:15:26 +05:30
harshal.patil 50c41c3b59 change(esp_key_mgr): Refactor Key Manager driver to reduce logs 2025-06-27 15:15:26 +05:30
harshal.patil a7af364112 fix(esp_security): Power up MPI memory registers when enabling MPI
Co-authored-by: Li HongXi <lihongxi@espressif.com>
2025-06-27 15:15:26 +05:30
harshal.patil 33d8c05d95 feat(esp_key_mgr): Support Digital Signature key deployments using Key Manager 2025-06-27 15:15:26 +05:30
harshal.patil 265b0d7579 feat(esp_key_mgr): Support HMAC key deployments using Key Manager 2025-06-27 15:15:26 +05:30
harshal.patil 8ab6b4d694 fix(esp_security/esp_key_mgr): Recharge HUK before the first usage 2025-06-27 15:15:26 +05:30
harshal.patil a7c7b75dfd feat(soc): Update ESP32-C5's key manager reg and struct files to ECO2
- Also added a new soc_cap to denote if key manager key deployment is available
2025-06-27 15:15:26 +05:30
Aditya Patwardhan 662d793f37 feat(esp_security): Added support for key manager for esp32c5 2025-06-27 15:15:26 +05:30
Song Ruo Jing cde716e093 feat(regi2c): add regi2c support for esp32h4 2025-06-27 17:18:33 +08:00
wuzhenghui ed12f896f9 feat(doc): add migration-guides for esp_sleep_get_wakeup_causes 2025-06-27 16:18:14 +08:00
wuzhenghui 879713d589 change(esp_hw_support): deprecate esp_sleep_get_wakeup_cause with esp_sleep_get_wakeup_causes 2025-06-27 16:18:10 +08:00
C.S.M ce75f77d7f fix(io_mux): Fix io_mux register on c61 2025-06-27 16:12:20 +08:00
wuzhenghui 5ba8b5e3dc feat(esp_hw_support): add new API to get all wakeup sources 2025-06-27 14:07:02 +08:00
Xu Si Yu 5103944449 feat(openthread): disable esp32c61 support for ot_br example 2025-06-27 14:05:18 +08:00
yinqingzhao c1c78f5838 feat(wifi): add esp32c61 eco3 wifi support 2025-06-27 14:04:55 +08:00
yinqingzhao f336022a94 feat(phy): update libphy for esp32c61 support 2025-06-27 14:00:21 +08:00
Li Shuai 8205a4808b change(esp_phy): update phy retention context for esp32c61 2025-06-27 14:00:07 +08:00
wuzhenghui bc5bef5556 feat(esp_hw_support): fix some issues and update esp32c61 eco3 sleep features 2025-06-27 13:59:53 +08:00
wuzhenghui 8bd81b2bfd feat(esp_hw_support): update pmu sleep parameters and register header and structure file for esp32c61 2025-06-27 13:59:43 +08:00
wuzhenghui 0a25960783 feat(soc): update modem syscon and lpcon register header and structure file for esp32c61 2025-06-27 13:59:35 +08:00
Jiang Jiang Jian 7e570d246c Merge branch 'bugfix/add_the_cve_2025_52471_to_list' into 'master'
fix(wifi): Added CVE-2025-52471 to vulnerabilities list

See merge request espressif/esp-idf!39979
2025-06-27 12:34:00 +08:00
Island dad2c53347 Merge branch 'change/ble_update_lib_20250613' into 'master'
change(ble): [AUTO_MR] 20250613 - Update ESP BLE Controller Lib

Closes BLERP-1992, BLERP-1988, BLERP-1902, BLERP-1977, BLERP-1993, BLERP-1995, and BLERP-1994

See merge request espressif/esp-idf!39872
2025-06-27 11:09:57 +08:00
Island b0ad04b144 Merge branch 'fix/ensure_internal_mem_for_ble_log_spi_out' into 'master'
fix(ble): ensure internal malloc in ble log spi out

Closes BLERP-2025

See merge request espressif/esp-idf!40167
2025-06-27 10:44:50 +08:00
armando 15331216d5 change(cache): updated cache registers 2025-06-27 10:34:22 +08:00
zhangyanjiao 8c8eced34a fix(wifi): Added CVE-2025-52471 to vulnerabilities list 2025-06-27 09:51:12 +08:00
Omar Chebib f496b43943 Merge branch 'bugfix/task_wdt_not_checking_ret' into 'master'
fix(esp_system): task wdt now checks the interrupt allocator return value

Closes IDF-13478

See merge request espressif/esp-idf!40155
2025-06-27 09:42:51 +08:00
Jiang Jiang Jian dce4ca71cb Merge branch 'bugfix/fix_the_mesh_crash_issue_when_changing_authmode' into 'master'
fix(wifi/mesh): fixed the mesh crash issue when changing mesh AP's authmode

Closes WIFIBUG-1274 and IDFGH-15387

See merge request espressif/esp-idf!40165
2025-06-27 00:19:12 +08:00
David Čermák 84b969ecea Merge branch 'feat/menuconfig_for_rio_enable' into 'master'
feat(lwip/config): add menuconfig option to enable ND6 RIO support and set the RIO cache size

Closes IDFGH-13888

See merge request espressif/esp-idf!39488
2025-06-26 22:13:57 +08:00
Adam Múdry 20313f82e6 feat(storage): Update emmc and perf_benchmark example to work with ESP32-P4 2025-06-26 14:00:23 +02:00
Adam Múdry 7154cd3173 feat(sdmmc): Add ESP32-P4 eMMC test board definition 2025-06-26 14:00:22 +02:00
Adam Múdry 1ab7235b9e fix(sdmmc): Legacy driver slot deinit set NULL after free 2025-06-26 14:00:22 +02:00
glmfe 23572e043e fix(tcp_transport): off-by-one buffer corruption when WS header buffer full
- Fix out of boundaries access
 - Improve test cases to cover this issue
2025-06-26 08:05:46 -03:00
Gao Xu 7aca624322 Merge branch 'fix/fix_adc_cali_second_step_error' into 'master'
fix(adc): fix ESP32-C5 adc calibration error

See merge request espressif/esp-idf!40107
2025-06-26 17:41:57 +08:00
Tomas Rezucha 1bbf04cb4c Merge branch 'refactor/remove_old_usb_pins' into 'master'
refactor(usb): Remove deprecated USB pin definitions

Closes IDF-9029

See merge request espressif/esp-idf!40144
2025-06-26 11:22:01 +02:00
Lv Xin Yue d846ca2ee6 Merge branch 'docs/update_deep_sleep_stub' into 'master'
fix(docs): Add time measuring methods

Closes DOC-4733

See merge request espressif/esp-idf!40004
2025-06-26 17:11:13 +08:00
Zhou Xiao d300617aa6 fix(ble): ensure internal malloc in ble log spi out 2025-06-26 16:11:16 +08:00
Ashish Sharma cabb5009f2 feat(esp_crt): adds support for cross signed root certificates 2025-06-26 16:01:11 +08:00
zhangyanjiao 8ed26569d1 fix(wifi/mesh): fixed the mesh crash issue when changing mesh AP's authmode
fix(wifi/mesh): fixed the esp_mesh_scan_get_ap_record() error in chain toplogy
Closes https://github.com/espressif/esp-idf/issues/16041
2025-06-26 14:55:14 +08:00
cjin e44f1373a0 feat(ble): add sm count reserve cnt setting on ESP32-H2 2025-06-26 14:54:53 +08:00
cjin ab92fef5be feat(ble): add sm count reserve cnt setting on ESP32-C6 and ESP32-C61 2025-06-26 14:54:53 +08:00
cjin 3d96faae5d feat(ble): add sm count reserve cnt setting on ESP32-C5 2025-06-26 14:54:53 +08:00
Lv Xin Yue ee4026b355 fix(docs): Add time measuring methods 2025-06-26 14:18:49 +08:00
Rahul Tank e8d24d0525 fix(nimble): Add missing ble_hs_unlock() call 2025-06-26 10:35:34 +05:30
Jiang Jiang Jian 7f325d47bf Merge branch 'bugfix/ignore_duplicated_offchan_error' into 'master'
fix(wifi): ignore duplicated offchan error, add coex wifi event imm

Closes TZ-1846, WIFIBUG-1279, WIFIBUG-1276, WIFIBUG-1283, WIFIBUG-1273, and WIFIBUG-1278

See merge request espressif/esp-idf!40062
2025-06-26 12:09:37 +08:00
Omar Chebib 20da6a9a5c fix(esp_system): task wdt now checks the interrupt allocator return value 2025-06-26 11:38:38 +08:00
morris 95b303cd8a Merge branch 'test/twai_new_driver_add_interactive_test' into 'master'
test(driver_twai): new driver add interctive test

See merge request espressif/esp-idf!39043
2025-06-26 11:27:30 +08:00
Armando (Dou Yiwen) 33821d1799 Merge branch 'change/remove_mmap_paddr_remap_warning_log' into 'master'
mmu: remove paddr remap warning log

See merge request espressif/esp-idf!40123
2025-06-26 03:18:29 +00:00
Alexey Lapshin 0223bfe530 Merge branch 'feature/update-toolchain-to-esp-15.1.0_20250607' into 'master'
feat(tools): update toolchain version to esp-15.1.0_20250607

See merge request espressif/esp-idf!39728
2025-06-26 06:32:54 +04:00
Shu Chen c976203214 Merge branch 'feat/call_meshcop_mdns_publish_in_idf' into 'master'
Handle MeshCoP mDNS service in state change callback, update OpenThread upstream

See merge request espressif/esp-idf!39517
2025-06-26 01:45:21 +00:00
Wei Yu Han 7ee40d6640 Merge branch 'docs/update_ble_feature_status_latest' into 'master'
Updated BLE feature status

See merge request espressif/esp-idf!38980
2025-06-26 09:11:12 +08:00
Tomas Rezucha 65ac3f6f80 refactor(usb): Remove deprecated USB pin definitions
When connecting USB OTG to an external FSLS PHY,
the FSLS Serial Interface signals can be routed to any GPIO via the GPIO
matrix. Thus, these macros are meaningless.
2025-06-25 14:44:36 +02:00
Peter Marcisovsky e744fc737b Merge branch 'refactor/usb_host_types_ch9' into 'master'
refactor(usb_host): IDF 6.0 breaking change: remove val types from USB Host stack

Closes IDF-9886

See merge request espressif/esp-idf!39773
2025-06-25 14:35:07 +02:00
Roland Dobai 214f86803d Merge branch 'doc/update-guide' into 'master'
docs: how to update ESP-IDF env without updating ESP-IDF itself

Closes IDFGH-15431 and DOC-11528

See merge request espressif/esp-idf!39761
2025-06-25 13:59:51 +02:00
wanckl 69f258b02f test(driver_twai): new driver add interctive test 2025-06-25 19:37:28 +08:00
Wu Zheng Hui 01753bfc04 Merge branch 'feat/support_esp32h4_pau' into 'master'
feat(esp_hw_support): add esp32h4 PAU initial support

Closes PM-444

See merge request espressif/esp-idf!39951
2025-06-25 19:27:24 +08:00
Xu Si Yu 96fb64d055 feat(openthread): update border router lib
* esp-openthread: thread_zigbee/esp-openthread@16bfed5ec
* openthread: espressif/openthread@b945928d7
* esp-idf: espressif/esp-idf@3ff78443f
2025-06-25 11:21:01 +00:00
Chen Ji Chang 0972e9d274 Merge branch 'refactor/remove_legacy_mcpwm_driver' into 'master'
remove(legacy_mcpwm)!: remove legacy mcpwm driver in IDF v6.0

Closes IDF-13173 and IDF-13352

See merge request espressif/esp-idf!39743
2025-06-25 19:17:16 +08:00
Xu Si Yu 3ff78443ff feat(openthread): update openthread upstream 2025-06-25 19:12:39 +08:00
Xu Si Yu 6e408155dc feat(openthread): handle MeshCoP mDNS service in state change callback 2025-06-25 19:12:39 +08:00
liuning 43e21a032f fix(wifi): fix duplicated offchan error, add coex wifi event imm
Closes https://github.com/espressif/esp-idf/issues/16183
2025-06-25 19:08:15 +08:00
Alexey Lapshin 0a07021989 fix(storage): fix std_filesystem test
it uses vfs_fat_truncate in resize_file
2025-06-25 18:01:50 +07:00
Alexey Lapshin a3dfc82246 fix(build): add __attribute__((nonstring)) to nonsting variables 2025-06-25 18:01:50 +07:00
Alexey Lapshin b65502f3f5 fix(bt): suppress -Wunterminated-string-initialization warning 2025-06-25 18:01:50 +07:00
Alexey Lapshin 243c587b70 fix(heap): avoid malloc calls optimization
GCC defines that malloc(0) returns a non-null pointer (glibc behavior).
This can break logic for some cases, because our implementation of
malloc(0) returns null pointer.
POSIX and the ISO C standard allow both behaviors.
2025-06-25 18:01:50 +07:00
Alexey Lapshin 2ff8f765ab fix(esp_wifi): fix test app diff threshold 2025-06-25 18:01:50 +07:00
Alexey Lapshin 2279047883 fix(panic): fix reset checking in panic tests 2025-06-25 18:01:50 +07:00
Alexey Lapshin e89241586d test(ci): increase timeout for iperf expect 2025-06-25 18:01:50 +07:00
Alexey Lapshin 0f2e45c1ad feat(newlib): add dummy implementations for statvfs/fstatvfs 2025-06-25 18:01:50 +07:00
Alexey Lapshin fdb4212f7d fix(soc): fix stddef.h missed include in pmu_struct.h headers 2025-06-25 18:01:50 +07:00
Alexey Lapshin 4b4ad77483 fix(esp_rom): fix esp32h21 syscall_stub_table structure 2025-06-25 18:01:50 +07:00
Alexey Lapshin e521d37f6f feat(cxx): run c++ tests for esp32c61 and esp32p4 2025-06-25 18:01:50 +07:00
Alexey Lapshin e82d51a9ee fix(picolibc): fix missed headers in sources 2025-06-25 18:01:50 +07:00
Alexey Lapshin b6cfb7ecf6 fix(build): ensure zero-init of padding bits with GCC 15+
GCC 15 introduces a regression in guaranteed zero-initialization of
padding bits. The suggested solution is to add the
-fzero-init-padding-bits=unions compile option.

To prevent similar issues in the future, this change adds the
-fzero-init-padding-bits=all build option. It ensures that padding bits
in unions and structs are properly zeroed, avoiding regressions.
2025-06-25 18:01:50 +07:00
Alexey Lapshin 8384f4dffd fix(panic_test): avoid linker check on dangerous relocations
xtensa linker throws warning
dangerous relocation: windowed longcall crosses 1GB boundary; return may fail

create separate function to call function by pointer to avoid warnings
2025-06-25 18:01:50 +07:00
Alexey Lapshin e28af6a002 fix(newlib): use optimized misalign access functions from libc.a 2025-06-25 18:01:50 +07:00
Alexey Lapshin 0be466755b feat(build): add CONFIG_COMPILER_DISABLE_GCC15_WARNINGS and toolchain migration-guide 2025-06-25 18:01:47 +07:00
Alexey Lapshin 74e26f8d29 fix(mbedtls): suppress -Wunterminated-string-initialization 2025-06-25 18:00:39 +07:00
Alexey Lapshin 1a464c0914 fix(esp_system): suppress -Wanalyzer-infinite-loop warning 2025-06-25 18:00:39 +07:00
Alexey Lapshin 86ca6ef829 fix(build): fix -Wanalyzer-undefined-behavior-ptrdiff warnings 2025-06-25 18:00:39 +07:00
Alexey Lapshin 2f9a46a665 feat(build): refactor toolchain cmakes and update riscv extensions 2025-06-25 18:00:39 +07:00
Alexey Lapshin c25dcf284a fix(log): fix string size to include NUL 2025-06-25 18:00:39 +07:00
Alexey Lapshin f143070235 feat(tools): update toolchain version to esp-15.1.0_20250607 2025-06-25 18:00:39 +07:00
cjin e4238a4999 change(ble): update lib_esp32c6 and esp32c61 to ea6c58c7 2025-06-25 18:11:18 +08:00
cjin aa95e30435 change(ble): update lib_esp32h2 to ea6c58c7 2025-06-25 18:11:18 +08:00
cjin 0c3a5db115 change(ble): update lib_esp32c5 to ea6c58c7 2025-06-25 18:11:18 +08:00
Zhou Xiao c05688fe6b change(ble): [AUTO_MR] Update lib_esp32c2 to e865b4f9 2025-06-25 18:11:18 +08:00
Zhou Xiao 2076e4411c change(ble): [AUTO_MR] Update lib_esp32c6 to b8770ab2 2025-06-25 18:11:18 +08:00
Zhou Xiao 0d7c254bd3 change(ble): [AUTO_MR] Update lib_esp32c5 to b8770ab2 2025-06-25 18:11:18 +08:00
Zhou Xiao 3b66fc2465 change(ble): [AUTO_MR] Update lib_esp32h2 to b8770ab2 2025-06-25 18:11:18 +08:00
armando 432791f756 change(mmu): remove paddr remap warning log 2025-06-25 17:37:44 +08:00
Armando (Dou Yiwen) 5808358c3f Merge branch 'fix/change_log_level_from_w_to_d' into 'master'
psram: change logw to logd

See merge request espressif/esp-idf!40125
2025-06-25 09:27:41 +00:00
Wei Yuhan b1bbf68bb5 Update BLE feature suppport status 2025-06-25 17:26:00 +08:00
Jiang Jiang Jian fd030735a1 Merge branch 'ci/revert-submodule-cache-changes' into 'master'
Revert "ci: replace ci_fetch_submodules.py with submodule cache"

See merge request espressif/esp-idf!40135
2025-06-25 17:21:03 +08:00
Chen Jichang 4d1a4dfcbe feat(mcpwm): add a new api to get cap value directly 2025-06-25 15:49:07 +08:00
Island 09046275fd Merge branch 'bugfix/fix_some_ble_build_fail' into 'master'
fix(ble/bluedroid): fix build failure when some BLE features are disabled

Closes BLERP-2027

See merge request espressif/esp-idf!40109
2025-06-25 15:26:11 +08:00
armando 73113c0ce8 change(psram): change logw to logd 2025-06-25 06:45:33 +00:00
Fu Hanxi 4d7372beab Revert "ci: replace ci_fetch_submodules.py with submodule cache"
This reverts commit 0af3e2b1b2.
2025-06-25 08:01:06 +02:00
gaoxu c602e556ef fix(adc): fix ESP32-C5 adc calibration error 2025-06-25 03:25:36 +00:00
Armando (Dou Yiwen) ed32a3aaef Merge branch 'bugfix/fix_dvp_recv_trans_buf_error' into 'master'
fix(esp_driver_cam): Fix DVP get trans buffer error

Closes IDF-13461

See merge request espressif/esp-idf!40087
2025-06-25 03:00:03 +00:00
Michael (XIAO Xufeng) d5b4654039 Merge branch 'bugfix/esp_flash_escape_checking' into 'master'
fix(esp_flash): fixed issue of escaping boundary check

See merge request espressif/esp-idf!36128
2025-06-25 01:23:26 +08:00
zhanghaipeng a29cd4ad5f fix(ble/bluedroid): fix build failure when some BLE features are disabled 2025-06-24 20:26:43 +08:00
sonika.rathi c4a3c1fc5b fix(sdmmc): fix sdmmc initialization issue in caused by CMD52 CRC error 2025-06-24 13:48:38 +02:00
Fu Hanxi cf78d0a7ff Merge branch 'ci/fix-submodule-cache' into 'master'
ci: remove cached submodule metadata while checking with github

See merge request espressif/esp-idf!40081
2025-06-24 11:22:52 +02:00
Fu Hanxi fcca033ff6 Merge branch 'ci/raise_macos_cache_to_50g' into 'master'
macOS runners - set CCACHE back to 50GB to help VMs

See merge request espressif/esp-idf!39950
2025-06-24 11:10:19 +02:00
Fu Hanxi 7c1eacb599 Merge branch 'ci/temp-disable-macos-test' into 'master'
ci: temp disable macos, only trigger by labels and run on master

See merge request espressif/esp-idf!40064
2025-06-24 10:19:18 +02:00
Li Peng 800a170e8a Merge branch 'feat/add_sdio_slave_reset_hardware_support' into 'master'
add sdio_slave_reset_hw

See merge request espressif/esp-idf!39686
2025-06-24 16:10:17 +08:00
Dong Heng 47721a5803 fix(esp_driver_cam): Fix DVP get trans buffer error 2025-06-24 16:09:14 +08:00
Fu Hanxi d795ecf393 ci: temp disable macos, only trigger by labels and run on master 2025-06-24 09:48:08 +02:00
Xiao Xufeng 83ca12c8e0 fix(esp_flash): fixed issue of escaping boundary check
Also patched corresponding ROM functions
2025-06-24 15:30:11 +08:00
Jiang Jiang Jian 1b130f5061 Merge branch 'bugfix/connect_before_connected' into 'master'
fix(conn): wifi connect before connected status

See merge request espressif/esp-idf!39882
2025-06-24 15:23:56 +08:00
Jiang Jiang Jian ac5fe121e3 Merge branch 'bugfix/fix_compatibility_issues_of_esp32c5' into 'master'
bugfix/fix compatibility issues of esp32c5

Closes WIFIBUG-1250, WIFIBUG-1238, and WIFIBUG-1225

See merge request espressif/esp-idf!40027
2025-06-24 15:20:04 +08:00
Fu Hanxi aed61ed207 ci: remove cached submodule metadata while checking with github 2025-06-24 09:09:07 +02:00
Gao Xu c59b42ca9e Merge branch 'fix/fix_h4_wrong_spinlock' into 'master'
fix(esp_system): fix wrong spinlock num on H4

See merge request espressif/esp-idf!39924
2025-06-24 10:50:29 +08:00
Chen Jichang a2ef01fc5b remove(legacy_mcpwm): remove legacy mcpwm driver in IDF v6.0 2025-06-24 10:49:37 +08:00
C.S.M a2b98b31a9 Merge branch 'fix/tsens_value_inaccurate' into 'master'
fix(temperature_sensor): Fix temperature sensor value accurency in high range variation

See merge request espressif/esp-idf!39896
2025-06-24 10:28:23 +08:00
Konstantin Kondrashov ff53d5d32c Merge branch 'feature/iram_esp_system' into 'master'
feat(esp_system): Adds Kconfigs to place code in IRAM

Closes IDF-11426

See merge request espressif/esp-idf!38292
2025-06-24 05:46:09 +08:00
Michael (XIAO Xufeng) fa41e76349 Merge branch 'feature/support_chip912_pvt_auto_dbias_360m' into 'master'
feat(p4): support chip912 pvt auto dbias 360m

Closes PM-357, PM-355, and IDF-8142

See merge request espressif/esp-idf!36615
2025-06-24 01:52:01 +08:00
Fu Hanxi 561f53cd24 Merge branch 'ci/remove-submodule-fetch-script' into 'master'
Ci/remove submodule fetch script

Closes IDFCI-2980

See merge request espressif/esp-idf!39992
2025-06-23 19:22:19 +02:00
morris d8fa822ad7 Merge branch 'fix/spi_master_p4_change_default_clk_pll' into 'master'
fix(driver_spi): master driver change esp32p4 default src to pll

Closes IDF-8313, IDF-13345, IDF-13346, and IDF-13347

See merge request espressif/esp-idf!39700
2025-06-23 22:57:03 +08:00
Zhang Shuxian f699058964 docs: Update CN translation for tools setup 2025-06-23 12:48:39 +02:00
Jan Beran 19d370f594 docs: how to update ESP-IDF environment without updating ESP-IDF itself
Closes https://github.com/espressif/esp-idf/issues/16077
2025-06-23 12:47:59 +02:00
Kevin (Lao Kaiyao) 63304e2d61 Merge branch 'refactor/migrate_i2c_driver_in_es7210_example' into 'master'
refactor(i2s_es7210): refactor es7210 example

Closes IDF-10769 and IDF-13148

See merge request espressif/esp-idf!40058
2025-06-23 18:46:10 +08:00
Konstantin Kondrashov ff0408c087 feat(esp_system): Adds Kconfigs to place code in IRAM 2025-06-23 13:23:33 +03:00
Rocha Euripedes 92fa23b136 Merge branch 'contrib/github_pr_14871' into 'master'
fix: fix build failure when project name is not mqtt_ssl (GitHub PR)

Closes IDFGH-14052

See merge request espressif/esp-idf!39963
2025-06-23 18:13:49 +08:00
Xu Si Yu ba2b0fd4b7 Merge branch 'feat/optimize_ot_trel_receive' into 'master'
feat(openthread): optimize trel reception

See merge request espressif/esp-idf!39624
2025-06-23 17:59:27 +08:00
Fu Hanxi 0af3e2b1b2 ci: replace ci_fetch_submodules.py with submodule cache 2025-06-23 11:39:42 +02:00
laokaiyao aad133a0d3 refactor(i2s_es7210): refactor es7210 example 2025-06-23 17:33:57 +08:00
Shu Chen 5590a741ee Merge branch 'feat/concat_otcommand_for_console' into 'master'
feat(openthread): support openthread cli console command register

See merge request espressif/esp-idf!39653
2025-06-23 09:32:28 +00:00
wanckl 768a7a8442 fix(driver_spi): master driver change esp32p4 default src to pll 2025-06-23 16:40:21 +08:00
Omar Chebib e6e898e9de fix(esp_system): fix the usage conditions of os_spinlock 2025-06-23 16:24:52 +08:00
Xiao Xufeng 5aa1a5f6ab esp_system: increase bootloader partition size in examples using framepointer 2025-06-23 16:22:38 +08:00
Gao Xu 459b241f7b Merge branch 'feat/lcd_cam_dvp_driver_s3' into 'master'
DVP support and example for ESP32S3

Closes IDF-10475

See merge request espressif/esp-idf!39323
2025-06-23 15:55:02 +08:00
C.S.M d6a3e73f46 fix(temperature_sensor): Fix temperature sensor value accurency in high range variation 2025-06-23 15:38:10 +08:00
LiPeng 1d1ba47a7a feat(sdio): add sdio_slave_reset_hw 2025-06-23 15:09:30 +08:00
Laukik Hase 9b1aaa2778 fix(esp_tee): Fix coverity issues from the attestation component
- Also fix the incorrect marker set for TEE OTA tests
2025-06-23 11:45:12 +05:30
Chen Ji Chang ffebb32117 Merge branch 'feat/add_callback_to_switch_buffer_in_parlio_tx' into 'master'
feat(parlio_tx): support buffer switched callback

Closes IDF-12903

See merge request espressif/esp-idf!39692
2025-06-23 11:42:29 +08:00
gaoxu b7d65d94c3 feat(lcd_cam): add lc_dma_int value atomic protect for lcd and cam 2025-06-23 10:58:38 +08:00
gaoxu 8008347a7c fix(cam): fix camera kconfig about dw_gdma 2025-06-23 10:58:26 +08:00
gaoxu b43daa6bbf feat(cam): add dvp example for ESP32S3-EYE 2025-06-23 10:58:24 +08:00
gaoxu 638cde24d0 feat(cam): add esp32s3 dvp cam support 2025-06-23 10:55:26 +08:00
Island d2b6f832f5 Merge branch 'bugfix/fixed_set_conn_mode_assert_on_esp32c2' into 'master'
fix(ble): fixed assertion issue in connection state on ESP32C2-ECO4

Closes BLERP-2011

See merge request espressif/esp-idf!40019
2025-06-23 10:24:38 +08:00
Wu Zheng Hui bac996a766 Merge branch 'feat/support_low_power_mode_in_monitor_state' into 'master'
feat(esp_hw_support): support enable analog lowpower mode by API

Closes IDFGH-6208

See merge request espressif/esp-idf!38924
2025-06-23 09:40:56 +08:00
yanzihan@espressif.com 08eea3c058 feat(esp_hw_support): use pvt to auto control digital ldo and rtc ldo for esp32p4 2025-06-23 00:28:53 +08:00
Aditya Patwardhan b971cf5bf9 Merge branch 'docs/fix_secure_download_mode_unsupported_esp32' into 'master'
fix(bootloader): Fix documentation as ESP32 does not support secure download mode

See merge request espressif/esp-idf!40005
2025-06-20 22:08:20 +05:30
Roland Dobai 16e8efa344 Merge branch 'feat/diag_port' into 'master'
feat(diag): pass serial port to esp-idf-diag

See merge request espressif/esp-idf!39813
2025-06-20 15:44:14 +02:00
wuzhenghui d62930223e change(hal): simplify some enable/disable function in pau_ll 2025-06-20 20:11:55 +08:00
wuzhenghui 86ea927ef9 change(hal): avoid the read-modify-write for a WT register in pau_ll 2025-06-20 20:11:55 +08:00
wuzhenghui 4a887a7b5a change(hal): move regdma related API from lp_aon_ll to pau_ll 2025-06-20 20:11:54 +08:00
wuzhenghui aeba99290f feat(hal): add esp32h4 PAU initial support 2025-06-20 20:11:54 +08:00
wuzhenghui ee9c1aee81 feat(soc): add esp32h4 PAU initial support 2025-06-20 20:11:01 +08:00
Wu Zheng Hui 5d8e56b4c9 Merge branch 'feat/support_esp32h4_modem_clock' into 'master'
feat(esp_hw_support): add esp32h4 modem clock initial support

Closes PM-445

See merge request espressif/esp-idf!39948
2025-06-20 17:27:09 +08:00
Aditya Patwardhan 68b583f30c Merge branch 'docs/update_http_server_uri_fun_doc_regarding_thread_safe' into 'master'
Updated the http_server doc regarding thread safety

Closes IDFGH-15207

See merge request espressif/esp-idf!39587
2025-06-20 13:57:41 +05:30
yinqingzhao ca49c095e0 feat(wifi): add support for country EU 2025-06-20 16:10:11 +08:00
yinqingzhao ee25c757f2 fix(wifi): comment out some functions for esp32c5 2025-06-20 16:09:53 +08:00
zwl 83fd955f11 fix(ble): fixed assertion issue in connection state on ESP32C2-ECO4 2025-06-20 15:12:40 +08:00
Sudeep Mohanty 7023f5bf3c Merge branch 'contrib/github_pr_16040' into 'master'
refactor(xtensa): Rename specreg.h register macros (GitHub PR)

Closes IDFGH-11606 and IDFGH-15386

See merge request espressif/esp-idf!39649
2025-06-20 08:51:33 +02:00
Fu Hanxi 598f19ea0f ci: chore fixes 2025-06-20 08:47:36 +02:00
Frantisek Hrbata 0afcc02c47 Merge branch 'fix/cmake_uninitialized_vars' into 'master'
fix(build): do not rely on uninitialized  variables and variables set in parent scope

See merge request espressif/esp-idf!39615
2025-06-20 08:30:30 +02:00
Wang Meng Yang c4bfb8adba Merge branch 'bugfix/auth_collision' into 'master'
fix(bt/controller): Fixed bugs on LMP legacy and secure authentication collision

See merge request espressif/esp-idf!39990
2025-06-20 14:25:17 +08:00
Frantisek Hrbata 7ee9e7e785 Merge branch 'docs/idf_size_flash_total_size' into 'master'
fix(docs/idf-size): add explicit note about total flash size

Closes IDF-13066

See merge request espressif/esp-idf!38891
2025-06-20 08:15:43 +02:00
Jiang Jiang Jian 4e8ad76602 Merge branch 'bugfix/fix_bt_avrcp_build_issue' into 'master'
fix(bt/bluedroid): Fix AVRCP build issue when disable Cover Art

Closes IDFGH-15516

See merge request espressif/esp-idf!39982
2025-06-20 14:02:10 +08:00
harshal.patil 8de2eb01da fix(bootlaoder): Fix documentation as ESP32 does not support secure download mode 2025-06-20 10:50:28 +05:30
Chen Jichang 05c2ebcf16 feat(parlio_tx): support buffer switched callback 2025-06-20 11:19:46 +08:00
Kevin (Lao Kaiyao) c5a17106b6 Merge branch 'doc/fix_ext1_wakeup_cause' into 'master'
docs(sleep_mode): updated ext1 wakeup status

Closes IDF-9459 and IDF-9454

See merge request espressif/esp-idf!39968
2025-06-20 11:00:14 +08:00
Roland Dobai 8f570513ea Merge branch 'fix/idf_tools_install_tool_version' into 'master'
fix(tools): fixed command `idf_tools.py install tool@version`

Closes IDF-12845

See merge request espressif/esp-idf!39588
2025-06-19 15:46:16 +02:00
Fu Hanxi 667ed2a266 ci: remove host_test runner tag, use more precise build, shiny instead 2025-06-19 15:34:07 +02:00
Gao Xu f638d5e075 Merge branch 'contrib/github_pr_16130' into 'master'
esp_adc: Release the peripheral after calibration (GitHub PR)

Closes IDFGH-15489

See merge request espressif/esp-idf!39895
2025-06-19 20:49:22 +08:00
liqigan b5d1c978b3 fix(bt/controller): Fixed bugs on LMP legacy and secure authentication collision 2025-06-19 20:30:35 +08:00
Chen Ji Chang d6a4c374c1 Merge branch 'test/add_parlio_bs_different_input_output_sizes_test' into 'master'
test(parlio_tx): add parlio_tx_bs different input output sizes test

Closes IDFGH-15481

See merge request espressif/esp-idf!39923
2025-06-19 20:27:40 +08:00
linruihao 4116e4f697 ci(bt/bluedroid): Add CI build test for A2DP Sink example with Caver Art disabled 2025-06-19 19:44:51 +08:00
wuzhenghui e55d6d8b3c feat(esp_hw_support): support enable analog lowpower mode by API
Closes https://github.com/espressif/esp-idf/issues/7882
2025-06-19 19:35:16 +08:00
zwx 526a6f37f9 feat(openthread): support openthread cli console command register 2025-06-19 19:28:48 +08:00
laokaiyao 9b14f91478 change: remove the updated doc's list for c5 2025-06-19 16:57:43 +08:00
Armando (Dou Yiwen) 1571758b3d Merge branch 'feat/support_fallback_to_default_pattern_when_psram_id_not_match' into 'master'
psram: support fallback to use default driver pattern when id isn't match

Closes IDF-13387

See merge request espressif/esp-idf!39859
2025-06-19 08:32:43 +00:00
Guillaume Souchere fd9b2fab3a Merge branch 'fix/tcm-mem-not-considered-in-esp_ptr_eexecutable' into 'master'
fix(memory-utils): Check TCM in esp_ptr_internal and esp_ptr_byte_accessible

Closes IDFGH-15339 and IDFGH-15337

See merge request espressif/esp-idf!39388
2025-06-19 10:09:40 +02:00
Martin Vychodil 2aeec90f6c Merge branch 'feat/bump_littlefs_to_1.20.0' into 'master'
feat(storage): Bump LittleFS to 1.20.0 and fix storage readmes mentioning esptool

Closes IDF-13395

See merge request espressif/esp-idf!39905
2025-06-19 15:25:08 +08:00
laokaiyao 79a0958671 docs(sleep_mode): updated ext1 wakeup status 2025-06-19 15:00:55 +08:00
linruihao ffaf0819d5 fix(bt/bluedroid): Fix AVRCP build issue when disable Cover Art
Closes https://github.com/espressif/esp-idf/issues/16155
2025-06-19 14:48:12 +08:00
gaoxu afadb17ed8 fix(adc): fix P4 ADC2 oneshot error and refactor apb claim macor 2025-06-19 14:20:20 +08:00
hrushikesh.bhosale 8026e7acc7 docs(http_server): Updated the http_server doc regarding thread safety
Updated the http_server documentation mentioning that, APIs used in
http_server aren't thread safe

Closes https://github.com/espressif/esp-idf/issues/15877
2025-06-19 11:49:18 +05:30
Chen Jichang d93967009e test(parlio_tx): add parlio_tx_bs different input output sizes test
Closes https://github.com/espressif/esp-idf/issues/16122
2025-06-19 14:07:37 +08:00
yinqingzhao 1331108ca6 feat(wifi): set phy pll track disable default 2025-06-19 12:11:16 +08:00
Zhangwx cc312818c7 feat(phy): add a config for pll track feature 2025-06-19 12:11:12 +08:00
Xu Si Yu 92b84d61e8 feat(openthread): optimize trel reception 2025-06-19 11:10:52 +08:00
Mahavir Jain 62723f532f Merge branch 'bugfix/fix_ds_rsa_sign_null_pointer_handling' into 'master'
fix(mbedtls): Handle NULL ctx in ds rsa sign

See merge request espressif/esp-idf!39954
2025-06-19 08:32:42 +05:30
Armando (Dou Yiwen) 807cbbf24b Merge branch 'refactor/remove_legacy_adc_driver' into 'master'
adc: removed the legacy adc driver and legacy adc calibration driver since v6.0

Closes IDF-13177

See merge request espressif/esp-idf!39478
2025-06-19 02:48:05 +00:00
C.S.M 35f2cca5f2 Merge branch 'refactor/update_locks' into 'master'
refactor(hw_support): Use esp_os_enter_critical instead of portENTER_CRITICAL_SAFE

Closes IDF-13397

See merge request espressif/esp-idf!39922
2025-06-19 10:45:51 +08:00
armando 954e88c92d feat(psram): support fallback to use default driver pattern when id isn't match 2025-06-19 09:31:48 +08:00
Roland Dobai dcd29e50c4 Merge branch 'ci/add-kconfig-pre-commit' into 'master'
docs:fix spelling/"casing" of the word "Kconfig"

Closes IDF-11284

See merge request espressif/esp-idf!39470
2025-06-18 19:20:50 +02:00
Jiang Jiang Jian cca744cd70 Merge branch 'bugfix/ag_data_callback_cleared_after_deinit' into 'master'
fix(bt): Fixed HFP AG data callback cleared after profile is re-initialized

Closes COEXQABR25-79

See merge request espressif/esp-idf!39786
2025-06-19 01:20:20 +08:00
Adam Múdry 5106b95910 fix(storage): Fix storage examples readmes mentioning espotool 2025-06-18 15:58:07 +02:00
Adam Múdry e326d533de feat(storage): Bump LittleFS to 1.20.0 2025-06-18 15:56:47 +02:00
ding huan a54abb147e fix(conn): wifi connect before connected status 2025-06-18 20:32:16 +08:00
Euripedes Rocha 63b91c0608 feat(mqtt): Add reason code to SUBSCRIBED event in examples 2025-06-18 14:19:46 +02:00
Jiang Jiang Jian 9ddef27ed4 Merge branch 'test/bugfix/offchan_action_tx_failure_scan_rebase_master' into 'master'
feat(coex): support backgorund scan for coex, fix some issues of scan when connected

Closes WIFI-6729, WIFI-6730, WIFIBUG-740, and WIFIBUG-387

See merge request espressif/esp-idf!38413
2025-06-18 19:35:43 +08:00
Marek Fiala bd0873f9ec fix(tools): idf_tools.py uninstall decide based on preferred tool version
idf_tools.py uninstall now doesn't take only recommended version, but
makes the decision based on preferred installed versions.
2025-06-18 19:33:54 +08:00
Marek Fiala 335ba6b3c2 test(tools): Added test for installing supported tool version
Added test_export_supported_version_cmake in `test_idf_tools.py`,
that installs and exports supported version of tool - cmake.
2025-06-18 19:33:54 +08:00
Marek Fiala 79ebe0b306 fix(tools): idf_tools.py install tool@version 2025-06-18 19:33:54 +08:00
Rahul Tank 304b561f8a Merge branch 'fix/gatt_cache_peer_init_incl_svc' into 'master'
fix(nimble): Added parameter in peer_init for included service allocation

See merge request espressif/esp-idf!39822
2025-06-18 16:24:49 +05:30
Tan Yan Quan 8b2a1b4e37 Merge branch 'feat/ot_sleep_lock_type' into 'master'
feat(openthread): use apb_freq_max mode for esp_openthread_sleep pm lock

See merge request espressif/esp-idf!39800
2025-06-18 18:42:14 +08:00
Ashish Sharma 78af627857 fix(mbedtls): handle NULL ctx in ds rsa sign 2025-06-18 17:03:37 +08:00
Song Ruo Jing 570f9d3c82 Merge branch 'bugfix/cpu_clock_switch_after_sleep_c5' into 'master'
fix(sleep): Fix CPU clk src when restoring CPU frequency after wakeup for c5

See merge request espressif/esp-idf!39937
2025-06-18 16:27:44 +08:00
John Boiles d8c054c8c1 fix(memory-utils): Use esp_ptr_in_tcm to check TCM range 2025-06-18 10:09:40 +02:00
John Boiles b9f42e7bae fix(memory-utils): Check TCM in esp_ptr_internal and esp_ptr_byte_accessible
Modifies `esp_ptr_internal` and `esp_ptr_byte_accessible` to also check TCM
when `SOC_MEM_TCM_SUPPORTED`.
2025-06-18 10:09:40 +02:00
Euripedes Rocha d50fbe77d4 fix(mqtt): Make example binary data consistent
Improves user experience when copying examples to use as starting point.
2025-06-18 09:59:17 +02:00
Hossein.M cfadf71093 fix: fix build failure when project name is not mqtt_ssl
fixes: #14870

Closes https://github.com/espressif/esp-idf/pull/14871
2025-06-18 07:49:21 +00:00
Jiang Jiang Jian 4a189516c7 Merge branch 'feat/chip_esp32c5_eco2_update_libphy' into 'master'
feat(phy): update phylib for esp32c5

See merge request espressif/esp-idf!39830
2025-06-18 14:56:22 +08:00
Tan Yan Quan 55f48c9c14 feat(openthread): use apb_freq_max mode for esp_openthread_sleep pm lock 2025-06-18 14:49:07 +08:00
armando 6abac38b9c refactor(adc): removed the legacy adc driver and legacy adc calibration calibration driver 2025-06-18 14:35:41 +08:00
Peter Macko c2ff554878 ci: macOS runners - set CCACHE back to 50GB to help VMs 2025-06-18 08:17:00 +02:00
morris 3041f332c2 feat(ci): ast-grep rules to forbid use freertos specific critical section APIs 2025-06-18 11:58:04 +08:00
C.S.M f76d50c279 refactor(system): Make it usable in tee build 2025-06-18 11:56:08 +08:00
wuzhenghui d876dae93c change(hal): rename xx_force_clock to xx_clock_force 2025-06-18 11:54:16 +08:00
wuzhenghui d8acb7b656 change(hal): remove modem_lpcon_ll_get_date 2025-06-18 11:50:13 +08:00
wuzhenghui c7f114e0a9 change(hal): add union enum type for modem peripheral 32k source selection 2025-06-18 11:48:48 +08:00
C.S.M 4860379677 refactor(hw_support): Use esp_os_enter_critical instead of portENTER_CRITICAL_SAFE in esp_hw_support 2025-06-18 11:23:34 +08:00
chendejin 271532bbf3 feat(lwip/config): add menuconfig to enable ND6 RIO support and set the cache size 2025-06-18 11:19:09 +08:00
yinqingzhao d0d3c1f84a feat(phy): update phylib for esp32c5 2025-06-18 11:18:58 +08:00
sibeibei 7191595d2a feat(coex): support backgorund scan for coex, fix some issues of scan when connected 2025-06-18 10:58:12 +08:00
Jiang Jiang Jian 22ae972229 Merge branch 'feat/resupport_esp32c61eco3_ble' into 'master'
change(ble): resupport ble for ESP32C61ECO3

Closes BLERP-1948, IDF-10360, IDF-10361, IDF-10363, IDF-10365, and IDF-10362

See merge request espressif/esp-idf!39601
2025-06-18 10:26:07 +08:00
Sergei Silnov ede834d775 Merge branch 'feat/ci-protected-environment' into 'master'
ci: Production as protected environment

Closes IDFCI-2939

See merge request espressif/esp-idf!39427
2025-06-17 13:53:35 -03:00
Wu Zheng Hui 8ab969db1c Merge branch 'bugfix/esp32c6_src_clk_label' into 'master'
clk: esp32c6: rename modem clock source selection

See merge request espressif/esp-idf!39756
2025-06-17 22:01:33 +08:00
wuzhenghui 78baff95ec feat(hal): add esp32h4 modem_clock hal layer 2025-06-17 21:56:11 +08:00
wuzhenghui dd9613bed0 feat(soc): update esp32h4 mdoem soc headers 2025-06-17 21:56:07 +08:00
morris 5f1ad2c18d Merge branch 'bugfix/onewire_internal_pullup' into 'master'
fix(rmt): enable internal pull-up resistor for onewire bus

See merge request espressif/esp-idf!39928
2025-06-17 21:50:39 +08:00
Nebojsa Cvetkovic d0ceef20f4 refactor(xtensa): Rename specreg.h register macros
This commit renames all registers in xtensa/specreg.h to by adding the
prefix XT_REG_. This is done to avoid naming collisions with similar
variable names. A new register file, viz., xt_specreg.h is created. The
previous names are still available to use but have been deprecated.

Closes https://github.com/espressif/esp-idf/issues/12723
Merges https://github.com/espressif/esp-idf/pull/16040
2025-06-17 15:37:33 +02:00
liuning 23f49324b2 fix(pm): reserve txqblocks when mac init at offchannels 2025-06-17 21:10:03 +08:00
liuning 7ab87012db fix(pm): fix ps none status check 2025-06-17 21:09:51 +08:00
Guillaume Souchere 2f4c5d278e Merge branch 'feat/remove-unecessray-condition-in-usj-read' into 'master'
fix(driver): remove unecessary if conditions in the read function

Closes IDF-13166

See merge request espressif/esp-idf!39523
2025-06-17 14:19:38 +02:00
Samuel Fialka 15d998cf3b ci: Production as protected environment 2025-06-17 11:24:47 +02:00
Song Ruo Jing d6c483a073 fix(sleep): Fix CPU clk src when restoring CPU frequency after wakeup for c5 2025-06-17 16:56:03 +08:00
David Čermák bc34abb201 Merge branch 'fix/esp_netif_reassign_static_ip' into 'master'
fix(esp_netif): Fix reasigning static IP after netif down -> up

Closes IDF-13024 and WIFIBUG-1228

See merge request espressif/esp-idf!39725
2025-06-17 16:45:08 +08:00
David Čermák ce6e136e70 Merge branch 'fix/esp_netif_ip_events' into 'master'
fix(esp_netif): Rename IP_EVENT_AP_STAIPASSIGNED to generic name

Closes IDFGH-14957

See merge request espressif/esp-idf!39425
2025-06-17 16:28:45 +08:00
David Čermák b6ea70c57b Merge branch 'feat/lwip_no_iram_config' into 'master'
feat(iperf): Add minimum IRAM test config

See merge request espressif/esp-idf!37704
2025-06-17 16:26:51 +08:00
morris ceb7f1d827 fix(rmt): enable internal pull-up resistor for onewire bus 2025-06-17 15:15:05 +08:00
Michael (XIAO Xufeng) 957a232259 Merge branch 'feat/call_start_in_flash' into 'master'
esp_system: move call_start_cpu* into flash to save IRAM

See merge request espressif/esp-idf!39094
2025-06-17 14:57:27 +08:00
Jan Beran 40314930a6 docs: Fix spelling of the word "Kconfig" 2025-06-17 08:52:37 +02:00
Astha Verma a82bdb87d3 fix(nimble): Added parameter in peer_init for included service allocation 2025-06-17 11:56:20 +05:30
Rahul Tank 069950761c Merge branch 'feat/auto_security_initiate' into 'master'
feat(nimble): Automatically initiate security if a GATT service request fails

See merge request espressif/esp-idf!39724
2025-06-17 11:38:54 +05:30
Armando (Dou Yiwen) 02be119399 Merge branch 'fix/fix_c3_c2_cache_freeze_soc_caps_issue' into 'master'
cache: fixed SOC_CACHE_FREEZE_SUPPORTED not defined on C3 / C2 issue

See merge request espressif/esp-idf!39881
2025-06-17 03:15:07 +00:00
Sergei Silnov 7f0d091f6e Merge branch 'feat/smaller_release_size' into 'master'
ci: Use new release-zips-action with shallow history

Closes IDFCI-2827

See merge request espressif/esp-idf!39877
2025-06-16 16:30:08 -03:00
Tomas Rezucha 32bee685d6 Merge branch 'docs/p4_eco1_usb_pins' into 'master'
docs(usb): Update ESP32-P4 USB pins to MP version

Closes IDFGH-15495

See merge request espressif/esp-idf!39901
2025-06-16 16:27:03 +02:00
Song Ruo Jing e6e629e475 Merge branch 'feature/esp32h21_clock_support' into 'master'
feat(clk): Add basic clock support for esp32h21

Closes IDF-11521, IDF-11906, and IDF-12114

See merge request espressif/esp-idf!39066
2025-06-16 21:48:36 +08:00
Jiang Jiang Jian d4f3bceb69 Merge branch 'fix/update_dfs_compensate_table' into 'master'
fix(esp_hw_support): update esp32 dfs table to make the timing drift always negative

Closes PM-437, WIFIBUG-1248, and PM-405

See merge request espressif/esp-idf!39838
2025-06-16 19:55:14 +08:00
Mahavir Jain 72cc5dee10 Merge branch 'bugfix/http_client_test_failure' into 'master'
fix: update root certificate for postman-echo endpoint

Closes IDFCI-2968 and IDFGH-15491

See merge request espressif/esp-idf!39828
2025-06-16 17:16:53 +05:30
Tomas Rezucha 025aec91c5 docs(usb): Update ESP32-P4 USB pins to MP version
Closes https://github.com/espressif/esp-idf/issues/16136
2025-06-16 13:32:51 +02:00
Sumeet Singh e928897801 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 16:58:57 +05:30
harshal.patil 6fe38c7efd fix(mbedtls): re-include Comodo AAA Services root 2025-06-16 15:55:39 +05:30
Mahavir Jain 03433aad49 fix(mbedtls): re-include Starfield Class 2 CA
Some of the endpoints (e.g., httpbin.org) is still relying on the
Starfield Class 2 CA in the chain. Added this root certificate as
a temporary exception and shall be removed in future.
2025-06-16 15:55:36 +05:30
Mahavir Jain 068847e2af fix: update root certificate for postman-echo endpoint
The certificate chain for postman-echo endpoint has switched to
Let's Encrypt root CA

Closes https://github.com/espressif/esp-idf/issues/16132
2025-06-16 15:55:13 +05:30
Rahul Tank 5beacd1ad2 Merge branch 'fix/nimble_pr_issues' into 'master'
fix(nimble): Add fixes for compilation issues in nimble

See merge request espressif/esp-idf!39631
2025-06-16 15:33:20 +05:30
Wang Mengyang 0190ba0390 fix(bt): Fixed HFP AG data callback cleared after profile is re-initialized 2025-06-16 16:55:09 +08:00
C.S.M f4a45a30b5 Merge branch 'refactor/remove_tsens_legacy' into 'master'
refactor(temperature_sensor): Remove legacy temperature sensor driver

Closes IDF-12570 and IDF-13366

See merge request espressif/esp-idf!39840
2025-06-16 16:09:40 +08:00
Michael (XIAO Xufeng) 7549d083a4 feat(hw_support): move call_start_cpu0 into flash to save IRAM 2025-06-16 15:07:34 +08:00
Song Ruo Jing 6d293c8582 feat(clk): Add basic clock support for esp32h21 2025-06-16 15:05:32 +08:00
armando 1c5cadea13 fix(cache): fixed SOC_CACHE_FREEZE_SUPPORTED not defined on c3/c2 issue 2025-06-16 13:13:22 +08:00
morris 2fb938c7c3 Merge branch 'feature/utilize_rom_gpio_function' into 'master'
feat(gpio): esp_rom_gpio_connect_in/out_signal now has their hal implementation

Closes IDFGH-15397

See merge request espressif/esp-idf!39383
2025-06-16 12:17:40 +08:00
Gao Xu c81dc5a9c4 Merge branch 'fix/fix_adc_tsens_test_wrong_channel_c61' into 'master'
fix(adc): fix wrong adc channel on c61 adc/tsens test

See merge request espressif/esp-idf!39808
2025-06-16 11:46:03 +08:00
Chen Ji Chang 0da7604680 Merge branch 'feat/support_weight_arbitration_on_c61' into 'master'
feat(gdma): support gdma weighted arbitration on c61 v1.0

Closes IDF-12882, IDF-9310, and IDF-12090

See merge request espressif/esp-idf!39710
2025-06-16 11:12:22 +08:00
Shen Meng Jing 974f571251 Merge branch 'docs/translate_migration_guides' into 'master'
docs: Provide CN translation for two migration-guides docs

Closes DOC-11341

See merge request espressif/esp-idf!39858
2025-06-16 11:09:50 +08:00
C.S.M bdf4dafe56 fix(soc): Fix wrong efuse register on esp32c61 2025-06-16 10:58:53 +08:00
C.S.M caf1a18188 refactor(temperature_sensor): Move calibration function from efuse to hal 2025-06-16 10:58:11 +08:00
C.S.M d839ecbcf0 refactor(temperature_sensor): Remove legacy temperature sensor driver 2025-06-16 10:58:09 +08:00
Gao Xu 211238d6cd Merge branch 'ci/reenable_c5_adc_test' into 'master'
ci(adc): reenable c5 adc test and fix test val

Closes IDF-13061

See merge request espressif/esp-idf!39836
2025-06-16 10:40:04 +08:00
Kevin (Lao Kaiyao) 0fc082d87e Merge branch 'bugfix/fixed_touch_freq_unit_issue' into 'master'
fix(touch): fixed touch interval freq unit convert issue

See merge request espressif/esp-idf!39860
2025-06-16 09:47:56 +08:00
Alexey Lapshin a319aa902c Merge branch 'feature/change-orphan-handling-behavior-to-error' into 'master'
feat(build): change orphan-handling behavior to error

Closes IDF-9792 and DOC-11408

See merge request espressif/esp-idf!39566
2025-06-15 17:41:10 +04:00
Zhang Shuxian be87c12a74 docs(migration-guides): add CN translation for build-system.rst 2025-06-15 11:54:05 +07:00
Deomid rojer Ryabkov 2435ffd1c6 fix(esp_adc): Release the peripheral after calibration 2025-06-14 18:36:40 +03:00
Sergei Silnov 561f017ef7 ci: Use new release-zips-action with shallow history 2025-06-14 14:58:51 +02:00
Fu Hanxi a4037e2416 Merge branch 'fix/limit-idf-component-manager-version' into 'master'
fix: limit idf-component-manager version

See merge request espressif/esp-idf!39869
2025-06-13 15:06:44 +02:00
wuzhenghui 2d2aac017a change(bt): increase BTDM_MODEM_WAKE_UP_DELAY 2025-06-13 20:38:47 +08:00
wuzhenghui 12d2347e24 change(esp_timer): make esp_timer timming drift always be negative 2025-06-13 20:38:46 +08:00
wuzhenghui f861b7dd65 fix(esp_hw_support): config lact in critical 2025-06-13 20:38:46 +08:00
Fu Hanxi 520ee76e03 fix: limit idf-component-manager version 2025-06-13 13:56:22 +02:00
Kevin (Lao Kaiyao) d445536897 Merge branch 'refactor/remove_legacy_dac_driver' into 'master'
remove(legacy_dac): remove legacy dac driver in IDF v6.0

Closes IDF-13344

See merge request espressif/esp-idf!39682
2025-06-13 19:42:27 +08:00
shenmengjing 71072cc1af docs: Provide CN translation for two migration-guides docs 2025-06-13 19:14:18 +08:00
Rahul Tank beb6d79fc9 Merge branch 'bugfix/pawr_sync' into 'master'
fix(nimble): memset the sync structs to prevent uncertainty for ext_adv reports

Closes BLERP-1936

See merge request espressif/esp-idf!39514
2025-06-13 15:24:30 +05:30
gaoxu d7aba9b677 ci(adc): reenable c5 adc test and fix test val 2025-06-13 17:28:39 +08:00
Konstantin Kondrashov e603f4ec6b Merge branch 'feature/bootloader_ota' into 'master'
feat(bootloader): Supports recovery bootloader

Closes IDF-7780 and IDF-7779

See merge request espressif/esp-idf!31893
2025-06-13 17:05:39 +08:00
Peter Macko 7eb710862c Merge branch 'feature/master_test_macos_virtualization' into 'master'
master(6.0): Migrate macOS to VM parallels

See merge request espressif/esp-idf!39373
2025-06-13 16:50:58 +08:00
laokaiyao b35982d521 fix(touch): fixed touch interval freq unit convert issue 2025-06-13 16:34:38 +08:00
Erhan Kurubas 81ee3bbe2c Merge branch 'fix/apptrace_crc_calculation' into 'master'
fix(apptrace): calculate crc16 of the current block before swap

See merge request espressif/esp-idf!39815
2025-06-13 10:27:47 +02:00
Konstantin Kondrashov d099224758 Merge branch 'feature/p4_add_3bit_for_wafer_major' into 'master'
feat(efuse): Adds 3-bit field for wafer major version in ESP32-P4

See merge request espressif/esp-idf!39562
2025-06-13 15:06:20 +08:00
Gao Xu d38621e95a Merge branch 'fix/fix_adc_cali_error_c5' into 'master'
fix(adc): fix adc calibration error on c5

Closes IDF-8701, IDF-8702, and IDF-8703

See merge request espressif/esp-idf!39820
2025-06-13 14:25:10 +08:00
Rocha Euripedes 1548e1dd67 Merge branch 'contrib/github_pr_16118' into 'master'
docs(esp_transport_ws): fix parameter name documentat (GitHub PR)

See merge request espressif/esp-idf!39827
2025-06-13 14:01:42 +08:00
Guillaume Souchere 740762c997 feat(usb_serial_jtag): Update vfs read to be POSIX compliant
The function now returns with available data in blocking mode
instead of waiting for the requested size to be available before
returning.
2025-06-13 07:58:22 +02:00
weiyuhan 56130d0366 Resupport C61 documentation build 2025-06-13 11:52:07 +08:00
Richard Allen a8b6017ca5 docs(esp_transport_ws): fix parameter name documentation 2025-06-12 10:44:06 -05:00
Rahul Tank 8fb69d6ef8 Merge branch 'bugfix/fix_kconfig_names' into 'master'
fix(nimble): Modified Kconfig information to make it more user friendly

See merge request espressif/esp-idf!39617
2025-06-12 20:25:29 +05:30
Rahul Tank 52a6290cf5 Merge branch 'feat/ram_optimization' into 'master'
fix(nimble): Add support to minimize ram consumption

Closes BLERP-1947

See merge request espressif/esp-idf!38983
2025-06-12 20:23:25 +05:30
Shreeyash bb5fc032e0 fix(nimble): Add support to minimize ram consumption 2025-06-12 19:31:07 +05:30
Rahul Tank 8192dfc530 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 19:27:38 +05:30
Island 68f9f0381a Merge branch 'feat/add_ble_dtm_on_cert_test' into 'master'
feat(ble): add dtm test code to cert test example on ESP32-C6

Closes BLERP-1985

See merge request espressif/esp-idf!39785
2025-06-12 21:51:43 +08:00
Guillaume Souchere 81b93828cf Merge branch 'change/update-esp-event-register-doxygen' into 'master'
change(esp-event): Update the doxygen comment of esp_event_handler_register

Closes IDF-13368

See merge request espressif/esp-idf!39819
2025-06-12 15:01:41 +02:00
Konstantin Kondrashov 3a7c1a2e74 feat(bootloader): Bootloader OTA update with recovery bootloader feat 2025-06-12 18:47:33 +08:00
gaoxu 49df6a8b77 fix(adc): fix adc calibration error on c5 2025-06-12 16:56:12 +08:00
laokaiyao a4cb2dc98b remove(i2s): remove deprecated configuration in IDF v6.0 2025-06-12 16:53:50 +08:00
laokaiyao bf3a050f4d remove(legacy_dac): remove legacy dac driver in IDF v6.0 2025-06-12 16:53:47 +08:00
Roland Dobai 1b7cb43842 Merge branch 'fix/create_project_read_only' into 'master'
fix(tools): idf.py create-project works in read-only ESP-IDF

Closes IDFGH-15364 and IDFGH-15305

See merge request espressif/esp-idf!39751
2025-06-12 10:50:29 +02:00
zwl 71bc00568d feat(ble): add dtm test code to cert test example on ESP32-C6 2025-06-12 16:34:19 +08:00
Chen Jichang f3f6bc95df feat(gdma): support gdma weighted arbitration on c61 v1.0 2025-06-12 16:17:30 +08:00
morris 3e09d4f251 Merge branch 'refactor/remove_gdma_deprecated_functions' into 'master'
refactor(dma)!: remove deprecated functions

Closes IDF-10942

See merge request espressif/esp-idf!39372
2025-06-12 15:51:15 +08:00
David Čermák d9457b807c Merge branch 'fix/lwip_dhcp_option_len_assert' into 'master'
fix(lwip): Fix appending DHCP option with HW-ID

Closes IDF-13354

See merge request espressif/esp-idf!39749
2025-06-12 15:01:10 +08:00
Guillaume Souchere 2a17297d66 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-12 08:23:20 +02:00
morris fb4b590941 refactor(dma)!: remove deprecated functions 2025-06-12 12:24:58 +08:00
Mahavir Jain a8bf745f23 Merge branch 'feat/adding_different_strategy_to_perform_tls_using_dynamic_feature' into 'master'
Add configuration to control dynamic buffer strategy in mbedtls

Closes IDF-12591

See merge request espressif/esp-idf!39469
2025-06-12 09:52:35 +05:30
Mahavir Jain dd893957f3 Merge branch 'docs/update_reprovisioning_docs_in_wifi_prov_mgr_example' into 'master'
Updated reprovisioning docs in wifi prov mgr example

Closes IDF-12699

See merge request espressif/esp-idf!39058
2025-06-12 09:48:08 +05:30
Chen Ji Chang 81bb6a0557 Merge branch 'refactor/remove_legacy_pcnt_driver' into 'master'
remove(legacy_pcnt)!: remove legacy pcnt driver in IDF v6.0

Closes IDF-13172 and IDF-13036

See merge request espressif/esp-idf!39754
2025-06-12 11:49:55 +08:00
morris 3785a2421d Merge branch 'feat/add_h264_encoder_decoder_demo' into 'master'
feat(esp_h264): Add esp_h264 enocder and decoder example

Closes AUD-6406

See merge request espressif/esp-idf!39676
2025-06-12 11:03:22 +08:00
houhaiyan fa54de736e feat(esp_h264): Added esp_h264 encoder and decoder 2025-06-12 10:43:18 +08:00
Chen Ji Chang f05d47c7d3 Merge branch 'feat/parlio_tx_use_dma_eof' into 'master'
feat(parlio_tx): Supported to transmit infinitely long buffer on ESP32-C5

Closes IDF-12732 and IDF-10974

See merge request espressif/esp-idf!38919
2025-06-12 10:38:15 +08:00
Erhan Kurubas 1615270205 fix(apptrace): calculate crc16 of the current block before swap 2025-06-11 22:41:05 +02:00
Frantisek Hrbata ef9e76236d fix(diag): ruff-format fixes from pre-commit
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-11 16:55:13 +02:00
Frantisek Hrbata b2da8aae45 feat(diag): pass serial port to esp-idf-diag
If a port is specified for the idf.py command, pass it to esp-idf-diag.
This ensures that the esptools used for gathering target information
connect to the explicitly specified port rather than relying on
autodetection.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-11 16:52:18 +02:00
Song Ruo Jing 3e2945b595 fix(gpio): remove GPIO_OUTPUT_SET macro for ESP32P4
Use GPIO_OUTPUT_SET led to compilation error

Closes https://github.com/espressif/esp-idf/issues/16050
2025-06-11 20:56:12 +08:00
Song Ruo Jing 60bef64f5c feat(gpio): esp_rom_gpio_connect_in/out_signal now has their hal implementation 2025-06-11 20:41:37 +08:00
gaoxu e8cefb33c8 fix(adc): fix wrong adc channel on c61 adc/tsens test 2025-06-11 17:37:56 +08:00
hrushikesh.bhosale 619caaa79f docs(wifi_prov_mgr): Updated the README.md for reprovisioning usage
Updated the README.md for the reprovisoning usage in wifi_prov_mgr example
and udpated the commnet for wifi_prov_mgr_reset_sm_state_for_reprovision api.
2025-06-11 15:04:05 +05:30
morris 42682b1e36 Merge branch 'feat/axi_bus_priority' into 'master'
feat(axi): add low level function for adjusting the arbitration priority when DMA and cache both are accessing the external memory

Closes IDF-12654 and IDF-12875

See merge request espressif/esp-idf!39713
2025-06-11 17:11:09 +08:00
Chen Jichang 2fb4c6771a test(pcnt): with malloc comes from PSRAM by default 2025-06-11 16:54:41 +08:00
Chen Jichang d345ac1a50 remove(legacy_pcnt): remove legacy pcnt driver in IDF v6.0 2025-06-11 16:54:41 +08:00
Chen Jichang 00b1d66c6e feat(parlio_tx): support to use dma eof on esp32c5 2025-06-11 16:37:55 +08:00
Chen Jichang f10dcd6140 feat(parlio_tx): add cache safe test 2025-06-11 16:37:55 +08:00
Chen Jichang 86d33f4460 fix(parlio_tx): update gpio state in delete function 2025-06-11 16:37:55 +08:00
Konstantin Kondrashov 3b0f4e4083 feat(efuse): Adds 3-bit field for wafer major version in ESP32-P4 2025-06-11 16:35:03 +08:00
Armando (Dou Yiwen) ae3f20fa9f Merge branch 'refactor/change_mmap_cache_lock_type' into 'master'
mmu: use cache freeze for mmap APIs

See merge request espressif/esp-idf!39199
2025-06-11 06:45:16 +00:00
armando 10d4e71323 feat(mmu): use cache freeze for mmap apis 2025-06-11 10:27:55 +08:00
Peter Macko c205f50f93 feat(ci): Migrate macOS runners to Parallels VM 2025-06-10 18:08:05 +02:00
Marek Fiala b3f24a9533 fix(tools): idf.py create-project works in read-only ESP-IDF
As the native copy function shutil.copyfile preserves directories metadata
such as file permissions, we need to ensure the copied destination
is writable for owner.

Closes https://github.com/espressif/esp-idf/issues/15964
Closes https://github.com/espressif/esp-idf/pull/16021
2025-06-10 14:48:08 +02:00
Marek Fiala 5ec67f5e2c feat(tools): adjusted create_ext.py by ruff formatter 2025-06-10 14:48:08 +02:00
Wu Zheng Hui a2257490d2 Merge branch 'feat/enable_wakeup_tests_for_more_chips' into 'master'
feat(esp_hw_support): enable wakeup tests for more chips

Closes PM-337

See merge request espressif/esp-idf!39675
2025-06-10 20:09:39 +08:00
Sylvio Alves 044de64f5b fix(esp_system): rename modem clock source selection
Make sure to use proper label for modem source selection.
This does not fix any issue.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-10 20:03:06 +08:00
peter.marcisovsky 8f3b01d158 refactor(usb_host): Remove val types from USB Host stack 2025-06-10 13:35:47 +02:00
Jiang Jiang Jian 916f70192f Merge branch 'bugfix/fix_mesh_sta_send_data_error_on_c5' into 'master'
fix(wifi/mesh): fixed the mesh STA sends data error on c5

Closes WIFIBUG-1222 and WIFI-6852

See merge request espressif/esp-idf!39752
2025-06-10 18:56:09 +08:00
Kevin (Lao Kaiyao) e71e7552ef Merge branch 'refactor/remove_legacy_i2s_driver' into 'master'
remove(legacy_i2s): remove legacy i2s driver in IDF v6.0

Closes IDF-13170

See merge request espressif/esp-idf!39681
2025-06-10 18:49:55 +08:00
Kevin (Lao Kaiyao) 443e8718b8 Merge branch 'bugfix/fix_touch_sens_failure' into 'master'
fix(touch): fixed channel offset issue in touch v2

Closes IDFCI-2964

See merge request espressif/esp-idf!39766
2025-06-10 18:34:53 +08:00
Island 85d74cdde8 Merge branch 'feat/support_ble_vendor_evt_report_with_param' into 'master'
feat(bt/bluedroid): Support BLE vendor event reporting with params

Closes BLERP-1624

See merge request espressif/esp-idf!37539
2025-06-10 18:22:51 +08:00
Island a4fcd06785 Merge branch 'feat/support_anonymous_addr_type_for_white_list' into 'master'
feat(ble/bluedroid): Support anonymous address type for white list

Closes BLERP-1844

See merge request espressif/esp-idf!38950
2025-06-10 18:22:40 +08:00
Island a172dac0ef Merge branch 'bugfix/fix_blecibr25_119' into 'master'
fix(ble/bluedroid): Fixed extended adv restart failure during reconnection

Closes BLERP-1969, BLERP-1970, BLERP-1971, and BLERP-1979

See merge request espressif/esp-idf!39709
2025-06-10 18:22:36 +08:00
Song Ruo Jing 0fa5b07c7e Merge branch 'feature/esp32c61_eco3_gpio_update' into 'master'
change(gpio): add GPIO25~29 for ESP32C61 ECO3

Closes IDF-12874 and IDF-9316

See merge request espressif/esp-idf!39714
2025-06-10 16:17:05 +08:00
Aditya Patwardhan f4e8813d45 Merge branch 'contrib/github_pr_15972' into 'master'
feat(esp_http_client): Event to signal last header downloaded (GitHub PR)

See merge request espressif/esp-idf!39309
2025-06-10 13:08:10 +05:30
C.S.M 446e2fce11 Merge branch 'bugfix/jpeg_dec_black_line' into 'master'
bugfix(jpeg): eliminate random black line on jpeg decoder

Closes IDF-13158

See merge request espressif/esp-idf!39742
2025-06-10 15:32:16 +08:00
morris 3550140131 Merge branch 'bugfix/ana_cmpr_cache_safe_test' into 'master'
fix(ana_cmpr): regression in the cache safe test

Closes IDFCI-2951 and IDFCI-2952

See merge request espressif/esp-idf!39764
2025-06-10 15:31:03 +08:00
laokaiyao b25f3fa966 fix(touch): fixed channel offset issue in touch v2 2025-06-10 15:06:23 +08:00
chenjianhua 6392180813 fix(ble/bluedroid): Fixed extended adv restart failure during reconnection 2025-06-10 15:06:03 +08:00
Alexey Lapshin 555c511d28 feat(build): change orphan-handling behavior to error 2025-06-10 14:44:01 +08:00
Zhou Xiao 7847a82b28 change(ble): resupport ble for ESP32C61ECO3 2025-06-10 14:34:49 +08:00
morris baa888e09b fix(ana_cmpr): regression in the cache safe test 2025-06-10 13:52:58 +08:00
laokaiyao 6eb5bfe587 remove(legacy_i2s): remove legacy i2s driver in IDF v6.0 2025-06-10 12:23:23 +08:00
chenjianhua 71e15a1085 feat(ble/bluedroid): Add config for BLE vendor hci command and event 2025-06-10 10:54:18 +08:00
morris 2fbb86deb7 feat(axi): add low level function for adjusting the arbitration priority 2025-06-10 10:32:01 +08:00
wuzhenghui 96c6c0db67 feat(esp_hw_support): enable wakeup tests for more chips 2025-06-10 10:21:19 +08:00
David Čermák c10d3ac9ff Merge branch 'update/wifi_remote' into 'master'
change(examples): Re-enable examples which need esp_wifi_remote

See merge request espressif/esp-idf!39067
2025-06-10 00:42:09 +08:00
wuzhenghui 1c95cdf649 fix(hal): fix pmu_ll_ext1_clear_wakeup_status API 2025-06-09 20:32:48 +08:00
chenjianhua 0fe1586a55 feat(ble/bluedroid): Support BLE vendor event reporting with params 2025-06-09 20:26:18 +08:00
chenjianhua 913645d239 feat(ble/bluedroid): Support anonymous address type for white list 2025-06-09 19:41:54 +08:00
Song Ruo Jing da4ac0c56a feat(gpio): update GPIO capabilities IO0-29 for ESP32-C61 ECO3 2025-06-09 19:09:49 +08:00
zhangyanjiao 3c403e97e1 fix(wifi/mesh): fixed the mesh STA sends data error on c5 2025-06-09 17:51:00 +08:00
Ondrej Kosta 48b37dd56e Merge branch 'contrib/github_pr_16016' into 'master'
Enable Timestamping for Non-PTP Ethernet frames (GitHub PR)

Closes IDFGH-15359

See merge request espressif/esp-idf!39581
2025-06-09 16:58:07 +08:00
Island 23d71fecd6 Merge branch 'feat/add_cte_iq_report_example' into 'master'
Add Bluetooth LE CTE connless example.

See merge request espressif/esp-idf!39327
2025-06-09 16:41:21 +08:00
David Cermak a39d38994f fix(lwip): Fix appending DHCP option with HW-ID 2025-06-09 10:29:24 +02:00
David Cermak d49f4d31d0 fix(examples): Update wifi-remote dependency to include IDF-v6
Use esp_wifi_remote version < v2.0
Planned release v1.0 to support remote and native coexistence, which
should be still compatible with IDFv5.x and IDFv6.x
2025-06-09 10:25:52 +02:00
David Cermak 8fede49368 change(examples): Re-enable examples which need esp_wifi_remote
This reverts commit 7023b489a7.
2025-06-09 10:25:48 +02:00
morris 4233552ce4 Merge branch 'ci/kconfig_change_should_build_full_doc' into 'master'
ci(doc): kconfig change should trigger a full doc build

See merge request espressif/esp-idf!39623
2025-06-09 15:01:36 +08:00
Jiang Jiang Jian 39a44b4a94 Merge branch 'fix/add_check_for_wifi_set_config' into 'master'
fix(wifi): add check for esp_wifi_set_config

See merge request espressif/esp-idf!39683
2025-06-09 14:44:00 +08:00
Island f1dd6da8a3 Merge branch 'bugfix/fix_ble_init_exception' into 'master'
Fixed double free exception during BLE init under low memory

Closes BLERP-1954

See merge request espressif/esp-idf!39680
2025-06-09 14:38:32 +08:00
Harshal Patil c85075dc12 Merge branch 'update/update_cmn_crt_authorities_csv' into 'master'
Update common cert authorities csv

See merge request espressif/esp-idf!39564
2025-06-09 12:08:03 +05:30
C.S.M 724ce1fc97 Merge branch 'feature/suspend_support_c5_c61' into 'master'
feat(spi_flash): Add spi flash suspend support on esp32c5, esp32c61

Closes IDF-12879 and IDF-12635

See merge request espressif/esp-idf!39652
2025-06-09 14:30:02 +08:00
C.S.M c490702340 bugfix(jpeg): eliminate random black line on jpeg decoder 2025-06-09 14:14:20 +08:00
Aditya Patwardhan 8d0527d7bf Merge branch 'feat/support_sha512_for_esp32c5' into 'master'
Support SHA 512 for ESP32-C5

See merge request espressif/esp-idf!39421
2025-06-09 09:42:37 +05:30
wangtao@espressif.com ce3611db26 fix(wifi): add check for esp_wifi_set_config 2025-06-09 11:52:01 +08:00
Laukik Hase 5b7922b028 Merge branch 'refactor/apm_tee_ll_hal' into 'master'
refactor(hal): Refactor the APM LL/HAL APIs

Closes IDF-10423 and IDF-12830

See merge request espressif/esp-idf!38522
2025-06-09 09:13:26 +05:30
Island 71da548124 Merge branch 'change/ble_update_lib_20250606' into 'master'
change(ble): [AUTO_MR] 20250606 - Update ESP BLE Controller Lib

Closes BLERP-1921, BLERP-1919, BLERP-1955, BLERP-1951, BLERP-1950, BLERP-1933, BLERP-1932, BLERP-1929, BLERP-1927, BLERP-1893, BLERP-1885, and BLERP-1900

See merge request espressif/esp-idf!39712
2025-06-09 10:57:03 +08:00
morris 3b504812df Merge branch 'refactor/remove_legacy_timer_driver' into 'master'
!Remove legacy timer group driver

Closes IDF-13169

See merge request espressif/esp-idf!39346
2025-06-09 10:56:06 +08:00
Kevin (Lao Kaiyao) c1666c8033 Merge branch 'refactor/p4_touch_channel_increase_1' into 'master'
refactor(touch): adjust touch channel number on P4 from 0-13 to 1-14

Closes IDF-12744

See merge request espressif/esp-idf!39331
2025-06-09 10:37:17 +08:00
Zhang Shu Xian ec689969c2 Merge branch 'docs/add_doc_link_for_esp32p4' into 'master'
docs: Update hw-reference/index.rst for esp32p4

Closes DOC-8754

See merge request espressif/esp-idf!39707
2025-06-09 10:35:10 +08:00
Gao Xu 18e884532b Merge branch 'camera/add_dvp_example' into 'master'
P4 DVP example and bugfix

See merge request espressif/esp-idf!39308
2025-06-09 09:57:14 +08:00
laokaiyao 6d2bfc70c1 fix(touch): fixed incorrect interval clock source 2025-06-08 22:08:00 +08:00
laokaiyao 0f2c1ab859 refactor(touch): adjust touch channel number on P4 from 0-13 to 1-14 2025-06-08 22:08:00 +08:00
Espressif BOT da1842ea0f change(mbedtls/crt_bundle): Update esp_cmn_crt_bundle certificates 2025-06-08 13:35:51 +05:30
Rahul Tank adcbdd7da4 Merge branch 'bugfix/add_missing_deinit_call' into 'master'
fix(nimble): Add invocation for mempool_deinit

Closes BT-4026

See merge request espressif/esp-idf!39664
2025-06-07 18:34:54 +05:30
David Cermak c57254c4b1 fix(esp_netif): Fix reasigning static IP after netif down -> up
Fixes regression from 307f45d5 (ip_info should be cleaned, but only if we're running DHCP client on that netif)
2025-06-06 15:43:53 +02:00
Laukik Hase 0d8a1f5427 refactor(hal): Refactor the APM LL/HAL APIs 2025-06-06 18:28:47 +05:30
Abhinav Kudnar b03186d71f fix(nimble): memset the sync structs to prevent uncertainty for ext_adv reports 2025-06-06 16:58:48 +05:30
Aditya Patwardhan d835854c8f Merge branch 'bugfix/fix_tls1_3_dynamic_buffer_build' into 'master'
fix(mbedtls): Fix failing build with TLS1.3 only and dynamic buffer enabled

Closes IDF-13140

See merge request espressif/esp-idf!39319
2025-06-06 16:09:25 +05:30
Jiang Jiang Jian a3cf6468b1 Merge branch 'bugfix/fix_cant_enter_modem_sleep_after_probe_disassoc' into 'master'
fix(wifi): fix cant sleep if connection breaks during sending probe

Closes AUD-6394

See merge request espressif/esp-idf!39702
2025-06-06 18:08:54 +08:00
morris 6bbd68b1f8 ci(doc): kconfig change should trigger a full doc build 2025-06-06 18:00:16 +08:00
cjin a10696d7e1 fix(ble): change the default ble cca thresh on ESP32-C2 2025-06-06 17:57:35 +08:00
cjin a2fab0ad60 fix(ble): change the default ble cca thresh on ESP32-H2 2025-06-06 17:57:04 +08:00
cjin 581521526b fix(ble): change the default ble cca thresh on ESP32-C6 2025-06-06 17:56:55 +08:00
cjin c802176535 fix(ble): change the default ble cca thresh on ESP32-C5 2025-06-06 17:56:44 +08:00
zwl 6c5bff1bd8 fix(ble): change ld file on ESP32-C2 2025-06-06 17:56:32 +08:00
zwl 44d7fc43f6 fix(ble): fixed an occasional abnormal scanning stop issue on ESP32-C5 2025-06-06 17:56:23 +08:00
zwl 3c8ba488e0 fix(ble): fixed an occasional assertion issue during sync on ESP32-C6 2025-06-06 17:56:11 +08:00
zwl 4be18a2469 change(ble): [AUTO_MR] Update lib_esp32c2 to 7f72c031 2025-06-06 17:55:08 +08:00
zwl 57c8d23800 change(ble): [AUTO_MR] Update lib_esp32c6 to 35fe65f4 2025-06-06 17:55:08 +08:00
zwl dacaae746e change(ble): [AUTO_MR] Update lib_esp32c5 to 35fe65f4 2025-06-06 17:55:08 +08:00
zwl dbf7835a6b change(ble): [AUTO_MR] Update lib_esp32h2 to 35fe65f4 2025-06-06 17:55:07 +08:00
Geng Yuchao aa4489a879 feat(esp32c5): Enable Bluetooth LE CTE feature 2025-06-06 17:52:41 +08:00
Geng Yuchao d8631ed3db feat(ble): Add Bluetooth LE CTE connectionless AoA/AoD examples 2025-06-06 17:52:41 +08:00
Guillaume Souchere 139df47cf3 feat(usb_cdc): Update vfs read() to comply with POSIX standards 2025-06-06 11:41:26 +02:00
Frangen, Leon eae1f3c302 feat(esp_eth): Enable rx/tx timestamp for non-PTP frames via ioctl 2025-06-06 11:35:10 +02:00
harshal.patil 85ec4df4db change(mbedlts/port): Remove deprecated header files 2025-06-06 14:52:03 +05:30
harshal.patil fe78370ec9 feat(mbedtls/sha): New API for setting SHA mode 2025-06-06 14:51:44 +05:30
harshal.patil afdf1a31c8 feat(soc): Update ESP32-C5 ECO2 to support SHA512 2025-06-06 14:51:44 +05:30
Armando (Dou Yiwen) d0aabd36b4 Merge branch 'fix/fix_xip_psram_ptr_check' into 'master'
psram: fixed psram ptr check issue under xip_psram condition for ESP32P4

Closes IDFGH-15338, IDFGH-15340, and IDF-12458

See merge request espressif/esp-idf!39405
2025-06-06 08:54:34 +00:00
gaoxu b173783d92 docs(camera): add lcd_cam dvp driver docs for camera 2025-06-06 16:53:51 +08:00
Kapil Gupta bc93cee52e Merge branch 'bugfix/set_default_ap_mgmt_cipher' into 'master'
fix(esp_wifi): Set default ap mgmt cipher

See merge request espressif/esp-idf!39691
2025-06-06 14:00:04 +05:30
Roland Dobai 5799f556b4 Merge branch 'break/drop_gdbgui' into 'master'
Tools: Drop official support for gdbgui

Closes IDF-4627

See merge request espressif/esp-idf!39326
2025-06-06 10:23:44 +02:00
Zhang Shuxian 8b30f85f2f docs: Update hw-reference/index.rst for esp32p4 2025-06-06 16:23:43 +08:00
Armando (Dou Yiwen) af69042685 Merge branch 'fix/fix_c5_eco2_psram_wrong_tuning_point' into 'master'
psram: fixed wrong psram tuning point on c5 eco2

See merge request espressif/esp-idf!39642
2025-06-06 07:57:57 +00:00
Marius Vikhammer 24c15284db Merge branch 'bugfix/c5_newlib_tests' into 'master'
test(newlib): fixed failing C5 ECO2 newlib tests

Closes IDFCI-2879

See merge request espressif/esp-idf!39639
2025-06-06 15:50:35 +08:00
muhaidong ea5a9cc3c0 fix(wifi): fix pmksa cache expiration caused by sntp time synchronization issue 2025-06-06 15:42:07 +08:00
morris a04df4631e refactor(gptimer)!: removed the legacy driver
also provide idy.py hints instructions
2025-06-06 15:11:26 +08:00
C.S.M b194636859 feat(spi_flash): Add spi flash suspend support on esp32c5, esp32c61 2025-06-06 15:03:41 +08:00
Zhang Wen Xu 4a80901841 Merge branch 'fix/rx_abort_next_op' into 'master'
fix(openthread): disable rx_abort events in next operation

See merge request espressif/esp-idf!39708
2025-06-06 06:55:04 +00:00
Marius Vikhammer 27f232a929 test(newlib): fixed failing C5 ECO2 newlib tests 2025-06-06 08:38:24 +02:00
Roland Dobai 3efb46e480 remove(tools): Drop official support for gdbgui 2025-06-06 14:32:05 +08:00
Roland Dobai 532ea1ad6d change(tools): fix the style of debug_ext.py 2025-06-06 14:32:05 +08:00
Li Shuai ea4787e6e6 Merge branch 'bugfix/idfci-2959' into 'master'
fix ci build doc field on power management and sleep rst text

Closes IDFCI-2959 and IDFCI-2960

See merge request espressif/esp-idf!39643
2025-06-06 14:29:26 +08:00
Tan Yan Quan ce970143bb fix(openthread): disable rx_abort events in next operation 2025-06-06 12:26:44 +08:00
gaoxu 1533cab12b fix(cam): fix dvp do not generate clock 2025-06-06 11:50:18 +08:00
armando 3b2c6aee2e fix(psram): fixed wrong psram tuning point on c5 eco2 2025-06-06 02:49:59 +00:00
armando 7a6cd632c5 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-06 10:11:32 +08:00
John Boiles 0e680775f9 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-06 10:11:32 +08:00
John Boiles 6287650225 fix(freertos): Use ESP_EARLY_LOGE in vPortTLSPointersDelCb for RISCV
Using ESP_LOG* in this function causes a crash
2025-06-06 10:11:32 +08:00
Richard Allen 65a1d79af2 fix(esp_http_client): fix spurious async open error
Fix esp_http_client_open() often triggering a
spurious HTTP_EVENT_ERROR when is_async=true.

Fixes https://github.com/espressif/esp-idf/issues/16075
2025-06-05 17:54:05 -05:00
liuning 4323627865 fix(wifi): fix cant sleep if connection breaks during sending probe 2025-06-05 20:48:46 +08:00
Jiang Jiang Jian dc814f241a Merge branch 'bugfix/dpp_sync_issue' into 'master'
fix(esp_wifi): Fixed DPP concurrency issue

Closes WIFIBUG-1229

See merge request espressif/esp-idf!38832
2025-06-05 19:49:44 +08:00
Guillaume Souchere 24048d8267 feat(usb_serial_tag_vfs): Add test for read exit conditions
Add a test to make sure the VFS read does not return on reception
of the \n character
2025-06-05 12:14:50 +02:00
Kapil Gupta 514853d2e3 fix(esp_wifi): Set default ap mgmt cipher 2025-06-05 15:35:20 +05:30
Shu Chen de3b6ff3d6 Merge branch 'feat/add_config_for_openthread' into 'master'
feat(openthread): add some configurations in Kconfig

Closes TZ-1823

See merge request espressif/esp-idf!39609
2025-06-05 09:17:25 +00:00
Kapil Gupta 3c84fd7b4d fix(esp_wifi): Make sure old DPP listen is cancelled 2025-06-05 16:55:21 +08:00
Kapil Gupta ab9304d3b7 fix(esp_wifi): Modify check for dpp event handlers 2025-06-05 16:55:21 +08:00
Kapil Gupta a929aae33f change(esp_wifi): Update dpp enrollee example to use updated events 2025-06-05 16:55:21 +08:00
Kapil Gupta 15c336bf49 fix(esp_wifi): Update dpp code to send events in freeRTOS context 2025-06-05 16:55:21 +08:00
Kapil Gupta 76723c063a fix(esp_wifi): Fixed DPP concurrency issue 2025-06-05 16:55:21 +08:00
hrushikesh.bhosale 5928a87aa7 feat(mbedtls): Add configuration to control dynamic buffer strategy in mbedtls
Problem:
1. In low-memory scenarios, the dynamic buffer feature can fail due to memory fragmentation.
2. It requires a contiguous 16KB heap chunk, but continuous allocation and deallocation of
the RX buffer can lead to fragmentation.
3. If another component allocates memory between these operations, it can break up the
available 16KB block, causing allocation failure.

Solution:
1. Introduce configurable strategy for using dynamic buffers in TLS connections.
2. For example, convert RX buffers to static after the TLS handshake.
3. Allow users to select the strategy via a new field in the esp_http_client_cfg_t structure.
4. The strategy can be controlled independently for each TLS session.
2025-06-05 12:43:47 +05:30
gaoxu 2a13a36589 feat(cam): add esp32p4 dvp example 2025-06-05 14:58:58 +08:00
Li Shuai c6c2948a99 change(unit-test): filter top domain power down check for some sleep test cases 2025-06-05 14:28:15 +08:00
zhanghaipeng 49a4325b15 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(4713a69)
- Fixed double free exception during BLE init under low memory
2025-06-05 11:10:25 +08:00
Island 92883fbbdf Merge branch 'feat/ble_mesh_micellaneous_fix' into 'master'
Feat/ble mesh micellaneous fix

Closes BLERP-1939, BLERP-1938, BLERP-1937, and BLERP-1940

See merge request espressif/esp-idf!39519
2025-06-05 10:34:35 +08:00
Rahul Tank 2209a6c0b5 Merge branch 'feat/nimble_ancs_final' into 'master'
fix(nimble): Added support for ANCS in nimble

See merge request espressif/esp-idf!39565
2025-06-04 19:13:29 +05:30
Li Shuai 7912f9fafe change(esp_hw_support): force top domain power up during sleep 2025-06-04 21:03:02 +08:00
Frantisek Hrbata 63b7ae9ad1 fix(esp_common/cmake): do not rely on the target variable being set
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
Frantisek Hrbata b84e9b69ba fix(newlib/cmake): avoid using uninitialized ldfragments variable
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
Frantisek Hrbata 26e49e1e82 fix(vfs/cmake): avoid using uninitialized sources variable
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
Frantisek Hrbata 56ac76d4d2 fix(esp_coex/cmake): avoid using uninitialized srcs variable
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
Frantisek Hrbata f50ae95ab5 fix(lwip/cmake): avoid using uninitialized srcs variable
Currently, lwip's CMakeLists.txt might use an uninitialized srcs value
if CONFIG_LWIP_ENABLE is disabled. This means it could use a srcs value
set by another component, involving sources that are entirely
unrelated to the lwip component during registration. Perhaps we
should simply exit when CONFIG_LWIP_ENABLE is not enabled and avoid
registering the component altogether.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-04 19:50:27 +08:00
Rahul Tank c62b4c7994 fix(nimble): Add invocation for mempool_deinit 2025-06-04 16:35:59 +05:30
Fu Hanxi fc4b2fbc28 Merge branch 'ci/disable-plugin-idf_ci' into 'master'
ci: disable idf-ci plugin

See merge request espressif/esp-idf!39600
2025-06-04 12:12:18 +02:00
Island 7d25722980 Merge branch 'bugfix/fix_ble_smp_fail_0x82' into 'master'
Bugfix/fix ble smp fail 0x82

Closes BLERP-1949

See merge request espressif/esp-idf!39494
2025-06-04 17:08:31 +08:00
Li Shuai f8832b583c Revert "fix(esp_pm): esp32c5 eco2 disable top pd to avoid mem being changed during sleep"
This reverts commit 8c2ea986b4.
2025-06-04 14:15:16 +08:00
Astha Verma a045046a7a fix(nimble): Added support for ANCS in nimble 2025-06-04 08:08:22 +05:30
Kapil Gupta 4ce1da7569 Merge branch 'fix/bcast_mgmt_api' into 'master'
Add BIP support for AP mode.

Closes WIFIBUG-1155

See merge request espressif/esp-idf!38249
2025-06-03 21:46:01 +05:30
tarun.kumar 9abd30adc0 fix(wifi): Made changes in api for sending bcast deauth frames 2025-06-03 20:33:56 +05:30
Marius Vikhammer 6aeba18713 Merge branch 'feature/misc_core_iram' into 'master'
feat(core): added option for placing more core functions in flash

See merge request espressif/esp-idf!39489
2025-06-03 21:44:04 +08:00
Rahul Tank 44ba32bef7 fix(nimble): Modified Kconfig information to make it more user friendly 2025-06-03 16:00:54 +05:30
Roland Dobai a2b7ce698b Merge branch 'feat/ksh_compatible_shells' into 'master'
fix(tools): add support for shells compatible with ksh

Closes IDFGH-15389

See merge request espressif/esp-idf!39602
2025-06-03 12:11:23 +02:00
Jiang Jiang Jian 473f316906 Merge branch 'bugfix/fix_coex_ble_disc' into 'master'
fix(coex): Fix ble disconnect when coexisting wifi on esp32c2

Closes BT-4021

See merge request espressif/esp-idf!39522
2025-06-03 18:08:38 +08:00
Jiang Jiang Jian 1294da2754 Merge branch 'fix/fix_esp32c2_auth_thre_issue' into 'master'
fix(wifi): fix eps32c2 auth threshold issue

Closes WIFIBUG-1231, WIFIBUG-1235, WIFIBUG-1236, and WIFIBUG-1237

See merge request espressif/esp-idf!39496
2025-06-03 18:05:13 +08:00
Guillaume Souchere a3270694f0 fix(driver): remove unecessary if conditions in the read function
This changes affect usb_serial_jtag_vfs and cdcacm_vfs read functions.
This commit removes the exit condition on reception of \n character.
2025-06-03 12:04:14 +02:00
David Čermák 469a39bb22 Merge branch 'fix/netif_ppp_dhcp' into 'master'
fix(esp_netif): Fix incorrect DHCP call for PPP interfaces

Closes IDFGH-15097

See merge request espressif/esp-idf!38403
2025-06-03 17:59:13 +08:00
Radek Tandler efb4d5766a Merge branch 'feature/storage_nvs_perf_blob' into 'master'
Improvement of NVS Blob performance

See merge request espressif/esp-idf!39084
2025-06-03 11:41:29 +02:00
Fu Hanxi efcb8a5a49 Merge branch 'feat/support_kconfig_in_pacman' into 'master'
feat: support kconfig in component manager

Closes PACMAN-963 and PACMAN-686

See merge request espressif/esp-idf!35526
2025-06-03 11:38:47 +02:00
morris 4a8e0d85e4 Merge branch 'fix/gptimer_sleep_retention_case' into 'master'
test(gptimer): power domain is not power down on esp32c5

Closes IDFCI-2923 and IDFCI-2922

See merge request espressif/esp-idf!39591
2025-06-03 17:24:31 +08:00
Xu Si Yu 3c01fd8301 feat(openthread): add some configurations in Kconfig 2025-06-03 16:29:46 +08:00
luoxu 7f95986a0e feat(ble_mesh): update lib to f15b27e2d2 2025-06-03 15:34:32 +08:00
luoxu 224b7e158d fix(ble_mesh): fixed issue with recv ntf before ccc done 2025-06-03 15:34:32 +08:00
luoxu 7738bca124 fix(ble_mesh): fixed proxy server might send segment message with incorrect format 2025-06-03 15:34:32 +08:00
luoxu d4cd6e5741 feat(ble_mesh): support ble 50 for esp32c6 series chip 2025-06-03 15:34:32 +08:00
Frantisek Hrbata 28e3112cde fix(tools): ruff-format changes for shell_types.py
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-03 09:26:50 +02:00
Frantisek Hrbata 1f8ced8e6f fix(tools): add support for shells compatible with ksh
Currently, the export tools are detecting only ksh, but there are also
compatible variants like pdksh and others. This update adds support for
such ksh-compatible shells to improve export tool compatibility with ksh
variants.

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

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-06-03 09:22:53 +02:00
Fu Hanxi 9f4b9d815a feat: support kconfig in component manager 2025-06-03 08:43:09 +02:00
Fu Hanxi 87a5aedb85 ci: disable idf-ci plugin
this plugin will be re-enabled with compatible code in !38755
2025-06-03 08:37:56 +02:00
Jiang Jiang Jian 11ad7e0581 Merge branch 'fix/retry_cnt_issue_for_non_pmf_sta' into 'master'
fix(failure_retry_cnt): Prevent NON-PMF STA retries if esp_wifi_disconnect() before handshake

Closes WIFIBUG-1226

See merge request espressif/esp-idf!39497
2025-06-03 14:05:56 +08:00
Shu Chen 1f45f98573 Merge branch 'feature/optimize-zcl-utility-path' into 'master'
feat(zigbee): optimize the path of zcl_utility

See merge request espressif/esp-idf!39506
2025-06-03 04:30:03 +00:00
Nachiket Kukade 5036509679 Merge branch 'bugfix/enable_ipv6_if_nan' into 'master'
bugfix(wifi): Enable IPv6 support via LWIP_IPV6 when WiFi Aware(NAN) is enabled

Closes WIFIBUG-1215

See merge request espressif/esp-idf!39385
2025-06-03 12:07:42 +08:00
Wan Lei 50ef5946cb Merge branch 'test/spi_common_gpio_refa' into 'master'
feat(driver_spi): gpio reserve support for spi master/slave/slave_hd driver

Closes IDF-9107 and IDF-11126

See merge request espressif/esp-idf!31301
2025-06-03 11:21:43 +08:00
Island 15414f99c3 Merge branch 'fix/ble_log_spi_out_timer_delete' into 'master'
fix(ble): set timer handle to null after deletion

Closes BLERP-1941 and BLERP-1942

See merge request espressif/esp-idf!39548
2025-06-03 11:16:49 +08:00
morris bf950e7dc5 test(gptimer): power domain is not power down on esp32c5 2025-06-03 11:15:24 +08:00
Island f51c769d99 Merge branch 'bugfix/fix_ble_crash_when_check_send_pkts' into 'master'
fix(ble/bluedroid): Fixed null pointer assert in l2c_link_check_send_pkts

Closes BLERP-1944

See merge request espressif/esp-idf!39463
2025-06-03 10:41:41 +08:00
Omar Chebib 0e6c063a13 Merge branch 'bugfix/clic_mapping_mask' into 'master'
fix(hal): make CLIC interrupt routing function to only write related bits

Closes IDF-8654 and IDF-9262

See merge request espressif/esp-idf!39320
2025-06-03 10:15:50 +08:00
Ivan Grokhotkov 441b801bc8 Merge branch 'fix/latest_tag_v6' into 'master'
fix(ci): Fix the latest tag to master's v6.0-dev

See merge request espressif/esp-idf!39413
2025-06-02 17:01:57 +02:00
radek.tandler c23c21f3c0 refactor(nvs_flash): Improved Blob performance
The findItem method was improved to use a hash list in RAM when searching for BLOB data chunks

The findItem method was extended with a parameter that returns the position of an item on the page,
if it is found

The algorithm for matching existing variable-length data (such as strings and BLOBs) with
new values was enhanced by comparing the CRC32 of the data chunks before reading the data from flash
2025-06-02 16:01:40 +02:00
akshat ad164f5d57 bugfix(wifi): Define ETH_ALEN for IPV6 Communication Type 2025-06-02 15:44:39 +05:30
akshat 5dcd1a578b bugfix(wifi): Enable IPv6 support via LWIP_IPV6 when WiFi Aware(NAN) is enabled 2025-06-02 15:44:39 +05:30
Ashish Sharma 2ef09a7952 fix(esp_tls): fix failing build with TLS1.3 only and dynamic buffer 2025-06-02 09:14:03 +08:00
David Cermak 63acb01dc1 fix(esp_netif): Rename IP_EVENT_AP_STAIPASSIGNED to generic name
Since it's the DHCP server that assigned and IP to a client,
(the DHPCS doesn't have to be an AP, and DHCPC doesn't have to
be a station or an Eth netif)

Closes https://github.com/espressif/esp-idf/issues/15663
2025-05-30 16:42:38 +02:00
Marius Vikhammer 4d27e1a399 change(freertos): vApplicationStackOverflowHook is now flashed in flash if option enabled
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH will now also place vApplicationStackOverflowHook in
flash
2025-05-30 14:22:54 +02:00
Marius Vikhammer db3946ab9f change(heap): moved tlsf patch functions to flash 2025-05-30 14:07:13 +02:00
Roland Dobai 47d20da4cd Merge branch 'change/support_lowercase_kconfig_filename' into 'master'
Support misspelled Kconfig[.projbuild] files

Closes IDFGH-15241

See merge request espressif/esp-idf!39183
2025-05-30 11:53:10 +02:00
zhanghaipeng 8150573012 fix(ble/bluedroid): Fixed null pointer assert in l2c_link_check_send_pkts 2025-05-30 17:37:21 +08:00
Jiang Jiang Jian d4129533e6 Merge branch 'bugfix/esp32c5_eco2_cpulockup_top_pu' into 'master'
esp32c5 eco2 disable digitall peripherals power down to avoid mem being changed during sleep

Closes PM-410, PM-406, and PM-436

See merge request espressif/esp-idf!39530
2025-05-30 17:15:23 +08:00
Kevin (Lao Kaiyao) d86a84edfd Merge branch 'change/sync_trm_csv_update_5_27' into 'master'
change(csv_update): sync the csv update to idf

See merge request espressif/esp-idf!39459
2025-05-30 16:00:04 +08:00
Zhou Xiao 1614e71eb6 fix(ble): set timer handle to null after deletion 2025-05-30 15:23:05 +08:00
Krzysztof Budzynski a9cdd337ce Merge branch 'contrib/github_pr_15944' into 'master'
Update CLion documentation page (GitHub PR)

Closes IDFGH-15285

See merge request espressif/esp-idf!39258
2025-05-30 15:04:25 +08:00
Shu Chen 1bb75b2fb9 Merge branch 'feat/and_function_to_exit_ot_mainloop' into 'master'
feat(openthread): add a function to exit openthread mainloop safely

Closes TZ-1796

See merge request espressif/esp-idf!39389
2025-05-30 06:58:26 +00:00
Wan Lei 6cd14c143b Merge branch 'feat/twai_driver_add_programming_guide' into 'master'
feat(driver_twai): new driver add programming guide

Closes IDF-9466

See merge request espressif/esp-idf!39013
2025-05-30 14:27:33 +08:00
renpeiying 94190ff7a9 docs: Add CN translation to CLion doc 2025-05-30 14:07:49 +08:00
wangtao@espressif.com 5521ddff22 fix(wifi): fix esp32c2 auth threshold issue 2025-05-30 13:51:00 +08:00
C.S.M 36a5a71d5c Merge branch 'feat/i2c_support_c61' into 'master'
refactor(i2c): Remove slave_v2 source file

See merge request espressif/esp-idf!39516
2025-05-30 11:34:45 +08:00
Wang Meng Yang 8f224d6a63 Merge branch 'change/opt_hid_device_connect_description' into 'master'
docs(bt/bluedroid): Updated HID Device connect API description

Closes IDFGH-15363

See merge request espressif/esp-idf!39434
2025-05-30 07:12:06 +08:00
Sarvesh Bodakhe bebfd14ae5 fix(wif): Prevent NON-PMF STA retries if esp_wifi_disconnect() before handshake
Ensure that NON-PMF station does not attemp connection retries when
'esp_wifi_disconnect()' is called before the 4-way-handshake completes,
even if 'failure_retry_cnt' allows retries.
2025-05-29 21:46:49 +05:30
Jiang Jiang Jian fed2fb0a23 Merge branch 'bugfix/add_more_checks_when_receiving_espnow' into 'master'
fix(wifi): Added more check when receiving espnow data

Closes WIFI-6846

See merge request espressif/esp-idf!38593
2025-05-29 21:24:28 +08:00
wanckl 77277b59fc feat(driver_twai): new driver add programming guide 2025-05-29 21:00:50 +08:00
Jan Beran c6a0d9118e change: Support misspelled Kconfig[.projbuild] file names
If the name is misspelled, CMake prints out a warning.
Original issue: https://github.com/espressif/esp-idf-kconfig/issues/14
2025-05-29 14:18:20 +02:00
Li Shuai 8c2ea986b4 fix(esp_pm): esp32c5 eco2 disable top pd to avoid mem being changed during sleep 2025-05-29 20:14:13 +08:00
Island 44895c0b3a Merge branch 'fix/ble_mesh_solic_tx_pdu_fix' into 'master'
fix(ble_mesh): fixed issues with proxy solic pdu adv

Closes BLERP-1931

See merge request espressif/esp-idf!39480
2025-05-29 20:07:13 +08:00
Chen Ji Chang 713a63fb9f Merge branch 'feat/gdma_weight_based_arbitration' into 'master'
feat(gdma): support gdma weighted arbitration on C5 ECO2

Closes IDF-8007

See merge request espressif/esp-idf!32826
2025-05-29 19:59:44 +08:00
linruihao 3dc6313c21 fix(coex): Fix ble disconnect when coexisting wifi on esp32c2 2025-05-29 19:20:10 +08:00
C.S.M 99aa39f8e8 refactor(i2c): Remove slave_v2 source file 2025-05-29 18:52:58 +08:00
Ashish Sharma f3da3ef9d4 docs(protocols/esp-tls): adds doc for client session tickets 2025-05-29 17:57:40 +08:00
Rahul Tank adf1c5bc97 Merge branch 'bugfix/add_ci_files' into 'master'
fix(nimble): Add CI files for base configurations

Closes BLERP-1896

See merge request espressif/esp-idf!37954
2025-05-29 14:06:13 +05:30
laokaiyao fb32407754 change(pmu): update pmu sig soc headers of c5 2025-05-29 14:55:14 +08:00
laokaiyao 7f2d5939b5 change(pms): update pms soc headers of p4 2025-05-29 14:55:14 +08:00
laokaiyao f5748246ea change(ecdsa): update ecdsa soc headers of h21 2025-05-29 14:55:14 +08:00
liqigan 31c8dac885 docs(bt/bluedroid): Updated HID Device connect API description
Closes https://github.com/espressif/esp-idf/issues/16020
2025-05-29 14:52:21 +08:00
Wang Meng Yang 6177115241 Merge branch 'fear/add_avrcp_init_state_event' into 'master'
feat(bt/bluedroid): Add events to indicate the initialization states of AVRCP

Closes CBI-1400 and BTQABR2023-507

See merge request espressif/esp-idf!39278
2025-05-29 14:47:02 +08:00
luoxu ca30088aa8 fix(ble_mesh): fixed issues with proxy solic pdu adv 2025-05-29 14:40:49 +08:00
zhangyanjiao edc227c5ea fix(wifi): Added more check when receiving espnow data 2025-05-29 14:31:54 +08:00
Hrushikesh Bhosale 4ffb3fb32d Merge branch 'feat/add_support_for_cert_bundle_for_advanced_ota_example' into 'master'
fix(advanced_ota): Added support for cert bundle in advanced OTA

See merge request espressif/esp-idf!39219
2025-05-29 13:57:00 +08:00
Harshal Patil e05390f338 Merge branch 'update/update_certs_bundle' into 'master'
Update esp_crt_bundle certificates

See merge request espressif/esp-idf!39302
2025-05-29 11:12:38 +05:30
Omar Chebib a7388ddc6c fix(hal): make CLIC interrupt routing function to only write related bits 2025-05-29 12:29:40 +08:00
Chen Jichang 16d25b4a52 feat(gdma): support gdma weighted arbitration on ESP32C5 2025-05-29 11:41:02 +08:00
zhanghaipeng 99121258d4 fix(ble/bluedroid): Fixed BLE SMP state machine inconsistency on disconnection 2025-05-29 10:50:50 +08:00
xieqinan@espressif.com 8806db34a3 feat(zigbee): optimize the path of zcl_utility 2025-05-29 10:36:45 +08:00
zhanghaipeng de9a367f13 feat(ble/bluedroid): Include SMP state in BLE status reporting 2025-05-29 10:36:26 +08:00
Island bb41e4163b Merge branch 'fix/ble_mesh_micellaneous_update' into 'master'
feat(ble_mesh): Fix/ble mesh micellaneous update

Closes BLERP-1894

See merge request espressif/esp-idf!39466
2025-05-29 10:35:46 +08:00
Island ccda40d8f2 Merge branch 'feat/ble_mesh_unify_tinycrypto' into 'master'
feat(ble_mesh): unify tinycrypto component

Closes BLERP-1934

See merge request espressif/esp-idf!39491
2025-05-29 10:35:41 +08:00
Island 1b5758a25e Merge branch 'bugfix/fix_esp32c5_ble_tx_error_after_deep_sleep' into 'master'
fix(phy): update phy lib on ESP32-C5

See merge request espressif/esp-idf!39170
2025-05-29 10:29:16 +08:00
Wang Meng Yang fb6693c7a0 Merge branch 'fix/incorrect_setting_of_sco_packet_type_mask' into 'master'
fix(bt): fixed incorrect mask was used to exclude sco packets

Closes CBI-1403

See merge request espressif/esp-idf!39396
2025-05-29 08:01:20 +08:00
Roman Leonov 79d69bc7e1 Merge branch 'fix/usb_host_test_with_multiple_hubs' into 'master'
fix(ext_hub): Added processing waiting_release flag while dev changed to IDLE

See merge request espressif/esp-idf!39322
2025-05-29 05:05:21 +08:00
harshal.patil 65642866bc change(mbedtls/esp_crt_bundle): Remove deprecated certs for the major release version (v6.0) 2025-05-28 23:16:47 +05:30
Espressif BOT e6d92ab49c change(mbedtls/crt_bundle): Update esp_crt_bundle certificates 2025-05-28 23:16:47 +05:30
Rahul Tank 17338659b9 fix(nimble): Added CI files for various configurations 2025-05-28 21:51:23 +05:30
Richard Allen 30758d9beb feat(esp_http_client): Event to signal last header download
When parsing ND-JSON streams, this is needed to indicate the
point when the ND-JSON stream is considered open, which
occurs just after the last HTTP_EVENT_ON_HEADER.

ND-JSON stream clients cannot rely on the first HTTP_EVENT_ON_DATA,
since that is only triggered by an event, which are optional and
may never be sent, or only sent well after the last HTTP_EVENT_ON_HEADER.

Closes #15952
2025-05-28 08:50:28 -05:00
wanckl 4c11e81fd9 feat(driver_spi): support gpio reserved check 2025-05-28 19:29:46 +08:00
xiongweichao a8ed0133ca feat(bt/bluedroid): Add events to indicate the initialization states of AVRCP 2025-05-28 11:24:32 +00:00
luoxu 5f743900e7 feat(ble_mesh): unify tinycrypto component 2025-05-28 17:35:37 +08:00
gaoxu 449abbab76 fix(cam): fix dvp can not get cam_buffer 2025-05-28 17:29:38 +08:00
David Cermak 80a5ec8e78 feat(iperf): Add minimum IRAM test config 2025-05-28 10:39:36 +02:00
Marius Vikhammer 40844075c3 Merge branch 'revert/enable_sysview_tests' into 'master'
Revert "ci: enable sysview example tests for all chips"

See merge request espressif/esp-idf!39487
2025-05-28 16:17:29 +08:00
Mahavir Jain 619996f74a Merge branch 'bugfix/fix_tls1_3_server_failing_handshake' into 'master'
fix(mbedtls): Fix failing handshake when running HTTPS Server with TLS1.3

Closes IDFGH-15325 and IDF-13113

See merge request espressif/esp-idf!39318
2025-05-28 13:16:49 +05:30
gaoxu 5f582fdc28 fix(cam): decrease i2c sccb frequency for camera 2025-05-28 15:17:30 +08:00
Marius Vikhammer 951bc53a03 fix(sysview): fixed spelling mistake in comment 2025-05-28 08:46:26 +02:00
Marius Vikhammer eb76e6341d Merge branch 'feature/h4_core_support' into 'master'
feat(core): bringup dual-core for H4

Closes IDF-12317, IDF-12319, IDF-12484, IDF-12311, and IDF-12293

See merge request espressif/esp-idf!39279
2025-05-28 14:42:58 +08:00
Marius Vikhammer f764953df3 Revert "ci: enable sysview examples for all chips"
This reverts commit c9cf11cd1c.
2025-05-28 08:38:08 +02:00
Marius Vikhammer 24d2720793 Revert "ci: OpenOCD class as fixture"
This reverts commit 0eb74ffcc3.
2025-05-28 08:38:08 +02:00
Marius Vikhammer 4c3b989ce5 Revert "ci: use shared OpenOCD class for GDB test app"
This reverts commit 60e64d2464.
2025-05-28 08:38:06 +02:00
Marius Vikhammer 09f077969c Revert "feat(tools): add esp32c3 rev1.1 rom version string"
This reverts commit fb2565815e.
2025-05-28 08:38:03 +02:00
Nilesh Kale d8f4388926 Merge branch 'feat/enable_hardware_deterministic_mode_for_esp32h21' into 'master'
feat(hal): enabled hardware deterministic loop feature in ESP32H21

See merge request espressif/esp-idf!39464
2025-05-28 14:23:39 +08:00
morris 94143f2f18 Merge branch 'contrib/github_pr_16025' into 'master'
Update COMPATIBILITY.md - Updated links to documents. (GitHub PR)

Closes IDFGH-15368

See merge request espressif/esp-idf!39479
2025-05-28 14:08:30 +08:00
Wu Zheng Hui 2a861eadfb Merge branch 'feat/support_c5_esp_perip_clk_init' into 'master'
feat: optimize esp32c5 active power consumption

Closes IDF-8844

See merge request espressif/esp-idf!36414
2025-05-28 13:17:25 +08:00
Anton Maklakov 00038bd6f3 Merge branch 'fix/temp_disable_win_cli_installer' into 'master'
fix(test): Temporarily disable test_cli_installer_win

See merge request espressif/esp-idf!39458
2025-05-28 11:53:02 +07:00
morris bb9fbc040e Merge branch 'feat/c61_eco3_soc_update' into 'master'
feat(soc): c61 eco3 rom and soc header update

See merge request espressif/esp-idf!39166
2025-05-28 12:19:26 +08:00
Samuel Obuch e0c43e6e7c Merge branch 'ci/enable_sysview_tests' into 'master'
ci: enable sysview example tests for all chips

Closes IDFCI-807, IDFCI-808, and IDF-13000

See merge request espressif/esp-idf!39153
2025-05-28 03:19:41 +08:00
Konstantin Kondrashov ef58299d06 Merge branch 'doc/improve_part_table_doc' into 'master'
feat(partition_table): Improves documentation for partition table

See merge request espressif/esp-idf!39368
2025-05-27 22:27:39 +08:00
wuzhenghui 65b7e70564 feat(driver): support acquire/release clock source dependency for all drivers 2025-05-27 21:21:38 +08:00
David Cermak b90c12c30f fix(esp_netif): Fix incorrect DHCP call for PPP interfaces
Closes https://github.com/espressif/esp-protocols/issues/800
2025-05-27 20:07:34 +08:00
luoxu ffdd4d6c7b feat(ble_mesh): update lib to bbb57d10f9 2025-05-27 20:04:48 +08:00
wuzhenghui 113f40a3e0 feat(esp_hw_support): support gate PLL div clock source by reference count 2025-05-27 19:55:23 +08:00
wuzhenghui 34f249a28b feat(esp_hw_support): support esp_perip_clk_init for esp32c5 2025-05-27 19:55:22 +08:00
Chen Ji Chang 904d9526d3 Merge branch 'feat/change_mcpwm_prescale' into 'master'
change(mcpwm): change default mcpwm group prescale

Closes IDFGH-13989 and IDF-12790

See merge request espressif/esp-idf!34897
2025-05-27 19:27:43 +08:00
luoxu 643e6ffdf1 feat(ble_mesh): Change the type of rpl size from uint8 to uint16 2025-05-27 17:31:42 +08:00
Marek Fiala c17baef38d feat(test): Lower the scope when win tests are automatically executed
Introduced new rule "atterns-build_system_win", that coveres scope
for windows test. It currently contains only "tools/test_build_system/**/*".
2025-05-27 11:24:58 +02:00
nilesh.kale 7926ffd13f feat(hal): enabled hardware deterministic mode in ESP32H21 2025-05-27 14:54:13 +05:30
Marek Fiala 94994f7ad3 fix(test): Temporarily disable test_cli_installer_win 2025-05-27 11:13:04 +02:00
C.S.M 456ae964a1 Merge branch 'refactor/remove_i2c_slave_v1' into 'master'
refactor(i2c): Remove i2c slave v1 driver

See merge request espressif/esp-idf!39329
2025-05-27 15:28:43 +08:00
Jiang Jiang Jian b3560860dd Merge branch 'bugfix/supplicant_analyzer_fixes' into 'master'
Bugfix/supplicant analyzer fixes

Closes WIFIBUG-1218 and IDF-13129

See merge request espressif/esp-idf!39300
2025-05-27 15:07:30 +08:00
Chen Jichang 77e18528cd feat(mcpwm): change default mcpwm group prescale to 1
Closes https://github.com/espressif/esp-idf/issues/14815
2025-05-27 14:48:14 +08:00
Chen Jichang e89dc281e9 test(mcpwm): add multi input banding to the same pin test
Closes https://github.com/espressif/esp-idf/issues/14958
2025-05-27 14:48:14 +08:00
Michael (XIAO Xufeng) 45a9a31a7e Merge branch 'fix/wss_server_larger_partition' into 'master'
wss_server: use large partition table config

See merge request espressif/esp-idf!39430
2025-05-27 14:47:25 +08:00
Zhang Hai Peng c91a897697 Merge branch 'bugfix/fix_send_delete_link_key_cmd_1' into 'master'
Bugfix/fix send delete link key cmd 1

Closes BLERP-1735

See merge request espressif/esp-idf!39424
2025-05-27 14:41:59 +08:00
Island b4846b8f26 Merge branch 'fix/printf_va_list_cross_function_pass' into 'master'
fix(ble): fixed spi ble log bugs

Closes BLERP-1920, BLERP-1923, BLERP-1926, and BLERP-1928

See merge request espressif/esp-idf!39384
2025-05-27 14:21:01 +08:00
hrushikesh.bhosale 2c5530528c fix(advanced_ota): Added support for cert bundle in advanced OTA
1. Added support for cert bundle in advanced OTA
2. This allows to easily test example with different public servers
2025-05-27 10:53:19 +05:30
Kevin (Lao Kaiyao) 7e554894ce Merge branch 'change/sync_trm_csv_update_5_23' into 'master'
change(csv_update): sync the csv update to idf

See merge request espressif/esp-idf!39386
2025-05-27 12:45:14 +08:00
Xiao Xufeng 1d9e0ceab7 wss_server: use large partition table config 2025-05-27 12:01:57 +08:00
C.S.M 1f37a8da9a refactor(i2c): Remove i2c slave v1 driver 2025-05-27 11:22:20 +08:00
Armando (Dou Yiwen) 2b81deaca8 Merge branch 'change/psram_2t_check_only_on_ap' into 'master'
psram: limited 2t check only for ap

See merge request espressif/esp-idf!39411
2025-05-27 03:10:24 +00:00
Zhang Shuxian 463135fded docs: Update CN translation for partition-tables.rst 2025-05-27 11:02:18 +08:00
laokaiyao 0a93309a89 change(cache): update cache soc headers of c61 2025-05-27 10:31:30 +08:00
laokaiyao 78a2e2cb2f change(apm): update apm soc headers of c5 2025-05-27 10:31:30 +08:00
laokaiyao 10aef84983 change(etm): update etm soc headers of h21 2025-05-27 10:31:30 +08:00
Erhan Kurubas fb2565815e feat(tools): add esp32c3 rev1.1 rom version string 2025-05-27 04:48:18 +08:00
Samuel Obuch 60e64d2464 ci: use shared OpenOCD class for GDB test app 2025-05-27 04:48:18 +08:00
Samuel Obuch 0eb74ffcc3 ci: OpenOCD class as fixture 2025-05-27 04:48:18 +08:00
Samuel Obuch c9cf11cd1c ci: enable sysview examples for all chips 2025-05-27 04:48:18 +08:00
Mahavir Jain aebdb81aa6 Merge branch 'change/exclude_cve-2023-53154' into 'master'
change: adds CVE-2023-53154 to cJSON sbom exclude list

See merge request espressif/esp-idf!39395
2025-05-26 22:03:50 +05:30
Marius Vikhammer e527554144 feat(core): bringup dual-core for H4 2025-05-26 17:11:12 +02:00
Frantisek Hrbata b9d7771a14 fix(docs/idf-size): update idf.py size summary output
The total flash size is no longer reported by esp-idf-size. Update the
output example in the documentation to reflect this change. Also,
include the note about total memory sizes as now printed by
esp-idf-size.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-05-26 23:04:10 +08:00
zhanghaipeng 21391a45fd fix(ble/bluedroid): Fixed clear BLE device recored 2025-05-26 20:21:35 +08:00
Jiang Jiang Jian 03e6dda224 Merge branch 'bugfix/fix_some_wifi_bugs_ralated_max_bss_idle' into 'master'
fix(bss_max_idle): fix some wifi bugs related to bss max idle

Closes WIFIBUG-1193, WIFIBUG-1194, and PM-411

See merge request espressif/esp-idf!39288
2025-05-26 19:48:24 +08:00
morris 6d502b710c Merge branch 'bugfix/fix_lcd_ll_macro_safety' into 'master'
fix(hal): Wrap LL macros with atomic env in do-while for control safety

Closes IDF-11981

See merge request espressif/esp-idf!39202
2025-05-26 19:06:11 +08:00
Ivan Grokhotkov 09bb3c4572 fix(toolchain): install qemu-xtensa if esp32s3 target is requested
Related to https://github.com/espressif/vscode-esp-idf-extension/issues/1404
2025-05-26 11:29:10 +02:00
Ivan Grokhotkov 806ee244c4 change(qemu_ext): ruff pre-commit fixes
Fixup of https://github.com/espressif/esp-idf/pull/15974
2025-05-26 11:27:29 +02:00
Mahavir Jain 4d59537d5f Merge branch 'update/update_cmn_crt_authorities_csv' into 'master'
Update common cert authorities csv

See merge request espressif/esp-idf!39223
2025-05-26 14:55:42 +05:30
David Cermak c275b5e55b fix(ci): Fix the latest tag to master's v6.0-dev
This is used only for caching (pip packages and submodules), so not very
important.
Probably forgotten when merging !38889 (f89d6ee5a0)
2025-05-26 11:22:53 +02:00
Ashish Sharma dbb846c348 fix(mbedtls): Fixes failing TLS 1.3 server handshake
Closes https://github.com/espressif/esp-idf/issues/15984
2025-05-26 17:16:21 +08:00
armando 412b79ed1c change(psram): limited 2t check only for ap 2025-05-26 17:06:03 +08:00
David Čermák a74725a31b Merge branch 'feat/lwip/ipv6_dup_detect_tries' into 'master'
feat(lwip/config): add menuconfig option for setting LWIP_IPV6_DUP_DETECT_ATTEMPTS

Closes IDFGH-9320

See merge request espressif/esp-idf!39080
2025-05-26 17:00:47 +08:00
gongyantao f7fedf3fb8 fix(bt): fixed incorrect mask was used to exclude sco packets 2025-05-26 16:49:06 +08:00
Tomas Sebestik f2ac9185aa Merge branch 'ci/update-commitlinter' into 'master'
Update conventional precommit linter to v1.10.0

Closes RDT-1312

See merge request espressif/esp-idf!39222
2025-05-26 10:32:37 +02:00
wanckl 6fde8cf8d2 ci(esp32c61): disable soc_caps, docs, test for eco3 update 2025-05-26 16:04:23 +08:00
wanckl 783ea76212 feat(soc): c61 eco3 soc header update 2025-05-26 16:04:18 +08:00
Espressif BOT e08ed84287 change(mbedtls/crt_bundle): Update esp_cmn_crt_bundle certificates 2025-05-26 13:19:57 +05:30
Harshal Patil fe40cc8f8b Merge branch 'fix/suppress_cert_bundle_serial_number_warning' into 'master'
fix(mbedtls/esp_crt_bundle): Suppress non-negative serial number warning

Closes IDFCI-2945

See merge request espressif/esp-idf!39381
2025-05-26 13:19:00 +05:30
Zhou Xiao 3ce7470434 change(ble): make falling edge when disabling ts sync 2025-05-26 15:33:47 +08:00
Xu Si Yu bd87b7cf57 feat(openthread): add a function to exit openthread main loop safely 2025-05-26 15:21:31 +08:00
Kevin (Lao Kaiyao) 79c0c7a3db Merge branch 'feature/enable_stub_for_c5_eco2' into 'master'
feat(esp32c5): enable stub for esp32c5 eco2

See merge request espressif/esp-idf!39207
2025-05-26 15:10:09 +08:00
Kevin (Lao Kaiyao) 9466411cd6 Merge branch 'ci/test_i2s_with_psram_config' into 'master'
ci: test ana_cmpr, dac, i2s, touch with CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0

Closes IDF-13027, IDF-13028, IDF-13032, and IDF-13044

See merge request espressif/esp-idf!39005
2025-05-26 14:47:29 +08:00
yinqingzhao 18a468b0d5 fix(bss_max_idle): fix some wifi bugs related to bss max idle 2025-05-26 14:26:19 +08:00
Harshal Patil d8d8e91a80 Merge branch 'fix/all_crypto_periphs_reset_cause_sec_reset' into 'master'
fix(system_internal): Avoid the sec clock reset caused due to resetting all crypto peripherals

Closes IDF-13064, IDFCI-2878, and IDFCI-2877

See merge request espressif/esp-idf!39357
2025-05-26 11:40:06 +05:30
morris 1fa420ef2f Merge branch 'refactor/remove_io_loop_back' into 'master'
refactor(drivers)!: remove unnecessary io_loop_back config option

Closes IDF-11274

See merge request espressif/esp-idf!39062
2025-05-26 14:09:28 +08:00
laokaiyao a2cf361c5a ci: test i2s, touch, ana_cmpr with CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0 2025-05-26 13:09:45 +08:00
laokaiyao 7d086d6a8d fix(ana_cmpr): fixed FUNC_IN_IRAM option involves flash data 2025-05-26 13:09:45 +08:00
laokaiyao 16cc8f974d ci: test i2s, touch, ana_cmpr with CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0 2025-05-26 13:09:45 +08:00
laokaiyao 0359404330 feat(esp32c5): enable stub for esp32c5 eco2 2025-05-26 13:08:46 +08:00
Zhang Xiao Yan c6bc55f91e Merge branch 'docs/update_getting_started_page_c5' into 'master'
docs: update get-started documents for ESP32-C5

See merge request espressif/esp-idf!38992
2025-05-26 13:06:22 +08:00
Zhang Xiao Yan a93d61b756 docs: update get-started documents for ESP32-C5 2025-05-26 13:06:21 +08:00
wanckl c36f55c451 feat(esp_rom): update rom files for eco3 2025-05-26 11:39:26 +08:00
Zhou Xiao b8c1c2b616 fix(ble): fixed spi log init failure return value for ESP32 2025-05-26 10:46:19 +08:00
Ashish Sharma 87feca0350 change: adds CVE-2023-53154 to cJSON sbom exclude list 2025-05-26 10:27:54 +08:00
Artur Zgodziński bf24bcd836 Update COMPATIBILITY.md
Updated links to documents.
2025-05-25 09:02:23 +01:00
Samuel Obuch a952037d82 Merge branch 'ci/fix-custom-oocd-setting' into 'master'
ci: select OpenOCD binary based on runner

See merge request espressif/esp-idf!39375
2025-05-23 22:47:50 +08:00
Zhou Xiao f582bd9ed0 fix(ble): fixed ts sync sleep support trigger 2025-05-23 19:11:50 +08:00
Jiang Jiang Jian 49c373e2e8 Merge branch 'feature/update_wifi_cmd_version' into 'master'
update: update wifi-cmd of iperf example

See merge request espressif/esp-idf!38923
2025-05-23 19:06:32 +08:00
Roland Dobai bf8a3c3e51 Merge branch 'fix/temp_allow_fail_cli_installer_win' into 'master'
fix(test): Temporarily allow test_cli_installer_win to fail

See merge request espressif/esp-idf!39112
2025-05-23 12:41:31 +02:00
morris f6b8ad87fa feat(docs): initial migration guide for idf 6.x 2025-05-23 18:10:01 +08:00
morris c63f51dcb3 refactor(drivers)!: remove unnecessary io_loop_back and pull up/down config option 2025-05-23 18:09:53 +08:00
morris 8afb0fb9e6 Merge branch 'fix/drop_pm_code_if_not_need' into 'master'
fix(drivers): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled

Closes IDFGH-15263

See merge request espressif/esp-idf!39045
2025-05-23 16:15:29 +08:00
Konstantin Kondrashov 9d0d1d2614 Merge branch 'contrib/github_pr_15930' into 'master'
docs(esp32): Add note about including esp_check.h for error-handling.rst docs page in English (GitHub PR)

Closes IDFGH-15271 and DOC-11245

See merge request espressif/esp-idf!39012
2025-05-23 16:13:48 +08:00
Nilesh Kale fa7c9b63b1 Merge branch 'feature/enable_support_for_deterministic_mode_and_ecdsa_192' into 'master'
enable support for deterministic mode and ecdsa 192 in ESP32H2

Closes IDF-12011, IDF-13065, and DOC-11194

See merge request espressif/esp-idf!39103
2025-05-23 15:19:08 +08:00
Zhou Xiao 8184004a4e fix(ble): fixed printf va list cross function pass failure 2025-05-23 12:32:26 +08:00
C.S.M 561c7c4884 Merge branch 'fix/flash_log_clearer' into 'master'
fix(spi_flash): Make GD chip to be linked as default, also optimization the log information

See merge request espressif/esp-idf!39165
2025-05-23 12:16:54 +08:00
harshal.patil 5ae42e6f0b fix(mbedtls/esp_crt_bundle): Suppress non-negative serial number warning
Co-authored-by: Mahavir Jain <mahavir.jain@espressif.com>
2025-05-23 09:28:42 +05:30
Armando (Dou Yiwen) e9d7adf697 Merge branch 'test/re_enable_c5_80m_psram_tests' into 'master'
psram: re-enable 80M psram tests on C5 ECO2

See merge request espressif/esp-idf!39347
2025-05-23 02:58:45 +00:00
Samuel Obuch e80293fdbe ci: select OpenOCD binary based on runner 2025-05-22 20:43:39 +02:00
Adam Múdry 8925459572 Merge branch 'docs/filesystem_considerations_readonly_nvs' into 'master'
docs: Added a mention of read-only NVS in filesystem considerations document

Closes IDF-12520

See merge request espressif/esp-idf!38887
2025-05-22 20:31:52 +02:00
Adam Múdry e0be50d9b5 docs: Added a mention of read-only NVS in filesystem considerations document 2025-05-22 19:18:01 +02:00
Konstantin Kondrashov 909fd09ffa feat(partition_table): Improves documentation for partition table 2025-05-22 16:09:08 +03:00
Island 6897f90612 Merge branch 'feat/reduce_bin_size_and_iram_for_ble_rom_code' into 'master'
feat(ble/controller): Reduce bin size and IRAM for BLE rom code on ESP32-C3 and ESP32-S3

Closes BLERP-1855

See merge request espressif/esp-idf!38987
2025-05-22 20:20:22 +08:00
Rahul Tank d55709fdae Merge branch 'bugfix/coverity_fix' into 'master'
fix(nimble): Add changes for coverity reported issue

See merge request espressif/esp-idf!39292
2025-05-22 16:27:21 +05:30
harshal.patil e08189f37b fix(system_internal): Avoid the sec clock reset caused due to resetting all crypto peripherals 2025-05-22 16:01:02 +05:30
Zhang Shuxian ff408c31c7 docs: Update CN translation for error-handling.rst 2025-05-22 17:39:27 +08:00
Chen Jichang 91f92b0e57 fix(glithc_filter): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:38:58 +08:00
Chen Jichang 90050df641 fix(jpeg): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:38:58 +08:00
Chen Jichang 8555b6c837 fix(adc): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:38:58 +08:00
Chen Jichang 6674470e89 fix(ana_cmpr): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:38:58 +08:00
Chen Jichang fe1091c2ff fix(lcd): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:38:58 +08:00
Chen Jichang 5599fd4b1f fix(sdm): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:38:58 +08:00
Chen Jichang 70e5042ea9 fix(parlio): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:38:58 +08:00
Laukik Hase a1c6d2a458 fix(esp_tee): Fix failing SPI1 flash protection test-cases 2025-05-22 17:35:09 +08:00
C.S.M 0f1dbcc6a5 fix(spi_flash): Make GD chip to be linked as default, also optimization the log information 2025-05-22 17:35:09 +08:00
Chen Jichang a21f7c78f9 fix(sdmmc): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Chen Jichang 4bfd180a94 fix(i2c): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Chen Jichang 6397820d0b fix(rmt): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Chen Jichang c8371ca405 fix(mcpwm): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Chen Jichang 91d1812315 fix(uhci): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Chen Jichang 9837138659 fix(gptimer): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Chen Jichang 9e5ed3bdd2 fix(twai): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
morris 57420057b6 fix(pcnt): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled
Closes https://github.com/espressif/esp-idf/issues/15923
2025-05-22 17:27:18 +08:00
Zhang Shuxian 522e9a1bb9 docs: Update CN translation for ecdsa.rst 2025-05-22 14:55:15 +05:30
nilesh.kale 148d31b659 feat: enable support for deterministic mode for esp32h2 2025-05-22 14:55:15 +05:30
nilesh.kale 0fb8c2a9b8 feat: enabled ECDSA-P192 support for ESP32H2 2025-05-22 14:55:03 +05:30
Wan Lei d86c2bde3e Merge branch 'ci/c61_disable_test_for_eco3' into 'master'
fix(ci): disable target test for c61 eco3 update

See merge request espressif/esp-idf!39349
2025-05-22 17:05:45 +08:00
Rocha Euripedes 5783a22d84 Merge branch 'update_mqtt_pre_refactor' into 'master'
Update esp-mqtt submodule to 6af4446a

Closes IDFGH-11179, IDFGH-14022, IDFGH-14489, and IDFGH-14616

See merge request espressif/esp-idf!38893
2025-05-22 16:59:13 +08:00
Chai Ji’e 13904408af Merge branch 'feature/c61_ldo_dbias_read_from_efuse' into 'master'
feat(C61): support ldo dbias and ocode read from efuse for chip762

See merge request espressif/esp-idf!39215
2025-05-22 16:55:01 +08:00
Wu Zheng Hui a42929a75f Merge branch 'fix/fix_esp_timer_accuracy_when_do_dfs' into 'master'
fix(esp_hw_support): improve esp timer accuracy on DFS for esp32 & esp32s2

Closes PM-405, WIFI-4986, and WIFI-5942

See merge request espressif/esp-idf!39217
2025-05-22 16:38:10 +08:00
Island d877949357 Merge branch 'feat/ble_log_spi_out_dev_phase_3' into 'master'
Feat/ble log spi out dev phase 3

See merge request espressif/esp-idf!39291
2025-05-22 16:26:39 +08:00
wanckl 994f2c2b68 fix(ci): disable target test for c61 eco3 update 2025-05-22 15:17:32 +08:00
C.S.M 9b77416b60 Merge branch 'fix/jpeg_encode_msync' into 'master'
fix(jpeg): Fix wrong parameter in jpeg encoder msync

See merge request espressif/esp-idf!39321
2025-05-22 15:15:42 +08:00
armando 2f8cd616cc test(psram): re-enable 80M psram tests on C5 ECO2 2025-05-22 14:52:40 +08:00
Guilherme Ferreira 1d12eb4124 Merge branch 'feat/add-ws-get-response-headers' into 'master'
feat(tcp_transport): Add ws get HTTP response headers

Closes IDFGH-14252

See merge request espressif/esp-idf!38212
2025-05-22 14:49:49 +08:00
Yuan Yu 18091976ec fix(hal): Wrap LL macros with atomic env in do-while for control safety
- Standardize all LL macros using atomic env variables with `do { ... } while (0)`
- Prevent potential macro misuse in control flow constructs (e.g., if/else)
- Affected targets: esp32, esp32c2, esp32c5, esp32s3, esp32p4, etc.
- Affected modules include: LCD, I2S, TIMER, and others
2025-05-22 14:42:11 +08:00
Armando (Dou Yiwen) dadcc7b9f3 Merge branch 'feat/c5_eco2_psram_timing_tuning' into 'master'
mspi: psram 80M timing tuning on C5 ECO2

Closes IDF-13003

See merge request espressif/esp-idf!39232
2025-05-22 06:41:56 +00:00
Armando (Dou Yiwen) 5133b89183 Merge branch 'test/reenable_sdspi_c5_test' into 'master'
sdspi: re-enable sdspi test on c5 eco2

See merge request espressif/esp-idf!39330
2025-05-22 06:27:28 +00:00
armando 9a3018e201 test(sdspi): re-enable sdspi test on c5 eco2 2025-05-22 14:01:51 +08:00
wuzhenghui 481f42ac9d test(esp_timer): add UT case for esp_timer period alarm with DFS 2025-05-22 13:58:54 +08:00
wuzhenghui 11f32b88ac feat(esp_hw_support): compensate the error introduced to LACT during APB frequency switching 2025-05-22 13:58:54 +08:00
wuzhenghui 022614b1d3 fix(esp_hw_support): update systimer step immediately when XTAL changes on esp32s2 2025-05-22 13:58:54 +08:00
wuzhenghui 2931aa23b6 fix(esp_hw_support): update LACT clock prescale immediately when APB changes on esp32 2025-05-22 13:58:50 +08:00
Aleksei Apaseev 7b54ca004f Merge branch 'ci/dynamic-pipeline-report-adjustments' into 'master'
ci: dynamic pypiline report adjustments

Closes IDFCI-1939 and IDFCI-2436

See merge request espressif/esp-idf!38460
2025-05-22 13:43:17 +08:00
Aleksei Apaseev c25f87920a ci: improve the dynamic pipeline report 2025-05-22 13:25:39 +08:00
armando 7d5f89fa90 fix(ci): fixed psram tests not running on c5 issue 2025-05-22 10:27:19 +08:00
armando 00e3f4885a feat(mspi): supported psram 80MHz timing tuning 2025-05-22 10:27:19 +08:00
glmfe 1d71a9e811 feat(tcp_transport): Add ws get HTTP response headers 2025-05-21 16:34:10 +02:00
Euripedes Rocha 412e7c48ee change(mqtt): Adds retry on publish connect test case
This test case fails mostly for network related issues, with retrys we
might avoid the failure of the whole job.
2025-05-21 22:32:32 +08:00
Euripedes Rocha eb9614d37f change(mqtt): Update submodule to 6af4446a
git log --oneline cac1552e..6af4446a

Detailed description of the changes:
* Multiple event data
  - See merge request espressif/esp-mqtt!240
  - fix: Multiple event data (espressif/esp-mqtt@9c76b70)
* Updated the idf version check for ECDSA support
  - See merge request espressif/esp-mqtt!239
  - fix(mqtt): Updated the idf version check for ECDSA support (espressif/esp-mqtt@7d9a384)
* Added the support for the ECDSA signing
  - See merge request espressif/esp-mqtt!238
  - feat(mqtt): Add support for ECDSA signing (espressif/esp-mqtt@b35a691)
* fix: pubrel message resending when pubcomp not received
  - See merge request espressif/esp-mqtt!236
  - See commit https://github.com/espressif/esp-mqtt/commit/f38a5fc
* Change error message to fix warning.
  - fix: Change error message to fix warning. (espressif/esp-mqtt@c395c2f)
* Small cleanu
  - See merge request espressif/esp-mqtt!231
  - fix: Adds all IDF versions under support (espressif/esp-mqtt@bb85b20)
  - fix: Update badges url to reflect current status (espressif/esp-mqtt@263c167)
* feat(mqtt5): Add parsing of DISCONNECT packet to mqtt5 client
  - mqtt_client: Manage disconnect packet (espressif/esp-mqtt@470cb93)
* feat(mqtt5): Reduce log verbosity for MQTT ACK
  - Reduce log verbosity for MQTT v5 ACKs (espressif/esp-mqtt@6b7b9c3)
* PR: workflows: fix update actions to v4
  - workflows: fix update actions to v4 (espressif/esp-mqtt@06b8923)
* When MQTT_REPORT_DELETED_MESSAGES, delete QOS messages with id 0
  - doc: Clarify deleted message event to cover QoS=0 case (espressif/esp-mqtt@ea036a5)
  - See commit https://github.com/espressif/esp-mqtt/commit/b82c8f6
* fix: Race condition when using destroy
  - See merge request espressif/esp-mqtt!223
  - See commit https://github.com/espressif/esp-mqtt/commit/44292cc
* feat: Add TCP keepalive configuration
  - See commit https://github.com/espressif/esp-mqtt/commit/7c3227a
* feat: Include message topic in all chunks
  - feat: Include message topic in all data events for big messages. (espressif/esp-mqtt@82017e9)
* fix: set TCP transport every time when setting the config
  - See merge request espressif/esp-mqtt!218
  - See commit https://github.com/espressif/esp-mqtt/commit/c3c4cb9
* feat: Allow users to get the transport in use
  - See merge request espressif/esp-mqtt!216
  - See commit https://github.com/espressif/esp-mqtt/commit/97dc85a
* clean: Remove expired deletion from publish
  - See merge request espressif/esp-mqtt!217
  - See commit https://github.com/espressif/esp-mqtt/commit/2285726
2025-05-21 22:32:32 +08:00
Igor Masar 574f037b1e Merge branch 'fix/usb-log-priu32-fifo-config' into 'master'
fix(usb/hcd): Use PRIu32 in FIFO config log for portability

See merge request espressif/esp-idf!39299
2025-05-21 20:00:27 +08:00
Roman Leonov 11382a2aae fix(ext_hub): Added processing waiting_release flag while dev changed to IDLE 2025-05-21 12:13:47 +02:00
hongshuqing 5981ae8a11 feat(pmu): support ldo dbias and ocode read from efuse for chip762 2025-05-21 18:05:05 +08:00
C.S.M bfc69338c8 fix(jpeg): Fix wrong parameter in jpeg encoder msync 2025-05-21 17:54:44 +08:00
Roman Leonov 602941ef61 Merge branch 'refactor/usb_host_ext_hub_port_gone' into 'master'
refactor(ext_hub): Device release (allows to run usb_host test with ext hub)

Closes IDF-12173, IDF-10490, and IDF-13132

See merge request espressif/esp-idf!38176
2025-05-21 17:34:48 +08:00
Konstantin Kondrashov 884e54a8dd Merge branch 'feature/efuse_esp32c61_eco3_update' into 'master'
feat(efuse): Adds efuses for ESP32-C61 ECO3

See merge request espressif/esp-idf!39146
2025-05-21 17:11:33 +08:00
morris b1b99b30ef Merge branch 'fix/i2c_gpio_rsv' into 'master'
fix(i2c): Add gpio reserve check on i2c driver

Closes IDF-9098

See merge request espressif/esp-idf!39310
2025-05-21 16:49:04 +08:00
Marek Fiala a3318d6280 fix(test): Temporarily allow test_cli_installer_win to fail 2025-05-21 16:12:35 +08:00
Mahavir Jain f229a84578 Merge branch 'contrib/github_pr_15968' into 'master'
docs(esp_http_client): update return codes for open & perform (GitHub PR)

See merge request espressif/esp-idf!39239
2025-05-21 13:23:05 +05:30
Jiang Jiang Jian 4b6b9c0ec8 Merge branch 'fix/config_param_gtk_rekeying' into 'master'
Add config param for gtk rekeying on softAP side

Closes WIFI-4897

See merge request espressif/esp-idf!38383
2025-05-21 15:52:44 +08:00
Roland Dobai fc69f691ba Merge branch 'fix/enable_remove_requirements_file' into 'master'
fix(tools): handle missing `requirements.*.txt` files for enabled features

Closes IDF-12849

See merge request espressif/esp-idf!39218
2025-05-21 09:38:04 +02:00
C.S.M 8ab564a711 Merge branch 'feat/add_xmc_32bit_support' into 'master'
feat(spi_flash): Add XMC chip 32-bits address support

See merge request espressif/esp-idf!39161
2025-05-21 15:10:26 +08:00
Mahavir Jain be89fa36aa Merge branch 'feature/add_api_for_cleanup_otadata' into 'master'
feat(esp_ota_ops): Revised logic to always update non-running otadata at the time of setting ota boot partition

Closes IDFGH-13839

See merge request espressif/esp-idf!37928
2025-05-21 11:33:03 +05:30
Nilesh Kale 996a9ca25f fix(app_update): Do not change ota_seq when partition is the same
Revised logic to always update non-running otadata at the time of setting ota boot partition

Closes https://github.com/espressif/esp-idf/issues/14688
2025-05-21 11:33:03 +05:30
Mahavir Jain 88f66ae3aa Merge branch 'feature/esp_tee_h2' into 'master'
feat(esp_tee): Support for ESP32-H2

See merge request espressif/esp-idf!37708
2025-05-21 09:59:26 +05:30
Rahul Tank ebd4caf360 Merge branch 'bugfix/handle_flow_control_flag' into 'master'
fix(nimble): Add chip dependancy flag for Flow control feature

See merge request espressif/esp-idf!39181
2025-05-21 09:53:03 +05:30
Rahul Tank b8650708aa fix(nimble): Add changes for coverity reported issue 2025-05-21 09:50:23 +05:30
C.S.M b164919f4b fix(i2c): Add gpio reserve check on i2c driver,
Closes https://github.com/espressif/esp-idf/issues/15995
2025-05-21 12:15:47 +08:00
Kapil Gupta 17cd200c67 fix(esp_wifi): Fixed static analyzer issues 2025-05-21 09:26:40 +05:30
Kapil Gupta 2ce481ffbd fix(esp_wifi): Disble IP renew skip by default 2025-05-21 09:00:09 +05:30
Song Ruo Jing 0631340e2c Merge branch 'feature/esp32h21_regi2c_support' into 'master'
feat(regi2c): add regi2c support for esp32h21

Closes IDF-11550 and IDF-11858

See merge request espressif/esp-idf!37369
2025-05-21 11:22:07 +08:00
Zhou Xiao 1e6bc70837 fix(ble): fixed upper layer trans append failure bug 2025-05-21 11:06:12 +08:00
C.S.M 6ead06c6d5 feat(spi_flash): Add XMC chip 32-bits address support 2025-05-21 10:50:04 +08:00
zhiweijian 1d739291ca feat(ble/controller): Reduce bin size and IRAM for BLE rom code 2025-05-21 10:22:37 +08:00
morris 27d68f57e6 Merge branch 'fix/driver_issue_by_coverity' into 'master'
Fix some false issue report by coverity

Closes IDF-13116, IDF-13120, IDF-13104, IDF-13106, IDF-13107, IDF-13109, IDF-13112, IDF-13124, and IDF-13126

See merge request espressif/esp-idf!39287
2025-05-21 10:05:28 +08:00
Rahul Tank 6a57d5fa61 Merge branch 'feat/min_size_builds' into 'master'
fix(nimble): Add support for minimilistic builds

Closes BLERP-1848 and BCI-431

See merge request espressif/esp-idf!38515
2025-05-20 21:03:49 +05:30
igor.masar dcdeeeff45 fix(usb/hcd): Use PRIu32 in FIFO config log for portability
The ESP_LOGD message that prints FIFO line sizes used %u for uint32_t,
which may cause incorrect output on some architectures (e.g., ESP32-P4
where uint32_t maps to unsigned long). To ensure portable and correct
logging across all supported platforms, this patch replaces %u with
%" PRIu32 ", defined in <inttypes.h>.

No functional behavior is affected — this is a formatting correction
for debug output only.
2025-05-20 16:27:27 +02:00
Rahul Tank 925b563278 Merge branch 'feat/gattc_gatts_coex' into 'master'
feat(nimble): Add new gattc + gatts coex example for nimble

Closes IDFGH-11642

See merge request espressif/esp-idf!37139
2025-05-20 19:49:02 +05:30
Zhou Xiao e10460ce14 feat(ble): support ts sync for sleep app 2025-05-20 20:52:44 +08:00
Laukik Hase b8e48fbfc0 ci(esp_tee): Enable the tee_test_fw test app for ESP32-H2 2025-05-20 16:31:23 +05:30
Laukik Hase 12e2df2d74 feat(esp_tee): Support for ESP32-H2 - the rest of the components 2025-05-20 16:31:23 +05:30
Laukik Hase 958f4b8900 feat(esp_tee): Support for ESP32-H2 - the esp_tee component 2025-05-20 16:31:22 +05:30
tarun.kumar 004abebdbd fix)wifi): Add GTK rekeying interval field in softap example 2025-05-20 15:33:54 +05:30
tarun.kumar 6d7593c1be fix(wifi) : Add config param for gtk rekeying on softAP side 2025-05-20 15:33:05 +05:30
Roman Leonov f238d75ba3 refactor(ext_port): Remove the error verification, as error will be handled in ext hub driver 2025-05-20 11:34:53 +02:00
Roman Leonov 19ce9ed634 refactor(test_usb_host_async): Added host_lib_task finish notification 2025-05-20 11:34:53 +02:00
Roman Leonov 3003362bcb refactor(usb_host): Cancel hub porpagation to the user, rename non-critical func 2025-05-20 11:34:53 +02:00
Roman Leonov 3fd17b8be8 refactor(hub): Applied new ext_hub api, refactor func names 2025-05-20 11:34:53 +02:00
Roman Leonov fc61875a56 refactor(ext_hub): Pospone the device release, if device is not IDLE 2025-05-20 11:34:53 +02:00
Roman Leonov 754d357f18 refactor(ext_hub): Fixed device release, optimized the order of closing usbh device 2025-05-20 11:34:53 +02:00
Jiang Jiang Jian 0dbce7210d Merge branch 'bugfix/nvs_idfgh_issue' into 'master'
feat(esp_wifi): Add example to write wifi config in nvs

Closes IDFGH-13678

See merge request espressif/esp-idf!36693
2025-05-20 17:16:44 +08:00
Rocha Euripedes 061c05c88c Merge branch 'contrib/github_pr_15967' into 'master'
fix(tcp_transport): Silence recoverable read failures (GitHub PR)

Closes IDFGH-15309

See merge request espressif/esp-idf!39259
2025-05-20 17:02:17 +08:00
Armando (Dou Yiwen) 30f98140bb Merge branch 'fix/slot0_requires_all_pins_in_1bit_mode_issue' into 'master'
sd: fixed all pins need to be set when using slot0 on esp32p4 issue

Closes IDF-12816

See merge request espressif/esp-idf!39197
2025-05-20 09:00:51 +00:00
Zhou Xiao ed09e97c66 feat(ble): support controller raw log print out 2025-05-20 16:54:49 +08:00
morris 7af3bddbca fix(drivers): some false reports from coverity 2025-05-20 16:52:32 +08:00
morris d46019bf43 refactor(bitscrambler): don't use Reset Clock Control lock of RC version 2025-05-20 16:52:32 +08:00
Zhou Xiao 9800d715a5 feat(ble): refactored loss report module and represent frame using struct 2025-05-20 16:22:52 +08:00
yinqingzhao 9c8c40369a update: update wifi-cmd of iperf example 2025-05-20 16:13:28 +08:00
Konstantin Kondrashov 43e2abac14 feat(docs): Improve error handling documentation
Merges https://github.com/espressif/esp-idf/pull/15930
2025-05-20 11:11:07 +03:00
Zhou Xiao cd3aa6527c feat(ble): support le audio log buffer separation 2025-05-20 16:09:25 +08:00
Chai Ji’e 22f63191e6 Merge branch 'feat/support_different_pwr_glitch_dref_to_fit_eco_esp32c61' into 'master'
feat(power_glich): power glitch initial for esp32c5/esp32c61, only detect vddpst pwr_glitch, not support esp32c5_eco0 & eco32c61_eco0/1 no longer

See merge request espressif/esp-idf!35206
2025-05-20 16:06:57 +08:00
Konstantin Kondrashov 086555e0ed feat(efuse): Adds efuses for ESP32-C61 ECO3 2025-05-20 15:57:10 +08:00
Jiang Jiang Jian 0e85a78aa9 Merge branch 'feat/move_ocode_config_to_pmuinit_c6_c5_c61' into 'master'
refactor: move_ocode_to_pmu_init_c6_c5_c61

See merge request espressif/esp-idf!38957
2025-05-20 15:51:32 +08:00
Wu Zheng Hui 8931a8a764 Merge branch 'fix/fix_esp32p4_stuck_in_pd_ana' into 'master'
fix(esp_hw_support): fix esp32p4 may get stuck when entering deepsleep

Closes PM-389 and PM-391

See merge request espressif/esp-idf!38780
2025-05-20 15:50:45 +08:00
Zhou Xiao e4be25ba63 feat(ble): optimized printf functions code size and speed 2025-05-20 15:50:13 +08:00
Zhou Xiao 70792443c7 feat(ble): refactored flush module and provided public flush api 2025-05-20 15:39:30 +08:00
Zhou Xiao bba90309e7 feat(ble): refactored ll isr buffer append and buffer flush using event handler 2025-05-20 15:16:37 +08:00
Zhou Xiao 3568f19fef feat(ble): provided dynamic spi enable/disable api 2025-05-20 14:22:42 +08:00
Zhou Xiao 16a3b2c71b feat(ble): support hci log buffer separation 2025-05-20 14:11:18 +08:00
chaijie@espressif.com 1db79146e9 fix(pmu): fix deepsleep current too big bug for esp32c61 2025-05-20 14:06:15 +08:00
chaijie@espressif.com 74c34669f0 feat(power_glich): support power_glitch of esp32c5_eco1 and above, eco32c61 eco2 and above 2025-05-20 14:06:15 +08:00
Rahul Tank 3f65227d39 feat(nimble): Add demo example for gattc and gatts coex for nimble 2025-05-20 11:27:02 +05:30
Zhou Xiao f8699785e9 feat(ble): optimized macros readability 2025-05-20 12:54:41 +08:00
chaijie@espressif.com 24c46f1b89 refactor: move_ocode_to_pmu_init_c6_c5_c61 2025-05-20 11:08:35 +08:00
morris 7bca1fe76f Merge branch 'fix/twai_psram' into 'master'
test(twai): with malloc comes from PSRAM by default

Closes IDF-13045

See merge request espressif/esp-idf!39246
2025-05-20 10:30:53 +08:00
Jiang Jiang Jian abd5be52f1 Merge branch 'bugfix/fix_rx_bcn_failed_when_sta_off_channel' into 'master'
fix(wifi): rx bcn failed when sta off channel under modem state

Closes WIFIBUG-1179

See merge request espressif/esp-idf!39097
2025-05-20 10:23:27 +08:00
Wu Zheng Hui baab409af9 Merge branch 'fix/fix_iram_safe_code_inlined_to_flash_' into 'master'
fix(esp_hw_support): fix sleep iram safe code inlined to flash

Closes PM-412 and PM-413

See merge request espressif/esp-idf!39185
2025-05-20 09:58:44 +08:00
Nachiket Kukade f931739352 Merge branch 'bugfix/roam_event_scan_failure' into 'master'
bugfix(wifi): Reset scan_ongoing flag in scan done event to allow scan trigger post roam

Closes WIFIBUG-1203

See merge request espressif/esp-idf!39163
2025-05-20 01:51:23 +08:00
Marek Fiala 39cbbab859 fix(tools): Enabled removing requirements.* files 2025-05-19 15:51:49 +02:00
Song Ruo Jing 8262915e28 refactor(regi2c): remove regi2c_defs.h from some targets 2025-05-19 21:46:40 +08:00
Song Ruo Jing 9ef152c220 feat(regi2c): add regi2c support for esp32h21 2025-05-19 21:46:40 +08:00
Jiang Jiang Jian 79d503f267 Merge branch 'fix/c5_iperf_size' into 'master'
iperf: increased app partition size in  example

See merge request espressif/esp-idf!39240
2025-05-19 21:29:47 +08:00
wuzhenghui 077ce905ed fix(esp_hw_support): fix sleep iram safe code inlined to flash 2025-05-19 21:02:24 +08:00
Konstantin Kondrashov f7bc58e4ec Merge branch 'ci/fix_secure_tests_for_efuse_example' into 'master'
fix(examples): Fix CI tests for secure boot cases

Closes IDF-13077

See merge request espressif/esp-idf!39111
2025-05-19 20:59:00 +08:00
sibeibei 10ac8e622e fix(wifi): rx bcn failed when sta off channel under modem state 2025-05-19 20:08:58 +08:00
akshat 928b07b859 bugfix(wifi): Reset scan_ongoing flag in scan done event to allow scan trigger post roam 2025-05-19 15:59:55 +05:30
Jiang Jiang Jian fbfa32c372 Merge branch 'feature/ftm_support_5ghz_esp32c5' into 'master'
feat(esp_wifi): Add FTM support for ESP32C5

Closes WIFI-6426, IDF-10612, and IDFGH-15244

See merge request espressif/esp-idf!33587
2025-05-19 17:34:19 +08:00
Yuan Yu 3d842bcee7 test(twai): with malloc comes from PSRAM by default 2025-05-19 17:12:39 +08:00
Shu Chen 016e83671d Merge branch 'docs/sntp_example_thread' into 'master'
docs(sntp_example): Add Thread network setup instruction for sntp example

Closes IDFGH-14888

See merge request espressif/esp-idf!39121
2025-05-19 08:52:04 +00:00
C.S.M f3147df360 Merge branch 'refactor/remove_i2c_slave_v1_s1' into 'master'
refactor(i2c): Replace i2c test from version one to version two

See merge request espressif/esp-idf!39085
2025-05-19 16:49:10 +08:00
Sudeep Mohanty a7e61220a1 Merge branch 'fix/lp_periph_use_int_raw' into 'master'
change(lp-core): Update LP I2C and LP UART drivers to use raw interrupt status

See merge request espressif/esp-idf!39008
2025-05-19 10:31:03 +02:00
Aditi 747e3e0f31 feat(esp_wifi): Add unit test for writing wifi config in nvs
This commit adds a unit test for using wifi station and softap by flashing wifi config
directly into nvs using NVS Partition generator Utility (using csv file).
2025-05-19 13:53:45 +05:30
Oleg Zinovyev 465d809845 docs: Update CLion documentation
Update CLion documentation page

docs: Update CLion documentation
2025-05-19 10:15:15 +03:00
Rahul Tank a58ce394c4 fix(nimble): Add support for minimilistic builds 2025-05-19 12:44:34 +05:30
Rahul Tank 644e38fb7a Merge branch 'fix/gattc_proc_comparison' into 'master'
fix(nimble): Fix proc rx entry comparison

See merge request espressif/esp-idf!39113
2025-05-19 12:31:49 +05:30
Island bd5b0917fc Merge branch 'fix/ble_mesh_set_proxy_adv_param_failed' into 'master'
fix(ble_mesh): fixed the issue of incorrect proxy adv flag setting

Closes BLERP-1803

See merge request espressif/esp-idf!38654
2025-05-19 14:59:16 +08:00
C.S.M 660244e6ee refactor(i2c): Replace i2c test from version one to version two 2025-05-19 14:13:10 +08:00
Xiao Xufeng 98a0702ffc iperf: increased app partition size in example 2025-05-19 14:11:25 +08:00
Omar Chebib 1e516f0f84 Merge branch 'fix/bootloader_reserved_area_alignment' into 'master'
fix(esp_system): fix RTC reserved area alignment in the linker script

Closes IDFGH-12017

See merge request espressif/esp-idf!28821
2025-05-19 14:09:22 +08:00
Michael (XIAO Xufeng) f23bbb6cc7 Merge branch 'fix/c5_http_server_size' into 'master'
fix: increase the bin size of http example in the partition table

See merge request espressif/esp-idf!39204
2025-05-19 14:06:54 +08:00
akshat 9b1a80695c feat(esp_wifi): Add FTM support for ESP32C5 (ECO2)
Closes https://github.com/espressif/esp-idf/issues/15909
2025-05-19 10:31:16 +05:30
Mahavir Jain 54e071a88c Merge branch 'feat/httpd_register_uri_handler_strdup_failure_case_check' into 'master'
Handling httdp_register_uri_handler() strdup function failure case check

Closes IDFGH-15208

See merge request espressif/esp-idf!38933
2025-05-19 10:23:25 +05:30
Wang Meng Yang e178a09d19 Merge branch 'bugfix/fix_ble_scan_no_adv_report_when_connected' into 'master'
Fixed missing ADV reports after bonding and connection on ESP32-C3 and ESP32-S3

Closes BLERP-1874 and IDFGH-15110

See merge request espressif/esp-idf!38609
2025-05-19 11:55:28 +08:00
armando 3cbe162bf0 refactor(mspi): change mspi timing tuning dirrectory structure 2025-05-19 11:50:43 +08:00
Wang Meng Yang b452748eb5 Merge branch 'change/ble_update_lib_20250516' into 'master'
change(ble): [AUTO_MR] 20250516 - Update ESP BLE Controller Lib

Closes BLERP-1833, BLERP-1838, BLERP-1753, BLERP-1708, BLERP-1849, BLERP-1821, BLERP-1840, BLERP-1778, BLERP-1865, BLERP-1879, BLERP-1880, BLERP-1881, BLERP-1866, BLERP-1882, BLERP-1883, BLERP-1887, BLERP-1889, BLERP-1890, and BLERP-1892

See merge request espressif/esp-idf!39200
2025-05-19 11:50:40 +08:00
armando ad98c1d9a1 fix(sd): fixed menuconfig multi pin definitions issue 2025-05-19 11:16:18 +08:00
Xiao Xufeng de2962dd77 https_server: use larger partition table in the example 2025-05-19 11:00:56 +08:00
WanqQixiang f64b4d00b6 docs(sntp_example): Add Thread network setup instruction for sntp example
Closes https://github.com/espressif/esp-idf/issues/15605
2025-05-19 10:52:28 +08:00
Rohan Fletcher 15e8d43468 fix(tools/idf-qemu): Add qemu_extra_args after monitor stdio -serial 2025-05-18 07:02:40 +12:00
Tomas Sebestik 892ba4cbf7 ci(pre-commit-hooks): update conventional precommit linter to v1.10.0
Closes https://github.com/espressif/esp-idf/issues/15969
Closes https://github.com/espressif/conventional-precommit-linter/issues/31
2025-05-17 17:15:45 +02:00
Maciej Ślusarz 2cc28d90fb feat(docs): Add note about including esp_check.h for error-handling.rst docs page 2025-05-16 17:03:24 +03:00
Richard Allen a0f085d012 docs(esp_http_client): update return codes for open & perform
Extend the return code section to include async return values.
2025-05-16 08:55:08 -05:00
Richard Allen 7f982fa09d fix(tcp_transport): Silence recoverable read failures
In some applications, ESP_TLS_ERR_SSL_WANT_READ and
ESP_TLS_ERR_SSL_TIMEOUT are common results which
need handled at the next layer. Downgrade these
to debug.
2025-05-16 08:37:19 -05:00
C.S.M 1637e27ae3 Merge branch 'docs/uhci_programming_guide' into 'master'
docs(uhci): Added implementation for uart-dma (uhci) programming guide

See merge request espressif/esp-idf!38663
2025-05-16 17:26:26 +08:00
C.S.M 093db55bf4 docs(uhci): implementation for uart-dma (uhci) docs 2025-05-16 15:14:51 +08:00
Zhou Xiao d12e072b35 fix(ble): added missed printf for ll log interface 2025-05-16 15:10:44 +08:00
zwl 9d687daf36 feat(ble): support creating connections during scanning process on ESP32-C5 2025-05-16 15:09:16 +08:00
Konstantin Kondrashov eb81a853fb Merge branch 'fix/bin_log_config' into 'master'
fix(log): Fix bin log config available only for log version 2

See merge request espressif/esp-idf!39186
2025-05-16 15:03:06 +08:00
zwl 207d85a5f7 feat(ble): support creating connections during scanning process on ESP32-H2 2025-05-16 14:31:44 +08:00
zwl cd6038b6cf fix(ble): fixed occasional assert issue in scan and connection scenarios on ESP32-C6 2025-05-16 14:22:25 +08:00
zwl 3cfd4d0166 change(ble): [AUTO_MR] Update lib_esp32c2 to 664e4255 2025-05-16 13:56:14 +08:00
zwl 69158d5064 change(ble): [AUTO_MR] Update lib_esp32c6 to 1304a9d0 2025-05-16 13:56:14 +08:00
zwl 27220c1b4c change(ble): [AUTO_MR] Update lib_esp32c5 to 1304a9d0 2025-05-16 13:56:14 +08:00
zwl 29f89efea6 change(ble): [AUTO_MR] Update lib_esp32h2 to 1304a9d0 2025-05-16 13:56:13 +08:00
zhanghaipeng 244d4f8fa7 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(4713205)
- Fix: Missing ADV reports after bonding and connection
2025-05-16 11:55:52 +08:00
armando 616dd97398 fix(sd): fixed slot0 requires all pins to be set when using 1bit iomux mode on p4 2025-05-16 11:10:58 +08:00
morris 9c8ead5e03 Merge branch 'bugfix/periphint_typo' into 'master'
Fix typo in periph_inttrput_t type name

Closes IDF-12096

See merge request espressif/esp-idf!39179
2025-05-16 10:38:23 +08:00
Armando (Dou Yiwen) b1999b5cb2 Merge branch 'feat/sd_host_ng' into 'master'
sd: driver NG for host layer, supported SDR104 (200 MHz) speed mode

Closes IDF-10545 and IDF-10547

See merge request espressif/esp-idf!37378
2025-05-16 10:05:27 +08:00
Erhan Kurubas 89adafa6af Merge branch 'feat/apptrace-crc16' into 'master'
Store CRC16 checksum value in the PERFMON1 reg

See merge request espressif/esp-idf!39020
2025-05-16 02:40:09 +08:00
Konstantin Kondrashov 184b993d41 Merge branch 'contrib/github_pr_15942' into 'master'
fix(esp_hw_support): Fix compile error on esp_cpu_int_has_handler on ESP32-P4 (GitHub PR)

Closes IDFGH-15283

See merge request espressif/esp-idf!39116
2025-05-15 22:54:19 +08:00
Konstantin Kondrashov e9aa543a43 Merge branch 'contrib/github_pr_15917' into 'master'
feat(docs): Small additions to ulp-risc-v regarding the ULP I2C hardware limitation (GitHub PR)

Closes IDFGH-15254

See merge request espressif/esp-idf!39004
2025-05-15 22:30:17 +08:00
Song Ruo Jing 81cca78ca1 Merge branch 'feature/add_uart_io_deinit_process' into 'master'
fix(uart): eliminate garbled data on TX/RX line in sleep

Closes IDF-4897, IDF-13030, and IDF-13037

See merge request espressif/esp-idf!38673
2025-05-15 21:53:04 +08:00
morris 5945ad1a63 Merge branch 'refactor/add_dfs_init_auto_test' into 'master'
fix(mcpwm): the wrong pm lock type on esp32 and esp32s3

See merge request espressif/esp-idf!38934
2025-05-15 21:51:59 +08:00
Konstantin Kondrashov ec096b3823 fix(log): Fix bin log config available only for log version 2 2025-05-15 16:46:45 +03:00
Rahul Tank 9f69fe5033 fix(nimble): Add chip dependancy flag for Flow control feature 2025-05-15 16:30:22 +05:30
Guilherme Ferreira a5313b998c Merge branch 'feat/add-ws-redir' into 'master'
feat(tcp_transport): Add websocket HTTP redirect

Closes IDF-9073

See merge request espressif/esp-idf!37175
2025-05-15 18:56:56 +08:00
Yuan Yu 9a109ca17c fix(peripherals): Correct typo in periph_inttrput_t
Corrected the typo in the type name from 'periph_inttrput_t' to 'periph_interrupt_t'.
2025-05-15 18:40:57 +08:00
radek.tandler c3239ce836 fix(vfs): Fixed include for target linux failing on MacOs 2025-05-15 12:28:11 +02:00
Konstantin Kondrashov 9f6136d650 Merge branch 'feature/parttable_tool_use_only_ascii_for_names' into 'master'
fix(partition_table): Ignore UTF-8 BOM bytes in csv file

See merge request espressif/esp-idf!38954
2025-05-15 18:19:05 +08:00
Erhan Kurubas cead328c1c feat(apptrace): Store CRC16 checksum value of exposed block in the perfmon reg 2025-05-15 12:17:58 +02:00
Sumeet Singh 3dc92d64b9 fix(nimble): Fix proc rx entry comparison 2025-05-15 15:37:55 +05:30
Nachiket Kukade c707faa41d Merge branch 'bugfix/incorrect_sae_pk_flag' into 'master'
Disable SAE-PK indication in Assoc Request when not configured

Closes WIFIBUG-1044

See merge request espressif/esp-idf!38320
2025-05-15 17:55:45 +08:00
Jiang Jiang Jian 4983ba1a59 Merge branch 'bugfix/wpa_eap_v1_connect_issue' into 'master'
fix(softAP): Adjusted authentication mode for wpa-eap version 1

Closes WIFIBUG-954

See merge request espressif/esp-idf!35321
2025-05-15 17:51:49 +08:00
Tomas Rezucha 94d71a8cd0 Merge branch 'feature/usb_dual_host_2' into 'master'
feat(usb/host): Add option to choose peripherals for USB host library

Closes IDF-11705, IDF-9052, and DOC-10991

See merge request espressif/esp-idf!35401
2025-05-15 16:18:05 +08:00
Omar Chebib 6918a45ee6 fix(esp_system): fix RTC reserved area alignment in the linker script
Make sure the size of the RTC reserved area complies with the alignment requirement.

Closes https://github.com/espressif/esp-idf/issues/13082
2025-05-15 16:11:19 +08:00
Wu Zheng Hui d5441e65e5 Merge branch 'fix/fix_usb_hs_phy_leakage_on_deepsleep' into 'master'
fix(esp_hw_support): Fix deepsleep leakage after USB HS phy is initialized

Closes PM-417

See merge request espressif/esp-idf!39144
2025-05-15 16:02:17 +08:00
cjin 4a18a67898 fix(phy): update phy lib to fix phy errors on ESP32-C5 2025-05-15 15:55:46 +08:00
akshat 1b9fe2142d bugfix(wifi): Fix incorrect SAE-PK advertisement in assoc request 2025-05-15 12:47:11 +05:30
armando 8f6a2370d2 refactor(sd): updated sd host api to make 0 value as no change to configurations
use value 0 for `sd_host_slot_cfg_t` members, means no change to previous configurations,
instead of using `override/valid` flag
2025-05-15 15:16:38 +08:00
luoxu 6297edade5 fix(ble_mesh): fixed the issue of incorrect proxy adv flag setting 2025-05-15 15:04:57 +08:00
Samuel Obuch 31a089c751 Merge branch 'ci/enable_gcov_test' into 'master'
ci: enable gcov example for all chips

See merge request espressif/esp-idf!39114
2025-05-15 15:00:48 +08:00
renpeiying 8e4da0b71c Add CN 2025-05-15 14:57:40 +08:00
tarun.kumar c776b440ec fix(softAP): Adjusted authentication mode for wpa-eap version 1 2025-05-15 13:51:31 +08:00
morris a8128adc92 Merge branch 'bugfix/fix_bitscrambler_rx_mode_init_error' into 'master'
fix(bitscrambler): fix bitscrambler RX mode initialization error

Closes IDF-13082

See merge request espressif/esp-idf!39154
2025-05-15 13:42:03 +08:00
morris 4911efca3a Merge branch 'feat/h4_basic_gpio_support' into 'master'
feat(driver_gpio): add esp32h4 basic gpio support

Closes IDF-12390

See merge request espressif/esp-idf!38604
2025-05-15 13:37:01 +08:00
Anton Maklakov c19ed90553 Merge branch 'docs/fix_p4_usb_jtag_pins' into 'master'
docs(jtag): fix esp32p4 usb jtag pins

See merge request espressif/esp-idf!38629
2025-05-15 13:14:04 +08:00
Jiang Jiang Jian c742f0a677 Merge branch 'bugfix/wpa2_suiteb_192bit_reason_code' into 'master'
fix(wifi): Add enterprise check for Suite-B 192-bit certification

Closes WIFIBUG-1070

See merge request espressif/esp-idf!37498
2025-05-15 11:53:31 +08:00
Dong Heng afa79e0473 fix(bitscrambler): fix bitscrambler RX mode initialization error 2025-05-15 11:43:39 +08:00
Gao Xu 733c0586bc Merge branch 'refactor/rng_ll_p4' into 'master'
refactor(rng): refactor to use hal/ll apis for P4

Closes IDF-12476

See merge request espressif/esp-idf!38119
2025-05-15 11:30:54 +08:00
Song Ruo Jing abc9c1fd55 test(gpio,gpio_ext,ppa): test with malloc from psram by default 2025-05-15 11:21:06 +08:00
Song Ruo Jing fa00aa43e7 refactor(uart): minor refactor to uart wakeup code 2025-05-15 11:20:59 +08:00
Song Ruo Jing f1446571e7 fix(uart): eliminate garbled data on UART TX/RX line in sleep 2025-05-15 11:07:26 +08:00
Song Ruo Jing 007a497483 feat(uart): add pin release process to uart driver 2025-05-15 11:07:26 +08:00
tarun.kumar 4fae51e3c1 fix(wifi): Sending disconnect event in connect fail and add enterprise check in Suite-B 192-bit certification 2025-05-15 11:02:32 +08:00
armando c2b8ea07d0 feat(sd): supported UHS-I SDR104 200MHz speed 2025-05-15 10:57:45 +08:00
armando 0944a2a68a test(sd): added SD NG driver allocation tests 2025-05-15 10:57:45 +08:00
armando 0c8b297610 fix(sd): fixed sd with offset performance test wrong log issue 2025-05-15 10:57:45 +08:00
armando 77ae2808b0 refactor(sd): port legacy sd driver with NG driver 2025-05-15 10:57:45 +08:00
armando 402bf0ce58 feat(sd): sd host driver layer driver NG 2025-05-15 10:57:33 +08:00
wanckl 0ed5a94ab0 feat(driver_gpio): add esp32h4 basic gpio support 2025-05-15 10:35:49 +08:00
wuzhenghui 7107177e2d fix(esp_hw_support): Fix deepsleep leakage after initializing USB HS phy 2025-05-15 10:12:59 +08:00
Konstantin Kondrashov 179eb5a5aa refactor(partition_table): Refactoring of code style 2025-05-14 18:45:49 +03:00
Konstantin Kondrashov fc72712b10 fix(partition_table): Ignore UTF-8 BOM bytes in csv file 2025-05-14 18:45:49 +03:00
Roland Dobai f9765d0316 Merge branch 'feat/update_ccache_to_4.11.2' into 'master'
feat(tools): Update ccache 4.10.2 -> 4.11.2

Closes IDFGH-14606

See merge request espressif/esp-idf!38382
2025-05-14 22:24:15 +08:00
Jiang Jiang Jian f1da7a55b1 Merge branch 'bugfix/fix_some_wifi_bugs_250512' into 'master'
bugfix/fix_some_wifi_bugs_250512

See merge request espressif/esp-idf!39047
2025-05-14 21:31:38 +08:00
Harshal Patil e70f2705f3 Merge branch 'fix/enable_ecdsa_verify_sw_fallback_when_p192_disabled' into 'master'
Enable signature verification s/w fallback when ECDSA-P192 is disabled

See merge request espressif/esp-idf!39039
2025-05-14 21:06:03 +08:00
Rahul Tank 01520e84fb Merge branch 'bugfix/fix_nimble_issue_0513' into 'master'
fix(nimble): fix nimble issues 10052025

Closes BLERP-1843, BLERP-1845, BLERP-1861, BLERP-1864, and BLERP-1776

See merge request espressif/esp-idf!39095
2025-05-14 20:27:25 +08:00
Jiang Jiang Jian e7d7412222 Merge branch 'feat/impl_bt_coex_timer_event' into 'master'
feat(coex): implement BT coex timer event

See merge request espressif/esp-idf!39048
2025-05-14 20:25:55 +08:00
Jiang Jiang Jian acc74fd930 Merge branch 'bugfix/force_calibrate_ocode_no_inline_c5eco2' into 'master'
fix(esp_hw_support): Force function calibrate_ocode not inlined to flash

See merge request espressif/esp-idf!39007
2025-05-14 18:44:00 +08:00
Jiang Jiang Jian 582e5690b2 Merge branch 'fix/rrm_config_set' into 'master'
Set rrm config condition in case RRM monitoring is enable

Closes WIFIBUG-1161

See merge request espressif/esp-idf!38841
2025-05-14 17:41:29 +08:00
Samuel Obuch b5303b5d95 Merge branch 'freertos_sysview_deadlock_fix' into 'master'
fix(app_trace): prevent deadlock on sysview start

See merge request espressif/esp-idf!38844
2025-05-14 17:10:42 +08:00
Anton Maklakov c559e045fc docs(jtag): fix esp32p4 usb jtag pins 2025-05-14 17:02:22 +08:00
Zhang Shuxian f201fd08da docs: Update CN for usb_host.rst 2025-05-14 10:34:18 +02:00
Tomas Rezucha cf18fe5568 refactor(usb/host): Remove deprecated usb_otg_periph.h 2025-05-14 10:34:17 +02:00
Tomas Rezucha b961f42e8b feat(usb/host): Add option to choose peripheral for USB host library
Starting with ESP32-P4 we can have targets that have more than 1 USB-OTG peripheral.
This commit adds an option to choose which peripherals will be used by USB Host lib.

Internally, we will still have only 1 Root HUB but with multiple Root ports.
2025-05-14 10:34:11 +02:00
wanglei accfa14bcd fix(esp_hw_support): Force function calibrate_ocode not inlined to flash 2025-05-14 16:24:03 +08:00
tarun.kumar 36588e9a92 fix(wifi) : Set rrm config condition in case RRM monitoring is enabled 2025-05-14 16:21:51 +08:00
Fu Hanxi 66e5cc8801 Merge branch 'ci/child-pipeline-default-value' into 'master'
Ci/child pipeline default value

See merge request espressif/esp-idf!39130
2025-05-14 16:21:41 +08:00
Fu Hanxi 9f68214ab7 ci: child pipeline default value to avoid circular dependency issue 2025-05-14 10:16:36 +02:00
Armando (Dou Yiwen) 0a771792a9 Merge branch 'feat/cache_support_h21' into 'master'
cache: supported cache driver and cache panic drivers on esp32h21

Closes IDF-11524 and IDF-11525

See merge request espressif/esp-idf!39122
2025-05-14 15:48:27 +08:00
Fu Hanxi 0c1e5a13e2 Merge branch 'ci/fix-deploy-jobs-rules' into 'master'
ci: improve deploy rules

Closes IDFCI-2938

See merge request espressif/esp-idf!39068
2025-05-14 15:11:10 +08:00
harshal.patil 0154c7cfe3 fix(mbedtls): Enable signature verification s/w fallback when ECDSA curve is disabled 2025-05-14 12:31:56 +05:30
morris cd10016953 Merge branch 'refactor/public_some_gpio_private_api' into 'master'
refactor(gpio): public some private GPIO functions

See merge request espressif/esp-idf!39120
2025-05-14 14:38:05 +08:00
Peter Dragun 4acf13dc7b Merge branch 'docs/autocolor_multiline' into 'master'
docs(tools/idf-monitor): Add note about autocoloring limitation on multiline logs

Closes IDFGH-15114

See merge request espressif/esp-idf!38829
2025-05-14 14:31:24 +08:00
gaoxu e1b6493304 feat(adc): add always inline for adc ll functions called by bootloader 2025-05-14 13:45:55 +08:00
Mahavir Jain 9750c21933 Merge branch 'feat/cjson_update_to_upstream' into 'master'
feat(cjson): update to latest upstream

See merge request espressif/esp-idf!39053
2025-05-14 13:43:07 +08:00
Gao Xu a6c26c3e21 Merge branch 'feat/add_cam_pm_lock' into 'master'
feat(cam): esp_cam add pm lock function

Closes IDF-12596 and IDF-10093

See merge request espressif/esp-idf!38120
2025-05-14 13:28:23 +08:00
Mahavir Jain ef08ccaddf Merge branch 'bugfix/secure_ota_no_secure_boot' into 'master'
fix: secure OTA without secure boot issue for MMU page size configurable SoCs

Closes IDFGH-15277

See merge request espressif/esp-idf!39022
2025-05-14 13:11:00 +08:00
Sumeet Singh 0a8064c1e5 fix(nimble): Fixed async race condition with HCI outstanding packets counter 2025-05-14 10:26:28 +05:30
Rahul Tank 58542cfdc9 fix(nimble): Extend support for allow connect during scan for more chips 2025-05-14 10:25:13 +05:30
Rahul Tank b9546506d4 fix(nimble): Add support for anonymous address type for whitelist 2025-05-14 10:24:39 +05:30
Rahul Tank 342e0024f1 fix(nimble): Add configurable option to select ext adv v2 command 2025-05-14 10:24:10 +05:30
Ashish Sharma 1e0577ebd0 feat(cjson): update to latest upstream 2025-05-14 12:45:35 +08:00
Armando (Dou Yiwen) 90b978c9cf Merge branch 'feat/mmu_support_h21' into 'master'
mmu: supported esp_mmu_map and flash_mmap drivers on esp32h21

Closes IDF-11540

See merge request espressif/esp-idf!39038
2025-05-14 11:40:59 +08:00
armando 0c6aeecde4 feat(cache): supported cache panic driver on h21 2025-05-14 11:37:30 +08:00
armando acda9a7a7e feat(cache): supported cache driver on h21 2025-05-14 11:37:30 +08:00
gaoxu e7449782d0 ci(cam): test csi/dvp/isp_dvp and test iram_safe 2025-05-14 11:11:59 +08:00
gaoxu 6599ba3c00 feat(cam): esp_cam add pm lock function and test 2025-05-14 11:11:58 +08:00
Zhang Xiao Yan 2189c52776 Merge branch 'docs/add_p4_hdg_and_user_guide' into 'master'
docs: Add links to ESP32-P4 HDG and user guides

See merge request espressif/esp-idf!39029
2025-05-14 10:21:46 +08:00
morris 2b4aae2e3a refactor(gpio): public some private GPIO functions
like enable/disable open drain, enable/disable output capability
2025-05-14 10:14:07 +08:00
Rahul Tank c9bab9e0d3 Merge branch 'fix/gatt_cache_inc_services_uuid_type_error' into 'master'
fix(nimble): Fixed UUID type error in gatt caching included service search

See merge request espressif/esp-idf!39086
2025-05-14 09:26:19 +08:00
Samuel Obuch bee2ed2502 ci: fix app_trace_basic rules and test 2025-05-13 21:31:43 +02:00
Samuel Obuch 4b664441ac ci: enable gcov example for all chips 2025-05-13 21:26:14 +02:00
Roman Leonov 79c66cc16c Merge branch 'refactor/usb_dwc_buff_delay_on_p4' into 'master'
refactor(hcd_dwc): Apply ls_via_fs_hub delay for all targets

See merge request espressif/esp-idf!38946
2025-05-14 01:08:55 +08:00
Tomas Rezucha 27099e1c55 Merge branch 'fix/usbjtag_after_tinyusb' into 'master'
fix(usb/phy): Fix ability to switch back to USB/JTAG after uninstalling TinyUSB

Closes IDFGH-15273 and IDFGH-15248

See merge request espressif/esp-idf!39061
2025-05-14 01:06:05 +08:00
Konstantin Kondrashov 11321b585e fix(examples): Fix CI tests for secure boot cases 2025-05-13 19:20:22 +03:00
Weltenprinz f24025f798 fix(esp_hw_support): Fix compile error on esp_cpu_int_has_handler on ESP32-P4
Merges https://github.com/espressif/esp-idf/pull/15942
Closes https://github.com/espressif/esp-idf/issues/15941
2025-05-13 18:13:15 +03:00
Igor Masar c06fa310cf Merge branch 'feat/usb-explicit-fifo-config' into 'master'
feat(usb/hal): Add HAL API to configure custom FIFO layout

Closes IDF-9042

See merge request espressif/esp-idf!38404
2025-05-13 22:28:41 +08:00
Sudeep Mohanty 0f45b6c6c3 change(lp-core): Update LP I2C and LP UART drivers to use raw interrupt status
This commit updates the LP I2C and LP UART drivers to use the raw
interrupt status without enabling the interrupts.
2025-05-13 15:43:39 +02:00
Chen Yu Dong 8a4f94faf4 Merge branch 'ci/shiny_pip_install' into 'master'
ci: optimize ci runner pip install

Closes RDT-1299

See merge request espressif/esp-idf!38953
2025-05-13 21:29:11 +08:00
Mahavir Jain 17599e60c7 test: add secure image verification case for C6/H2 2025-05-13 18:09:11 +05:30
Mahavir Jain eb5d761c9d fix: secure OTA without secure boot issue for MMU page size configurable SoCs
For secure app verification during OTA update case, the image was
getting memory mapped twice and hence the failure in verification.

Modified from memory mapped flash read to SPI flash read approach
for the MMU page size from image header.

Regression from 07318a4987

Closes https://github.com/espressif/esp-idf/issues/15936
2025-05-13 18:09:03 +05:30
Sumeet Singh b901559207 fix(nimble): Fixed UUID type error in gatt caching included service search 2025-05-13 17:32:01 +05:30
Fu Hanxi dc05b46ab5 ci: inherit more variables
this is somehow a temporary workaround, the long-term solution shall be
related to `inherit:variables`
2025-05-13 13:27:42 +02:00
Fu Hanxi 9a9438b79a ci: improve rules for deploy jobs 2025-05-13 13:27:42 +02:00
John Boiles c9c8560169 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-13 13:21:41 +02:00
Peter Marcisovsky 6d2f4b3656 Merge branch 'feat/usb_host_move_dma_cap_mem_to_psram_p4' into 'master'
feat(usb_host): Move DMA capable memory to external ram on P4

Closes IDF-11115

See merge request espressif/esp-idf!37949
2025-05-13 19:08:11 +08:00
Chen Ji Chang 3baaa8c829 Merge branch 'fix/rename_the_rmt_extra_flags_structure' into 'master'
docs(rmt): rename the rmt extra flags structure

Closes IDFGH-15274 and IDFGH-15270

See merge request espressif/esp-idf!39041
2025-05-13 18:37:05 +08:00
Marius Vikhammer 334cbe0dab Merge branch 'docs/build_h4_docs' into 'master'
feat(docs): add support for building H4 docs

See merge request espressif/esp-idf!38637
2025-05-13 16:16:01 +08:00
Island 617d215f93 Merge branch 'bugfix/fix_some_ble_bugs_0422' into 'master'
Bugfix/fix some ble bugs 0422

Closes BLERP-1863

See merge request espressif/esp-idf!39042
2025-05-13 15:38:38 +08:00
peter.marcisovsky cd5b3877bf 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 15:37:30 +08:00
linruihao b370ebdef4 feat(coex): implement BT coex timer event 2025-05-13 15:13:12 +08:00
Marek Fiala 478eea8992 feat(tools): Update ccache 4.10.2 -> 4.11.2
Closes https://github.com/espressif/idf-installer/issues/305
2025-05-13 15:07:51 +08:00
armando 45db752f2f feat(mmu): supported esp_mmu_map and flash_mmap drivers on esp32h21 2025-05-13 14:58:19 +08:00
C.S.M 38e84d554a Merge branch 'fix/i2c_ci_esp32c5' into 'master'
test(i2c): Re-enable i2c test on esp32c5

Closes IDFCI-2895

See merge request espressif/esp-idf!39040
2025-05-13 14:56:02 +08:00
yinqingzhao 4e20dc58b3 fix(wifi): fix build issue by modifying parttion table of file_server example 2025-05-13 14:39:30 +08:00
Chen Jichang e53c25d3ae docs(rmt): improve the documentation
Closes https://github.com/espressif/esp-idf/issues/15933
Closes https://github.com/espressif/esp-idf/issues/15929
2025-05-13 14:14:45 +08:00
hrushikesh.bhosale 542d07d34a 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-13 11:27:02 +05:30
Rahul Tank 764d722bec Merge branch 'feat/gatt_cache_info' into 'master'
fix(nimble): Added api's to fetch gatt cache info

Closes BLERP-1702

See merge request espressif/esp-idf!38048
2025-05-13 13:54:19 +08:00
morris aa714f5ae6 Merge branch 'doc/summarize_bs_support_status' into 'master'
docs(bitscrambler): update documentation with integration details

See merge request espressif/esp-idf!39044
2025-05-13 13:37:52 +08:00
Roland Dobai 810eadd917 Merge branch 'fix/gen_soc_caps' into 'master'
change: config options of the same name must have the same type

Closes IDF-12805

See merge request espressif/esp-idf!38322
2025-05-13 12:48:03 +08:00
Mahavir Jain 28afc7067f Merge branch 'fix/esp32c5_eco2_efuse_test' into 'master'
fix(efuse): Fix ESP32-C5 eFuse test for ECO2

Closes IDFCI-2920

See merge request espressif/esp-idf!39046
2025-05-13 12:13:46 +08:00
yinqingzhao 5bed100761 feat(wifi): add tx error 0xa0 count 2025-05-13 11:54:59 +08:00
Jiang Jiang Jian 9c84243073 Merge branch 'bugfix/wps_pbc_overlap_uuid' into 'master'
fix(wpa_supplicant): Ensure pbc_overlap event is posted correctly

Closes WIFIBUG-1115 and WIFIBUG-1055

See merge request espressif/esp-idf!38206
2025-05-13 11:11:43 +08:00
Marius Vikhammer f3d1717408 docs(esp32h4): support building esp32h4 docs 2025-05-13 11:09:15 +08:00
Wu Zheng Hui 27ec17a623 Merge branch 'fix/fix_usj_pad_leakage' into 'master'
fix(esp_hw_support): fix usj pad leakage in lightsleep

Closes PM-407

See merge request espressif/esp-idf!38949
2025-05-13 10:41:51 +08:00
Jiang Jiang Jian c4aaceb430 Merge branch 'bugfix/scan_stop_when_conenct' into 'master'
fix(esp_wifi): Fix locking in inccorrect state when stop_scan is called after connect

See merge request espressif/esp-idf!38779
2025-05-13 10:36:12 +08:00
zhanghaipeng 7c16bce827 fix(ble/bluedroid): Fixed issue with deleting link key when classic Bluetooth is not used 2025-05-13 10:25:24 +08:00
gaoxu b691eaba6d refactor(rng): refactor to use hal/ll apis for P4 2025-05-13 09:09:06 +08:00
Ivan Grokhotkov 7f6e7f4506 Merge branch 'version/v6.0.0' into 'master'
change(version): Update version to v6.0-dev

See merge request espressif/esp-idf!38889
2025-05-12 23:56:30 +02:00
Samuel Obuch e65f7359e6 fix(sysview): do not use freertos ticks to prevent deadlock 2025-05-12 16:12:26 +02:00
renpeiying f5a28000fa docs: Update CN for idf-monitor.rst 2025-05-12 22:07:50 +08:00
Peter Dragun 9859f5e690 docs(tools/idf-monitor): Add note about autocoloring limitation on multiline logs
Closes https://github.com/espressif/esp-idf/issues/15793
2025-05-12 22:07:50 +08:00
Shreyas Sheth 0103155f6f fix(esp_wifi): Fix locking in incorrect state when stop_scan is called after connect 2025-05-12 18:03:43 +05:30
akshat 3ee449bc5d fix(wpa_supplicant): Disconnect from previous AP while initiating WPS 2025-05-12 20:23:11 +08:00
akshat 91da4ea792 fix(wpa_supplicant): Detect PBC overlap even when UUID is null 2025-05-12 20:23:11 +08:00
akshat c99c80c1d0 fix(wpa_supplicant): Ensure pbc_overlap event is posted correctly
Preserves the pbc_overlap flag to allow proper event posting.
This ensures that pbc overlap detection functions as expected.
2025-05-12 20:23:11 +08:00
Konstantin Kondrashov f9b81e80ba fix(efuse): Fix ESP32-C5 eFuse test for ECO2 2025-05-12 14:33:41 +03:00
Ivan Grokhotkov f89d6ee5a0 change(version): Update version to v6.0-dev 2025-05-12 11:39:42 +02:00
Ivan Grokhotkov f019c5d549 change(docs): silence new Sphinx warnings after Doxygen upgrade
Co-authored-by: Marius Vikhammer <marius.vikhammer@espressif.com>
2025-05-12 11:39:41 +02:00
Ivan Grokhotkov 7023b489a7 change(examples): temp. disable examples which need esp_wifi_remote
Will be re-enabled after adding IDF 6.0 compatibility in
esp_wifi_remote.
2025-05-12 11:39:41 +02:00
Ivan Grokhotkov 236200a93f change(examples): remove idf version dependency 2025-05-12 11:39:41 +02:00
Linda 71b992ac5d docs: Add links to ESP32-P4 HDG and user guides 2025-05-12 17:13:39 +08:00
zhanghaipeng 0586d10317 fix(ble/bluedroid): Reduce Bluedroid host log output over SPI 2025-05-12 17:12:44 +08:00
morris 94830549ae docs(bitscrambler): update documentation with integration details 2025-05-12 17:09:00 +08:00
Nebojsa Cvetkovic bfa0fff2e5 fix(ble/bluedroid): Added value len check in esp_ble_gatts_send_indicate() 2025-05-12 16:29:03 +08:00
zhanghaipeng df8c1f7a96 fix(ble/bluedroid): Change maximum length of attribute value to 517 2025-05-12 16:29:03 +08:00
zhanghaipeng ebb76933d0 docs(ble): clarify meaning of 0 value for esp_ble_gap_start_ext_scan() parameters 2025-05-12 16:29:03 +08:00
zhanghaipeng 6552854cb5 fix(ble/bluedroid): Fixed BLE GAP appearance configuration check 2025-05-12 16:29:03 +08:00
C.S.M c758af714a test(i2c): Re-enable i2c test on esp32c5 2025-05-12 15:48:52 +08:00
Astha Verma 993bd86ee1 fix(nimble): Added api's for fetching gatt cache data and for discovering included service 2025-05-12 11:54:27 +05:30
igor.masar cb4d90186f 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-09 15:03:52 +02:00
Erik Slagter 1fa908a7a5 feat(docs): Small additions to ulp-risc-v.rst regarding the ULP I2C peripheral
This clarifies that the limited set of possible
transactions using the ULP I2C peripheral is a
hardware limitation and not a limitation of the
ESP-IDF and exactly what and how it's limited.

Merge https://github.com/espressif/esp-idf/pull/15917
2025-05-09 12:08:22 +03:00
Chen Yudong a62464501f ci: optimize ci runner pip install 2025-05-09 16:01:32 +08:00
Aditi 9f4eb5c94b feat(esp_wifi): Add example to write wifi config in nvs
This commit adds example for using wifi station and softap by flashing wifi config
directly into nvs using NVS Partition generator Utility (using csv file).

Closes https://github.com/espressif/esp-idf/issues/14554
2025-05-09 11:34:47 +05:30
morris 5cc6cbd4c7 fix(mcpwm): the wrong pm lock type on esp32 and esp32s3 2025-05-08 21:25:47 +08:00
Jan Beran ba86dbb9f6 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-05-07 13:37:05 +02:00
wuzhenghui cd54be77db fix(esp_hw_support): always disable USJ pad in sleep to supress leakage 2025-05-07 17:33:25 +08:00
Roman Leonov 898f881226 refactor(hcd_dwc): Apply delay for all targets 2025-05-07 11:14:30 +02:00
glmfe 2205a22dc1 feat(tcp_transport): Add websocket HTTP redirect
- Add and expose URI parser from HTTP when received a 301 status
2025-05-06 08:20:42 -03:00
Amitesh Singh 201df702da feat(lwip/config): add menuconfig option for setting LWIP_IPV6_DUP_DETECT_ATTEMPTS
In my network, ipv6 address allocation to esp32 was unreliable.
I'd to disable LWIP_IPV6_DUP_DETECT_ATTEMPTS to 0 to actually make
esp32 ipv6 address assignment work reliably.

Signed-off-by: Amitesh Singh <singh.amitesh@gmail.com>
2025-05-06 10:17:59 +05:30
wuzhenghui fc58a6c116 fix(esp_hw_support): fix esp32p4 may get stuck when entering deepsleep 2025-04-27 19:27:24 +08:00
7656 changed files with 732975 additions and 337542 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
[codespell]
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem,components/newlib/COPYING.*
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
write-changes = true
+1 -1
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` 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
+2 -1
View File
@@ -14,10 +14,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Sync issue comments to JIRA
uses: espressif/github-actions/sync_issues_to_jira@master
uses: espressif/sync-jira-actions@v1
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 }}
+2 -1
View File
@@ -14,10 +14,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Sync GitHub issues to Jira project
uses: espressif/github-actions/sync_issues_to_jira@master
uses: espressif/sync-jira-actions@v1
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 }}
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@master
with:
python-version: v3.8
python-version: "3.10"
- name: Install python packages
run: |
pip install pre-commit
+6 -5
View File
@@ -8,10 +8,11 @@ on:
jobs:
release_zips:
name: Create release zip file
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Create a recursive clone source zip
uses: espressif/github-actions/release_zips@master
env:
RELEASE_PROJECT_NAME: ESP-IDF
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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"
+2 -3
View File
@@ -37,6 +37,7 @@ components/**/build/
components/**/build_*_*/
components/**/sdkconfig
components/**/sdkconfig.old
components/**/test_apps/wifi_nvs_config/nvs_data_suffix.csv
# Example project files
examples/**/build/
@@ -65,8 +66,6 @@ build_summary_*.xml
coverage.info
coverage_report/
test_multi_heap_host
# VS Code Settings
.vscode/
@@ -99,7 +98,7 @@ managed_components
pytest-embedded/
# legacy one
pytest_embedded_log/
list_job*.txt
app_info_*.txt
size_info*.txt
XUNIT_RESULT*.xml
.manifest_sha
+4 -6
View File
@@ -3,16 +3,14 @@ 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
# 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
# merged result pipelines
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
variables:
PIPELINE_COMMIT_SHA: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
IS_MR_PIPELINE: 1
- if: $CI_OPEN_MERGE_REQUESTS == null
# else
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA == null || $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA == ""
variables:
PIPELINE_COMMIT_SHA: $CI_COMMIT_SHA
IS_MR_PIPELINE: 0
- when: always
# Place the default settings in `.gitlab/ci/common.yml` instead
+17 -20
View File
@@ -51,8 +51,9 @@
/.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
/.readthedocs.yml @esp-idf-codeowners/docs
/.vale.ini @esp-idf-codeowners/docs
/CMakeLists.txt @esp-idf-codeowners/build-config
/COMPATIBILITY*.md @esp-idf-codeowners/peripherals
@@ -84,6 +85,7 @@
/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
@@ -92,6 +94,7 @@
/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
@@ -99,7 +102,9 @@
/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
@@ -116,6 +121,7 @@
/components/esp_tee/ @esp-idf-codeowners/security
/components/esp_timer/ @esp-idf-codeowners/system
/components/esp-tls/ @esp-idf-codeowners/app-utilities
/components/esp_usb_cdc_rom_console/ @esp-idf-codeowners/system @esp-idf-codeowners/peripherals/usb
/components/esp_vfs_*/ @esp-idf-codeowners/storage
/components/esp_vfs_console/ @esp-idf-codeowners/storage @esp-idf-codeowners/system
/components/esp_wifi/ @esp-idf-codeowners/wifi
@@ -125,17 +131,16 @@
/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/json/ @esp-idf-codeowners/app-utilities
/components/linux/ @esp-idf-codeowners/system
/components/log/ @esp-idf-codeowners/system
/components/lwip/ @esp-idf-codeowners/lwip
/components/mbedtls/ @esp-idf-codeowners/app-utilities/mbedtls @esp-idf-codeowners/security
/components/mqtt/ @esp-idf-codeowners/network
/components/newlib/ @esp-idf-codeowners/system @esp-idf-codeowners/toolchain
/components/nvs_flash/ @esp-idf-codeowners/storage
/components/nvs_sec_provider/ @esp-idf-codeowners/storage @esp-idf-codeowners/security
/components/openthread/ @esp-idf-codeowners/ieee802154
@@ -151,13 +156,10 @@
/components/spi_flash/ @esp-idf-codeowners/peripherals
/components/spiffs/ @esp-idf-codeowners/storage
/components/tcp_transport/ @esp-idf-codeowners/network
/components/touch_element/ @esp-idf-codeowners/peripherals
/components/ulp/ @esp-idf-codeowners/system
/components/unity/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/usb/ @esp-idf-codeowners/peripherals/usb
/components/vfs/ @esp-idf-codeowners/storage
/components/wear_levelling/ @esp-idf-codeowners/storage
/components/wifi_provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/components/wpa_supplicant/ @esp-idf-codeowners/wifi @esp-idf-codeowners/app-utilities/mbedtls
/components/xtensa/ @esp-idf-codeowners/system
@@ -199,7 +201,6 @@
/examples/peripherals/usb/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
/examples/phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/examples/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/examples/provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/examples/security/ @esp-idf-codeowners/security
/examples/storage/ @esp-idf-codeowners/storage
/examples/system/ @esp-idf-codeowners/system
@@ -210,12 +211,10 @@
/tools/ @esp-idf-codeowners/tools
/tools/ble/ @esp-idf-codeowners/app-utilities
/tools/bt/ @esp-idf-codeowners/bluetooth
/tools/catch/ @esp-idf-codeowners/ci
/tools/ci/ @esp-idf-codeowners/ci
/tools/cmake/ @esp-idf-codeowners/build-config
/tools/cmake/toolchain-*.cmake @esp-idf-codeowners/toolchain
/tools/esp_app_trace/ @esp-idf-codeowners/debugging
/tools/esp_prov/ @esp-idf-codeowners/app-utilities
/tools/gdb_panic_server.py @esp-idf-codeowners/debugging
/tools/kconfig*/ @esp-idf-codeowners/build-config
/tools/ldgen/ @esp-idf-codeowners/build-config
@@ -226,15 +225,15 @@
/tools/test_apps/README.md @esp-idf-codeowners/docs @esp-idf-codeowners/ci
## Note: owners here should be the same as the owners for the same example subdir, above
/tools/test_apps/build_system/ @esp-idf-codeowners/build-config
/tools/test_apps/configs/ @esp-idf-codeowners/system
/tools/test_apps/linux_compatible/ @esp-idf-codeowners/system
/tools/test_apps/peripherals/ @esp-idf-codeowners/peripherals
/tools/test_apps/phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/tools/test_apps/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/tools/test_apps/security/ @esp-idf-codeowners/security
/tools/test_apps/storage/ @esp-idf-codeowners/storage
/tools/test_apps/system/ @esp-idf-codeowners/system
/tools/test_apps/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
@@ -242,8 +241,6 @@
/tools/tools.json @esp-idf-codeowners/tools @esp-idf-codeowners/toolchain @esp-idf-codeowners/debugging
/tools/unit-test-app/ @esp-idf-codeowners/system @esp-idf-codeowners/tools
# sort-order-reset
/components/**/test_apps/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
+2 -69
View File
@@ -250,76 +250,9 @@ 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
### 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`
Please refer to the documentation [here](https://docs.espressif.com/projects/idf-ci/en/latest/guides/cli.html)
+78 -33
View File
@@ -3,10 +3,7 @@
extends:
- .after_script:build:ccache-show-stats:upload-failed-job-logs
image: $ESP_ENV_IMAGE
tags:
- build
# build only on shiny servers since shiny storage server is at the same location
- shiny
tags: [build, shiny]
variables:
# Enable ccache for all build jobs. See configure_ci_environment.sh for more ccache related settings.
IDF_CCACHE_ENABLE: "1"
@@ -24,7 +21,7 @@
- pipeline_variables
artifacts:
paths:
# The other artifacts patterns are defined under tools/ci/artifacts_handler.py
# 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
@@ -37,19 +34,16 @@
variables:
IDF_TOOLCHAIN: clang
TEST_BUILD_OPTS_EXTRA: ""
TEST_DIR: tools/test_apps/system/clang_build_test
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
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
- run_cmd idf-build-apps build
-p tools/test_apps/system/clang_build_test
-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 #
@@ -108,7 +102,7 @@ gcc_static_analyzer:
ANALYZING_APP: "examples/get-started/hello_world"
script:
- echo "CONFIG_COMPILER_STATIC_ANALYZER=y" >> ${ANALYZING_APP}/sdkconfig.defaults
- python -m idf_build_apps build -v -p ${ANALYZING_APP} -t all
- idf-build-apps build -p ${ANALYZING_APP}
########################################
# Clang Build Apps Without Tests Cases #
@@ -211,7 +205,7 @@ build_clang_test_apps_esp32p4:
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
- 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}
@@ -220,6 +214,43 @@ build_clang_test_apps_esp32p4:
--junitxml ${CI_PROJECT_DIR}/XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
.test_build_system_macos_template_extension:
tags:
- macos
variables:
PYENV_VERSION: "3.10"
# 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".
# Workaround for a bug in Parallels executor where CI_PROJECT_DIR is not an absolute path,
# but a relative path to the build directory (builds/espressif/esp-idf instead of ~/builds/espressif/esp-idf.
# GitLab sets the project dir to this template `<builds_dir>/<namespace>/<project_name>`
IDF_PATH: "/Users/espressif/builds/espressif/esp-idf"
.test_build_system_minimal_cmake_template:
extends: .test_build_system_template
variables:
INSTALL_EXTRA_TOOLS: cmake@3.22.1
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
@@ -227,17 +258,25 @@ pytest_build_system:
pytest_build_system_macos:
extends:
- .test_build_system_template
- .test_build_system_macos_template_extension
- .before_script:build:macos
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
- .rules:build:macos
tags:
- macos_shell
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
- .test_build_system_macos_template_extension
- .before_script:build:macos
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
- .rules:build:macos
variables:
PYENV_VERSION: "3.9"
# 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.
INSTALL_EXTRA_TOOLS: ninja cmake@3.22.1
build_docker:
extends:
- .before_script:minimal
@@ -245,17 +284,11 @@ build_docker:
stage: host_test
needs: []
image: espressif/docker-builder:1
tags:
- build_docker_amd64_brno
tags: [shiny, dind]
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
- 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.
@@ -292,11 +325,7 @@ generate_build_child_pipeline:
- non_test_related_apps.txt
expire_in: 1 week
when: always
variables:
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
script:
# requires basic pytest dependencies
- run_cmd bash install.sh --enable-pytest
- run_cmd python tools/ci/dynamic_pipelines/scripts/generate_build_child_pipeline.py
build_child_pipeline:
@@ -308,12 +337,9 @@ 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
REPORT_EXIT_CODE: $REPORT_EXIT_CODE
# https://gitlab.com/gitlab-org/gitlab/-/issues/214340
inherit:
variables: false
@@ -322,3 +348,22 @@ 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"
+52 -39
View File
@@ -30,17 +30,14 @@ variables:
# - set GIT_STRATEGY: "clone" to shiny runners
# - set GIT_STRATEGY: "fetch" to brew runners
GIT_STRATEGY: clone
# 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
GIT_SUBMODULE_STRATEGY: none # here we use cache for submodules, so we don't need to fetch them every time
# since we're using merged-result pipelines, the last commit should work for most cases
# --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: v5.5-dev
LATEST_GIT_TAG: v6.0-dev
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
# by default we will fetch all submodules
@@ -55,11 +52,10 @@ variables:
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
# Docker images
ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v5.5:3"
ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v5.5:2-1"
TARGET_TEST_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/target-test-env-v5.5:2"
ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v6.0:3"
ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v6.0:2-1"
TARGET_TEST_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/target-test-env-v6.0:2"
SONARQUBE_SCANNER_IMAGE: "${CI_DOCKER_REGISTRY}/sonarqube-scanner:5"
PRE_COMMIT_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-pre-commit:1"
# cache python dependencies
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
@@ -70,7 +66,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.v5.5.txt"
CI_PYTHON_CONSTRAINT_FILE: "espidf.constraints.v6.0.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.
@@ -101,6 +97,7 @@ variables:
CCACHE_MAXSIZE: "50G"
FF_USE_NEW_BASH_EVAL_STRATEGY: "true"
FORCE_COLOR: "1" # rich print with color
################################################
# `before_script` and `after_script` Templates #
@@ -123,7 +120,12 @@ variables:
source tools/ci/configure_ci_environment.sh
# add extra python packages
export PYTHONPATH="$IDF_PATH/tools:$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/ci:$IDF_PATH/tools/esp_app_trace:$IDF_PATH/components/partition_table:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
# minio configuration
# added here since the precedence of variables in gitlab-ci.yml is lower than project settings
export IDF_S3_SERVER="$IDF_S3_NEW_SERVER"
export IDF_S3_ACCESS_KEY="$IDF_S3_NEW_ACCESS_KEY"
.setup_tools_and_idf_python_venv: &setup_tools_and_idf_python_venv |
# must use after setup_tools_except_target_test
@@ -140,24 +142,27 @@ 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
elif [[ "${CI_JOB_STAGE}" == "build" ]]; then
run_cmd bash install.sh --enable-ci
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 --enable-test-specific
fi
run_cmd bash install.sh --enable-ci
fi
section_end "running_install_sh"
else
section_start "install_python_env" "Install Python environment"
run_cmd python tools/idf_tools.py install-python-env --features ci,pytest,test-specific
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
@@ -172,11 +177,6 @@ variables:
$IDF_PATH/tools/idf_tools.py --non-interactive install esp-clang
fi
if [[ "${CI_JOB_STAGE}" == "target_test" ]]; then
section_start "IDF_SKIP_TOOLS_CHECK" "Skip required tools check"
export IDF_SKIP_TOOLS_CHECK=1
section_end "IDF_SKIP_TOOLS_CHECK"
fi
section_start "source_export" "Source export.sh"
source ./export.sh
section_end "source_export"
@@ -191,13 +191,21 @@ variables:
fi
# Custom OpenOCD
if [[ ! -z "$OOCD_DISTRO_URL" && "$CI_JOB_STAGE" == "target_test" ]]; then
echo "Using custom OpenOCD from ${OOCD_DISTRO_URL}"
wget $OOCD_DISTRO_URL
ARCH_NAME=$(basename $OOCD_DISTRO_URL)
tar -x -f $ARCH_NAME
export OPENOCD_SCRIPTS=$PWD/openocd-esp32/share/openocd/scripts
export PATH=$PWD/openocd-esp32/bin:$PATH
if [[ "$CI_JOB_STAGE" == "target_test" ]]; then
machine="$(uname -m)"
if [[ "$machine" == "armv7l" ]] ; then
OOCD_DISTRO_URL="$OOCD_DISTRO_URL_ARMHF"
elif [[ "$machine" == "aarch64" ]] ; then
OOCD_DISTRO_URL="$OOCD_DISTRO_URL_ARM64"
fi
if [[ ! -z "$OOCD_DISTRO_URL" ]]; then
echo "Using custom OpenOCD from ${OOCD_DISTRO_URL}"
wget $OOCD_DISTRO_URL
ARCH_NAME=$(basename $OOCD_DISTRO_URL)
tar -x -f $ARCH_NAME
export OPENOCD_SCRIPTS=$PWD/openocd-esp32/share/openocd/scripts
export PATH=$PWD/openocd-esp32/bin:$PATH
fi
fi
if [[ -n "$CI_PYTHON_TOOL_REPO" ]]; then
@@ -214,7 +222,7 @@ variables:
.upload_failed_job_log_artifacts: &upload_failed_job_log_artifacts |
if [ $CI_JOB_STATUS = "failed" ]; then
python tools/ci/artifacts_handler.py upload --type logs
run_cmd idf-ci gitlab upload-artifacts --type log
fi
.before_script:minimal:
@@ -228,8 +236,6 @@ variables:
# 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}"
# remove idf-env.json, since it may contains enabled "features"
- rm -f $IDF_TOOLS_PATH/idf-env.json
# This adds tools (compilers) and the version-specific Python environment to PATH
@@ -258,11 +264,17 @@ variables:
.after_script:build:ccache-show-stats:
after_script:
- source tools/ci/utils.sh
- section_start "ccache_show_stats" "Show ccache statistics"
- *show_ccache_statistics
- section_end "ccache_show_stats"
.after_script:build:ccache-show-stats:upload-failed-job-logs:
after_script:
- source tools/ci/utils.sh
- section_start "ccache_show_stats" "Show ccache statistics"
- *show_ccache_statistics
- section_end "ccache_show_stats"
- *upload_failed_job_log_artifacts
##############################
@@ -323,9 +335,10 @@ variables:
TEMP_FILE=$(mktemp)
# merged results pipelines, by default
if [[ -n $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA ]]; then
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}
git diff --name-only $CI_MERGE_REQUEST_DIFF_BASE_SHA $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA > "$TEMP_FILE"
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}
# merge request pipelines, when the mr got conflicts
+2 -5
View File
@@ -2,15 +2,12 @@
# - 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:
- esp32c5
- esp32c61
- esp32h21
- esp32h4
bypass_check_test_targets:
- esp32h21
+6 -22
View File
@@ -1,19 +1,3 @@
.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 #
##############
@@ -43,13 +27,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
@@ -91,4 +75,4 @@
specific_rules:
- if-schedule-test-build-system-windows
patterns:
- build_system
- build_system_win
+15 -10
View File
@@ -3,7 +3,6 @@
image: $ESP_ENV_IMAGE
tags: [ deploy ]
# Check this before push_to_github
check_submodule_sync:
extends:
- .deploy_job_template
@@ -12,13 +11,13 @@ check_submodule_sync:
tags: [ brew, github_sync ]
retry: 2
variables:
# for brew runners, we always set GIT_STRATEGY to fetch
GIT_STRATEGY: fetch
GIT_STRATEGY: fetch # use brew local mirror first
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
@@ -31,31 +30,37 @@ push_to_github:
extends:
- .deploy_job_template
- .before_script:minimal
- .rules:push_to_github
- .rules:protected:deploy
needs:
# submodule must be synced before pushing to github
- check_submodule_sync
tags: [ brew, github_sync ]
variables:
# for brew runners, we always set GIT_STRATEGY to fetch
GIT_STRATEGY: fetch
# github also need full record of commits
GIT_DEPTH: 0
GIT_STRATEGY: fetch # use brew local mirror first
GIT_DEPTH: 0 # github needs full record of commits
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-no_label-always
- .rules:protected:deploy
dependencies: []
variables:
GIT_DEPTH: 2
tags: [ shiny, build ]
tags: [build, shiny]
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
+19 -16
View File
@@ -4,11 +4,11 @@
- "**/*.rst"
- "CONTRIBUTING.rst"
- "**/soc_caps.h"
- "**/Kconfig*"
.patterns-docs-partial: &patterns-docs-partial
- "components/**/*.h"
- "components/**/Kconfig*"
- "components/**/CMakeList.txt"
- "components/**/CMakeLists.txt"
- "components/**/sdkconfig*"
- "tools/tools.json"
- "tools/idf_tools.py"
@@ -19,12 +19,9 @@
.patterns-docs-preview: &patterns-docs-preview
- "docs/**/*"
.if-protected: &if-protected
.if-protected-check: &if-protected-check
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/'
@@ -41,7 +38,7 @@
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-label-build_docs
- <<: *if-label-docs_full
- <<: *if-dev-push
@@ -61,10 +58,10 @@
check_readme_links:
extends:
- .pre_check_template
tags: ["build", "amd64", "internet"]
tags: ["amd64", "brew"]
allow_failure: true
rules:
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-dev-push
changes: *patterns-example-readme
script:
@@ -96,7 +93,7 @@ check_docs_lang_sync:
parallel:
matrix:
- DOCLANG: ["en", "zh_CN"]
DOCTGT: ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c2", "esp32c6", "esp32c61", "esp32c5","esp32h2", "esp32h21", "esp32p4"]
DOCTGT: ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c2", "esp32c6", "esp32c61", "esp32c5", "esp32h2", "esp32h4", "esp32h21", "esp32p4"]
check_docs_gh_links:
image: $ESP_IDF_DOC_ENV_IMAGE
@@ -151,8 +148,8 @@ build_docs_html_partial:
GIT_DEPTH: 0
stage: test_deploy
tags:
- deploy
- shiny
- brew
- amd64
script:
# ensure all tags are fetched, need to know the latest/stable tag for the docs
- git fetch --tags --prune
@@ -182,14 +179,17 @@ 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:
- <<: *if-protected-no_label
- .rules:protected:deploy
stage: post_deploy
dependencies: # set dependencies to null to avoid missing artifacts issue
needs: # ensure runs after push_to_github succeeded
@@ -204,12 +204,15 @@ deploy_docs_production:
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:
- <<: *if-protected-no_label
- .rules:protected:deploy
stage: post_deploy
needs:
- job: deploy_docs_production
+33 -71
View File
@@ -2,8 +2,7 @@
extends: .rules:test:host_test
stage: host_test
image: $ESP_ENV_IMAGE
tags:
- host_test
tags: [build, shiny]
dependencies: # set dependencies to null to avoid missing artifacts issue
# run host_test jobs immediately, only after upload cache
needs:
@@ -78,24 +77,12 @@ test_fatfsgen_on_host:
- ./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/
- ./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
test_cli_installer:
@@ -113,7 +100,8 @@ test_cli_installer:
script:
# Tools must be downloaded for testing
# We could use "idf_tools.py download all", but we don't want to install clang because of its huge size
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa cmake
# cmake@version that is supported
- python3 ${IDF_PATH}/tools/idf_tools.py download required qemu-riscv32 qemu-xtensa cmake cmake@3.22.1
- cd ${IDF_PATH}/tools/test_idf_tools
- python3 -m pip install jsonschema
- python3 ./test_idf_tools.py -v
@@ -200,20 +188,21 @@ test_tools:
INSTALL_EXTRA_TOOLS: "qemu-xtensa qemu-riscv32" # 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
- pytest --noconftest test_autocomplete.py --junitxml=${IDF_PATH}/XUNIT_AUTOCOMP.xml || stat=1
- run_cmd pytest --noconftest test_autocomplete.py --junitxml=${IDF_PATH}/XUNIT_AUTOCOMP.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- cd ${IDF_PATH}/tools/test_idf_py
- 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
- 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
- pytest --noconftest test_bsasm.py --junitxml=${IDF_PATH}/XUNIT_BSASM.xml || stat=1
- run_cmd pytest --noconftest test_bsasm.py --junitxml=${IDF_PATH}/XUNIT_BSASM.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- cd ${IDF_PATH}/tools/test_mkdfu
- pytest --noconftest test_mkdfu.py --junitxml=${IDF_PATH}/XUNIT_MKDFU.xml || stat=1
- run_cmd pytest --noconftest test_mkdfu.py --junitxml=${IDF_PATH}/XUNIT_MKDFU.xml --ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME} || stat=1
- cd ${IDF_PATH}/tools/test_idf_size
- pytest --noconftest test_idf_size.py --junitxml=${IDF_PATH}/XUNIT_IDF_SIZE.xml || stat=1
- 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
- pytest --noconftest test_idf_diag.py --junitxml=${IDF_PATH}/XUNIT_IDF_DIAG.xml || stat=1
- 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
- cd ${IDF_PATH}
- shellcheck -s sh tools/detect_python.sh || stat=1
- shellcheck -s bash tools/detect_python.sh || stat=1
@@ -230,13 +219,6 @@ test_split_path_by_spaces:
- cd ${IDF_PATH}/tools
- 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
@@ -297,22 +279,18 @@ test_pytest_qemu:
INSTALL_EXTRA_TOOLS: "qemu-riscv32"
IDF_TOOLCHAIN: [gcc, clang]
script:
- run_cmd python tools/ci/ci_build_apps.py . -v
- run_cmd idf-ci build run
--build-system cmake
--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}
- python tools/ci/get_known_failure_cases_file.py
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- run_cmd pytest
--target $IDF_TARGET
--log-cli-level DEBUG
-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:
@@ -327,28 +305,25 @@ test_pytest_linux:
reports:
junit: XUNIT_RESULT.xml
script:
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v
- run_cmd idf-ci build run
--build-system cmake
-p components -p examples -p tools/test_apps
--target linux
--pytest-apps
-m host_test
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
--modified-components ${MR_MODIFIED_COMPONENTS}
--only-test-related
--modified-files ${MR_MODIFIED_FILES}
- python tools/ci/get_known_failure_cases_file.py
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- run_cmd pytest
--target linux
-m host_test
--embedded-services idf
--junitxml=XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
--app-info-filepattern \"list_job_*.txt\"
test_pytest_macos:
extends:
- .host_test_template
- .before_script:build:macos
tags:
- macos_shell
- macos
artifacts:
paths:
- XUNIT_RESULT.xml
@@ -357,38 +332,25 @@ test_pytest_macos:
reports:
junit: XUNIT_RESULT.xml
variables:
PYENV_VERSION: "3.9"
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
PYENV_VERSION: "3.10"
# Workaround for a bug in Parallels executor where CI_PROJECT_DIR is not an absolute path,
# but a relative path to the build directory (builds/espressif/esp-idf instead of ~/builds/espressif/esp-idf.
# GitLab sets the project dir to this template `<builds_dir>/<namespace>/<project_name>`
IDF_PATH: "/Users/espressif/builds/espressif/esp-idf"
script:
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v
- run_cmd idf-ci build run
-p components -p examples -p tools/test_apps
--build-system cmake
--target linux
--pytest-apps
-m \"host_test and macos_shell\"
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
--modified-components ${MR_MODIFIED_COMPONENTS}
--only-test-related
-m macos
--modified-files ${MR_MODIFIED_FILES}
- python tools/ci/get_known_failure_cases_file.py
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- run_cmd pytest
--target linux
-m \"host_test and macos_shell\"
-m macos
--junitxml=XUNIT_RESULT.xml
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
--app-info-filepattern \"list_job_*.txt\"
test_idf_pytest_plugin:
extends:
- .host_test_template
- .rules:patterns:idf-pytest-plugin
variables:
SUBMODULES_TO_FETCH: "none"
artifacts:
reports:
junit: XUNIT_RESULT.xml
script:
- cd ${IDF_PATH}/tools/ci/dynamic_pipelines/tests/test_report_generator
- python -m unittest test_report_generator.py
- cd ${IDF_PATH}/tools/ci/idf_pytest
- pytest --junitxml=${CI_PROJECT_DIR}/XUNIT_RESULT.xml
test_idf_build_apps_load_soc_caps:
extends: .host_test_template
+3
View File
@@ -60,6 +60,9 @@ 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
+15 -7
View File
@@ -1,11 +1,15 @@
generate_failed_jobs_report:
.post_deploy_template:
stage: post_deploy
tags: [build, shiny]
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
artifacts:
expire_in: 1 week
expire_in: 2 week
when: always
paths:
- job_report.html
@@ -13,12 +17,16 @@ generate_failed_jobs_report:
- python tools/ci/dynamic_pipelines/scripts/generate_report.py --report-type job
sync_support_status:
stage: post_deploy
extends:
- .rules:sync_support_status
- .post_deploy_template
- .rules:master:push
tags: [ brew, github_sync ]
needs:
- push_to_github
image: $ESP_ENV_IMAGE
tags: [ brew, github_sync ]
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
+14 -32
View File
@@ -1,8 +1,7 @@
.pre_check_template:
stage: pre_check
image: $ESP_ENV_IMAGE
tags:
- host_test
tags: [build, shiny]
dependencies: # set dependencies to null to avoid missing artifacts issue
check_version:
@@ -10,7 +9,7 @@ check_version:
# esp_idf_version.h in a branch before tagging the next version.
extends:
- .pre_check_template
- .rules:protected
- .rules:protected:check
tags: [ brew, github_sync ]
variables:
# need a full clone to get the latest tag
@@ -117,22 +116,10 @@ check_test_scripts_build_test_rules:
extends:
- .pre_check_template
- .before_script:build
variables:
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
script:
# requires basic pytest dependencies
- 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
@@ -142,11 +129,10 @@ pipeline_variables:
# MODIFIED_FILES is a list of files that changed, could be used everywhere
- MODIFIED_FILES=$(echo "$GIT_DIFF_OUTPUT" | xargs)
- echo "MODIFIED_FILES=$MODIFIED_FILES" >> pipeline.env
- echo "REPORT_EXIT_CODE=0" >> pipeline.env
# 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 [ $IS_MR_PIPELINE == "0" ]; then
if [ -z "$CI_MERGE_REQUEST_IID" ]; then
echo "MR_MODIFIED_FILES=\"\"" >> pipeline.env
echo "MR_MODIFIED_COMPONENTS=\"\"" >> pipeline.env
else
@@ -157,17 +143,14 @@ pipeline_variables:
echo "MR_MODIFIED_COMPONENTS=\"$MR_MODIFIED_COMPONENTS\"" >> pipeline.env
fi
- |
if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)BUILD_AND_TEST_ALL_APPS(,|$)"; then
echo "BUILD_AND_TEST_ALL_APPS=1" >> pipeline.env
if [ -n "$PIPELINE_COMMIT_SHA" ]; then
echo "PIPELINE_COMMIT_SHA=$PIPELINE_COMMIT_SHA" >> 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
- python tools/ci/ci_process_description.py
- 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
- python tools/ci/artifacts_handler.py upload --type modified_files_and_components_report
- run_cmd idf-ci gitlab upload-artifacts --type env
artifacts:
reports:
dotenv: pipeline.env
@@ -209,13 +192,12 @@ baseline_manifest_sha:
when: always
redundant_pass_job:
stage: pre_check
extends:
- .pre_check_template
tags: [shiny, fast_run]
image: $ESP_ENV_IMAGE
dependencies: null
before_script: []
cache: []
extends: []
variables:
GIT_STRATEGY: none
before_script: []
script:
- echo "This job is redundant to ensure the 'retry_failed_jobs' job can exist and not be skipped"
when: always
+13 -35
View File
@@ -2,33 +2,20 @@
extends:
- .before_script:minimal
stage: pre_check
image: $PRE_COMMIT_IMAGE
tags: [cache, shiny]
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"
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
@@ -37,10 +24,6 @@ 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
@@ -56,25 +39,20 @@ check_powershell:
tags:
- dind
- amd64
- brew # faster "apk add"
needs:
- pipeline_variables
variables:
# cache pre_commit
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit"
# 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
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
+31 -64
View File
@@ -10,7 +10,7 @@
- "**/*.{c,C,cpp}"
- "**/*.{h,H,hpp}"
- "components/**/Kconfig"
- "components/**/CMakeList.txt"
- "components/**/CMakeLists.txt"
.patterns-python-cache: &patterns-python-cache
- "tools/requirements.json"
@@ -53,7 +53,9 @@
- "tools/ci/ignore_build_warnings.txt"
- "tools/ci/test_build_system*.sh"
- "tools/ci/test_build_system*.py"
- "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
@@ -145,7 +147,6 @@
- "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"
@@ -160,29 +161,22 @@
- "components/bt/esp_ble_mesh/lib/lib"
- ".gitmodules"
.patterns-idf-pytest-plugin: &patterns-idf-pytest-plugin
- "tools/ci/idf_pytest/**/*"
- "tools/ci/dynamic_pipelines/tests/**/*"
##############
# if anchors #
##############
.if-ref-master: &if-ref-master
if: '$CI_COMMIT_REF_NAME == "master"'
.if-master-push: &if-master-push
if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "push"'
.if-ref-master-no_label: &if-ref-master-no_label
if: '$CI_COMMIT_REF_NAME == "master" && $BOT_TRIGGER_WITH_LABEL == null'
.if-tag-release: &if-tag-release
.if-release-tag: &if-release-tag
if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/'
.if-protected: &if-protected
.if-protected-check: &if-protected-check
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) || $CI_COMMIT_TAG =~ /^qa-test/'
.if-protected-no_label: &if-protected-no_label
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/) && $BOT_TRIGGER_WITH_LABEL == null'
.if-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-ref-push: &if-protected-ref-push
.if-protected-branch-push: &if-protected-branch-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"'
@@ -192,9 +186,6 @@
.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"'
@@ -214,51 +205,41 @@
# Rules #
#########
### Branches ###
.rules:protected:
.rules:protected:check:
rules:
- <<: *if-protected
- <<: *if-protected-check
.rules:push_to_github:
.rules:protected:deploy:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-no_label
- <<: *if-protected-deploy
# Not uploading on release branches
.rules:sync_support_status:
.rules:master:push:
rules:
- <<: *if-ref-master-no_label
.rules:protected-no_label-always:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-no_label
when: always
- <<: *if-master-push
.rules:tag:release:
rules:
- <<: *if-tag-release
- <<: *if-release-tag
.rules:dev-push:
rules:
- <<: *if-dev-push
# Do not upload caches on dev branches by default
.rules:upload-python-cache:
rules:
- <<: *if-tag-release
- <<: *if-release-tag
- <<: *if-schedule-nightly
- <<: *if-protected-ref-push
- <<: *if-protected-branch-push
changes: *patterns-python-cache
- <<: *if-label-upload_cache
when: manual
.rules:upload-submodule-cache:
rules:
# Needn't upload submodule cache in schedule pipeline
- <<: *if-tag-release
- <<: *if-protected-ref-push
- <<: *if-release-tag
- <<: *if-protected-branch-push
changes: *patterns-submodule
- <<: *if-label-upload_cache
when: manual
@@ -266,11 +247,10 @@
### Patterns ###
.rules:patterns:clang_tidy:
rules:
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-dev-push
changes: *patterns-c-files
#.rules:patterns:static-code-analysis-preview:
# rules:
# - <<: *if-dev-push
@@ -280,12 +260,6 @@
# - <<: *if-dev-push
# changes: *patterns-sonarqube-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
#
@@ -326,7 +300,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-label-build
- <<: *if-dev-push
changes: *patterns-build_components
@@ -339,7 +313,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-label-build
- <<: *if-dev-push
changes: *patterns-build_check
@@ -354,7 +328,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-label-build
- <<: *if-label-docker
- <<: *if-dev-push
@@ -370,22 +344,15 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-protected-check
- <<: *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:build:target_test:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-label-build
- <<: *if-dev-push
changes: *patterns-build_components
@@ -409,13 +376,13 @@
- <<: *if-schedule-test-build-system-windows
- <<: *if-label-windows
- <<: *if-dev-push
changes: *patterns-build_system
changes: *patterns-build_system_win
.rules:test:host_test:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-label-build-only
when: never
- <<: *if-label-host_test
@@ -426,7 +393,7 @@
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-protected-check
- <<: *if-label-build-only
when: never
- <<: *if-label-submodule
+1 -1
View File
@@ -85,7 +85,7 @@ clang_tidy_check:
#code_quality_report:
# extends:
# - .sonar_scan_template
# - .rules:protected
# - .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:
+53 -12
View File
@@ -3,8 +3,7 @@
extends: .rules:test:host_test
stage: host_test
image: $ESP_ENV_IMAGE
tags:
- windows-build
tags: [windows-build, brew]
dependencies: # set dependencies to null to avoid missing artifacts issue
# run host_test jobs immediately, only after upload cache
needs:
@@ -14,13 +13,21 @@
- job: upload-submodules-cache
optional: true
artifacts: false
before_script: []
variables:
GIT_STRATEGY: fetch # use brew local mirror first
before_script:
- if ($env:IDF_DONT_USE_MIRRORS) {
$env:IDF_MIRROR_PREFIX_MAP = ""
}
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:
@@ -32,7 +39,8 @@ test_cli_installer_win:
timeout: 3h
script:
# Tools must be downloaded for testing
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake
# cmake@version that is supported
- python ${IDF_PATH}\tools\idf_tools.py download required qemu-riscv32 qemu-xtensa cmake cmake@3.22.1
- cd ${IDF_PATH}\tools\test_idf_tools
- python -m pip install jsonschema
- python .\test_idf_tools.py
@@ -42,6 +50,7 @@ test_tools_win:
extends:
- .host_test_win_template
- .rules:labels:windows_pytest_build_system
parallel: 4
artifacts:
paths:
- ${IDF_PATH}/*.out
@@ -55,12 +64,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 --enable-pytest
- .\install.ps1 --enable-ci
- .\export.ps1
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}/tools/test_idf_py
- pytest --noconftest test_idf_py.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY.xml
- pytest --noconftest test_hints.py --junitxml=${IDF_PATH}/XUNIT_HINTS.xml
- 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}
# Build tests
.test_build_system_template_win:
@@ -73,20 +82,20 @@ test_tools_win:
after_script: []
timeout: 4 hours
script:
- .\install.ps1 --enable-ci --enable-pytest
- .\install.ps1 --enable-ci
- . .\export.ps1
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
- cd ${IDF_PATH}\tools\test_build_system
- pytest --parallel-count ${CI_NODE_TOTAL} --parallel-index ${CI_NODE_INDEX} --junitxml=${CI_PROJECT_DIR}\XUNIT_RESULT.xml
- 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_build_system_win:
extends:
- .test_build_system_template_win
- .rules:labels:windows_pytest_build_system
parallel: 2
parallel: 6
needs: []
tags:
- windows-build
tags: [windows-build, brew]
artifacts:
paths:
- XUNIT_RESULT.xml
@@ -95,3 +104,35 @@ pytest_build_system_win:
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}
+1 -1
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-pytest
- bash install.sh --enable-ci --enable-test-specific
parallel:
matrix:
- GEO: [ 'shiny', 'brew' ]
-11
View File
@@ -46,17 +46,6 @@
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 = acc76239bee01d8e9c858ae2cab296704e52d916
sbom-cve-exclude-list = CVE-2024-31755 Resolved in v1.7.18
[submodule "components/mbedtls/mbedtls"]
path = components/mbedtls/mbedtls
url = ../../espressif/mbedtls.git
+68
View File
@@ -0,0 +1,68 @@
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',
]
+106
View File
@@ -0,0 +1,106 @@
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
- tools/ci/dynamic_pipelines/templates/generate_target_test_report.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',
]
[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',
]
+1 -1
View File
@@ -1,7 +1,7 @@
[mypy]
# Specifies the Python version used to parse and check the target program
python_version = 3.9
python_version = 3.10
# Disallows defining functions without type annotations or with incomplete type annotations
# True => enforce type annotation in all function definitions
+13 -35
View File
@@ -9,27 +9,7 @@ repos:
hooks:
- id: ruff-format
- id: ruff
args: [ "--fix" ]
- repo: local
hooks:
- id: pytest-linter
name: Pytest Linter Check
entry: tools/ci/check_test_files.py
language: python
files: 'pytest_.*\.py$'
require_serial: true
additional_dependencies:
- pytest-embedded-idf[serial]~=1.16
- pytest-embedded-jtag~=1.16
- pytest-embedded-qemu~=1.16
- pytest-ignore-test-results~=0.3
- pytest-rerunfailures
- pytest-timeout
- idf-build-apps~=2.8
- python-gitlab
- minio
- click
- esp-idf-monitor
args: [ "--fix", "--show-fixes" ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
@@ -51,7 +31,9 @@ repos:
.*.pb-c.c|
.*.yuv|
.*.rgb|
.*COPYING.*
.*.gray|
.*COPYING.*|
docs/sphinx-known-warnings\.txt
)$
- id: end-of-file-fixer
exclude: *whitespace_excludes
@@ -162,7 +144,7 @@ repos:
require_serial: true
additional_dependencies:
- PyYAML == 5.3.1
- idf-build-apps>=2.8,<3
- idf-build-apps~=2.13
- id: sort-yaml-files
name: sort yaml files
entry: tools/ci/sort_yaml.py
@@ -177,15 +159,6 @@ 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
@@ -204,14 +177,19 @@ repos:
rev: v4.0.1
hooks:
- id: file-contents-sorter
files: 'tools\/ci\/(executable-list\.txt|mypy_ignore_list\.txt|check_copyright_ignore\.txt)'
files: "tools/ci/(\
executable-list\\.txt\
|mypy_ignore_list\\.txt\
|check_copyright_ignore\\.txt\
|exclude_check_tools_files\\.txt\
)"
- repo: https://github.com/espressif/check-copyright/
rev: v1.1.1
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.7.0
rev: v1.10.0
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]
@@ -249,7 +227,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: v2.5.0
rev: v3.2.0
hooks:
- id: check-kconfig-files
- id: check-deprecated-kconfig-options
-21
View File
@@ -1,21 +0,0 @@
# .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 documentation build by Doxygen
submodules:
include:
- components/mqtt/esp-mqtt
+37 -5
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22)
project(esp-idf C CXX ASM)
if(CMAKE_CURRENT_LIST_DIR STREQUAL CMAKE_SOURCE_DIR)
@@ -23,14 +23,15 @@ if(BOOTLOADER_BUILD)
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_NONE)
list(APPEND compile_options "-O0")
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF)
list(APPEND compile_options "-O2")
endif()
@@ -54,6 +55,9 @@ else()
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_COMPILER_OPTIMIZATION_DEBUG)
list(APPEND compile_options "-Og")
@@ -105,8 +109,6 @@ 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
@@ -169,6 +171,18 @@ 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()
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()
__generate_prefix_map(prefix_map_compile_options)
list(APPEND compile_options ${prefix_map_compile_options})
@@ -188,6 +202,15 @@ 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")
@@ -305,3 +328,12 @@ 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()
+2 -2
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.cn/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/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.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.
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.
## ESP-IDF Support for Different Chip Revisions
+1 -1
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 对各芯片版本的支持
+50 -14
View File
@@ -118,8 +118,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
default "y" if IDF_TARGET="esp32c5"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
# TODO: [ESPTOOL-1044] remove when stub supported
select IDF_ENV_BRINGUP
config IDF_TARGET_ESP32P4
bool
@@ -143,16 +141,15 @@ mainmenu "Espressif IoT Development Framework Configuration"
default "y" if IDF_TARGET="esp32h21"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
select IDF_ENV_FPGA
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 FREERTOS_UNICORE # TODO: [ESP32H4] IDF-12319, need remove
select IDF_TARGET_ARCH_RISCV
select IDF_ENV_FPGA
select IDF_ENV_BRINGUP
select IDF_ENV_FPGA if ESP32H4_SELECTS_REV_MP
config IDF_TARGET_LINUX
bool
@@ -222,10 +219,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.py to load the generated .bin file into ram and execute.
`load-ram` in esptool to load the generated .bin file into ram and execute.
Example:
esptool.py --chip {chip} -p {port} -b {baud} --no-stub load_ram {app.bin}
esptool --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
@@ -233,7 +230,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
CONFIG_APP_BUILD_TYPE_RAM=y
CONFIG_VFS_SUPPORT_TERMIOS=
CONFIG_NEWLIB_NANO_FORMAT=y
CONFIG_LIBC_NEWLIB_NANO_FORMAT=y
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_ESP_DEBUG_STUBS_ENABLE=
CONFIG_ESP_ERR_TO_NAME_LOOKUP=
@@ -410,7 +407,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
config COMPILER_ASSERT_NDEBUG_EVALUATE
bool "Enable the evaluation of the expression inside assert(X) when NDEBUG is set"
default y
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
@@ -420,9 +417,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
This is not according to the standard, which states that the assert(X) should
be replaced with ((void)0) if NDEBUG is defined.
In ESP-IDF v6.0 the default behavior will change to "no" to be in line with the
standard.
choice COMPILER_FLOAT_LIB_FROM
prompt "Compiler float lib source"
default COMPILER_FLOAT_LIB_FROM_RVFPLIB if ESP_ROM_HAS_RVFPLIB
@@ -581,7 +575,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
config COMPILER_DISABLE_DEFAULT_ERRORS
bool "Disable errors for default warnings"
default "y"
default "n"
help
Enable this option if you do not want default warnings to be considered as errors,
especially when updating IDF.
@@ -614,6 +608,13 @@ mainmenu "Espressif IoT Development Framework Configuration"
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
@@ -650,7 +651,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
choice COMPILER_ORPHAN_SECTIONS
prompt "Orphan sections handling"
default COMPILER_ORPHAN_SECTIONS_WARNING
default COMPILER_ORPHAN_SECTIONS_ERROR
depends on !IDF_TARGET_LINUX
help
If the linker finds orphan sections, it attempts to place orphan sections after sections of the same
@@ -658,6 +659,11 @@ 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
@@ -676,6 +682,34 @@ mainmenu "Espressif IoT Development Framework Configuration"
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"
@@ -707,3 +741,5 @@ mainmenu "Espressif IoT Development Framework Configuration"
- 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
+14 -13
View File
@@ -15,18 +15,19 @@ 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.0 | v5.1 | v5.2 | v5.3 | v5.4 | |
|:----------- | :---------------------:| :--------------------: | :--------------------: | :--------------------: | :--------------------: |:------------------------------------------------------------------- |
|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] | ![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] |[Announcement](https://www.espressif.com/en/news/ESP32_C6) |
|ESP32-H2 | | ![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] |[Announcement](https://www.espressif.com/en/news/ESP32-P4) |
|ESP32-C5 | | | | | ![alt text][preview] |[Announcement](https://www.espressif.com/en/news/ESP32-C5) |
|ESP32-C61 | | | | | ![alt text][preview] |[Announcement](https://www.espressif.com/en/products/socs/esp32-c61) |
|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) |
[supported]: https://img.shields.io/badge/-supported-green "supported"
[preview]: https://img.shields.io/badge/-preview-orange "preview"
@@ -82,7 +83,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.py 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` to flash the chip. However you can also do this automatically by running:
`idf.py -p PORT flash`
+14 -13
View File
@@ -15,18 +15,19 @@ ESP-IDF 是乐鑫官方推出的物联网开发框架,支持 Windows、Linux
下表总结了乐鑫芯片在 ESP-IDF 各版本中的支持状态,其中 ![alt text][supported] 代表已支持,![alt text][preview] 代表目前处于预览支持状态。预览支持状态通常有时间限制,而且仅适用于测试版芯片。请确保使用与芯片相匹配的 ESP-IDF 版本。
|芯片 | v5.0 | v5.1 | v5.2 | v5.3 | v5.4 | |
|:----------- | :---------------------:| :--------------------: | :--------------------: | :--------------------: | :--------------------: | :------------------------------------------------------------------------ |
|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] | ![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] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_C6) |
|ESP32-H2 | | ![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] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-P4) |
|ESP32-C5 | | | | | ![alt text][preview] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-C5) |
|ESP32-C61 | | | | | ![alt text][preview] | [芯片发布公告](https://www.espressif.com/zh-hans/products/socs/esp32-c61) |
|芯片 | 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) |
[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"
@@ -82,7 +83,7 @@ ESP-IDF 中的子模块采用相对路径([详见 .gitmodules 文件](.gitmodu
## 烧写项目
当构建结束,终端会打印出一条命令行,告知如何使用 esptool.py 工具烧写项目到芯片中。但你也可以运行下面这条命令来自动烧写:
当构建结束,终端会打印出一条命令行,告知如何使用 `esptool` 工具烧写项目到芯片中。但你也可以运行下面这条命令来自动烧写:
`idf.py -p PORT flash`
+3 -3
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`, `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.
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.
## Descriptions
@@ -40,7 +40,7 @@ Example:
#### `esp_common`
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).
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).
Example:
@@ -85,7 +85,7 @@ Logging library.
Heap implementation.
#### `newlib`
#### `esp_libc`
Some functions n the standard library are implemented here, especially those needing other `G1` components.
+10 -69
View File
@@ -10,17 +10,7 @@ set(srcs
"host_file_io.c")
if(CONFIG_ESP_DEBUG_STUBS_ENABLE)
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()
list(APPEND srcs "debug_stubs.c")
endif()
set(include_dirs "include")
@@ -28,20 +18,21 @@ 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")
list(APPEND srcs "app_trace_membufs_proto.c")
endif()
if(CONFIG_APPTRACE_DEST_JTAG)
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
list(APPEND srcs
"port/xtensa/port.c")
list(APPEND srcs "port/xtensa/port_jtag.c")
endif()
if(CONFIG_IDF_TARGET_ARCH_RISCV)
list(APPEND srcs
"port/riscv/port.c")
list(APPEND srcs "port/riscv/port_jtag.c")
endif()
endif()
list(APPEND srcs
"port/port_uart.c")
if(CONFIG_APPTRACE_DEST_UART)
list(APPEND srcs "port/port_uart.c")
endif()
if(CONFIG_APPTRACE_SV_ENABLE)
list(APPEND include_dirs
@@ -71,53 +62,3 @@ idf_component_register(SRCS "${srcs}"
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()
+19 -65
View File
@@ -8,7 +8,7 @@ menu "Application Level Tracing"
config APPTRACE_DEST_JTAG
bool "JTAG"
select APPTRACE_DEST_TRAX if IDF_TARGET_ARCH_XTENSA
select APPTRACE_TRAX_ENABLE if IDF_TARGET_ARCH_XTENSA
select APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE
select APPTRACE_ENABLE
@@ -17,65 +17,43 @@ menu "Application Level Tracing"
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).
Select destination for application trace: UART or none (to disable).
config APPTRACE_DEST_UART0
bool "UART0"
config APPTRACE_DEST_UART
bool "UART"
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_DEST_UART_NUM
int "UART port number"
depends on APPTRACE_DEST_UART
range 0 1 if (SOC_UART_NUM <= 2)
range 0 2 if (SOC_UART_NUM <= 3)
range 0 5 if (SOC_UART_NUM <= 6)
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_NOUSB
depends on APPTRACE_DEST_UART
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<num>"
depends on APPTRACE_DEST_UART_NOUSB
depends on APPTRACE_DEST_UART
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.
@@ -135,7 +113,7 @@ menu "Application Level Tracing"
UART task priority. In case of high events rate,
this parameter could be changed up to (configMAX_PRIORITIES-1).
config APPTRACE_DEST_TRAX
config APPTRACE_TRAX_ENABLE
bool
depends on IDF_TARGET_ARCH_XTENSA && !ESP32_TRAX && !ESP32S2_TRAX && !ESP32S3_TRAX
select ESP32_MEMMAP_TRACEMEM
@@ -186,20 +164,11 @@ menu "Application Level Tracing"
config APPTRACE_BUF_SIZE
int "Size of the apptrace buffer"
depends on APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE && !APPTRACE_DEST_TRAX
depends on APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE && !APPTRACE_TRAX_ENABLE
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
@@ -382,19 +351,4 @@ menu "Application Level Tracing"
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
+30 -51
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
@@ -11,16 +11,8 @@
#include "esp_app_trace_port.h"
#include "esp_private/startup_internal.h"
#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
#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"
#endif
#define ESP_APPTRACE_MAX_VPRINTF_ARGS 256
@@ -39,24 +31,19 @@ static bool s_inited;
esp_err_t esp_apptrace_init(void)
{
int res;
esp_apptrace_hw_t *hw = NULL;
void *hw_data = NULL;
__attribute__((unused)) 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) {
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;
}
#if CONFIG_APPTRACE_DEST_JTAG
s_trace_channels[ESP_APPTRACE_DEST_JTAG].hw = esp_apptrace_jtag_hw_get(&hw_data);
s_trace_channels[ESP_APPTRACE_DEST_JTAG].hw_data = hw_data;
#endif
#if CONFIG_APPTRACE_DEST_UART
s_trace_channels[ESP_APPTRACE_DEST_UART].hw = esp_apptrace_uart_hw_get(CONFIG_APPTRACE_DEST_UART_NUM, &hw_data);
s_trace_channels[ESP_APPTRACE_DEST_UART].hw_data = hw_data;
#endif
s_inited = true;
}
@@ -64,7 +51,7 @@ esp_err_t esp_apptrace_init(void)
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);
int 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;
@@ -80,31 +67,30 @@ 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_err_t esp_apptrace_down_buffer_config(esp_apptrace_dest_t dest, uint8_t *buf, uint32_t size)
{
esp_apptrace_channel_t *ch;
if (dest >= ESP_APPTRACE_DEST_MAX) {
return ESP_ERR_INVALID_ARG;
}
if (buf == NULL || size == 0) {
return ESP_ERR_INVALID_ARG;
}
if (!s_inited) {
return;
return ESP_ERR_INVALID_STATE;
}
// currently down buffer is supported for JTAG interface only
// TODO: one more argument should be added to this function to specify HW interface: 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);
}
} else {
ESP_APPTRACE_LOGD("Trace destination for JTAG not supported!");
ch = &s_trace_channels[dest];
if (ch->hw == NULL) {
ESP_APPTRACE_LOGE("Trace destination %d not supported!", dest);
return ESP_FAIL;
}
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!");
if (ch->hw->down_buffer_config != NULL) {
ch->hw->down_buffer_config(ch->hw_data, buf, size);
}
return ESP_OK;
}
uint8_t *esp_apptrace_down_buffer_get(esp_apptrace_dest_t dest, uint32_t *size, uint32_t user_tmo)
@@ -442,10 +428,3 @@ bool esp_apptrace_host_is_connected(esp_apptrace_dest_t dest)
return ch->hw->host_is_connected(ch->hw_data);
}
#if !CONFIG_APPTRACE_DEST_JTAG
esp_apptrace_hw_t *esp_apptrace_jtag_hw_get(void **data)
{
return NULL;
}
#endif
+42 -135
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
@@ -52,7 +52,6 @@ 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);
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
@@ -64,10 +63,6 @@ esp_err_t esp_apptrace_membufs_init(esp_apptrace_membufs_proto_data_t *proto, co
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;
}
@@ -81,10 +76,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;
res = proto->hw->swap_start(proto->state.in_block);
esp_err_t 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;
}
@@ -92,7 +87,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->hw->swap(new_block_num, proto->state.markers[prev_block_num]);
// handle data from host
esp_hostdata_hdr_t *hdr = (esp_hostdata_hdr_t *)proto->blocks[new_block_num].start;
@@ -101,40 +96,18 @@ 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);
}
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;
}
@@ -148,6 +121,18 @@ static esp_err_t esp_apptrace_membufs_swap_waitus(esp_apptrace_membufs_proto_dat
if (res != ESP_OK) {
break;
}
#if CONFIG_IDF_TARGET_ESP32S3
/*
* ESP32S3 has a serious data corruption issue with the transferred data to host.
* This delay helps reduce the failure rate by temporarily reducing heavy memory writes
* from RTOS-level tracing and giving OpenOCD more time to read trace memory before
* the current thread continues execution. While this doesn't completely prevent
* memory access from other threads/cores/ISRs, it has shown to significantly improve
* reliability when combined with CRC checks in OpenOCD. In practice, this reduces the
* number of retries needed to read an entire block without corruption.
*/
esp_rom_delay_us(100);
#endif
}
return res;
}
@@ -197,7 +182,7 @@ static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membu
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;
@@ -219,45 +204,6 @@ static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membu
return total_sz;
}
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)
{
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;
}
static inline uint8_t *esp_apptrace_membufs_pkt_start(uint8_t *ptr, uint16_t size)
{
// it is safe to use esp_cpu_get_core_id() in macro call because arg is used only once inside it
@@ -275,63 +221,23 @@ static inline void esp_apptrace_membufs_pkt_end(uint8_t *ptr)
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;
}
// 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));
if (ESP_APPTRACE_INBLOCK_MARKER(proto) + ESP_APPTRACE_USR_BLOCK_RAW_SZ(size) > ESP_APPTRACE_INBLOCK(proto)->sz) {
int res = esp_apptrace_membufs_swap_waitus(proto, tmo);
if (res != ESP_OK) {
return NULL;
}
}
if (buf_ptr) {
buf_ptr = esp_apptrace_membufs_pkt_start(buf_ptr, size);
}
uint8_t *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));
buf_ptr = esp_apptrace_membufs_pkt_start(buf_ptr, size);
ESP_APPTRACE_LOGD("Got %" PRIu32 " bytes from block", size);
return buf_ptr;
}
@@ -339,7 +245,7 @@ uint8_t *esp_apptrace_membufs_up_buffer_get(esp_apptrace_membufs_proto_data_t *p
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_apptrace_membufs_pkt_end(ptr);
// TODO: mark block as busy in order not to re-use it for other tracing calls until it is completely written
// 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
// this is abnormal situation can be detected on host which will receive only uncompleted buffers
@@ -355,15 +261,16 @@ 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 (including that in pending buffer) is more than min size
// switch block while size of data is more than min size
while (ESP_APPTRACE_INBLOCK_MARKER(proto) > min_sz) {
ESP_APPTRACE_LOGD("Try to flush %" PRIu32 " bytes. Wait until block switch for %" PRIi64 " us", ESP_APPTRACE_INBLOCK_MARKER(proto), tmo->tmo);
ESP_APPTRACE_LOGD("Try to flush %" PRIu32 " bytes", ESP_APPTRACE_INBLOCK_MARKER(proto));
res = esp_apptrace_membufs_swap_waitus(proto, tmo);
if (res != ESP_OK) {
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);
if (res == ESP_ERR_TIMEOUT) {
ESP_APPTRACE_LOGW("Failed to switch to another block in %" PRIi32 " us!", (int32_t)tmo->elapsed);
} else {
ESP_APPTRACE_LOGE("Failed to switch to another block, res: %d", res);
}
return res;
}
}
+1 -1
View File
@@ -44,7 +44,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;
+2 -2
View File
@@ -9,11 +9,11 @@
//
#include "esp_private/startup_internal.h"
#include "dbg_stubs.h"
#include "esp_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 meaningfull data.
Debug stubs is actually a table of 4-byte entries. Every entry is equal to zero or must contain meaningful 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.
-197
View File
@@ -1,197 +0,0 @@
/*
* 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
-8
View File
@@ -1,8 +0,0 @@
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
+1 -1
View File
@@ -33,7 +33,7 @@ esp_err_t heap_trace_init_tohost(void)
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);
esp_err_t ret = esp_sysview_heap_trace_start((uint32_t) -1);
if (ret != ESP_OK) {
return ret;
}
+11 -11
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -152,7 +152,7 @@ void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char
cmd_args.mode_len = strlen(mode) + 1;
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);
&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;
@@ -182,7 +182,7 @@ int esp_apptrace_fclose(esp_apptrace_dest_t dest, void *stream)
cmd_args.file = stream;
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));
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return EOF;
@@ -211,7 +211,7 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
{
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;
@@ -221,7 +221,7 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
cmd_args.size = size * nmemb;
cmd_args.file = stream;
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);
&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;
@@ -253,7 +253,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
{
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;
@@ -262,7 +262,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
cmd_args.size = size * nmemb;
cmd_args.file = stream;
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));
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return 0;
@@ -288,7 +288,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
* 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)
@@ -310,7 +310,7 @@ int esp_apptrace_fseek(esp_apptrace_dest_t dest, void *stream, long offset, int
cmd_args.offset = offset;
cmd_args.whence = whence;
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));
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return -1;
@@ -340,7 +340,7 @@ int esp_apptrace_ftell(esp_apptrace_dest_t dest, void *stream)
cmd_args.file = stream;
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));
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return -1;
@@ -380,7 +380,7 @@ int esp_apptrace_feof(esp_apptrace_dest_t dest, void *stream)
cmd_args.file = stream;
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));
&cmd_args, sizeof(cmd_args));
if (ret != ESP_OK) {
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
return EOF;
+22 -27
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -18,11 +18,9 @@ extern "C" {
* 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_JTAG, ///< JTAG destination
ESP_APPTRACE_DEST_UART, ///< UART destination
ESP_APPTRACE_DEST_MAX,
} esp_apptrace_dest_t;
/**
@@ -39,10 +37,13 @@ esp_err_t esp_apptrace_init(void);
* @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 dest Indicates HW interface to configure.
* @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
*/
void esp_apptrace_down_buffer_config(uint8_t *buf, uint32_t size);
esp_err_t esp_apptrace_down_buffer_config(esp_apptrace_dest_t dest, uint8_t *buf, uint32_t size);
/**
* @brief Allocates buffer for trace data.
@@ -117,7 +118,7 @@ esp_err_t esp_apptrace_flush(esp_apptrace_dest_t dest, uint32_t tmo);
* This is a special version of esp_apptrace_flush which should be called from panic handler.
*
* @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 min_sz Threshold for flushing data. If current filling level is above this value, data will be flushed. JTAG 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
@@ -171,7 +172,7 @@ 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.
@@ -183,7 +184,7 @@ void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char
/**
* @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.
@@ -194,11 +195,11 @@ 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 dest Indicates HW interface to use.
* @param ptr Address of data to write.
* @param size Size of an item.
* @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.
*
@@ -208,11 +209,11 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
/**
* @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 dest Indicates HW interface to use.
* @param ptr Address to store read data.
* @param size Size of an item.
* @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.
*
@@ -222,7 +223,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
/**
* @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.
@@ -235,7 +236,7 @@ int esp_apptrace_fseek(esp_apptrace_dest_t dest, void *stream, long offset, int
/**
* @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.
@@ -246,8 +247,8 @@ 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.
*
@@ -257,7 +258,7 @@ 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.
@@ -266,12 +267,6 @@ int esp_apptrace_fstop(esp_apptrace_dest_t dest);
*/
int esp_apptrace_feof(esp_apptrace_dest_t dest, void *stream);
/**
* @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
}
#endif
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -32,12 +32,12 @@ typedef struct {
* @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 indefinetly.
* @param user_tmo Timeout value (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*/
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;
}
@@ -52,7 +52,7 @@ 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 */
@@ -94,7 +94,7 @@ 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.
* 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
@@ -0,0 +1,69 @@
/*
* 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_
+3 -2
View File
@@ -2,12 +2,13 @@
archive: libapp_trace.a
entries:
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)
port_jtag (noflash)
if APPTRACE_DEST_UART = y:
port_uart (noflash)
if APPTRACE_SV_ENABLE = y:
SEGGER_SYSVIEW (noflash)
SEGGER_RTT_esp (noflash)
+38 -65
View File
@@ -1,9 +1,10 @@
/*
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <string.h>
#include "soc/soc.h"
#include "esp_log.h"
#include "esp_cpu.h"
@@ -11,11 +12,6 @@
#include "driver/uart.h"
#include "hal/uart_ll.h"
#include "string.h"
#include "driver/gpio.h"
#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
@@ -43,47 +39,8 @@ typedef struct {
bool circular_buff_overflow;
} esp_apptrace_uart_data_t;
#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)
{
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
}
#if APPTRACE_DEST_UART
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
@@ -109,7 +66,6 @@ static inline void esp_apptrace_uart_hw_init(void)
ESP_APPTRACE_LOGI("Initialized UART on CPU%d", esp_cpu_get_core_id());
}
/*****************************************************************************************/
/***************************** Apptrace HW iface *****************************************/
/*****************************************************************************************/
@@ -128,9 +84,8 @@ static esp_err_t esp_apptrace_send_uart_data(esp_apptrace_uart_data_t *hw_data,
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) {
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 {
@@ -183,13 +138,11 @@ static void esp_apptrace_send_uart_tx_task(void *arg)
while (1) {
send_buff_data(hw_data, &tmo);
vTaskDelay(10);
if (hw_data->circular_buff_overflow == true)
{
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)
{
if (hw_data->message_buff_overflow == true) {
hw_data->message_buff_overflow = false;
ESP_LOGE(TAG, "Message size more then message buffer!");
}
@@ -202,15 +155,14 @@ 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) {
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){
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;
}
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)
{
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;
@@ -222,8 +174,9 @@ static esp_err_t esp_apptrace_uart_init(esp_apptrace_uart_data_t *hw_data)
int source_clk = UART_SCLK_DEFAULT;
#if SOC_UART_LP_NUM > 0
if (hw_data->port_num >= SOC_UART_HP_NUM)
if (hw_data->port_num >= SOC_UART_HP_NUM) {
source_clk = LP_UART_SCLK_DEFAULT;
}
#endif
const uart_config_t uart_config = {
@@ -244,7 +197,9 @@ static esp_err_t esp_apptrace_uart_init(esp_apptrace_uart_data_t *hw_data)
assert((err == ESP_OK) && "Not possible to configure UART RX/TX pins. Please check and change menuconfig parameters!");
int uart_prio = CONFIG_APPTRACE_UART_TASK_PRIO;
if (uart_prio >= (configMAX_PRIORITIES-1)) uart_prio = configMAX_PRIORITIES - 1;
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!");
@@ -266,8 +221,7 @@ static uint8_t *esp_apptrace_uart_up_buffer_get(esp_apptrace_uart_data_t *hw_dat
hw_data->message_buff_overflow = true;
return NULL;
}
if (hw_data->tx_msg_buff_size != 0)
{
if (hw_data->tx_msg_buff_size != 0) {
// A previous message was not sent.
return NULL;
}
@@ -296,7 +250,7 @@ static esp_err_t esp_apptrace_uart_up_buffer_put(esp_apptrace_uart_data_t *hw_da
static void esp_apptrace_uart_down_buffer_config(esp_apptrace_uart_data_t *hw_data, uint8_t *buf, uint32_t size)
{
hw_data->down_buffer = (uint8_t *)malloc(size);
if (hw_data->down_buffer == NULL){
if (hw_data->down_buffer == NULL) {
assert(false && "Failed to allocate apptrace uart down buffer!");
}
hw_data->down_buffer_size = size;
@@ -323,7 +277,7 @@ static uint8_t *esp_apptrace_uart_down_buffer_get(esp_apptrace_uart_data_t *hw_d
}
*size = uart_fifolen;
ptr = hw_data->down_buffer;
*size =uart_read_bytes(hw_data->port_num, ptr, uart_fifolen, 0);
*size = uart_read_bytes(hw_data->port_num, ptr, uart_fifolen, 0);
}
if (esp_apptrace_uart_unlock(hw_data) != ESP_OK) {
@@ -352,4 +306,23 @@ static esp_err_t esp_apptrace_uart_flush(esp_apptrace_uart_data_t *hw_data, esp_
return ESP_OK;
}
#endif // APPTRACE_DEST_UART
esp_apptrace_hw_t *esp_apptrace_uart_hw_get(int num, void **data)
{
ESP_LOGD(TAG, "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_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;
}
-367
View File
@@ -1,367 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2024 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;
}
+348
View File
@@ -0,0 +1,348 @@
/*
* 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_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(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, 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;
}
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_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;
}
-533
View File
@@ -1,533 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2024 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.
// Exectution 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 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' setion for details.
// 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 underlaying 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 wating 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 wating 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"
// 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_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;
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;
}
@@ -0,0 +1,523 @@
/*
* 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(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;
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;
}
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_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;
}
@@ -1,69 +0,0 @@
/*
* 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_
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2025 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);
esp_err_t (*swap)(uint32_t new_block_id, uint32_t prev_block_len);
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,12 +38,6 @@ 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;
} esp_apptrace_membufs_proto_data_t;
@@ -1,41 +0,0 @@
# 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()
-2
View File
@@ -8,8 +8,6 @@ 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_ENABLE CONFIG_APPTRACE_SV_ENABLE
CONFIG_SYSVIEW_TS_SOURCE CONFIG_APPTRACE_SV_TS_SOURCE
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2017-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2017-2025 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
@@ -65,6 +65,7 @@ Revision: $Rev: 7745 $
#include "esp_app_trace.h"
#include "esp_app_trace_util.h"
#include "esp_intr_alloc.h"
#include "esp_clk_tree.h"
#include "esp_cpu.h"
#include "soc/soc.h"
#include "soc/interrupts.h"
@@ -84,11 +85,7 @@ extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
// 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
#define SYSVIEW_CORE_NAME "core0" // In dual core, this will be renamed by OpenOCD as core1
// Determine which timer to use as timestamp source
#if CONFIG_APPTRACE_SV_TS_SOURCE_CCOUNT
@@ -105,9 +102,6 @@ extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
// 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;
@@ -177,30 +171,38 @@ static void _cbSendSystemDesc(void) {
*
**********************************************************************
*/
static void SEGGER_SYSVIEW_TS_Init(void)
static int 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
// get clock source frequency
uint32_t counter_src_hz = 0;
ESP_ERROR_CHECK(esp_clk_tree_src_get_freq_hz(
(soc_module_clk_t)GPTIMER_CLK_SRC_DEFAULT,
ESP_CLK_TREE_SRC_FREQ_PRECISION_CACHED, &counter_src_hz));
gptimer_config_t config = {
.clk_src = GPTIMER_CLK_SRC_DEFAULT,
.direction = GPTIMER_COUNT_UP,
.resolution_hz = SYSVIEW_TIMESTAMP_FREQ,
.resolution_hz = counter_src_hz / SYSVIEW_TIMER_DIV,
};
// 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);
return config.resolution_hz;
#else
return SYSVIEW_TIMESTAMP_FREQ;
#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,
int timestamp_freq = SEGGER_SYSVIEW_TS_Init();
SEGGER_SYSVIEW_Init(timestamp_freq, SYSVIEW_CPU_FREQ,
&SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc);
SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE);
@@ -108,7 +108,7 @@ static void _cbSendTaskList(void) {
* Called from SystemView when asked by the host, returns the
* current system time in micro seconds.
*/
static U64 _cbGetTime(void) {
__attribute__((unused)) static U64 _cbGetTime(void) {
U64 Time;
Time = xTaskGetTickCountFromISR();
@@ -260,7 +260,10 @@ void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 Stac
*/
// Callbacks provided to SYSTEMVIEW by FreeRTOS
const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = {
_cbGetTime,
/* 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,
};
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -42,7 +42,7 @@ static uint8_t s_down_buf[SYSVIEW_DOWN_BUF_SIZE];
#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
#define ESP_APPTRACE_DEST_SYSVIEW ESP_APPTRACE_DEST_JTAG
#endif
/*********************************************************************
@@ -60,8 +60,8 @@ static uint8_t s_down_buf[SYSVIEW_DOWN_BUF_SIZE];
* 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.
* min_sz Threshold for flushing data. If current filling level is above this value, data will be flushed. JTAG destinations only.
* tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* Return value
* None.
@@ -70,15 +70,15 @@ 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);
}
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);
ESP_LOGE(TAG, "Failed to flush apptrace data (%d)!", res);
}
s_events_buf_filled = 0;
}
@@ -91,8 +91,8 @@ void SEGGER_RTT_ESP_FlushNoLock(unsigned long min_sz, unsigned long tmo)
* 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.
* min_sz Threshold for flushing data. If current filling level is above this value, data will be flushed. JTAG destinations only.
* tmo Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
*
* Return value
* None.
@@ -121,13 +121,14 @@ void SEGGER_RTT_ESP_Flush(unsigned long min_sz, unsigned long tmo)
* 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;
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;
}
/*********************************************************************
@@ -154,80 +155,79 @@ unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned Buffe
* 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;
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;
}
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;
}
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 (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);
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) {
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
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;
}
s_events_buf_filled = 0;
}
#endif
memcpy(&s_events_buf[s_events_buf_filled], pBuffer, NumBytes);
s_events_buf_filled += NumBytes;
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;
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;
if (event_id == SYSVIEW_EVTID_TRACE_STOP) {
SEGGER_RTT_ESP_FlushNoLock(0, SEGGER_STOP_WAIT_TMO);
}
return NumBytes;
}
/*********************************************************************
@@ -255,9 +255,10 @@ unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pBuffer, u
* 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;
int SEGGER_RTT_ConfigUpBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags)
{
s_events_buf_filled = 0;
return 0;
}
/*********************************************************************
@@ -285,9 +286,9 @@ int SEGGER_RTT_ConfigUpBuffer(unsigned BufferIndex, const char* sName, void* pBu
* 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;
int SEGGER_RTT_ConfigDownBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags)
{
return esp_apptrace_down_buffer_config(ESP_APPTRACE_DEST_SYSVIEW, s_down_buf, sizeof(s_down_buf));
}
/*************************** Init hook ****************************
@@ -302,5 +303,4 @@ ESP_SYSTEM_INIT_FN(sysview_init, SECONDARY, BIT(0), 120)
return ESP_OK;
}
/*************************** End of file ****************************/
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -27,14 +27,13 @@ static SEGGER_SYSVIEW_MODULE s_esp_sysview_heap_module = {
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);
uint32_t tmo_ticks = tmo / (1000 * portTICK_PERIOD_MS);
ESP_EARLY_LOGV(TAG, "%s", __func__);
do {
if (tmo != (uint32_t)-1) {
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) {
@@ -42,7 +41,7 @@ esp_err_t esp_sysview_heap_trace_start(uint32_t tmo)
}
}
vTaskDelay(1);
} while(!SEGGER_SYSVIEW_Started());
} while (!SEGGER_SYSVIEW_Started());
SEGGER_SYSVIEW_RegisterModule(&s_esp_sysview_heap_module);
s_mod_registered = true;
@@ -58,7 +57,7 @@ esp_err_t esp_sysview_heap_trace_stop(void)
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 aPacket[SEGGER_SYSVIEW_INFO_SIZE + (2 + CALLSTACK_SIZE)*SEGGER_SYSVIEW_QUANTA_U32];
U8* pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket);
U32 *calls = (U32 *)callers;
@@ -76,7 +75,7 @@ void esp_sysview_heap_trace_alloc(const void *addr, uint32_t size, const void *c
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 aPacket[SEGGER_SYSVIEW_INFO_SIZE + (1 + CALLSTACK_SIZE)*SEGGER_SYSVIEW_QUANTA_U32];
U8* pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket);
U32 *calls = (U32 *)callers;
@@ -5,8 +5,9 @@ components/app_trace/test_apps:
- app_trace
- esp_timer
- soc
- driver
- esp_hw_support
- esp_driver_uart
- esp_driver_gptimer
disable:
- if: IDF_TARGET in ["esp32c5", "esp32c61", "esp32h21", "esp32h4"]
temporary: true
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(COMPONENTS main)
@@ -67,9 +67,9 @@ const static char *TAG = "esp_apptrace_test";
#define ESP_APPTRACE_TEST_LOGO( format, ... ) ESP_APPTRACE_TEST_LOG_LEVEL(E, ESP_LOG_NONE, format, ##__VA_ARGS__)
#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)
#define ESP_APPTRACE_TEST_WRITE(_b_, _s_) esp_apptrace_write(ESP_APPTRACE_DEST_JTAG, _b_, _s_, ESP_APPTRACE_TMO_INFINITE)
#define ESP_APPTRACE_TEST_WRITE_FROM_ISR(_b_, _s_) esp_apptrace_write(ESP_APPTRACE_DEST_JTAG, _b_, _s_, 0UL)
#define ESP_APPTRACE_TEST_WRITE_NOWAIT(_b_, _s_) esp_apptrace_write(ESP_APPTRACE_DEST_JTAG, _b_, _s_, 0)
typedef struct {
uint8_t *buf;
@@ -625,7 +625,7 @@ static int esp_logtrace_printf(const char *fmt, ...)
va_start(ap, fmt);
int ret = esp_apptrace_vprintf_to(ESP_APPTRACE_DEST_TRAX, ESP_APPTRACE_TMO_INFINITE, fmt, ap);
int ret = esp_apptrace_vprintf_to(ESP_APPTRACE_DEST_JTAG, ESP_APPTRACE_TMO_INFINITE, fmt, ap);
va_end(ap);
@@ -657,7 +657,7 @@ static void esp_logtrace_task(void *p)
break;
}
}
esp_err_t ret = esp_apptrace_flush(ESP_APPTRACE_DEST_TRAX, ESP_APPTRACE_TMO_INFINITE);
esp_err_t ret = esp_apptrace_flush(ESP_APPTRACE_DEST_JTAG, ESP_APPTRACE_TMO_INFINITE);
if (ret != ESP_OK) {
ESP_APPTRACE_TEST_LOGE("Failed to flush printf buf (%d)!", ret);
}
+4 -2
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" "esp_ota_app_desc.c"
idf_component_register(SRCS "esp_ota_ops.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,7 +29,9 @@ if(NOT BOOTLOADER_BUILD)
add_custom_target(blank_ota_data ALL DEPENDS ${blank_otadata_file})
add_dependencies(flash blank_ota_data)
add_dependencies(encrypted-flash blank_ota_data)
if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT)
add_dependencies(encrypted-flash blank_ota_data)
endif()
set(otatool_py "${python}" "${COMPONENT_DIR}/otatool.py")
-21
View File
@@ -1,21 +0,0 @@
/*
* SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <assert.h>
#include <sys/param.h>
#include "esp_ota_ops.h"
#include "esp_attr.h"
#include "sdkconfig.h"
const esp_app_desc_t *esp_ota_get_app_description(void)
{
return esp_app_get_description();
}
int esp_ota_get_app_elf_sha256(char* dst, size_t size)
{
return esp_app_get_elf_sha256(dst, size);
}
+105 -29
View File
@@ -33,7 +33,7 @@
#include "esp_flash.h"
#include "esp_flash_internal.h"
#define SUB_TYPE_ID(i) (i & 0x0F)
#define OTA_SLOT(i) (i & 0x0F)
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
/* Partial_data is word aligned so no reallocation is necessary for encrypted flash write */
@@ -539,6 +539,69 @@ static esp_err_t rewrite_ota_seq(esp_ota_select_entry_t *two_otadata, uint32_t s
}
}
/**
* @brief Calculate the next OTA sequence number that will boot the given OTA slot.
*
* Based on the ESP-IDF OTA boot scheme, the system selects the OTA slot to boot by:
* boot_slot = (seq - 1) % ota_app_count
*
* This function determines the required seq value that would cause the given ota_slot_idx
* to be selected on next boot.
*
* @param current_seq Current active OTA sequence number
* @param ota_slot_idx Target OTA slot index (0-based)
* @param ota_app_count Total number of OTA slots
*
* @return New sequence number that will result in booting ota_slot_idx
*/
static uint32_t compute_ota_seq_for_target_slot(uint32_t current_seq, uint32_t ota_slot_idx, uint8_t ota_app_count)
{
if (ota_app_count == 0) {
return 0;
}
/* ESP-IDF stores OTA boot information in the OTA data partition, which consists of two sectors.
* Each sector holds an esp_ota_select_entry_t structure: otadata[0] and otadata[1].
* These structures record the OTA sequence number (ota_seq) used to determine the current boot partition.
*
* Boot selection logic:
* - If both otadata[0].ota_seq and otadata[1].ota_seq are 0xFFFFFFFF (invalid), it is the initial state:
* → Boot the factory app, if it exists.
* → Otherwise, fall back to booting ota[0].
*
* - If both otadata entries have valid sequence numbers and CRCs:
* → Choose the higher sequence number (max_seq).
* → Determine the OTA partition for boot (or running partition) using:
* running_ota_slot = (max_seq - 1) % ota_app_count
* where ota_app_count is the total number of OTA app partitions.
*
* Example:
* otadata[0].ota_seq = 4
* otadata[1].ota_seq = 5
* ota_app_count = 8 (available OTA slots: ota_0 to ota_7)
* → max_seq = 5
* → running slot = (5 - 1) % 8 = 4
* → So ota_4 is currently running
*
* If you want to switch to boot a different OTA slot (e.g., ota_7):
* → You need to compute a new sequence number such that:
* (new_seq - 1) % ota_app_count == 7
* while ensuring new_seq > current_seq.
*
* General formula:
* x = current OTA slot ID
* ota_slot_idx = desired OTA slot ID
* seq = current ota_seq
*
* To find the next ota_seq that will boot ota_y, use:
* new_seq = ((ota_slot_idx + 1) % ota_app_count) + ota_app_count * i;
* // where i is the smallest non-negative integer such that new_seq > seq
*/
uint32_t i = 0;
uint32_t base = (ota_slot_idx + 1) % ota_app_count;
while (current_seq > (base + i * ota_app_count)) { i++; };
return base + i * ota_app_count;
}
uint8_t esp_ota_get_app_partition_count(void)
{
uint16_t ota_app_count = 0;
@@ -549,6 +612,30 @@ uint8_t esp_ota_get_app_partition_count(void)
return ota_app_count;
}
/**
* @brief Update the OTA data partition to set the given OTA app subtype as the next boot target.
*
* ESP-IDF uses the OTA data partition to track which OTA app should boot.
* This partition contains two entries (otadata[0] and otadata[1]), each storing an esp_ota_select_entry_t struct,
* which includes the OTA sequence number (ota_seq).
*
* On boot, the chip determines the current running OTA slot using:
* current_slot = (max(ota_seq) - 1) % ota_app_count
*
* This function updates the OTA data to switch the next boot to the partition with the given subtype.
*
* Behavior:
* - If the currently selected OTA slot already matches the requested subtype,
* only the state field is updated (e.g., to mark the app as newly downloaded).
* - Otherwise, it calculates the next valid ota_seq that will cause the bootloader to select
* the requested OTA slot on reboot, and writes it to the inactive OTA data sector.
*
* @param subtype The OTA partition subtype (e.g., ESP_PARTITION_SUBTYPE_APP_OTA_0, ..._OTA_1, ...)
* @return
* - ESP_OK if update was successful
* - ESP_ERR_NOT_FOUND if OTA data partition not found
* - ESP_ERR_INVALID_ARG if subtype is out of range
*/
static esp_err_t esp_rewrite_ota_data(esp_partition_subtype_t subtype)
{
esp_ota_select_entry_t otadata[2];
@@ -558,42 +645,31 @@ static esp_err_t esp_rewrite_ota_data(esp_partition_subtype_t subtype)
}
uint8_t ota_app_count = esp_ota_get_app_partition_count();
if (SUB_TYPE_ID(subtype) >= ota_app_count) {
if (OTA_SLOT(subtype) >= ota_app_count) {
return ESP_ERR_INVALID_ARG;
}
//esp32_idf use two sector for store information about which partition is running
//it defined the two sector as ota data partition,two structure esp_ota_select_entry_t is saved in the two sector
//named data in first sector as otadata[0], second sector data as otadata[1]
//e.g.
//if otadata[0].ota_seq == otadata[1].ota_seq == 0xFFFFFFFF,means ota info partition is in init status
//so it will boot factory application(if there is),if there's no factory application,it will boot ota[0] application
//if otadata[0].ota_seq != 0 and otadata[1].ota_seq != 0,it will choose a max seq ,and get value of max_seq%max_ota_app_number
//and boot a subtype (mask 0x0F) value is (max_seq - 1)%max_ota_app_number,so if want switch to run ota[x],can use next formulas.
//for example, if otadata[0].ota_seq = 4, otadata[1].ota_seq = 5, and there are 8 ota application,
//current running is (5-1)%8 = 4,running ota[4],so if we want to switch to run ota[7],
//we should add otadata[0].ota_seq (is 4) to 4 ,(8-1)%8=7,then it will boot ota[7]
//if A=(B - C)%D
//then B=(A + C)%D + D*n ,n= (0,1,2...)
//so current ota app sub type id is x , dest bin subtype is y,total ota app count is n
//seq will add (x + n*1 + 1 - seq)%n
int active_otadata = bootloader_common_get_active_otadata(otadata);
int next_otadata;
uint32_t new_seq;
if (active_otadata != -1) {
uint32_t seq = otadata[active_otadata].ota_seq;
uint32_t i = 0;
while (seq > (SUB_TYPE_ID(subtype) + 1) % ota_app_count + i * ota_app_count) {
i++;
uint32_t ota_slot = (otadata[active_otadata].ota_seq - 1) % ota_app_count;
if (ota_slot == OTA_SLOT(subtype)) {
// ota_data is already valid and points to the correct OTA slot.
// So after reboot the requested partition will be selected for boot.
// Only update the ota_state of the requested partition.
next_otadata = active_otadata;
new_seq = otadata[active_otadata].ota_seq;
} else {
next_otadata = (~active_otadata) & 1; // if 0 -> will be next 1. and if 1 -> will be next 0.
new_seq = compute_ota_seq_for_target_slot(otadata[active_otadata].ota_seq, OTA_SLOT(subtype), ota_app_count);
}
int next_otadata = (~active_otadata)&1; // if 0 -> will be next 1. and if 1 -> will be next 0.
otadata[next_otadata].ota_state = set_new_state_otadata();
return rewrite_ota_seq(otadata, (SUB_TYPE_ID(subtype) + 1) % ota_app_count + i * ota_app_count, next_otadata, otadata_partition);
} else {
/* Both OTA slots are invalid, probably because unformatted... */
int next_otadata = 0;
otadata[next_otadata].ota_state = set_new_state_otadata();
return rewrite_ota_seq(otadata, SUB_TYPE_ID(subtype) + 1, next_otadata, otadata_partition);
next_otadata = 0;
new_seq = OTA_SLOT(subtype) + 1;
}
otadata[next_otadata].ota_state = set_new_state_otadata();
return rewrite_ota_seq(otadata, new_seq, next_otadata, otadata_partition);
}
esp_err_t esp_ota_set_boot_partition(const esp_partition_t *partition)
+4 -24
View File
@@ -42,30 +42,6 @@ extern "C"
*/
typedef uint32_t esp_ota_handle_t;
/**
* @brief Return esp_app_desc structure. This structure includes app version.
*
* @note This API is present for backward compatibility reasons. Alternative function
* with the same functionality is `esp_app_get_description`
*
* Return description for running app.
* @return Pointer to esp_app_desc structure.
*/
const esp_app_desc_t *esp_ota_get_app_description(void) __attribute__((deprecated("Please use esp_app_get_description instead")));
/**
* @brief Fill the provided buffer with SHA256 of the ELF file, formatted as hexadecimal, null-terminated.
* If the buffer size is not sufficient to fit the entire SHA256 in hex plus a null terminator,
* the largest possible number of bytes will be written followed by a null.
*
* @note This API is present for backward compatibility reasons. Alternative function
* with the same functionality is `esp_app_get_elf_sha256`
*
* @param dst Destination buffer
* @param size Size of the buffer
* @return Number of bytes written to dst (including null terminator)
*/
int esp_ota_get_app_elf_sha256(char* dst, size_t size) __attribute__((deprecated("Please use esp_app_get_elf_sha256 instead")));
/**
* @brief Commence an OTA update writing to the specified partition.
@@ -113,6 +89,10 @@ esp_err_t esp_ota_begin(const esp_partition_t* partition, size_t image_size, esp
* Unlike esp_ota_begin(), this function does not erase the partition which receives the OTA update, but rather expects that part of the image
* has already been written correctly, and it resumes writing from the given offset.
*
* @note When flash encryption is enabled, data writes must be 16-byte aligned.
* Any leftover (non-aligned) data is temporarily cached and may be lost after reboot.
* Therefore, during resumption, ensure that image offset is always 16-byte aligned.
*
* @param partition Pointer to info for the partition which is receiving the OTA update. Required.
* @param erase_size Specifies how much flash memory to erase before resuming OTA, depending on whether a sequential write or a bulk erase is being used.
* @param image_offset Offset from where to resume the OTA process. Should be set to the number of bytes already written.
+84 -42
View File
@@ -3,10 +3,8 @@
# otatool is used to perform ota-level operations - flashing ota partition
# erasing ota partition and switching ota partition
#
# SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
from __future__ import division, print_function
import argparse
import binascii
import collections
@@ -16,12 +14,18 @@ import sys
import tempfile
try:
from parttool import PARTITION_TABLE_OFFSET, PartitionName, PartitionType, ParttoolTarget
from parttool import PARTITION_TABLE_OFFSET
from parttool import PartitionName
from parttool import PartitionType
from parttool import ParttoolTarget
except ImportError:
COMPONENTS_PATH = os.path.expandvars(os.path.join('$IDF_PATH', 'components'))
PARTTOOL_DIR = os.path.join(COMPONENTS_PATH, 'partition_table')
sys.path.append(PARTTOOL_DIR)
from parttool import PARTITION_TABLE_OFFSET, PartitionName, PartitionType, ParttoolTarget
from parttool import PARTITION_TABLE_OFFSET
from parttool import PartitionName
from parttool import PartitionType
from parttool import ParttoolTarget
__version__ = '2.0'
@@ -35,15 +39,31 @@ def status(msg):
print(msg)
class OtatoolTarget():
class OtatoolTarget:
OTADATA_PARTITION = PartitionType('data', 'ota')
def __init__(self, port=None, baud=None, partition_table_offset=PARTITION_TABLE_OFFSET, partition_table_file=None,
spi_flash_sec_size=SPI_FLASH_SEC_SIZE, esptool_args=[], esptool_write_args=[],
esptool_read_args=[], esptool_erase_args=[]):
self.target = ParttoolTarget(port, baud, partition_table_offset, partition_table_file, esptool_args,
esptool_write_args, esptool_read_args, esptool_erase_args)
def __init__(
self,
port=None,
baud=None,
partition_table_offset=PARTITION_TABLE_OFFSET,
partition_table_file=None,
spi_flash_sec_size=SPI_FLASH_SEC_SIZE,
esptool_args=[],
esptool_write_args=[],
esptool_read_args=[],
esptool_erase_args=[],
):
self.target = ParttoolTarget(
port,
baud,
partition_table_offset,
partition_table_file,
esptool_args,
esptool_write_args,
esptool_read_args,
esptool_erase_args,
)
self.spi_flash_sec_size = spi_flash_sec_size
temp_file = tempfile.NamedTemporaryFile(delete=False)
@@ -71,8 +91,8 @@ class OtatoolTarget():
for i in range(2):
start = i * (self.spi_flash_sec_size >> 1)
seq = bytearray(self.otadata[start:start + 4])
crc = bytearray(self.otadata[start + 28:start + 32])
seq = bytearray(self.otadata[start : start + 4])
crc = bytearray(self.otadata[start + 28 : start + 32])
seq = struct.unpack('I', seq)
crc = struct.unpack('I', crc)
@@ -118,7 +138,9 @@ class OtatoolTarget():
try:
if isinstance(ota_id, int):
ota_partition_next = filter(lambda p: p.subtype - gen.MIN_PARTITION_SUBTYPE_APP_OTA == ota_id, ota_partitions)
ota_partition_next = filter(
lambda p: p.subtype - gen.MIN_PARTITION_SUBTYPE_APP_OTA == ota_id, ota_partitions
)
else:
ota_partition_next = filter(lambda p: p.name == ota_id, ota_partitions)
@@ -192,8 +214,8 @@ class OtatoolTarget():
def read_ota_partition(self, ota_id, output):
self.target.read_partition(self._get_partition_id_from_ota_id(ota_id), output)
def write_ota_partition(self, ota_id, input):
self.target.write_partition(self._get_partition_id_from_ota_id(ota_id), input)
def write_ota_partition(self, ota_id, input_file):
self.target.write_partition(self._get_partition_id_from_ota_id(ota_id), input_file)
def erase_ota_partition(self, ota_id):
self.target.erase_partition(self._get_partition_id_from_ota_id(ota_id))
@@ -205,8 +227,10 @@ def _read_otadata(target):
otadata_info = target._get_otadata_info()
print(' {:8s} \t {:8s} | \t {:8s} \t {:8s}'.format('OTA_SEQ', 'CRC', 'OTA_SEQ', 'CRC'))
print('Firmware: 0x{:08x} \t0x{:08x} | \t0x{:08x} \t 0x{:08x}'.format(otadata_info[0].seq, otadata_info[0].crc,
otadata_info[1].seq, otadata_info[1].crc))
print(
f'Firmware: {otadata_info[0].seq:#08x} \t{otadata_info[0].crc:#08x} | '
f'\t{otadata_info[1].seq:#08x} \t {otadata_info[1].crc:#08x}'
)
def _erase_otadata(target):
@@ -220,12 +244,12 @@ def _switch_ota_partition(target, ota_id):
def _read_ota_partition(target, ota_id, output):
target.read_ota_partition(ota_id, output)
status('Read ota partition contents to file {}'.format(output))
status(f'Read ota partition contents to file {output}')
def _write_ota_partition(target, ota_id, input):
target.write_ota_partition(ota_id, input)
status('Written contents of file {} to ota partition'.format(input))
def _write_ota_partition(target, ota_id, input_file):
target.write_ota_partition(ota_id, input_file)
status(f'Written contents of file {input_file} to ota partition')
def _erase_ota_partition(target, ota_id):
@@ -240,9 +264,13 @@ def main():
parser.add_argument('--quiet', '-q', help='suppress stderr messages', action='store_true')
parser.add_argument('--esptool-args', help='additional main arguments for esptool', nargs='+')
parser.add_argument('--esptool-write-args', help='additional subcommand arguments for esptool write_flash', nargs='+')
parser.add_argument('--esptool-read-args', help='additional subcommand arguments for esptool read_flash', nargs='+')
parser.add_argument('--esptool-erase-args', help='additional subcommand arguments for esptool erase_region', nargs='+')
parser.add_argument(
'--esptool-write-args', help='additional subcommand arguments for esptool write-flash', nargs='+'
)
parser.add_argument('--esptool-read-args', help='additional subcommand arguments for esptool read-flash', nargs='+')
parser.add_argument(
'--esptool-erase-args', help='additional subcommand arguments for esptool erase-region', nargs='+'
)
# There are two possible sources for the partition table: a device attached to the host
# or a partition table CSV/binary file. These sources are mutually exclusive.
@@ -250,10 +278,14 @@ def main():
parser.add_argument('--baud', '-b', help='baudrate to use', type=int)
parser.add_argument('--partition-table-offset', '-o', help='offset to read the partition table from', type=str)
parser.add_argument('--partition-table-offset', '-o', help='offset to read the partition table from', type=str)
parser.add_argument('--partition-table-file', '-f', help='file (CSV/binary) to read the partition table from; \
overrides device attached to specified port as the partition table source when defined')
parser.add_argument(
'--partition-table-file',
'-f',
help='file (CSV/binary) to read the partition table from; '
'overrides device attached to specified port as the partition table source when defined',
)
subparsers = parser.add_subparsers(dest='operation', help='run otatool -h for additional help')
@@ -269,15 +301,25 @@ def main():
slot_or_name_parser_args.add_argument('--slot', help='slot number of the ota partition', type=int)
slot_or_name_parser_args.add_argument('--name', help='name of the ota partition')
subparsers.add_parser('switch_ota_partition', help='switch otadata partition', parents=[slot_or_name_parser, spi_flash_sec_size])
subparsers.add_parser(
'switch_ota_partition', help='switch otadata partition', parents=[slot_or_name_parser, spi_flash_sec_size]
)
read_ota_partition_subparser = subparsers.add_parser('read_ota_partition', help='read contents of an ota partition', parents=[slot_or_name_parser])
read_ota_partition_subparser.add_argument('--output', help='file to write the contents of the ota partition to', required=True)
read_ota_partition_subparser = subparsers.add_parser(
'read_ota_partition', help='read contents of an ota partition', parents=[slot_or_name_parser]
)
read_ota_partition_subparser.add_argument(
'--output', help='file to write the contents of the ota partition to', required=True
)
write_ota_partition_subparser = subparsers.add_parser('write_ota_partition', help='write contents to an ota partition', parents=[slot_or_name_parser])
write_ota_partition_subparser = subparsers.add_parser(
'write_ota_partition', help='write contents to an ota partition', parents=[slot_or_name_parser]
)
write_ota_partition_subparser.add_argument('--input', help='file whose contents to write to the ota partition')
subparsers.add_parser('erase_ota_partition', help='erase contents of an ota partition', parents=[slot_or_name_parser])
subparsers.add_parser(
'erase_ota_partition', help='erase contents of an ota partition', parents=[slot_or_name_parser]
)
args = parser.parse_args()
@@ -324,7 +366,7 @@ def main():
target = OtatoolTarget(**target_args)
# Create the operation table and execute the operation
common_args = {'target':target}
common_args = {'target': target}
ota_id = []
@@ -338,18 +380,18 @@ def main():
pass
otatool_ops = {
'read_otadata':(_read_otadata, []),
'erase_otadata':(_erase_otadata, []),
'switch_ota_partition':(_switch_ota_partition, ota_id),
'read_ota_partition':(_read_ota_partition, ['output'] + ota_id),
'write_ota_partition':(_write_ota_partition, ['input'] + ota_id),
'erase_ota_partition':(_erase_ota_partition, ota_id)
'read_otadata': (_read_otadata, []),
'erase_otadata': (_erase_otadata, []),
'switch_ota_partition': (_switch_ota_partition, ota_id),
'read_ota_partition': (_read_ota_partition, ['output'] + ota_id),
'write_ota_partition': (_write_ota_partition, ['input'] + ota_id),
'erase_ota_partition': (_erase_ota_partition, ota_id),
}
(op, op_args) = otatool_ops[args.operation]
for op_arg in op_args:
common_args.update({op_arg:vars(args)[op_arg]})
common_args.update({op_arg: vars(args)[op_arg]})
try:
common_args['ota_id'] = common_args.pop('name')
@@ -7,6 +7,7 @@ components/app_update/test_apps:
- if: CONFIG_NAME == "xip_psram" and SOC_SPIRAM_XIP_SUPPORTED == 1
# S2 doesn't have ROM for flash
- if: CONFIG_NAME == "xip_psram_with_rom_impl" and (SOC_SPIRAM_XIP_SUPPORTED == 1 and IDF_TARGET != "esp32s2")
- if: CONFIG_NAME == "recovery_bootloader" and SOC_RECOVERY_BOOTLOADER_SUPPORTED == 1
disable:
- if: IDF_TARGET in ["esp32h21", "esp32h4"]
temporary: true
@@ -14,3 +15,7 @@ components/app_update/test_apps:
- if: IDF_TARGET == "esp32c61" and CONFIG_NAME == "xip_psram_with_rom_impl"
temporary: true
reason: not supported yet # TODO: [ESP32C61] IDF-12784
disable_test:
- if: CONFIG_NAME == "recovery_bootloader" and SOC_RECOVERY_BOOTLOADER_SUPPORTED == 1 and IDF_TARGET == "esp32c61"
temporary: true
reason: lack of runners # TODO: [ESP32C61] IDF-13165
@@ -1,7 +1,7 @@
#This is the project CMakeLists.txt file for the test subproject
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/test_apps/components")
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
@@ -1,4 +1,15 @@
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
PRIV_REQUIRES cmock test_utils app_update bootloader_support nvs_flash driver spi_flash esp_psram
WHOLE_ARCHIVE)
idf_component_register(
SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
PRIV_REQUIRES
cmock
test_utils
app_update
bootloader_support
nvs_flash
esp_driver_gpio
spi_flash
esp_psram
efuse
WHOLE_ARCHIVE
)
@@ -0,0 +1,87 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Tests bootloader update.
*/
#include "unity.h"
#include "esp_log.h"
#include "esp_efuse.h"
#include "esp_flash_internal.h"
#include "esp_rom_sys.h"
#include "utils_update.h"
#include "sdkconfig.h"
#define BOOT_COUNT_NAMESPACE "boot_count"
static __attribute__((unused)) const char *TAG = "btldr_update";
#if CONFIG_BOOTLOADER_RECOVERY_ENABLE
/* @brief Checks and prepares the partition so that the factory app is launched after that.
*/
static void start_test(void)
{
ESP_LOGI(TAG, "boot count 1 - reset");
set_boot_count_in_nvs(1);
erase_ota_data();
ESP_LOGI(TAG, "ota_data erased");
ESP_LOGI(TAG, "Bootloader offset: 0x%x", esp_rom_get_bootloader_offset());
reboot_as_deep_sleep();
}
static void test_flow1(void)
{
uint8_t boot_count = get_boot_count_from_nvs();
boot_count++;
set_boot_count_in_nvs(boot_count);
ESP_LOGI(TAG, "boot count %d", boot_count);
ESP_LOGI(TAG, "Bootloader offset: 0x%x", esp_rom_get_bootloader_offset());
const esp_partition_t *primary_bootloader;
TEST_ESP_OK(esp_partition_register_external(NULL, ESP_PRIMARY_BOOTLOADER_OFFSET, ESP_BOOTLOADER_SIZE, "PrimaryBTLDR", ESP_PARTITION_TYPE_BOOTLOADER, ESP_PARTITION_SUBTYPE_BOOTLOADER_PRIMARY, &primary_bootloader));
const esp_partition_t *recovery_bootloader;
TEST_ESP_OK(esp_partition_register_external(NULL, CONFIG_BOOTLOADER_RECOVERY_OFFSET, ESP_BOOTLOADER_SIZE, "RecoveryBTLDR", ESP_PARTITION_TYPE_BOOTLOADER, ESP_PARTITION_SUBTYPE_BOOTLOADER_RECOVERY, &recovery_bootloader));
ESP_LOGI(TAG, "Bootloaders are registered");
// Remove write protection for the bootloader
esp_flash_set_dangerous_write_protection(esp_flash_default_chip, false);
switch (boot_count) {
case 2:
TEST_ASSERT_EQUAL_HEX32(ESP_PRIMARY_BOOTLOADER_OFFSET, esp_rom_get_bootloader_offset());
TEST_ESP_OK(esp_partition_erase_range(recovery_bootloader, 0, recovery_bootloader->size));
ESP_LOGI(TAG, "Erase recovery bootloader");
TEST_ESP_OK(esp_efuse_set_recovery_bootloader_offset(CONFIG_BOOTLOADER_RECOVERY_OFFSET));
ESP_LOGI(TAG, "Backup, copy <%s> -> <%s>", primary_bootloader->label, recovery_bootloader->label);
TEST_ESP_OK(esp_partition_copy(recovery_bootloader, 0, primary_bootloader, 0, primary_bootloader->size));
TEST_ESP_OK(esp_partition_erase_range(primary_bootloader, 0, primary_bootloader->size));
ESP_LOGI(TAG, "Erase primary bootloader");
reboot_as_deep_sleep();
break;
case 3:
TEST_ASSERT_EQUAL_HEX32(CONFIG_BOOTLOADER_RECOVERY_OFFSET, esp_rom_get_bootloader_offset());
ESP_LOGI(TAG, "Return to primary bootloader...");
ESP_LOGI(TAG, "Copy <%s> -> <%s>", recovery_bootloader->label, primary_bootloader->label);
TEST_ESP_OK(esp_partition_copy(primary_bootloader, 0, recovery_bootloader, 0, primary_bootloader->size));
TEST_ESP_OK(esp_partition_erase_range(recovery_bootloader, 0, recovery_bootloader->size));
ESP_LOGI(TAG, "Erase recovery bootloader");
break;
default:
TEST_FAIL_MESSAGE("Unexpected stage");
break;
}
}
TEST_CASE_MULTIPLE_STAGES("Recovery bootloader feature", "[recovery_bootloader][timeout=90][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET]", start_test, test_flow1, test_flow1);
#endif // CONFIG_BOOTLOADER_RECOVERY_ENABLE
@@ -15,7 +15,7 @@
#include "nvs_flash.h"
#include "sdkconfig.h"
static const char *TAG = "test";
ESP_LOG_ATTR_TAG(TAG, "test");
static uint8_t buffer[SPI_FLASH_SEC_SIZE];
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -7,314 +7,16 @@
* Tests for switching between partitions: factory, OTAx, test.
*/
#include <esp_types.h>
#include <stdio.h>
#include "string.h"
#include <inttypes.h>
#include "sdkconfig.h"
#include "esp_rom_spiflash.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "unity.h"
#include "esp_system.h"
#include "bootloader_common.h"
#include "../bootloader_flash/include/bootloader_flash_priv.h"
#include "esp_err.h"
#include "esp_log.h"
#include "esp_ota_ops.h"
#include "esp_partition.h"
#include "esp_flash_partitions.h"
#include "esp_image_format.h"
#include "nvs_flash.h"
#include "unity.h"
#include "utils_update.h"
#include "sdkconfig.h"
#include "driver/gpio.h"
#include "esp_sleep.h"
#include "test_utils.h"
ESP_LOG_ATTR_TAG(TAG, "ota_test");
#define BOOT_COUNT_NAMESPACE "boot_count"
static const char *TAG = "ota_test";
static void set_boot_count_in_nvs(uint8_t boot_count)
{
nvs_handle_t boot_count_handle;
esp_err_t err = nvs_open(BOOT_COUNT_NAMESPACE, NVS_READWRITE, &boot_count_handle);
if (err != ESP_OK) {
TEST_ESP_OK(nvs_flash_erase());
TEST_ESP_OK(nvs_flash_init());
TEST_ESP_OK(nvs_open(BOOT_COUNT_NAMESPACE, NVS_READWRITE, &boot_count_handle));
}
TEST_ESP_OK(nvs_set_u8(boot_count_handle, "boot_count", boot_count));
TEST_ESP_OK(nvs_commit(boot_count_handle));
nvs_close(boot_count_handle);
}
static uint8_t get_boot_count_from_nvs(void)
{
nvs_handle_t boot_count_handle;
esp_err_t err = nvs_open(BOOT_COUNT_NAMESPACE, NVS_READONLY, &boot_count_handle);
if (err == ESP_ERR_NVS_NOT_FOUND) {
set_boot_count_in_nvs(0);
}
uint8_t boot_count;
TEST_ESP_OK(nvs_get_u8(boot_count_handle, "boot_count", &boot_count));
nvs_close(boot_count_handle);
return boot_count;
}
/* @brief Copies a current app to next partition using handle.
*
* @param[in] update_handle - Handle of API ota.
* @param[in] cur_app - Current app.
*/
static void copy_app_partition(esp_ota_handle_t update_handle, const esp_partition_t *curr_app)
{
const void *partition_bin = NULL;
esp_partition_mmap_handle_t data_map;
ESP_LOGI(TAG, "start the copy process");
TEST_ESP_OK(esp_partition_mmap(curr_app, 0, curr_app->size, ESP_PARTITION_MMAP_DATA, &partition_bin, &data_map));
TEST_ESP_OK(esp_ota_write(update_handle, (const void *)partition_bin, curr_app->size));
esp_partition_munmap(data_map);
ESP_LOGI(TAG, "finish the copy process");
}
/* @brief Copies a current app to next partition using handle.
*
* @param[in] update_handle - Handle of API ota.
* @param[in] cur_app - Current app.
*/
static void copy_app_partition_with_offset(esp_ota_handle_t update_handle, const esp_partition_t *curr_app)
{
const void *partition_bin = NULL;
esp_partition_mmap_handle_t data_map;
ESP_LOGI(TAG, "start the copy process");
uint32_t offset = 0, bytes_to_write = curr_app->size;
uint32_t write_bytes;
while (bytes_to_write > 0) {
write_bytes = (bytes_to_write > (4 * 1024)) ? (4 * 1024) : bytes_to_write;
TEST_ESP_OK(esp_partition_mmap(curr_app, offset, write_bytes, ESP_PARTITION_MMAP_DATA, &partition_bin, &data_map));
TEST_ESP_OK(esp_ota_write_with_offset(update_handle, (const void *)partition_bin, write_bytes, offset));
esp_partition_munmap(data_map);
bytes_to_write -= write_bytes;
offset += write_bytes;
}
ESP_LOGI(TAG, "finish the copy process");
}
/* @brief Get the next partition of OTA for the update.
*
* @return The next partition of OTA(OTA0-15).
*/
static const esp_partition_t * get_next_update_partition(void)
{
const esp_partition_t *update_partition = esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, update_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, update_partition->subtype, update_partition->address);
return update_partition;
}
/* @brief Copies a current app to next partition (OTA0-15) and then configure OTA data for a new boot partition.
*
* @param[in] cur_app_partition - Current app.
* @param[in] next_app_partition - Next app for boot.
*/
static void copy_current_app_to_next_part(const esp_partition_t *cur_app_partition, const esp_partition_t *next_app_partition)
{
esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, next_app_partition->subtype, next_app_partition->address);
esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle));
copy_app_partition(update_handle, cur_app_partition);
TEST_ESP_OK(esp_ota_end(update_handle));
TEST_ESP_OK(esp_ota_set_boot_partition(next_app_partition));
}
/* @brief Copies a current app to next partition (OTA0-15) and then configure OTA data for a new boot partition.
*
* @param[in] cur_app_partition - Current app.
* @param[in] next_app_partition - Next app for boot.
*/
static void copy_current_app_to_next_part_with_offset(const esp_partition_t *cur_app_partition, const esp_partition_t *next_app_partition)
{
esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, next_app_partition->subtype, next_app_partition->address);
esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle));
copy_app_partition_with_offset(update_handle, cur_app_partition);
TEST_ESP_OK(esp_ota_end(update_handle));
TEST_ESP_OK(esp_ota_set_boot_partition(next_app_partition));
}
/* @brief Erase otadata partition
*/
static void erase_ota_data(void)
{
const esp_partition_t *data_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_OTA, NULL);
TEST_ASSERT_NOT_EQUAL(NULL, data_partition);
TEST_ESP_OK(esp_partition_erase_range(data_partition, 0, 2 * data_partition->erase_size));
}
/* @brief Reboots ESP using mode deep sleep. This mode guaranty that RTC_DATA_ATTR variables is not reset.
*/
static void reboot_as_deep_sleep(void)
{
ESP_LOGI(TAG, "reboot as deep sleep");
esp_deep_sleep(20000);
TEST_FAIL_MESSAGE("Should never be reachable except when sleep is rejected, abort");
}
/* @brief Copies a current app to next partition (OTA0-15), after that ESP is rebooting and run this (the next) OTAx.
*/
static void copy_current_app_to_next_part_and_reboot(void)
{
const esp_partition_t *cur_app = esp_ota_get_running_partition();
ESP_LOGI(TAG, "copy current app to next part");
copy_current_app_to_next_part(cur_app, get_next_update_partition());
reboot_as_deep_sleep();
}
/* @brief Copies a current app to next partition (OTA0-15) using esp_ota_write_with_offest(), after that ESP is rebooting and run this (the next) OTAx.
*/
static void copy_current_app_to_next_part_with_offset_and_reboot(void)
{
const esp_partition_t *cur_app = esp_ota_get_running_partition();
ESP_LOGI(TAG, "copy current app to next part");
copy_current_app_to_next_part_with_offset(cur_app, get_next_update_partition());
reboot_as_deep_sleep();
}
/* @brief Get running app.
*
* @return The next partition of OTA(OTA0-15).
*/
static const esp_partition_t* get_running_firmware(void)
{
const esp_partition_t *configured = esp_ota_get_boot_partition();
const esp_partition_t *running = esp_ota_get_running_partition();
ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08"PRIx32")",
running->type, running->subtype, running->address);
ESP_LOGI(TAG, "Configured partition type %d subtype %d (offset 0x%08"PRIx32")",
configured->type, configured->subtype, configured->address);
TEST_ASSERT_NOT_EQUAL(NULL, configured);
TEST_ASSERT_NOT_EQUAL(NULL, running);
if (running->subtype != ESP_PARTITION_SUBTYPE_APP_TEST) {
TEST_ASSERT_EQUAL_PTR(running, configured);
}
return running;
}
// type of a corrupt ota_data
typedef enum {
CORR_CRC_1_SECTOR_OTA_DATA = (1 << 0), /*!< Corrupt CRC only 1 sector of ota_data */
CORR_CRC_2_SECTOR_OTA_DATA = (1 << 1), /*!< Corrupt CRC only 2 sector of ota_data */
} corrupt_ota_data_t;
/* @brief Get two copies ota_data from otadata partition.
*
* @param[in] otadata_partition - otadata partition.
* @param[out] ota_data_0 - First copy from otadata_partition.
* @param[out] ota_data_1 - Second copy from otadata_partition.
*/
static void get_ota_data(const esp_partition_t *otadata_partition, esp_ota_select_entry_t *ota_data_0, esp_ota_select_entry_t *ota_data_1)
{
uint32_t offset = otadata_partition->address;
uint32_t size = otadata_partition->size;
if (offset != 0) {
const esp_ota_select_entry_t *ota_select_map;
ota_select_map = bootloader_mmap(offset, size);
TEST_ASSERT_NOT_EQUAL(NULL, ota_select_map);
memcpy(ota_data_0, ota_select_map, sizeof(esp_ota_select_entry_t));
memcpy(ota_data_1, (uint8_t *)ota_select_map + otadata_partition->erase_size, sizeof(esp_ota_select_entry_t));
bootloader_munmap(ota_select_map);
}
}
/* @brief Writes a ota_data into required sector of otadata_partition.
*
* @param[in] otadata_partition - Partition information otadata.
* @param[in] ota_data - otadata structure.
* @param[in] sec_id - Sector number 0 or 1.
*/
static void write_ota_data(const esp_partition_t *otadata_partition, esp_ota_select_entry_t *ota_data, int sec_id)
{
esp_partition_write(otadata_partition, otadata_partition->erase_size * sec_id, &ota_data[sec_id], sizeof(esp_ota_select_entry_t));
}
/* @brief Makes a corrupt of ota_data.
* @param[in] err - type error
*/
static void corrupt_ota_data(corrupt_ota_data_t err)
{
esp_ota_select_entry_t ota_data[2];
const esp_partition_t *otadata_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_OTA, NULL);
TEST_ASSERT_NOT_EQUAL(NULL, otadata_partition);
get_ota_data(otadata_partition, &ota_data[0], &ota_data[1]);
if (err & CORR_CRC_1_SECTOR_OTA_DATA) {
ota_data[0].crc = 0;
}
if (err & CORR_CRC_2_SECTOR_OTA_DATA) {
ota_data[1].crc = 0;
}
TEST_ESP_OK(esp_partition_erase_range(otadata_partition, 0, otadata_partition->size));
write_ota_data(otadata_partition, &ota_data[0], 0);
write_ota_data(otadata_partition, &ota_data[1], 1);
}
#if defined(CONFIG_BOOTLOADER_FACTORY_RESET) || defined(CONFIG_BOOTLOADER_APP_TEST)
/* @brief Sets the pin number to output and sets output level as low. After reboot (deep sleep) this pin keep the same level.
*
* The output level of the pad will be force locked and can not be changed.
* Power down or call gpio_hold_dis will disable this function.
*
* @param[in] num_pin - Pin number
*/
static void set_output_pin(uint32_t num_pin)
{
TEST_ESP_OK(gpio_hold_dis(num_pin));
gpio_config_t io_conf;
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = (1ULL << num_pin);
io_conf.pull_down_en = 0;
io_conf.pull_up_en = 0;
TEST_ESP_OK(gpio_config(&io_conf));
TEST_ESP_OK(gpio_set_level(num_pin, 0));
TEST_ESP_OK(gpio_hold_en(num_pin));
}
/* @brief Unset the pin number hold function.
*/
static void reset_output_pin(uint32_t num_pin)
{
TEST_ESP_OK(gpio_hold_dis(num_pin));
TEST_ESP_OK(gpio_reset_pin(num_pin));
}
#endif
static void mark_app_valid(void)
{
#ifdef CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
TEST_ESP_OK(esp_ota_mark_app_valid_cancel_rollback());
#endif
}
/* @brief Checks and prepares the partition so that the factory app is launched after that.
*/
@@ -546,20 +248,6 @@ static void test_flow5(void)
TEST_CASE_MULTIPLE_STAGES("Switching between factory, test, factory", "[app_update][timeout=90][reset=SW_CPU_RESET, SW_CPU_RESET, DEEPSLEEP_RESET]", start_test, test_flow5, test_flow5, test_flow5);
#endif
static const esp_partition_t* app_update(void)
{
const esp_partition_t *cur_app = get_running_firmware();
const esp_partition_t* update_partition = esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_NULL(update_partition);
esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(update_partition, OTA_SIZE_UNKNOWN, &update_handle));
copy_app_partition(update_handle, cur_app);
TEST_ESP_OK(esp_ota_end(update_handle));
TEST_ESP_OK(esp_ota_set_boot_partition(update_partition));
return update_partition;
}
static void test_rollback1(void)
{
uint8_t boot_count = get_boot_count_from_nvs();
@@ -930,3 +618,51 @@ static void test_rollback3_1(void)
}
TEST_CASE_MULTIPLE_STAGES("Test rollback. Updated partition invalidated after esp_ota_begin", "[app_update][timeout=90][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET, DEEPSLEEP_RESET, SW_CPU_RESET]", start_test, test_rollback3, test_rollback3, test_rollback3, test_rollback3_1);
static void test_rollback4(void)
{
uint8_t boot_count = get_boot_count_from_nvs();
boot_count++;
set_boot_count_in_nvs(boot_count);
ESP_LOGI(TAG, "boot count %d", boot_count);
const esp_partition_t *cur_app = get_running_firmware();
switch (boot_count) {
case 2:
ESP_LOGI(TAG, "Factory");
TEST_ASSERT_EQUAL(ESP_PARTITION_SUBTYPE_APP_FACTORY, cur_app->subtype);
app_update();
reboot_as_deep_sleep();
break;
case 3:
ESP_LOGI(TAG, "OTA0");
TEST_ASSERT_EQUAL(ESP_PARTITION_SUBTYPE_APP_OTA_0, cur_app->subtype);
TEST_ESP_OK(esp_ota_mark_app_valid_cancel_rollback());
app_update();
// Do not reboot and call app_update again.
// This will not change the running partition since we haven't rebooted.
// The esp_rewrite_otadata() will update the otadata for the non-running partition only.
app_update();
#ifdef CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
// The last call to esp_rewrite_otadata should have updated the otadata for the non-running partition only.
// Therefore, calling esp_ota_get_state_partition on the running partition should succeed and not return ESP_ERR_NOT_FOUND
const esp_partition_t* running_partition;
running_partition = esp_ota_get_running_partition();
esp_ota_img_states_t ota_state;
TEST_ESP_OK(esp_ota_get_state_partition(running_partition, &ota_state));
#endif
reboot_as_deep_sleep();
break;
case 4:
ESP_LOGI(TAG, "OTA1");
TEST_ASSERT_EQUAL(ESP_PARTITION_SUBTYPE_APP_OTA_1, cur_app->subtype);
TEST_ESP_OK(esp_ota_mark_app_valid_cancel_rollback());
break;
default:
erase_ota_data();
TEST_FAIL_MESSAGE("Unexpected stage");
break;
}
}
TEST_CASE_MULTIPLE_STAGES("Test esp_rewrite_otadata. Updated sequence number for non-running partition always", "[app_update][timeout=90][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET, DEEPSLEEP_RESET, SW_CPU_RESET]", start_test, test_rollback4, test_rollback4, test_rollback4);
@@ -0,0 +1,307 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_rom_spiflash.h"
#include "driver/gpio.h"
#include "nvs_flash.h"
#include "esp_partition.h"
#include "esp_flash_partitions.h"
#include "esp_image_format.h"
#include "../bootloader_flash/include/bootloader_flash_priv.h"
#include "esp_sleep.h"
#include "esp_ota_ops.h"
#include "esp_err.h"
#include "esp_log.h"
#include "test_utils.h"
#include "utils_update.h"
#include "unity.h"
#include "sdkconfig.h"
#define BOOT_COUNT_NAMESPACE "boot_count"
static const char *TAG = "ota_test";
void set_boot_count_in_nvs(uint8_t boot_count)
{
nvs_handle_t boot_count_handle;
esp_err_t err = nvs_open(BOOT_COUNT_NAMESPACE, NVS_READWRITE, &boot_count_handle);
if (err != ESP_OK) {
TEST_ESP_OK(nvs_flash_erase());
TEST_ESP_OK(nvs_flash_init());
TEST_ESP_OK(nvs_open(BOOT_COUNT_NAMESPACE, NVS_READWRITE, &boot_count_handle));
}
TEST_ESP_OK(nvs_set_u8(boot_count_handle, "boot_count", boot_count));
TEST_ESP_OK(nvs_commit(boot_count_handle));
nvs_close(boot_count_handle);
}
uint8_t get_boot_count_from_nvs(void)
{
nvs_handle_t boot_count_handle;
esp_err_t err = nvs_open(BOOT_COUNT_NAMESPACE, NVS_READONLY, &boot_count_handle);
if (err == ESP_ERR_NVS_NOT_FOUND) {
set_boot_count_in_nvs(0);
}
uint8_t boot_count;
TEST_ESP_OK(nvs_get_u8(boot_count_handle, "boot_count", &boot_count));
nvs_close(boot_count_handle);
return boot_count;
}
/* @brief Copies a current app to next partition using handle.
*
* @param[in] update_handle - Handle of API ota.
* @param[in] cur_app - Current app.
*/
void copy_app_partition(esp_ota_handle_t update_handle, const esp_partition_t *curr_app)
{
const void *partition_bin = NULL;
esp_partition_mmap_handle_t data_map;
ESP_LOGI(TAG, "start the copy process");
TEST_ESP_OK(esp_partition_mmap(curr_app, 0, curr_app->size, ESP_PARTITION_MMAP_DATA, &partition_bin, &data_map));
TEST_ESP_OK(esp_ota_write(update_handle, (const void *)partition_bin, curr_app->size));
esp_partition_munmap(data_map);
ESP_LOGI(TAG, "finish the copy process");
}
/* @brief Copies a current app to next partition using handle.
*
* @param[in] update_handle - Handle of API ota.
* @param[in] cur_app - Current app.
*/
void copy_app_partition_with_offset(esp_ota_handle_t update_handle, const esp_partition_t *curr_app)
{
const void *partition_bin = NULL;
esp_partition_mmap_handle_t data_map;
ESP_LOGI(TAG, "start the copy process");
uint32_t offset = 0, bytes_to_write = curr_app->size;
uint32_t write_bytes;
while (bytes_to_write > 0) {
write_bytes = (bytes_to_write > (4 * 1024)) ? (4 * 1024) : bytes_to_write;
TEST_ESP_OK(esp_partition_mmap(curr_app, offset, write_bytes, ESP_PARTITION_MMAP_DATA, &partition_bin, &data_map));
TEST_ESP_OK(esp_ota_write_with_offset(update_handle, (const void *)partition_bin, write_bytes, offset));
esp_partition_munmap(data_map);
bytes_to_write -= write_bytes;
offset += write_bytes;
}
ESP_LOGI(TAG, "finish the copy process");
}
/* @brief Get the next partition of OTA for the update.
*
* @return The next partition of OTA(OTA0-15).
*/
const esp_partition_t * get_next_update_partition(void)
{
const esp_partition_t *update_partition = esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, update_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, update_partition->subtype, update_partition->address);
return update_partition;
}
/* @brief Copies a current app to next partition (OTA0-15) and then configure OTA data for a new boot partition.
*
* @param[in] cur_app_partition - Current app.
* @param[in] next_app_partition - Next app for boot.
*/
void copy_current_app_to_next_part(const esp_partition_t *cur_app_partition, const esp_partition_t *next_app_partition)
{
esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, next_app_partition->subtype, next_app_partition->address);
esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle));
copy_app_partition(update_handle, cur_app_partition);
TEST_ESP_OK(esp_ota_end(update_handle));
TEST_ESP_OK(esp_ota_set_boot_partition(next_app_partition));
}
/* @brief Copies a current app to next partition (OTA0-15) and then configure OTA data for a new boot partition.
*
* @param[in] cur_app_partition - Current app.
* @param[in] next_app_partition - Next app for boot.
*/
void copy_current_app_to_next_part_with_offset(const esp_partition_t *cur_app_partition, const esp_partition_t *next_app_partition)
{
esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_EQUAL(NULL, next_app_partition);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%"PRIx32, next_app_partition->subtype, next_app_partition->address);
esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(next_app_partition, OTA_SIZE_UNKNOWN, &update_handle));
copy_app_partition_with_offset(update_handle, cur_app_partition);
TEST_ESP_OK(esp_ota_end(update_handle));
TEST_ESP_OK(esp_ota_set_boot_partition(next_app_partition));
}
/* @brief Erase otadata partition
*/
void erase_ota_data(void)
{
const esp_partition_t *data_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_OTA, NULL);
TEST_ASSERT_NOT_EQUAL(NULL, data_partition);
TEST_ESP_OK(esp_partition_erase_range(data_partition, 0, 2 * data_partition->erase_size));
}
/* @brief Reboots ESP using mode deep sleep. This mode guaranty that RTC_DATA_ATTR variables is not reset.
*/
void reboot_as_deep_sleep(void)
{
ESP_LOGI(TAG, "reboot as deep sleep");
esp_deep_sleep(20000);
TEST_FAIL_MESSAGE("Should never be reachable except when sleep is rejected, abort");
}
/* @brief Copies a current app to next partition (OTA0-15), after that ESP is rebooting and run this (the next) OTAx.
*/
void copy_current_app_to_next_part_and_reboot(void)
{
const esp_partition_t *cur_app = esp_ota_get_running_partition();
ESP_LOGI(TAG, "copy current app to next part");
copy_current_app_to_next_part(cur_app, get_next_update_partition());
reboot_as_deep_sleep();
}
/* @brief Copies a current app to next partition (OTA0-15) using esp_ota_write_with_offest(), after that ESP is rebooting and run this (the next) OTAx.
*/
void copy_current_app_to_next_part_with_offset_and_reboot(void)
{
const esp_partition_t *cur_app = esp_ota_get_running_partition();
ESP_LOGI(TAG, "copy current app to next part");
copy_current_app_to_next_part_with_offset(cur_app, get_next_update_partition());
reboot_as_deep_sleep();
}
/* @brief Get running app.
*
* @return The next partition of OTA(OTA0-15).
*/
const esp_partition_t* get_running_firmware(void)
{
const esp_partition_t *configured = esp_ota_get_boot_partition();
const esp_partition_t *running = esp_ota_get_running_partition();
// If a reboot hasn't occurred after app_update(), the configured and running partitions may differ
ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08"PRIx32")",
running->type, running->subtype, running->address);
ESP_LOGI(TAG, "Configured partition type %d subtype %d (offset 0x%08"PRIx32")",
configured->type, configured->subtype, configured->address);
TEST_ASSERT_NOT_EQUAL(NULL, configured);
TEST_ASSERT_NOT_EQUAL(NULL, running);
return running;
}
/* @brief Get two copies ota_data from otadata partition.
*
* @param[in] otadata_partition - otadata partition.
* @param[out] ota_data_0 - First copy from otadata_partition.
* @param[out] ota_data_1 - Second copy from otadata_partition.
*/
void get_ota_data(const esp_partition_t *otadata_partition, esp_ota_select_entry_t *ota_data_0, esp_ota_select_entry_t *ota_data_1)
{
uint32_t offset = otadata_partition->address;
uint32_t size = otadata_partition->size;
if (offset != 0) {
const esp_ota_select_entry_t *ota_select_map;
ota_select_map = bootloader_mmap(offset, size);
TEST_ASSERT_NOT_EQUAL(NULL, ota_select_map);
memcpy(ota_data_0, ota_select_map, sizeof(esp_ota_select_entry_t));
memcpy(ota_data_1, (uint8_t *)ota_select_map + otadata_partition->erase_size, sizeof(esp_ota_select_entry_t));
bootloader_munmap(ota_select_map);
}
}
/* @brief Writes a ota_data into required sector of otadata_partition.
*
* @param[in] otadata_partition - Partition information otadata.
* @param[in] ota_data - otadata structure.
* @param[in] sec_id - Sector number 0 or 1.
*/
void write_ota_data(const esp_partition_t *otadata_partition, esp_ota_select_entry_t *ota_data, int sec_id)
{
esp_partition_write(otadata_partition, otadata_partition->erase_size * sec_id, &ota_data[sec_id], sizeof(esp_ota_select_entry_t));
}
/* @brief Makes a corrupt of ota_data.
* @param[in] err - type error
*/
void corrupt_ota_data(corrupt_ota_data_t err)
{
esp_ota_select_entry_t ota_data[2];
const esp_partition_t *otadata_partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_OTA, NULL);
TEST_ASSERT_NOT_EQUAL(NULL, otadata_partition);
get_ota_data(otadata_partition, &ota_data[0], &ota_data[1]);
if (err & CORR_CRC_1_SECTOR_OTA_DATA) {
ota_data[0].crc = 0;
}
if (err & CORR_CRC_2_SECTOR_OTA_DATA) {
ota_data[1].crc = 0;
}
TEST_ESP_OK(esp_partition_erase_range(otadata_partition, 0, otadata_partition->size));
write_ota_data(otadata_partition, &ota_data[0], 0);
write_ota_data(otadata_partition, &ota_data[1], 1);
}
#if defined(CONFIG_BOOTLOADER_FACTORY_RESET) || defined(CONFIG_BOOTLOADER_APP_TEST)
/* @brief Sets the pin number to output and sets output level as low. After reboot (deep sleep) this pin keep the same level.
*
* The output level of the pad will be force locked and can not be changed.
* Power down or call gpio_hold_dis will disable this function.
*
* @param[in] num_pin - Pin number
*/
void set_output_pin(uint32_t num_pin)
{
TEST_ESP_OK(gpio_hold_dis(num_pin));
gpio_config_t io_conf;
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = (1ULL << num_pin);
io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
io_conf.pull_up_en = GPIO_PULLUP_DISABLE;
TEST_ESP_OK(gpio_config(&io_conf));
TEST_ESP_OK(gpio_set_level(num_pin, 0));
TEST_ESP_OK(gpio_hold_en(num_pin));
}
/* @brief Unset the pin number hold function.
*/
void reset_output_pin(uint32_t num_pin)
{
TEST_ESP_OK(gpio_hold_dis(num_pin));
TEST_ESP_OK(gpio_reset_pin(num_pin));
}
#endif
void mark_app_valid(void)
{
#ifdef CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
TEST_ESP_OK(esp_ota_mark_app_valid_cancel_rollback());
#endif
}
const esp_partition_t* app_update(void)
{
const esp_partition_t *cur_app = get_running_firmware();
const esp_partition_t* update_partition = esp_ota_get_next_update_partition(NULL);
TEST_ASSERT_NOT_NULL(update_partition);
esp_ota_handle_t update_handle = 0;
TEST_ESP_OK(esp_ota_begin(update_partition, OTA_SIZE_UNKNOWN, &update_handle));
copy_app_partition(update_handle, cur_app);
TEST_ESP_OK(esp_ota_end(update_handle));
TEST_ESP_OK(esp_ota_set_boot_partition(update_partition));
return update_partition;
}
@@ -0,0 +1,148 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include "esp_ota_ops.h"
#include "esp_partition.h"
#ifdef __cplusplus
extern "C"
{
#endif
/**
* @brief Enumeration for specifying which OTA data sectors' CRCs to corrupt.
*/
typedef enum {
CORR_CRC_1_SECTOR_OTA_DATA = (1 << 0), /*!< Corrupt CRC only 1 sector of ota_data */
CORR_CRC_2_SECTOR_OTA_DATA = (1 << 1), /*!< Corrupt CRC only 2 sector of ota_data */
} corrupt_ota_data_t;
/**
* @brief Set boot count value in NVS.
* @param boot_count Value to set.
*/
void set_boot_count_in_nvs(uint8_t boot_count);
/**
* @brief Get boot count value from NVS.
* @return Boot count value.
*/
uint8_t get_boot_count_from_nvs(void);
/**
* @brief Copy current app to next partition using OTA handle.
* @param update_handle OTA update handle.
* @param curr_app Current app partition.
*/
void copy_app_partition(esp_ota_handle_t update_handle, const esp_partition_t *curr_app);
/**
* @brief Copy current app to next partition using OTA handle with offset.
* @param update_handle OTA update handle.
* @param curr_app Current app partition.
*/
void copy_app_partition_with_offset(esp_ota_handle_t update_handle, const esp_partition_t *curr_app);
/**
* @brief Get the next OTA update partition.
* @return Pointer to next OTA partition.
*/
const esp_partition_t * get_next_update_partition(void);
/**
* @brief Copy current app to next partition and set boot partition.
* @param cur_app_partition Current app partition.
* @param next_app_partition Next app partition.
*/
void copy_current_app_to_next_part(const esp_partition_t *cur_app_partition, const esp_partition_t *next_app_partition);
/**
* @brief Copy current app to next partition with offset and set boot partition.
* @param cur_app_partition Current app partition.
* @param next_app_partition Next app partition.
*/
void copy_current_app_to_next_part_with_offset(const esp_partition_t *cur_app_partition, const esp_partition_t *next_app_partition);
/**
* @brief Erase OTA data partition.
*/
void erase_ota_data(void);
/**
* @brief Reboot ESP using deep sleep mode.
*/
void reboot_as_deep_sleep(void);
/**
* @brief Copy current app to next partition and reboot.
*/
void copy_current_app_to_next_part_and_reboot(void);
/**
* @brief Copy current app to next partition with offset and reboot.
*/
void copy_current_app_to_next_part_with_offset_and_reboot(void);
/**
* @brief Get running firmware partition.
* @return Pointer to running firmware partition.
*/
const esp_partition_t* get_running_firmware(void);
/**
* @brief Get two OTA data copies from OTA data partition.
* @param otadata_partition OTA data partition.
* @param ota_data_0 First OTA data copy.
* @param ota_data_1 Second OTA data copy.
*/
void get_ota_data(const esp_partition_t *otadata_partition, esp_ota_select_entry_t *ota_data_0, esp_ota_select_entry_t *ota_data_1);
/**
* @brief Write OTA data into required sector of OTA data partition.
* @param otadata_partition OTA data partition.
* @param ota_data OTA data structure.
* @param sec_id Sector number (0 or 1).
*/
void write_ota_data(const esp_partition_t *otadata_partition, esp_ota_select_entry_t *ota_data, int sec_id);
/**
* @brief Corrupt OTA data for testing.
* @param err Type of corruption.
*/
void corrupt_ota_data(corrupt_ota_data_t err);
#if defined(CONFIG_BOOTLOADER_FACTORY_RESET) || defined(CONFIG_BOOTLOADER_APP_TEST)
/**
* @brief Set output pin to low and hold state.
* @param num_pin Pin number.
*/
void set_output_pin(uint32_t num_pin);
/**
* @brief Reset output pin hold function.
* @param num_pin Pin number.
*/
void reset_output_pin(uint32_t num_pin);
#endif
/**
* @brief Mark app as valid and cancel rollback.
*/
void mark_app_valid(void);
/**
* @brief Perform app update and set new boot partition.
* @return Pointer to updated partition.
*/
const esp_partition_t* app_update(void);
#ifdef __cplusplus
}
#endif
@@ -20,7 +20,7 @@ TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_app_update(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90)
dut.run_all_single_board_cases(timeout=180)
@pytest.mark.generic
@@ -33,7 +33,7 @@ def test_app_update(dut: Dut) -> None:
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_app_update_xip_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90)
dut.run_all_single_board_cases(timeout=180)
@pytest.mark.generic
@@ -46,7 +46,7 @@ def test_app_update_xip_psram(dut: Dut) -> None:
)
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90)
dut.run_all_single_board_cases(timeout=180)
@pytest.mark.generic
@@ -59,4 +59,19 @@ def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
)
@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3', 'esp32p4'], indirect=['target'])
def test_app_update_with_rollback(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90)
dut.run_all_single_board_cases(timeout=180)
@pytest.mark.recovery_bootloader
@pytest.mark.parametrize(
'config',
['recovery_bootloader'],
indirect=True,
)
@idf_parametrize('target', ['esp32c5'], indirect=['target'])
def test_recovery_bootloader_update(dut: Dut) -> None:
try:
dut.run_all_single_board_cases(group='recovery_bootloader', timeout=90)
finally:
# Erase recovery bootloader after test because it may interfere with other tests using this runner
dut.serial.erase_flash()
@@ -0,0 +1,3 @@
CONFIG_BOOTLOADER_RECOVERY_ENABLE=y
CONFIG_BOOTLOADER_RECOVERY_OFFSET=0x3F0000
CONFIG_PARTITION_TABLE_OFFSET=0x9000
@@ -0,0 +1,2 @@
# ESP32C5 supports the Recovery bootloader feature in ROM starting from v1.0 (ECO2)
CONFIG_IDF_TARGET="esp32c5"
@@ -0,0 +1,2 @@
# ESP32C61 supports the Recovery bootloader feature in ROM starting from v1.0 (ECO3)
CONFIG_IDF_TARGET="esp32c61"
+3
View File
@@ -32,4 +32,7 @@ if(NOT CONFIG_SECURE_BOOT OR CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT)
esptool_py_flash_target_image(flash bootloader
${CONFIG_BOOTLOADER_OFFSET_IN_FLASH}
"${BOOTLOADER_BUILD_DIR}/bootloader.bin")
# Add bootloader as a dependency to the flash target
add_dependencies(flash bootloader)
endif()
@@ -1,8 +1,37 @@
menu "Bootloader Rollback"
menu "Recovery Bootloader and Rollback"
config BOOTLOADER_RECOVERY_ENABLE
bool "Enable Recovery Bootloader"
depends on SOC_RECOVERY_BOOTLOADER_SUPPORTED
default n
help
The recovery bootloader feature is implemented in the ROM bootloader. It is required for safe OTA
updates of the bootloader. The feature is activated when the eFuse field
(ESP_EFUSE_RECOVERY_BOOTLOADER_FLASH_SECTOR) is set, which defines the flash address of the
recovery bootloader. If activated and the primary bootloader fails to load, the ROM bootloader
will attempt to load the recovery bootloader from the address specified in eFuse.
config BOOTLOADER_RECOVERY_OFFSET
hex "Recovery Bootloader Flash Offset"
depends on BOOTLOADER_RECOVERY_ENABLE
default 0x3F0000
range 0x0 0xFFE000
help
Flash address where the recovery bootloader is stored.
This value must be written to the eFuse field (ESP_EFUSE_RECOVERY_BOOTLOADER_FLASH_SECTOR)
to activate the recovery bootloader in the ROM bootloader. The eFuse can be programmed
using espefuse or in the user application with the API esp_efuse_set_recovery_bootloader_offset().
Setting this value in the config allows parttool.py to verify that it does not overlap with existing
partitions in the partition table.
The address must be a multiple of the flash sector size (0x1000 bytes).
The eFuse field stores the offset in sectors.
If the feature is no longer needed or unused, you can burn the 0xFFF value to disable this feature in
the ROM bootloader.
config BOOTLOADER_ANTI_ROLLBACK_ENABLE
bool "Enable bootloader rollback support"
depends on SOC_RECOVERY_BOOTLOADER_SUPPORTED
depends on BOOTLOADER_RECOVERY_ENABLE
default n
help
This option prevents rollback to previous bootloader image with lower security version.
@@ -21,6 +21,7 @@ menu "Settings"
config BOOTLOADER_LOG_MODE_BINARY
bool "Binary Log Mode"
select BOOTLOADER_LOG_MODE_BINARY_EN
depends on BOOTLOADER_LOG_VERSION_2
help
Enables binary logging with host-side format string expansion. In this mode, the
format argument of ESP_LOGx, ESP_EARLY_LOG, and ESP_DRAM_LOG macros is stored in a
+58 -20
View File
@@ -34,14 +34,21 @@ menu "Bootloader config"
bool "Debug (-Og)"
config BOOTLOADER_COMPILER_OPTIMIZATION_PERF
bool "Optimize for performance (-O2)"
config BOOTLOADER_COMPILER_OPTIMIZATION_NONE
bool "Debug without optimization (-O0) (Deprecated, will be removed in IDF v6.0)"
depends on IDF_TARGET_ARCH_XTENSA || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
endchoice
orsource "Kconfig.log"
config BOOTLOADER_CPU_CLK_FREQ_MHZ
int
default 64 if IDF_TARGET_ESP32H2
default 48 if IDF_TARGET_ESP32H21 || IDF_TARGET_ESP32H4
default 90 if IDF_TARGET_ESP32P4 && ESP32P4_SELECTS_REV_LESS_V3
default 100 if IDF_TARGET_ESP32P4 && !ESP32P4_SELECTS_REV_LESS_V3
default 80
help
The CPU clock frequency to be at least raised to in 2nd bootloader. Invisible for users.
menu "Serial Flash Configurations"
config BOOTLOADER_SPI_CUSTOM_WP_PIN
bool "Use custom SPI Flash WP Pin when flash pins set in eFuse (read help)"
@@ -553,12 +560,13 @@ menu "Security features"
depends on SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
default SECURE_BOOT_ECDSA_KEY_LEN_256_BITS
help
Select the ECDSA key size. Two key sizes are supported
Select the ECDSA key size. Three key sizes are supported depending upon on the target:
- 192 bit key using NISTP192 curve
- 256 bit key using NISTP256 curve (Recommended)
- 384 bit key using NISTP384 curve (Recommended)
The advantage of using 256 bit key is the extra randomness which makes it difficult to be
The advantage of using 384 and 256 bit keys is the extra randomness which makes it difficult to be
bruteforced compared to 192 bit key.
At present, both key sizes are practically implausible to bruteforce.
@@ -570,6 +578,10 @@ menu "Security features"
bool "Using ECC curve NISTP256 (Recommended)"
depends on SECURE_SIGNED_APPS_ECDSA_V2_SCHEME
config SECURE_BOOT_ECDSA_KEY_LEN_384_BITS
bool "Using ECC curve NISTP384 (Recommended)"
depends on SECURE_SIGNED_APPS_ECDSA_V2_SCHEME && SOC_ECDSA_SUPPORT_CURVE_P384
endchoice
config SECURE_SIGNED_ON_BOOT_NO_SECURE_BOOT
@@ -683,7 +695,7 @@ menu "Security features"
If enabled (default), these binary files are signed as part of the build process. The file named in
"Secure boot private signing key" will be used to sign the image.
If disabled, unsigned app/partition data will be built. They must be signed manually using espsecure.py.
If disabled, unsigned app/partition data will be built. They must be signed manually using espsecure.
Version 1 to enable ECDSA Based Secure Boot and Version 2 to enable RSA based Secure Boot.
(for example, on a remote signing server.)
@@ -700,7 +712,7 @@ menu "Security features"
Path is evaluated relative to the project directory.
You can generate a new signing key by running the following command:
espsecure.py generate_signing_key secure_boot_signing_key.pem
espsecure generate-signing-key secure_boot_signing_key.pem
See the Secure Boot section of the ESP-IDF Programmer's Guide for this version for details.
@@ -714,8 +726,8 @@ menu "Security features"
app, to verify app images.
Key file is in raw binary format, and can be extracted from a
PEM formatted private key using the espsecure.py
extract_public_key command.
PEM formatted private key using the espsecure
extract-public-key command.
Refer to the Secure Boot section of the ESP-IDF Programmer's Guide for this version before enabling.
@@ -757,7 +769,7 @@ menu "Security features"
NOTE: If "UART ROM download mode (Permanently disabled (recommended))" or
"UART ROM download mode (Permanently switch to Secure mode (recommended))" is set,
then it is __NOT__ possible to read/write efuses using espefuse.py utility.
then it is __NOT__ possible to read/write efuses using espefuse utility.
However, efuse can be read/written from the application
Please refer to the Secure Boot V2 documentation guide for more information.
@@ -786,7 +798,7 @@ menu "Security features"
help
In reflashable secure bootloader mode, a hardware key is derived from the signing key (with SHA-256) and
can be written to eFuse with espefuse.py.
can be written to eFuse with espefuse.
Normally this is a 256-bit key, but if 3/4 Coding Scheme is used on the device then the eFuse key is
truncated to 192 bits.
@@ -960,6 +972,24 @@ menu "Security features"
so that the bootloader would not need to enable secure boot and thus you could avoid its revocation
strategy.
config SECURE_BOOT_SKIP_WRITE_PROTECTION_SCA
bool "Skip write-protection of SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH"
default y if SECURE_FLASH_PSEUDO_ROUND_FUNC
default n
depends on SOC_ECDSA_SUPPORT_CURVE_P384 && SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
help
If not set (default, recommended), on the first boot when Secure Boot is enabled for
targets that support Secure Boot using ECDSA-P384, the bootloader will burn the write-protection bit of
of SECURE_BOOT_SHA384_EN that could be shared by multiple other efuse bits like
SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH / XTS_DPA_PSEUDO_LEVEL.
Once this efuse bit is write-protected you cannot update the values of the shared efuses, for example,
the security strength value of XTS_DPA_PSEUDO_LEVEL or setting ECC_FORCE_CONST_TIME.
List of eFuses with the same write protection bit:
ESP32-C5: XTS_DPA_PSEUDO_LEVEL and ECC_FORCE_CONST_TIME
config SECURE_FLASH_UART_BOOTLOADER_ALLOW_ENC
bool "Leave UART bootloader encryption enabled"
depends on SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT
@@ -1006,7 +1036,7 @@ menu "Security features"
If flash encryption is enabled in eFuses, this option does not change the bootloader behavior.
Only use this option in testing environments, to avoid accidentally enabling flash encryption on
the wrong device. The device needs to have flash encryption already enabled using espefuse.py.
the wrong device. The device needs to have flash encryption already enabled using espefuse.
config SECURE_FLASH_SKIP_WRITE_PROTECTION_CACHE
bool "Skip write-protection of DIS_CACHE (DIS_ICACHE, DIS_DCACHE)"
@@ -1043,10 +1073,11 @@ menu "Security features"
ESP32-S3: DIS_ICACHE, DIS_DCACHE, DIS_DOWNLOAD_ICACHE, DIS_DOWNLOAD_DCACHE,
DIS_FORCE_DOWNLOAD, DIS_USB_OTG, DIS_TWAI, DIS_APP_CPU, DIS_PAD_JTAG,
DIS_DOWNLOAD_MANUAL_ENCRYPT, DIS_USB_JTAG, DIS_USB_SERIAL_JTAG, STRAP_JTAG_SEL, USB_PHY_SEL.
endmenu # Potentially Insecure
config SECURE_FLASH_ENCRYPT_ONLY_IMAGE_LEN_IN_APP_PART
bool "Encrypt only the app image that is present in the partition of type app"
bool "Encrypt contents upto app image length in app partition"
depends on SECURE_FLASH_ENC_ENABLED && !SECURE_FLASH_REQUIRE_ALREADY_ENABLED
default y
help
@@ -1075,8 +1106,9 @@ menu "Security features"
config SECURE_FLASH_PSEUDO_ROUND_FUNC
bool "Permanently enable XTS-AES's pseudo rounds function"
default y
depends on SECURE_FLASH_ENCRYPTION_MODE_RELEASE && SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
default y if SECURE_FLASH_ENCRYPTION_MODE_RELEASE
default n
depends on SECURE_FLASH_ENC_ENABLED && SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
help
If set (default), the bootloader will permanently enable the XTS-AES peripheral's pseudo rounds function.
Note: Enabling this config would burn an efuse.
@@ -1089,6 +1121,12 @@ menu "Security features"
The strength of the pseudo rounds functions can be configured to low, medium and high,
each denoting the values that would be stored in the efuses field.
By default the value to set to low.
It is recommended that the required strength of the pseudo rounds function should be set during the
first boot itself. If your workflow needs to update the function's strength after the first boot,
you should enable CONFIG_SECURE_BOOT_SKIP_WRITE_PROTECTION_SCA to avoid write protecting this
bit during the boot up for targets that support Secure Boot using ECDSA-P384.
You can configure the strength of the pseudo rounds functions according to your use cases,
for example, increasing the strength would provide higher security but would slow down the
flash encryption/decryption operations.
@@ -1126,7 +1164,7 @@ menu "Security features"
bool "UART ROM download mode (Permanently disabled (recommended))"
help
If set, during startup the app will burn an eFuse bit to permanently disable the UART ROM
Download Mode. This prevents any future use of esptool.py, espefuse.py and similar tools.
Download Mode. This prevents any future use of esptool, espefuse and similar tools.
Once disabled, if the SoC is booted with strapping pins set for ROM Download Mode
then an error is printed instead.
@@ -1148,10 +1186,10 @@ menu "Security features"
Secure Download mode limits the use of Download Mode functions to update SPI config,
changing baud rate, basic flash write and a command to return a summary of currently
enabled security features (`get_security_info`).
enabled security features (`get-security-info`).
Secure Download mode is not compatible with the esptool.py flasher stub feature,
espefuse.py, read/writing memory or registers, encrypted download, or any other
Secure Download mode is not compatible with the esptool flasher stub feature,
espefuse, read/writing memory or registers, encrypted download, or any other
features that interact with unsupported Download Mode commands.
Secure Download mode should be enabled in any application where Flash Encryption
@@ -1162,7 +1200,7 @@ menu "Security features"
It is also possible to enable secure download mode at runtime by calling
esp_efuse_enable_rom_secure_download_mode()
Note: Secure Download mode is not available for ESP32 (includes revisions till ECO3).
Note: Secure Download mode is not available for ESP32.
config SECURE_INSECURE_ALLOW_DL_MODE
bool "UART ROM download mode (Enabled (not recommended))"
@@ -70,6 +70,8 @@ if(CONFIG_SECURE_SIGNED_APPS)
set(scheme "ecdsa192")
elseif(CONFIG_SECURE_BOOT_ECDSA_KEY_LEN_256_BITS)
set(scheme "ecdsa256")
elseif(CONFIG_SECURE_BOOT_ECDSA_KEY_LEN_384_BITS)
set(scheme "ecdsa384")
endif()
fail_at_build_time(gen_secure_boot_signing_key
"Secure Boot Signing Key ${CONFIG_SECURE_BOOT_SIGNING_KEY} does not exist. Generate using:"
+3
View File
@@ -27,3 +27,6 @@ CONFIG_SECURE_BOOT_ENABLED CONFIG_SECURE_BOOT_V
CONFIG_SPI_FLASH_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH
CONFIG_SPI_FLASH_QUAD_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH
CONFIG_SPI_FLASH_OCTAL_32BIT_ADDR_ENABLE CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_OCTAL_FLASH
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG
+88 -51
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22)
if(NOT SDKCONFIG)
message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed "
@@ -31,8 +31,7 @@ set(COMPONENTS
micro-ecc
main
efuse
esp_system
newlib
esp_libc
esp_tee)
# EXTRA_COMPONENT_DIRS can be populated with directories containing one or several components.
@@ -61,30 +60,58 @@ endforeach()
set(BOOTLOADER_BUILD 1)
set(NON_OS_BUILD 1)
include("${IDF_PATH}/tools/cmake/project.cmake")
set(common_req log esp_rom esp_common esp_hw_support newlib)
set(common_req log esp_rom esp_common esp_hw_support esp_libc)
idf_build_set_property(EXTRA_COMPONENT_EXCLUDE_DIRS "${EXTRA_COMPONENT_EXCLUDE_DIRS}")
idf_build_set_property(__COMPONENT_REQUIRES_COMMON "${common_req}")
idf_build_set_property(__OUTPUT_SDKCONFIG 0)
# Define a property for the default linker script
set(LD_DEFAULT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/main/ld/${IDF_TARGET}")
idf_build_set_property(BOOTLOADER_LINKER_SCRIPT "${LD_DEFAULT_PATH}/bootloader.ld" APPEND)
idf_build_set_property(BOOTLOADER_LINKER_SCRIPT "${LD_DEFAULT_PATH}/bootloader.rom.ld" APPEND)
project(bootloader)
if(CONFIG_ESP32P4_REV_MIN_300)
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.rev3.ld.in")
else()
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.ld.in")
endif()
idf_build_set_property(COMPILE_DEFINITIONS "BOOTLOADER_BUILD=1" APPEND)
idf_build_set_property(COMPILE_DEFINITIONS "NON_OS_BUILD=1" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-fno-stack-protector" APPEND)
# Set up the bootloader binary generation targets
set(PROJECT_BIN "bootloader.bin")
if(CONFIG_SECURE_BOOT_V2_ENABLED AND CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
set(bootloader_unsigned_bin "bootloader-unsigned.bin")
else()
set(bootloader_unsigned_bin "${PROJECT_BIN}")
endif()
# Set the final binary name as a project property
idf_build_set_property(PROJECT_BIN "${PROJECT_BIN}")
# Generate the unsigned binary from the ELF file.
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
set(binary_target_name "gen_bootloader_binary")
__idf_build_binary("${bootloader_unsigned_bin}" "${binary_target_name}")
else()
# If we are not building binaries, we don't need to create targets that depend on the
# bootloader binary.
return()
endif()
idf_component_get_property(main_args esptool_py FLASH_ARGS)
idf_component_get_property(sub_args esptool_py FLASH_SUB_ARGS)
idf_component_get_property(esptool_py_cmd esptool_py ESPTOOLPY_CMD)
idf_component_get_property(espsecure_py_cmd esptool_py ESPSECUREPY_CMD)
idf_component_get_property(espefuse_py_cmd esptool_py ESPEFUSEPY_CMD)
# String for printing flash command
string(REPLACE ";" " " esptoolpy_write_flash
"${ESPTOOLPY} --port=(PORT) --baud=(BAUD) ${main_args} "
"write_flash ${sub_args}")
"${esptool_py_cmd} --port=(PORT) --baud=(BAUD) ${main_args} "
"write-flash ${sub_args}")
string(REPLACE ";" " " espsecurepy "${ESPSECUREPY}")
string(REPLACE ";" " " espefusepy "${ESPEFUSEPY}")
string(REPLACE ";" " " espsecurepy "${espsecure_py_cmd}")
string(REPLACE ";" " " espefusepy "${espefuse_py_cmd}")
# Suppress warning: "Manually-specified variables were not used by the project: SECURE_BOOT_SIGNING_KEY"
set(ignore_signing_key "${SECURE_BOOT_SIGNING_KEY}")
@@ -105,7 +132,7 @@ if(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
ABSOLUTE BASE_DIR "${CMAKE_BINARY_DIR}")
add_custom_command(OUTPUT "${secure_bootloader_key}"
COMMAND ${ESPSECUREPY} digest_private_key
COMMAND ${espsecure_py_cmd} digest-private-key
--keylen "${key_digest_len}"
--keyfile "${SECURE_BOOT_SIGNING_KEY}"
"${secure_bootloader_key}"
@@ -119,9 +146,9 @@ if(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
"No pre-generated key for a reflashable secure bootloader is available, "
"due to signing configuration."
"\nTo generate one, you can use this command:"
"\n\t${espsecurepy} generate_flash_encryption_key ${secure_bootloader_key}"
"\n\t${espsecurepy} generate-flash-encryption-key ${secure_bootloader_key}"
"\nIf a signing key is present, then instead use:"
"\n\t${espsecurepy} digest_private_key "
"\n\t${espsecurepy} digest-private-key "
"--keylen (192/256) --keyfile KEYFILE "
"${secure_bootloader_key}")
endif()
@@ -130,7 +157,7 @@ if(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
add_custom_command(OUTPUT "${bootloader_digest_bin}"
COMMAND ${CMAKE_COMMAND} -E echo "DIGEST ${bootloader_digest_bin}"
COMMAND ${ESPSECUREPY} digest_secure_bootloader --keyfile "${secure_bootloader_key}"
COMMAND ${espsecure_py_cmd} digest-secure-bootloader --keyfile "${secure_bootloader_key}"
-o "${bootloader_digest_bin}" "${CMAKE_BINARY_DIR}/bootloader.bin"
MAIN_DEPENDENCY "${CMAKE_BINARY_DIR}/.bin_timestamp"
DEPENDS gen_secure_bootloader_key gen_project_binary
@@ -139,43 +166,42 @@ if(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
add_custom_target(gen_bootloader_digest_bin ALL DEPENDS "${bootloader_digest_bin}")
endif()
# If secure boot is enabled, generate the signed binary from the unsigned one.
if(CONFIG_SECURE_BOOT_V2_ENABLED)
if(CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
get_filename_component(secure_boot_signing_key
"${SECURE_BOOT_SIGNING_KEY}" ABSOLUTE BASE_DIR "${project_dir}")
set(signed_target_name "gen_signed_bootloader")
if(NOT EXISTS "${secure_boot_signing_key}")
message(FATAL_ERROR
"Secure Boot Signing Key Not found."
"\nGenerate the Secure Boot V2 RSA-PSS 3072 Key."
"\nTo generate one, you can use this command:"
"\n\t${espsecurepy} generate_signing_key --version 2 ${SECURE_BOOT_SIGNING_KEY}")
if(CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
# The SECURE_BOOT_SIGNING_KEY is passed in from the parent build and
# is already an absolute path.
if(NOT EXISTS "${SECURE_BOOT_SIGNING_KEY}")
message(FATAL_ERROR
"Secure Boot Signing Key Not found."
"\nGenerate the Secure Boot V2 RSA-PSS 3072 Key."
"\nTo generate one, you can use this command:"
"\n\t${espsecurepy} generate-signing-key --version 2 your_key.pem"
)
endif()
set(bootloader_unsigned_bin "bootloader-unsigned.bin")
add_custom_command(OUTPUT ".signed_bin_timestamp"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/${PROJECT_BIN}"
"${CMAKE_BINARY_DIR}/${bootloader_unsigned_bin}"
COMMAND ${ESPSECUREPY} sign_data --version 2 --keyfile "${secure_boot_signing_key}"
-o "${CMAKE_BINARY_DIR}/${PROJECT_BIN}" "${CMAKE_BINARY_DIR}/${bootloader_unsigned_bin}"
COMMAND ${CMAKE_COMMAND} -E echo "Generated signed binary image ${build_dir}/${PROJECT_BIN}"
"from ${CMAKE_BINARY_DIR}/${bootloader_unsigned_bin}"
COMMAND ${CMAKE_COMMAND} -E md5sum "${CMAKE_BINARY_DIR}/${PROJECT_BIN}"
> "${CMAKE_BINARY_DIR}/.signed_bin_timestamp"
DEPENDS "${build_dir}/.bin_timestamp"
VERBATIM
COMMENT "Generated the signed Bootloader")
set(comment "Generated the signed Bootloader")
set(key_arg KEYFILE "${SECURE_BOOT_SIGNING_KEY}")
# Post-build commands should be attached to the signed binary target.
set(post_build_target ${signed_target_name})
else()
add_custom_command(OUTPUT ".signed_bin_timestamp"
VERBATIM
COMMENT "Bootloader generated but not signed")
# If we are not building signed binaries, we don't pass a key.
set(comment "Bootloader generated but not signed")
set(key_arg "")
# Post-build commands should be attached to the unsigned binary target.
set(post_build_target ${binary_target_name})
endif()
add_custom_target(gen_signed_bootloader ALL DEPENDS "${build_dir}/.signed_bin_timestamp")
__idf_build_secure_binary("${bootloader_unsigned_bin}" "${PROJECT_BIN}" "${signed_target_name}"
COMMENT "${comment}"
${key_arg}
)
endif()
if(CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH)
add_custom_command(TARGET bootloader.elf POST_BUILD
add_custom_command(TARGET gen_project_binary POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo
"=============================================================================="
COMMAND ${CMAKE_COMMAND} -E echo
@@ -188,7 +214,7 @@ if(CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH)
"* IMPORTANT: After first boot, BOOTLOADER CANNOT BE RE-FLASHED on same device"
VERBATIM)
elseif(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
add_custom_command(TARGET bootloader.elf POST_BUILD
add_custom_command(TARGET gen_bootloader_digest_bin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo
"=============================================================================="
COMMAND ${CMAKE_COMMAND} -E echo
@@ -198,7 +224,7 @@ elseif(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
COMMAND ${CMAKE_COMMAND} -E echo
"Burn secure boot key to efuse using:"
COMMAND ${CMAKE_COMMAND} -E echo
"\t${espefusepy} burn_key secure_boot_v1 ${secure_bootloader_key}"
"\t${espefusepy} burn-key secure_boot_v1 ${secure_bootloader_key}"
COMMAND ${CMAKE_COMMAND} -E echo
"First time flash command is:"
COMMAND ${CMAKE_COMMAND} -E echo
@@ -215,14 +241,13 @@ elseif(CONFIG_SECURE_BOOTLOADER_REFLASHABLE)
"* After first boot, only re-flashes of this kind (with same key) will be accepted."
COMMAND ${CMAKE_COMMAND} -E echo
"* Not recommended to reuse the same secure boot keyfile on multiple production devices."
DEPENDS gen_secure_bootloader_key gen_bootloader_digest_bin
VERBATIM)
elseif(
CONFIG_SECURE_BOOT_V2_ENABLED AND
(CONFIG_SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS GREATER 1) AND
NOT CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT
)
add_custom_command(TARGET bootloader.elf POST_BUILD
add_custom_command(TARGET ${post_build_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo
"=============================================================================="
COMMAND ${CMAKE_COMMAND} -E echo
@@ -230,28 +255,40 @@ elseif(
COMMAND ${CMAKE_COMMAND} -E echo
"To sign the bootloader with additional private keys."
COMMAND ${CMAKE_COMMAND} -E echo
"\t${espsecurepy} sign_data -k secure_boot_signing_key2.pem -v 2 \
--append_signatures -o signed_bootloader.bin build/bootloader/bootloader.bin"
"\t${espsecurepy} sign-data -k secure_boot_signing_key2.pem -v 2 \
--append-signatures -o signed_bootloader.bin build/bootloader/bootloader.bin"
COMMAND ${CMAKE_COMMAND} -E echo
"Secure boot enabled, so bootloader not flashed automatically."
COMMAND ${CMAKE_COMMAND} -E echo
"\t${esptoolpy_write_flash} ${BOOTLOADER_OFFSET} ${CMAKE_BINARY_DIR}/bootloader.bin"
COMMAND ${CMAKE_COMMAND} -E echo
"=============================================================================="
DEPENDS gen_signed_bootloader
VERBATIM)
elseif(CONFIG_SECURE_BOOT_V2_ENABLED AND NOT CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT)
add_custom_command(TARGET bootloader.elf POST_BUILD
add_custom_command(TARGET ${post_build_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo
"=============================================================================="
COMMAND ${CMAKE_COMMAND} -E echo
"Bootloader built. Secure boot enabled, so bootloader not flashed automatically."
COMMAND ${CMAKE_COMMAND} -E echo
"Secure boot enabled, so bootloader not flashed automatically."
COMMAND ${CMAKE_COMMAND} -E echo
"\t${esptoolpy_write_flash} ${BOOTLOADER_OFFSET} ${CMAKE_BINARY_DIR}/bootloader.bin"
COMMAND ${CMAKE_COMMAND} -E echo
"=============================================================================="
DEPENDS gen_signed_bootloader
VERBATIM)
endif()
# Generate bootloader post-build check of the bootloader size against the offset
partition_table_add_check_bootloader_size_target(bootloader_check_size
DEPENDS gen_project_binary
BOOTLOADER_BINARY_PATH "${CMAKE_BINARY_DIR}/${PROJECT_BIN}"
RESULT bootloader_check_size_command)
add_dependencies(app bootloader_check_size)
if(CONFIG_SECURE_BOOT_V2_ENABLED AND CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES)
# Check the size of the bootloader + signature block.
partition_table_add_check_bootloader_size_target(bootloader_check_size_signed
DEPENDS gen_signed_bootloader
BOOTLOADER_BINARY_PATH "${CMAKE_BINARY_DIR}/${PROJECT_BIN}"
RESULT bootloader_check_size_signed_command)
add_dependencies(app bootloader_check_size_signed)
endif()
@@ -11,7 +11,7 @@
#include "bootloader_common.h"
#include "bootloader_hooks.h"
static const char *TAG = "boot";
ESP_LOG_ATTR_TAG(TAG, "boot");
static int select_partition_number(bootloader_state_t *bs);
static int selected_boot_partition(const bootloader_state_t *bs);
@@ -1,275 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
Linker file used to link the bootloader.
*/
/* Simplified memory map for the bootloader
The main purpose is to make sure the bootloader can load into main memory
without overwriting itself.
*/
MEMORY
{
/* IRAM POOL1, used for APP CPU cache. Bootloader runs from here during the final stage of loading the app because APP CPU is still held in reset, the main app enables APP CPU cache */
iram_loader_seg (RWX) : org = 0x40078000, len = 0x8000 /* 32KB, APP CPU cache */
/* 63kB, IRAM. We skip the first 1k to prevent the entry point being
placed into the same range as exception vectors in the app.
This leads to idf_monitor decoding ROM bootloader "entry 0x40080xxx"
message as one of the exception vectors, which looks scary to users.
*/
iram_seg (RWX) : org = 0x40080400, len = 0xfc00
/* 64k at the end of DRAM, after ROM bootloader stack */
dram_seg (RW) : org = 0x3FFF0000, len = 0x6000
}
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
/* we use either libgcc or compiler-rt, so put similar entries for them here */
*libgcc.a:(.literal .text .literal.* .text.*)
*libclang_rt.builtins.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libesp_common.a:fpga_overrides.*(.literal.bootloader_fill_random .text.bootloader_fill_random)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encryption_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*libesp_rom.a:*.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} >dram_seg
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data : ALIGN(0x10)
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} >dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} >dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
/** This section will be used by the debugger and disassembler to get more information
* about raw data present in the code.
* Indeed, it may be required to add some padding at some points in the code
* in order to align a branch/jump destination on a particular bound.
* Padding these instructions will generate null bytes that shall be
* interpreted as data, and not code by the debugger or disassembler.
* This section will only be present in the ELF file, not in the final binary
* For more details, check GCC-212
*/
.xt.prop 0 :
{
KEEP (*(.xt.prop .xt.prop.* .gnu.linkonce.prop.*))
}
.xt.lit 0 :
{
KEEP (*(.xt.lit .xt.lit.* .gnu.linkonce.p.*))
}
.xtensa.info 0: { *(.xtensa.info) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* This section is not included in the binary image; it is only present in the ELF file.
* It is used to keep certain symbols in the ELF file.
*/
.noload 0 (INFO) :
{
_noload_keep_in_elf_start = ABSOLUTE(.);
KEEP(*(.noload_keep_in_elf .noload_keep_in_elf.*))
_noload_keep_in_elf_end = ABSOLUTE(.);
}
}
@@ -0,0 +1,281 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
/*
Linker file used to link the bootloader.
*/
/* Simplified memory map for the bootloader
The main purpose is to make sure the bootloader can load into main memory
without overwriting itself.
*/
MEMORY
{
/* IRAM POOL1, used for APP CPU cache. Bootloader runs from here during the final stage of loading the app because APP CPU is still held in reset, the main app enables APP CPU cache */
iram_loader_seg (RWX) : org = 0x40078000, len = 0x8000 /* 32KB, APP CPU cache */
/* 63kB, IRAM. We skip the first 1k to prevent the entry point being
placed into the same range as exception vectors in the app.
This leads to idf_monitor decoding ROM bootloader "entry 0x40080xxx"
message as one of the exception vectors, which looks scary to users.
*/
iram_seg (RWX) : org = 0x40080400, len = 0xfc00
/* 64k at the end of DRAM, after ROM bootloader stack */
dram_seg (RW) : org = 0x3FFF0000, len = 0x6000
}
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
/* we use either libgcc or compiler-rt, so put similar entries for them here */
*libgcc.a:(.literal .text .literal.* .text.*)
*libclang_rt.builtins.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libesp_common.a:fpga_overrides.*(.literal.bootloader_fill_random .text.bootloader_fill_random)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encryption_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*libesp_rom.a:*.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} >dram_seg
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data : ALIGN(0x10)
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} >dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} >dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
/** This section will be used by the debugger and disassembler to get more information
* about raw data present in the code.
* Indeed, it may be required to add some padding at some points in the code
* in order to align a branch/jump destination on a particular bound.
* Padding these instructions will generate null bytes that shall be
* interpreted as data, and not code by the debugger or disassembler.
* This section will only be present in the ELF file, not in the final binary
* For more details, check GCC-212
*/
.xt.prop 0 :
{
KEEP (*(.xt.prop .xt.prop.* .gnu.linkonce.prop.*))
}
.xt.lit 0 :
{
KEEP (*(.xt.lit .xt.lit.* .gnu.linkonce.p.*))
}
.xtensa.info 0: { *(.xtensa.info) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* This section is not included in the binary image; it is only present in the ELF file.
* It is used to keep certain symbols in the ELF file.
*/
.noload 0 (INFO) :
{
/* Reserve first 4 bytes as zero for vars pointed to NULL */
. = 0;
LONG(0);
_noload_keep_in_elf_start = ABSOLUTE(.);
KEEP(*(.noload_keep_in_elf .noload_keep_in_elf.*))
_noload_keep_in_elf_end = ABSOLUTE(.);
}
}
@@ -1,321 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
*
* ESP32-C2 ROM static data usage is as follows:
* - 0x3fccb264 - 0x3fcdcb70: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdcb70 - 0x3fcdeb70: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcdeb70 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fcdcb70).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x6e0000;
/* We consider 0x3fcdcb70 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdcb70;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2800;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update (SRAM_DRAM_END + I_D_SRAM_OFFSET) in components/esp_system/ld/esp32c2/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x403aeb70, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
/* we use either libgcc or compiler-rt, so put similar entries for them here */
*libgcc.a:(.literal .text .literal.* .text.*)
*libclang_rt.builtins.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encryption_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*libriscv.a:rv_utils.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} > dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} > dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
/**
* This section is not included in the binary image; it is only present in the ELF file.
* It is used to keep certain symbols in the ELF file.
*/
.noload 0 (INFO) :
{
_noload_keep_in_elf_start = ABSOLUTE(.);
KEEP(*(.noload_keep_in_elf .noload_keep_in_elf.*))
_noload_keep_in_elf_end = ABSOLUTE(.);
}
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* 0x3fccb264 ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdcb70 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcdeb70 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdf4bc ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdfa70 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdfa74 ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/
@@ -0,0 +1,327 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
*
* ESP32-C2 ROM static data usage is as follows:
* - 0x3fccb264 - 0x3fcdcb70: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdcb70 - 0x3fcdeb70: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcdeb70 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fcdcb70).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x6e0000;
/* We consider 0x3fcdcb70 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdcb70;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2800;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update (SRAM_DRAM_END + I_D_SRAM_OFFSET) in components/esp_system/ld/esp32c2/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x403aeb70, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
/* we use either libgcc or compiler-rt, so put similar entries for them here */
*libgcc.a:(.literal .text .literal.* .text.*)
*libclang_rt.builtins.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encryption_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*libriscv.a:rv_utils.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} > dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} > dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
/**
* This section is not included in the binary image; it is only present in the ELF file.
* It is used to keep certain symbols in the ELF file.
*/
.noload 0 (INFO) :
{
/* Reserve first 4 bytes as zero for vars pointed to NULL */
. = 0;
LONG(0);
_noload_keep_in_elf_start = ABSOLUTE(.);
KEEP(*(.noload_keep_in_elf .noload_keep_in_elf.*))
_noload_keep_in_elf_end = ABSOLUTE(.);
}
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* 0x3fccb264 ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdcb70 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcdeb70 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdf4bc ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdfa70 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdfa74 ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/
@@ -1,322 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
*
* ESP32-C3 ROM static data usage is as follows:
* - 0x3fccae00 - 0x3fcdc710: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdc710 - 0x3fcde710: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcde710 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fcdc710).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x700000;
/* We consider 0x3fcdc710 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdc710;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2800;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update (SRAM_DRAM_END + I_D_SRAM_OFFSET) in components/esp_system/ld/esp32c3/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x403ce710, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
/* we use either libgcc or compiler-rt, so put similar entries for them here */
*libgcc.a:(.literal .text .literal.* .text.*)
*libclang_rt.builtins.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encryption_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*libriscv.a:rv_utils.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} > dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} > dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
/**
* This section is not included in the binary image; it is only present in the ELF file.
* It is used to keep certain symbols in the ELF file.
*/
.noload 0 (INFO) :
{
_noload_keep_in_elf_start = ABSOLUTE(.);
KEEP(*(.noload_keep_in_elf .noload_keep_in_elf.*))
_noload_keep_in_elf_end = ABSOLUTE(.);
}
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* 0x3fccae00 ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdc710 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcde710 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdf060 ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdf664 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdf830 ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/
@@ -0,0 +1,328 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
*
* ESP32-C3 ROM static data usage is as follows:
* - 0x3fccae00 - 0x3fcdc710: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdc710 - 0x3fcde710: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcde710 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fcdc710).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x700000;
/* We consider 0x3fcdc710 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdc710;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2800;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update (SRAM_DRAM_END + I_D_SRAM_OFFSET) in components/esp_system/ld/esp32c3/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x403ce710, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
/* we use either libgcc or compiler-rt, so put similar entries for them here */
*libgcc.a:(.literal .text .literal.* .text.*)
*libclang_rt.builtins.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encryption_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hal_wdt.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*libriscv.a:rv_utils.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} > dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} > dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
/**
* This section is not included in the binary image; it is only present in the ELF file.
* It is used to keep certain symbols in the ELF file.
*/
.noload 0 (INFO) :
{
/* Reserve first 4 bytes as zero for vars pointed to NULL */
. = 0;
LONG(0);
_noload_keep_in_elf_start = ABSOLUTE(.);
KEEP(*(.noload_keep_in_elf .noload_keep_in_elf.*))
_noload_keep_in_elf_end = ABSOLUTE(.);
}
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* 0x3fccae00 ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdc710 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcde710 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdf060 ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdf664 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdf830 ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/
@@ -1,320 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
*
* ESP32-C5 ROM static data usage is as follows:
* - 0x4084e5a0 - 0x4085c5a0: Shared buffers, used in UART/USB/SPI download mode only
* - 0x4085c5a0 - 0x4085e5a0: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x4085e5a0 - 0x40860000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x4085c5a0).
*/
/* We consider 0x4085c5a0 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x4085c5a0;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2A00;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* The app may use RAM for static allocations up to the start of iram_loader_seg.
* If you have changed something above and this assert fails:
* 1. Check what the new value of bootloader_iram_loader_seg start is.
* 2. Update the value in this assert.
* 3. Update SRAM_DRAM_END in components/esp_system/ld/esp32c5/memory.ld.in to the same value.
*/
ASSERT(bootloader_iram_loader_seg_start == 0x4084e5a0, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
/* we use either libgcc or compiler-rt, so put similar entries for them here */
*libgcc.a:(.literal .text .literal.* .text.*)
*libclang_rt.builtins.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_enable .text.bootloader_random_enable)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encryption_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_secure_features.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*libriscv.a:rv_utils.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.bootdesc : ALIGN(0x10)
{
_data_start = ABSOLUTE(.);
*(.data_bootloader_desc .data_bootloader_desc.*) /* Should be the first. Bootloader version info. DO NOT PUT ANYTHING BEFORE IT! */
} > dram_seg
.dram0.data :
{
*(.dram1 .dram1.*) /* catch stray DRAM_ATTR */
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} > dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame_hdr)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} > dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
.riscv.attributes 0: { *(.riscv.attributes) }
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
/* DWARF 3 */
.debug_ranges 0 : { *(.debug_ranges) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* GNU DWARF 2 extensions */
.debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) }
.debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) }
/* DWARF 4 */
.debug_types 0 : { *(.debug_types) }
/* DWARF 5 */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.comment 0 : { *(.comment) }
.note.GNU-stack 0: { *(.note.GNU-stack) }
/**
* Discarding .rela.* sections results in the following mapping:
* .rela.text.* -> .text.*
* .rela.data.* -> .data.*
* And so forth...
*/
/DISCARD/ : { *(.rela.*) }
/**
* This section is not included in the binary image; it is only present in the ELF file.
* It is used to keep certain symbols in the ELF file.
*/
.noload 0 (INFO) :
{
_noload_keep_in_elf_start = ABSOLUTE(.);
KEEP(*(.noload_keep_in_elf .noload_keep_in_elf.*))
_noload_keep_in_elf_end = ABSOLUTE(.);
}
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* 0x4084e5a0 ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x4085c5a0 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x4085e5a0 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x4085f4f8 ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x4085fbb4 ------------------> _dram0_rtos_reserved_end
* | |
* 0x4085fc60 ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x40860000 ------------------> _data_end_interface
*/

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