[SOLVED] Downloading flash from atmega1284p via avrdude

Hi. I’ve been trying to download the code from an atmega1284p as a protection copy against future upgrades. I’ve been using the avrdude command (and variations) such as:

avrdude -p atmega1284p -P /dev/ttyUSB0 -c stk500v2 -b XXXXX -U flash:r:dump.hex:i

I’ve tried various -b baud rates. I’ve also tried with the -F flag. I’m unsure if the -c field is correct for this chip.

The USB device is correct. Normal USB communications with the board are fine. I’ve tried hitting the reset button on the board during and immediately before the command (red light blinks for reset).

In all cases, I’m getting timeouts from avrdude. Any ideas? Thanks!

The port ttyUSB0 is what? Is it ISP programmer or USB/serial?

If you are trying to download via serial port, the bootloader must support this.

USB on a Linux box. Pretty typical setup for avrdude use.

Try just -v instead -U and show an output, also show HW.

Succeeded with this -- thanks all:

avrdude -p m1284p -c stk500v1 -P /dev/ttyUSB0 -b57600 -U flash:r:dump.hex:i