AtMega/AvrGccFAQ (2005-07-26 08:11:46)

Q. How can I decide if I want to compile my own firmware?

Q. I have Windows and I want to build the VEMS firmware. What do I need?

Q. I get "cannot find the file specified" or similar error.

Q. I get some "library" related problems

Q. I am still having problems getting the Gcc Compiler to work correctly. Who will help me?

Q. I have linux. Is there anything for me?

A. Some linux rpm packages are here:

http://savannah.nongnu.org/download/simulavr/binaries/RPMS/i386/

I successfully used them on debian using alien --to-deb conversion.

The above link for linux rpm's is obsolete. I searched on the AVR freaks site and came up with this software under tools, but I'm not sure which we would recommend to use.

http://www.avrfreaks.net/Home/gensearch.php?keyword=linux+rpm&section=0


There was an annoying optimization bug (combine bug) fixed on 2003.jul.11.

in mainstream experimental gcc (not only avr).

If your package contains an older gcc, you must use gcc -O0 for several

files (button.c and lcd.c comes to mind) or get a newer version.

[Building your own C cross-compilers for Atmel AVR under Linux/x86]

Please copy the testprogram (that tests wether a gcc has the bug) here:

....

I think I've run into it (again?). I used this gcc version:\nÿ1ÿ

(not on the machine I usually compile on) on 2005-03-15 to compile my firmware (with -O2 I guess), and there was a serious compilation error.

corr.ve_hp was all around the place, so was pulsewidth. The car behaved badly (it's a miracle that it ran at all!) MegaTunix showed on the VE 3D view that the dot was not on the VE patch where it should have been. Since I was experimenting with megatunix, I thought it was some megatunix configuration thing. I didn't reproduce on table yet, but it's 99% that this was the case.

The ..v8 on GenBoard/UnderDevelopment/FirmwareChanges

has vems.hex compiled with the good compiler - it also tested OK.