Skip to content

Uploading disabled without port selection #770

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

Closed
plampix opened this issue Jan 24, 2022 · 5 comments · Fixed by #1564
Closed

Uploading disabled without port selection #770

plampix opened this issue Jan 24, 2022 · 5 comments · Fixed by #1564
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@plampix
Copy link

plampix commented Jan 24, 2022

Is your feature request related to a problem? Please describe.
Compiling a project for a Digispark works great, however, uploading doesn't work (it doesn't do anything if I hit upload). Presumably because the Digispark doesn't present a 'port' to upload to.

Describe the solution you'd like
I'd like to be able to upload a project when there's no port selected, for hardware that doesn't upload using a static port.

Describe alternatives you've considered
Uploading the .hex from CLI. It works, but would be nice if we could do it from the GUI, like we used to in Arduino 1.x

@plampix plampix added the type: enhancement Proposed improvement label Jan 24, 2022
@per1234 per1234 self-assigned this Jan 24, 2022
@per1234
Copy link
Contributor

per1234 commented Jan 25, 2022

Thanks so much for reporting this @plampix.

I see there was a regression of arduino/arduino-pro-ide#364, which had been previously fixed by 2831acc

I bisected the regression to the 2.0.0-rc1 release. Uploading to boards without a port selected was still possible when using Arduino IDE 2.0.0-beta.12

To Reproduce

In case it will be helpful to the developers, I'll provide instructions to reproduce the issue.

  1. Quit the IDE if it is running.
  2. Delete the configuration folder:
    • Windows:
      C:\Users\<user name>\AppData\Roaming\arduino-ide\
      
    • Linux:
      ~/.config/arduino-ide/
      
    • macOS:
      ~/Library/Application Support/arduino-ide/
      
    This step is done because the IDE currently makes it otherwise difficult for those with internal serial ports to achieve the required state of having no port selected, due to the odd fallback port selection behavior (e.g., Port defaults to first available com port with lowest number not the last used #180).
  3. Start the Arduino IDE.
  4. Select Tools > Board > Arduino AVR Boards > Arduino Uno from the Arduino IDE menus.
    NOTE: I chose the Uno because you likely already have it installed, and the issue is not actually board-specific. You can install the "Digistump AVR Boards" platform and select the Digispark if you prefer a more realistic reproduction rather than a bare minimum demo.
    You should now have Arduino Uno selected, but no port selection.
  5. Select Sketch > Upload from the Arduino IDE menus.
    🐛 Note that nothing at all happens.
  6. Click the "Upload" button.
    🐛 Note that nothing at all happens.

Of course, in the case of the Uno, a port selection is needed for an upload, but that is not the case with all boards. We decided previously that, rather than making assumptions, the IDE should always trigger an upload and let the upload tool decide what to do. Those unwarranted assumptions were removed by 2831acc

Workaround

The problem is caused by the requirement imposed by the IDE that a port must be selected before an upload may be triggered, so the workaround is to select any serial port from the Tools > Port menu in the Arduino IDE.

The Digispark upload tool doesn't care about the port, so it makes no difference what the port is. If you don't happen to have a port available already, connect some device such as a regular Arduino board to your computer and use its port.

Related

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project and removed type: enhancement Proposed improvement labels Jan 25, 2022
@per1234 per1234 assigned AlbyIanna and unassigned per1234 Jan 25, 2022
@plampix
Copy link
Author

plampix commented Jan 25, 2022

@per1234 Thanks a lot for confirming the issue. I didn't look at the beta releases, so I assumed it never worked in v2.

@mklemarczyk
Copy link

Hello I have the same issue with IDE version rc5 and Arduino Mbed OS RP2040 Boards v3.0.0.
I use Raspberry Pi Pico from official distribution. Tested under Windows 10 64-bits.

The workaround works when the device is in boot mode that mount the flash as a drive.
I connected any Arduino board, just to be able to select COM port for the project.
The project was properly loaded to the Pico device.

On the other hand, similar device Arduino RP2040 Connect does not need the workaround. Even the device is mounted as storage device, the IDE detects some COM port for Arduino Connect.

It is good to mention, once the program is loaded the device COM port is detected. And program can be loaded without need of fake COM port.

@AndKe
Copy link

AndKe commented Apr 22, 2022

@per1234 Thank you - the workaround worked as advertised :)

@FarhanKhosravi
Copy link

The problem still exist - we always need to make a fake serial port to make ST LINK working...
it's not hard to fix, please work on it in next updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants