Programming in Eclipse does not work with Mega

I have made a setup in Eclipse to work with the Arduino libraries. This works perfectly fine for a Arduino Duemilanova; but not for the Mega. The Mega however does play nice with the Arduino 17 software.

My setup consists of the ‘blinking led’ example code. When this works on the Duemilanova, I change the target processor, compile again and upload to the chip using a AVR ISP MkII. It then doesn’t work: no blinking led.

Are there any different compile flags, library settings, etc. for Duemilanova/Mega I have to know off? Other things to try?

After a lot of tries, the solutions seems to be that while compiling for the Atmega328 with GCC-4.4.2 is fine, it is not for the Atmega1280. The solution is to use the GCC supplied together with the Arduino package; this works fine. Strange, a regression in GCC?

It's possible. Other people have reported problems with the Mega and avr-gcc 4.4.2. In particular, the Serial objects aren't initialized correctly. I don't know why that is.