diff --git a/lib/espMqttClient/src/Config.h b/lib/espMqttClient/src/Config.h index 2e6d4dade..940c2dea8 100644 --- a/lib/espMqttClient/src/Config.h +++ b/lib/espMqttClient/src/Config.h @@ -8,10 +8,6 @@ the LICENSE file. #pragma once -#if CONFIG_IDF_TARGET_ESP32S3 -// #define EMC_CLIENT_SECURE -#endif - #ifndef EMC_TX_TIMEOUT #define EMC_TX_TIMEOUT 2000 #endif diff --git a/lib/espMqttClient/src/Transport/ClientSecureSync.h b/lib/espMqttClient/src/Transport/ClientSecureSync.h index c29b03d2f..77d425efb 100644 --- a/lib/espMqttClient/src/Transport/ClientSecureSync.h +++ b/lib/espMqttClient/src/Transport/ClientSecureSync.h @@ -11,11 +11,7 @@ the LICENSE file. #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) #include "../Config.h" -#if defined(EMC_CLIENT_SECURE) #include // includes IPAddress -#else -#include -#endif #include "Transport.h" @@ -31,11 +27,7 @@ class ClientSecureSync : public Transport { void stop() override; bool connected() override; bool disconnected() override; -#if defined(EMC_CLIENT_SECURE) WiFiClientSecure client; -#else - WiFiClient client; -#endif }; } // namespace espMqttClientInternals diff --git a/lib/espMqttClient/src/espMqttClient.cpp b/lib/espMqttClient/src/espMqttClient.cpp index bd9b6935a..833ece10b 100644 --- a/lib/espMqttClient/src/espMqttClient.cpp +++ b/lib/espMqttClient/src/espMqttClient.cpp @@ -78,37 +78,27 @@ espMqttClientSecure::espMqttClientSecure(uint8_t priority, uint8_t core) } espMqttClientSecure& espMqttClientSecure::setInsecure() { -#if defined(EMC_CLIENT_SECURE) _client.client.setInsecure(); -#endif return *this; } espMqttClientSecure& espMqttClientSecure::setCACert(const char* rootCA) { -#if defined(EMC_CLIENT_SECURE) _client.client.setCACert(rootCA); -#endif return *this; } espMqttClientSecure& espMqttClientSecure::setCertificate(const char* clientCa) { -#if defined(EMC_CLIENT_SECURE) _client.client.setCertificate(clientCa); -#endif return *this; } espMqttClientSecure& espMqttClientSecure::setPrivateKey(const char* privateKey) { -#if defined(EMC_CLIENT_SECURE) _client.client.setPrivateKey(privateKey); -#endif return *this; } espMqttClientSecure& espMqttClientSecure::setPreSharedKey(const char* pskIdent, const char* psKey) { -#if defined(EMC_CLIENT_SECURE) _client.client.setPreSharedKey(pskIdent, psKey); -#endif return *this; } diff --git a/platformio.ini b/platformio.ini index 349365e6c..dc7cdad3d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -33,7 +33,7 @@ build_flags = -D NO_GLOBAL_ARDUINOOTA -D ARDUINOJSON_ENABLE_STD_STRING=1 -D ARDUINOJSON_USE_DOUBLE=0 - -D CONFIG_UART_ISR_IN_IRAM + ;-D CONFIG_UART_ISR_IN_IRAM unbuild_flags = ${common.core_unbuild_flags} @@ -41,7 +41,6 @@ unbuild_flags = [espressi32_base] platform = espressif32@6.4.0 framework = arduino -board_build.filesystem = littlefs build_flags = ${common.build_flags} build_unflags = ${common.unbuild_flags} extra_scripts = @@ -50,11 +49,10 @@ extra_scripts = [espressi32_base_tasmota] ; use Tasmota's libary which removes some libs (like mbedtsl) and increases available heap -; platform = https://github.com/tasmota/platform-espressif32.git ; latest development -platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32-2023.10.03.zip ; latest stable -; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.02/platform-espressif32.zip +; based on Core 2.0.12/ESP-IDF v4.4.5 https://github.com/espressif/arduino-esp32/releases/tag/2.0.12 use https://github.com/tasmota/platform-espressif32/archive/refs/tags/2023.09.00.zip +; based on Core 2.0.13/ESP-IDF v4.4.5 https://github.com/espressif/arduino-esp32/releases/tag/2.0.13 use https://github.com/tasmota/platform-espressif32/releases/download/2023.09.01/platform-espressif32-2023.09.01.zip +platform = https://github.com/tasmota/platform-espressif32/archive/refs/tags/2023.09.00.zip framework = arduino -board_build.filesystem = littlefs build_flags = ${common.build_flags} build_unflags = ${common.unbuild_flags} extra_scripts = @@ -67,6 +65,8 @@ monitor_raw = yes upload_speed = 921600 build_type = release lib_ldf_mode = chain+ +; board_build.flash_mode = qio + check_tool = cppcheck, clangtidy check_severity = high, medium check_flags = @@ -76,25 +76,22 @@ check_flags = ; build for GitHub Actions CI ; the Web interface is built seperately [env:ci] -platform = https://github.com/tasmota/platform-espressif32.git -framework = arduino +extends = espressi32_base_tasmota extra_scripts = scripts/rename_fw.py board = esp32dev board_build.partitions = esp32_partition_4M.csv +board_build.filesystem = littlefs build_flags = ${common.build_flags} build_unflags = ${common.unbuild_flags} [env:ci_s3] -platform = https://github.com/tasmota/platform-espressif32.git -framework = arduino +extends = espressi32_base extra_scripts = scripts/rename_fw.py board = lolin_s3 board_build.f_cpu = 240000000L board_upload.flash_size = 16MB board_build.partitions = esp32_partition_16M.csv -build_flags = - ${common.build_flags} - -O2 +build_flags = ${common.build_flags} -O2 build_unflags = ${common.unbuild_flags} [env:esp32_4M] @@ -102,24 +99,28 @@ extends = espressi32_base_tasmota board = esp32dev board_upload.flash_size = 4MB board_build.partitions = esp32_partition_4M.csv +build_flags = ${common.build_flags} -Os [env:esp32_4Mplus] extends = espressi32_base_tasmota board = esp32dev board_upload.flash_size = 4MB board_build.partitions = esp32_asym_partition_4M.csv +build_flags = ${common.build_flags} [env:esp32_16M] extends = espressi32_base_tasmota board = esp32dev board_upload.flash_size = 16MB board_build.partitions = esp32_partition_16M.csv +build_flags = ${common.build_flags} [env:lolin_c3_mini] extends = espressi32_base_tasmota board = lolin_c3_mini board_upload.flash_size = 4MB -board_build.partitions = esp32_partition_4M.csv +board_build.partitions = esp32_asym_partition_4M.csv +build_flags = ${common.build_flags} ; lolin C3 mini v1 needs special wifi init. ; https://www.wemos.cc/en/latest/c3/c3_mini_1_0_0.html#about-wifi @@ -127,16 +128,15 @@ board_build.partitions = esp32_partition_4M.csv extends = espressi32_base_tasmota board = lolin_c3_mini board_upload.flash_size = 4MB -board_build.partitions = esp32_partition_4M.csv -build_flags = - ${common.build_flags} - -DBOARD_C3_MINI_V1 +board_build.partitions = esp32_asym_partition_4M.csv +build_flags = ${common.build_flags} -DBOARD_C3_MINI_V1 [env:lolin_s2_mini] extends = espressi32_base_tasmota board = lolin_s2_mini board_upload.flash_size = 4MB -board_build.partitions = esp32_partition_4M.csv +board_build.partitions = esp32_asym_partition_4M.csv +build_flags = ${common.build_flags} [env:lolin_s3] extends = espressi32_base @@ -146,9 +146,7 @@ board_upload.flash_size = 16MB board_build.partitions = esp32_partition_16M.csv board_upload.use_1200bps_touch = false board_upload.wait_for_upload_port = false -build_flags = - ${common.build_flags} - -O2 +build_flags = ${common.build_flags} -O2 ; to build and run: pio run -e standalone -t exec [env:standalone] @@ -183,4 +181,4 @@ build_src_filter = +<../lib/espMqttClient/src> +<../lib/espMqttClient/src/Transport> lib_compat_mode = off -lib_ldf_mode = off +lib_ldf_mode = off \ No newline at end of file