Arduino: 1.8.13 (Mac OS X), Board: «ESP32 Wrover Module, Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS), QIO, 80MHz, 921600, None»
In file included from /Users/liam/Documents/Arduino/libraries/WiFi/src/WiFiSTA.h:28:0,
Multiple libraries were found for «WiFi.h»
Used: /Users/liam/Documents/Arduino/libraries/WiFi
from /Users/liam/Documents/Arduino/libraries/WiFi/src/WiFi.h:32,
Not used: /private/var/folders/70/vlp7lcr95b3gf3cg1fzcrmfm0000gn/T/AppTranslocation/8F8E0161-733F-4D29-8A4C-DA2673E24E02/d/Arduino.app/Contents/Java/libraries/WiFi
Not used: /Users/liam/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi
from /Users/liam/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/ArduinoOTA/src/ArduinoOTA.h:4,
from /Users/liam/Documents/Arduino/libraries/am43-master/examples/MQTTBlinds/MQTTBlinds.ino:31:
/Users/liam/Documents/Arduino/libraries/WiFi/src/WiFiGeneric.h:31:39: fatal error: wifi_provisioning/manager.h: No such file or directory
compilation terminated.
exit status 1
Error compiling for board ESP32 Wrover Module.
This report would have more information with
«Show verbose output during compilation»
option enabled in File -> Preferences.
I tried to upload the «SimpleWifiServer» example and it came up with this error, scroll further down to see the code
Arduino: 1.8.13 (Windows 10), Board: «ESP32 Wrover Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), QIO, 80MHz, 921600, None»
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6/tools/sdk/liblibesp32.a(cpu_start.o):(.literal.main_task+0x14): undefined reference to `app_main’
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6/tools/sdk/liblibesp32.a(cpu_start.o): In function `main_task’:
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/cpu_start.c:545: undefined reference to `app_main’
librariesWiFiWiFiSTA.cpp.o:(.literal.startup._GLOBAL__sub_I__ZN12WiFiSTAClass14_autoReconnectE+0xc): undefined reference to `String::String(char const*)’
librariesWiFiWiFiSTA.cpp.o:(.literal.exit._GLOBAL__sub_D__ZN12WiFiSTAClass14_autoReconnectE+0x0): undefined reference to `String::~String()’
librariesWiFiWiFiSTA.cpp.o: In function `_GLOBAL__sub_I__ZN12WiFiSTAClass14_autoReconnectE’:
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6coresesp32/IPAddress.h:94: undefined reference to `IPAddress::IPAddress(unsigned char, unsigned char, unsigned char, unsigned char)’
librariesWiFiWiFiSTA.cpp.o: In function `_GLOBAL__sub_I__ZN12WiFiSTAClass14_autoReconnectE’:
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6librariesWiFisrc/WiFiSTA.cpp:74: undefined reference to `String::String(char const*)’
librariesWiFiWiFiSTA.cpp.o: In function `_GLOBAL__sub_D__ZN12WiFiSTAClass14_autoReconnectE’:
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6librariesWiFisrc/WiFiSTA.cpp:74: undefined reference to `String::~String()’
librariesWiFiWiFiServer.cpp.o: In function `_GLOBAL__sub_I__ZN10WiFiServer10setTimeoutEj’:
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6coresesp32/Print.h:80: undefined reference to `IPAddress::IPAddress(unsigned char, unsigned char, unsigned char, unsigned char)’
sketchtest_delete_simple_wifi_server_coppy.ino.cpp.o:(.literal.startup._GLOBAL__sub_I_ssid+0xc): undefined reference to `IPAddress::IPAddress(unsigned char, unsigned char, unsigned char, unsigned char)’
sketchtest_delete_simple_wifi_server_coppy.ino.cpp.o: In function `_GLOBAL__sub_I_ssid’:
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6coresesp32/IPAddress.h:94: undefined reference to `IPAddress::IPAddress(unsigned char, unsigned char, unsigned char, unsigned char)’
librariesWiFiWiFiGeneric.cpp.o: In function `_GLOBAL__sub_I__Z14postToSysQueueP19system_prov_event_t’:
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6librariesWiFisrc/WiFiGeneric.cpp:200: undefined reference to `IPAddress::IPAddress(unsigned char, unsigned char, unsigned char, unsigned char)’
librariesWiFiETH.cpp.o: In function `_GLOBAL__sub_I__ZN8ETHClassC2Ev’:
C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6coresesp32/IPAddress.h:94: undefined reference to `IPAddress::IPAddress(unsigned char, unsigned char, unsigned char, unsigned char)’
librariesWiFiWiFi.cpp.o:C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6coresesp32/IPAddress.h:94: more undefined references to `IPAddress::IPAddress(unsigned char, unsigned char, unsigned char, unsigned char)’ follow
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for «WiFi.h»
Used: C:Users44746AppDataLocalArduino15packagesesp32hardwareesp321.0.6librariesWiFi
Not used: C:Program Files (x86)ArduinolibrariesWiFi
exit status 1
Error compiling for board ESP32 Wrover Module.
This report would have more information with
«Show verbose output during compilation»
option enabled in File -> Preferences.
CODE
/*
WiFi Web Server LED Blink
A simple web server that lets you blink an LED via the web.
This sketch will print the IP address of your WiFi Shield (once connected)
to the Serial monitor. From there, you can open that address in a web browser
to turn on and off the LED on pin 5.
If the IP address of your shield is yourAddress:
http://yourAddress/H turns the LED on
http://yourAddress/L turns it off
This example is written for a network using WPA encryption. For
WEP or WPA, change the Wifi.begin() call accordingly.
Circuit:
* WiFi shield attached
* LED attached to pin 5
created for arduino 25 Nov 2012
by Tom Igoe
ported for sparkfun esp32
31.01.2017 by Jan Hendrik Berlin
*/
#include <WiFi.h>
const char* ssid = «yourssid»;
const char* password = «yourpasswd»;
WiFiServer server(80);
void setup()
{
Serial.begin(115200);
pinMode(5, OUTPUT); // set the LED pin mode
delay(10);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print(«Connecting to «);
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(«.»);
}
Serial.println(«»);
Serial.println(«WiFi connected.»);
Serial.println(«IP address: «);
Serial.println(WiFi.localIP());
server.begin();
}
int value = 0;
void loop(){
WiFiClient client = server.available(); // listen for incoming clients
if (client) { // if you get a client,
Serial.println(«New Client.»); // print a message out the serial port
String currentLine = «»; // make a String to hold incoming data from the client
while (client.connected()) { // loop while the client’s connected
if (client.available()) { // if there’s bytes to read from the client,
char c = client.read(); // read a byte, then
Serial.write(c); // print it out the serial monitor
if (c == ‘n’) { // if the byte is a newline character
// if the current line is blank, you got two newline characters in a row.
// that’s the end of the client HTTP request, so send a response:
if (currentLine.length() == 0) {
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
// and a content-type so the client knows what’s coming, then a blank line:
client.println(«HTTP/1.1 200 OK»);
client.println(«Content-type:text/html»);
client.println();
// the content of the HTTP response follows the header:
client.print(«Click <a href=»/H»>here</a> to turn the LED on pin 5 on.<br>»);
client.print(«Click <a href=»/L»>here</a> to turn the LED on pin 5 off.<br>»);
// The HTTP response ends with another blank line:
client.println();
// break out of the while loop:
break;
} else { // if you got a newline, then clear currentLine:
currentLine = «»;
}
} else if (c != ‘r’) { // if you got anything else but a carriage return character,
currentLine += c; // add it to the end of the currentLine
}
// Check to see if the client request was «GET /H» or «GET /L»:
if (currentLine.endsWith(«GET /H»)) {
digitalWrite(5, HIGH); // GET /H turns the LED on
}
if (currentLine.endsWith(«GET /L»)) {
digitalWrite(5, LOW); // GET /L turns the LED off
}
}
}
// close the connection:
client.stop();
Serial.println(«Client Disconnected.»);
}
}
SO i have been getting this error window when i compile a simple code to run different LED lights on the ESP32-S2-SOLA (Wrovere) module
Code:
int LED_BUILTIN = 2;
void setup() {
pinMode (LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
error:
Arduino: 1.8.15 (Linux), Board: "ESP32 Wrover Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), QIO, 80MHz, 115200, None"
Traceback (most recent call last):
File "/home/student/.arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool.py", line 38, in <module>
import serial
ImportError: No module named serial
exit status 1
Error compiling for board ESP32 Wrover Module.
Эта ошибка связана с отсутствием объявления функции std::round()
, которая используется в вашем коде. Она вызвана тем, что компилятор не может найти объявление этой функции из-за неправильной настройки для библиотек.
Вы можете исправить эту проблему, добавив следующую строку в начало вашего скетча:
#include <cmath>
Эта директива загрузит библиотеку cmath
, которая содержит объявление std::round()
, и позволит вашему коду успешно скомпилироваться.
Если вы все еще сталкиваетесь с проблемой, убедитесь, что ваша версия Arduino IDE и библиотеки ESP32 обновлены до последней версии, и повторите попытку.
Удачи!
#arduino #compilation #fatal-error #esp32
Вопрос:
Я работаю над DOIT ESP32 DEVKIT V1 и использую Arduino IDE 1.8.13 (Windows 10 Pro Education x64) для кодирования этой платы. Я установил плату ESP32 (и ESP8266) также из менеджера плат внутри Arduino IDE. Он работал нормально в течение нескольких дней, пока один друг не прислал мне файл .ino, и после того, как он открыл его и попытался скомпилировать и загрузить этот файл на мою доску, произошла странная ошибка компиляции (это та же ошибка, которая произошла в системе моей подруги, и ей пришлось переключиться на другую систему, чтобы продолжить бесперебойную работу). Я использую эти URL-адреса вДополнительные URL-адреса менеджера плат в разделе «Настройки» в среде IDE Arduino:
https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json
И при компиляции появляются следующие сообщения об ошибках:
In file included from c:programdatamatlabsupportpackagesr2018a3p.instrsetarduinoide.instrsetidepkgspackagesesp32toolsxtensa-esp32-elf-gcc1.22.0-97-gc752ad5-5.2.0xtensa-esp32-elfincludec 5.2.0algorithm:60:0,
from C:ProgramDataMATLABSupportPackagesR2018a3P.instrsetarduinoide.instrsetidepkgspackagesesp32hardwareesp321.0.6coresesp32/Arduino.h:142,
from sketchsketch_aug21a.ino.cpp:1:
c:programdatamatlabsupportpackagesr2018a3p.instrsetarduinoide.instrsetidepkgspackagesesp32toolsxtensa-esp32-elf-gcc1.22.0-97-gc752ad5-5.2.0xtensa-esp32-elfincludec 5.2.0utility:68:28: fatal error: bits/c config.h: No such file or directory
compilation terminated.
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.
Пожалуйста, предоставьте мне пошаговое руководство по устранению этой проблемы, так как я новичок в таких ошибках и проблемах с каталогами. Обратите внимание, что при выборе плат Arduino AVR (таких как MEGA, UNO и т. Д.) Ошибок компиляции не возникает. Я уже пытался переустановить плату ESP32 из диспетчера плат, но безуспешно.
Комментарии:
1. удалите папку пакета поддержки плат
esp32
, а затем попробуйте установить его снова2. Спасибо @Juraj, это сработало! Проблема была в папке. На самом деле никакой папки не было. Поэтому я вручную создал папку и установил в нее ядро. ИСПРАВЛЕНО! 🙂
Ответ №1:
ИСПРАВЛЕНО! Проблема заключалась в том, что нигде не было папок /hardware/espressif/esp32, несмотря на то, что была установлена поддержка платы. Поэтому я удалил плату из менеджера платы Arduino, сам создал папки и установил в них ядро ESP32. Я следовал всем инструкциям, приведенным по этой ссылке: https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide/installing-the-esp32-arduino-core
Они предоставили все шаги (включая создание папок/каталогов) для установки ядра через репозиторий github. И теперь ошибка исправлена, и она работает отлично!