thseiler / embedded

some open source embedded stuff
130 stars 50 forks source link

Up to date with current GCC (4.6+), compatability with ATMega1280 #6

Closed afranchuk closed 9 years ago

afranchuk commented 10 years ago

This incorporates changes to make the project compile under the most up to date version of GCC, and also adds support for the ATMega1280 MCU.

Unfortunately, the code for atmega328 and atmega168 is slightly over 2KB, although this is odd because I believe that is only up to the compiler changes (I didn't make changes to the core code for these). Seems gcc -flto may not be as good as -fwhole-program with -combine, or some optimizations have been removed or altered. Haven't looked into it yet, it may take some perusing of the old generated binaries vs. the current ones.

mrjonny2 commented 9 years ago

Would this compile for the ATmega2560 as well?

afranchuk commented 9 years ago

Unfortunately at the moment I don't think it will work with ATmega2560, just based on the fact that thseiler left a few comments strewn about regarding "FIXME for m256". That being said, the changes to allow for a larger address space should still apply for the ATmega2560, and it wouldn't be too difficult to add a Makefile rule for it. As long as you take a look at those FIXME's, and understand what they are referring to, it may work.