Add spartan edge libraries to Arduino Library Manager

The libraries for the Spartan Edge Accelerator board should be added to the Arduino Library manager, so that they can be downloaded and updated withing the Arduino IDE.

Instructions on how to get the libraries added to the library manager can be found here:

@marsfan Anyone can do it. And it’s easy. Seeed can’t do this manually for every piece of software. Seeed has nearly 400 Arduino Libraries.We need a CI or some form of automatic distribution.

@Baozhu I have to disagree. Only someone with access to the libraries can do it, as it requires a tagged release (simply adding a single new commit will suffice), and a pull request by a repo adminstrator with the Arduino Foundation. Adafruit and Sparkfun both have all of their libraries available through the board manager.

Adafruit and Sparkfun are only partial and very late, and we also have a lot of software in the Libraries Manager.We tried manual updates, but they were really hard to stick with, so we wanted Arduino to provide a REST API that we could do through CI or automated scripts.

As we’ve seen in the Adafruit and Sparkfun official documentation, the preferred way to use all the software is to download the Zip package on GitHub, rather than through their manager.

A doable solution would be to group all the libraries related to a specific board together and release the corresponding JSON file.

For example, the libraries related to the Wio Terminal include

See the GitHub ticket at Include all the Wio Terminal related libraries into the Seeed URL json.

@lakshan I hope you can work with @reivilo on the software release. @reivilo is our great Seeed ranger, and we trust him completely.

Noted @Baozhu. @reivilo but if we do this, we might need to update the JSON file manually every time we update a library related to Wio Terminal. Am I right?

Actually, it is simpler than that and can be fully automated!

You’ll find all the details at Library Manager FAQ.

First step, done once

  • Open an issue on Arduino’s GitHub, specifying the URL of the repository from where to download your library. If you have multiple libraries to submit you are welcome to do them all in a single issue.

Then, every new release

Ensure you’ve changed version in your library.properties. Then tag your library once more and push the new tag (or create a release if your web hosting offers a way to do it, for example with GitHub “releases”). Our indexer checks for new releases every hour and will eventually fetch and publish your new release.

I think it is worth a try!

@reivilo @lakshan I do not think you can release custom JSON files for libraries. I thought that only worked for boards. You have to submit through the Arduino GitHub page.
I suspect you can just say: All valid libraries under the Seeed Studio account to speed things up a lot (as they have a bot that handles crawling it)
But once it is added, every release tag that is added to the a repository is 100% automatically added to Arduino software, and the end users can get a notification that updates are available. When doing it this way (as @reivilo linked to), the bot that the Arduino group maintains automatically updates their JSON file.

It is very similar to how software repositories work on Linux, but even more automatic.

Hi @reivilo @marsfan

Really appreciate the inputs!

Let’s start with the Wio Terminal libraries at first! I have created new releases for the following libraries and changed the library.properties files as well.

Here is the issue I created on Github:

However, there is one problem. Seeed_Arduino_mbedtls library should be in dev branch to work with the new eRPC firmware along with RTL8720. The master branch is made for the old AT firmware.

How can we tackle this issue? Because if I add the library URL to work with Arduino Library Manager, it will grab the master branch by default.

Best Regards,
Lakshantha

Great move @lakshan, thank you!

I would suggest using versioning to solve this issue.

  • Set version to 1.0 for current master for old AT firmware and generate a release.

  • Move dev branch into master and set version to 2.0 for new eRPC firmware and generate a release.

  • Add a comment on the readme.md file about the requirements for each versions.

pleasure @reivilo

great suggestion!

Currently the Seeed_Arduino_mbedtls library is in v2.0.0.

So what I will do is, I will change the library.properties to v2.0.1 and create a new release with v2.0.1. This will be for AT firmware.

Then we need to wait until Arduino team puts our library into Arduino Library Manager.

After the library is available inside Arduino Library Manager, I can merge the dev branch into master branch, change the library,properties to v3.0.0 and create a new release with v3.0.0. This will be for eRPC firmware.

Then I will add in the README saying that v2.0.1 is for old AT firmware and v3.0.0 and above is for new eRPC firmware.

This needs to be done or else the different versions will not be available to select inside Arduino Library Manager.

Will that work?

I think so. Best way is to try!

1 Like