I am the author of the ftDuino (http://ftduino.de). This is a arduino meant to be used with the fischertechnik construction toy. It's based on the Atmega32u4/Leonardo.
The board package comes with three built-in libraries (see ftduino/ftduino/libraries at master · harbaum/ftduino · GitHub). In IDE 1.X these always showed up as three regular libraries when the ftDuino was selected. However in 2.0 they show up as a single blank entry in the examples above the "examples for ftDuino" text. Furthermore the contents of all three libraries are combined into one single menu tree creating even multiple entries with the same name for similar named examples that occur in more than one of the three libraries.
Some I2C demos exist in different versions in the ftduino and the ftduino-simple library. Since the examples are named identical they now show up multiple times:
The contents of the file are really not so important as long as you make sure to comply with the specification. The workaround only requires the presence of a valid metadata file in each of the libraries.
Please let me know if you have any questions or concerns about that.
I have to jump into a meeting right now, but I promise to follow up on this ASAP.
OK, I'm back. This is a side effect of all the examples of all the "1.0"/"legacy" format libraries being grouped together under a single File > Examples menu item.
So the workaround I described above of converting the libraries to "1.5" format by adding the library.properties files will also resolve this issue.
Thanks a lot. Yes, adding the library.properties did indeed solve both of these problems.
However, I am facing a strange unrelated issue now: I have some menu entries in the board.txt. These don't properly show up. So I tried to approach this issue step by step by commenting stuff in boards.txt. It turned out, that these menus are cached somewhere. Once a board.txt has been parsed further changes in the menu structure don't show any effect.
I already tried deleting ~/.arduinoIDE and /tmp/arduino* but the menus simply stay the same when I reload the IDE. Are these cached? Where?
Edit: Deleting ~/.config/arduino-ide does remove the cached entries
I'm glad the library.properties workaround resolved the problem with the examples. Even though the IDE should fully support the legacy library format, I think it is a good thing to update to the modern library format.
This bug is being tracked by the Arduino IDE developers here:
You can subscribe to that issue to get notifications of any new developments related to this subject.
Just a quick remark: After adding the library.properties one should test against the 1.x IDE as well. In my case I had no version field in library.properties. The IDE 2.0 did not care but 1.0 was complaining and more importantly didn't show the library examples at all.
For platforms developed in a GitHub repository, there is a GitHub Actions action available:
By adding a simple YAML file to your repository, you can automatically run the check on every push and pull request. This is used in the official Arduino boards platform repositories. You can see an example here:
Thanks again. This tool reported that it was missing a toolsDependencies entry in the package_index.json. However that wants me to specify a version for each tool. I think I omitted the entry for exactly that reason back when I started as I did not find documentation on what to set there.
Basically my board is happy with whatever is already there and I don't see a reason to force a specific version. What do I specify in the toolsDependencies if I don't care for the exact version?
This explains the data format and handling, but doesn't tell you what specific tool dependencies you should define in your package index because that is different from one platform to another.
There isn't any way to specify a dependency on a tool without also specifying the tool version.
However, if you don't want to specify any tool dependencies (which means you are expecting the tool dependencies will be available on the user's system as a result of installing other boards platforms which have dependencies on those tools), then you can add an empty toolsDependencies array:
toolsDependencies: []
Here is an example of a package index that does this in some of the platform releases: