Commit Graph
24 Commits
Author SHA1 Message Date
Zhou Xiao 620a3c90a9 refactor(ble_log): move runtime dispatch to esp_timer
Replace the dedicated BLE Log FreeRTOS task with a deferred esp_timer
batch dispatch. The first submission anchors a one-shot 1 ms deadline;
the callback drains the queue depth captured at entry and schedules the
next fixed defer only for arrivals left behind. Later submissions cannot
move the current deadline, and no fixed batch-size cap limits throughput.

Protect queue and timer lifetime with runtime references. Drain queued
submissions before ble_log_lbm_flush_all_trans waits for transport
ownership to return, so synchronous flush does not depend on the deferred
alarm firing.

Keep the defer alarm as a light-sleep wake source and select
ESP_TIMER_IN_IRAM. Timestamp synchronization uses the shared ESP timer task
with skipped unhandled events, so it neither wakes light sleep nor replays
missed periods. Retain legacy task and trigger symbols as hidden no-op
sdkconfig compatibility options.
2026-08-27 16:16:38 +08:00
Zhou Xiao a181fc156d feat(bt/ble_log): implement UART redirection stream write
Introduce stream write API with deferred frame encapsulation for UART
redirection on port 0. Redirected data is now properly framed (header +
payload + checksum) instead of being sent as raw ASCII, preventing frame
parser sync oscillation on the receiver.

- Add stream_seal/stream_write/stream_flush in ble_log_lbm.c
- Add BLE_LOG_SRC_REDIR source and BLE_LOG_UART_REDIR_ENABLED gate
- Simplify redir_uart_tx_chars and timer callback to use stream API
- Flush pending stream data in ble_log_prph_deinit
- Make get_trans static (no external callers after refactor)
- Move UART wrap linker flags outside CONFIG_BT_ENABLED guard
- Default UART DMA peripheral when SOC_UHCI_SUPPORTED
- Default baud rate 921600 -> 3000000
2026-03-22 01:20:05 +08:00
Zhou Xiao e2d38955de change(bt/ble_log): deprecate legacy SPI log output module
Move ble_log_spi_out.c and ble_log_spi_out.h into a deprecated/
subdirectory under components/bt/common/ble_log/. Extract all
BT_BLE_LOG_SPI_OUT_* Kconfig options into deprecated/Kconfig.in
with an if-block to reduce depends-on repetition, sourced from
ble_log/Kconfig.in inside a "Legacy SPI Log Output (Deprecated)"
menu. Add mutual exclusion with BLE_LOG_ENABLED so that the legacy
SPI Out and the new BLE Log Module cannot be enabled simultaneously.
Update CMakeLists.txt source path and add deprecated/include to
include dirs so existing callers are unaffected. The BLE Log
Module's SPI Master DMA peripheral transport is the replacement.
2026-03-20 16:36:10 +08:00
Zhou Xiao d51892380b 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.
2026-03-20 16:01:35 +08:00
Zhou Xiao 8fd5dbb730 feat(ble_log): encode HCI direction in ble_log pipeline
Add ble_log_write_hci macro that encodes upstream/downstream direction
in MSB of HCI type byte. Update all 4 callsites (NimBLE + Bluedroid)
to use the new macro. Parser reads MSB to determine direction;
backward compatible (old firmware MSB=0 defaults to "sent").
2026-03-04 10:54:48 +08:00
luoxu eece778e55 feat(ble): Support ble log compression(draft) 2025-09-22 17:09:58 +08:00
Zhou Xiao b9dbc2ece7 feat(ble): refactored ble log module with layered design 2025-09-08 22:12:51 +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
Zhou Xiao 534b43e85a feat(ble): support ble log uart dma out 2025-07-17 10:48:17 +08:00
Zhou Xiao 0088541f54 change(ble): removed esp log to save code size 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 d300617aa6 fix(ble): ensure internal malloc in ble log spi out 2025-06-26 16:11:16 +08:00
Zhou Xiao cd3aa6527c feat(ble): support le audio log buffer separation 2025-05-20 16:09:25 +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 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
Zhou Xiao f8699785e9 feat(ble): optimized macros readability 2025-05-20 12:54:41 +08:00
Zhou Xiao 5215284a9d feat(ble): support ble log simple output via SPI interface 2025-03-17 10:44:21 +08:00
Zhou Xiao b144337020 fix(ble): fix flushout and sync issues 2025-02-26 12:27:22 +08:00
zhanghaipeng b6903296ad fix(ble/bluedroid): Added SPI output support for Bluedroid host log 2025-02-23 17:23:54 +08:00
Zhou Xiao f8efa4cd80 feat(ble): add printf and write with timestamp interface for ble log spi out 2025-02-20 17:21:52 +08:00
Zhou Xiao 2221133ba8 feat(ble): improved ble log spi output interface to support multisource log 2025-02-18 14:21:33 +08:00
Zhou Xiao 52106c9895 feat(ble): add spi output interface for esp ble controller log 2025-02-11 11:59:59 +08:00