Yet another... (Ubuntu) Firmware Setup Help!

I can’t get the output file under 64,512 bytes and working correctly.
I initially installed the Arduino Dev 1.0.5. It compiled and uploaded fine. But, acted wacky on the Shruthi. The dev has avr-gcc4.8.2.
After uninstalling, I then followed szilm’s advice from here
and installed the avr toolchain with avr-gcc4.3.3, binutils-2.19.1 and avr-libc-1.6.6. It compiled fine, but the moose said the size was 65,254 bytes. It would not upload…
Does anyone have any advice for getting the environment working correctly for the MI boxes?


make clean after having installed the old gcc?

yes. It was definitely rebuilt.

From memory, you need to run make clean twice, once for the main code and once for the bootloader. I may be misremembering - however I dimly recall that it took several tries to expunge all the object files created by the newer version of avr-gcc, after I downgraded to aver-gcc4.3.3 for exactly the same reasons that you did. Then everything worked.

Hmm… the second clean doesn’t help. The ‘build/shruthi1/’ folder is empty. Make size is still 65254.

OK. So, here is my experience with trying to set up an environment on Ubuntu and Windows…

I could not, for the life of me, get the compiler to create a file size under the firmware limit in Ubuntu. After setting up a new Ubuntu VM, I tried… All the various Arduino Dev Environments 1.01 through 1.0.5, building the AVR Toolchain from scratch as above as well as 4.8.2 and 4.9.2, and finally using ‘apt-get’ to install ‘gcc-avr’ which installs avr-4.8.2(?). No success.

On Windows, I went through each of the Arduino Dev Envs again (1.01 - 1.05) and got the same results as Ubuntu. What finally worked was WinAVR 20100110. It was a very easy setup and install so I figured for the next person here is my setup for 64bit Windows 8.1(Should work for others): (Pretty close to Mr Roboto’s tutorial )

1. I installed Python 2.7 and NumPy and added ‘C:\\Python27;’ to the System Path.
2. Install a Git Utility. I already have a one installed.
3. Install WinAVR 20100110. I added the pathnames to the System Path… this completely replaced what was there! Copy the Path variable beforehand and paste back after the install or add the paths ‘c:\\WinAVR-20100110\\bin;c:\\WinAVR-20100110\\utils\\bin;’ after install. I didn’t need another make.exe.
4. In Win 8.1 I needed to copy another version of Msys-1.0.dll to the \\utils\\bin folder. link

The rest works as on the shruthi firmware page. I’m not telling how many hours this took! :slight_smile: