Category:AVRDUDE

From ElectroDragon
Jump to navigation Jump to search

Use


Avrdude GUI


Commands and Options

Description CMD
Use terminal mode
  • avrdude -p m8 -c usbasp -C ..\etc\avrdude.conf -t
  • dump eeprom 0 512
Fusebit setup avrdude -P comport -b 19200 -c avrisp -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m
Upload flash avrdude -P comport -b 19200 -c avrisp -p m328p -v -e -U flash:w:hexfilename.hex -U lock:w:0x0F:m
  • -c choose programmer
Programmer Arduino as ISP -> avrisp
usbasp -> usbasp
  • -C config file -> ..\etc\avrdude.conf
  • -p mode
  • -t terminal mode
  • -P choose port
  • -U flash:w:"E:\xxx\Desktop\aaa.hex":a, write flash
  • -U flash:r:"E:\he\Desktop\aaa.hex":a, read flash
  • -U eeprom:w:"E:\he\Desktop\aaa.eep":a, auto
  • -P comport, -b baudrate, -B bitlock
  • L low fuse, H high fuse, E extended fuse, Lock bits
  • -F force, -V disable verify, -D disable flash erase, -e erase flash and eeprom, -n do not write,
  • -vvvv verbose

Tutorial

  • dump memory tutorial

Documents

Boards file of arduino bootloader

  • uno.vid.0=0x2341
  • uno.pid.0=0x0043
  • uno.vid.1=0x2341
  • uno.pid.1=0x0001
  • uno.vid.2=0x2A03
  • uno.pid.2=0x0043
  • uno.vid.3=0x2341
  • uno.pid.3=0x0243
  • uno.upload.tool=avrdude
  • uno.upload.protocol=arduino
  • uno.upload.maximum_size=32256
  • uno.upload.maximum_data_size=2048
  • uno.upload.speed=115200
  • uno.bootloader.tool=avrdude
  • uno.bootloader.low_fuses=0xFF
  • uno.bootloader.high_fuses=0xDE
  • uno.bootloader.extended_fuses=0x05
  • uno.bootloader.unlock_bits=0x3F
  • uno.bootloader.lock_bits=0x0F
  • uno.bootloader.file=optiboot/optiboot_atmega328.hex
  • uno.build.mcu=atmega328p
  • uno.build.f_cpu=16000000L
  • uno.build.board=AVR_UNO
  • uno.build.core=arduino
  • uno.build.variant=standard

Driver

Drive Purpose -
libusbK avrdude -
lisusb-win32 digi spark, EDAtiny -

Fuse Bit

Type Board Low High Extend Lock
EDAtiny 0xE1 0xDD 0xFE -
UNO FF DE 05 0F

Supported List

Avrdude-supported-list.png
  • avrdude -p ?

Example 1

  • Arduino as ISP (UNO) = programmer
  • target customized board atmega328p
  • test:
D:\avr-gcc\bin>avrdude -c avrisp -p m328p -P com4 -b 19200
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.04s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: Fuses OK (E:FD, H:DA, L:FF)
avrdude done.  Thank you.
  • ersult efuse FD, high fuse DA, low fuse FF

AVRDUDE + Arduino-ISP

D:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\bin>avrdude -CD:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\etc\avrdude.conf -c avrisp -p m328p -P com4 -b 19200
avrdude -CD:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\etc\avrdude.conf -c avrisp -p m328p -P com4 -b 19200
  • CMD1 - avrdude -CD:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\etc\avrdude.conf -c avrisp -p m328p -P com4 -b 19200
  • CMD2 - avrdude -CD:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\etc\avrdude.conf -c arduino -p atmega328p -P com4 -b 19200
  • CMD3 - avrdude -CD:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\etc\avrdude.conf -c arduino -p m328p -P com4 -b 19200
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.04s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: Fuses OK (E:FD, H:DA, L:FF)
avrdude done.  Thank you.

AVRDUDE + USBASP

  • cd D:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\bin
  • avrdude -CD:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\etc\avrdude.conf -c usbasp -p m328p -b 19200
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9489 (probably m16u2)
avrdude: Expected signature for ATmega328P is 1E 95 0F
        Double check chip, or use -F to override this check.
avrdude done.  Thank you.

Read ATMEGA328P

Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e950f (probably m328p) 
avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)
avrdude done.  Thank you.

Flash bootloader for Arduino UNO

avrdude -CD:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\tools\avr\etc\avrdude.conf -c usbasp -p m328p -b 19200 -U flash:w:"D:\Git-code\arduino\arduino-1.8.12-windows\arduino-1.8.12\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex":a

This category currently contains no pages or media.