Error: The program size (1485357 bytes) is greater than maximum allowed (1310720 bytes)
Hi,
I'm trying to run the demo sketch on a NodeMCU-32S with 4MB of RAM. However, when I try to compile, I get the following error:
Error: The program size (1485357 bytes) is greater than maximum allowed (1310720 bytes)
RAM: [== ] 18.6% (used 61044 bytes from 327680 bytes)
Flash: [==========] 113.3% (use*** [checkprogsize] Explicit exit, status 1
d 1485357 bytes from 1310720 bytes)
The code I've used is straight from the main Readme:
#include <FastLEDHub.h>
#define NUM_LEDS 100
#define LED_TYPE WS2812B
#define LIGHTSTRIP_PIN 5
CRGB leds[NUM_LEDS];
void setup()
{
FastLEDHub.initialize("Project Name");
FastLEDHub.addLeds<LED_TYPE, LIGHTSTRIP_PIN, GRB>(leds, NUM_LEDS);
}
void loop()
{
FastLEDHub.handle();
}
platformio.ini is:
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:stable]
platform = espressif32 ;https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
lib_deps =
ESPEssentials
ArduinoJson
LinkedList
WebSockets
WiFiManager
FastLED
FastLEDHub
Can you please help
Also tried this on the Arduino IDE, and get the following error:
Sketch uses 1453269 bytes (110%) of program storage space. Maximum is 1310720 bytes.
Global variables use 61052 bytes (18%) of dynamic memory, leaving 266628 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board
Compilation error: text section exceeds available space in board
Mh, I tried compiling it again on my machine with the code you provided and get
RAM: [== ] 16.2% (used 53016 bytes from 327680 bytes)
Flash: [======== ] 80.4% (used 1053917 bytes from 1310720 bytes)
with library versions
|-- ESPEssentials @ 2.1.5
|-- ArduinoJson @ 7.1.0
|-- LinkedList @ 0.0.0-alpha+sha.dac3874d28
|-- WebSockets @ 2.6.1
|-- WiFiManager @ 2.0.17
|-- FastLED @ 3.7.6
|-- FastLEDHub @ 2.2.0
I'm honestly not sure what could be causing the difference, especially because you mentioned the same thing happening in the Arduino IDE. Could there be any global optimization settings in PlatformIO? Which operating system are you using (Windows here)?
I'm using a MacBook Air M3. These are the versions I have:
|-- ESPEssentials @ 2.1.5
|-- ArduinoJson @ 7.1.0
|-- LinkedList @ **1.3.3**
|-- WebSockets @ 2.6.1
|-- WiFiManager @ 2.0.17
|-- FastLED @ **3.7.5**
|-- FastLEDHub @ 2.2.0
The only differences I see are LinkedList and FastLED