mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-12 05:17:38 +00:00
feat(bt): Frees BLE memory when no longer in use
It will free libble.a & libbt all txt, data and bss segment memory. This memory is combined into one large memory and put into the heap pool.
This commit is contained in:
60
components/bt/linker.lf.esp32c2
Normal file
60
components/bt/linker.lf.esp32c2
Normal file
@@ -0,0 +1,60 @@
|
||||
[sections:bt_text]
|
||||
entries:
|
||||
.iram1+
|
||||
|
||||
[sections:bt_bss]
|
||||
entries:
|
||||
.bss+
|
||||
.sbss+
|
||||
|
||||
[sections:bt_data]
|
||||
entries:
|
||||
.data+
|
||||
.sdata+
|
||||
.dram1+
|
||||
|
||||
[sections:bt_common]
|
||||
entries:
|
||||
COMMON
|
||||
|
||||
[scheme:bt_start_end]
|
||||
entries:
|
||||
bt_text -> iram0_bt_text
|
||||
bt_bss -> dram0_bt_bss
|
||||
bt_common -> dram0_bt_bss
|
||||
bt_data -> dram0_bt_data
|
||||
|
||||
# For the following fragments, order matters for
|
||||
# 'ALIGN(4) ALIGN(4, post) SURROUND(sym)', which generates:
|
||||
#
|
||||
# . = ALIGN(4)
|
||||
# _sym_start
|
||||
# ...
|
||||
# . = ALIGN(4)
|
||||
# _sym_end
|
||||
|
||||
[mapping:bt]
|
||||
archive: libbt.a
|
||||
entries:
|
||||
* (bt_start_end);
|
||||
bt_bss -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_bss),
|
||||
bt_common -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_common),
|
||||
bt_data -> dram0_bt_data ALIGN(4) ALIGN(4, post) SURROUND(bt_data)
|
||||
if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y:
|
||||
* (extram_bss)
|
||||
|
||||
[mapping:btdm]
|
||||
archive: libbtdm_app.a
|
||||
entries:
|
||||
* (bt_start_end);
|
||||
bt_bss -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(btdm_bss),
|
||||
bt_common -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(btdm_common),
|
||||
bt_data -> dram0_bt_data ALIGN(4) ALIGN(4, post) SURROUND(btdm_data)
|
||||
|
||||
[mapping:bt_controller]
|
||||
archive: libble_app.a
|
||||
entries:
|
||||
* (bt_start_end);
|
||||
bt_bss -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_bss),
|
||||
bt_common -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_common),
|
||||
bt_data -> dram0_bt_data ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_data)
|
Reference in New Issue
Block a user