Discussion AVRdude

From media_wiki
Revision as of 03:25, 23 March 2019 by U731219879 rc (talk | contribs) (Created page with "''' AVRdude Basics Setup ''' ---- '''Windows Setup''' 1. AVRdude Web Page: '''http://savannah.nongnu.org/projects/avrdude''' 2. Select http://http://download.savannah.g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

AVRdude Basics Setup


Windows Setup
1. AVRdude Web Page:  http://savannah.nongnu.org/projects/avrdude 
2. Select [Download Area] 
3. Select latest Version: avrdude-6.3-mingw32.zip  
4. Create new folder for AVRdude and install AVRdude in that folder.
5. Open CMD.exe (Windows Command Line) 
6. Find and Open the AVRdude program. Windows Example: C: Documents\AVRDude-V6-3. cd Documents\AVRDude-V6-3
7. Type “avrdude”  The avrdude help menu should display a list of commands.
Linux Setup
Check that AVRdude 6.3 is installed and working.
1. Open terminal and type "avrdude". AVRdude should display the help menu.
If it does not display the help menu then enter the following in the terminal:
sudo apt install avrdude. Repeat step one to ensure it is working.

AVRdudeHelpPic.PNG


AVRdude Basics Commands - Options

List of Avrdude commands Used for this workshop 
Options         Description
-p 	<partno> Required. Specify AVR device.  
-c 	<programmer> Specify programmer type. 
-P 	<port>Specify connection port.
-e	Perform a chip erase.  
-U	<memtype>:r|w|v:<filename>[:format] Memory operation specification. 	
        Multiple -U options are allowed, each request is performed in the order specified.
-t	Enter terminal mode. 
-v	Verbose output. -v -v for more. 
-?	Display this usage.
-b 	<baudrate> Override RS-232 baud rate.
-C 	<config-file>Specify location of configuration file.
-F	Override invalid signature check.
-V	Do not verify.
Not covered in this Workshop
 -B 	<bitclock> Specify JTAG/STK500v2 bit clock period (us).
 -D	Disable auto erase for flash memory
 -i 	<delay> ISP Clock Delay [in microseconds]
 -O	Perform RC oscillator calibration (see AVR053).
 -n	Do not write anything to the device.
 -u	Disable safemode, default when running from a script.
 -s	Silent safemode operation, will not ask you if fuses should be changed back.
 -E	<exitspec>[,<exitspec>] List programmer exit specifications.
 -x	<extended_param> Pass <extended_param> to programmer.
 -y	Count # erase cycles in EEPROM.
 -Y	<number> Initialize erase cycle # in EEPROM.
 -q	Quell progress output. -q -q for less.
 -l	logfile Use logfile rather than stderr for diagnostics.
 
List of frequently used Avrdude Command line Examples:
Show the Avrdude Help Menu: avrdude USBTiny Display Device info: avrdude -c usbtiny -p m328p USBasp Display Device info: avrdude -c usbasp -P usb -p m328p USBTiny Display Verbose info: avrdude -c usbtiny -p atmega328p -v Write hex file to Microcontroller: avrdude -c usbtiny -p m328p -U flash:w:blink.hex:i Read Microcontroller and Write file: avrdude -c usbtiny -p m328p -U flash:r:blink.hex:r Erase flash: avrdude -c usbtiny -p atmega328p -e Terminal Mode: avrdude -c usbtiny -p atmega328p -t Capture flash memory data: avrdude -c usbtiny -p m328p -t > dumpflash.txt Using the terminal Mode: then type the following: dump flash 00 1024 then wait a min for it to create and write the file then type quit.

AVRdude Basics Terminal Commands - Options

Entering Terminal Mode: avrdude -c usbasp -P usb -p m328p -t

Avrdude Terminal Mode Valid commands:

 dump 	: dump memory  : dump <memtype> <addr> <N-Bytes> dump flash 00 1024
 read 	: alias for dump 
 write 	: write memory : write <memtype> <addr> <b1> <b2> ... <bN> 
 erase	: perform a chip erase erase
 sig 	: display device signature bytes
 part 	: display the current part information
 send 	: send a raw command : send <b1> <b2> <b3> <b4>
 Parms	: display adjustable parameters (STK500 only)
 vtarg  	: set <V[target]> (STK500 only)
 varef 	: set <V[aref]> (STK500 only)
 fosc 	: set <oscillator frequency> (STK500 only)
 sck 	: set <SCK period> (STK500 only)
 spi 	: enter direct SPI mode
 pgm	: return to programming mode
 verbose: change verbosity
 help 	: help
 ?   	: help
 quit	: quit


Use the 'part' command to display valid memory types for use with the
'dump' and 'write' commands.

AVRDUDE Class