From 7496606140949dde1ba51397512da1395f571e4c Mon Sep 17 00:00:00 2001 From: ziggurat29 <30310677+ziggurat29@users.noreply.github.com> Date: Fri, 20 Mar 2020 13:06:12 -0500 Subject: [PATCH] Example for Generic ESP01 boards with 512KiB flash (#2185) Co-authored-by: ziggurat29 --- code/espurna/board.ino | 2 ++ code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 16 ++++++++++++++++ code/platformio.ini | 4 ++++ 4 files changed, 23 insertions(+) diff --git a/code/espurna/board.ino b/code/espurna/board.ino index 1b8e0203..553a760c 100644 --- a/code/espurna/board.ino +++ b/code/espurna/board.ino @@ -646,6 +646,8 @@ int getBoardId() { return 154; #elif defined(LINKSPRITE_LINKNODE_R4) return 155; + #elif defined(GENERIC_ESP01_512KB) + return 156; #else return -1; // CUSTOM #endif diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 422f8700..2c0e5900 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -56,6 +56,7 @@ //#define GENERIC_ESP01S_DS18B20_V10 //#define GENERIC_ESP01S_RELAY_V40 //#define GENERIC_ESP01S_RGBLED_V10 +//#define GENERIC_ESP01_512KB //#define GENERIC_GU10 //#define GENERIC_V9261F //#define GIZWITS_WITTY_CLOUD diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 11e25695..948f478c 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -4512,6 +4512,22 @@ #define RELAY3_TYPE RELAY_TYPE_NORMAL #define RELAY4_TYPE RELAY_TYPE_NORMAL +// ----------------------------------------------------------------------------- +// ESP-01 generic esp8266 board with 512 kB flash +// // ----------------------------------------------------------------------------- + +#elif defined(GENERIC_ESP01_512KB) + + // Info + #define MANUFACTURER "GENERIC" + #define DEVICE "ESP01_512KB" + + // Relays + #define RELAY1_PIN 2 + #ifndef RELAY1_TYPE + #define RELAY1_TYPE RELAY_TYPE_NORMAL + #endif + // ----------------------------------------------------------------------------- #else diff --git a/code/platformio.ini b/code/platformio.ini index 30976b99..7276f967 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -72,6 +72,7 @@ debug_flags = -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP # TLS_RSA_WITH_AES_256_CBC_SHA / AES256-SHA # This reduces the OTA size with ~45KB, so it's especially useful on low memory boards (512k/1m). # ------------------------------------------------------------------------------ +board_512k = esp01 board_1m = esp01_1m board_2m = esp_wroom_02 board_4m = esp12e @@ -956,3 +957,6 @@ build_flags = ${common.build_flags_1m0m} -DEHOMEDIY_WT02 board = ${common.board_1m} build_flags = ${common.build_flags_1m0m} -DEHOMEDIY_WT03 +[env:generic-esp01-512kb] +board = ${common.board_512k} +build_flags = ${common.build_flags_512k} -DGENERIC_ESP01_512KB