I'm writing an Arduino application in C/C++ and I'm storing my source code in Github.
However, to make my code runnable, I have had to install multiple libraries through the Arduino desktop tool like this:
And I have had to update the firmware and certificates through the Arduino desktop tool like this:
How can I store these firmware updates, library changes and certificates in source control? Is there a binary image I can download and check in? Better yet, is there some plain-text source file that I can check-in to derive such a binary?
1 Answer 1
For libraries only add comment next to #include with version number and author's name if the library is in Library Manager or the download location if it is not in Manager.
Example:
#include <MemoryFree.h> // https://github.com/mpflaga/Arduino-MemoryFree
#include <Ethernet.h> // Ethernet 2.00
Put NINA firmware version in some comment at the top of the main sketch file. The firmware is part of the Arduino boards package so no need to store it in your repo. If you modified the firmware, publish source code in your fork of the official repository and there you can then release the binary too.
Put public certificate keys and similar files in sketch folder in subfolder called extras
or data
.
And write a README file for your repository.