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?
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.
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 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()