I recently made some changes to some code and after attempting to program my device, AVR Studio reports that "The contents of the objectfile exceeds teh maximum program memory of the device."
During a build, however, the following is reported by the build tools:
AVR Memory Usage ---------------- Device: atmega324p Program: 23000 bytes (70.2% Full) (.text + .data + .bootloader) Data: 1553 bytes (75.8% Full) (.data + .bss + .noinit)
I have a couple of custom defined memory sections that sit in the uppermost part of memory (0x7D00 to the end) and don't receive any complaints about code being too big to fit in those sections.
I currently use -O3 optimization as I need the speed for my application.
I've looked at the .map file to find where the memory usage might be overstepping the bounds of the device, but don't see anything right off. Perhaps I'm reading it wrong or looking in the wrong section of the file?
Thanks in advance to anyone who can shed some light on this.
Apologies if this should have been in the AVR Studio forum.
Edit: Compiling with -Os reduces program size to 20392 bytes, but AVR Studio still refuses to program the object file.