Description
Describe the problem
Arduino boards platforms may associate a board definition with port identification properties. Arduino IDE identifies a port as being that board when the port has these properties.
The platform framework doesn't provide any mechanism for restricting the association of a given set of identification properties to a single board definition, so it is possible (and even inherent to some use cases) for a port to be identified with multiple board definitions.
🐛 If the port of the target board is identified with multiple board definitions, the Firmware Updater fails.
To reproduce
Equipment
One of the boards supported by the "WiFi101 / WiFiNINA Firmware Updater" feature:
Steps
- Select File > Quit (or Arduino IDE > Quit Arduino IDE for macOS users) from the Arduino IDE menus if it is running.
- Click the following link to download the dummy boards platform used to efficiently create the conditions required to produce the fault:
hardware.zip - Unzip the downloaded file to your sketchbook folder.
The folder structure should look like this:<sketchbook location>/ ├── hardware/ │ └── fwuploader-board-dummies/ │ └── foo/ │ └── boards.txt [...]
- Start Arduino IDE.
- Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
- Select "Developer (Arduino): Clear the Board and Port Selection" from the Command Palette menu.
- Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
- Select "Developer (Arduino): Clear the Board List History" from the Command Palette menu.
ⓘ This and the three steps before are not required to reproduce the fault that is the primary subject of this report. They are included in order to demonstrate a related fault associated with the conditions of using "WiFi101 / WiFiNINA Firmware Updater" when there are multiple identifications of the target port. - Connect the firmware update target board to your computer with a USB cable if it is not already.
- Select Tools > WiFi101 / WiFiNINA Firmware Updater from the Arduino IDE menus.
The "WiFi101 / WiFiNINA Firmware Updater" dialog will open. - Attempt to select the target board from the "Select Board" menu in the "WiFi101 / WiFiNINA Firmware Updater" dialog.
🐛 The menu doesn't open. - Close the "WiFi101 / WiFiNINA Firmware Updater" dialog.
- Select the port of the target board from the Board Selector menu on the Arduino IDE toolbar.
The "Select Other Board and Port" dialog will open. - Select the board name that does not have a "(dummy)" suffix from the "BOARDS" menu.
- Click the "OK" button.
- Select Tools > WiFi101 / WiFiNINA Firmware Updater from the Arduino IDE menus.
- Select the target board from the "Select Board" menu in the "WiFi101 / WiFiNINA Firmware Updater" dialog.
- Click the "CHECK UPDATES" button.
- Click the "INSTALL" button.
🐛 The update process immediately fails:
⚠ Installation failed. Please try again.
Clean up
- Delete the folder of the dummy platform at the
hardware/fwuploader-board-dummies
subfolder of your sketchbook folder.
Expected behavior
It is possible to update firmware on target boards for which the port has multiple identifications.
Arduino IDE version
Operating system
Windows
Operating system version
11
Additional context
I bisected the regression to 69ae38e (neither of the faults occur when using the build from the previous commit 9a6a457 under the same conditions).
The minimal "dummy" boards platform used to produce the required conditions in the demo is not anything a real user would have installed, but the fault also occurs in the more common (but more work to reproduce) conditions of having an additional real boards platform installed that associates a board definition with the identification properties of the target board's port. A real world example of this would be having both a release version and a development version of a platform installed at the same time, as is common for platform developers and beta testers.
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details