diff --git a/components/bt/common/ble_log/src/internal_include/ble_log_util.h b/components/bt/common/ble_log/src/internal_include/ble_log_util.h index 01834595e2..adc827c55e 100644 --- a/components/bt/common/ble_log/src/internal_include/ble_log_util.h +++ b/components/bt/common/ble_log/src/internal_include/ble_log_util.h @@ -37,7 +37,11 @@ #define BLE_LOG_INLINE inline /* Section */ +#if defined(CONFIG_IDF_TARGET_ESP32C2) +#define BLE_LOG_IRAM_ATTR _SECTION_ATTR_IMPL(".ble_log_iram1", __COUNTER__) +#else #define BLE_LOG_IRAM_ATTR IRAM_ATTR +#endif /* Memory operation */ #define BLE_LOG_MEM_CAP (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT | MALLOC_CAP_DMA) diff --git a/components/bt/linker_esp32c2.lf b/components/bt/linker_esp32c2.lf index c9ab4c2e49..3a07d7fde4 100644 --- a/components/bt/linker_esp32c2.lf +++ b/components/bt/linker_esp32c2.lf @@ -14,6 +14,10 @@ entries: entries: .sleep_iram1+ +[sections:bt_ble_log_iram_text] +entries: + .ble_log_iram1+ + [sections:bt_bss] entries: .bss+ @@ -33,6 +37,7 @@ entries: entries: if BT_CTRL_RUN_IN_FLASH_ONLY = y: bt_iram_text -> flash_text + bt_ble_log_iram_text -> iram0_bt_text bt_bss -> dram0_bt_bss bt_common -> dram0_bt_bss bt_data -> dram0_bt_data @@ -49,6 +54,7 @@ entries: bt_sleep_iram_text -> flash_text else: bt_iram_text -> iram0_bt_text + bt_ble_log_iram_text -> iram0_bt_text bt_bss -> dram0_bt_bss bt_common -> dram0_bt_bss bt_data -> dram0_bt_data