Commit Graph

7443 Commits

Author SHA1 Message Date
Zhou Xiao
14a82b0872 feat(ble): add BLE UART bridge core 2026-05-08 11:40:14 +08:00
Jiang Jiang Jian
3d2c10aaf3 Merge branch 'feat/coredump_rtc_noinit_v6.0' into 'release/v6.0'
Add a new attribute COREDUMP_NOINIT_ATTR (v6.0)

See merge request espressif/esp-idf!45054
2026-05-06 10:19:37 +08:00
sonika.rathi
9dc6ec1eb3 fix(fatfsgen): stabilize host read-flash after UART close in pytest 2026-04-30 14:36:21 +02:00
Roland Dobai
11bc5423c9 Merge branch 'feat/cmakev2_bootloader_v6.0' into 'release/v6.0'
feat(cmakev2): build bootloader using the cmakev2 build system (v6.0)

See merge request espressif/esp-idf!47903
2026-04-28 08:53:53 +02:00
Island
791b3de2ed Merge branch 'feat/support_ble_uart_service_v6.0' into 'release/v6.0'
Feat/support ble uart service (6.0)

See merge request espressif/esp-idf!48000
2026-04-28 13:26:39 +08:00
Island
6cf5b5f67f Merge branch 'dev/ble-log-202603_v6.0' into 'release/v6.0'
dev: BLE Log 202603 (6.0)

See merge request espressif/esp-idf!47277
2026-04-28 13:25:12 +08:00
Zhou Xiao
ad62778bc0 fix(ble): fixed ci failures for backport 2026-04-28 12:57:14 +08:00
Zhou Xiao
5a9bb3c7ca feat(ble): add BLE UART daemon notify API 2026-04-28 11:12:10 +08:00
Zhou Xiao
a1708452ec docs(ble): document BLE UART bridge usage 2026-04-28 11:12:10 +08:00
Zhou Xiao
c6de8e7dff feat(ble): wire BLE UART bridge CLI 2026-04-28 11:12:10 +08:00
Zhou Xiao
be95b3fc73 feat(ble): add BLE UART daemon RPC API 2026-04-28 11:12:10 +08:00
Zhou Xiao
29dc646b21 feat(ble): add BLE UART bridge console 2026-04-28 11:12:10 +08:00
Marius Vikhammer
dcb68bf51a Merge branch 'ci/panic_tests_p4_s31_v6.0' into 'release/v6.0'
test(system): enable panic tests for P4 and S31 (v6.0)

See merge request espressif/esp-idf!47461
2026-04-28 09:02:20 +08:00
Roland Dobai
75f99323b5 Merge branch 'feat/extenral_components_from_valid_sources_v6.0' into 'release/v6.0'
feat(tools): Restrict loading extension components to trusted sources (v6.0)

See merge request espressif/esp-idf!47668
2026-04-27 17:45:33 +02:00
Frantisek Hrbata
c6db3d1d07 fix(cmakev2/project): guard compiler optimization flags with build property
The __init_project_configuration() function in cmakev2's project.cmake
unconditionally applied app-level compiler optimization flags based on
CONFIG_COMPILER_OPTIMIZATION_* Kconfig options. When the bootloader
subproject was built with cmakev2, these app-level flags leaked into the
bootloader compile command alongside the correct bootloader-specific
flags from CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_*.

For example, with the default configuration (app: DEBUG, bootloader:
SIZE), the bootloader received both "-Og -fno-shrink-wrap" (from app
config) and "-Os -freorder-blocks" (from bootloader config). While GCC
uses the last -O flag (-Os wins), the stray -fno-shrink-wrap persisted.

Introduce a SET_COMPILER_OPTIMIZATION build property that defaults to
YES when unset. Subprojects that manage their own optimization flags
(like the bootloader) can set this to NO before calling
idf_project_init() to prevent the default optimization flags from being
applied. This keeps project.cmake generic without requiring it to know
about specific subproject types.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
32eacbf0e3 fix(cmakev2/project): initialize idf_path for macro prefix map
The idf_path variable was used in -fmacro-prefix-map and
-fdebug-prefix-map flags but never read from the IDF_PATH build
property, resulting in an empty substitution. This caused full
filesystem paths to leak into .rodata instead of being mapped to /IDF.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
cfc60dba16 fix(cmakev2/utilities): resolve embed file path in idf_component_include
Commit f62f45cf5c changed target_add_binary_data to resolve the
embedded file path relative to the component directory by using
idf_component_get_property to obtain the COMPONENT_DIR. This fixed the
path resolution when target_add_binary_data is called from
idf_component_include, which runs outside the component's directory
context.

However, target_add_binary_data can also be called directly from a
project's CMakeLists.txt with a non-component target, e.g.
target_add_binary_data(app.elf ...) as done in
examples/security/security_features_app. In this case,
idf_component_get_property fails because the target is not a component.

Fix this by moving the path resolution to idf_component_include, where
the embed file paths from EMBED_FILES and EMBED_TXTFILES component
properties are resolved to absolute paths relative to COMPONENT_DIR
before being passed to target_add_binary_data. This way,
target_add_binary_data receives already absolute paths from
idf_component_include and can use plain get_filename_component(ABSOLUTE)
for direct calls, which correctly resolves relative to
CMAKE_CURRENT_SOURCE_DIR.

Fixes: f62f45cf5c ("fix(cmakev2/utilities): add a dependency target for the embedded file")

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
792f0975dd feat(cmakev2/kconfig): add GENERATE_SDKCONFIG build property
Add a GENERATE_SDKCONFIG build property that controls whether kconfgen
writes the sdkconfig file (--output config) during the configuration
step. It defaults to 1 (enabled).

When building the bootloader as a subproject, the set of components
(and their Kconfig files) differs from the main project. Running
kconfgen with --output config in this context rewrites the main
project's sdkconfig. Even when the content is identical, the timestamp
update causes ninja to detect sdkconfig as newer than build.ninja
outputs (e.g. cmake_install.cmake), triggering an infinite CMake
re-run loop.

Setting GENERATE_SDKCONFIG to 0 in a subproject prevents this,
matching the behaviour of cmakev1's __OUTPUT_SDKCONFIG property.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
1c6414f21d feat(cmakev2/idf): add PROJECT_COMPONENTS_SOURCE build property
Add the PROJECT_COMPONENTS_SOURCE build property to control how project
components are categorised during component discovery.  By default it is
set to "project_components" (priority 3 - highest), preserving the
existing behaviour.

Setting it to "idf_components" (priority 0) before calling
idf_project_init() makes the project's built-in components overridable
by user-supplied components through EXTRA_COMPONENT_DIRS (priority 2).

This is needed for sub-projects like the bootloader, whose built-in
components (e.g. main) are provided by ESP-IDF and should be overridable
by user-supplied components placed in bootloader_components/.  The
cmakev1 build system allowed this override because it used a
last-one-wins strategy, but cmakev2 uses strict priority-based component
resolution where project_components always win.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
d8fcec199e feat(cmakev2/build): add ALL option to idf_build_binary and idf_sign_binary
Add an optional ALL parameter to idf_build_binary and idf_sign_binary
functions. When specified, the created custom target is included in the
default build target. Without ALL, custom targets created by these
functions are excluded from the default build (add_custom_target
behavior), meaning they won't be built unless explicitly requested or
depended upon by another target in ALL.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
a0b0ee562a feat(cmakev2/utilities): add idf_target_post_build_msg helper
Add a helper function for printing multi-line post-build messages on a
target. The message lines are joined with newlines, written to a file at
configure time, and printed at build time using a single cmake -E cat
command, replacing the need for repeated cmake -E echo invocations.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
de156c9e5a feat(cmakev2/build): add idf_check_bootloader_size helper
Add a public API function to check that the bootloader binary does not
overlap the partition table, mirroring the existing idf_check_binary_size
pattern for application binaries.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
394b881708 fix(cmakev2/build): fix typo in idf_sign_binary keyfile variable
The KEYFILE argument value was stored in a misspelled variable
"keyfle" instead of "keyfile", causing custom keyfile paths to
be silently ignored.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
4185a9fed2 feat(cmakev2/compat): allow to set commonly required components
The commonly required components are configured solely for backward
compatibility with cmakev1. Since the bootloader build explicitly sets
commonly required components, we need to support this feature in cmakev2
as well. Ideally, there should be no commonly required components, and
each component should specify its requirements explicitly.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Roland Dobai
03aff7a53f Merge branch 'test/fix_cmakev2_import_lib_v6.0' into 'release/v6.0'
fix(cmakev2): propagate IDF_TOOLCHAIN selection to sdkconfig generation (v6.0)

See merge request espressif/esp-idf!47747
2026-04-27 16:06:04 +02:00
Roland Dobai
efb0ad6d05 Merge branch 'fix/cmake_quotations_v6.0' into 'release/v6.0'
Build & config: Quote variable references in conditional expressions (v6.0)

See merge request espressif/esp-idf!47738
2026-04-27 16:05:49 +02:00
Marek Fiala
46cc126c50 feat(tools): Restrict loading extension components to trusted sources 2026-04-27 22:04:34 +08:00
Roland Dobai
997b9e82ef Merge branch 'fix/add-promptless-allowlist_v6.0' into 'release/v6.0'
fix(kconfig): Add KCONFIG_PROMPTLESS_NO_WARN to config.env.in (v6.0)

See merge request espressif/esp-idf!47916
2026-04-27 16:03:45 +02:00
Mahavir Jain
bd42cb2bde Merge branch 'fix/fix_esp_local_ctrl_potential_double_free_v6.0' into 'release/v6.0'
fix(esp_local_ctrl): fixes a potential double free (v6.0)

See merge request espressif/esp-idf!47488
2026-04-27 19:26:05 +05:30
Euripedes Rocha
c10c02297f Merge branch 'fix/remove_asio_v6.0' into 'release/v6.0'
fix(configs): Remove mentions of ASIO from configs files (v6.0)

See merge request espressif/esp-idf!47644
2026-04-27 15:52:03 +02:00
Fu Hanxi
73a66e0f4a Merge branch 'ci/fix-exclude-dir-check-build-test-rules_v6.0' into 'release/v6.0'
ci: fix check-build-test-rules exclude-dir (v6.0)

See merge request espressif/esp-idf!47087
2026-04-27 15:32:41 +02:00
Fu Hanxi
3132b2edb1 Merge branch 'ci/eco-to-rev_v6.0' into 'release/v6.0'
ci: rename eco tags to revision (v6.0)

See merge request espressif/esp-idf!47085
2026-04-27 15:31:16 +02:00
Jan Beran
645aa9735c fix(kconfig): add KCONFIG_PROMPTLESS_NO_WARN to config.env.in
Some config options, like IDF_TARGET, are present in
sdkconfig.defaults even though they are promptless. The build system
handles them manually and passes them to esp-idf-kconfig via
config.env. However, esp-idf-kconfig reports them like a normal
promptless symbol, which causes confusion.

This commit adds KCONFIG_PROMPTLESS_NO_WARN — a semicolon-separated
list of config option names that, even though promptless, should be
excluded from the report.

Closes https://github.com/espressif/esp-idf/issues/18441
2026-04-24 09:17:51 +02:00
Ivan Grokhotkov
8c19b15608 change(version): Update version to 6.0.1 2026-04-22 22:54:06 +08:00
Roland Dobai
7aef45a869 fix(cmake): quote variable references in conditional expressions
Closes https://github.com/espressif/esp-idf/issues/18445
2026-04-20 17:22:54 +08:00
Sudeep Mohanty
0b6d4ce6be test(cmakev2): verify IDF_TOOLCHAIN is propagated to sdkconfig
Add a buildv2 test that reconfigures the test app with both GCC and
clang toolchains and asserts that the selected IDF_TOOLCHAIN value
is propagated to sdkconfig. The clang case is skipped when a clang
compiler is not available in PATH.
2026-04-17 15:38:25 +02:00
Sudeep Mohanty
d9d9d66227 fix(cmakev2): propagate IDF_TOOLCHAIN selection to sdkconfig generation
In the cmakev2 build framework, the selected toolchain was not
consistently propagated to sdkconfig generation. For clang builds,
this produced a configuration that was incompatible with the clang
toolchain and broke compilation.

Ensure the toolchain selection is observed consistently so sdkconfig
and component configuration reflect the intended toolchain for both
GCC and clang builds.

Made-with: Cursor
2026-04-17 15:35:30 +02:00
David Cermak
c69fb1bfe4 fix(configs): Remove mentions of ASIO from configs files 2026-04-17 16:14:53 +08:00
Erhan Kurubas
09831a5911 feat(coredump): add coredump_noinit attribute 2026-04-13 17:41:31 +08:00
Ashish Sharma
28775ac4f6 fix(esp_local_ctrl): fixes a potential double free 2026-04-12 18:18:22 +08:00
Marius Vikhammer
ffb4b70b18 test(system): enable panic tests for P4 2026-04-10 15:38:18 +08:00
Fu Hanxi
ad1d17a794 ci: rename eco tags to revision 2026-04-09 10:43:34 +02:00
Zhou Xiao
03a54ef8f9 fix(ble_log_console): exclude from idf-ci pytest collection to fix CI
idf-ci discovers pyproject.toml pytest config and runs a separate
collection pass with --target all, which finds 0 target tests and
raises RuntimeError. Add to .idf_ci.toml exclude_dirs instead of
deleting tests. Restore all 227 unit tests with lint/mypy fixes.


(cherry picked from commit 205bc49fd6)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:15:00 +08:00
Zhou Xiao
424262d916 docs(ble_log_console): update user guides for new features and run/build scripts
- Recommend run.sh/run.bat as primary launch method with Launch Screen description
- Add build.sh/build.bat section for standalone executable packaging
- Document buffer utilization screen (m key) and two-table stats layout (d key)
- Update menuconfig path, status panel format, and Kconfig option names
- Remove obsolete textual ModuleNotFoundError troubleshooting
- Simplify manual configuration to single toggle (defaults cover most cases)
- Fix ESP32 -> ESP chip in introduction


(cherry picked from commit 391f7b7d8a)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:54 +08:00
Zhou Xiao
4033fceed5 feat(ble_log_console): add buffer utilization tracker and display
Add BufUtilTracker to record per-LBM inflight peak data, wire it
through StatsAccumulator and StatsUpdated message for thread-safe
delivery to the UI. Buffer utilization is displayed in a dedicated
BufUtilScreen accessible via the 'm' keybinding, separate from
the frame stats screen ('d').

Also reject false INIT_DONE frames with version==0 caused by
misaligned data during parser sync, preventing spurious stats resets.


(cherry picked from commit ca920a8e8f)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:53 +08:00
Zhou Xiao
e3dc63eff0 feat(ble_log_console): add BUF_UTIL internal frame decoding
Add BUF_UTIL=5 to InternalSource, BufUtilPool enum, BufUtilResult
TypedDict, BufUtilEntry dataclass, and name resolution helpers.
Add decode branch in internal_decoder with pool/index extraction
from the packed lbm_id field. Tests cover valid decode, pool/index
extraction, and truncated payload handling.


(cherry picked from commit d9a4d15203)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:47 +08:00
Zhou Xiao
9a78222735 feat(ble_log_console): add CLI entry point, build scripts, and docs
- Click-based CLI entry point (console.py) with --port, --baudrate,
  --log-dir options and interactive Launch Screen when --port omitted
- Deprecation warning for --output CLI flag
- 'ls' subcommand to list saved capture files
- PyInstaller build scripts (build.sh, build.bat, build_exe.py)
- Convenience run scripts (run.sh, run.bat)
- README rewrite with installation, usage, architecture docs, and
  troubleshooting guide
- User guides in English and Chinese
- Remove old single-file ble_log_console.py
- Register new scripts in executable-list.txt


(cherry picked from commit a51d879d1b)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:46 +08:00
Zhou Xiao
641cc41fbe feat(ble_log_console): add Textual frontend and app wiring
TUI frontend built on Textual with thread-safe backend integration:

- Launch screen with port/baud/log-dir selection and auto-refresh
- Log view with scrollable RichLog and color-coded write methods;
  Rich markup escaped to prevent crash on bracket characters
- Stats screen split into two tables by time base:
  - Firmware Counters (since chip init): Written and Buffer Loss
  - Console Measurements (since console start): Average Throughput
    and Peak Write — each with separate frames and bytes sub-columns
  - Column widths constrained with min_width/max_width for stable layout
  - Division-by-zero guard when peak window is zero
- Shortcut screen overlay
- Status panel with sync state, checksum mode, and transport metrics;
  speed display uses named UART_BITS_PER_BYTE constant
- Main app wiring: UART reader thread with threading.Lock for serial
  access, frame parser pipeline, stats emission via StatsUpdated
  messages (including funnel snapshots via public accessor for
  thread-safe delivery), BackendStopped message for disconnect
- BackendStopped posted on open_serial failure (prevents stuck status)
- Select.BLANK guard for baud rate in launch screen
- Explicit None guards replace asserts in backend worker
- Wall-clock burst tracking for REDIR frames (no chip-side timestamp)
- SN gap alerts (FrameLossDetected) and traffic spike notifications


(cherry picked from commit 02f1960e56)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:46 +08:00
Zhou Xiao
613ad16948 feat(ble_log_console): add backend with frame parser, stats, and data models
Modular backend for the BLE log console rewrite:

- Frame parser with sync state machine and checksum auto-detection
  (4 modes: XOR/Sum x Full/Header-only); handles incomplete frames
  during re-sync search when previously synced
- Internal frame decoder (INIT_DONE, ENH_STAT, FLUSH, INFO)
- Data models: SourceCode, FrameByteCount, FunnelSnapshot, LossType
- Stats package with composition-root StatsAccumulator orchestrating:
  - TransportMetrics (RX bytes, lifetime-average throughput)
  - FirmwareLossTracker / FirmwareWrittenTracker (ENH_STAT deltas
    with first-report absolute value initialization)
  - SNGapTracker (sliding window reorder-tolerant SN gap detection)
  - PeakBurstTracker (per-source sliding window burst density)
  - TrafficSpikeDetector (wire utilization spike detection)
  - Wall-clock burst tracker for non-timestamped sources (REDIR)
- Torn-read guard on ENH_STAT reports (baudrate-based plausibility)
  with prev-state update on discard to prevent cascading drops
- Console-local metrics (TransportMetrics, PeakBurstTracker) preserved
  across INIT_DONE resets; only ENH_STAT-coupled components reset
- UART transport with port validation and exclusive serial access
- Comprehensive test suite (17 test files, 223 tests)


(cherry picked from commit 9046c77e52)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:45 +08:00
Zhou Xiao
94761261f2 change(bt/ble_log): remove BLE Log UHCI Out module
Delete ble_log_uhci_out.c and its header. Remove the UHCI Out source
from CMakeLists.txt and all BT_BLE_LOG_UHCI_OUT_* Kconfig options.
Remove per-chip BT_LE_CONTROLLER_LOG_UHCI_OUT_ENABLED Kconfig and
all UHCI Out caller references in esp32c5/c6/h2 controller bt.c.
Update ble_log_console README to reference the new BLE Log Module
UART DMA config. The functionality is superseded by the BLE Log
Module's UART DMA peripheral transport.


(cherry picked from commit d51892380b)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:38 +08:00