Hi,
I started a port a while ago and some details are quite different between Mega/Xmega.
I managed to partly adapt akafugus XMegaduino to ATxmega128A3 and made some progress with 2.0 code but than switched to gcc with arduino libs to track problems, iirc millis/micros etc adapted to the Xmega timers:
RC-input is easy, translate ISR handling
buffered hardware-PWM is very easy on Xmega.
serial is easy, just translate some registers.
I2C error handling: some silicon bugs in my revision, didn´t manage to get safe I2C error handling on XMega, bus freezes from time to time if I unplug/replug sensors
ee2 handling is different (page mode) and buggy in my silicon revision. Didn´t get it to work properly.
At the end I had a look at boards like the naze32 or the other STMs and decides that they are so more powerful that it´s worthless to invest more time when even "Arduino" skips the Xmega and goes for faster devices (due).
Waiting for my RasPi now
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
. I´m quite sure I´m not able to get a RasPi flying but I like the dream of using cheap high quality HD-USB cams; I´ll end up with a USB-Camserver with some I2C sensors and wait for the "Multiwii deamon package" for ubuntu
![Laughing :lol:](./images/smilies/icon_lol.gif)