esp8266 aggiornamenti OTA dall’IDE Arduino: filesystem, firmware firmato e password

Spread the love

L’aggiornamento OTA (Over the Air) è il processo di caricamento del firmware su un modulo ESP utilizzando una connessione Wi-Fi anziché una porta seriale. Tale funzionalità diventa estremamente utile in caso di accesso fisico limitato o nullo al modulo.

esp8266 OTA update with Arduino IDE: filesystem, signed and password
esp8266 OTA update with Arduino IDE: filesystem, signed and password

Gli aggiornamenti OTA possono essere effettuati utilizzando:

  • Arduino IDE
  • Web Browser
  • Server HTTP

Prima di tutto leggi il tutorial “esp8266: flash del firmware binario(.bin) compilato e firmato”.

In questo articolo andremo a vedere gli aggiornamenti OTA con l’Arduino IDE, del firmware, del filesystem, firmato e non firmato.

Qui i dispositivi che uso WeMos D1 mini - NodeMCU V2 V2.1 V3 - esp01 - esp01 programmer

Introduzione

Per prima cosa osserviamo che il componente principale del core esp8266 necessita dell’installazione di python e durante l’installazione ricorda di aggiungere i binari alla PATH (per Windows)

ESP Tools Install Python and add It to path
ESP Tools Install Python and add It to path

Il caricamento OTA utilizza il protocollo UDP, quindi può funzionare (con ArduinoIDE) solo nella rete locale perché usa il broadcast per scoprire i dispositivi ed è limitato alla LAN.

Protocollo UDP è molto vecchio, semplice e potente, lo uso in altri progetti per scovare tutti i dispositivi nella mia rete con una semplice applicazione Android.

Esempio di base

Ora carica BasicOTA.ino, disponibile sotto File -> Examples -> ArduinoOTA -> BasicOTA.ino

Oppure copia e incolla da qui.

#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>

#ifndef STASSID
#define STASSID "<YOUR-SSID>"
#define STAPSK  "<YOUR-PASSWD>"
#endif

const char* ssid = STASSID;
const char* password = STAPSK;

void setup() {
  Serial.begin(115200);
  
  while (!Serial){};
  delay(100);
  Serial.flush();

  Serial.println("Booting");
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  while (WiFi.waitForConnectResult() != WL_CONNECTED) {
    Serial.println("Connection Failed! Rebooting...");
    delay(5000);
    ESP.restart();
  }

  // Port defaults to 8266
  // ArduinoOTA.setPort(8266);

  // Hostname defaults to esp8266-[ChipID]
  // ArduinoOTA.setHostname("myesp8266");

  // No authentication by default
  // ArduinoOTA.setPassword("admin");

  // Password can be set with it's md5 value as well
  // MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
  // ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3");

  ArduinoOTA.onStart([]() {
    String type;
    if (ArduinoOTA.getCommand() == U_FLASH) {
      type = "sketch";
    } else { // U_FS
      type = "filesystem";
    }

    // NOTE: if updating FS this would be the place to unmount FS using FS.end()
    Serial.println("Start updating " + type);
  });
  ArduinoOTA.onEnd([]() {
    Serial.println("\nEnd");
  });
  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
    Serial.printf("Progress: %u%%\r\n", (progress / (total / 100)));
  });
  ArduinoOTA.onError([](ota_error_t error) {
    Serial.printf("Error[%u]: ", error);
    if (error == OTA_AUTH_ERROR) {
      Serial.println("Auth Failed");
    } else if (error == OTA_BEGIN_ERROR) {
      Serial.println("Begin Failed");
    } else if (error == OTA_CONNECT_ERROR) {
      Serial.println("Connect Failed");
    } else if (error == OTA_RECEIVE_ERROR) {
      Serial.println("Receive Failed");
    } else if (error == OTA_END_ERROR) {
      Serial.println("End Failed");
    }
  });
  ArduinoOTA.begin();
  delay(1000);
  Serial.println("Ready");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  ArduinoOTA.handle();
}

Il codice è molto breve e la libreria ArduinoOTA fa tutto per noi.

L’uscita seriale è:

Booting
Ready
IP address: 192.168.1.160

Ricordati di impostare SSID e PASSWD della tua rete WiFi.

ArduinoOTA deve essere avviato con il comando ArduinoOTA.begin();e devi impostare sul ciclo il relativo handle ArduinoOTA.handle();, tutta la logica è gestita dalla libreria e offre alcuni listener per seguire il processo e applicare la logica aggiuntiva.

void onStart(OTA_CALLBACK(fn));
void onEnd(OTA_CALLBACK(fn));
void onProgress(OTA_CALLBACK_PROGRESS(fn));
void onError(OTA_CALLBACK_ERROR (fn));

Il significato di questo metodo è scritto nel nome, e nel codice di esempio possiamo trovare alcune note che possono aiutarti a capire tutte le funzionalità aggiuntive:

    String type;
    if (ArduinoOTA.getCommand() == U_FLASH) {
      type = "sketch";
    } else { // U_FS
      type = "filesystem";
    }

Puoi verificare se si tratta di un aggiornamento OTA della FLASH o del FS, questo significa che puoi caricare sketch e FileSystem allo stesso modo, ma lo vedremo in seguito.

Puoi caricare Flash o FileSystem

Carica sketch

Sketch OTA update File system EEPROM WiFi config

Ora se apriamo Tools -> Port possiamo trovare il nostro dispositivo elencato (scoperto via broadcast UDP).

Probabilmente, se usi windows, ti chiederà di consentire l’accesso alla rete.

Windows defender ask permissions for network
Windows defender ask permissions for network

Consentilo e ora nel menu lo troverai.

ArduinoOTA esp8266 ArduinoIDE connect device
ArduinoOTA esp8266 ArduinoIDE connect device

E ora possiamo scollegare il dispositivo dal PC, accenderlo tramite alimentatore esterno e caricare il codice.

Sketch uses 315048 bytes (30%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28956 bytes (35%) of dynamic memory, leaving 52964 bytes for local variables. Maximum is 81920 bytes.
C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/espota.py -i 192.168.1.160 -p 8266 --auth=admin -f C:\Users\renzo\AppData\Local\Temp\arduino_build_894273/ArduinoOTAesp8266.ino.bin 
Authenticating...OK
Uploading...........................................................................................................................................................................................................................

Ed ecco l’uscita seriale del microcontrollore.

Start updating sketch
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 1%
Progress: 1%
Progress: 2%
Progress: 2%
[...]
Progress: 97%
Progress: 97%
Progress: 97%
Progress: 98%
Progress: 98%
Progress: 99%
Progress: 99%
Progress: 100%

End

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v0004dee0
@cp:B0
ld
Booting
Ready
IP address: 192.168.1.160
Start updating filesystem

Caricare il FileSystem (SPIFFS o LittleFS)

Puoi caricare i dati del filesystem anche con il metodo classico tramite plugin, per installare il plugin SPIFFS o LittleFS fai riferimento al relativo tutorial:

WeMos D1 mini (esp8266): SPIFFS FileSystem integrato (deprecato)

WeMos D1 mini (esp8266): FileSystem integrato LittleFS (raccomandato)

Ora aggiungeremo la cartella data alla cartella degli sketch (con alcuni file) e utilizzeremo il plug-in per caricare.

esp8266 LittleFS plugin menu on ArduinoIDE
esp8266 LittleFS plugin menu on ArduinoIDE

Puoi controllare l’output della console dell’IDE per verificare cosa è successo.

[LittleFS] data    : D:\Projects\Arduino\sloeber-workspace-OTA\ArduinoOTAesp8266\data
[LittleFS] size    : 2024
[LittleFS] page    : 256
[LittleFS] block   : 8192
[LittleFS] upload  : C:\Users\renzo\AppData\Local\Temp\arduino_build_988758/ArduinoOTAesp8266.mklittlefs.bin
[LittleFS] IP      : 192.168.1.160

Uploading............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

E sul microcontrollore

Booting
Ready
IP address: 192.168.1.160
Start updating filesystem
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 0%
Progress: 1%
Progress: 1%
Progress: 1%
Progress: 1%
Progress: 1%
Progress: 1%
Progress: 1%
[...]
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 99%
Progress: 100%

End

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v0004de30
~ld
Booting
Ready
IP address: 192.168.1.160

Proteggi il caricamento con la password

Aggiungere una password è molto semplice, devi solo decommentare questa riga

  // No authentication by default
  ArduinoOTA.setPassword("admin");

Ora, quando provi a caricare il codice, viene visualizzato un popup e ti viene chiesto di aggiungere la password

Password popup for upload Arduino OTA sketch
Password popup for upload Arduino OTA sketch

Puoi vedere il processo anche dalla console.

Sketch uses 315008 bytes (30%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28956 bytes (35%) of dynamic memory, leaving 52964 bytes for local variables. Maximum is 81920 bytes.
C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/espota.py -i 192.168.1.160 -p 8266 --auth=admin -f C:\Users\renzo\AppData\Local\Temp\arduino_build_661891/ArduinoOTAesp8266.ino.bin 
Authenticating...OK
Uploading...........................................................................................................................................................................................................................

Firma il tuo codice binario

Per le applicazioni in cui è necessario un livello di sicurezza più elevato, possono essere richiesti aggiornamenti OTA firmati crittograficamente. Questi utilizzano l’hashing SHA256 al posto di MD5 e la crittografia a chiave pubblica a livello di bit RSA-2048 per garantire che solo il detentore di una chiave privata crittografica possa produrre aggiornamenti firmati accettati dai meccanismi di aggiornamento OTA.

Gli aggiornamenti firmati sono aggiornamenti i cui binari compilati sono firmati con una chiave privata (detenuta dallo sviluppatore) e verificati con una chiave pubblica (memorizzata nell’applicazione e disponibile per tutti). Il processo di firma calcola un hash del codice binario, crittografa l’hash con la chiave privata dello sviluppatore e aggiunge questo hash crittografato (chiamato anche firma) al file binario caricato (tramite OTA, web o server HTTP). Se il codice viene modificato o sostituito in qualsiasi modo da chiunque tranne il titolare della chiave privata dello sviluppatore, la firma non corrisponderà e ESP8266 rifiuterà il caricamento .

Public Private key sign and verify process
Public Private key sign and verify process

La firma crittografica protegge solo dalla manomissione dei file binari forniti tramite OTA. Se qualcuno ha accesso fisico, sarà sempre in grado di eseguire il flashing del dispositivo tramite la porta seriale. La firma inoltre non crittografa nulla tranne l’hash (in modo che non possa essere modificato), quindi questo non protegge il codice all’interno del dispositivo: se un utente ha accesso fisico può leggere il tuo programma. (cit.)

Ho già spiegato il processo di firma dell’articolo “esp8266: flash del firmware binario(.bin) compilato e firmato“.

Generare chiave pubblica e privata

Per firmare devi generare 2 chiavi: privata e pubblica, e ti serve un programma come openssl, puoi scaricare la versione linux da tutti i gestori di pacchetti, oppure scaricarla per windows da qui, per usarla con più semplicità aggiungi i bin al pah.

Ora possiamo generare la chiave privata

openssl genrsa -out private.key 2048

qui il contenuto del file private.key:

-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA12xlf4ADAPkxAmU3nFGXJ4mBZigM3xaWukJv6m8huG5ILQjx
reY95alFBFJPut2JIrz7T2Mol5Q9C9Ca5qcXSgSrliwGjd86Ex/5P64ZGLgMiShe
drAgaOReFN6Sj4+f4onzK2K2W2EGeUGWM9b+np4Gw9vRotOO7HRryuh+cMD6cKrs
uNURpxWP/fO9vCtwpucz+8qHsYpVxHptg2UH+gDoFKjmS0ctrwwGvC2hTbsjqA7J
pG5ryymMRbZAkhtwO8SJV2ivtrWqyeDYcUT8qAqeck1EngVcIvaHq8oCrt633A76
b8iCXc1WwEMJPEJ/ksiG7K/ZavYFdZDspt/OrQIDAQABAoIBADs1quwRZkH1O/g5
k8BeWJpgW/WVGnySu9jz+8jGxNDpVuMx6yNt/iNKlBKtAQcObuviX3yhd326G9FM
g9bTpD4O7I55CVAjQ9YP2rUbCADYTXHBa71ZiX7rDcTUrBnTUxGz8udA2XhiQaJA
WaVj+VXlf1yD5anIVic9lIcPwfkBQHvR+mnrWqMbGDUoACCqG5B7s8HQqrMMDEMb
m44OunnlbR9yml8Nwve7k1TgQcP3FOPDRzBoB65aKUDYU9qEqLQcmlwEutWJeGbM
FphAcIXyKGCM0MU5WGwgUwRFA3nTA9qz19tJRGCltNBvKN4fySae+8HgpBCiGhxk
cO1nI80CgYEA7JgCEIZ5XFRQzWh9NHj7vx4yFF5RJ1S/kfkZ4fH+LFgctclw5iO2
mFabQJQN59CvbIFyEV7QjhBBY02/okJqmScDCL/ow+xMQ7I5gK/T7YiTwii5zpCJ
RxRgwlUx7lDd6Q/wydwXsnwiLjNi4Rns9naKWO1MhdkebKGBU2Za3LcCgYEA6Rfa
hxGLztAi1rua30OGJ+H/WWEfxuQ/88WUm772F7nTYilXYhgSZSVMVWvK+9dHl6xt
+jSon5NmXinz6H/5yXgiv3/SQMY+SNTSdNBy8DE0kkLvsTPIxma7MFwtzmAoCZFb
FH4EA3yBtbOTPMQOkkVxAq55QZ24k29cglvZE7sCgYEAsQ2AXgWERIgEf/M131K6
cmeSapO6f4h4ZDDaIbAK2fyGX7QD/PW064PEYytozJXq8XRdfIpL4ERh6oKAaljx
lPMQ3jdfZV8sI2z4g0kRe6y9hosboW2gjcS+NC+1UfbKWmNHeohuY29p1NE3qeTQ
5BAJsErE/VVh40FpmpP6YzkCgYEAs4/SojZcE0e3buA64D8uO88XXI07Y4Y11d6h
KpGjFofqVTYvwLt2gECJW0ycpAElf6wvVI34UGXGeEetQ7BChndrnUYkfA27sXNx
ZNenk2z0aK/z4fhYdK5zCUAZcWAVt7koBtNE2EKz0Xuysx79cqTX+A7cDjYoGDuz
ciC7Sz0CgYEA4OfQK3fsGR9wuBkDzlSS6NBpgXEKpkcTSuY8+SAq+BA0i981Hehz
rkSJU6kd5FK/q+7bk0zgwhQf7RKa2O+ChDSGYnwD38ns06mn8AZIMgltITmxzliK
N8fcchAv5ETo/+zeHTIR32PJe+s+U8pyuquheZi+nrVRjXgyo0uyqi0=
-----END RSA PRIVATE KEY-----

E la relativa chiave pubblica

openssl rsa -in private.key -outform PEM -pubout -out public.key

e qui il mio public.key:

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA12xlf4ADAPkxAmU3nFGX
J4mBZigM3xaWukJv6m8huG5ILQjxreY95alFBFJPut2JIrz7T2Mol5Q9C9Ca5qcX
SgSrliwGjd86Ex/5P64ZGLgMiShedrAgaOReFN6Sj4+f4onzK2K2W2EGeUGWM9b+
np4Gw9vRotOO7HRryuh+cMD6cKrsuNURpxWP/fO9vCtwpucz+8qHsYpVxHptg2UH
+gDoFKjmS0ctrwwGvC2hTbsjqA7JpG5ryymMRbZAkhtwO8SJV2ivtrWqyeDYcUT8
qAqeck1EngVcIvaHq8oCrt633A76b8iCXc1WwEMJPEJ/ksiG7K/ZavYFdZDspt/O
rQIDAQAB
-----END PUBLIC KEY-----

Adesso modifichiamo il codice, per abilitare la verifica della firma inseriamo la public.key e la aggiungiamo al SignVerifier

BearSSL::PublicKey signPubKey{R"(-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA12xlf4ADAPkxAmU3nFGX
J4mBZigM3xaWukJv6m8huG5ILQjxreY95alFBFJPut2JIrz7T2Mol5Q9C9Ca5qcX
SgSrliwGjd86Ex/5P64ZGLgMiShedrAgaOReFN6Sj4+f4onzK2K2W2EGeUGWM9b+
np4Gw9vRotOO7HRryuh+cMD6cKrsuNURpxWP/fO9vCtwpucz+8qHsYpVxHptg2UH
+gDoFKjmS0ctrwwGvC2hTbsjqA7JpG5ryymMRbZAkhtwO8SJV2ivtrWqyeDYcUT8
qAqeck1EngVcIvaHq8oCrt633A76b8iCXc1WwEMJPEJ/ksiG7K/ZavYFdZDspt/O
rQIDAQAB
-----END PUBLIC KEY-----)"};
BearSSL::HashSHA256 hash;
BearSSL::SigningVerifier sign{&signPubKey};

Quindi installeremo il Verifier nell’Updater.

  Update.installSignature(&hash, &sign);

L’intero codice diventa così:

#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>

#ifndef STASSID
#define STASSID "<YOUR-SSID>"
#define STAPSK  "<YOUR-PASSWD>"
#endif

const char* ssid = STASSID;
const char* password = STAPSK;

BearSSL::PublicKey signPubKey{R"(-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA12xlf4ADAPkxAmU3nFGX
J4mBZigM3xaWukJv6m8huG5ILQjxreY95alFBFJPut2JIrz7T2Mol5Q9C9Ca5qcX
SgSrliwGjd86Ex/5P64ZGLgMiShedrAgaOReFN6Sj4+f4onzK2K2W2EGeUGWM9b+
np4Gw9vRotOO7HRryuh+cMD6cKrsuNURpxWP/fO9vCtwpucz+8qHsYpVxHptg2UH
+gDoFKjmS0ctrwwGvC2hTbsjqA7JpG5ryymMRbZAkhtwO8SJV2ivtrWqyeDYcUT8
qAqeck1EngVcIvaHq8oCrt633A76b8iCXc1WwEMJPEJ/ksiG7K/ZavYFdZDspt/O
rQIDAQAB
-----END PUBLIC KEY-----)"};
BearSSL::HashSHA256 hash;
BearSSL::SigningVerifier sign{&signPubKey};

void setup() {
  Serial.begin(115200);
  
  while (!Serial){};
  delay(100);
  Serial.flush();

  Serial.println("Booting");
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  while (WiFi.waitForConnectResult() != WL_CONNECTED) {
    Serial.println("Connection Failed! Rebooting...");
    delay(5000);
    ESP.restart();
  }

  // Port defaults to 8266
  // ArduinoOTA.setPort(8266);

  // Hostname defaults to esp8266-[ChipID]
  // ArduinoOTA.setHostname("myesp8266");

  // No authentication by default
  // ArduinoOTA.setPassword("admin");

  // Password can be set with it's md5 value as well
  // MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
  // ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3");

  Update.installSignature(&hash, &sign);

  ArduinoOTA.onStart([]() {
    String type;
    if (ArduinoOTA.getCommand() == U_FLASH) {
      type = "sketch";
    } else { // U_FS
      type = "filesystem";
    }

    // NOTE: if updating FS this would be the place to unmount FS using FS.end()
    Serial.println("Start updating " + type);
  });
  ArduinoOTA.onEnd([]() {
    Serial.println("\nEnd");
  });
  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
    Serial.printf("Progress: %u%%\r\n", (progress / (total / 100)));
  });
  ArduinoOTA.onError([](ota_error_t error) {
    Serial.printf("Error[%u]: ", error);
    if (error == OTA_AUTH_ERROR) {
      Serial.println("Auth Failed");
    } else if (error == OTA_BEGIN_ERROR) {
      Serial.println("Begin Failed");
    } else if (error == OTA_CONNECT_ERROR) {
      Serial.println("Connect Failed");
    } else if (error == OTA_RECEIVE_ERROR) {
      Serial.println("Receive Failed");
    } else if (error == OTA_END_ERROR) {
      Serial.println("End Failed");
    }
  });
  ArduinoOTA.begin();
  delay(1000);
  Serial.println("Ready");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  ArduinoOTA.handle();
}

Infine copiamo private.key nella cartella dello sketch ed eseguiamo nuovamente il caricamento.

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\renzo\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\renzo\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\renzo\OneDrive\Documenti\Arduino\libraries -fqbn=esp8266:esp8266:d1_mini:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600 -ide-version=10813 -build-path C:\Users\renzo\AppData\Local\Temp\arduino_build_924270 -warnings=all -build-cache C:\Users\renzo\AppData\Local\Temp\arduino_cache_288576 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs-3.0.4-gcc10.3-1757bed.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs-3.0.4-gcc10.3-1757bed.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.python3.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.xtensa-lx106-elf-gcc-3.0.4-gcc10.3-1757bed.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed -verbose D:\Projects\Arduino\sloeber-workspace-OTA\ArduinoOTAesp8266\ArduinoOTAesp8266.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\renzo\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\renzo\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\renzo\OneDrive\Documenti\Arduino\libraries -fqbn=esp8266:esp8266:d1_mini:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600 -ide-version=10813 -build-path C:\Users\renzo\AppData\Local\Temp\arduino_build_924270 -warnings=all -build-cache C:\Users\renzo\AppData\Local\Temp\arduino_cache_288576 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mkspiffs-3.0.4-gcc10.3-1757bed.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.mklittlefs-3.0.4-gcc10.3-1757bed.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.python3.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed -prefs=runtime.tools.xtensa-lx106-elf-gcc-3.0.4-gcc10.3-1757bed.path=C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed -verbose D:\Projects\Arduino\sloeber-workspace-OTA\ArduinoOTAesp8266\ArduinoOTAesp8266.ino
Using board 'd1_mini' from platform in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2
Using core 'esp8266' from platform in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2
Detecting libraries used...
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lwip2/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/core" -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\cores\\esp8266" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\variants\\d1_mini" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for ESP8266WiFi.h: [ESP8266WiFi@1.0]
ResolveLibrary(ESP8266WiFi.h)
  -> candidates: [ESP8266WiFi@1.0]
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lwip2/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/core" -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\cores\\esp8266" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\variants\\d1_mini" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266WiFi\\src" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for ESP8266mDNS.h: [ESP8266mDNS@1.2]
ResolveLibrary(ESP8266mDNS.h)
  -> candidates: [ESP8266mDNS@1.2]
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lwip2/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/core" -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\cores\\esp8266" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\variants\\d1_mini" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266mDNS\\src" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for ArduinoOTA.h: [ArduinoOTA@1.0]
ResolveLibrary(ArduinoOTA.h)
  -> candidates: [ArduinoOTA@1.0]
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lwip2/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/core" -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\cores\\esp8266" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\variants\\d1_mini" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266mDNS\\src" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ArduinoOTA" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\sketch\sloeber.ino.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\BearSSLHelpers.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\CertStoreBearSSL.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFi.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFiAP.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFiGratuitous.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFiMulti.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFiSTA-WPS.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFiSTA.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\ESP8266WiFiScan.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\WiFiClient.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\WiFiClientSecureBearSSL.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\WiFiServer.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\WiFiServerSecureBearSSL.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\WiFiUdp.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi\src\enable_wifi_at_boot_time.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS\src\ESP8266mDNS.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS\src\LEAmDNS.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS\src\LEAmDNS_Control.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS\src\LEAmDNS_Helpers.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS\src\LEAmDNS_Structs.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS\src\LEAmDNS_Transfer.cpp
Using cached library dependencies for file: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ArduinoOTA\ArduinoOTA.cpp
Generating function prototypes...
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lwip2/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/core" -c -w -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -w -x c++ -E -CC -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\cores\\esp8266" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\variants\\d1_mini" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266mDNS\\src" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ArduinoOTA" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp" -o "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/signing.py" --mode header --publickey "D:\\Projects\\Arduino\\sloeber-workspace-OTA\\ArduinoOTAesp8266/public.key" --out "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/core/Updater_Signing.h"
Enabling binary signing
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\sketch\sloeber.ino.cpp.o
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -D_GNU_SOURCE "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lwip2/include" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/core" -c -Wall -Wextra -Werror=return-type -Os -g -free -fipa-pta -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++17 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10813 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\cores\\esp8266" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\variants\\d1_mini" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266WiFi\\src" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ESP8266mDNS\\src" "-IC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2\\libraries\\ArduinoOTA" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp" -o "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp.o"
Compiling libraries...
Compiling library "ESP8266WiFi"
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFiGratuitous.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\BearSSLHelpers.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\CertStoreBearSSL.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFiAP.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFiSTA-WPS.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFiGeneric.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFiMulti.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFi.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFiScan.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFiSTA.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\WiFiClient.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\WiFiServer.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\WiFiClientSecureBearSSL.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\WiFiServerSecureBearSSL.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\enable_wifi_at_boot_time.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\WiFiUdp.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266WiFi\ESP8266WiFi.a
Compiling library "ESP8266mDNS"
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266mDNS\LEAmDNS_Helpers.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266mDNS\ESP8266mDNS.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266mDNS\LEAmDNS.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266mDNS\LEAmDNS_Structs.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266mDNS\LEAmDNS_Transfer.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266mDNS\LEAmDNS_Control.cpp.o
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ESP8266mDNS\ESP8266mDNS.a
Compiling library "ArduinoOTA"
Using previously compiled file: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270\libraries\ArduinoOTA\ArduinoOTA.cpp.o
Compiling core...
Using precompiled core: C:\Users\renzo\AppData\Local\Temp\arduino_cache_288576\core\core_98ef9c1c482104edb2f65184685070ee.a
Linking everything together...
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/mkdir.py" -p "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ld_h/"
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/cp.py" "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/ld/eagle.flash.4m2m.ld" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ld_h/local.eagle.flash.ld.h"
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-gcc" -CC -E -P -DVTABLES_IN_FLASH -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ld_h/local.eagle.flash.ld.h" -o "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/local.eagle.flash.ld"
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-gcc" -CC -E -P -DVTABLES_IN_FLASH -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/local.eagle.app.v6.common.ld"
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-gcc" -fno-exceptions -Wl,-Map "-Wl,C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.map" -g -Wall -Wextra -Werror=return-type -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static "-LC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lib" "-LC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/lib/NONOSDK22x_190703" "-LC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270" "-LC:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sdk/libc/xtensa-lx106-elf/lib" -Tlocal.eagle.flash.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.elf" -Wl,--start-group "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\ArduinoOTAesp8266.ino.cpp.o" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\sketch\\sloeber.ino.cpp.o" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\libraries\\ESP8266WiFi\\ESP8266WiFi.a" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\libraries\\ESP8266mDNS\\ESP8266mDNS.a" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270\\libraries\\ArduinoOTA\\ArduinoOTA.cpp.o" "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_cache_288576\\core\\core_98ef9c1c482104edb2f65184685070ee.a" -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group "-LC:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270"
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/elf2bin.py" --eboot "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/bootloaders/eboot/eboot.elf" --app "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.elf" --flash_mode dio --flash_freq 40 --flash_size 4M --path "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin" --out "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.bin"
Creating BIN file "C:\Users\renzo\AppData\Local\Temp\arduino_build_924270/ArduinoOTAesp8266.ino.bin" using "C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/bootloaders/eboot/eboot.elf" and "C:\Users\renzo\AppData\Local\Temp\arduino_build_924270/ArduinoOTAesp8266.ino.elf"
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/signing.py" --mode sign --privatekey "D:\\Projects\\Arduino\\sloeber-workspace-OTA\\ArduinoOTAesp8266/private.key" --bin "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.bin" --out "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.bin.signed" --legacy "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.bin.legacy_sig"
Signed binary: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270/ArduinoOTAesp8266.ino.bin.signed
Legacy signed binary: C:\Users\renzo\AppData\Local\Temp\arduino_build_924270/ArduinoOTAesp8266.ino.bin.legacy_sig
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sizes.py" --elf "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.elf" --path "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin" --mmu "-DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000"
Executable segment sizes:
ICACHE : 32768           - flash instruction cache 
IROM   : 284160          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 27836   / 32768 - code in IRAM          (IRAM_ATTR, ISRs...) 
DATA   : 1504  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 1376  ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 26064 )         - zeroed variables      (global, static) in RAM/HEAP 
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi 
Using library ESP8266mDNS at version 1.2 in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS 
Using library ArduinoOTA at version 1.0 in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ArduinoOTA 
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-size" -A "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_924270/ArduinoOTAesp8266.ino.elf"
Sketch uses 314876 bytes (30%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28944 bytes (35%) of dynamic memory, leaving 52976 bytes for local variables. Maximum is 81920 bytes.
C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/espota.py -i 192.168.1.160 -p 8266 --auth= -f C:\Users\renzo\AppData\Local\Temp\arduino_build_924270/ArduinoOTAesp8266.ino.bin 
Detected Signed Update. C:\Users\renzo\AppData\Local\Temp\arduino_build_924270/ArduinoOTAesp8266.ino.bin.signed will be uploaded instead.
Uploading...........................................................................................................................................................................................................................

Puoi verificare che IDE carica in modo trasparente un binario firmato.

Ora faremo un test, rimuoviamo la chiave dalla cartella di base riavviamo ArduinoIDE e proviamo a caricare.

"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" -I "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.0.2/tools/sizes.py" --elf "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_138010/ArduinoOTAesp8266.ino.elf" --path "C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin" --mmu "-DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000"
Executable segment sizes:
ICACHE : 32768           - flash instruction cache 
IROM   : 321748          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 27836   / 32768 - code in IRAM          (IRAM_ATTR, ISRs...) 
DATA   : 1504  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 1972  ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 26240 )         - zeroed variables      (global, static) in RAM/HEAP 
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi 
Using library ESP8266mDNS at version 1.2 in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266mDNS 
Using library ArduinoOTA at version 1.0 in folder: C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ArduinoOTA 
"C:\\Users\\renzo\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-size" -A "C:\\Users\\renzo\\AppData\\Local\\Temp\\arduino_build_138010/ArduinoOTAesp8266.ino.elf"
Sketch uses 353060 bytes (33%) of program storage space. Maximum is 1044464 bytes.
Global variables use 29716 bytes (36%) of dynamic memory, leaving 52204 bytes for local variables. Maximum is 81920 bytes.
C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\renzo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/espota.py -i 192.168.1.160 -p 8266 --auth= -f C:\Users\renzo\AppData\Local\Temp\arduino_build_138010/ArduinoOTAesp8266.ino.bin 
Uploading.....................................................................................................................................................................................................................................................

11:48:28 [ERROR]: ERROR[12]: 
11:48:28 [ERROR]: ERROR[12]: 

E l’uscita seriale dell’ESP sarà:

Progress: 98%
Progress: 99%
Progress: 99%
Progress: 100%
Error[4]: End Failed

I caricamenti saranno bloccati se non hai il file private.key.

Grazie

  1. Firmware and OTA update

Spread the love

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *