4.2 Understanding the installer.sh
Last updated
Last updated
When the installer is launched:
It launches in interactive mode and shows a list of tasks it needs to process. They are all RED first as nothing is completed.
For proceeding one step at a time use [Y/n]
: y/Y
for next step, n/N
for quitting the installer.
The first step being for it is to confirm if settings_installer.yaml
is there or not. It's really a sanity check.
Once the file is located, it's going to show you all the info of parsed data like the:
What is happening here is being illustrated below.
As the next step, to install arduino-cli with necessary configuration, the script, after parsing the installer_settings.yaml
, double confirms with the user, if they want to install in the location mentioned in the settings file. If YES, then it downloads and installed the cli in that location.
If NOT, then the user is asked to provide a path. Then the installer checks if there is already a cli binary there, if not then it installs it there, in the newly specified location and after that it updates/overwrites the new user given location of the cli binary in the settings file.
The installer checks, in the default location of cli config file (that arduino-cli uses), if the config file exists. If not it creates one and edits a parameter to allow libraries installation from git links.
If it doesn't exist, then it creates the config file in the default location and sets the same parameter to allow additional external libraries installation from git links.
It also inserts, in the same cli's config file, the list of additional board's links (mentioned by user in the installer_settings
file), from which additional boards and cores will be installed.
TBD
The installer script writes necessary details, post installation and system configuration, to another file:
programmer_settings.yaml
which is used by our sample programming scripts/systems.
Note: As a side note: for my watch project, I'm using an ATTINY-1607 as the main uC.
Let's take a look in the programmer_settings.yaml
Please keep in mind this is just a sample file that I'm using for my specific use case. So the programmer that uses this settings file is heavily customised for my specific use case. The main customisation happens in the FUSES tab as that is where you define the parameters top be passed to arduino-cli
upload command (in my custom shell-script programmer.sh
)
The installer.sh
edits and appends/adds the following ( during system configuration from previous step. ) to theprogrammer_settings.yaml
The other fields are meant to be updated by the end user.