I have hand built an arduino with an atmega328p. Everything seems to be working. Using avrdude dapa device and getting the hex files from the /tmp/build/ directory. Modifying the lcd example sketch "helloWorld.pde" I was able to test overall functionality. Including adding serial code to print out and display characters received serially on the LCD display (plus echoing them back to minicom, yep, under Linux). All worked, so serial interface is working.
Ok, now I go to the ide and attempt to burn bootloader. It fails with avrdude reporting to avr device. Ok, I go to the bootloader directory and do:
avrdude -p m328p -c dapa -E noreset -e
and it programs just fine.
I then select the upload icon in the ide and voila, my sketch loads via the serial port and starts execution. Great.
Then I try to download another sketch and failure wuth the following errors.
avrdude: stk500_getsync(): not in sync: resp=0xe0
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xe0
I go through the whole deak again re-flashing the bootloader via avrdude, etc.
Its always the same, after one serial download, it won't do another.
Now, I noticed that the app I am running does not stop running/reset. I hooked my scope up to the 328's reset (1) pin and while it gets a quick pulse low, I cannot determine how low it goes. I have serial pin 4 (DTR) tied to RESET through a .1uf cap, as per the Arduino schematic.
Anybody else had this problem and a fix?