I am using a Adafruit ESP32 Huzzah Feather.
Get the following compile error from the Arduino IDE when compiling:
“Sketch uses 1437658 bytes (109%) of program storage space. Maximum is 1310720 bytes.”
Do we need all these libraries to support the BLE features in the sample project?
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>
My sketch is not too large (~100 lines) – what is the overhead for these BLE libraries compared to the total 1310720 bytes available?
Only other libraries in my sketch are used to support Wi-Fi:
#include <WiFi.h>
#include <WiFiClient.h>
Any other ideas to reduce the size of this example project?
Thanks,
Jim
After testing a compile on just the BLE ESP32 Sketch example only the Program Memory Space goes to 86% of total in the ESP32:
Sketch uses 1130093 bytes (86%) of program storage space. Maximum is 1310720 bytes.
Are there any good tricks to reduce the size of the BLE libraries used to free up more space for an application?
Thanks,
Jim
Another benchmark for BLE program memory size is the Example that comes standard in the Arduino IDE
Can be found in the Arduino IDE at File\Examples\ESP32 BLE Arduino\B:E-server
When compiling this code it is at 85% of available program memory: “Sketch uses 1126565 bytes (85%) of program storage space. Maximum is 1310720 bytes.”
If there is not a more compact solution for BLE then it is about worthless for provisioning the ESP32 when we still need program memory for the rest of the actual application to run the product/control system/features.
Any ideas/suggestions?
Hello James, I agree with you… Unfortunately at the moment the Bluetooth Low Energy capabilities of the ESP32 with Arduino IDE are very power intensive and it uses a lot of resources.
If you want to lower the memory usage, the best way is to use a lower level programming language and program the ESP32 with ESP-IDF: https://github.com/espressif/esp-idf
That’s the best option right now…
Hello, i’m in the same situation, is there any solution or we have to use the esp-idf without the arduino system? thank you