Trying to use avrdude but error occurs

I'm trying to use avrdude to upload an assembly file (.hex) to my arduino mega 2560, but a very strange error occurs.

I type this on the command line:

avrdude -p m2560 -c stk500 -e -U flash:w:myfile.hex

and I get this error:

error at C:\WinAVR-2100110\bin\avrdude.conf:320 unrecognized character "a"

What is this?

What does line 320 of C:\WinAVR-2100110\bin\avrdude.conf look like?

  id    = "arduino";
  desc  = "Arduino";
  type  = arduino;

Line 320 is type = arduino;

I really need this to work, and I've spent about 3 hours today trying to figure out why it's not working.

What does this output?

avrdude -v

Version 5.4

AVRDUDE version 5.10 comes with WinAVR 2100110.

AVRDUDE version 5.4 comes with Arduino.

You're running the Arduino AVRDUDE but it's finding and trying to use the WinAVR configuration file. You have a problem with your PATH environment variable. Remove all references to your Arduino directories from PATH.

Thank you very much! You have made my day :grin: