4.1 Understanding installer_settings.yaml

This file contains details for installer.sh to parse and configure the system with all necessary arduino-cli parameters like cores, libraries, sketches etc.

BINARY:
    LINK: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARMv7.tar.gz

.BINARY.LINK: From where it will download the arduino-cli binary. It can be found here.

We are interested in this link

BINARY:
    LINK: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARMv7.tar.gz
    BASE: /home/pi/bin

.BINARY.BASE: is the location where you would like to install arduino-cli. The default path in the settings file is $HOME/bin . You can, of course, change your installation location here, before firing up the installer.sh

This is important as all the arduino-cli based commands will be executed as/<absolute_path>/arduino-cli and thus we are not needed to edit any .bashrc file to include the binary location in $PATH

It doesn't matter to have a trailing / at the end of the path. Both will be take care of. :). For example:

BINARY:
    LINK: ...
    BASE: /home/pi/bin

# OR
    
BINARY:
    LINK: ...
    BASE: /home/pi/bin/

# Are both valid

Next up in the .ymal file are the cores list.

BINARY:
    LINK: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARMv7.tar.gz
    BASE: /home/pi/bin
    CORES:
        LINK:
            - http://drazzy.com/package_drazzy.com_index.json
            - https://dl.espressif.com/dl/package_esp32_index.json

These are the cores for your micro-controllers that you want to have in your systems installed. Usually some thing you put in your Arduino IDE preference and if using ardunio-cli directly, you add them in your cli's config file [ Here also the script will automatically do so 😇 ]

BINARY:
    LINK: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARMv7.tar.gz
    BASE: /home/pi/bin
    CORES:
        LINK:
            - http://drazzy.com/package_drazzy.com_index.json
            - https://dl.espressif.com/dl/package_esp32_index.json
        CORE_NAMES: 
            - megaTinyCore:megaavr 
            - esp32:esp32

Core links, from where this script (arduino-cli underneath) will download boards info onto your system are all good. But how do you specially install a particular board group? (Like you do in Arduino IDE, after you are done with adding the boards url in preferences, you open Boards manager and search for a board group and install it). Arduino-cli has also already made it easy which is what we use here as well.

The .BINARY.CORE_NAMES are a list of boards (in arduino-cli world, they are called FQBNs ) you want to install in your system. The installer will parse this provided array and install them if it can find them in the Arduino repository and not in the system or else if it finds them in the system installed already, it will try to upgrade them.

Note: A proper FQBN format is used here, the same one you would use when using arduino-cli

Next up is are about the libraries you want to install in the system.

BINARY:
    LINK: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARMv7.tar.gz
    BASE: /home/pi/bin
    CORES: 
        LINKS: 
            - http://drazzy.com/package_drazzy.com_index.json
            - https://dl.espressif.com/dl/package_esp32_index.json
        CORE_NAMES: 
            - megaTinyCore:megaavr 
            - esp32:esp32
LIBS: 
    - https://github.com/dattasaurabh82/TinyMegaI2CMaster.git
    - TinyMegaI2C
    - RV8803Tiny

The .LIBS[] array should contain either a/many library's name/s or it's/their's git link/s.

Is order important here?

If using library names and you have one library that has a dependency on another library, you should insert the dependency library first in the file.

So for ex.ample:

# The RV8803Tiny library has a dependency on TinyMegaI2C library.
# So insert that one first 
LIBS: 
    - TinyMegaI2C
    - RV8803Tiny

Next up are the sketches repository you want cloned in your system.

Use ssh clone link and not https clone links

FIRMWARE: 
    LINKS:
        # - git clone repository link for firmware sketch (ssh clone link and not https clone links)
        # - git clone repository link for another firmware sketch (ssh clone link and not https clone links)

This will clone the repo in location: $HOME/Arduino/sketches/<repo name>/

Below is a complete example of such a installer_settings.yaml

BINARY:
    LINK: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_ARMv7.tar.gz
    BASE: /home/pi/bin
    CORES: 
        LINKS: 
            - http://drazzy.com/package_drazzy.com_index.json
            - https://dl.espressif.com/dl/package_esp32_index.json
        CORE_NAMES: 
            - megaTinyCore:megaavr 
            - esp32:esp32
            
LIBS: 
    - https://github.com/dattasaurabh82/TinyMegaI2CMaster.git
    - TinyMegaI2C
    - RV8803Tiny
    
FIRMWARE: 
    LINKS:
        - git@github.com:devATdbsutdio/watch_firmware.git
        # git clone repository link for another firmware sketch (ssh clone link and not https clone links)

Last updated

Was this helpful?