From 32ec553cc7844d374689aa00dc8ce57c0b24643e Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:53:39 +0100 Subject: [PATCH] Tasmota core 2.0.2.x based on release IDF44 (#14611) * Tasmota core 2.0.2.x based on release IDF44 Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com> --- lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp | 3 ++- platformio_tasmota32.ini | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp b/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp index f9072ff7d..fbead560a 100644 --- a/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp +++ b/lib/libesp32/ESP32-to-ESP8266-compat/src/esp8266toEsp32.cpp @@ -113,7 +113,8 @@ bool analogAttach(uint32_t pin) { return false; } -void analogWrite(uint8_t pin, int val) +// void analogWrite(uint8_t pin, int val); +extern "C" void __wrap__Z11analogWritehi(uint8_t pin, int val) { uint32_t channel = _analog_pin2chan(pin); if ( val >> (_pwm_bit_num-1) ) ++val; diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini index 84ef4a3c4..a27266b38 100644 --- a/platformio_tasmota32.ini +++ b/platformio_tasmota32.ini @@ -32,19 +32,20 @@ build_flags = ${esp_defaults.build_flags} -include "esp32x_fixes.h" ; wrappers for the crash-recorder -Wl,--wrap=panicHandler -Wl,--wrap=xt_unhandled_exception + -Wl,--wrap=_Z11analogWritehi ; `analogWrite(unsigned char, int)` use the Tasmota version of analogWrite for deeper integration and phase control extra_scripts = pre:pio-tools/add_c_flags.py post:pio-tools/post_esp32.py ${esp_defaults.extra_scripts} [core32] -platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.1/platform-tasmota-espressif32-2.0.2.1.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.2/platform-tasmota-espressif32-2.0.2.zip platform_packages = build_unflags = ${esp32_defaults.build_unflags} build_flags = ${esp32_defaults.build_flags} [core32solo1] -platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.1solo1/platform-tasmota-espressif32-2.0.2.1solo1.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.2solo1/platform-tasmota-espressif32-2.0.2solo1.zip platform_packages = build_unflags = ${esp32_defaults.build_unflags} build_flags = ${esp32_defaults.build_flags}