arduinoWebSockets
arduinoWebSockets copied to clipboard
WebSockets library not working with ESP32 with Arduino 2.0.0 Release
WebSockets Library Version: 2.3.5 ESP32 Arduino Release: 2.0.0
Compiler Output:
In file included from /root/Arduino/libraries/WebSockets/src/WebSockets.cpp:45:0:
/root/.arduino15/packages/esp32/hardware/esp32/2.0.0/tools/sdk/esp32/include/mbedtls/port/include/esp32/sha.h:20:2: warning: #warning esp32/sha.h is deprecated, please use sha_parallel_engine.h instead [-Wcpp]
#warning esp32/sha.h is deprecated, please use sha_parallel_engine.h instead
^
cc1plus: warning: unrecognized command line option '-Wno-frame-address'
/root/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/root/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory
collect2: error: ld returned 1 exit status
Error during build: exit status 1
I then switch back to ESP32 Arduino Release 1.0.6 and my code compiled with no issues.
I'm guessing that it is related to the esp32/sha.h
warning. Please let me know how I can help! DJ
I have the same problem
After doing some more investigation, I don't think that this library was causing my issue. I wrapped all WebSockets stuff with #ifdef / #endif statements to disable the code and still got the same linking errors.
I was able to compile my code using the ESP-IDF master and Arduino as a component. The Espressif docs say to cd to project folder, mkdir components, cd components, git clone https://github.com/espressif/arduino-esp32.git arduino
but you would have to clone the whole repo into each project. I instead cloned into $IDF_PATH/components so that I can use this component in any/all projects.
FYI - For some reason using arduino directly did NOT make me prototype all of my functions (I have no idea why). When I switched to arduino as a component, I had to prototype all functions.