Hi all
It's probably something stupid I am doing but I can't find any strings I used in the final compiled sketch.
I have converted the .hex back to a binary file (using Srecord and AVR Studio) and have also looked at the .elf and nothing.
(By looking at the elf file, I mean running it thru avr-objdump).
The strange thing is the compiler does not report an increase in the compiled sketches size even if I increase or decrease the number of chars in the strings.
Herewith an example (using the Uno):
int led = 13;
void setup() {
pinMode(led, OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
void PrintIt()
{
Serial.print("this is a short string");
}
The resulting size is:
Binary sketch size: 2,362 bytes (of a 32,256 byte maximum)
If I change the string in Serial.print, the size is reported as exactly the same.
Yes I know that the function PrintIt() is never called, but surely that should make no difference and should still be included in the compiled sketch?
Can anyone please give me some pointers?
Thank you.