When trying to compile both 2-1 and 2-2 files I downloaded from your site (Build Web Servers with ESP32) I get the following error in platformio. I am not sure how to correct this and would appreciate any input. collect2.exe: error: ld returned 1 exit status*** [.pio\\build\\esp-wrover-kit\\firmware.elf] Error 1
I can run 1-1 and 1-2 fine.
The following is the output of 2-3. I created a new project with your original name. I than moved ALL the files and folders from the download to the new project folder, overwriting existing ones.
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 (5.3.0) > 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.20006.221224 (2.0.6)
– tool-esptoolpy @ 1.40400.0 (4.4.0)
– 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
| |– AsyncTCP @ 1.1.1
| |– FS @ 2.0.0
| |– WiFi @ 2.0.0
|– SPIFFS @ 2.0.0
| |– FS @ 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.4
Creating esp32 image…
Merged 1 ELF section
Successfully created esp32 image.
Compiling .pio\build\esp32doit-devkit-v1\lib59b\AsyncTCP\AsyncTCP.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libf4e\FS\FS.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libf4e\FS\vfs_api.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFi.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiAP.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiClient.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiSTA.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiScan.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiServer.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\lib715\WiFi\WiFiUdp.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\AsyncEventSource.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\AsyncWebSocket.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\SPIFFSEditor.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\WebAuthentication.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\WebHandlers.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\WebRequest.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\WebResponses.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\libb2f\ESP Async WebServer\WebServer.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\liba78\SPIFFS\SPIFFS.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\FirmwareMSC.cpp.o
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
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
Archiving .pio\build\esp32doit-devkit-v1\libf4e\libFS.a
Archiving .pio\build\esp32doit-devkit-v1\lib59b\libAsyncTCP.a
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\esp32doit-devkit-v1\FrameworkArduino\libb64\cencode.c.o
Indexing .pio\build\esp32doit-devkit-v1\libf4e\libFS.a
Indexing .pio\build\esp32doit-devkit-v1\lib59b\libAsyncTCP.a
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\lib715\libWiFi.a
Indexing .pio\build\esp32doit-devkit-v1\lib715\libWiFi.a
Archiving .pio\build\esp32doit-devkit-v1\liba78\libSPIFFS.a
Indexing .pio\build\esp32doit-devkit-v1\liba78\libSPIFFS.a
Archiving .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a
Indexing .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a
Archiving .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a
Indexing .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a
Linking .pio\build\esp32doit-devkit-v1\firmware.elf
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x10): undefined reference to `SHA1Init’
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x18): undefined reference to `SHA1Update’
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a(AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x1c): undefined reference to `SHA1Final’
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a(AsyncWebSocket.cpp.o): in function `AsyncWebSocketResponse::AsyncWebSocketResponse(String const&, AsyncWebSocket*)’:
C:\Users\bdrma\Documents\PlatformIO\Projects\2_3_Outputs_Websockets/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/AsyncWebSocket.cpp:1269: undefined reference to `SHA1Init’
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\bdrma\Documents\PlatformIO\Projects\2_3_Outputs_Websockets/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/AsyncWebSocket.cpp:1270: undefined reference to `SHA1Update’
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\bdrma\Documents\PlatformIO\Projects\2_3_Outputs_Websockets/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/AsyncWebSocket.cpp:1271: undefined reference to `SHA1Final’
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts’
c:/users/bdrma/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libb2f\libESP Async WebServer.a(WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)’:
C:\Users\bdrma\Documents\PlatformIO\Projects\2_3_Outputs_Websockets/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts’
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32doit-devkit-v1\firmware.elf] Error 1
I found the answer here:
https://github.com/me-no-dev/ESPAsyncWebServer/issues/1151
Course code is for a older platform version.
Hi.
Is everything working as expected?
Let me know if you need further help.
Regards,
Sara
In section 3.4 a lot of the details of the website generation are hidden in a style file that is downloaded from a webpage. I would like to understand how to develop such a project independent to the web. The details of how this style sheet works is not readable.
As for my previous posts, all is now working once I found out that a update broke the code you have in your coarse files.
Thanks
Hi agian.
What file are you referring to?
Are you referring to the Javascript library to build the charts? https://code.highcharts.com/highcharts.js
Regards,
Sara
Thanks for replying. The section of code that refers to external resources is the part I would like to further understand
“<link rel=”stylesheet” href=”https://use.fontawesome.com/releases/v5.7.2/css/al
l.css” integrity=”sha384-
fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr” crossorigin=”an
onymous”>
<link rel=”stylesheet” type=”text/css” href=”style.css”>
<script src=”https://code.highcharts.com/highcharts.js”></script>.
I would like to apply a simpler function as sec 3.4 but my esp32 will be on a network with no web access.
Basically, instead of loading the library from the URL, you’ll need to create a new file locally called highcharts.js, and copy the content of that URL into there. This new file should also be loaded into the ESP filesystem,
Then, you’ll need to reference that file in the HTML using its path instead of the URL (more about this here: https://www.w3schools.com/tags/att_script_src.asp)
I hope this helps.
Regards,
Sara