updated unix ecc stuff and to use the avr lib directly