I have custom bootloader with BOOTSZ set to 512W_3E00, of course I changed in boards.txt the max sketch size to 31744 (so sketch going to address 7BFF max) according the size of my custom bootloader.
With a big sketch, Arduino IDE 1.0.5 tells me that :
Binary sketch size: 31,632 bytes (of a 31,744 byte maximum)
But looking in hex file generated, I've got code going above 0x7C00 (starting code of by bootloader) and of course uploading fails with :
avrdude: verifying ... avrdude: verification error, first mismatch at byte 0x7c00 0x6f != 0xcd avrdude: verification error; content mismatch avrdude: Send: Q   avrdude: Recv: .  avrdude: Recv: .  avrdude done. Thank you.
So I looked with avr-size
\Arduino-1.0.5\hardware\tools\avr\bin\avr-size RF_Gateway.cpp.elf text data bss dec hex filename 31632 440 764 32836 8044 RF_Gateway.cpp.elf
Did someone already encountered this wrong size issue ? I have a lot of Print(F("string")) so I suspect the size does not take into account these Flash code (may be in data section), but I'm not really sure.
Any ideas are welcome