Programming the atmega32u4 on an Arduino Yun

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After programming the atmega32u4 on an Arduino Yun, the next attempt fails as the serial port becomes nonresponsive. The first attempt itself is fine and everything seems to be in order. I then try to program with the Arduino IDE and reset the Linux processor and the microcontrller to get things to work again. Can this painful reset be avoided.

 

The following is what I am doing and test.c is just a vacuous program.

 

int main(void)
{
    return 0;
}

 Then:

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc  -DF_CPU=16000000UL -mmcu=atmega32u4 -o test  test.c
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom test test.hex

 

Open and close the serial port at 1200 baud. And finally:

 

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -patmega32u4 -cavr109 -P/dev/cu.usbmodemfd121 -b57600 -D -Uflash:w:test.hex:i