views:

261

answers:

2

hello,

i am trying to run a source code of win avr . after making the makefile when i try to send it using avrdude it is giving me error.

Please any one can help me

+2  A: 

In the absence of better information on the actual error, here's a list of things to check when programming microcontrollers:

  • Is the power supply correct?
  • Is the oscillator running?
  • Is reset correctly configured?
  • Do you have proper bypass capacitors on the power pins of the target chip?
  • Are the programming wires correctly connected?
  • Are there any electrical conflicts on the programming lines?
  • Is the avrdude powering it, or is the project self powered?
  • What's the voltage at the pins on the microcontroller? Is it correct?
  • What's the overall circuit current draw? If it's high or low, look for shorts and opens.
  • Did you specify an erase command before a program command?
  • Does the mass erase or blank command work?
  • Can you see the programmer on the serial/usb/etc port?
  • Have you swapped out the target chip?
Adam Davis
+1  A: 

See the avrdude homepage for more information http://savannah.nongnu.org/projects/avrdude/

Check that you are setting the correct part no, port and programmer when calling avrdude, eg:

avrdude -p m8 -c stk200 -P lpt1 ...etc

If you're using MFile to generate the Makefile, then these should be set for you. Open the generated Makefile using your editor and check the values of

MCU
AVRDUDE_PROGRAMMER
AVRDUDE_PORT

Make sure they correspond to your microcontroller and programmer.

Peter Gibson