First, I’m not familiar with the specifics of the AVR compiler,
only in using the Arduino IDE. I am using IDE ver 1.0 with a
Duemilanove 328 bootloader chip.
I am writing a large sketch for my robot tank, and am up to a sketch
size of “15600 bytes (of 30720 byte maximum)”, and currently about
half done. Everything has been running fine until the problems listed
below. I found nothing about this in the help reference or trouble-
I have a multi-level menuing system with a lot of char* strings
being sent via Serial.print(), eg
Serial.print("\nServo Control Test … “);
Serial.print(”\ncmds: (q)uit, (s)top, (f)wd, (b)wd, (l)eft, (r)ight ");
… on and on …
I have 2 problems. First, I found if I Serial.print() a string of
length more than about 34-36 bytes, then it writes garbage characters
at the end, so I assume there is a 32-byte buffer for this function,
but did not see this fact mentoned anywheres. ???
Secondly and more serious, after implementing probably 30-40 such
Serial.print() statements in the various menus, the program started
hanging in the middle of printing the ‘first’ [startup] menu. It would
run fine if I commented out most of the Serial.print() statements,
So, I assume I have run out of char* string storage space in the
program, and I am wondering what the limit is on that. ???
I imagine static string storage is overwriting the stack or data
variable space, or something. Can someone tell me how to determine
the program memory allocation for statics, data, variables, stack, etc.
Is it possible to change this ???
I did track down the avr-size.exe utility buried deep in the Arduino
IDE directory, but it requires an “a.out” file, which the Arduino IDE
does not produce.
Any way to fix all of this? Note that, during Verify, the IDE does not
print any error messages whatsover, indicating I have exceeded any
storage space limits, etc.