From 4e90656c503990de58d283ed96ccd09d9d90a6c1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 20 Jan 2021 14:10:37 +0100 Subject: [PATCH] Add core2 --- platformio_tasmota_env32.ini | 6 +-- tasmota/tasmota_configurations_ESP32.h | 55 +++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/platformio_tasmota_env32.ini b/platformio_tasmota_env32.ini index 610770505..03bd39b60 100644 --- a/platformio_tasmota_env32.ini +++ b/platformio_tasmota_env32.ini @@ -46,11 +46,11 @@ lib_extra_dirs = lib/libesp32, lib/lib_basic, lib/lib_i2c, lib/lib_rf, [env:tasmota32-core2] extends = env:tasmota32 -board = esp32dev +board = m5stack-grey board_build.f_cpu = 240000000L -build_flags = ${common32.build_flags} -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -lib_extra_dirs = ${common32.lib_extra_dirs} board_build.partitions = esp32_partition_app1984k_spiffs12M.csv +build_flags = ${common32.build_flags} -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -DFIRMWARE_M5STACK_CORE2 +lib_extra_dirs = lib/libesp32, lib/lib_basic, lib/lib_i2c, lib/lib_rf, lib/lib_div, lib/lib_ssl, lib/lib_display, lib/lib_audio [env:tasmota32-minimal] extends = env:tasmota32 diff --git a/tasmota/tasmota_configurations_ESP32.h b/tasmota/tasmota_configurations_ESP32.h index bb23c6663..cd6518a1c 100644 --- a/tasmota/tasmota_configurations_ESP32.h +++ b/tasmota/tasmota_configurations_ESP32.h @@ -38,7 +38,7 @@ /*********************************************************************************************\ * [tasmota32-odroidgo.bin] - * Provide an image with useful supported sensors enabled + * Provide an image with useful supported sensors enabled for Odroid Go \*********************************************************************************************/ #ifdef FIRMWARE_ODROID_GO @@ -53,6 +53,7 @@ #define USE_ODROID_GO // Add support for Odroid Go #define USE_SDCARD +#define GUI_TRASH_FILE #define USE_ADC #define USE_SPI #define USE_DISPLAY // Add SPI Display Support (+2k code) @@ -61,6 +62,58 @@ #define USE_MI_ESP32 // (ESP32 only) Add support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash) #endif // FIRMWARE_ODROID_GO +/*********************************************************************************************\ + * [tasmota32-core2.bin] + * Provide an image with useful supported sensors enabled for M5stack core2 +\*********************************************************************************************/ + +#ifdef FIRMWARE_M5STACK_CORE2 + +#undef CODE_IMAGE_STR +#define CODE_IMAGE_STR "core2" + +#undef MODULE +#define MODULE M5STACK_CORE2 // [Module] Select default module from tasmota_template.h +#undef FALLBACK_MODULE +#define FALLBACK_MODULE M5STACK_CORE2 // [Module2] Select default module on fast reboot where USER_MODULE is user template + +#define USE_M5STACK_CORE2 // Add support for M5Stack Core2 +#define USE_UFILESYS +#define USE_SDCARD +#define GUI_TRASH_FILE +#define USE_I2C +#define USE_BMA423 +#define SAY_TIME +#define USE_WEBRADIO +#define USE_SPI + #define USE_DISPLAY + #define USE_DISPLAY_ILI9342 +#define USE_TOUCH_BUTTONS +#define JPEG_PICTS +#define USE_FT5206 +#define USE_MPU6886 +#define USE_SENDMAIL +#define USE_ESP32MAIL +//#define USE_BLE_ESP32 // Enable new BLE driver +//#define USE_MI_ESP32 // (ESP32 only) Add support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash) + +//#define USE_SCRIPT // Add support for script (+17k code) +// Script related defines +#define UFSYS_SIZE 8192 +#define USE_SCRIPT_TASK +#define LARGE_ARRAYS +#define SCRIPT_LARGE_VNBUFF +#define USE_SCRIPT_GLOBVARS +#define USE_SCRIPT_SUB_COMMAND +#define MAXFILT 10 +#define USE_ANGLE_FUNC +#define MAXVARS 75 +#define MAXSVARS 15 +#define SCRIPT_FULL_WEBPAGE +#define SCRIPT_GET_HTTPS_JP +#define USE_GOOGLE_CHARTS +#endif // FIRMWARE_M5STACK_CORE2 + #endif // ESP32 #endif // _TASMOTA_CONFIGURATIONS_ESP32_H_