IDE 2.3.2 How to hide boards?

I'm using IDE 1.8.9 and 2.3.2 on the same Windows PC.
a) Are both versions using the same user folder for the installed cores?
C:\Users\{username}\AppData\Local\Arduino15

b) should hiding of boards with entries in boards.local.txt (... boardname.hide= ) also work in 2.3.2 similar to 1.8.9 or is there any other way to hide unused boards?

Hi @noiasca

Yes.

Pretty much. However, there was an undocumented breaking change to the function of the hide property.

In Arduino IDE 1.x, it is merely the definition of the property that causes the board to be hidden, with the value of the property being irrelevant. So, for example, adding this line to the boards.local.txt file of the "Arduino AVR Boards" platform would cause the "Arduino Uno" board to be hidden in Arduino IDE 1.x:

uno.hide=

In Arduino IDE 2.x, the Boolean value of the property controls whether or not the board is hidden. So the above line will not cause the "Arduino Uno" board to be hidden in Arduino IDE 2.x, and you instead must do this:

uno.hide=true

The new behavior is actually more intuitive and a bit more powerful (since you can override platform property definitions with a new value, but can't undefine a property) and the Arduino IDE 2.x-compatible hide=true hiding approach will also work for IDE 1.x.

1 Like

thank you @ptillisch

one problem remains, I have used comments to note the board name as written in the IDE (from the name property):

esp32da.hide=true                 # ESP32-WROOM-DA Module
esp32wrover.hide=true             # ESP32 Wrover Module
pico32.hide=true                  # ESP32 PICO-D4
esp32s3box.hide=true              # ESP32-S3-Box
esp32s3usbotg.hide=true           # ESP32-S3-USB-OTG
esp32s3camlcd.hide=true           # ESP32S3 CAM LCD

This works in IDE 1.8.
But IDE 2.3.2 can't deal with the comment and ignores such lines - the boards are still visible.
Bug or feature?

The Arduino properties data format doesn't have any support for inline comments like this. Only lines starting with # are considered comments:

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

So what you intended to be comments are actually just part of the property value when you do that. That didn't have any impact in Arduino IDE 1.x because the value of the property is irrelevant, but in Arduino IDE 2.x, the board will only be hidden if the property value is true.

This is the correct approach:

# ESP32-WROOM-DA Module
esp32da.hide=true
# ESP32 Wrover Module
esp32wrover.hide=true
# ESP32 PICO-D4
pico32.hide=true
# ESP32-S3-Box
esp32s3box.hide=true
# ESP32-S3-USB-OTG
esp32s3usbotg.hide=true
# ESP32S3 CAM LCD
esp32s3camlcd.hide=true

this limitation for comments starting with the line makes a longer file nearly unreadable:

# C:\Arduino IDE Portable\NanoESP32\arduino-1.8.19\portable\packages\avr\hardware\avr\1.8.6\
# C:\Users\xxx\AppData\Local\Arduino15\packages\avr\hardware\avr\1.8.6\
#
# Arduino Yún
yun.hide=true
# Arduino Uno         
#uno.hide=true
# Arduino Uno Mini         
unomini.hide=true   
# Arduino Duemilanove or Diecimila    
diecimila.hide=true    
# Arduino Nano 
#nano.hide=true     
# Arduino Mega or Mega 2560
#mega.hide=true
# Arduino Mega ADK         
megaADK.hide=true   
# Arduino Leonardo    
#leonardo.hide=true      
leonardoeth.hide=true
# Arduino Leonardo ETH 
# Arduino Micro  
#micro.hide=true  
# Arduino Esplora    
esplora.hide=true
# Arduino Mini       
mini.hide=true
# Arduino Ethernet         
ethernet.hide=true
# Arduino Fio      
fio.hide=true
# Arduino BT           
bt.hide=true 
# LilyPad Arduino USB          
LilyPadUSB.hide=true 
# LilyPad Arduino   
lilypad.hide=true
# Arduino Pro or Pro Mini       
#pro.hide=true    
# Arduino NG or older       
atmegang.hide=true
# Arduino Robot Control     
robotControl.hide=true
# Arduino Robot Motor  
robotMotor.hide=true 
# Arduino Gemma   
gemma.hide=true  
# Arduino Yún Mini       
yunmini.hide=true  
# Arduino Industrial 101     
chiwawa.hide=true
# Linino One       
one.hide=true 
# Arduino Uno WiFi          
unowifi.hide=true 

I have not even touched the ESP32 Core with its 220 entries ...
Is there any chance to get the trimmed value parsed if it starts with true to be treated as true?

Run this python script in package folder wich contains "boards.txt". By default all boards are hidden. Comment with '#' the necessary board for show it.

raw = open('boards.txt', 'a+')
raw.seek(0, 0)
Lines = raw.readlines()

count = 0
boards = ["\n### HIDE BOARDS ###\n\n"]
string = ".name="
for line in Lines:
    if(string in line):
        count += 1
        res = line.split(string)
        boards.append("# -" + str(count) + "- " + res[1])
        boards.append(res[0] + ".hide=true\n")

raw.writelines(boards)
raw.close()

I think it's better to keep the boards.txt as it is and use the boards.local.txt for what it was designed for.

Edit 2025-03-23
some boards.local.txt with hide=true entries.
Compatible for IDE 2.x and 1.8.19:

Arduino (AVR)
boards.local.txt (1.2 KB)

ESP32
boards.local.txt (9.8 KB)

ESP8266
boards.local.txt (1.6 KB)

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