modifications and additions to compile for avr target