question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest ESP32 libraries too big, uses 119% of memory

See original GitHub issue

Sketch can be compiled using older library versions (uses 94%):

Linking everything together...
Multiple libraries were found for "WiFi.h"
 Used: /home/jarkko/Arduino/hardware/espressif/esp32/libraries/WiFi
Multiple libraries were found for "BLEDevice.h"
 Used: /home/jarkko/Arduino/libraries/ESP32_BLE_Arduino
Using library WiFi at version 1.0 in folder: /home/jarkko/Arduino/hardware/espressif/esp32/libraries/WiFi 
Using library PubSubClient at version 2.6 in folder: /home/jarkko/Arduino/libraries/PubSubClient 
Using library ESP32_BLE_Arduino at version 0.4.7 in folder: /home/jarkko/Arduino/libraries/ESP32_BLE_Arduino 
Sketch uses 1234222 bytes (94%) of program storage space. Maximum is 1310720 bytes.
Global variables use 77392 bytes (26%) of dynamic memory, leaving 217520 bytes for local variables. Maximum is 294912 bytes.

How to build using older libraries?

Solution1: Checkout old version of ESP32 libraries and rebuild sketch.

  1. cd ~/Arduino/hardware/espressif/esp32
  2. git checkout 52d47054
  3. git submodule update --init --recursive &&
    cd tools &&
    python2 get.py
  4. Start/restart Arduino IDE and rebuild sketch

Solution2: You got any ideas? Please comment.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
rishaldyprislycommented, Jul 28, 2018

I have solution for this, you just need to edit Boards.txt in esp32 hardware directory in your arduino IDE. please email me for further information

5reactions
Mikx5commented, Oct 7, 2018

To get more space for your sketch you need :

step by step on Windows10 with in your local installation C:\Users\xxx\xxx\Arduino\hardware\espressif\esp32\tools\partitions image

you can see the file default.csv which need to be modified you can also see other file which could fit your needs, one has no ota anotherone has ota and small spiffs In our case the best is “min_spiffs” that gives 2mb for sketch and you can still use OTA, and ble wifi, mqtt, string, works fine copy your default.csv in default.old
duplicate the min_spiffs.csv and rename it to the “default.csv” As you can see in the partition table You have size is in hex, it is 1E0000.

You need to put this value to the boards configuration file that is under: C:\Users\xxxxx\xxxx\Arduino\hardware\espressif\esp32 You need to find your board in the file , and change the upload.maximum_size from the default to the new amount, in my case it is 1E0000, but you cannot put it there in hex, You need to change it to dec so for 1E0000 you will get 1966080 So for my board DOIT DEVKIT V1 it should look like this: esp32doit-devkit-v1.upload.maximum_size=1966080 Restart arduino IDE, compile the skecth and you see that you have the space required and even more …

Read more comments on GitHub >

github_iconTop Results From Across the Web

High memory consumption on 2.0.0rc1 core #5474 - GitHub
I'm using esp32-dev board 4Mb Flash. I have a system developed with Arduino IDE 1.8.5 and ESP32 core 1.0.6. This system print on...
Read more >
Why does the empty program use THAT much space? : r/esp32
I'm setting up the easiest, basic toolchain for ESP32 (Devkit1). After compiling the empty program, it somehow takes 16% of ESP32's memory ...
Read more >
ESP32-CAM Troubleshooting Guide: Most Common Problems ...
This guide is a compilation with the most common errors when using the ESP32-CAM and how to fix them. The ESP32-CAM can be...
Read more >
ESP32 - Out of memory - How to solve this compiler error and ...
How to solve the out of memory error when compiling for ESP32. ThIs will occur even when you've only used 1Mb of memory...
Read more >
ESP32-CAM PSRAM Initialization failure and Timed out ...
Using library WiFi at version 1.0 in folder: ... The ESP32 CAM (WROOM) already has the 4MB of PSRAM RAM it needs to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found