Data section exceeds available space in board

Started by gary, September 29, 2021, 09:11:32 am

Previous topic - Next topic

gary

I'm making a small game recently and I want to use Arduino uno 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?

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.

JohnS

See the URL you posted

http://www.arduino.cc/en/Guide/Troubleshooting#size

It sure does sound like you want a lot more memory than is available.

John