I have quite a big Arduino project (in eclipse) going on with a lot of debug messages using the Serial.print("some string text") commands so that I can debug along the way.
One thing that I have noticed is that I reach a limit for how many of these I can have in the project. If i put too many, the program halts at very strange places. Ie: often long before my newest addition of a print command is supposed to execute.
My project .hex file is around 20k at the moment. The Arduino Uno limits around 30kb right? So it should not be too big.
So I feel that the actual problem is probably that maybe these serial commands are filling up my sram. Which is just 2kb. I am using a lot of libraries.
Is the command Serial.print("some string text") occupying SRAM? Surely gcc puts these string cnstants are in program space? but maybe they are not?
Or is it something else? I have an alternative theory that there is a serial.print buffer somewhere, and I am probably just filling it up with too many messages.