Reduce RAM usage of Bluetooth NimBLE stack
Posted: Tue May 23, 2023 11:10 am
Hi there,
I am writing an application on an ESP32-WROOM-32UE module with a lot of RAM usage and the NimBLE bluetooth stack does not fit into RAM anymore. I made some tests (reduced memory of other components, so that BLE fits) comparing my firmware with BLE and without BLE (ESP-IDF V5.0).
My results are, that activating the NimbleBLE stack with default values, occupies the following RAM:
During compile time (static allocated):
- IRAM: 47 KB
- DRAM: 14 KB
During runtime (allocated from heap)
- 88 KB
In sum, this is 149 KB.
I have tested some options in the sdkconfig, but these only made changes of max. 5 KB.
Is there a hidden option or some genious trick to reduce BLE memory footprint by factor of two or more?
Many thanks for ideas.
mauh72
I am writing an application on an ESP32-WROOM-32UE module with a lot of RAM usage and the NimBLE bluetooth stack does not fit into RAM anymore. I made some tests (reduced memory of other components, so that BLE fits) comparing my firmware with BLE and without BLE (ESP-IDF V5.0).
My results are, that activating the NimbleBLE stack with default values, occupies the following RAM:
During compile time (static allocated):
- IRAM: 47 KB
- DRAM: 14 KB
During runtime (allocated from heap)
- 88 KB
In sum, this is 149 KB.
I have tested some options in the sdkconfig, but these only made changes of max. 5 KB.
Is there a hidden option or some genious trick to reduce BLE memory footprint by factor of two or more?
Many thanks for ideas.
mauh72