Page 1 of 1

Data section exceeds available space in board

PostPosted: Mon Jun 28, 2021 5:07 pm
by Mars
I'm making a small game on a touchscreen recently and I want to use Arduino to do it. My code compiles without problems, but when I upload it, I get an error like the one shown in the picture, is it because I have too many variables defined?
Can someone please tell me how to fix it?
CODE: SELECT_ALL_CODE
Arduino:1.8.12 (Windows 10), Development board: "Arduino Uno"

The project uses 6336 bytes, which occupies (19%) of the program storage space. The maximum is 32256 bytes. data section exceeds available space in board

Global variables used 3046 bytes, (148%) of dynamic memory, leaving -998 bytes for local variables. The maximum is 2048 bytes.
There is not enough memory; visit the following URL to follow the instructions to reduce memory usage.
http://www.arduino.cc/en/Guide/Troubleshooting#size
Error while compiling for development board Arduino Uno.

Turn on in File -> Preferences
"Show detailed output during compilation" option
This report will contain more information.

Re: Data section exceeds available space in board

PostPosted: Tue Oct 19, 2021 5:13 pm
by Mars
I have solved the problem, by F().