Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This is related to a change done in PR #8243 to fix Arduino with RainMaker + BLE Provisioning.
The PR #8243 works correctly for the C3 and S3 with no side effects.
But for the ESP32, it causes a problem with the linker that never allows it to release the BT memory whenever the sketch doesn't use BT/BLE.
Therefore, this PR just reverts the PR#8243 for the ESP32, making it work fine as before.
Tests scenarios
Tested with ESP32, ESP32-S3 and ESP32-C3 within the following sketches:
Doesn't use BT/BLE and prints the HEAP.
The same BLE_server.ino example, but also prints HEAP information.
The sketch from the Issue #7903
The sketch example using WiFiProv.ino, but adjusted to use BLE provisioning.
https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFiProv/examples/WiFiProv/WiFiProv.ino
Related links
Closes #8482
Related to #7903 #8243 #8528