Download Firmware/Bootloader from 328p?

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

Hey,

I just bought a 3018 China CNC and to get z-probing to work, I need to upload new firmware to the board.

I'm 95% sure its the correct firmware, but just in case I want to download the firmware from its 328p for a backup.

 

Everywhere I look it says to use AVR dude, but I can't get it running on either computer, and even if I could I haven't been able to find anywhere that says how.

There was someone who posted on stack saying they have done it with AVR studio, so that's why I'm here.

 

I would really appreciate a push in the right direction for how I could download the code from the chip to be used as a backup. 

There's of documentation on programming, but not vice versa.

 

Thanks

 

Edit: After a little more searching with using better keywords I found some instructions on the arduino forums for using avrdude. After installing Atmel Studio I guess it provided the correct DLL's to allow avrdude to run.

 

Its very simple, with your arduino plugged into the USB (or in my case a CNC PCB) open up command prompt, change the directory to where the avrdude executable is and run these commands.

 

Flash

avrdude -p atmega328p  -c arduino -P COM11 -b 115200 -U flash:r:flash_backup_file.hex:r

 

EEPROM

avrdude -p atmega328p  -c arduino -P COM11 -b 115200 -U eeprom:r:eeprom_backup_file.hex:r

 

 

Here is a link to the forum post.

 

For anyone trying to do the same, remember to change the chip to the one on your board, as well as the com port.

If you are using an arduino, even though the arduino uses a modified stk500v2 you need to change that to arduino (after -c).

I have made all the changes on those commands, the guy in the post also didn't include :r at the end, which causes avrdude to give an error regarding an unknown file format.

 

I also had to manually create the hex files in notepad or else avrdude will give an invalid path error.

 

 

 

If anyone knows how to do this in Atmel Studio though it would be cool if you could reply.

 

Last Edited: Sat. May 26, 2018 - 11:18 PM