Description
Tested on nightly: 28 September 2018 3:2:58 GMT
OS: macOS 10.14
The Bug
Attempting to upload a sketch using USBtinyISP as the selected programmer will always fail on macOS with the error "Please select a Port before Upload". This is a bug because, as far as I understand, USBtinyISP is a USB device, not serial, so it is impossible to select a Port for it (this is at least true of the Adafruit Trinket).
This is a regression bug; uploading works fine on 1.6.13.
According to another party this bug is not present on Windows.
Steps to reproduce:
- Write an LED blink sketch (or any sketch)
- Select Tools->Board->Adafruit Trinket (ATtiny85 @ 8MHz)
- Select Tools->Programmer->USBtinyISP
- Click Upload
Error Message:
Please select a Port before Upload
Expected Behavior:
Arduino IDE should not require a Port to be selected when the programmer is USBtinyISP.
Opinion:
Looking through the code, it seems this was a "feature" added some point after v1.6. Before, the code didn't care if there was a serial port or not and would just blunder forward through newUploader
anyway (with boardPort
left as null
). The correct fix, I guess, is for getUploaderByPreferences
to be aware of which Programmer is selected and whether it needs a serial port or not. Alternatively this feature could simply be rolled back (I've found no way to work around it; so it breaks Arduino 1.8 on macOS).