Skip to content
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

Simplify board and port handling #1319

Closed
3 tasks done
per1234 opened this issue Aug 12, 2022 · 4 comments · Fixed by #2165
Closed
3 tasks done

Simplify board and port handling #1319

per1234 opened this issue Aug 12, 2022 · 4 comments · Fixed by #2165
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Aug 12, 2022

Describe the request

Emulate the tried and true reliable behavior of Arduino IDE 1.x regarding board and port selection.

  • Always use the board the user selected.
  • Always use the custom board options the user selected.
  • Always use the port the user selected. *

🙂 Users will not be subjected to confusion or frustration caused by the IDE automatically selecting an incorrect board and port
🙂 Removal of this highly complex system will make the Arduino IDE 2.x code base easier to maintain and develop

* There is one exception to this rule: when uploading to a board that has native USB capabilities, the CDC serial port of the board enumerates at the start and end of the upload. Most often, the port will have the same name at the end of the upload as at the start, but it is possible that the operating system will assign it a different name, and that final port should be selected in the IDE after the completion of the upload. Arduino CLI already handles the port switch at the start of the upload, so it should also be responsible for determining the port name at the completion of the upload and providing Arduino IDE with that information (arduino/arduino-cli#2245).

Describe the current behavior

Arduino IDE 2.x attempts to automatically select the appropriate board and port for the user.

The concept is certainly commendable, and when it works correctly it is convenient. However, when it does not work correctly, it can cause confusion to less experienced users who won't notice that the automatic board or port selection is incorrect, or frustration to users who do notice and must fight the automated system to attain the correct selection.

Examples of problems:

This is not a matter of a regression of a system that worked at one time, but rather an highly complex system that never worked correctly from the start of the 3 year development of the code base. So there is no reason to think it can be fixed as a simple bug.

Arduino IDE version

2.0.0-rc9.2

Operating system

All

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Aug 12, 2022
@Willem43T
Copy link

Willem43T commented Aug 12, 2022

Maybe I am misunderstanding per1234's request, but I do NOT want IDE 1.xx behavior when it comes to processor and port selection.

Example for IDE 1.xx:
I have two IDE instances open. One for an Atmega328P, no bootloader, using port 11 with an Atmega32U4 programmer. The other for an Attiny1614 on port 9 using an UPDI programmer. Only one processor, port and programmer can be selected at a time. I need to reselect all every time I change between the sketches. I usually end up with a mess somewhere along the line.

Example for IDE 2:
The same two IDE instances with the same sketches. I select the processor port etc. once for each sketch and it sticks, even after closing and reopening (I sometimes need to reselect the ports when initially loading the sketches if I have the USB cables on different ports - no big problem). I can effortlessly switch and upload between them. That is one of the reasons I have been using version 2 from very early on and avoid using version 1.

Now, I do not say it is faultless. Also I do not use any of the processors or boards mentioned in the above examples so I cannot comment on those issues. The current system does, however, work for me and I would hate to loose the those features.

@per1234
Copy link
Contributor Author

per1234 commented Aug 12, 2022

Hi @Willem43T. Thanks for bringing up this important point.

You did misunderstand. My proposal is only about how the board and port selection should be handled within each window individually.

In fact, the ability to have a different board and port selected in each window is aligned with my proposal in that this is all about the allowing the user to have complete control over the board and port selection, without any interference from the IDE.

@Willem43T
Copy link

Phew. Thanks @per1234 for clearing that up. You had me really worried.

Everything else is coming on great. Keep up the great work.

@Franck78

This comment was marked as off-topic.

@kittaakos kittaakos added the status: in progress Work is in progress on this label Jul 19, 2023
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jul 21, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jul 25, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jul 26, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jul 27, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jul 28, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Jul 31, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Aug 2, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Aug 3, 2023
Closes arduino#1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 14, 2023
Closes #1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 16, 2023
Closes #1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 16, 2023
Closes #1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
per1234 pushed a commit that referenced this issue Aug 17, 2023
Closes #1319

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 17, 2023
Closes #43
Closes #82
Closes #1319
Closes #1366
Closes #2143
Closes #2158

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos added a commit that referenced this issue Aug 18, 2023
Use Arduino CLI revision `38479dc`

Closes #43
Closes #82
Closes #1319
Closes #1366
Closes #2143
Closes #2158

Ref: arduino/arduino-cli@38479dc

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added conclusion: resolved Issue was resolved and removed status: in progress Work is in progress on this labels Aug 30, 2023
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: enhancement Proposed improvement
Projects
None yet
7 participants