WR Home      Topic Home      Chapter:  1  2  3  4 
<Previous Next>

Chapter 04

Using Avrdude with AVR Studio and Arduino

Page 5


Now plug-in the USB attached to Arduino board.
Find the communication port number which the Arduino is using (COM prot number)
Open Device Manager in Windows®
Go to My Computer -> Properties -> Device Mannager
OR
At a command prompt, in the Start Search box, or in the Run box, type the following command:
mmc devmgmt.msc

Depending on which arduino board you are using, you will see different views.
Click on the "+" to expand the tree view, Note the COM port number.
Arduino Duemilanove Device Manger
Ardunio UNO Device Manger
Arduino MEGA Device Manger

  1. The location for the external-tool "avrdude.exe" is already specifed by previous step.
  2. In this step, the arguments to the external tools are defined. Which Arduino you are using ?
    Arduino Duemilanove
    -c arduino -p m328p -P com5 -b 57600 -u -U flash:w:$(ItemFileName).hex

    Arduino UNO
    -c arduino -p m328p -P com5 -b 115200 -u -U flash:w:$(ItemFileName).hex

    Arduino MEGA 2560
    -C -patmega2560 -cwiring -P\\.\COM5 -b115200 -D -Uflash:w:$(ItemFileName).hex:i

    IMPORTANT NOTE: The path for avrdude.conf can also be passed as argument if you find error at a later stage
    For Example Arduino MEGA 2560
    -C "C:\Program Files\Arduino\hardware\tools\avr\etc\avrdude.conf"  -patmega2560 -cwiring -P\\.\COM5 -b115200 -D -Uflash:w:$(ItemFileName).hex:i
  3. Specify the file name to write in the flash memory.
  4. Append a .hex at the end of the command.


Passing Arguments to avrdude.exe


WR Home      Topic Home      Chapter:  1  2  3  4 
<Previous Next>