Skip to content

Commit bf948fa

Browse files
committed
platformio: allow building with espressif framework (instead of tasmota)
* add necessary platform and platform_packages entries (commented out) * compatibility patch for ADC_ATTEN_DB_11
1 parent d884a3e commit bf948fa

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

platformio.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,18 @@ AR_lib_deps = ;; for pre-usermod-library platformio_override compatibility
298298
;; please note that you can NOT update existing ESP32 installs with a "V4" build. Also updating by OTA will not work properly.
299299
;; You need to completely erase your device (esptool erase_flash) first, then install the "V4" build from VSCode+platformio.
300300

301+
;; tasmota platform (default)
301302
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.00/platform-espressif32.zip ;; Tasmota Arduino Core 2.0.18 with IPv6 support, based on IDF 4.4.8
302303
platform_packages =
304+
305+
;; espressif platform (optional - needs 300KB extra flash)
306+
;;; arduino-esp32 2.0.17 + esp-idf 4.4.7
307+
;; platform = espressif32@ ~6.13.0
308+
;; platform_packages =
309+
;;; arduino-esp32 2.0.14 + esp-idf 4.4.6
310+
;; platform = espressif32@ ~6.6.0
311+
;; platform_packages = platformio/framework-arduinoespressif32 @ 3.20014.231204
312+
303313
build_unflags = ${common.build_unflags}
304314
build_flags = -g
305315
-Wshadow=compatible-local ;; emit warning in case a local variable "shadows" another local one

wled00/util.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,9 @@ String computeSHA1(const String& input) {
12961296

12971297
#ifdef ESP32
12981298
#include "esp_adc_cal.h"
1299+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4,4,7) // backwards compatibility patch
1300+
#define ADC_ATTEN_DB_12 ADC_ATTEN_DB_11
1301+
#endif
12991302
String generateDeviceFingerprint() {
13001303
uint32_t fp[2] = {0, 0}; // create 64 bit fingerprint
13011304
esp_chip_info_t chip_info;

0 commit comments

Comments
 (0)