mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
[Build] Reduce bin size by excluding libs from 1M builds
[Build] Make minimal_core_274_ESP8266_1M_OTA_FHEM_HA fit again
This commit is contained in:
@@ -48,6 +48,7 @@ lib_ignore = ESP32_ping
|
||||
IRremoteESP8266
|
||||
HeatpumpIR
|
||||
TinyWireM
|
||||
LittleFS(esp8266)
|
||||
|
||||
[esp82xx_2_5_x]
|
||||
build_flags = -DNDEBUG
|
||||
|
||||
@@ -100,9 +100,13 @@ lib_deps =
|
||||
lib_ignore = ${esp82xx_defaults.lib_ignore}
|
||||
IRremoteESP8266
|
||||
HeatpumpIR
|
||||
LittleFS(esp8266)
|
||||
ServoESP32
|
||||
TinyWireM
|
||||
ESP8266SdFat
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
monitor_filters = esp8266_exception_decoder
|
||||
extra_scripts = pre:tools/pio/pre_default_check.py
|
||||
${extra_scripts_esp8266.extra_scripts}
|
||||
@@ -265,6 +269,8 @@ lib_ignore = ${esp82xx_common.lib_ignore}
|
||||
SDFS
|
||||
SD(esp8266)
|
||||
LittleFS
|
||||
ArduinoOTA
|
||||
ESP8266mDNS
|
||||
|
||||
|
||||
|
||||
@@ -283,6 +289,7 @@ extends = esp82xx_1M
|
||||
build_flags = ${esp82xx_1M.build_flags}
|
||||
-DPLUGIN_BUILD_MINIMAL_OTA
|
||||
-DDISABLE_SC16IS752_Serial
|
||||
-DFEATURE_GPIO_USE_ESP8266_WAVEFORM=0
|
||||
|
||||
|
||||
|
||||
@@ -291,8 +298,6 @@ extends = esp82xx_1M_OTA
|
||||
board = esp8266_1M128k_OTA
|
||||
build_flags = ${esp82xx_1M_OTA.build_flags}
|
||||
lib_ignore = ${esp82xx_1M.lib_ignore}
|
||||
ArduinoOTA
|
||||
ESP8266mDNS
|
||||
; Adding the libs below to the lib_ignore will even increase build size
|
||||
; Adafruit TCS34725
|
||||
; RN2xx3 Arduino Library
|
||||
|
||||
@@ -174,6 +174,11 @@ build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
ESP8266SdFat
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
[env:custom_alt_wifi_ESP8266_1M]
|
||||
@@ -184,6 +189,11 @@ build_flags = ${regular_platform_alt_wifi.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
ESP8266SdFat
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
|
||||
@@ -195,6 +205,11 @@ build_flags = ${beta_platform.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
lib_ignore = ${esp8266_custom_common.lib_ignore}
|
||||
ESP8266SdFat
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
LittleFS(esp8266)
|
||||
extra_scripts = ${esp8266_custom_common.extra_scripts}
|
||||
|
||||
|
||||
@@ -223,6 +238,7 @@ platform_packages = ${regular_platform.platform_packages}
|
||||
build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
lib_ignore = ${regular_platform.lib_ignore}
|
||||
ESP8266SdFat
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
@@ -258,6 +274,7 @@ build_flags = ${regular_platform.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
-D FEATURE_ADC_VCC=1
|
||||
lib_ignore = ${regular_platform.lib_ignore}
|
||||
ESP8266SdFat
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
@@ -271,6 +288,7 @@ build_flags = ${regular_platform_alt_wifi.build_flags}
|
||||
${esp8266_1M.build_flags}
|
||||
-D FEATURE_ADC_VCC=1
|
||||
lib_ignore = ${regular_platform_alt_wifi.lib_ignore}
|
||||
ESP8266SdFat
|
||||
SD(esp8266)
|
||||
SD
|
||||
SDFS
|
||||
|
||||
@@ -2182,6 +2182,21 @@ To create/register a plugin, you have to :
|
||||
#undef FEATURE_EXT_RTC
|
||||
#define FEATURE_EXT_RTC 0
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_DNS_SERVER
|
||||
#undef FEATURE_DNS_SERVER
|
||||
#endif
|
||||
#define FEATURE_DNS_SERVER 0
|
||||
|
||||
#ifdef FEATURE_MDNS
|
||||
#undef FEATURE_MDNS
|
||||
#endif
|
||||
#define FEATURE_MDNS 0
|
||||
|
||||
#ifdef FEATURE_ARDUINO_OTA
|
||||
#undef FEATURE_ARDUINO_OTA
|
||||
#endif
|
||||
#define FEATURE_ARDUINO_OTA 0
|
||||
#endif
|
||||
|
||||
// Timing stats page needs timing stats
|
||||
@@ -2266,8 +2281,10 @@ To create/register a plugin, you have to :
|
||||
#endif
|
||||
|
||||
#if FEATURE_ARDUINO_OTA
|
||||
#ifndef FEATURE_MDNS
|
||||
#define FEATURE_MDNS 1
|
||||
#ifndef LIMIT_BUILD_SIZE
|
||||
#ifndef FEATURE_MDNS
|
||||
#define FEATURE_MDNS 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1274,6 +1274,7 @@ String getDigestAuth(const String& authReq,
|
||||
return authorization;
|
||||
}
|
||||
|
||||
#ifndef BUILD_NO_DEBUG
|
||||
void log_http_result(const HTTPClient& http,
|
||||
const String & logIdentifier,
|
||||
const String & host,
|
||||
@@ -1319,6 +1320,7 @@ void log_http_result(const HTTPClient& http,
|
||||
addLogMove(loglevel, log);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int http_authenticate(const String& logIdentifier,
|
||||
WiFiClient & client,
|
||||
@@ -1464,7 +1466,9 @@ int http_authenticate(const String& logIdentifier,
|
||||
event += httpCode;
|
||||
eventQueue.addMove(std::move(event));
|
||||
}
|
||||
#ifndef BUILD_NO_DEBUG
|
||||
log_http_result(http, logIdentifier, host, HttpMethod, httpCode, EMPTY_STRING);
|
||||
#endif
|
||||
return httpCode;
|
||||
}
|
||||
|
||||
@@ -1503,10 +1507,11 @@ String send_via_http(const String& logIdentifier,
|
||||
|
||||
if ((httpCode > 0) && must_check_reply) {
|
||||
response = http.getString();
|
||||
|
||||
#ifndef BUILD_NO_DEBUG
|
||||
if (!response.isEmpty()) {
|
||||
log_http_result(http, logIdentifier, host, HttpMethod, httpCode, response);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
http.end();
|
||||
// http.end() does not call client.stop() if it is no longer connected.
|
||||
|
||||
Reference in New Issue
Block a user