Go Down

Topic: Filter boards in board selection window (Read 385 times) previous topic - next topic

simoncc

There are many, many boards in my arduino library, and it's kind of a pain to scroll down to select the right one.

Maybe a text box on top can be added to filter the boards by typing in related words. Or it could be broken out into a separate dialog, so that it's not so perilous and difficult.

pert

There is an existing mechanism for hiding boards, though it's not super user friendly:
  • In the root folder (the one that contains boards.txt) of each of the hardware packages that have boards you want to hide, create a file named boards.local.txt.
  • Open boards.local.txt in a text editor.
  • For each board you want to hide, add an empty hide property. For example, if I wanted to hide the Arduino/Genuino Uno board, I would add this line: uno.hide=
  • Save the file.
  • Restart the Arduino IDE if it's running.


The easiest way to find the active hardware package location is as follows:
  • Select a board from the hardware package from the Tools > Board menu
  • File > Examples > SPI > BarometricPressureSensor (or any other SPI example sketch)
  • Sketch > Show Sketch Folder
  • Move up folder levels until you reach the one that contains boards.txt


Note that every time you update to a new version of any of the hardware packages, your boards.local.txt will be lost. For this reason, you should save those files somewhere safe so that they can easily be replaced after each update. This is the reason for using boards.local.txt instead of editing boards.txt directly, otherwise you would need to merge your changes with whatever changes were made to boards.txt via the update.

There is an existing feature request for what you want:
https://github.com/arduino/Arduino/issues/6034
Nothing has been done about that, but there is some brand new work just this week by one of the Arduino developers to add a recently used boards list at the top of the Tools > Board menu. That's not really what you're asking for, but it will be helpful for dealing with the overly long Tools > Boards menus we end up with after installing a lot of hardware packages. There are test builds available in the pull request thread if you want to try it out:
https://github.com/arduino/Arduino/pull/8607

simoncc

Great! Maybe a good way to get involved in the IDE...

pert

I'm not sure what you mean by "get involved in the IDE".

If you mean that you will learn something about how the Arduino IDE works by modifying the hardware packages, you're absolutely correct.

If you mean that you might want to submit a pull request to add your desired feature to the Arduino IDE, I think that's worth a try. There seems to be a good deal of support for this feature, including from Paul Stoffregen, who is somewhat influential with Arduino due to having made a lot of valuable contributions. The Arduino developers didn't reject the proposal so I think they'd be open to considering a fix contributed by the community. Often, they would like to implement requested features, but it may not be a high priority over other work they need to spend their limited time on. If a volunteer from the community can do most of the work for them (they still need to review the proposed changes), that can shift the equation. If you are considering this, I would recommend reading through the comments on the issue thread, as there seems to be some helpful input there:
https://github.com/arduino/Arduino/issues/6034

westfw

#4
Mar 10, 2019, 11:39 am Last Edit: Mar 10, 2019, 11:40 am by westfw
You can look at https://github.com/WestfW/Duino-hacks/blob/master/BoardListManager/BoardListManager.py
It's in a rather unfinished state, but it's at last part way to what you're looking for.  On a Mac, anyway.  (It SHOULD be relatively machine-independent, except for knowing whether the boards.txt files live.)

(alas, it's also my first major Python program.  So... be kind!)

Go Up