Common Issues¶
Here are some of the most common issues around the ESP32 development using Arduino.
Note
Please consider contributing if you have found any issues with the solution here.
Installing¶
Here are the common issues during the installation.
Building¶
Missing Python: “python”: executable file not found in $PATH¶
You are trying to build your sketch using Ubuntu and this message appears:
"exec: "python": executable file not found in $PATH Error compiling for board ESP32 Dev Module"
Solution¶
To avoid this error, you can install the python-is-python3
package to create the symbolic links.
sudo apt install python-is-python3
If you are not using Ubuntu, you can check if you have the Python correctly installed or the presence of the symbolic links/environment variables.
Flashing¶
Why is my board not flashing/uploading when I try to upload my sketch?¶
To be able to upload the sketch via serial interface, the ESP32 must be in the download mode. The download mode allows you to upload the sketch over the serial port and to get into it, you need to keep the GPIO0 in LOW while a resetting (EN pin) cycle.
If you are trying to upload a new sketch and your board is not responding, there are some possible reasons.
Possible fatal error message from the Arduino IDE:
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Solution¶
Here are some steps that you can try to:
-
Check your USB cable and try a new one.
-
Change the USB port.
-
Check your power supply.
-
In some instances, you must keep GPIO0 LOW during the uploading process via the serial interface.
-
Hold down the “BOOT” button in your ESP32 board while uploading/flashing.
In some development boards, you can try adding the reset delay circuit, as described in the Power-on Sequence section on the ESP32 Hardware Design Guidelines in order to get into the download mode automatically.
Hardware¶
Why is my computer not detecting my board?¶
If your board is not being detected after connecting to the USB, you can try to:
Solution¶
-
Check if the USB driver is missing. — USB Driver Download Link
-
Check your USB cable and try a new one.
-
Change the USB port.
-
Check your power supply.
-
Check if the board is damaged or defective.
Wi-Fi¶
Why does the board not connect to WEP/WPA-“encrypted” Wi-Fi?¶
Please note that WEP/WPA has significant security vulnerabilities and its use is strongly discouraged.
The support may therefore be removed in the future. Please migrate to WPA2 or newer.
Solution¶
Nevertheless, it may be necessary to connect to insecure networks. To do this, the security requirement of the ESP32 must be lowered to an insecure level by using:
WiFi.setMinSecurity(WIFI_AUTH_WEP); // Lower min security to WEP. // or WiFi.setMinSecurity(WIFI_AUTH_WPA_PSK); // Lower min security to WPA.
Why does the board not connect to WPA3-encrypted Wi-Fi?¶
WPA3 support is resource intensive and may not be compiled into the used SDK.
Solution¶
-
Check WPA3 support by your SDK.
-
Compile your custom SDK with WPA3 support.
Sample code to check SDK WPA3 support at compile time:
#ifndef CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE #warning "No WPA3 support." #endif
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.»);
}
}
#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. И теперь ошибка исправлена, и она работает отлично!
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
hicotton02 opened this issue
Jan 16, 2017
· 27 comments
Comments
followed the directions (today) here:
https://github.com/espressif/arduino-esp32/blob/master/doc/windows.md
and tried to verify/compile a range of basic sketches. all throw the same error. I am using the ESP32 Thing by sparkfun.
One variance is that I had to manually install the requests module for python before i could run python get.py
Error:
Arduino: 1.8.1 (Windows 10), Board: «ESP32 Dev Module, 80MHz, 921600»
C:Program Files (x86)Arduinoarduino-builder -dump-prefs -logger=machine -hardware C:Program Files (x86)Arduinohardware -hardware C:UsersskazDocumentsArduinohardware -tools C:Program Files (x86)Arduinotools-builder -tools C:Program Files (x86)Arduinohardwaretoolsavr -built-in-libraries C:Program Files (x86)Arduinolibraries -libraries C:UsersskazDocumentsArduinolibraries -fqbn=espressif:esp32:esp32:FlashFreq=80,UploadSpeed=921600 -ide-version=10801 -build-path C:UsersskazAppDataLocalTemparduino_build_893527 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:UsersskazDocumentsArduinoBrewing_ControllerBrewing_Controller.ino
C:Program Files (x86)Arduinoarduino-builder -compile -logger=machine -hardware C:Program Files (x86)Arduinohardware -hardware C:UsersskazDocumentsArduinohardware -tools C:Program Files (x86)Arduinotools-builder -tools C:Program Files (x86)Arduinohardwaretoolsavr -built-in-libraries C:Program Files (x86)Arduinolibraries -libraries C:UsersskazDocumentsArduinolibraries -fqbn=espressif:esp32:esp32:FlashFreq=80,UploadSpeed=921600 -ide-version=10801 -build-path C:UsersskazAppDataLocalTemparduino_build_893527 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:UsersskazDocumentsArduinoBrewing_ControllerBrewing_Controller.ino
Using board ‘esp32’ from platform in folder: C:UsersskazDocumentsArduinohardwareespressifesp32
Using core ‘esp32’ from platform in folder: C:UsersskazDocumentsArduinohardwareespressifesp32
Detecting libraries used…
«C:UsersskazDocumentsArduinohardwareespressifesp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++» -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='»mbedtls/esp_config.h»‘ -DHAVE_CONFIG_H «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/config» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/bt» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/driver» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/esp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ethernet» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/fatfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/freertos» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/log» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mdns» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/vfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ulp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nvs_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/spi_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/sdmmc» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/openssl» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/app_update» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/tcpip_adapter» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/xtensa-debug-module» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/coap» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/wpa_supplicant» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/expat» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/json» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mbedtls» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nghttp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/lwip» -std=gnu++11 -fno-exceptions -fno-rtti -Os -g3 -Wpointer-arith -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10801 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DESP32 «-IC:UsersskazDocumentsArduinohardwareespressifesp32coresesp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32variantsesp32» «C:UsersskazAppDataLocalTemparduino_build_893527sketchBrewing_Controller.ino.cpp» -o «nul»
Generating function prototypes…
«C:UsersskazDocumentsArduinohardwareespressifesp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++» -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='»mbedtls/esp_config.h»‘ -DHAVE_CONFIG_H «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/config» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/bt» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/driver» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/esp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ethernet» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/fatfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/freertos» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/log» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mdns» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/vfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ulp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nvs_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/spi_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/sdmmc» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/openssl» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/app_update» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/tcpip_adapter» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/xtensa-debug-module» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/coap» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/wpa_supplicant» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/expat» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/json» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mbedtls» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nghttp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/lwip» -std=gnu++11 -fno-exceptions -fno-rtti -Os -g3 -Wpointer-arith -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10801 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DESP32 «-IC:UsersskazDocumentsArduinohardwareespressifesp32coresesp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32variantsesp32» «C:UsersskazAppDataLocalTemparduino_build_893527sketchBrewing_Controller.ino.cpp» -o «C:UsersskazAppDataLocalTemparduino_build_893527preprocctags_target_for_gcc_minus_e.cpp»
exit status -1073741515
Error compiling for board ESP32 Dev Module.
+1
Arduino: 1.8.1 (Windows Store 1.8.1.0) (Windows 10), Board: «ESP32 Dev Module, 80MHz, 921600»
…
exit status -1073741515
Error compiling for board ESP32 Dev Module.
please rerun tools/get.py to get an updated toolchain. And please report if that fixed it
reran the command and same error.
took it a step further and deleted everything reran whole setup:
`$ mkdir -p ~/Documents/Arduino/hardware/espressif &&
cd ~/Documents/Arduino/hardware/espressif &&
git clone https://github.com/espressif/arduino-esp32.git esp32 &&
cd esp32/tools/ &&
python get.py
Cloning into ‘esp32’…
remote: Counting objects: 2529, done.
remote: Compressing objects: 100% (195/195), done.
remote: Total 2529 (delta 22), reused 0 (delta 0), pack-reused 2315
Receiving objects: 100% (2529/2529), 49.21 MiB | 15.67 MiB/s, done.
Resolving deltas: 100% (937/937), done.
Checking out files: 100% (884/884), done.
Platform: i686-mingw32
Downloading xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip
Done
Extracting dist/xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip`
Error:
`Arduino: 1.8.1 (Windows 10), Board: «ESP32 Dev Module, 80MHz, 921600»
C:Program Files (x86)Arduinoarduino-builder -dump-prefs -logger=machine -hardware C:Program Files (x86)Arduinohardware -hardware C:UsersskazDocumentsArduinohardware -tools C:Program Files (x86)Arduinotools-builder -tools C:Program Files (x86)Arduinohardwaretoolsavr -built-in-libraries C:Program Files (x86)Arduinolibraries -libraries C:UsersskazDocumentsArduinolibraries -fqbn=espressif:esp32:esp32:FlashFreq=80,UploadSpeed=921600 -ide-version=10801 -build-path C:UsersskazAppDataLocalTemparduino_build_534755 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:UsersskazDocumentsArduinoBrewing_ControllerBrewing_Controller.ino
C:Program Files (x86)Arduinoarduino-builder -compile -logger=machine -hardware C:Program Files (x86)Arduinohardware -hardware C:UsersskazDocumentsArduinohardware -tools C:Program Files (x86)Arduinotools-builder -tools C:Program Files (x86)Arduinohardwaretoolsavr -built-in-libraries C:Program Files (x86)Arduinolibraries -libraries C:UsersskazDocumentsArduinolibraries -fqbn=espressif:esp32:esp32:FlashFreq=80,UploadSpeed=921600 -ide-version=10801 -build-path C:UsersskazAppDataLocalTemparduino_build_534755 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:UsersskazDocumentsArduinoBrewing_ControllerBrewing_Controller.ino
Using board ‘esp32’ from platform in folder: C:UsersskazDocumentsArduinohardwareespressifesp32
Using core ‘esp32’ from platform in folder: C:UsersskazDocumentsArduinohardwareespressifesp32
Detecting libraries used…
«C:UsersskazDocumentsArduinohardwareespressifesp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++» -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='»mbedtls/esp_config.h»‘ -DHAVE_CONFIG_H «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/config» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/bt» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/driver» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/esp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ethernet» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/fatfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/freertos» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/log» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mdns» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/vfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ulp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nvs_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/spi_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/sdmmc» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/openssl» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/app_update» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/tcpip_adapter» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/xtensa-debug-module» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/coap» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/wpa_supplicant» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/expat» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/json» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mbedtls» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nghttp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/lwip» -std=gnu++11 -fno-exceptions -fno-rtti -Os -g3 -Wpointer-arith -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10801 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DESP32 «-IC:UsersskazDocumentsArduinohardwareespressifesp32coresesp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32variantsesp32» «C:UsersskazAppDataLocalTemparduino_build_534755sketchBrewing_Controller.ino.cpp» -o «nul»
Generating function prototypes…
«C:UsersskazDocumentsArduinohardwareespressifesp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++» -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='»mbedtls/esp_config.h»‘ -DHAVE_CONFIG_H «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/config» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/bt» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/driver» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/esp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ethernet» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/fatfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/freertos» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/log» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mdns» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/vfs» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/ulp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nvs_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/spi_flash» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/sdmmc» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/openssl» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/app_update» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/tcpip_adapter» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/xtensa-debug-module» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/newlib» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/coap» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/wpa_supplicant» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/expat» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/json» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/mbedtls» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/nghttp» «-IC:UsersskazDocumentsArduinohardwareespressifesp32/tools/sdk/include/lwip» -std=gnu++11 -fno-exceptions -fno-rtti -Os -g3 -Wpointer-arith -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10801 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DESP32 «-IC:UsersskazDocumentsArduinohardwareespressifesp32coresesp32» «-IC:UsersskazDocumentsArduinohardwareespressifesp32variantsesp32» «C:UsersskazAppDataLocalTemparduino_build_534755sketchBrewing_Controller.ino.cpp» -o «C:UsersskazAppDataLocalTemparduino_build_534755preprocctags_target_for_gcc_minus_e.cpp»
exit status -1073741515
Error compiling for board ESP32 Dev Module.`
+1 Cleaned, Rebooted, Reran:
Cloning into ‘esp32’…
remote: Counting objects: 2529, done.
remote: Compressing objects: 100% (195/195), done.
remote: Total 2529 (delta 22), reused 0 (delta 0), pack-reused 2315
Receiving objects: 100% (2529/2529), 49.21 MiB | 4.25 MiB/s, done.
Resolving deltas: 100% (937/937), done.
Checking out files: 100% (884/884), done.
Platform: i686-mingw32
Downloading xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip
Done
Extracting dist/xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip
…
exit status -1073741515
Error compiling for board ESP32 Dev Module.
seems that I need to test this on Windows.. maybe the new toolchain or something. no issues on a Mac.
let me know if there is something i can help with. note all my installs are 64 bit. (Arduino, Python, etc)
+1, just received the module and have the same error message. (Win 10, X64. Arduino 1.6.10 hourly Build)
Confirmed to work OK with Arduino 1.8.1 on Linux SuSE 13.2.
you windows guys can try the old toolchain from here and please do report if working
if it complains about missing impure_ptr, add this to your sketch:
void *operator new(size_t size) { return malloc(size); } void *operator new[](size_t size) { return malloc(size); } void operator delete(void * ptr) { free(ptr); } void operator delete[](void * ptr) { free(ptr); } extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); void __cxa_pure_virtual(void) { abort(); } void __cxa_deleted_virtual(void) { abort(); }
Last two posts solves my problem on Windows 10 64bit, Arduino IDE 1.8.1 64bit and python 2.7.12 64bit
thx me-no-dev
Older toolchain and and impure_ptr fix works for me too (Win 7 64bit, Arduino 1.8.0, python 2.7.12)
Thanks me-no-dev.
confirmed. with the impure_ptr fix.
+1 works with older toolchain and required impure_ptr fix. Also I had to hold button to download after 10 attempts. Seems esp_tool.py may be more touchy connecting to dev module than in the past.
Arduino: 1.8.1 (Windows Store 1.8.1.0) (Windows 10), Board: «ESP32 Dev Module, 80MHz, 921600», Python 2.7.13 (with added pip install requests)
alright guys toolchain updated and new get.exe added next to get.py. Git pull the repo and doubleclick get.exe to update the toolchain
Clean clone then get.exe instead of get.py and all works fine 1) I see updated Windows directions so no concerns over import requests, 2) no issue with compiler error. 3) no more issue with impure_ptr. Looks good — thanks.
Confirmed good sir. looks good!
Awesome now let’s add binary esptool so users would have only git as dependency
@hoopsurfer I also noticed on Windows esptool to have harder time to reset the board. Will ask around
igrr
mentioned this issue
Jan 23, 2017
alright guys
toolchain updated and new get.exe added next to get.py. Git pull the repo and doubleclick get.exe to update the toolchain
Thank you me-no-dev! It looks like you have the fix! But I’m lost. Sorry — total noob to Arduino/ESP32/Git/Python/… I downloaded and extracted «xtensa-esp32-elf-win32-1.22.0-59 (1).zip». Now What? Can you explain the above for a slow learner?
@me-no-dev I’m getting the same error with both the new toolchain and the old one that you posted, I’m running Win 8.1 x64, Arduino 1.8.5, and the esp 32 dev kit v1 by «do it» this is the error:
exit status 1
Error compiling for board ESP32 Dev Module.
Do you have any suggestions?
@jjimmy-S after recommended installation, in the last where you have to run get.exe, did it throw any error message? I think in your case the toolchain was not installed. If get.exe throws errors you can this.
Or you can install the toolchain and other tools manually.
Download
- toolchain
- esptool
- mkspiffs
and unzip
- content of xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip into SKETCHBOOK_PATHhardwareespressifesp32toolsxtensa-esp32-elf
- esptool.exe from esptool-4dab24e-windows.zip to SKETCHBOOK_PATHhardwareespressifesp32tools
- mkspiffs.exe from mkspiffs-0.2.1-windows.zip into SKETCHBOOK_PATHhardwareespressifesp32toolsmkspiffs
Same here. Tried to compile FastLed examples. Basic blink example works fine and output-pin toggles 0 and 3.3V.
In file included from C:ProgrammeKonsistentarduino-1.8.1librariesFastLED/led_sysdefs.h:27:0,
from C:ProgrammeKonsistentarduino-1.8.1librariesFastLED/FastLED.h:44,
from C:UserscysigAppDataLocalTemparduino_modified_sketch_37868DemoReel100.ino:1:
C:ProgrammeKonsistentarduino-1.8.1librariesFastLED/platforms/avr/led_sysdefs_avr.h:12:20: fatal error: avr/io.h: No such file or directory
compilation terminated.
Mehrere Bibliotheken wurden für «FastLED.h» gefunden
Benutzt: C:ProgrammeKonsistentarduino-1.8.1librariesFastLED
Nicht benutzt: C:ProgrammeKonsistentarduino-1.8.1librariesFastLED-3.1.0
exit status 1
Fehler beim Kompilieren für das Board ESP32 Dev Module.
AppDataLocalArduino15packagesesp32toolsxtensa-esp32-elf-gcc1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-g++»: file does not exist
this is what I always get after trying all the fixes.
why is the path screwed up?
and /
Windows uses , unix uses /
If you are on a windows machine, seeing backslashes is a good indicator the problem is on your system. forward slashes would mean the error is in something compiled on a development system.
У ESP32 есть несколько распространенных проблем, особенно когда вы пытаетесь загрузить новые скетчи или установить плату ESP32 в Arduino IDE. Это руководство посвящено неполадкам ESP32 при программировании ее в среде Arduino. Здесь мы приведём список наиболее распространенных проблем с ESP32, а также расскажем, как исправить их.
Важно: убедитесь, что у вас установлена последняя версия Arduino IDE. Использование другой версии Arduino IDE может вызвать непредвиденные проблемы и ошибки.
Как мне установить пакет ESP32 для Arduino IDE?
Существует пакет ESP32 для среды Arduino, который позволяет вам программировать плату в Arduino IDE. Итак, по порядку:
- В среде Arduino переходим Файл > Настройки;
- В графе дополнительные ссылки для менеджера плат указываем эту ссылку: https://dl.espressif.com/dl/package_esp32_index.json
- Затем переходим в Инструменты > Плата “Arduino UNO” > Менеджер плат, вбиваем в поиске esp32 и устанавливаем пакет для платы.
Не отображается плата ESP32 в меню инструментов Arduino
Если плата не отображается в Arduino IDE, убедитесь, что вы щелкнули по маленькой стрелке (выделенной на рисунке ниже), чтобы найти свою плату:
Если и в этот раз вы не можете найти название своей платы ESP32, рекомендуем повторить процесс установки с нуля.
C:/Users/User/Documents/Arduino/hardware/espressif/esp32/ tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g ++ »: файл не существует
Если Arduino IDE не может скомпилировать код для платы ESP32 и выдает данную ошибку, рекомендуем переустановить ESP32.
Примечание. На ПК с Windows часто установлено несколько версий Arduino IDE (portable и устанавливаемая). Убедитесь, что вы используете то приложение Arduino, в которое вы установили ESP32.
Не удалось подключиться к ESP32: время ожидания истекло… Подключение…»
В данном случае при попытке загрузить скетч на плату приложение не может подключиться к ней. Это значит, что ESP32 не находится в режиме прошивки / загрузки.
Выполните следующие действия:
- Удерживайте кнопку «BOOT » на плате ESP32.
- Нажмите кнопку «Загрузка» в Arduino IDE, чтобы загрузить новый скетч:
- После того, как вы увидите «Connecting…. » в Arduino IDE, уберите палец с кнопки «BOOT» :
- После этого, вы должны увидеть сообщение о завершении загрузки
Вот и все. На ESP32 должен быть загружен новый скетч. После загрузки нового скетча нажмите кнопку «ENABLE», чтобы перезапустить ESP32 и запустить загруженный скетч.
Ошибка при компиляции скетча WiFiScan
Если вы попытаетесь загрузить скетч ESP32 WiFiScan.ino, который есть в примерах
И он не может скомпилироваться с подобным сообщением об ошибке:
In function ‘void setup()’: ScanNetworks:52: error: ‘class WiFiClass’ has no member named ‘firmwareVersion’ String fv = WiFi.firmwareVersion(); |
То вероятнее всего, среда Arduino компилирует библиотеку WiFi для платы Arduino (вместо использования библиотеки ESP32 WiFi).
Примечание: Вы, вероятно, никогда не будете использовать WiFi-экран с платой Arduino, так ведь? Если вы его не используете, вы можете удалить эту папку (ну или переместить ее на рабочий стол, например).
Библиотека WiFi находится по аналогичному пути:
C:UsersruisantosDownloadsarduino-1.8.7-windowsarduino-1.8.7librariesWiFi
И /или в:
C:UsersruisantosDocumentsArduinolibrarieslibrariesWiFi
После удаления всей папки библиотеки WiFi из одного или обоих мест перезапустите Arduino IDE и попробуйте снова скомпилировать код.
COM-порт не найден / недоступен
Если вы подключаете плату ESP32 к компьютеру, но не можете выбрать порт ESP32, доступный в вашей Arduino IDE (он неактивен):
Это может быть одна из следующих двух проблем:
- Отсутствуют драйверы USB;
- Кабель USB не имеет проводов для передачи данных.
Если вы не видите доступный COM-порт вашего ESP, это может означать, что у вас не установлены драйверы USB. Присмотритесь к микросхеме рядом с регулятором напряжения на плате и проверьте ее название.
Плата ESP32 DEVKIT V1 DOIT, например, использует чип CP2102.
Зайдите в поисковик и найдите свой чип, установите драйверы для него.
Вы можете скачать драйверы CP2102 на сайте Silicon Labs.
После их установки перезапустите Arduino IDE, и вы должны увидеть COM-порт в меню «Инструменты».
Если у вас установлены драйверы, но вы не видите свое устройство, еще раз проверьте, что вы используете USB-кабель с проводами для передачи данных.
USB-кабели от внешних аккумуляторов часто не имеют проводов для передачи данных (они только заряжают). То есть, ваш компьютер не сможет установить последовательную связь с ESP32. Используйте другой USB-кабель.
Монитор порта в Arduino IDE «не работает»
Если ESP32 выводит только странный текст или бессвязные сообщения в мониторе порта среды Arduino, убедитесь, что у вас выбран правильный COM-порт, и установите правильную скорость передачи. В большинстве примеров используется скорость 115200 бод.
Ошибка: «Brownout detector was triggered»
Когда вы открываете монитор порта и появляется повторяющееся сообщение об ошибке «Brownout detector was triggered», скорее всего это значит, что есть какая-то проблема с оборудованием.
Это часто связано с одной из следующих проблем:
USB-кабель плохого качества;
Слишком длинный USB-кабель;
Дефект в плате (плохо припаянные соединения);
Неисправный USB-порт на ПК;
Через USB-порт на ПК идет недостаточно питания.
Решение: попробуйте другой более короткий USB-кабель, попробуйте другой USB-порт компьютера или используйте USB-концентратор с внешним источником питания.
Плата ESP32 не работает с Arduino IDE
Если вы следовали всем советам по устранению неполадок, а ESP32 не работает с Arduino IDE, мы рекомендуем попробовать редакторы Atom и PlatformIO.
Заключение
Мы надеемся, что руководство оказалось полезным. Если у вас возникнут другие проблемы, опубликуйте их в комментариях ниже, и мы постараемся помочь вам решить вашу проблему.
Данный материал был переведен с сайта RandomNerdTutorials.com. Авторские права принадлежат ее автору — Rui Santos. Автор продает очень полезные и толковые курсы по ESP8266 / ESP32 (на английском языке), ознакомиться с которыми можно по ссылке.
Вопросы по прошивке и работе с кодом лучше писать напрямую автору в комментариях к статье (на англ. языке)
-
butchalline
- Posts: 12
- Joined: Sat Oct 14, 2017 2:05 pm
Example sketch does not compile
Sketch is RTClib > ds1307 which does date and time functions using a DS1307 RTC connected via I2C and Wire lib
After compiling, I get:
Arduino: 1.8.12 (Windows 10), Board: «ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None»
C:UsersButchHamDocumentsArduino Butch codelibrariesRTClibRTClib.cpp: In constructor ‘DateTime::DateTime(const char*, const char*)’:
C:UsersButchHamDocumentsArduino Butch codelibrariesRTClibRTClib.cpp:136:70: error: operation on ‘((DateTime*)this)->DateTime::m’ may be undefined [-Werror=sequence-point]
case ‘J’: m = date[1] == ‘a’ ? 1 : m = date[2] == ‘n’ ? 6 : 7; break;
^
C:UsersButchHamDocumentsArduino Butch codelibrariesRTClibRTClib.cpp: In constructor ‘DateTime::DateTime(const __FlashStringHelper*, const __FlashStringHelper*)’:
C:UsersButchHamDocumentsArduino Butch codelibrariesRTClibRTClib.cpp:161:70: error: operation on ‘((DateTime*)this)->DateTime::m’ may be undefined [-Werror=sequence-point]
case ‘J’: m = buff[1] == ‘a’ ? 1 : m = buff[2] == ‘n’ ? 6 : 7; break;
^
cc1plus.exe: some warnings being treated as errors
exit status 1
Error compiling for board ESP32 Dev Module.
Board is ESP32 dev module (wroom)
Arduino IDE is 1.8.12
Sketch compiles and works as expected with UNO
Any and all help appreciated, thanks
-
tinker
- Posts: 5
- Joined: Tue Oct 27, 2020 12:09 am
Re: Example sketch does not compile
Postby tinker » Tue Apr 20, 2021 11:25 pm
You’ve probably tried these already, but if not, it might help a little.
While this might not fix things for you, in my experience, running working Arduino Code on an ESP32 usually works fine (after tweaking GPIOs). Sometimes you need to also add #include <Arduino.h> or #include <SPI.h> or #include <Wire.h>, or all of them at the very least!
You didn’t mention what the filename is of your sketch… ?? Does it end with .c ?? If so, rename it to .cpp. This has caught me out a few times when I started out.
Other than that, you might want to add some more info. It might be the libraries (#include lines in your sketch) aren’t quite compatible with your board too, in which case, you’ll have to dig deep, and it won’t be for the faint-hearted / undetermined / those who swerve a challenge!
Good luck!
-
ESP_Sprite
- Posts: 7351
- Joined: Thu Nov 26, 2015 4:08 am
Re: Example sketch does not compile
Postby ESP_Sprite » Wed Apr 21, 2021 1:53 am
In this case, the library is just written shoddily and the compiler refuses to compile the crap in it:
Code: Select all
m = buff[1] == 'a' ? 1 : m = buff[2] == 'n' ? 6 : 7;
It’s entirely unclear what m is supposed to be here, as it’s assigned twice to two different values in one operation.
-
butchalline
- Posts: 12
- Joined: Sat Oct 14, 2017 2:05 pm
Re: Example sketch does not compile
Postby butchalline » Wed Apr 21, 2021 2:34 pm
Thank you Tinker and Sprite. Still no joy yet.
This library was written in 2016 by JeeLabs (aka J.C. Wipple) who usually does good work.
I am just a hobbyist and certainly not a geek, but it seems that the problem lies with some conversions or interpretations between the Arduino IDE and the ESP32 dev board. There are several examples in this library and they all work with a UNO, but none of the examples work with the ESP dev board.
Can you recommend any other IDE’s or RTC sketches that I could explore?
Thanks
Butch
-
butchalline
- Posts: 12
- Joined: Sat Oct 14, 2017 2:05 pm
Re: Example sketch does not compile
Postby butchalline » Wed Apr 21, 2021 3:09 pm
Update: I was using ver. 1.2 of the library. Updated to ver. 1.13 and all works as expected.
-
tinker
- Posts: 5
- Joined: Tue Oct 27, 2020 12:09 am
Re: Example sketch does not compile
Postby tinker » Wed Jul 14, 2021 9:50 pm
Thanks for posting your resolution! And well done for figuring it out!
My choice of IDE is VSCode with the PlatformIO plugin enabled. Take your time with it, as it will reap untold rewards with your productivity, and help you make more complex projects with varying chips, as time goes on. It’s my go-to IDE now. Arduino IDE is great too, so if it works for you, don’t change. But do invest bursts of time experimenting with VS Code, especially if you’re playing with more than one board and more than one architecture.
I’m sure you’re already doing this, so for the benefit of others in different positions to you, please check out YouTube and blog posts to help you learn. I’m not an expert, yet I’ve been working professionally for many many years with software in various languages and platforms. It’s impossible to stop learning new things. There are more ways to learn now than there has ever been. There are also many opinions too. Everyone has an opinion. Don’t be blinded by one expert’s perspective or experience. Form your own opinion. and be open to changing it, if it makes you a better person, and then change it again, even if it goes against what you’ve learned. Eventually you’ll learn that it’s okay to change your mind!
Who is online
Users browsing this forum: No registered users and 13 guests