Add script to generate json containing information to run fwuploader tool #38
+806
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
generator.py
script creates aboard_index.json
file that will be used by the FirmwareUploader tool to gather all the information necessary to run correctly, list of firmwares for each supported board, upload command to run, binary to loader Sketch. It also copies the necessary firmware and loader Sketch binaries in structured folders ready to be uploaded in the download server.As of now it uses a
raw_board.json
file that has been created using some information obtained using the--get_available_for
flag that returns all available firmware for all each supported board.In the future we can use the
board_index.json
currently in use as a base and add new information if necessary.The script assumes the Arduino CLI is installed and all supported boards' core too, it fails in case neither is found.
The script can be easily run like this:
It must be run inside the
generator
folder where theraw_boards.json
file is stored. All generated folders and files will be saved in that same folder.