Compiler reports wrong size?

Hi all

Is the compiler reporting the wrong size for compiled sketches or am I missing something?
(Using the Blink example with an Uno), it reports:

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

However if we look at the dissasembly, it's only 544 bytes.

I've never seen that before , for the arduino. Where do you get that from ?

It's not part of the Arduino IDE, it's AVR Studio.

Note that AVR Studio is a pretty big download but does have lots of handy features like debugging and a disassembler.
If you only want to see the binary code, then you can use an Intel Hex to binary convertor (lots of them on the net) and then feed the output of that to a hex editor.

However if we look at the dissasembly,

Where?

AWOL:

However if we look at the dissasembly,

Where?

Sorry, I meant the Hex dump.

I count 22 bytes in each row, and 49 rows, plus 6 in the last row, which seems to me to be about 1080 bytes, isn't it ?

However if we look at the dissasembly, it's only 544 bytes.

What were you counting, to reach this conclusion ?

Classic "gcc tools count bytes, Atmel tools count words" error?

49 rows of 22 bytes, plus 6 bytes = 1084

UnoDueTre:
Note that AVR Studio is a pretty big download but does have lots of handy features like debugging and a disassembler.
If you only want to see the binary code, then you can use an Intel Hex to binary convertor (lots of them on the net) and then feed the output of that to a hex editor.

The IDE outputs a .hex file. Saves a lot of this mucking around. What do you suppose gets uploaded to your chip?

Let me reach for my dunce cap whilst I write this. :blush:

I looked only at the offset on the left hand side and completely forgot to count the bytes as I am so used to hex editors showing bytes instead of words.
Will not be making that mistake again.

@Nick
Yes understood, was just checking the binary output as AVR Studio does the Intel hex to binary convertion and displaying the raw data all in one go.
Just didn't realize that it counts in words and not bytes by default.