Description
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:
- Unexpected board+port selection change when board is disconnected #2143
- Following an upload, port selection lost when reset causes port address cycle #1648
- Selection of port lost on upload when protocol other than
serial
/network
and no "recognized" board #1366 - Port changes on native USB upload when two ports are associated with the selected board name #710
- Board selection reverts after a "Save As..." #657
- Serial port re-enumerates after upload with SAMD boards (probably other USB native) #287
- Adafruit Trinket M0 won't persist port #82
- Port selection of Portenta H7 (M4 Core) is lost on every upload #43
- https://forum.arduino.cc/t/arduino-ide-2-esp32-s3-forgets-port/1129591
- https://forum.arduino.cc/t/what-is-2-2-dfu-arduino-ide-2-1-1/1151632/4
- https://forum.arduino.cc/t/serial-monitor-connection-breaks-on-each-upload/1151650
- https://forum.arduino.cc/t/nano-esp32-ide2-keeps-using-dfu-port-which-doesnt-work/1154858
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