Error during build: text section exceeds available space in board

Good day. I wrote a small sketch, LCD2004, displays temperature, atmospheric pressure, date, day of the week and time. When uploading to the board, it returns an error from the header. I read the tips on the forum, I did not find any duplication of nodes. The Uno board. Please tell me what can be done t
o fix it.

Please post the exact error message you are getting, but it sounds like the generated program requires more RAM than is available on the board you are using.

Sketch uses 36598 bytes (113%) of program storage space. Maximum is 32256 bytes.
Global variables use 1720 bytes (83%) of dynamic memory, leaving 328 bytes for local variables. Maximum is 2048 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.

Error during build: text section exceeds available space in board
Compilation failed
Command Process exited with code 1

This is the full text of the message

Program file exceeds the flash memory limit of the board. You should either try optimizing the program or choose a board with more memory (such as Arduino Mega or ESP32).

Hello. Please tell me what is the optimization? Calendar + weather station, cut one function?
Thank you in advance for your reply.

You can get rid of one of the functions, as a last resort. Or try to work purely with the text part, the number of inputs in the “concat” node can be reduced. Unfortunately, optimization is not always a pleasant thing. In my cases, I used numbers in byte format, since they take up less memory. But for this I had to make new nodes, modifying them so that instead of “number” inputs there were “byte” inputs. I even divided the program between two controllers and connected them via uart. As a conclusion for myself, I realized that it is better to work on boards with a larger amount of memory if the project has a lot of text and peripherals.

1 Like

Thank you very much for the reply. One more question. Is it problematic to upload my program to ESP 32?

Any board that shows up in the upload list can be used. Any board supported by avrtools can probably be made to work. There are other threads about adding additional boards to the upload list.

Thanks. I will try ESP 32.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.