Hello Sara & Rui,
I received these errors when compiling code for –
2.3 – WebSocket Web Server: Control Outputs (ON/OFF Buttons)
I tried to compile numerous times with same result.
The ‘Build Filesystem & Upload Filesystem Image’ actions were successful.
Please help, Stephen.
Terminal output follows:-
* Executing task in folder SAS_WebSvr_WebSocket_Buttons: C:\Users\steph\.platformio\penv\Scripts\platformio.exe run –target upload
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
———————————————————————————–
Verbose mode can be enabled via `-v, –verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 (6.3.2) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
– framework-arduinoespressif32 @ 3.20009.0 (2.0.9)
– tool-esptoolpy @ 1.40501.0 (4.5.1)
– tool-mkfatfs @ 2.0.1
– tool-mklittlefs @ 1.203.210628 (2.3)
– tool-mkspiffs @ 2.230.0 (2.30)
– toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies…
Dependency Graph
|– ESP Async WebServer @ 1.2.3
|– SPIFFS @ 2.0.0
|– AsyncTCP @ 1.1.1
|– WiFi @ 2.0.0
Building in release mode
Compiling .pio\build\esp32doit-devkit-v1\src\main.cpp.o
Building .pio\build\esp32doit-devkit-v1\bootloader.bin
Generating partitions .pio\build\esp32doit-devkit-v1\partitions.bin
esptool.py v4.5.1
Creating esp32 image…
Merged 1 ELF section
Successfully created esp32 image.
Compiling .pio\build\esp32doit-devkit-v1\lib8f0\AsyncTCP\AsyncTCP.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib102\FS\FS.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib102\FS\vfs_api.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFi.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiAP.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiClient.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiScan.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiServer.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib73c\WiFi\WiFiUdp.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\AsyncEventSource.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib8f0\libAsyncTCP.a
Archiving .pio\build\esp32doit-devkit-v1\lib102\libFS.a
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\AsyncWebSocket.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\SPIFFSEditor.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\WebAuthentication.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\WebHandlers.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\WebRequest.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\WebResponses.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib5ea\ESP Async WebServer\WebServer.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib4cf\SPIFFS\SPIFFS.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\FirmwareMSC.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib73c\libWiFi.a
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\HWCDC.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\IPAddress.cpp.o
Archiving .pio\build\esp32doit-devkit-v1\lib4cf\libSPIFFS.a
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\IPv6Address.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\MD5Builder.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Print.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\StreamString.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Tone.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\USB.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\USBCDC.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\USBMSC.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\WString.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\base64.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-i2c-slave.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-rgb-led.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-time.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-tinyusb.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\firmware_msc_fat.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\libb64\cencode.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\main.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\stdlib_noniso.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\esp32doit-devkit-v1\lib5ea\libESP Async WebServer.a
Archiving .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a
Linking .pio\build\esp32doit-devkit-v1\firmware.elf
c:/users/steph/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\lib5ea\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x10): undefined reference to `SHA1Init’
c:/users/steph/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\lib5ea\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x18): undefined reference to `SHA1Update’
c:/users/steph/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\lib5ea\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x1c): undefined reference to `SHA1Final’
c:/users/steph/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\lib5ea\libESP Async WebServer.a(AsyncWebSocket.cpp.o): in function `AsyncWebSocketResponse::AsyncWebSocketResponse(String const&, AsyncWebSocket*)’:
C:\Users\steph\OneDrive\1E OP’s WEB DESIGN PROJECTS\1 WEB SERVER COURSE v2.2\RMT WebServer2 COURSE FILES\SAS_WebSvr_WebSocket_Buttons/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/AsyncWebSocket.cpp:1269: undefined reference to `SHA1Init’
c:/users/steph/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\steph\OneDrive\1E OP’s WEB DESIGN PROJECTS\1 WEB SERVER COURSE v2.2\RMT WebServer2 COURSE FILES\SAS_WebSvr_WebSocket_Buttons/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/AsyncWebSocket.cpp:1270: undefined reference to `SHA1Update’
c:/users/steph/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\steph\OneDrive\1E OP’s WEB DESIGN PROJECTS\1 WEB SERVER COURSE v2.2\RMT WebServer2 COURSE FILES\SAS_WebSvr_WebSocket_Buttons/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/AsyncWebSocket.cpp:1271: undefined reference to `SHA1Final’
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32doit-devkit-v1\firmware.elf] Error 1
=========================== [FAILED] Took 18.98 seconds ===========================
Sara,
platform.ini file as requested..
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
lib_deps = ESP Async WebServer
Hello Sara,
Have you any idea what is causing these error messages?
Kind regards,
Stephen
Hi.
Use
platform = espressif32@3.5.0
instead of
platform = espressif32
Let me know if that solves the issue.
Regards,
Sara
Hello Sara,
Yes Sara the platform change allowed the code to compile and upload and test OK.
Can you tell me why the original ‘platform = espressif32’ worked on all the previous projects and suddenly it doesn’t, please?
Also, should I change future projects to include ‘platform = espressif32@3.5.0’ ?
Thanks for your help,
Stephen
Hi.
To be honest, I’m not sure.
There’s currently an issue with the library, and using espressif version 3.5.0 solves the issue.
Hopefully, the creator of the library will fix that issue soon (however, it’s been there for quite some time).
Alternatively, you can also use the library github link. Instead of using the following in your platformio.ini file to include the library:
lib_deps = ESP Async WebServer
use the following instead:
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git
Yes. I recommend in future projects, either use the library via the github link or espressif 3.5.0.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara