Bug, or incomplete documentation (access to Examples for UNO R4 WiFi)

According to the "Getting Started" documentation for the Arduino UNO R4 WiFi, it should be possible to access the board-specific example sketches (e.g., File > Examples > LED_Matrix > GameOfLife) immediately after the board has been connected, the board package installed, and the board has been selected in the board selector drop-down.

However, while leading a group of trainees through the installation process, it became apparent that the board-specific examples ("Examples for Aurduino Uno R4 WiFi") did not become available in the IDE's File > Examples menu until after the IDE had first been closed and restarted.

So my questions are:

  • Can anybody else verify this behavior in a new installation? (I saw it on multiple different computers.)

  • If I file a bug report, is it a Documentation issue or an IDE issue?

I just tried it and did NOT have to restart the IDE. I am using the IDE2 on a Mac. I think you changed so much, or your OS didn't detect the files changing.

I did a little googling and found several Arduino docs that say the IDE should be restarted. Sometimes you get lucky and don't need to, and I suspect your OS makes a difference as well.

Thanks.

Would you mind sharing one such link (or your search terms — I did not have much luck with site:arduino.cc installation "select board" "restart ide")?

I believe that these were all Windows computers (which had never previously had an Arduino IDE installed, in case that makes a difference).

The process was:

  1. Download and install IDE 2.4.3 (MSI installer).
  2. Launch IDE and allow all required drivers to be installed.
  3. Connect Arduino Uno R4 WiFi board via USB.
  4. Select board to install board package.
  5. Test by uploading a new sketch (this does work!).
  6. Open File > Examples.

Everyone who followed this process in our group today could only see the "Built-in Examples" (0111), and no one saw the "Examples for Aurduino Uno R4 WiFi" unless the IDE was restarted.

I am not surprised your search didn't work. Here is what I entered

does the arduino ide have to be restarted after adding boards, libraries

5 restart hits on this page (not one I checked earlier)
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html
Another is on https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries/


Another at https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE

What I meant by OS is some are better at 'noticing' some files have appeared or changed in the file space they are monitoring. If you don't have some experience in building systems and how they work, then it probably isn't obvious, but it is to those who do. Anyway, feel free to post an issue, not against documentation, though, maybe IDE.

Thanks for the links (and for the tips on How to Google in the Age of AI).

I'll do some more testing (maybe on a macOS system) and perhaps raise an issue on GitHub.

You caught that, did you? Yes, with AI, you google differently. Did you notice the one hit was specific to the example code? Note it was reported a while ago. Items with workarounds are very low priority in the fix queue.

Yes, but it implied this was an issue only "with older IDE versions".

What, on GitHub?

Modifying the documentation to explicitly call for an IDE restart may be an easier "fix".

Thanks for your report @grb. I am able to reproduce the fault and have submitted a formal report to the Arduino IDE developers on your behalf:

If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:


:exclamation: Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.


@ptillisch Thank you!

I have a few follow-up questions, based on your GitHub report:

For most official boards, this can be done even before the board's platform has been installed (the board's identification properties are sent to the "Arduino Builder API").

Is there a preferred installation sequence, that allows the board platform to be installed prior to board selection in the IDE? The reason I ask, is that I am writing an installation guide that will be distributed to a group of about 100 trainees, and if there is a canonical method to get the board platform installed, I would like to include it in my instructions. Alternatively, I can just add a step in the instructions to restart the IDE after the board package has been installed.

Although the board can't actually be used until the platform is installed, this allows Arduino IDE to automatically offer the installation of the platform, supporting a natural user flow for the first use of a board.

When we did a dry-run with a handful of trainees yesterday, they were able to "use" the board, in the sense that it was possible to upload a new sketch (with no instructions), and this resulted in the factory-installed code (display of a heart frame on the LED matrix) to be replaced (the heart icon was no longer displayed on the board).

Is this consistent with your understanding of this bug?

I wouldn't say "preferred", as the approach you took when you encountered the bug is perfectly reasonable and Arduino IDE is intended to work perfectly under those conditions.

However, there is an alternative approach which is also valid, and which is not affected by the bug. I'll provide instructions for that installation procedure:

  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Scroll down through the list of boards platforms until you see the "Arduino UNO R4 Boards" entry.
  3. Click the "INSTALL" button at the bottom of the entry.
  4. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

After installing the "Arduino UNO R4 Boards" platform by following the instructions above, when you select the Arduino UNO R4 WiFi board from the board selector on the Arduino IDE toolbar, you will see the examples under the File > Examples menu as expected.

Please let me know if you have any questions or problems while following those instructions.

Yes. The problem is that Arduino IDE populates the File > Examples menu with the library examples when you select a new board. But if you select the board before the Arduino UNO R4 Boards platform has been installed then it doesn't have the data it needs to populate the menu.

But, other than the missing menu items, everything else is perfectly functional once the platform is installed. It is only a problem in the GUI, not anything broken in the underlying functionality. And in fact if you used File > Open to open the examples, they would open and compile just fine even if not shown in the menu (but that is not very user friendly compared to selecting them from a menu so I'm not actually suggesting you do this).

Maybe a stupid question but how can one select a board for which the board package is not installed?

The "board selector" menu on the Arduino IDE toolbar is a list of the "ports" discovered by the IDE. A board model may be associated with a port, and when there is such an association, the board model is selected in addition to the port when the user selects an item from the "board selector".

When Arduino IDE discovers a port, it checks to see if a board definition in any of the installed platforms has specified an association with the properties of that port. If so, it will use that board model for the board selected menu item for the port. In this case, selecting that menu item is functionally identical to selecting the board model from the Tools > Board menu and the port from the Tools > Port menu.

If Arduino IDE does not find an associated board definition for a port, it makes a request to the get /v3/boards/byVidPid/{vid}/{pid} endpoint of the "Arduino Builder API":

https://builder.arduino.cc/docs#!/boards95v3/boards_v3_byVidPid

For example, if the port was produced by an UNO R4 WiFi board, it will make this request:

https://builder.arduino.cc/v3/boards/byVidPid/0x2341/0x1002

(2341:1002 is the VID/PID pair of the UNO R4 WiFi)

which returns this response:

{
  "architecture": "renesas_uno",
  "fqbn": "arduino:renesas_uno:unor4wifi",
  "href": "/v3/boards/arduino:renesas_uno:unor4wifi",
  "id": "unor4wifi",
  "name": "Arduino UNO R4 WiFi",
  "package": "arduino",
  "plan": "create-free"
}

From this information, Arduino IDE is able to identify the port as an UNO R4 WiFi board.

The reason for doing this is so that Arduino IDE can automatically offer the installation of the required platform:

So in order to get set up to use a new board, the user only needs to connect the board to their computer, select the item for that board from the prominent menu on the Arduino IDE toolbar, and then click the "YES" button on the friendly notification that appears.

Thanks for that. I guess it's because I live in an AVR-only world that I have never seen that notification. And 99% of the time I use the tools → boards menu; it's only by accident that I use the selector.

Yeah. You would see the same behavior with one of the AVR boards that have a dedicated VID/PID pair when the "Arduino AVR Boards" platform is not installed. However, since that platform is bundled with Arduino IDE 1.x, and automatically installed on the first run by 2.x, it is unlikely that those conditions will ever exist during real world usage of the IDE.