Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2ab35cc
fix(i2s): fix the auto port failure when use simplex on ESP32
L-KAYA Nov 25, 2025
2b36597
refactor(tools): test_idf_tools.py ruff changes
mfialaf Nov 19, 2025
8643ac1
feat(tools): Updated ccache 4.11.2 -> 4.12.1
mfialaf Nov 19, 2025
2c7966e
change(ble): Updated the maximum number of concurrent connections to …
ShenWeilong Nov 28, 2025
65c98b6
fix(ble_mesh): add proper memory cleanup in composition data parsing
forx157 Nov 28, 2025
594d3d8
Merge branch 'feat/update_ccache_to_4.12.1_v5.3' into 'release/v5.3'
dobairoland Nov 28, 2025
30ca16a
refactor(ble): modularize compressed log scripts for better maintaina…
forx157 Nov 20, 2025
9e13a13
feat(ble_mesh): Miscellaneous update for BLE Mesh
Aug 27, 2025
3c64261
feat(ble_mesh): Miscellaneous log enhancement for BLE Mesh
Aug 26, 2025
6360b56
feat(ble_mesh): Miscellaneous log enhancement for Provisioning
forx157 Sep 1, 2025
25f8414
fix(ble_mesh): fixed issues with incorrect logs format and position
RainerSeventeen Sep 3, 2025
d98ddc6
fix(ble_mesh): resolve miscellaneous logging issues
forx157 Sep 9, 2025
1694b00
fix(app_trace): prevent possible system crash on uart buffer access
erhankur Nov 28, 2025
c3d2735
Merge branch 'fix/ble_mesh_rpr_example_fix_v5.3' into 'release/v5.3'
Isl2017 Dec 1, 2025
908cf14
Merge branch 'feat/ble_log_compression_modularized_v5.3' into 'releas…
Isl2017 Dec 1, 2025
8703a83
Merge branch 'feat/ble_mesh_log_enh_v5.3' into 'release/v5.3'
Isl2017 Dec 1, 2025
29da357
Merge branch 'bugfix/fix_i2s_auto_port_issue_v5.3' into 'release/v5.3'
suda-morris Dec 1, 2025
cbb6c60
fix(ble): put ble_log_write_hex in iram to avoid cache error
Dec 1, 2025
b19806d
feat(ble): enabled lc get time for ceva controller
Dec 1, 2025
566c73f
fix(bt/controller): Fixed hci connection request event filter bug
boblane1 Nov 28, 2025
75122a3
fix(bt): fixed crash caused by deinit during A2DP connection initiation
xiongweichao Nov 20, 2025
d6c6226
Merge branch 'fix/apptrace_uart_crash_v5.3' into 'release/v5.3'
gerekon Dec 1, 2025
0b4291e
Merge branch 'bugfix/a2dp_deinit_crash_v5.3' into 'release/v5.3'
wmy-espressif Dec 2, 2025
2288644
Merge branch 'bugfix/fix_event_filter_bug_v5.3' into 'release/v5.3'
wmy-espressif Dec 2, 2025
efb1a06
Merge branch 'fix/ble_log_v2_cache_error_v5.3' into 'release/v5.3'
Isl2017 Dec 2, 2025
563f462
Merge branch 'feature/extend_h2_conon_num_to_70_v5.3' into 'release/v…
Isl2017 Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions components/app_trace/port/port_uart.c
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down Expand Up @@ -288,10 +288,9 @@ 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){
assert(false && "Failed to allocate apptrace uart down buffer!");
}
assert(buf != NULL && "Down buffer cannot be NULL");

hw_data->down_buffer = buf;
hw_data->down_buffer_size = size;
}

Expand Down
8 changes: 3 additions & 5 deletions components/bt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -633,19 +633,17 @@ if(CONFIG_BT_ENABLED)
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_sar_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_srpl_model.c"
"esp_ble_mesh/lib/ext.c")

if(CONFIG_BLE_MESH_SAR_ENHANCEMENT)
list(APPEND srcs "esp_ble_mesh/core/transport.enh.c")
else()
list(APPEND srcs "esp_ble_mesh/core/transport.c")
endif()
else()
list(APPEND srcs
"esp_ble_mesh/core/transport.c")
list(APPEND srcs "esp_ble_mesh/core/transport.c")
endif()
endif()



if(CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT)
list(APPEND srcs
"porting/npl/freertos/src/npl_os_freertos.c"
Expand Down Expand Up @@ -952,7 +950,7 @@ set(bt_priv_requires
)

if(CONFIG_BLE_COMPRESSED_LOG_ENABLE)
set(BT_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
set(CODE_BASE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
# When log compression is enabled, selected logs are replaced
# by auto-generated macros that emit pre-encoded data.
# This eliminates the original format strings, reducing firmware size and
Expand Down
105 changes: 79 additions & 26 deletions components/bt/common/ble_log/extension/log_compression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

set(LOG_COMPRESSED_MODULE "")
set(LOG_COMPRESSED_MODULE_CODE_PATH "")
set(BT_ROOT_PATH $ENV{IDF_PATH}/components/bt)
set(LOG_COMPRESSED_SRCS_DIR "${CMAKE_BINARY_DIR}/ble_log/.compressed_srcs")

# default config value for ble mesh module
Expand All @@ -17,32 +17,62 @@ set(BLE_HOST_TAGS_PRESERVE "")

if(CONFIG_BLE_MESH_COMPRESSED_LOG_ENABLE)
list(APPEND LOG_COMPRESSED_MODULE "BLE_MESH")
if(NOT EXISTS "${CMAKE_BINARY_DIR}/ble_log/include/mesh_log_index.h")
file(WRITE "${CMAKE_BINARY_DIR}/ble_log/include/mesh_log_index.h" "")
endif()
list(APPEND LOG_COMPRESSED_MODULE_CODE_PATH "esp_ble_mesh")

# update config file
set(BLE_MESH_CODE_PATH "esp_ble_mesh")
set(BLE_MESH_LOG_INDEX_HEADER "mesh_log_index.h")
set(BLE_MESH_LOG_SCRIPT_PATH
"${CMAKE_CURRENT_LIST_DIR}/scripts/module_scripts/ble_mesh/make_mesh_log_macro.py")
# update BLE_MESH_TAGS and BLE_MESH_TAGS_PRESERVE
include(${CMAKE_CURRENT_LIST_DIR}/cmake/ble_mesh_log_tags.cmake)

if(NOT EXISTS "${CMAKE_BINARY_DIR}/ble_log/include/${BLE_MESH_LOG_INDEX_HEADER}")
file(WRITE "${CMAKE_BINARY_DIR}/ble_log/include/${BLE_MESH_LOG_INDEX_HEADER}" "")
endif()
list(APPEND LOG_COMPRESSED_MODULE_CODE_PATH ${BLE_MESH_CODE_PATH})
endif()

if(CONFIG_BLE_HOST_COMPRESSED_LOG_ENABLE AND CONFIG_BT_BLUEDROID_ENABLED)
list(APPEND LOG_COMPRESSED_MODULE "BLE_HOST")
list(APPEND LOG_COMPRESSED_MODULE_CODE_PATH "host/bluedroid/stack")
if(NOT EXISTS "${CMAKE_BINARY_DIR}/ble_log/include/host_log_index.h")
file(WRITE "${CMAKE_BINARY_DIR}/ble_log/include/host_log_index.h" "")
endif()

# update config file
set(HOST_CODE_PATH "host/bluedroid/stack")
set(HOST_LOG_INDEX_HEADER "host_log_index.h")
set(BLE_HOST_LOG_SCRIPT_PATH
"${CMAKE_CURRENT_LIST_DIR}/scripts/module_scripts/bluedroid/make_bluedroid_log_macro.py")

include(${CMAKE_CURRENT_LIST_DIR}/cmake/ble_host_bluedroid_tags.cmake)
if(NOT EXISTS "${CMAKE_BINARY_DIR}/ble_log/include/${HOST_LOG_INDEX_HEADER}")
file(WRITE "${CMAKE_BINARY_DIR}/ble_log/include/${HOST_LOG_INDEX_HEADER}" "")
endif()
list(APPEND LOG_COMPRESSED_MODULE_CODE_PATH ${HOST_CODE_PATH})
endif()

if(BLE_COMPRESSED_LIB_LOG_BUILD)
if(NOT (BLE_COMPRESSED_LIB_NAME AND BLE_COMPRESSED_LIB_CODE_DIR AND BLE_COMPRESSED_LIB_LOG_TAGS))
message(FATAL_ERROR "Invalid settings")
else()
message("Building compressed log for ${BLE_COMPRESSED_LIB_NAME}")
endif()
list(APPEND LOG_COMPRESSED_MODULE ${BLE_COMPRESSED_LIB_NAME})
if(NOT EXISTS "${CMAKE_BINARY_DIR}/ble_log/include/${BLE_COMPRESSED_LIB_LOG_INDEX_HEADER}")
file(WRITE "${CMAKE_BINARY_DIR}/ble_log/include/${BLE_COMPRESSED_LIB_LOG_INDEX_HEADER}" "")
endif()
list(APPEND LOG_COMPRESSED_MODULE_CODE_PATH ${BLE_COMPRESSED_LIB_CODE_DIR})

string(REPLACE ";" "," BLE_COMPRESSED_LIB_CODE_DIR "${BLE_COMPRESSED_LIB_CODE_DIR}")
string(REPLACE ";" "," BLE_COMPRESSED_LIB_LOG_TAGS "${BLE_COMPRESSED_LIB_LOG_TAGS}")
string(REPLACE ";" "," BLE_COMPRESSED_LIB_LOG_TAGS_PRESERVE "${BLE_COMPRESSED_LIB_LOG_TAGS_PRESERVE}")
else()
set(BLE_COMPRESSED_LIB_NAME "placeholder")
endif()


if(LOG_COMPRESSED_MODULE)
list(APPEND srcs "common/ble_log/extension/log_compression/ble_log_compression.c")
list(APPEND include_dirs "${CMAKE_BINARY_DIR}/ble_log/include")
# When building the library, ble_log_compression.c and its dependencies are not needed
if(NOT BLE_COMPRESSED_LIB_LOG_BUILD)
list(APPEND srcs "common/ble_log/extension/log_compression/ble_log_compression.c")
list(APPEND include_dirs "${CMAKE_BINARY_DIR}/ble_log/include")
endif()
if(NOT CMAKE_VERSION VERSION_LESS 3.15.0)
set(Python3_FIND_STRATEGY LOCATION)
find_package(Python3 COMPONENTS Interpreter)
Expand Down Expand Up @@ -111,19 +141,39 @@ if(LOG_COMPRESSED_MODULE)
"host/nimble/nimble/nimble/host/store/config/src")
endif()

add_custom_target(ble_log_compression ALL
COMMAND ${BLE_PYTHON_EXECUTABLE} ${PYTHON_SCRIPT}
compress
--compressed_srcs_path "${LOG_COMPRESSED_SRCS_DIR}"
--build_path "${CMAKE_BINARY_DIR}"
--module "'${LOG_COMPRESSED_MODULE}'"
--bt_path "${BT_ROOT_PATH}"
--srcs "'${compressed_srcs}'"
DEPENDS ${compressed_srcs_with_abs_path} ${PYTHON_SCRIPT}
COMMENT "Log compression is being performed, please wait..."
WORKING_DIRECTORY ${BT_ROOT_PATH}
USES_TERMINAL
)
if(BLE_COMPRESSED_LIB_LOG_BUILD)
execute_process(COMMAND ${BLE_PYTHON_EXECUTABLE} ${PYTHON_SCRIPT}
compress
--compressed_srcs_path "${LOG_COMPRESSED_SRCS_DIR}"
--build_path "${CMAKE_BINARY_DIR}"
--module "${LOG_COMPRESSED_MODULE}"
--code_base_path "${CODE_BASE_PATH}"
--srcs "${compressed_srcs}"
RESULT_VARIABLE result
OUTPUT_VARIABLE out
ERROR_VARIABLE err)
if(NOT ${result} EQUAL 0)
message(WARNING "${err}")
message(WARNING "Exit this log compression due to failure of compression")
set(LOG_COMPRESS_INCLUDE_DIRS ${include_dirs} PARENT_SCOPE)
set(LOG_COMPRESSION_TARGET "" PARENT_SCOPE)
return()
endif()
else()
add_custom_target(ble_log_compression ALL
COMMAND ${BLE_PYTHON_EXECUTABLE} ${PYTHON_SCRIPT}
compress
--compressed_srcs_path "${LOG_COMPRESSED_SRCS_DIR}"
--build_path "${CMAKE_BINARY_DIR}"
--module "'${LOG_COMPRESSED_MODULE}'"
--code_base_path "${CODE_BASE_PATH}"
--srcs "'${compressed_srcs}'"
DEPENDS ${compressed_srcs_with_abs_path} ${PYTHON_SCRIPT}
COMMENT "Log compression is being performed, please wait..."
WORKING_DIRECTORY ${BT_ROOT_PATH}
USES_TERMINAL
)
endif()

function(add_flags_if_in_list file file_list compile_flags)
set(PROCESSED OFF PARENT_SCOPE)
Expand Down Expand Up @@ -190,7 +240,10 @@ if(LOG_COMPRESSED_MODULE)
set(LOG_COMPRESSION_TARGET ble_log_compression PARENT_SCOPE)
# set(LOG_COMPRESSION_TARGET "" PARENT_SCOPE)
set(LOG_COMPRESS_SRCS "${compressed_srcs_with_abs_path};${uncompressed_srcs}" PARENT_SCOPE)
list(APPEND include_dirs "common/ble_log/extension/log_compression/include")
if(NOT BLE_COMPRESSED_LIB_LOG_BUILD)
list(APPEND include_dirs "common/ble_log/extension/log_compression/include")
endif()
list(APPEND include_dirs "${CMAKE_BINARY_DIR}/ble_log/include")
set(LOG_COMPRESS_INCLUDE_DIRS ${include_dirs} PARENT_SCOPE)
else()
set(LOG_COMPRESSION_TARGET "" PARENT_SCOPE)
Expand Down
Loading
Loading