mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Merge branch 'feat/ble_log_comp_enable_common_log' into 'master'
Feat/ble log comp enable common log See merge request espressif/esp-idf!52369
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
config BLE_LOG_ENABLED
|
config BLE_LOG_ENABLED
|
||||||
bool "Enable BT Log Async Output (Dev Only)"
|
bool "Enable BT Log Async Output (Dev Only)"
|
||||||
select BLE_COMPRESSED_LOG_ENABLE
|
select BLE_COMPRESSED_LOG_ENABLE
|
||||||
select BLE_HOST_COMPRESSED_LOG_ENABLE if BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED
|
|
||||||
select ESP_TIMER_IN_IRAM
|
select ESP_TIMER_IN_IRAM
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
|
|||||||
@@ -65,7 +65,15 @@ if(CONFIG_BLE_HOST_COMPRESSED_LOG_ENABLE AND CONFIG_BT_BLUEDROID_ENABLED)
|
|||||||
list(APPEND LOG_COMPRESSED_MODULE "BLE_HOST")
|
list(APPEND LOG_COMPRESSED_MODULE "BLE_HOST")
|
||||||
|
|
||||||
# update config file
|
# update config file
|
||||||
set(HOST_CODE_PATH "host/bluedroid")
|
# BTC and OSI are shared at the source-tree level, but their TRACE macros
|
||||||
|
# and runtime log-level controls belong to Bluedroid. Keep them in the
|
||||||
|
# same compression module so they share host_log_index.h and follow the
|
||||||
|
# Bluedroid host-compression switch.
|
||||||
|
set(HOST_CODE_PATH
|
||||||
|
"host/bluedroid"
|
||||||
|
"common/btc"
|
||||||
|
"common/osi"
|
||||||
|
)
|
||||||
set(HOST_LOG_INDEX_HEADER "host_log_index.h")
|
set(HOST_LOG_INDEX_HEADER "host_log_index.h")
|
||||||
set(BLE_HOST_LOG_SCRIPT_PATH
|
set(BLE_HOST_LOG_SCRIPT_PATH
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/scripts/module_scripts/bluedroid/make_bluedroid_log_macro.py")
|
"${CMAKE_CURRENT_LIST_DIR}/scripts/module_scripts/bluedroid/make_bluedroid_log_macro.py")
|
||||||
@@ -158,9 +166,10 @@ if(LOG_COMPRESSED_MODULE)
|
|||||||
endif()
|
endif()
|
||||||
set(YML_IN "${BT_ROOT_PATH}/common/ble_log/extension/log_compression/scripts/configs/module_info.yml.in")
|
set(YML_IN "${BT_ROOT_PATH}/common/ble_log/extension/log_compression/scripts/configs/module_info.yml.in")
|
||||||
|
|
||||||
# BLE_ISO has multiple code paths; rewrite CMake list ";" → YAML ", "
|
# Modules may have multiple code paths; rewrite CMake lists ";" →
|
||||||
# into a sibling variable so BLE_ISO_CODE_PATH itself stays a CMake
|
# YAML ", " into sibling variables so the originals remain CMake
|
||||||
# list usable by any later code that wants to iterate or append.
|
# lists usable by any later code that wants to iterate or append.
|
||||||
|
string(REPLACE ";" ", " HOST_CODE_PATH_YAML "${HOST_CODE_PATH}")
|
||||||
string(REPLACE ";" ", " BLE_ISO_CODE_PATH_YAML "${BLE_ISO_CODE_PATH}")
|
string(REPLACE ";" ", " BLE_ISO_CODE_PATH_YAML "${BLE_ISO_CODE_PATH}")
|
||||||
|
|
||||||
configure_file(${YML_IN} ${CONFIG_FILE_PATH} @ONLY)
|
configure_file(${YML_IN} ${CONFIG_FILE_PATH} @ONLY)
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ menuconfig BLE_HOST_COMPRESSED_LOG_ENABLE
|
|||||||
bool "Enable BLE Host log compression(Preview)"
|
bool "Enable BLE Host log compression(Preview)"
|
||||||
depends on BLE_COMPRESSED_LOG_ENABLE
|
depends on BLE_COMPRESSED_LOG_ENABLE
|
||||||
depends on BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED
|
depends on BT_BLUEDROID_ENABLED || BT_NIMBLE_ENABLED
|
||||||
|
depends on !BT_STACK_NO_LOG
|
||||||
|
default y if BLE_LOG_HOST_LOG
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Apply compression to host logs. Requires
|
Apply compression to host logs. Requires
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ log_config:
|
|||||||
|
|
||||||
BLE_HOST:
|
BLE_HOST:
|
||||||
description: "BLE Host"
|
description: "BLE Host"
|
||||||
code_path: [@HOST_CODE_PATH@]
|
code_path: [@HOST_CODE_PATH_YAML@]
|
||||||
log_index_file: @HOST_LOG_INDEX_HEADER@
|
log_index_file: @HOST_LOG_INDEX_HEADER@
|
||||||
script: @BLE_HOST_LOG_SCRIPT_PATH@
|
script: @BLE_HOST_LOG_SCRIPT_PATH@
|
||||||
tags: [@BLE_HOST_TAGS@]
|
tags: [@BLE_HOST_TAGS@]
|
||||||
|
|||||||
@@ -288,4 +288,13 @@ typedef UINT8 BD_ADDR[BD_ADDR_LEN]; /* Device address */
|
|||||||
void bt_hci_log_record_insights(uint8_t data_type, const uint8_t *data, uint16_t data_len);
|
void bt_hci_log_record_insights(uint8_t data_type, const uint8_t *data, uint16_t data_len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_BT_BLUEDROID_ENABLED && CONFIG_BLE_HOST_COMPRESSED_LOG_ENABLE
|
||||||
|
/*
|
||||||
|
* The generated Bluedroid index also owns the BTC/OSI/BLUFI TRACE macros
|
||||||
|
* declared by this header, including those used from common/btc and
|
||||||
|
* common/osi sources.
|
||||||
|
*/
|
||||||
|
#include "host_log_index.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _BT_COMMON_H_ */
|
#endif /* _BT_COMMON_H_ */
|
||||||
|
|||||||
@@ -24,9 +24,6 @@
|
|||||||
#include "bluedroid_user_config.h"
|
#include "bluedroid_user_config.h"
|
||||||
#include "stack/bt_types.h"
|
#include "stack/bt_types.h"
|
||||||
#include "bt_common.h"
|
#include "bt_common.h"
|
||||||
#if CONFIG_BLE_HOST_COMPRESSED_LOG_ENABLE
|
|
||||||
#include "host_log_index.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
|
#if (BT_BLE_LOG_SPI_OUT_HOST_ENABLED && !CLASSIC_BT_INCLUDED)
|
||||||
#include "ble_log/ble_log_spi_out.h"
|
#include "ble_log/ble_log_spi_out.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user