Open Roarrk opened 1 year ago
As far as I can tell this boils down to arduino-esp32 using idf 4.4 in their current releases (https://github.com/espressif/arduino-esp32/releases) , and no, it does not support c6
Require waiting for Arduino Core release based on ESP-IDF 5.1 that support ESP32-C6, so follow -> https://github.com/espressif/arduino-esp32/issues/7852
@gskjold Seems your project is using our fork of Platformio/Arduino. Don't hesitate to test the experimental build for C6 based on Arduino 3.0/IDF5.1
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1511/framework-arduinoespressif32-release_v5.1-90b05eff62.zip
Thanks @Jason2866 , OneWireNg would not build, so I have stripped dallas temperature sensor from the code for the moment. The build runs, but the linker fails with the following:
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::stop()':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:98: undefined reference to `stop_ssl_socket(sslclient_context*, char const*, char const*, char const*)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::read(unsigned char*, unsigned int)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:232: undefined reference to `get_ssl_receive(sslclient_context*, unsigned char*, int)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::available()':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:246: undefined reference to `data_to_read(sslclient_context*)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::write(unsigned char const*, unsigned int)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:202: undefined reference to `send_ssl_data(sslclient_context*, unsigned char const*, unsigned int)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::WiFiClientSecure()':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:37: undefined reference to `ssl_init(sslclient_context*)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::connect(IPAddress, unsigned short, char const*, char const*, char const*, char const*)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:141: undefined reference to `start_ssl_client(sslclient_context*, IPAddress const&, unsigned long, char const*, int, char const*, bool, char const*, char const*, char const*, char const*, bool, char const**)'
/home/gunnar/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: .pio/build/esp32c6dev/lib773/libWiFiClientSecure.a(WiFiClientSecure.cpp.o): in function `WiFiClientSecure::connect(char const*, unsigned short, char const*, char const*)':
/home/gunnar/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp:163: undefined reference to `start_ssl_client(sslclient_context*, IPAddress const&, unsigned long, char const*, int, char const*, bool, char const*, char const*, char const*, char const*, bool, char const**)'
Do you have any pointers on how to fix this?
EDIT: Branch with current changes, use env esp32c6: https://github.com/UtilitechAS/amsreader-firmware/tree/esp32c6_testing
@gskjold We have modified OneWire from Paul Stoffregen to work with C2 and C6. You find the modified lib here https://github.com/arendst/Tasmota/tree/development/lib/lib_basic/OneWire-Stickbreaker
Are you using the inbuilt https Client/Server? If yes you can't use the fork.
We have removed some Crypto Protocols from mbedtls (real fat...). We do not use mbedtls at all, since it is big and resource hungry. We use BearSSL.
If code is working as expected you can use build https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1532/framework-arduinoespressif32-release_v5.1-303acc246e.zip
We have no Linker warnings, since NOT using WifiClientSecure.
Tasmota Fork based on Arduino 3.0, will not include mbedtls crypto ciphers for ALL ESP32 MCUs. That's a breaking change we have decided.
Thanks, good to know. I am using the built in WebServer and HTTPClient as well as WiFiClient and WiFiClientSecure. I had a plan once to swap out the webserver, but never got that far. Any suggestions on best replacements for http server and client?
I use mbedtls in the code as well, but I can easily swap that out with bearssl.
Not really, since we don't use https with Webfrontend. Using the the standard http client from Arduino. For https OTA updates we have written our own https implementation with Berry we have included in every Tasmota32 variant. The WifiClient is working. The needed cyphers for this are still there. So everything is working from Arduino as long "secure" is not used.
@Jason2866 Is WiFiClientSecure stripped out for good? If so, what is the best way to communicate with a API over HTTPS?
Yes, we stripped mbedtls since it uses a lot of flash and RAM. We are using BearSSL https://github.com/arendst/Tasmota/tree/development/lib/libesp32/HttpClientLight
Describe your problem I'm unable to get esp32-c6 working. Specifically espressif esp32-c6-wroom1. Trying to find the correct bootloader/firmware, but it seems like the esp-idf that the tasmota firmware is based on is running on v 4.4 which does not support c6 yet?