Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The program size (1485357 bytes) is greater than maximum allowed (1310720 bytes) #28

Open
dushyantahuja opened this issue Sep 7, 2024 · 3 comments

Comments

@dushyantahuja
Copy link

dushyantahuja commented Sep 7, 2024

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

@dushyantahuja
Copy link
Author

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

@srwi
Copy link
Owner

srwi commented Sep 9, 2024

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)?

@dushyantahuja
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants