Uno hanging

Hello every one.I have a beginner question please I would like to know what is the maximum code size i could upload to Arduino uno.Another question how can i know my code size (that i will upload).Many thanks in advance.

When you verify or upload code, the IDE tells you how big your sketch is, and what the maximum size is.

The blink example sketch produces

Binary sketch size: 1,084 bytes (of a 32,256 byte maximum)

The maximum size doesn't account for the bootloader, so is actually closer to 30KB.

dxw00d:
When you verify or upload code, the IDE tells you how big your sketch is, and what the maximum size is.

The blink example sketch produces

Binary sketch size: 1,084 bytes (of a 32,256 byte maximum)

The maximum size doesn't account for the bootloader, so is actually closer to 30KB.

Thanks you i found in my sketch this line
avrdude: 19604 bytes of flash verified
which means that there is no problem with my code size but when i debug my program (using Serial prints)i found that the arduino hangs in void setup () and some times it doesn't hang and it seems to be restarted after few lines of void setup() .Do you know how can i fix it.

Do you know how can i fix it.

Not without seeing the sketch.

dxw00d:
When you verify or upload code, the IDE tells you how big your sketch is, and what the maximum size is.

The blink example sketch produces

Binary sketch size: 1,084 bytes (of a 32,256 byte maximum)

i
The maximum size doesn't account for the bootloader, so is actually closer to 30KB.

It does account for the bootloader
2^15 = 32768
32768 - 512 = 32256

where 512 is the size of the bootloader.

If you switch the board with a duemilanove with a larger bootloader it does this:

(of a 30,720 byte maximum)

Ah, yes. I forgot the newer bootloaders were smaller.

dxw00d:
Ah, yes. I forgot the newer bootloaders were smaller.

how can i know the exactly maximum size of newer bootloaders.and what is the maximum allowed. code size my sketch doesn't told me the maximum allowed size.