Greetings -
I've built one of these projects, which uses a Atmega328P clocked at 20MHz. (It uses the standard two 22pF caps on the external 20MHz oscillator.) Here's a picture of a finished unit (not mine.)
When building Optiboot, I'm building it for 20MHz at 56000bps, per the guide -
make atmega328 AVR_FREQ=20000000L LED_START_FLASHES=8 BAUD_RATE=57600
After installing the bootloader to the Atmega328P (I verified with a my Dataman 48Pro2 that the boot loader starts at >3F00, and has fuses >FD, >DE, and >FF set.) The board does boot and the LED on it flashes eight times in a loop, just like I compiled it to do. This tells me the apparently the boot loader is running OK.
It should now be waiting for a sketch to be loaded on its serial port at 57600bps, which in this board's case is behind a MAX232 IC and some capacitors, and has a DB9 standard serial port (so I can use a regular DB9 to USB adapter.)
This is where things go strange. I've tried several different USB to serial adapters, and even tried both Windows and Mac, but I keep getting essentially this same thing when running avrdude:
avrdude -p m328p -P /dev/tty.usbserial-1420 -c arduino -B2 -b 57600 -U flash:w:out/DuPAL.hex
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
(etc)
That tells me there is a communication issue between avrdude and the Atmega328P - but there's not much between them that I haven't swapped out. The USB to serial cable works on other devices (both in Windows and Mac), and I've tried multiple. I've swapped out the MAX232 several times just to eliminate it. And the boot loader appears to be working because it's blinking the LED eight times. It's just not allowing serial transfer.
Any thoughts as to things I can eliminate here or look at? Are there any other caveats that running this thing at 20MHz caused with regards to the baud rate? Or, should I maybe try slowing the crystal down to a 16MHz one and recompiling Optiboot?
Thanks!