Out of curiosity, I am trying to upload a simple hex file to Arduino UNO using avrdude from windows command prompt.
As per this forum, I tried to implement it. But got stuck at
avrdude: ser_open(): can't open device "COM41": The system cannot find the file specified.
This command was directly imported from Arduino IDE verbose, and also it works fine when uploaded with Arduino IDE. I checked both the device and syntax are correct unless I would not be able to generate the hex file by Arduino compiler.
P.S. I have installed Winavr separately although it was pre-installed by Arduino itself.
Here is a snapshot of the error command prompt
What could be the possible reason for it to fail? Please notify, if anything is missing.
-
I seems like you are using a different avrdude, as normally arduino uses the avrdude binary that is inside the arduino application folder. Also the avrdude conf-file is missing. So it looks to me like you have modified the command "directly imported" from the IDE.Gerben– Gerben2016年08月06日 09:18:07 +00:00Commented Aug 6, 2016 at 9:18
-
@Gerben I downloaded the software Winavr and installed it separately. This is not the avrdude that was present inside arduino application folder.goddland_16– goddland_162016年08月07日 17:30:36 +00:00Commented Aug 7, 2016 at 17:30
2 Answers 2
After a lot of experiment, I finally made it. I got to know from some forum that when COM PORT is greater than 10, you have to put a '.' after COM PORT setting e.g. -P.COM41.
But, unfortunately that did not work. Then I changed the COM PORT to under 10 in device manager -> Properties -> COM Port Setting -> Advanced Setting; e.g. COM6. Then it worked. At the time of flash just I have to press the RST button for once. And now bingo!!
Still, I will try to find out why it didn't work with higher COM Port.
can't open device "COM41": The system cannot find the file specified.
This means there is no device at COM41
. This may be due to 2 reasons:
You may not have connected your arduino. If this is the case then you please connect the arduino and retry
Your arduino might be on a different COM port. If this is the case, then, go to device manager and check your arduino's COM port and replace
COM41
with that and retry.
-
No, that is not the case here. As I said I have connected the Arduino and in the device manager it showed COM41. And I can easily program it from arduino IDE, but when I try to upload using Avrdude it shows this particular error.goddland_16– goddland_162016年08月07日 17:27:22 +00:00Commented Aug 7, 2016 at 17:27
Explore related questions
See similar questions with these tags.