Go Down

Topic: Arduino Mega code uploading using AVRDUDE (Read 474 times) previous topic - next topic

knowledge

I want to upload code to arduino by simply running  .exe file. So im trying with command line first I am uploading code to arduino using command but I need to select port number by using instruction -PCOM23. I have tried command -PavrispmkII to but not successful .

Please suggest.

pert

Please provide a more detailed description of what you're trying to accomplish.

I have tried command -PavrispmkII to but not successful
Do you have an AVRISP mkII ISP programmer connected to your Arduino board?

knowledge

#2
Aug 02, 2019, 08:10 am Last Edit: Aug 02, 2019, 01:30 pm by knowledge
Hey, I am using USB cable to program arduino. using following command line:

"<avrdude path>" "-C<avrdude.conf path>" -q -q -patmega2560 -cwiring -PCOM44 -b115200 -D -Uflash:w:C:\Users\code.ino.hex:i

But is there a way that I don't have to select port number.

If there is update to current version in firmware customer should be able to upload the code with minimum efforts that's the goal.

pert

If you want to upload over the USB cable of the Arduino Mega then you need to specify the serial port. If you are using a pure USB ISP programmer like the AVRISP mkII or USBASP connected to the ICSP header on the Mega then you don't need to specify the serial port.

Maybe you can find some way to automatically determine the correct serial port using the VID/PID of the Mega. I don't know how that would be done. It definitely would take some separate program from avrdude.

Budvar10

Serial port above 9 must be specified on windows: -P\\.\COM44 and it works also for port numbers less than 10.
As @pert wrote, for the programmers like USBasp you need not port number, just programmer type like: -cUSBasp.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Go Up