A
A
AJ2013-01-23 15:27:02
Arduino
AJ, 2013-01-23 15:27:02

How to change the memory model of the Arduino?

Good people.
A little background:
I received the coveted LCD TFT 320x240 well and began to “blink”. After a while, having got used to the library and having learned to manage drawing quite smartly, I decided that it was time to code. Accordingly, the screen for output, and the device should be beautiful.
I quickly added a background in Photoshop to display it on a screen exactly the size of the LCD itself. Further more. I turn on the converter and encode the background jpg file into a .c file. I am attaching the file to the project. I hammer the match into an array. I send compile and download and here:
"array 'back' is too large"
No brainer that the array is too big, but no brainer why it suddenly. After some time of leisurely searching, I find out that AVR microcontrollers have the notorious "memory model" that should be changed to "small" in the settings and everything will supposedly be a bundle.
Searches for the location of this model were unsuccessful.
In this regard, the question is: how to change the memory model of the AVR microcontroller ATMega 2560?
Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Huseynov, 2013-01-23
@kibergus

What is the size of the image in bytes (array size)? What is the amount of flash memory on arduino and what is the amount of RAM?

P
progchip666, 2013-02-01
@progchip666

Weak Arduino for such a luxurious indicator!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question