Commit Graph

6033 Commits

Author SHA1 Message Date
Zhou Xiao
81782243ab fix(ble_log_console): reorder imports to satisfy pre-commit hook 2026-04-07 16:13:44 +08:00
Zhou Xiao
ffd7a6c649 fix(ble_log_console): resolve mypy errors for Python <3.10 compatibility
Add 'from __future__ import annotations' to defer annotation evaluation,
replace @dataclass(slots=True) with @dataclass, use typing.Union for
runtime type aliases, and suppress textual Screen metaclass false positive.
2026-04-07 16:07:59 +08:00
Zhou Xiao
24a45a173f 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.
2026-04-07 13:15:03 +08:00
Zhou Xiao
4fa42eace1 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
2026-04-07 13:13:43 +08:00
Zhou Xiao
845c9ea1a0 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.
2026-04-07 13:12:57 +08:00
Zhou Xiao
79155a609a 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.
2026-04-07 13:12:52 +08:00
Zhou Xiao
d8f61a563e 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
2026-04-07 13:12:26 +08:00
Zhou Xiao
5a20def4ea 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
2026-04-07 13:10:45 +08:00
Zhou Xiao
74420e1762 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)
2026-04-07 13:10:41 +08:00
luoxu
1e31cc4b9d remove(ble_mesh): deprecate the tinycrypt library within the Bluetooth Mesh component 2026-03-31 00:06:16 +08:00
Alexey Gerenkov
b5e3dfd9f9 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20260304_v5.3' into 'release/v5.3'
feat(tools): update openocd version to v0.12.0-esp32-20260304 (v5.3)

See merge request espressif/esp-idf!46366
2026-03-24 23:00:34 +08:00
Xiao Xufeng
0c45a102a9 change(version): Update version to 5.3.5 2026-03-21 19:10:47 +08:00
Erhan Kurubas
db99a1df0f feat(tools): update openocd version to v0.12.0-esp32-20260304 2026-03-16 16:00:05 +08:00
Alexey Gerenkov
30961f57a4 Merge branch 'fix/coredump_test_tcb_corrupted_v5.3' into 'release/v5.3'
test(espcoredump): fix test for corrupted TCB handling in coredump (v5.3)

See merge request espressif/esp-idf!45329
2026-02-05 18:37:01 +08:00
Erhan Kurubas
0bfd92877f test(panic): add retry logic to espcoredump subprocess call 2026-01-21 08:33:47 +03:00
Erhan Kurubas
b95bbc34c3 test(espcoredump): fix test for corrupted TCB handling in coredump 2026-01-21 08:12:02 +03:00
Erhan Kurubas
ea36d9b437 test(panic): improve stack dump capture to return full hex content 2026-01-21 08:10:04 +03:00
Ferdinand Bachmann
13dc32328c fix(cmake): Fix "IMPORTED_LOCATION not set for imported target" errors
esp-idf uses imported targets as dummy targets that are never linked.
Previous CMake versions would ignore these and not error on unset
IMPORTED_LOCATION if they are never actually linked. CMake 4.2 and newer
errors during codemodel-v2 api queries when imported targets are missing
IMPORTED_LOCATION, so set a dummy location that would error when
actually linked, which fixes the error during api queries.

Closes https://github.com/espressif/esp-idf/pull/18103
2026-01-16 12:11:49 +01:00
Frantisek Hrbata
59754c4792 fix(ldgen): correctly place symbols generated by compiler during IPA
As part of inter-procedural optimizations (IPA), the compiler may
perform tasks such as constant propagation for functions. This involves
generating a specialized version of a given function with a new symbol
name that includes a suffix. For example, during constant propagation,
the compiler might create a specialized version named
`spiflash_start_core.constprop.0` for the `spiflash_start_core`
function. Additionally, the compiler may generate multiple clones of a
single function. Currently, when ldgen performs symbol placement, it
does not account for these compiler-generated functions, leading to
their incorrect or unexpected placement in memory (markers).

Consider a linker fragment with:

```
[mapping:spi_flash]
archive: libspi_flash.a
entries:
    esp_flash_api: spiflash_start_core (noflash)
```

The `spiflash_start_core` function should be placed in IRAM. However,
the compiler might generate an optimized version of this function with a
`.constprop.0` suffix, resulting in a
`.text.spiflash_start_core.constprop.0` input section. Currently, ldgen
does not handle this situation, leading to misplaced symbols.

Since `.` is not allowed in C identifiers, it should be safe to consider
all input sections for a symbol with any `.` suffix as representing that
symbol. This means considering the symbol suffixes should not cause any
ambiguity.

This change automatically places all input sections, including those
with possible suffixes for a given symbol, into the specified memory. In
other words, specifying a function name like `spiflash_start_core` in a
linker fragment automatically includes input section names matching
`spiflash_start_core(\..*)?$`.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-01-14 13:23:00 +01:00
Erhan Kurubas
b3df5517be feat(tools): update openocd version to v0.12.0-esp32-20251215 2025-12-18 00:20:31 +08:00
Jan Beran
0d23a33678 fix: set sufficient buffer limit for idf.py confserver 2025-12-16 12:11:05 +01:00
Chen Yudong
164cfba69d ci: rename wifi_two_dut to two_duts 2025-12-03 12:34:10 +08:00
Marek Fiala
8643ac198c feat(tools): Updated ccache 4.11.2 -> 4.12.1
Closes https://github.com/espressif/esp-idf/issues/17756
2025-11-28 15:18:17 +08:00
Marek Fiala
2b36597791 refactor(tools): test_idf_tools.py ruff changes 2025-11-28 15:18:17 +08:00
igor.udot
8bcb91e5f0 ci: pytest-ignore skip using dut id 2025-11-24 10:16:10 +08:00
igor.udot
8aa27f437f ci: extend wildcard support for no_runner_tags 2025-11-04 15:11:29 +08:00
armando
c1d671c8c6 change(ci): temporarily disable p4 target test 2025-11-04 15:11:29 +08:00
Jan Beran
77126ab37b fix(kconfig.cmake): Do not regenerate unnecessary config files 2025-10-20 18:17:22 +08:00
Island
38456c8e87 Merge branch 'feat/ble_log_v2_with_log_compression_v5.3' into 'release/v5.3'
Feat/ble log v2 with log compression (v5.3)

See merge request espressif/esp-idf!41897
2025-10-16 11:34:58 +08:00
luoxu
2fc48b871b feat(ble): add libraries related to ble log compression 2025-10-15 16:55:11 +08:00
Rahul Tank
f7d0a08341 fix(nimble): Added CS service support 2025-10-14 16:43:06 +05:30
Marius Vikhammer
c0535db9c0 Merge branch 'ci/fix-windows-test-download-map-prefix_v5.3' into 'release/v5.3'
ci: fix windows test jobs download source (v5.3)

See merge request espressif/esp-idf!42364
2025-10-13 15:04:17 +08:00
Fu Hanxi
86712b0808 ci: use merged result commit in build_docker job
also change to shanghai runners
2025-10-10 09:27:56 +02:00
Marek Fiala
56e7a118b6 fix(tools): fix failing create readonly project build system test
Changed the way of removing copied esp-idf folder.
2025-10-09 13:33:11 +02:00
Jiang Jiang Jian
2cbf741a09 Merge branch 'fix/panic_handler_reboot_before_halt_v5.3' into 'release/v5.3'
fix(panic_handler): Fixed a issue where the system reboots before halt (v5.3)

See merge request espressif/esp-idf!41268
2025-09-28 17:47:23 +08:00
Alexey Lapshin
e6c62b930b feat(tools): update gdb version to 16.3_20250913 2025-09-17 16:24:56 +07:00
Fu Hanxi
879494b7ac fix: make sure sdkconfig.json is updated after running the menuconfig 2025-09-01 09:43:10 +02:00
Fu Hanxi
c16fd0da03 fix: kconfig optional dependency in transitive dependency 2025-09-01 09:43:10 +02:00
Fu Hanxi
d595ea9b2b feat: support kconfig in component manager 2025-09-01 09:43:09 +02:00
Alexey Gerenkov
104b7994e2 Merge branch 'feature/update-toolchain-to-esp-13.2.0_20250707' into 'release/v5.3'
feat(tools): update toolchain version to esp-13.2.0_20250707

See merge request espressif/esp-idf!40418
2025-08-25 22:52:43 +08:00
Rahul Tank
4d690841d5 fix(nimble): Minor documentation update in btsnoop script usage 2025-08-24 10:02:11 +05:30
Rahul Tank
6fd5a3d3db Merge branch 'bugfix/add_old_btsnoop_hci_py_v5.3' into 'release/v5.3'
fix(nimble): Updated parser script for HCI log creation (v5.3)

See merge request espressif/esp-idf!40729
2025-08-22 14:25:10 +05:30
Alexey Lapshin
8b40fa896f feat(tools): update toolchain version to esp-13.2.0_20250707 2025-08-21 19:04:26 +08:00
Alexey Gerenkov
09e206f0fc Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20250707_v5.3' into 'release/v5.3'
feat(tools): update openocd version to v0.12.0-esp32-20250707 (v5.3)

See merge request espressif/esp-idf!40461
2025-08-21 16:24:09 +08:00
Samuel Obuch
f491494662 ci: enable example tests for esp32p4 2025-08-20 00:28:00 +08:00
Erhan Kurubas
a64b16ceb6 feat(tools): add esp32c3 rev1.1 rom version string 2025-08-20 00:28:00 +08:00
Samuel Obuch
cbb2896bc7 ci: use shared OpenOCD class for GDB test app 2025-08-20 00:28:00 +08:00
Roland Dobai
c938c584f2 Merge branch 'feat/ide_requirements_v5.3' into 'release/v5.3'
feat(tools/requirements): Add IDE requirements files (v5.3)

See merge request espressif/esp-idf!40942
2025-08-19 16:01:05 +02:00
Aditya Patwardhan
1b459d9c49 change(version): Update version to 5.3.4 2025-08-14 18:33:18 +05:30
Sudeep Mohanty
99291d4def 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-14 12:57:49 +02:00