Board menu overload... Opt-In?

Might there be a way to slim down the board menu options to the ones that a user might, um, use/own?

For example. Say only the ""Arduino UNO and Generic ESP8266xxxxxx" are used. Can the other board options be removed with ease? An Opt in to the ones that are obtained over time/budget.

Hi @hoppyguy. It is possible to hide boards by adding a hide property to their board definition in the platform:

https://arduino.github.io/arduino-cli/latest/platform-specification/#hiding-boards

I'll provide instructions:

Hiding Arduino AVR Boards

  1. Click the following link to download the attachment:
    boards.local.txt (799 Bytes)
  2. Wait for the download to finish.
  3. Select File > New Sketch from the Arduino IDE menus.
  4. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  5. Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
  6. Click the "OK" button.
  7. Select Tools > Board > Arduino AVR Boards > Arduino Uno from the Arduino IDE menus.
  8. Select Sketch > Verify/Compile from the Arduino IDE menus.
  9. Wait for the compilation to finish.
  10. Scroll the black "Output" panel at the bottom of the Arduino IDE window all the way up to the top. You will see a line that has this form:
    Using board 'uno' from platform in folder: C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
    
  11. Copy the boards.local.txt file you downloaded at step (1) of these instructions to the folder at the path you see in that line of the output.
    The folder might be hidden in your File Manager.

Hiding ESP8266 Boards

  1. Click the following link to download the attachment:
    boards.local.txt (1.0 KB)
    :exclamation: Even though it has the same filename as the attachment at step (1) of the AVR instructions, this file has completely different contents and is not interchangeable with the other one.
  2. Wait for the download to finish.
  3. Select File > New Sketch from the Arduino IDE menus.
  4. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  5. Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
  6. Click the "OK" button.
  7. Select Tools > Board > esp8266 > Generic ESP8266 Module from the Arduino IDE menus.
  8. Select Sketch > Verify/Compile from the Arduino IDE menus.
  9. Wait for the compilation to finish.
  10. Scroll the black "Output" panel at the bottom of the Arduino IDE window all the way up to the top. You will see a line that has this form:
    Using board 'generic' from platform in folder: 
    C:\Users\per\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2
    
  11. Copy the boards.local.txt file you downloaded at step (1) of these instructions to the folder at the path you see in that line of the output.
    The folder might be hidden in your File Manager.

After you have both those files in place, select File > Quit from the Arduino IDE menus to close all Arduino IDE windows and then start the IDE again. You should now see that the only board listed under the Tools > Board > Arduino AVR Boards menu is "Arduino Uno", and the same for Tools > Board > esp8266 > Generic ESP8266 Module.

If you later decide you want other boards to show in the menu, just open the relevant boards.local.txt file in any text editor and add a # to the start of the line for the relevant board in the file, then save the file and restart the IDE. For example, if you wanted to unhide the "Leonardo" board, you would change this line in the AVR boards.local.txt file:

leonardo.hide=true

To this:

#leonardo.hide=true

You will need to replace the boards.local.txt files after each time you update the "Arduino AVR Boards" or "esp8266" platforms via the Arduino IDE Boards Manager. You might want to save copies of those files in a safe location to make that process easier.


As for providing a more user friendly way to accomplish the same via the Arduino IDE GUI, this request is tracked by the Arduino IDE developers here:

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

image

Well that was far more then what I was expecting.
Much thanks for that amount of detail.

:slight_smile:

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.