├── .gitignore ├── blink-arduino ├── manifest.txt ├── vars.mak ├── blink-arduino.ino └── Makefile ├── blink-wemos-ota ├── wifiinfo.h.sample ├── manifest.txt ├── vars.mak ├── blink-wemos-ota.ino ├── ota.h └── Makefile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | wifiinfo.h 2 | build 3 | *~ 4 | *.old 5 | 6 | -------------------------------------------------------------------------------- /blink-arduino/manifest.txt: -------------------------------------------------------------------------------- 1 | Library Name Version Author Architecture Type 2 | ----------------------------------- ---------- ------------------------- --------------- ------- 3 | -------------------------------------------------------------------------------- /blink-wemos-ota/wifiinfo.h.sample: -------------------------------------------------------------------------------- 1 | // Copy this file to wifiinfo.h and change the following definitions 2 | // to suit your WiFi environment 3 | 4 | #ifndef wifiinfo_h 5 | #define wifiinfo_h 6 | const char* ssid = "mySSID"; 7 | const char* password = "myPASSWORD"; 8 | #endif 9 | -------------------------------------------------------------------------------- /blink-wemos-ota/manifest.txt: -------------------------------------------------------------------------------- 1 | Library Name Version Author Architecture Type 2 | ----------------------------------- ---------- ------------------------- --------------- ------- 3 | ESP8266WiFi 1.0 Ivan Grokhotkov esp8266 system 4 | ArduinoOTA 1.0 Ivan Grokhotkov and Migue esp8266 system 5 | ESP8266mDNS 1.2 multiple, see files esp8266 system 6 | -------------------------------------------------------------------------------- /blink-arduino/vars.mak: -------------------------------------------------------------------------------- 1 | # 2 | # ----- setup for ESP32 LilyGo T3 v 1.6.1 3 | #FQBN ?= esp32:esp32:lilygo_t_display_s3 4 | 5 | # ----- setup wor Wemos D1 mini ----- 6 | #FQBN ?= esp8266:esp8266:d1_mini 7 | 8 | # ----- setup wor ESP32 NodeMCU ----- 9 | #FQBN ?= esp32:esp32:esp32 10 | 11 | # ----- setup for Arduino Uno 12 | FQBN ?= arduino:avr:uno 13 | 14 | # ----- following setup for WiFi enabled devices 15 | #IOT_NAME ?= blink-arduino 16 | #OTA_PORT ?= 3232 17 | #OTA_PASS ?= 18 | SERIAL_DEV ?= /dev/ttyUSB0 19 | -------------------------------------------------------------------------------- /blink-wemos-ota/vars.mak: -------------------------------------------------------------------------------- 1 | # 2 | # ----- setup for ESP32 LilyGo T3 v 1.6.1 3 | #FQBN ?= esp32:esp32:lilygo_t_display_s3 4 | 5 | # ----- setup wor Wemos D1 mini ----- 6 | FQBN ?= esp8266:esp8266:d1_mini 7 | 8 | # ----- setup wor ESP32 NodeMCU ----- 9 | #FQBN ?= esp32:esp32:esp32 10 | 11 | # ----- setup for Arduino Uno 12 | #FQBN ?= arduino:avr:uno 13 | 14 | # ----- following setup for WiFi enabled devices 15 | IOT_NAME ?= esp8266-blink 16 | 17 | # ----- OTA_PORT is 8266 for esp8266 and 3232 for esp32 18 | OTA_PORT ?= 8266 19 | OTA_PASS ?= 20 | 21 | # optional SERIAL_DEV when is not autodetected 22 | SERIAL_DEV ?= /dev/ttyUSB0 23 | -------------------------------------------------------------------------------- /blink-arduino/blink-arduino.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Blink 3 | 4 | Turns an LED on for one second, then off for one second, repeatedly. 5 | 6 | Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO 7 | it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to 8 | the correct LED pin independent of which board is used. 9 | If you want to know what pin the on-board LED is connected to on your Arduino 10 | model, check the Technical Specs of your board at: 11 | https://www.arduino.cc/en/Main/Products 12 | 13 | modified 8 May 2014 14 | by Scott Fitzgerald 15 | modified 2 Sep 2016 16 | by Arturo Guadalupi 17 | modified 8 Sep 2016 18 | by Colby Newman 19 | 20 | This example code is in the public domain. 21 | 22 | http://www.arduino.cc/en/Tutorial/Blink 23 | */ 24 | 25 | // the setup function runs once when you press reset or power the board 26 | void setup() { 27 | // initialize digital pin LED_BUILTIN as an output. 28 | pinMode(LED_BUILTIN, OUTPUT); 29 | } 30 | 31 | // the loop function runs over and over again forever 32 | void loop() { 33 | digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) 34 | delay(100); // wait for a second 35 | digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW 36 | delay(500); // wait for a second 37 | } 38 | -------------------------------------------------------------------------------- /blink-wemos-ota/blink-wemos-ota.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Blink 3 | 4 | Turns an LED on for one second, then off for one second, repeatedly. 5 | 6 | Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO 7 | it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to 8 | the correct LED pin independent of which board is used. 9 | If you want to know what pin the on-board LED is connected to on your Arduino 10 | model, check the Technical Specs of your board at: 11 | https://www.arduino.cc/en/Main/Products 12 | 13 | modified 8 May 2014 14 | by Scott Fitzgerald 15 | modified 2 Sep 2016 16 | by Arturo Guadalupi 17 | modified 8 Sep 2016 18 | by Colby Newman 19 | 20 | This example code is in the public domain. 21 | 22 | http://www.arduino.cc/en/Tutorial/Blink 23 | */ 24 | 25 | #include "ota.h" 26 | 27 | // the setup function runs once when you press reset or power the board 28 | void setup() { 29 | // initialize digital pin LED_BUILTIN as an output. 30 | pinMode(LED_BUILTIN, OUTPUT); 31 | // initialize for OTA updates 32 | setupWifi("esp8266-blink"); 33 | setupOTA("esp8266-blink"); 34 | } 35 | 36 | // the loop function runs over and over again forever 37 | void loop() { 38 | ArduinoOTA.handle(); 39 | digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) 40 | delay(100); // wait for a second 41 | digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW 42 | delay(500); // wait for a second 43 | } 44 | -------------------------------------------------------------------------------- /blink-wemos-ota/ota.h: -------------------------------------------------------------------------------- 1 | // Include what is needed to implement Over The Air Update 2 | // The WiFi connection is not done on this include file, so must be done 3 | // in the main program file 4 | // 5 | // This include file provides the functions 6 | // setupWifi(hostname) 7 | // hostname can be an empty string; this function will 8 | // establish the wifi connections, WiFi credentials are supplied 9 | // in the file "wifiinfo.h", see "wifiinfo.h.sample" 10 | // setupOTA(hostname) 11 | // hostname can be an empty string; will be used to retrieve the 12 | // correct board to upgrade Over The Air. 13 | // If an empty string the default name is esp8266-[ChipID] 14 | // The above 2 functions must be called in the setup() function 15 | // 16 | // in the loop function the function 17 | // ArduinoOTA.handle() 18 | // must be called 19 | 20 | #ifndef ota_h 21 | #define ota_h 22 | // needed include files 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | // include our Network SSID and PASSWORD 29 | #include "wifiinfo.h" 30 | 31 | // ================================================================== 32 | // Establish WiFi connection 33 | // ================================================================== 34 | void setupWifi(char hostname[]) { 35 | int i = 0; 36 | WiFi.mode(WIFI_STA); 37 | if (sizeof(hostname) > 0) { 38 | WiFi.hostname(hostname); 39 | } 40 | if (Serial) {Serial.println("Connecting ");} 41 | WiFi.begin(ssid, password); 42 | while (WiFi.status() != WL_CONNECTED) { 43 | if (Serial) {Serial.print(".");} 44 | delay(500); 45 | } 46 | if (Serial) { 47 | Serial.println("."); 48 | Serial.print("Connected! IP: "); 49 | Serial.println(WiFi.localIP()); 50 | } 51 | } 52 | 53 | 54 | // ================================================================== 55 | // Setup for OTA update 56 | // ================================================================== 57 | 58 | void setupOTA(char hostname[]) { 59 | // Port defaults to 8266 60 | // ArduinoOTA.setPort(8266); 61 | 62 | // Hostname defaults to esp8266-[ChipID] 63 | if (sizeof(hostname) > 0) { 64 | ArduinoOTA.setHostname(hostname); 65 | } 66 | 67 | // No authentication by default 68 | // ArduinoOTA.setPassword((const char *)"123"); 69 | 70 | ArduinoOTA.onStart([]() { 71 | if (Serial) {Serial.println("Start");} 72 | }); 73 | ArduinoOTA.onEnd([]() { 74 | if (Serial) {Serial.println("\nEnd");} 75 | }); 76 | ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { 77 | if (Serial) {Serial.printf("Progress: %u%%\r", (progress / (total / 100)));} 78 | }); 79 | ArduinoOTA.onError([](ota_error_t error) { 80 | if (Serial) { 81 | Serial.printf("Error[%u]: ", error); 82 | if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed"); 83 | else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed"); 84 | else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed"); 85 | else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed"); 86 | else if (error == OTA_END_ERROR) Serial.println("End Failed"); 87 | } 88 | }); 89 | ArduinoOTA.begin(); 90 | if (Serial) { 91 | Serial.println("Ready"); 92 | Serial.print("IP address: "); 93 | Serial.println(WiFi.localIP()); 94 | } 95 | } 96 | 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /blink-arduino/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Arduino based scketches 2 | # 3 | # Copyright 2020 Valerio Di Giampietro http://va.ler.io v@ler.io 4 | # MIT License - see License.txt file 5 | # 6 | # This Makefile uses the arduino-cli, the Arduino command line interface 7 | # and has been designed and tested to run on Linux, not on Windows. 8 | # Probably it will run on a Mac, but it has not been tested. 9 | # 10 | # Please note that: 11 | # 12 | # 1. each sketch must reside in his own folder with this Makefile 13 | # 14 | # 2. the main make targets are: 15 | # - all compiles and upload 16 | # - compile compiles only 17 | # - upload upload via serial port, compile if the binary file is 18 | # not available 19 | # - ota upload Over The Air, automatically find the device 20 | # IP address using the IOT_NAME (device hostname) 21 | # - clean clean the build directory 22 | # - find find OTA updatable devices on the local subnet 23 | # - requirements it the file "requirements.txt" exists it will 24 | # install the libraries listed in this file 25 | # 26 | # default is "all" 27 | # 28 | # 3. it gets the name of the sketch using the wildcard make command; 29 | # the name is *.ino; this means that you must have ONLY a file 30 | # with .ino extension, otherwise this makefile will break. This 31 | # also means that you can use this Makefile, almost unmodified, 32 | # for any sketch as long as you keep a single .ino file in each 33 | # folder 34 | # 35 | # 4. you can split your project in multiple files, if you wish, 36 | # using a single .ino file and multiple .h files, that you can 37 | # include in the .ino file with an '#include "myfile.h"' 38 | # directive 39 | # 40 | # Optionally some environment variables can be set: 41 | # 42 | # FQBN Fully Qualified Board Name; if not set in the environment 43 | # it will be assigned a value in this makefile 44 | # 45 | # SERIAL_DEV Serial device to upload the sketch; if not set in the 46 | # environment it will be assigned: 47 | # /dev/ttyUSB0 if it exists, or 48 | # /dev/ttyACM0 if it exists, or 49 | # unknown 50 | # 51 | # IOT_NAME Name of the IOT device; if not set in the environment 52 | # it will be assigned a value in this makefile. This is 53 | # very useful for OTA update, the device will be searched 54 | # on the local subnet using this name 55 | # 56 | # OTA_PORT Port used by OTA update; if not set in the environment 57 | # it will be assigned the default value of 8266 in this 58 | # makefile 59 | # 60 | # OTA_PASS Password used for OTA update; if not set in the environment 61 | # it will be assigned the default value of an empty string 62 | # 63 | # V verbose flag; can be 0 (quiet) or 1 (verbose); if not set 64 | # in the environment it will be assigned a default value 65 | # in this makefile 66 | # 67 | # CUSTOM_LIBS optional custom libraris in the from 68 | # "--libraries libpath1,libpath2,..." by default it is 69 | # the empty string or the "--libraries libraries" if this 70 | # dir exists 71 | 72 | OSFAMILY := $(shell ( uname | sed "s/-.*//" )) 73 | MAKE_DIR := $(PWD) 74 | GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) 75 | # 76 | # in vars.mak usually some or all of the following variables are defined 77 | # FQBN 78 | # IOT_NAME 79 | # OTA_PORT 80 | # OTA_PASS 81 | # SERIAL_DEV 82 | -include vars.mak 83 | 84 | # 85 | # ----- setup for ESP32 LilyGo T3 v 1.6.1 86 | #FQBN ?= esp32:esp32:lilygo_t_display_s3 87 | 88 | # ----- setup wor Wemos D1 mini ----- 89 | #FQBN ?= esp8266:esp8266:d1_mini 90 | 91 | # ----- setup wor ESP32 NodeMCU ----- 92 | #FQBN ?= esp32:esp32:esp32 93 | 94 | # ----- setup for Arduino Uno 95 | FQBN ?= arduino:avr:uno 96 | 97 | #IOT_NAME ?= blink-arduino 98 | #OTA_PORT ?= 3232 99 | #OTA_PASS ?= 100 | # 101 | # --- Upload Speed Label: the "arduino-cli upload" command uses "baud" or UploadSpeed to specify 102 | # the board upload speed, the following variable will heve the correct value 103 | SPEEDLABEL = $(shell arduino-cli board details -f -b $(FQBN) --format json | egrep -i 'baud|UploadSpeed' |tr '"' ' ' | awk '{print $$3}') 104 | 105 | ifdef GIT_VERSION 106 | CFLAGS = --build-property compiler.cpp.extra_flags=-DMYVERSION=\"$(GIT_VERSION)\" 107 | else 108 | CFLAGS = 109 | endif 110 | 111 | V ?= 0 112 | VFLAG = 113 | 114 | ifeq "$(V)" "1" 115 | VFLAG =-v 116 | endif 117 | 118 | 119 | ifndef SERIAL_DEV 120 | ifneq (,$(wildcard /dev/ttyUSB0)) 121 | SERIAL_DEV = /dev/ttyUSB0 122 | else ifneq (,$(wildcard /dev/ttyACM0)) 123 | SERIAL_DEV = /dev/ttyACM0 124 | else ifneq (,$(wildcard /dev/cu.usbserial*)) 125 | SERIAL_DEV = $(wildcard /dev/cu.usbserial*) 126 | else 127 | SERIAL_DEV = unknown 128 | endif 129 | endif 130 | 131 | 132 | 133 | ifndef CUSTOM_LIBS 134 | ifneq (,$(wildcard libraries)) 135 | CUSTOM_LIBS = --libraries libraries 136 | else 137 | CUSTOM_LIBS = 138 | endif 139 | endif 140 | 141 | BUILD_DIR := $(subst :,.,build/$(FQBN)) 142 | 143 | SRCINO := $(wildcard *.ino) 144 | SRC := $(wildcard *.ino *.c *.cpp mylib/*/*.ino) 145 | HDRS := $(wildcard *.h mylib/*/*.h) 146 | BIN := $(BUILD_DIR)/$(SRCINO).bin 147 | ELF := $(BUILD_DIR)/$(SRCINO).elf 148 | 149 | $(info OSFAMILY is [${OSFAMILY}]) 150 | $(info GIT_VERSION is [${GIT_VERSION}]) 151 | $(info FQBN is [${FQBN}]) 152 | $(info IOT_NAME is [${IOT_NAME}]) 153 | $(info IOT_IP is [${IOT_IP}]) 154 | $(info OTA_PORT is [${OTA_PORT}]) 155 | $(info OTA_PASS is [${OTA_PASS}]) 156 | $(info V is [${V}]) 157 | $(info VFLAG is [${VFLAG}]) 158 | $(info MAKE_DIR is [${MAKE_DIR}]) 159 | $(info BUILD_DIR is [${BUILD_DIR}]) 160 | $(info SRCINO is [${SRCINO}]) 161 | $(info SRC is [${SRC}]) 162 | $(info HDRS is [${HDRS}]) 163 | $(info BIN is [${BIN}]) 164 | $(info SERIAL_DEV is [${SERIAL_DEV}]) 165 | $(info CUSTOM_LIBS is [${CUSTOM_LIBS}]) 166 | $(info SPEEDLABEL is [${SPEEDLABEL}]) 167 | 168 | 169 | all: $(ELF) upload 170 | .PHONY: all 171 | 172 | compile: $(ELF) 173 | .PHONY: compile 174 | 175 | $(ELF): $(SRC) $(HDRS) 176 | arduino-cli compile -b $(FQBN) --build-path $(BUILD_DIR) $(VFLAG) $(CUSTOM_LIBS) $(CFLAGS) 177 | @if which arduino-manifest.pl; \ 178 | then echo "---> Generating manifest.txt"; \ 179 | arduino-manifest.pl -b $(FQBN) $(SRC) $(HDRS) > manifest.txt.new; \ 180 | if diff manifest.txt manifest.txt.new > /dev/null; \ 181 | then echo "---> manifest.txt is up to date (has not changed)"; \ 182 | rm -f manifest.txt.new; \ 183 | else mv -f manifest.txt.new manifest.txt; \ 184 | fi; \ 185 | else echo "---> If you want to generate manifest.txt, listing used libraries and their versions,"; \ 186 | echo "---> please install arduino-manifest, see https://github.com/digiampietro/arduino-manifest"; \ 187 | fi 188 | 189 | upload: compile 190 | @if [ ! -c $(SERIAL_DEV) ] ; \ 191 | then echo "---> ERROR: Serial Device not available, please set the SERIAL_DEV environment variable" ; \ 192 | else echo "---> Uploading sketch\n"; \ 193 | arduino-cli upload -b $(FQBN):$(SPEEDLABEL)=115200 -p $(SERIAL_DEV) --input-dir $(BUILD_DIR) $(VFLAG) ; \ 194 | fi 195 | 196 | ota: compile 197 | @PLAT_PATH=`arduino-cli compile -b $(FQBN) --show-properties | grep '^runtime.platform.path' | awk -F= '{print $$2}'` ; \ 198 | PY_PATH=`which python3 | xargs dirname` ; \ 199 | if [[ "$(OSFAMILY)" = "Linux" && "$(IOT_IP)" = "" ]] ; \ 200 | then IOT_IP=`avahi-browse _arduino._tcp --resolve --parsable --terminate|grep -i ';$(IOT_NAME);'|grep ';$(OTA_PORT);'| awk -F\; '{print $$8}'|head -1`; \ 201 | elif [[ "$(OSFAMILY)" = "Darwin" && "$(IOT_IP)" = "" ]] ; \ 202 | then IOT_IP=`(timeout 3 dns-sd -G v4 $(IOT_NAME).local | grep $(IOT_NAME).local) | awk '{print $$6}'` ; \ 203 | fi ; \ 204 | BINFILE=$(wildcard $(BIN)); \ 205 | echo "PLAT_PATH is [$$PLAT_PATH]" ; \ 206 | echo "PY_PATH: is [$$PY_PATH]" ; \ 207 | echo "IOT_IP: is [$$IOT_IP]" ; \ 208 | echo "BINFILE: is [$$BINFILE]" ; \ 209 | if [ "$$IOT_IP" = "" ] ; \ 210 | then if [ "$(OSFAMILY)" = "Linux" -o "$(OSFAMILY)" = "Darwin" ] ; \ 211 | then echo "Unable to find device IP. Check that the IOT_NAME environment variable is correctly set. Use 'make find' to search devices"; \ 212 | else echo "IOT_IP variable not set, you have to set this variable to the IP address of your device"; \ 213 | fi; \ 214 | else echo "---> Uploading Over The Air"; \ 215 | $$PY_PATH/python3 $$PLAT_PATH/tools/espota.py -i $$IOT_IP -p $(OTA_PORT) --auth=$(OTA_PASS) -f $$BINFILE ;\ 216 | fi 217 | 218 | clean: 219 | @echo "---> Cleaning the build directory" 220 | rm -rf build 221 | 222 | find: 223 | @if [ "$(OSFAMILY)" = "Linux" ] ; \ 224 | then avahi-browse _arduino._tcp --resolve --parsable --terminate ; \ 225 | elif [ "$(OSFAMILY)" = "Darwin" ] ; \ 226 | then timeout 5 dns-sd -B _arduino._tcp ; echo; \ 227 | else echo "---> In this OS *find* is not supported; lease set the IOT_IP environment variable to the IP address of your device" ; \ 228 | fi 229 | 230 | requirements: 231 | @if [ -e requirements.txt ]; \ 232 | then while read -r i ; do echo ; \ 233 | echo "---> Installing " '"'$$i'"' ; \ 234 | arduino-cli lib install "$$i" ; \ 235 | done < requirements.txt ; \ 236 | else echo "---> MISSING requirements.txt file"; \ 237 | fi 238 | 239 | 240 | 241 | -------------------------------------------------------------------------------- /blink-wemos-ota/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Arduino based scketches 2 | # 3 | # Copyright 2020 Valerio Di Giampietro http://va.ler.io v@ler.io 4 | # MIT License - see License.txt file 5 | # 6 | # This Makefile uses the arduino-cli, the Arduino command line interface 7 | # and has been designed and tested to run on Linux, not on Windows. 8 | # Probably it will run on a Mac, but it has not been tested. 9 | # 10 | # Please note that: 11 | # 12 | # 1. each sketch must reside in his own folder with this Makefile 13 | # 14 | # 2. the main make targets are: 15 | # - all compiles and upload 16 | # - compile compiles only 17 | # - upload upload via serial port, compile if the binary file is 18 | # not available 19 | # - ota upload Over The Air, automatically find the device 20 | # IP address using the IOT_NAME (device hostname) 21 | # - clean clean the build directory 22 | # - find find OTA updatable devices on the local subnet 23 | # - requirements it the file "requirements.txt" exists it will 24 | # install the libraries listed in this file 25 | # 26 | # default is "all" 27 | # 28 | # 3. it gets the name of the sketch using the wildcard make command; 29 | # the name is *.ino; this means that you must have ONLY a file 30 | # with .ino extension, otherwise this makefile will break. This 31 | # also means that you can use this Makefile, almost unmodified, 32 | # for any sketch as long as you keep a single .ino file in each 33 | # folder 34 | # 35 | # 4. you can split your project in multiple files, if you wish, 36 | # using a single .ino file and multiple .h files, that you can 37 | # include in the .ino file with an '#include "myfile.h"' 38 | # directive 39 | # 40 | # Optionally some environment variables can be set: 41 | # 42 | # FQBN Fully Qualified Board Name; if not set in the environment 43 | # it will be assigned a value in this makefile 44 | # 45 | # SERIAL_DEV Serial device to upload the sketch; if not set in the 46 | # environment it will be assigned: 47 | # /dev/ttyUSB0 if it exists, or 48 | # /dev/ttyACM0 if it exists, or 49 | # unknown 50 | # 51 | # IOT_NAME Name of the IOT device; if not set in the environment 52 | # it will be assigned a value in this makefile. This is 53 | # very useful for OTA update, the device will be searched 54 | # on the local subnet using this name 55 | # 56 | # OTA_PORT Port used by OTA update; if not set in the environment 57 | # it will be assigned the default value of 8266 in this 58 | # makefile 59 | # 60 | # OTA_PASS Password used for OTA update; if not set in the environment 61 | # it will be assigned the default value of an empty string 62 | # 63 | # V verbose flag; can be 0 (quiet) or 1 (verbose); if not set 64 | # in the environment it will be assigned a default value 65 | # in this makefile 66 | # 67 | # CUSTOM_LIBS optional custom libraris in the from 68 | # "--libraries libpath1,libpath2,..." by default it is 69 | # the empty string or the "--libraries libraries" if this 70 | # dir exists 71 | 72 | OSFAMILY := $(shell ( uname | sed "s/-.*//" )) 73 | MAKE_DIR := $(PWD) 74 | GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) 75 | # 76 | # in vars.mak usually some or all of the following variables are defined 77 | # FQBN 78 | # IOT_NAME 79 | # OTA_PORT 80 | # OTA_PASS 81 | # SERIAL_DEV 82 | -include vars.mak 83 | 84 | # 85 | # ----- setup for ESP32 LilyGo T3 v 1.6.1 86 | #FQBN ?= esp32:esp32:lilygo_t_display_s3 87 | 88 | # ----- setup wor Wemos D1 mini ----- 89 | #FQBN ?= esp8266:esp8266:d1_mini 90 | 91 | # ----- setup wor ESP32 NodeMCU ----- 92 | #FQBN ?= esp32:esp32:esp32 93 | 94 | # ----- setup for Arduino Uno 95 | FQBN ?= arduino:avr:uno 96 | 97 | #IOT_NAME ?= blink-arduino 98 | #OTA_PORT ?= 3232 99 | #OTA_PASS ?= 100 | # 101 | # --- Upload Speed Label: the "arduino-cli upload" command uses "baud" or UploadSpeed to specify 102 | # the board upload speed, the following variable will heve the correct value 103 | SPEEDLABEL = $(shell arduino-cli board details -f -b $(FQBN) --format json | egrep -i 'baud|UploadSpeed' |tr '"' ' ' | awk '{print $$3}') 104 | 105 | ifdef GIT_VERSION 106 | CFLAGS = --build-property compiler.cpp.extra_flags=-DMYVERSION=\"$(GIT_VERSION)\" 107 | else 108 | CFLAGS = 109 | endif 110 | 111 | V ?= 0 112 | VFLAG = 113 | 114 | ifeq "$(V)" "1" 115 | VFLAG =-v 116 | endif 117 | 118 | 119 | ifndef SERIAL_DEV 120 | ifneq (,$(wildcard /dev/ttyUSB0)) 121 | SERIAL_DEV = /dev/ttyUSB0 122 | else ifneq (,$(wildcard /dev/ttyACM0)) 123 | SERIAL_DEV = /dev/ttyACM0 124 | else ifneq (,$(wildcard /dev/cu.usbserial*)) 125 | SERIAL_DEV = $(wildcard /dev/cu.usbserial*) 126 | else 127 | SERIAL_DEV = unknown 128 | endif 129 | endif 130 | 131 | 132 | 133 | ifndef CUSTOM_LIBS 134 | ifneq (,$(wildcard libraries)) 135 | CUSTOM_LIBS = --libraries libraries 136 | else 137 | CUSTOM_LIBS = 138 | endif 139 | endif 140 | 141 | BUILD_DIR := $(subst :,.,build/$(FQBN)) 142 | 143 | SRCINO := $(wildcard *.ino) 144 | SRC := $(wildcard *.ino *.c *.cpp mylib/*/*.ino) 145 | HDRS := $(wildcard *.h mylib/*/*.h) 146 | BIN := $(BUILD_DIR)/$(SRCINO).bin 147 | ELF := $(BUILD_DIR)/$(SRCINO).elf 148 | 149 | $(info OSFAMILY is [${OSFAMILY}]) 150 | $(info GIT_VERSION is [${GIT_VERSION}]) 151 | $(info FQBN is [${FQBN}]) 152 | $(info IOT_NAME is [${IOT_NAME}]) 153 | $(info IOT_IP is [${IOT_IP}]) 154 | $(info OTA_PORT is [${OTA_PORT}]) 155 | $(info OTA_PASS is [${OTA_PASS}]) 156 | $(info V is [${V}]) 157 | $(info VFLAG is [${VFLAG}]) 158 | $(info MAKE_DIR is [${MAKE_DIR}]) 159 | $(info BUILD_DIR is [${BUILD_DIR}]) 160 | $(info SRCINO is [${SRCINO}]) 161 | $(info SRC is [${SRC}]) 162 | $(info HDRS is [${HDRS}]) 163 | $(info BIN is [${BIN}]) 164 | $(info SERIAL_DEV is [${SERIAL_DEV}]) 165 | $(info CUSTOM_LIBS is [${CUSTOM_LIBS}]) 166 | $(info SPEEDLABEL is [${SPEEDLABEL}]) 167 | 168 | 169 | all: $(ELF) upload 170 | .PHONY: all 171 | 172 | compile: $(ELF) 173 | .PHONY: compile 174 | 175 | $(ELF): $(SRC) $(HDRS) 176 | arduino-cli compile -b $(FQBN) --build-path $(BUILD_DIR) $(VFLAG) $(CUSTOM_LIBS) $(CFLAGS) 177 | @if which arduino-manifest.pl; \ 178 | then echo "---> Generating manifest.txt"; \ 179 | arduino-manifest.pl -b $(FQBN) $(SRC) $(HDRS) > manifest.txt.new; \ 180 | if diff manifest.txt manifest.txt.new > /dev/null; \ 181 | then echo "---> manifest.txt is up to date (has not changed)"; \ 182 | rm -f manifest.txt.new; \ 183 | else mv -f manifest.txt.new manifest.txt; \ 184 | fi; \ 185 | else echo "---> If you want to generate manifest.txt, listing used libraries and their versions,"; \ 186 | echo "---> please install arduino-manifest, see https://github.com/digiampietro/arduino-manifest"; \ 187 | fi 188 | 189 | upload: compile 190 | @if [ ! -c $(SERIAL_DEV) ] ; \ 191 | then echo "---> ERROR: Serial Device not available, please set the SERIAL_DEV environment variable" ; \ 192 | else echo "---> Uploading sketch\n"; \ 193 | arduino-cli upload -b $(FQBN):$(SPEEDLABEL)=115200 -p $(SERIAL_DEV) --input-dir $(BUILD_DIR) $(VFLAG) ; \ 194 | fi 195 | 196 | ota: compile 197 | @PLAT_PATH=`arduino-cli compile -b $(FQBN) --show-properties | grep '^runtime.platform.path' | awk -F= '{print $$2}'` ; \ 198 | PY_PATH=`which python3 | xargs dirname` ; \ 199 | if [[ "$(OSFAMILY)" = "Linux" && "$(IOT_IP)" = "" ]] ; \ 200 | then IOT_IP=`avahi-browse _arduino._tcp --resolve --parsable --terminate|grep -i ';$(IOT_NAME);'|grep ';$(OTA_PORT);'| awk -F\; '{print $$8}'|head -1`; \ 201 | elif [[ "$(OSFAMILY)" = "Darwin" && "$(IOT_IP)" = "" ]] ; \ 202 | then IOT_IP=`(timeout 3 dns-sd -G v4 $(IOT_NAME).local | grep $(IOT_NAME).local) | awk '{print $$6}'` ; \ 203 | fi ; \ 204 | BINFILE=$(wildcard $(BIN)); \ 205 | echo "PLAT_PATH is [$$PLAT_PATH]" ; \ 206 | echo "PY_PATH: is [$$PY_PATH]" ; \ 207 | echo "IOT_IP: is [$$IOT_IP]" ; \ 208 | echo "BINFILE: is [$$BINFILE]" ; \ 209 | if [ "$$IOT_IP" = "" ] ; \ 210 | then if [ "$(OSFAMILY)" = "Linux" -o "$(OSFAMILY)" = "Darwin" ] ; \ 211 | then echo "Unable to find device IP. Check that the IOT_NAME environment variable is correctly set. Use 'make find' to search devices"; \ 212 | else echo "IOT_IP variable not set, you have to set this variable to the IP address of your device"; \ 213 | fi; \ 214 | else echo "---> Uploading Over The Air"; \ 215 | $$PY_PATH/python3 $$PLAT_PATH/tools/espota.py -i $$IOT_IP -p $(OTA_PORT) --auth=$(OTA_PASS) -f $$BINFILE ;\ 216 | fi 217 | 218 | clean: 219 | @echo "---> Cleaning the build directory" 220 | rm -rf build 221 | 222 | find: 223 | @if [ "$(OSFAMILY)" = "Linux" ] ; \ 224 | then avahi-browse _arduino._tcp --resolve --parsable --terminate ; \ 225 | elif [ "$(OSFAMILY)" = "Darwin" ] ; \ 226 | then timeout 5 dns-sd -B _arduino._tcp ; echo; \ 227 | else echo "---> In this OS *find* is not supported; lease set the IOT_IP environment variable to the IP address of your device" ; \ 228 | fi 229 | 230 | requirements: 231 | @if [ -e requirements.txt ]; \ 232 | then while read -r i ; do echo ; \ 233 | echo "---> Installing " '"'$$i'"' ; \ 234 | arduino-cli lib install "$$i" ; \ 235 | done < requirements.txt ; \ 236 | else echo "---> MISSING requirements.txt file"; \ 237 | fi 238 | 239 | 240 | 241 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Makefiles for Arduino based sketches 2 | 3 | Simple Makefiles to compile and upload Arduino sketches using a 4 | command-line based workflow. It includes Over The Air updates for 5 | WiFi-enabled boards. 6 | 7 | These sample Makefiles use the *arduino-cli*, the Arduino Command Line 8 | Interface, and has been developed and tested on Linux, and will not 9 | run on Windows. Probably they will run on a Mac, but has not been 10 | tested. 11 | 12 | The simplicity of these Makefiles and some of the features and 13 | limitations are related to the use of the *arduino-cli* command. 14 | 15 | Two Makefile samples, almost identical, are available: 16 | 17 | * one for an [Arduino Uno](./blink-arduino/Makefile) sample project; 18 | 19 | * one for a [Wemos mini D1](./blink-wemos-ota/Makefile) sample 20 | project; this board includes a WiFi chip, so it is possible to do an 21 | OTA update; 22 | 23 | To use one of these makefiles on another project: 24 | 25 | * copy the Makefile on the arduino project directory (where the 26 | *".ino"* file is); 27 | 28 | * change the *FQBN* (*Fully Qualified Board Name*) variable inside the 29 | Makefile, to the correct value for the project; the command 30 | *"arduino-cli board listall"* is available to get a list of 31 | available board names and their fqbn; 32 | 33 | * for WiFi enabled boards change also the *IOT_NAME* variable inside 34 | the Makefile and in the source file, to the device hostname; this 35 | information will be used during Over The Air Update to select the 36 | correct device. 37 | 38 | ## Features and limitations 39 | 40 | * each sketch must reside in his own folder with this Makefile and, 41 | eventually, other *".h"* files; 42 | 43 | * the main make targets are: 44 | 45 | * **all**: compiles and upload via serial interface; 46 | 47 | * **compile**: compiles only; 48 | 49 | * **upload**: upload via serial port, compile if the binary file is 50 | not available; 51 | 52 | * **ota**: upload Over The Air, automatically find the device IP 53 | address using the IOT_NAME (device hostname) and the 54 | avahi-browse command; 55 | 56 | * **clean**: clean the build directory; 57 | 58 | * **find**: find OTA updatable devices on the local subnet, using 59 | the avahi-browse command; 60 | 61 | * **requirements**: if the file "requirements.txt" exists it will 62 | install the libraries listed in this file; 63 | 64 | * the default target is "all"; 65 | 66 | * it gets the name of the sketch using the *wildcard* make command; 67 | the name is *"\*.ino"*; this means that you must have **only** a file 68 | with *".ino"* extension, otherwise this makefile will break. This 69 | also means that you can use this Makefile, almost unmodified, for 70 | any sketch as long as you keep a single *".ino"* file in each 71 | folder; 72 | 73 | * It is possible to split a project in multiple files, using a single 74 | *".ino"* file and multiple *".h"* files, that can be included in the 75 | *".ino"* file with an *'#include "filename.h"'* directive; 76 | 77 | ## Environment Variables 78 | 79 | Optionally some environment variables can be set to overwrite the 80 | default Makefile values: 81 | 82 |
83 | 84 |
FQBN
Fully Qualified Board Name; if not set in the 85 | environment it will be assigned a value in this 86 | makefile
87 | 88 |
SERIAL_DEV
Serial device to upload the sketch; if not set in the 89 | environment it will be assigned: 90 |
/dev/ttyUSB0 if it exists, or 91 |
/dev/ttyACM0 if it exists, or 92 |
unknown
93 | 94 |
IOT_NAME
Name of the IOT device; if not set in the environment 95 | it will be assigned a value in this makefile. This is 96 | very useful for OTA update, the device will be searched 97 | on the local subnet using this name
98 | 99 |
OTA_PORT
Port used by OTA update; if not set in the environment 100 | it will be assigned the default value of 8266 in this 101 | makefile
102 | 103 |
OTA_PASS
Password used for OTA update; if not set in the environment 104 | it will be assigned the default value of an empty string
105 | 106 |
V
verbose flag; can be 0 (quiet) or 1 (verbose); if not set 107 | in the environment it will be assigned a default value 108 | in this makefile
109 |
110 | 111 | ## Usage examples 112 | 113 | **Compile a sketch** 114 | 115 | ``` 116 | valerio@ubuntu-hp:~/Arduino/blink-wemos-ota$ make compile 117 | FQBN is [esp8266:esp8266:d1_mini] 118 | IOT_NAME is [esp8266-blink] 119 | OTA_PORT is [8266] 120 | OTA_PASS is [] 121 | V is [0] 122 | VFLAG is [] 123 | MAKE_DIR is [/home/valerio/Arduino/blink-wemos-ota] 124 | BUILD_DIR is [build/esp8266.esp8266.d1_mini] 125 | SRC is [blink-wemos-ota.ino] 126 | HDRS is [ota.h wifiinfo.h] 127 | BIN is [build/esp8266.esp8266.d1_mini/blink-wemos-ota.ino.bin] 128 | SERIAL_DEV is [unknown] 129 | arduino-cli compile -b esp8266:esp8266:d1_mini 130 | Executable segment sizes: 131 | IROM : 280240 - code in flash (default or ICACHE_FLASH_ATTR) 132 | IRAM : 27536 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...) 133 | DATA : 1276 ) - initialized variables (global, static) in RAM/HEAP 134 | RODATA : 1204 ) / 81920 - constants (global, static) in RAM/HEAP 135 | BSS : 25456 ) - zeroed variables (global, static) in RAM/HEAP 136 | Sketch uses 310256 bytes (29%) of program storage space. Maximum is 1044464 bytes. 137 | Global variables use 27936 bytes (34%) of dynamic memory, leaving 53984 bytes for local variables. Maximum is 81920 bytes. 138 | /usr/local/bin/arduino-manifest.pl 139 | ---> Generating manifest.txt 140 | ``` 141 | 142 | **Upload a sketch via Serial Port** 143 | 144 | ``` 145 | valerio@ubuntu-hp:~/Arduino/blink-wemos-ota$ make upload 146 | FQBN is [esp8266:esp8266:d1_mini] 147 | IOT_NAME is [esp8266-blink] 148 | OTA_PORT is [8266] 149 | OTA_PASS is [] 150 | V is [0] 151 | VFLAG is [] 152 | MAKE_DIR is [/home/valerio/Arduino/blink-wemos-ota] 153 | BUILD_DIR is [build/esp8266.esp8266.d1_mini] 154 | SRC is [blink-wemos-ota.ino] 155 | HDRS is [ota.h wifiinfo.h] 156 | BIN is [build/esp8266.esp8266.d1_mini/blink-wemos-ota.ino.bin] 157 | SERIAL_DEV is [/dev/ttyUSB0] 158 | ---> Uploading sketch 159 | 160 | No new serial port detected. 161 | esptool.py v2.8 162 | Serial port /dev/ttyUSB0 163 | Connecting.... 164 | Chip is ESP8266EX 165 | Features: WiFi 166 | Crystal is 26MHz 167 | MAC: 48:3f:da:0d:e9:e9 168 | Uploading stub... 169 | Running stub... 170 | Stub running... 171 | Changing baud rate to 460800 172 | Changed. 173 | Configuring flash size... 174 | Auto-detected Flash size: 4MB 175 | Compressed 314416 bytes to 227814... 176 | Wrote 314416 bytes (227814 compressed) at 0x00000000 in 5.2 seconds (effective 487.9 kbit/s)... 177 | Hash of data verified. 178 | 179 | Leaving... 180 | Hard resetting via RTS pin... 181 | ``` 182 | 183 | **Upload a sketch Over The Air** 184 | 185 | ``` 186 | valerio@ubuntu-hp:~/Arduino/blink-wemos-ota$ make ota 187 | FQBN is [esp8266:esp8266:d1_mini] 188 | IOT_NAME is [esp8266-blink] 189 | OTA_PORT is [8266] 190 | OTA_PASS is [] 191 | V is [0] 192 | VFLAG is [] 193 | MAKE_DIR is [/home/valerio/Arduino/blink-wemos-ota] 194 | BUILD_DIR is [build/esp8266.esp8266.d1_mini] 195 | SRC is [blink-wemos-ota.ino] 196 | HDRS is [ota.h wifiinfo.h] 197 | BIN is [build/esp8266.esp8266.d1_mini/blink-wemos-ota.ino.bin] 198 | SERIAL_DEV is [/dev/ttyUSB0] 199 | PLAT_PATH is [/home/valerio/.arduino15/packages/esp8266/hardware/esp8266/2.7.2] 200 | PY_PATH: is [/home/valerio/.arduino15/packages/esp8266/tools/python3/3.7.2-post1] 201 | IOT_IP: is [192.168.2.91] 202 | BINFILE: is [build/esp8266.esp8266.d1_mini/blink-wemos-ota.ino.bin] 203 | ---> Uploading Over The Air 204 | Uploading........................................................................................................................................................................................................................ 205 | 206 | ``` 207 | 208 | **Install required libraries for a sketch** 209 | 210 | ``` 211 | valerio@ubu20:~/Arduino/meteo-persiceto/DisplayTemperature$ cat requirements.txt 212 | Adafruit RGB LCD Shield Library 213 | OneWire 214 | DallasTemperature 215 | valerio@ubu20:~/Arduino/meteo-persiceto/DisplayTemperature$ make requirements 216 | FQBN is [esp8266:esp8266:d1_mini] 217 | IOT_NAME is [esp8266-meteo] 218 | OTA_PORT is [8266] 219 | OTA_PASS is [] 220 | V is [0] 221 | VFLAG is [] 222 | MAKE_DIR is [/home/valerio/Arduino/meteo-persiceto/DisplayTemperature] 223 | BUILD_DIR is [build/esp8266.esp8266.d1_mini] 224 | SRC is [DisplayTemperature.ino] 225 | HDRS is [ota.h wifiinfo.h] 226 | BIN is [build/esp8266.esp8266.d1_mini/DisplayTemperature.ino.bin] 227 | SERIAL_DEV is [/dev/ttyUSB0] 228 | 229 | ---> Installing "Adafruit RGB LCD Shield Library" 230 | Adafruit RGB LCD Shield Library depends on Adafruit RGB LCD Shield Library@1.2.0 231 | Downloading Adafruit RGB LCD Shield Library@1.2.0... 232 | Adafruit RGB LCD Shield Library@1.2.0 already downloaded 233 | Installing Adafruit RGB LCD Shield Library@1.2.0... 234 | 235 | ---> Installing "OneWire" 236 | OneWire depends on OneWire@2.3.5 237 | Downloading OneWire@2.3.5... 238 | OneWire@2.3.5 already downloaded 239 | Installing OneWire@2.3.5... 240 | 241 | ---> Installing "DallasTemperature" 242 | DallasTemperature depends on DallasTemperature@3.8.0 243 | Downloading DallasTemperature@3.8.0... 244 | DallasTemperature@3.8.0 already downloaded 245 | Installing DallasTemperature@3.8.0... 246 | 247 | ``` 248 | 249 | # Quickstart 250 | 251 | ## Install arduino-cli 252 | 253 | The *arduino-cli* is a single executable file, written in *Go* and 254 | statically linked; you can download this executable from the 255 | [arduino-cli installation 256 | page](https://arduino.github.io/arduino-cli/installation/) and put it 257 | in a directory on your PATH, for example in */usr/local/bin* 258 | 259 | Update the *arduino-cli* board index with the command: 260 | 261 | ``` 262 | $ arduino-cli core update-index 263 | Updating index: package_index.json downloaded 264 | ``` 265 | 266 | ## Install support for your board 267 | 268 | By default, unless you have already installed the Arduino IDE, you 269 | don't have support files for your board. You can search available boards 270 | for your device with a command similar to the following: 271 | 272 | ``` 273 | $ arduino-cli core search arduino 274 | ID Version Name 275 | Intel:arc32 2.0.4 Intel Curie Boards 276 | arduino-beta:mbed 1.2.1 Arduino mbed-enabled Boards 277 | arduino:avr 1.8.3 Arduino AVR Boards 278 | arduino:mbed 1.1.4 Arduino nRF528x Boards (Mbed OS) 279 | arduino:megaavr 1.8.6 Arduino megaAVR Boards 280 | arduino:nrf52 1.0.2 Arduino nRF52 Boards 281 | arduino:sam 1.6.12 Arduino SAM Boards (32-bits ARM Cortex-M3) 282 | arduino:samd 1.8.6 Arduino SAMD Boards (32-bits ARM Cortex-M0+) 283 | arduino:samd_beta 1.6.25 Arduino SAMD Beta Boards (32-bits ARM Cortex-M0+) 284 | littleBits:avr 1.0.0 littleBits Arduino AVR Modules 285 | ``` 286 | 287 | If, for example, we have an "Arduino UNO" board we have to install 288 | support files for "Arduino AVR Boards" with the command: 289 | 290 | ``` 291 | $ arduino-cli core install arduino:avr 292 | Downloading packages... 293 | arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7 downloaded 294 | arduino:avrdude@6.3.0-arduino17 downloaded 295 | arduino:arduinoOTA@1.3.0 downloaded 296 | arduino:avr@1.8.3 downloaded 297 | Installing arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7... 298 | arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7 installed 299 | Installing arduino:avrdude@6.3.0-arduino17... 300 | arduino:avrdude@6.3.0-arduino17 installed 301 | Installing arduino:arduinoOTA@1.3.0... 302 | arduino:arduinoOTA@1.3.0 installed 303 | Installing arduino:avr@1.8.3... 304 | arduino:avr@1.8.3 installed 305 | ``` 306 | 307 | ## Install support files for esp8266 boards or other boards 308 | 309 | In the default board index many boards made, by third parties, are not 310 | included. To include them we have add the related index urls to the 311 | config file. 312 | 313 | 1. First of all we have to generate the config file, otherwise 314 | *arduino-cli* will continue to use his defaults. We can generate it 315 | with the following command: 316 | 317 | ``` 318 | $ arduino-cli config init 319 | Config file written to: /home/valerio/.arduino15/arduino-cli.yaml 320 | ``` 321 | 322 | 2. Then we have to modify this configuration file to add the esp8266 323 | URL in the board_manager section, as shown below: 324 | 325 | ``` 326 | board_manager: 327 | additional_urls: 328 | - http://arduino.esp8266.com/stable/package_esp8266com_index.json 329 | ``` 330 | 331 | 3. Now we need to update again the board index with the command: 332 | 333 | ``` 334 | $ arduino-cli core update-index 335 | Updating index: package_index.json downloaded 336 | Updating index: package_esp8266com_index.json downloaded 337 | ``` 338 | 339 | 4. We can search our board: 340 | 341 | ``` 342 | $ arduino-cli core search esp8266 343 | ID Version Name 344 | esp8266:esp8266 2.7.2 esp8266 345 | ``` 346 | 347 | 4. And finally we can install the support files for our ESP8266 based 348 | board: 349 | 350 | ``` 351 | $ arduino-cli core install esp8266:esp8266 352 | Downloading packages... 353 | esp8266:xtensa-lx106-elf-gcc@2.5.0-4-b40a506 downloaded 354 | esp8266:mkspiffs@2.5.0-4-b40a506 downloaded 355 | esp8266:mklittlefs@2.5.0-4-fe5bb56 downloaded 356 | esp8266:python3@3.7.2-post1 downloaded 357 | esp8266:esp8266@2.7.2 downloaded 358 | Installing esp8266:xtensa-lx106-elf-gcc@2.5.0-4-b40a506... 359 | esp8266:xtensa-lx106-elf-gcc@2.5.0-4-b40a506 installed 360 | Installing esp8266:mkspiffs@2.5.0-4-b40a506... 361 | esp8266:mkspiffs@2.5.0-4-b40a506 installed 362 | Installing esp8266:mklittlefs@2.5.0-4-fe5bb56... 363 | esp8266:mklittlefs@2.5.0-4-fe5bb56 installed 364 | Installing esp8266:python3@3.7.2-post1... 365 | esp8266:python3@3.7.2-post1 installed 366 | Installing esp8266:esp8266@2.7.2... 367 | esp8266:esp8266@2.7.2 installed 368 | ``` 369 | 370 | If we want to use some other boards we have to repeat, and adapt, some 371 | of the previous steps. 372 | 373 | Our command line based development is now ready, it is possible to 374 | clone this repository and start compiling the two sample project 375 | available here withe the *make* command. 376 | 377 | 378 | 379 | 380 | 381 | --------------------------------------------------------------------------------