I have a project where an ATtiny2313V is controlling a 7×5 LED matrix to display scrolling text. To display the text, I built a font which is stored in the flash with the rest of the program.
The whole program, including the entire font, takes up 1106 bytes. But when I load it into the chip, it doesn’t seem to run; instead it just lights up a couple of the LED and that’s it.
However, when I remove most of the font, and compile with only the letters A to J, the program is 878 bytes in size, and runs just fine.
Is this because of some kind of overflow of the AVR flash memory?
The datasheet for the ATtiny2313V says it has 2KByte of flash! How can 1106 bytes be too much?
UPDATE: Just to be clear, the tool chain I’m using is AVR Studio (to compile the code) and then AVRDude to upload it to the micro-controller. As far as I know, AVR Studio uses a version of avr-gcc to compile the code.
I swear there’s something magical about SO; I’ve been wracking my brains for weeks, trying to figure this out, and after asking the question here – I finally can see what’s been staring me in the face!
Below is the memory usage for compiling with only the A-J letters in the font:
And here it is again, with the letters A-Z:
See the
126.6%in the Data? Oops! I really did overflow!