I have a program that should be 11018 bytes, and it's compiling at 13060. Another should be 14194 and is 17610. Blink is 1176, rather than 1108.
I get the smaller compiled sizes under XP (both platforms are 0011 -- necessary for the smaller math libraries).
Does anyone know what might cause the Linux IDE to generate larger code?? I believe it was making the correct sizes earlier today, but I cannot think of what might have changed. Also, it is not generating the "applet" directory for each program compiled, along with the *.o files; but earlier today, it was. File/directory permissions are good.
After all the crap (not much, really) i went through installing it on fedora (10), plus knowing that they were compiling correctly the first time around, several hours earlier, makes me want to know why it's misbehaving & possibly correct it.
If i must resort to VM, i think i'll do XP, since the package is a single-source, self-contained set of libraries & everything. Hopefully i wont hit any USB snags.
I've compared the applet output on my Linux & XP boxes:
Unfortunately, nothing in the file list jumps out & says "Look Here! 2042 extra bytes!"
I also traced the filesystem activity on compiling Blink, and see that it's linking from /usr/avr/lib/avr5/crtm168.o, libc.a, libm.a and the avr5.x script. Those files are vastly different sizes on XP & linux. I dont think I've discovered anything useful today.
Are you also compiling under 0017? If so, then your 892 is different from transfinite's 896 bytes.
It just kills me that the same version (0011) IDE on 2 platforms can produce different compiled output. The menus are a little different too. On the Tools menu, the Board types are listed in a diff order, and also the Bootloader types are in a different order. At the very least, the two should look the same, running from the same java code.
I understand some of the *.o files may be different due to debugging labels (linux seems to insert more than windows), and that certain procedures be placed in different locations by the linker; but the final compiled & linked product should be the same size, period.
edit: I've installed 0016 on windows & linux, and both compile with the same size. Reinstalled 0011 on linux, and it's still bigger. Blink.0016 is 896 bytes.
I do not think it is the version of IDE or Java. It is the version of avr-gcc and avr-lib and avr-tools that is installed on your system. The toolchain and compiler maintainers are constantly tweaking these. Sometimes a slightly larger code makes for more stable code.
Some reported differences bewen different chips like 168, 328 and mega is that the big ones have more ports and sometimes allocates more memory for peripherals, both in flash and in ram.
I dont know. I installed 0016 on xp & fedora, and the code compiled the same. With 0011 on the same 2 systems, the linux box compiled about 2k bigger (comparing 0011 to 0011, here). I also installed 0011 on a separate (ubuntu) system, and it compiles correctly, like my XP box.
I need to check the files closer, but since its working on the other ubuntu box, i've been using that for now. If it was a problem with avr-gcc or avr-libc or something, I wouldn't expect 0016 to work properly, as it did.
It's a combination of the Arduino version and the avr-gcc / avr-libc versions. Newer versions of Arduino ask gcc to do additional space optimizations. They may also include more or less code in the core libraries.