Skip to content

fix(ble): Make BLE memory management automatic#12287

Merged
me-no-dev merged 3 commits into
espressif:masterfrom
lucasssvaz:fix/ble_mem
Feb 9, 2026
Merged

fix(ble): Make BLE memory management automatic#12287
me-no-dev merged 3 commits into
espressif:masterfrom
lucasssvaz:fix/ble_mem

Conversation

@lucasssvaz
Copy link
Copy Markdown
Member

Description of Change

This pull request refactors how Bluetooth (BT) controller memory is managed and detected in the ESP32 Arduino core. It introduces a new mechanism for automatically detecting when BT libraries are linked, allowing the core to release unused BT memory by default unless a BT library is present or the user explicitly overrides the behavior. Additionally, it removes the free_bt_memory example and its associated files, as the new mechanism makes manual overrides less necessary.

Core changes to BT memory management:

  • Added a new header esp32-hal-bt-mem.h that defines a constructor to automatically set a flag (_btLibraryInUse) when any BT library is linked, allowing the core to detect BT usage at link time.
  • Changed the default implementation of btInUse() in esp32-hal-bt.c to return the value of _btLibraryInUse instead of always keeping BT memory; users can still override this function if needed. [1] [2]
  • Updated all major BT libraries (BLEDevice.cpp, BluetoothSerial.cpp, SimpleBLE.cpp) to include the new esp32-hal-bt-mem.h header, ensuring the flag is set when these libraries are used. [1] [2] [3]

Removal of free_bt_memory example:

  • Deleted the entire idf_component_examples/free_bt_memory example, including its configuration, source code, and documentation, as the new automatic detection makes it obsolete. [1] [2] [3] [4] [5] [6] [7] [8]
  • Removed the corresponding FreeBTMemory example from the BLE library and its CI configuration. [1] [2]

Minor API improvement:

  • Updated the BLEDevice::init() method signature to provide a default argument, improving usability.

Test Scenarios

Tested locally with Hello world.

Before fix:

HEAP:lifetime min:4399796, larg. free bl.:4128756, free:4404756 (alloc: 35916), blocks free: 6 (alloc: 93, total: 99), STACK:lifetime min: 7172 (8192)

After fix:

HEAP:lifetime min:4418508, larg. free bl.:4128756, free:4423468 (alloc: 35916), blocks free: 6 (alloc: 93, total: 99), STACK:lifetime min: 7180 (8192)

Around +20kB of free heap.

Related links

Closes #12284

@lucasssvaz lucasssvaz self-assigned this Jan 27, 2026
@lucasssvaz lucasssvaz requested review from a team, SuGlider and me-no-dev as code owners January 27, 2026 20:44
@lucasssvaz lucasssvaz added Type: Bug 🐛 All bugs Area: BLE Issues related to BLE labels Jan 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 27, 2026

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lucasssvaz, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against adaff17

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 27, 2026

Test Results

 90 files   90 suites   33m 56s ⏱️
 67 tests  67 ✅ 0 💤 0 ❌
683 runs  683 ✅ 0 💤 0 ❌

Results for commit adaff17.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 27, 2026

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32💚 -28⚠️ +320.000.00000.000.00
ESP32C30⚠️ +420.00⚠️ +0.01000.000.00
ESP32C50⚠️ +420.00⚠️ +0.01000.000.00
ESP32C60⚠️ +420.00⚠️ +0.01000.000.00
ESP32H20⚠️ +420.00⚠️ +0.01000.000.00
ESP32P4000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32S3💚 -20⚠️ +320.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32ESP32C3ESP32C5ESP32C6ESP32H2ESP32P4ESP32S2ESP32S3
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/ArduinoOTA/examples/BasicOTA00⚠️ +60⚠️ +60⚠️ +60--0000💚 -40
libraries/ArduinoOTA/examples/SignedOTA00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/AsyncUDP/examples/AsyncUDPClient00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/AsyncUDP/examples/AsyncUDPMulticastServer00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/AsyncUDP/examples/AsyncUDPServer00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/BLE/examples/Beacon_Scanner⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Client⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Client_Gamepad⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Client_Server⚠️ +240⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Client_multiconnect⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +320
libraries/BLE/examples/Client_secure_static_passkey⚠️ +280⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +120
libraries/BLE/examples/EddystoneTLM_Beacon⚠️ +240⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/EddystoneURL_Beacon⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Notify⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +240
libraries/BLE/examples/Scan⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Server⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Server_Gamepad⚠️ +160⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Server_multiconnect⚠️ +240⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Server_secure_static_passkey⚠️ +240⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/UART⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/Write⚠️ +200⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BLE/examples/iBeacon⚠️ +240⚠️ +420⚠️ +420⚠️ +420⚠️ +42000--⚠️ +280
libraries/BluetoothSerial/examples/DiscoverConnect⚠️ +240--------------
libraries/BluetoothSerial/examples/GetLocalMAC⚠️ +240--------------
libraries/BluetoothSerial/examples/SerialToSerialBT⚠️ +240--------------
libraries/BluetoothSerial/examples/SerialToSerialBTM⚠️ +280--------------
libraries/BluetoothSerial/examples/SerialToSerialBT_Legacy⚠️ +240--------------
libraries/BluetoothSerial/examples/SerialToSerialBT_SSP00--------------
libraries/BluetoothSerial/examples/bt_classic_device_discovery⚠️ +280--------------
libraries/BluetoothSerial/examples/bt_remove_paired_devices⚠️ +320--------------
libraries/DNSServer/examples/CaptivePortal00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/EEPROM/examples/eeprom_class00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/EEPROM/examples/eeprom_extra00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/EEPROM/examples/eeprom_write00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogOut/LEDCFade00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogOut/LEDCSingleChannel00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogOut/LEDCSoftwareFade00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogOut/SigmaDelta00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogOut/ledcFrequency00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogOut/ledcWrite_RGB00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogRead00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/AnalogReadContinuous00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/ArduinoStackSize00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/ArduinoWaitTimeBeforeStartingSketch00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/CI/CIBoardsTest00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Camera/CameraWebServer00----------0000
ESP32/examples/Camera/CameraWebServer (2)00----------00⚠️ +40
libraries/ESP32/examples/ChipID/GetChipID00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/DeepSleep/ExternalWakeUp00----------0000
libraries/ESP32/examples/DeepSleep/SmoothBlink_ULP_Code00--------------
libraries/ESP32/examples/DeepSleep/TimerWakeUp00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/ESP32/examples/DeepSleep/TouchWakeUp00--------000000
libraries/ESP32/examples/FreeRTOS/BasicMultiThreading00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/FreeRTOS/Mutex00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/FreeRTOS/Queue00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/FreeRTOS/Semaphore00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/GPIO/BlinkRGB00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/GPIO/FunctionalInterrupt00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/GPIO/FunctionalInterruptLambda00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/GPIO/FunctionalInterruptStruct00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/GPIO/GPIOInterrupt00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/MacAddress/GetMacAddress00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/RMTCallback00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/RMTLoopback00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/RMTReadXJT00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/RMTWrite_RGB_LED00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/RMT_CPUFreq_Test00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/RMT_EndOfTransmissionState00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/RMT/RMT_LED_Blink00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/ResetReason/ResetReason00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/ResetReason/ResetReason200⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/BaudRateDetect_Demo00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/HardwareFlowControl_Demo00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/OnReceive_Demo00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/RS485_Echo_Demo00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/RxFIFOFull_Demo00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/RxTimeout_Demo00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/Serial_All_CPU_Freqs00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/Serial_STD_Func_OnReceive00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Serial/onReceiveExample00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/TWAI/TWAIreceive00⚠️ +60--⚠️ +60⚠️ +60000000
libraries/ESP32/examples/TWAI/TWAItransmit00⚠️ +60--⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Template/ExampleTemplate00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Time/SimpleTime00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/ESP32/examples/Timer/RepeatTimer00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Timer/WatchdogTimer00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP32/examples/Touch/TouchButton00--------000000
libraries/ESP32/examples/Touch/TouchInterrupt00--------000000
libraries/ESP32/examples/Touch/TouchRead00--------000000
libraries/ESP_I2S/examples/ES8388_loopback00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP_I2S/examples/Record_to_WAV00--------00--00
libraries/ESP_I2S/examples/Simple_tone00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/ESP_NOW/examples/ESP_NOW_Broadcast_Master00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/ESP_NOW/examples/ESP_NOW_Broadcast_Slave00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/ESP_NOW/examples/ESP_NOW_Network00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/ESP_NOW/examples/ESP_NOW_Serial00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/ESPmDNS/examples/mDNS-SD_Extended00⚠️ +60⚠️ +60⚠️ +60--0000⚠️ +40
libraries/ESPmDNS/examples/mDNS_Web_Server00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/Ethernet/examples/ETH_LAN872000--------------
libraries/Ethernet/examples/ETH_TLK11000--------00----
libraries/Ethernet/examples/ETH_W5500_Arduino_SPI00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Ethernet/examples/ETH_W5500_IDF_SPI⚠️ +120⚠️ +60⚠️ +60⚠️ +60⚠️ +600000💚 -200
libraries/Ethernet/examples/ETH_WIFI_BRIDGE00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/FFat/examples/FFat_Test00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/FFat/examples/FFat_time00⚠️ +60⚠️ +60⚠️ +60--0000⚠️ +40
libraries/HTTPClient/examples/Authorization00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPClient/examples/BasicHttpClient00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPClient/examples/BasicHttpsClient00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPClient/examples/CustomHeaders00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPClient/examples/HTTPClientEnterprise00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/HTTPClient/examples/ReuseConnection00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPClient/examples/StreamHttpClient00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPUpdate/examples/httpUpdate00⚠️ +60⚠️ +60⚠️ +60--0000⚠️ +40
libraries/HTTPUpdate/examples/httpUpdateSPIFFS00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPUpdate/examples/httpUpdateSecure00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/HTTPUpdateServer/examples/WebUpdater00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/Hash/examples/HEX00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Hash/examples/MD500⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Hash/examples/PBKDF2_HMAC00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Hash/examples/SHA100⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Hash/examples/SHA200⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Hash/examples/SHA300⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Hash/examples/SHA3Stream00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Insights/examples/DiagnosticsSmokeTest00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/Insights/examples/MinimalDiagnostics00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/LittleFS/examples/LITTLEFS_test00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/LittleFS/examples/LITTLEFS_time00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/Matter/examples/MatterColorLight00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterCommissionTest00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterComposedLights⚠️ +40⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterContactSensor00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterDimmableLight00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterDimmablePlugin00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterEnhancedColorLight00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterEvents00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterFan00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterHumiditySensor00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterLambdaSingleCallbackManyEPs00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterMinimum00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterOccupancySensor00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterOccupancyWithHoldTime00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterOnIdentify00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterOnOffLight00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterOnOffPlugin00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterPressureSensor00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterRainSensor00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterSimpleBlinds00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterSmartButton00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterStatus⚠️ +40⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterTemperatureControlledCabinet00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterTemperatureControlledCabinetLevels00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterTemperatureLight00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterTemperatureSensor⚠️ +40⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterThermostat00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Matter/examples/MatterWaterFreezeDetector00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--00💚 -160
libraries/Matter/examples/MatterWaterLeakDetector00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--00💚 -160
libraries/Matter/examples/MatterWindowCovering00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/NetBIOS/examples/ESP_NBNST00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/NetworkClientSecure/examples/WiFiClientInsecure00⚠️ +60⚠️ +60⚠️ +60--0000⚠️ +160
libraries/NetworkClientSecure/examples/WiFiClientPSK00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/NetworkClientSecure/examples/WiFiClientSecure00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/NetworkClientSecure/examples/WiFiClientSecureEnterprise00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/NetworkClientSecure/examples/WiFiClientSecureProtocolUpgrade00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/NetworkClientSecure/examples/WiFiClientShowPeerCredentials00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/NetworkClientSecure/examples/WiFiClientTrustOnFirstUse00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/PPP/examples/PPP_Basic00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/PPP/examples/PPP_WIFI_BRIDGE00⚠️ +60⚠️ +60⚠️ +60--0000⚠️ +40
libraries/Preferences/examples/Prefs2Struct00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Preferences/examples/StartCounter00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/SD/examples/SD_Test00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/SD/examples/SD_time00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/SD_MMC/examples/SDMMC_Test00--------00--00
libraries/SD_MMC/examples/SDMMC_time00--------00--00
libraries/SPI/examples/SPI_Multiple_Buses00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/SPIFFS/examples/SPIFFS_Test00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/SPIFFS/examples/SPIFFS_time00⚠️ +60⚠️ +60⚠️ +60--0000💚 -40
libraries/SimpleBLE/examples/SimpleBleDevice⚠️ +160--------------
libraries/TFLiteMicro/examples/hello_world00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Ticker/examples/Blinker00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Ticker/examples/TickerBasic00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Ticker/examples/TickerParameter00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Update/examples/AWS_S3_OTA_Update⚠️ +40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/Update/examples/HTTPS_OTA_Update00⚠️ +60⚠️ +60⚠️ +60--0000⚠️ +40
libraries/Update/examples/HTTP_Client_AES_OTA_Update00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/Update/examples/HTTP_Server_AES_OTA_Update00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/Update/examples/OTAWebUpdater00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/Update/examples/SD_Update00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Update/examples/Signed_OTA_Update00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/AdvancedWebServer00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/ChunkWriting00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/FSBrowser00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/Filters00⚠️ +60⚠️ +60⚠️ +60--0000💚 -40
libraries/WebServer/examples/HelloServer00⚠️ +60⚠️ +60⚠️ +60--0000⚠️ +40
libraries/WebServer/examples/HttpAdvancedAuth00⚠️ +60⚠️ +60⚠️ +60--0000💚 -40
libraries/WebServer/examples/HttpAuthCallback00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/HttpAuthCallbackInline00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/HttpBasicAuth00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/HttpBasicAuthSHA1💚 -40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/HttpBasicAuthSHA1orBearerToken00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/Middleware00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/WebServer/examples/MultiHomedServers00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/PathArgServer00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/SDWebServer00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/SimpleAuthentification00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/UploadHugeFile00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/WebServer00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WebServer/examples/WebUpdate00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/FTM/FTM_Initiator00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/FTM/FTM_Responder00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/SimpleWiFiServer00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WPS00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/WiFi/examples/WiFiAccessPoint💚 -40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiBlueToothSwitch00⚠️ +6000⚠️ +60------00
libraries/WiFi/examples/WiFiClient⚠️ +40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiClientBasic00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiClientConnect⚠️ +40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiClientEnterprise00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/WiFi/examples/WiFiClientEvents00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiClientStaticIP00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiExtender💚 -40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiIPv600⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiMulti00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiMultiAdvanced💚 -280⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiScan00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiScanAsync00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiScanDualAntenna00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiScanTime⚠️ +40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiSmartConfig00⚠️ +60⚠️ +60⚠️ +60----0000
libraries/WiFi/examples/WiFiTelnetToSerial00⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFi/examples/WiFiUDPClient💚 -40⚠️ +60⚠️ +60⚠️ +60--000000
libraries/WiFiProv/examples/WiFiProv⚠️ +240⚠️ +60⚠️ +60⚠️ +60----0000
libraries/Wire/examples/WireMaster00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Wire/examples/WireScan00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Wire/examples/WireSlave00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Wire/examples/WireSlaveFunctionalCallback00⚠️ +60⚠️ +60⚠️ +60⚠️ +60000000
libraries/Zigbee/examples/Zigbee_Analog_Input_Output00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_Electrical_AC_Sensor_MultiPhase00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--00⚠️ +120
libraries/Zigbee/examples/Zigbee_Fan_Control00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_Gateway00⚠️ +60⚠️ +60------0000
libraries/Zigbee/examples/Zigbee_Multistate_Input_Output00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_On_Off_MultiSwitch00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_On_Off_Switch00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_Power_Outlet00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_Range_Extender00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/Zigbee/examples/Zigbee_Thermostat00⚠️ +60⚠️ +60⚠️ +60⚠️ +60--0000
libraries/BLE/examples/Server_secure_authorization--⚠️ +420⚠️ +420⚠️ +420⚠️ +420----⚠️ +280
libraries/ESP32/examples/HWCDC_Events--⚠️ +60⚠️ +60⚠️ +60⚠️ +6000--00
libraries/RainMaker/examples/RMakerCustom--⚠️ +60⚠️ +60⚠️ +60----0000
libraries/RainMaker/examples/RMakerCustomAirCooler--⚠️ +60⚠️ +60⚠️ +60----0000
libraries/RainMaker/examples/RMakerSonoffDualR3--⚠️ +60⚠️ +60⚠️ +60----0000
libraries/RainMaker/examples/RMakerSwitch--⚠️ +60⚠️ +60⚠️ +60----0000
libraries/ESP32/examples/AnalogOut/LEDCGammaFade----⚠️ +60⚠️ +60⚠️ +6000----
libraries/OpenThread/examples/CLI/COAP/coap_lamp----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/COAP/coap_switch----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/SimpleCLI----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/SimpleNode----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/ThreadScan----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/CLI/onReceive----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/Native/SimpleThreadNetwork/LeaderNode----⚠️ +60⚠️ +60⚠️ +60------
libraries/OpenThread/examples/Native/SimpleThreadNetwork/RouterNode----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Binary_Input_Output----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_CarbonDioxide_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Color_Dimmable_Light----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Contact_Switch----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Dimmable_Light----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Electrical_DC_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Illuminance_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_OTA_Client----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Occupancy_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_On_Off_Light----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_PM25_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Scan_Networks----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Temperature_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Vibration_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Wind_Speed_Sensor----⚠️ +60⚠️ +60⚠️ +60------
libraries/Zigbee/examples/Zigbee_Window_Covering----⚠️ +60⚠️ +60⚠️ +60------
libraries/ESP_HostedOTA/examples/ESP_HostedOTA----------00----
libraries/ESP_SR/examples/Basic----------00--00
libraries/SD_MMC/examples/SD2USBMSC----------00--00
libraries/USB/examples/CompositeDevice----------000000
libraries/USB/examples/ConsumerControl----------000000
libraries/USB/examples/CustomHIDDevice----------000000
libraries/USB/examples/FirmwareMSC----------000000
libraries/USB/examples/Gamepad----------000000
libraries/USB/examples/HIDVendor----------000000
libraries/USB/examples/Keyboard/KeyboardLogout----------000000
libraries/USB/examples/Keyboard/KeyboardMessage----------000000
libraries/USB/examples/Keyboard/KeyboardReprogram----------000000
libraries/USB/examples/Keyboard/KeyboardSerial----------000000
libraries/USB/examples/KeyboardAndMouseControl----------000000
libraries/USB/examples/MIDI/MidiController----------000000
libraries/USB/examples/MIDI/MidiInterface----------000000
libraries/USB/examples/MIDI/MidiMusicBox----------000000
libraries/USB/examples/MIDI/ReceiveMidi----------000000
libraries/USB/examples/Mouse/ButtonMouseControl----------000000
libraries/USB/examples/SystemControl----------000000
libraries/USB/examples/USBMSC----------000000
libraries/USB/examples/USBSerial----------000000
libraries/USB/examples/USBVendor----------000000
ESP32/examples/Camera/CameraWebServer (3)--------------00

@P-R-O-C-H-Y P-R-O-C-H-Y added the Status: Review needed Issue or PR is awaiting review label Jan 29, 2026
@me-no-dev me-no-dev added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Feb 9, 2026
@me-no-dev me-no-dev merged commit 829f795 into espressif:master Feb 9, 2026
118 checks passed
@SaintSampo
Copy link
Copy Markdown
Contributor

@lucasssvaz @me-no-dev I just updated my project from 3.0.7 to 3.3.8. When I did, code that worked before the update was suddenly bricking my devices. Needed to put them in boot mode to recover them.

Took me awhile to narrow the problem down to BLE, and narrow the problem down the 3.3.7, and narrow it down to this PR.

My project uses ArduinoBLE which does not have the new header file included yet. This PR is a breaking change for ArduinoBLE and libraries like it.

@lucasssvaz
Copy link
Copy Markdown
Member Author

@SaintSampo You can override the memory management if needed https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-bt.c#L23-L28. The proper fix is to include esp32-hal-bt-mem.h in ArduinoBLE. This was broken before and now is fixed.

@SaintSampo
Copy link
Copy Markdown
Contributor

Yea it was easy enough for me to include esp32-hal-bt-mem.h in my project files and that fixed the issue. I'm commenting because I expect more people to run into this. They just update their core 3.3.6 to 3.3.7, and suddenly their code is crashing and they are getting low level memory errors that are hard to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: BLE Issues related to BLE Status: Pending Merge Pull Request is ready to be merged Type: Bug 🐛 All bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

36.596 bytes less heap 3.3.5->3.3.6

4 participants