New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload using usbasp programmer looks for a valid serial port #1791

Closed
Lauszus opened this Issue Jan 5, 2014 · 8 comments

Comments

8 participants
@Lauszus
Contributor

Lauszus commented Jan 5, 2014

When trying to upload using a usbasp programmer directly you need to select a valid serial port as well, but this should not be needed as -Pusb is passed to avrdude.

For instance I get the following error message:

Board at /dev/tty.usbserial-AH00S1Pl is not available

A workaround is just to plug in some serial device - like a FT232 adapter and then select that serial port. After that I am able to upload using the usbasp.

It only seems like the "Upload Using Programmer" option is affected, since I am able to upload the bootloader without this workaround.

@finsprings

This comment has been minimized.

Show comment
Hide comment
@finsprings

finsprings Feb 18, 2014

I see this too. Thanks for the workaround!

finsprings commented Feb 18, 2014

I see this too. Thanks for the workaround!

@damellis

This comment has been minimized.

Show comment
Hide comment
@damellis

damellis May 23, 2014

Member

This seems to be due to a check for the presence of the port in Sketch.upload(). A quick fix would be to skip the check when doing upload using a programmer (and keep it only for regular upload). A better option would probably be to only do the check if the upload actually uses the serial port, which would (I think) require inspecting the command line arguments / preferences from the programmers.txt file.

Anyone want to take a shot at a patch?

Member

damellis commented May 23, 2014

This seems to be due to a check for the presence of the port in Sketch.upload(). A quick fix would be to skip the check when doing upload using a programmer (and keep it only for regular upload). A better option would probably be to only do the check if the upload actually uses the serial port, which would (I think) require inspecting the command line arguments / preferences from the programmers.txt file.

Anyone want to take a shot at a patch?

@damellis

This comment has been minimized.

Show comment
Hide comment
@damellis

damellis Jun 11, 2014

Member

BTW, another case where this is a problem is when the auto-reset on your Leonardo isn't working (e.g. because you disable interrupts and never re-enable them). In 1.0.x, you can still upload to the Leonardo by holding down the reset button on the board, pressing upload, and then releasing the reset button shortly after the upload starts. (The Leonardo bootloader will start when you release the reset button and create a new serial port; the IDE will see that new serial port and upload to it.) In 1.5.x, this doesn't work because the Leonardo serial port disappears when you press the reset button, so the upload won't start.

Member

damellis commented Jun 11, 2014

BTW, another case where this is a problem is when the auto-reset on your Leonardo isn't working (e.g. because you disable interrupts and never re-enable them). In 1.0.x, you can still upload to the Leonardo by holding down the reset button on the board, pressing upload, and then releasing the reset button shortly after the upload starts. (The Leonardo bootloader will start when you release the reset button and create a new serial port; the IDE will see that new serial port and upload to it.) In 1.5.x, this doesn't work because the Leonardo serial port disappears when you press the reset button, so the upload won't start.

@cmaglie

This comment has been minimized.

Show comment
Hide comment
@cmaglie

cmaglie Jun 13, 2014

Member

Fixed by #2126

Member

cmaglie commented Jun 13, 2014

Fixed by #2126

@cmaglie cmaglie closed this Jun 13, 2014

@matthijskooijman

This comment has been minimized.

Show comment
Hide comment
@matthijskooijman

matthijskooijman Oct 22, 2014

Collaborator

For future improvements, some user ran into this problem using the USBASPloader. So this problem is not limited to the upload using programmer option, it can occur with regular uploads too.

Collaborator

matthijskooijman commented Oct 22, 2014

For future improvements, some user ran into this problem using the USBASPloader. So this problem is not limited to the upload using programmer option, it can occur with regular uploads too.

@cjdg

This comment has been minimized.

Show comment
Hide comment
@cjdg

cjdg Apr 7, 2016

Is not working on latest arduino 1.6.8

cjdg commented Apr 7, 2016

Is not working on latest arduino 1.6.8

@sixtyfive

This comment has been minimized.

Show comment
Hide comment
@sixtyfive

sixtyfive Dec 14, 2017

Just downloaded the hourly and I'm still getting

An error occurred while uploading the sketch
avrdude: ser_open(): can't open device "COM1": No such file or directory

despite there being no way of changing the port setting. What am I doing wrong?

sixtyfive commented Dec 14, 2017

Just downloaded the hourly and I'm still getting

An error occurred while uploading the sketch
avrdude: ser_open(): can't open device "COM1": No such file or directory

despite there being no way of changing the port setting. What am I doing wrong?

@sixtyfive

This comment has been minimized.

Show comment
Hide comment
@sixtyfive

sixtyfive Dec 14, 2017

Oh, nevermind, figured it out. For all you other unlucky googlers: you need to do Ctrl-Shift-U instead of Ctrl-U when using an USBASP.

sixtyfive commented Dec 14, 2017

Oh, nevermind, figured it out. For all you other unlucky googlers: you need to do Ctrl-Shift-U instead of Ctrl-U when using an USBASP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment