ESP8266 SDK 2.3.0 compat (#490)

This commit is contained in:
Otto Winter 2019-03-24 18:05:13 +01:00
parent ced28ad006
commit 356554c08d
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E
2 changed files with 6 additions and 3 deletions

View file

@ -433,3 +433,4 @@ ARDUINO_VERSION_ESP32_1_0_1 = 'espressif32@1.6.0'
ARDUINO_VERSION_ESP8266_DEV = 'https://github.com/platformio/platform-espressif8266.git#feature' \
'/stage'
ARDUINO_VERSION_ESP8266_2_5_0 = 'espressif8266@2.0.0'
ARDUINO_VERSION_ESP8266_2_3_0 = 'espressif8266@1.5.0'

View file

@ -10,7 +10,8 @@ import shutil
from esphome.config import iter_components
from esphome.const import ARDUINO_VERSION_ESP32_1_0_0, ARDUINO_VERSION_ESP8266_2_5_0, \
ARDUINO_VERSION_ESP8266_DEV, CONF_BOARD_FLASH_MODE, CONF_BRANCH, CONF_COMMIT, CONF_ESPHOME, \
CONF_LOCAL, CONF_PLATFORMIO_OPTIONS, CONF_REPOSITORY, CONF_TAG, CONF_USE_CUSTOM_CODE
CONF_LOCAL, CONF_PLATFORMIO_OPTIONS, CONF_REPOSITORY, CONF_TAG, CONF_USE_CUSTOM_CODE, \
ARDUINO_VERSION_ESP8266_2_3_0
from esphome.core import CORE, EsphomeError
from esphome.core_config import GITHUB_ARCHIVE_ZIP, LIBRARY_URI_REPO, VERSION_REGEX
from esphome.helpers import mkdir_p, run_system_command
@ -342,13 +343,14 @@ def gather_build_flags():
'-DUSE_WIFI_SIGNAL_SENSOR',
}
if CORE.is_esp8266 and CORE.board in ESP8266_FLASH_SIZES:
if CORE.is_esp8266 and CORE.board in ESP8266_FLASH_SIZES and \
CORE.arduino_version != ARDUINO_VERSION_ESP8266_2_3_0:
flash_size = ESP8266_FLASH_SIZES[CORE.board]
ld_scripts = ESP8266_LD_SCRIPTS[flash_size]
ld_script = None
if CORE.arduino_version in ('espressif8266@1.8.0', 'espressif8266@1.7.3',
'espressif8266@1.6.0', 'espressif8266@1.5.0'):
'espressif8266@1.6.0'):
ld_script = ld_scripts[0]
elif CORE.arduino_version in (ARDUINO_VERSION_ESP8266_DEV, ARDUINO_VERSION_ESP8266_2_5_0):
ld_script = ld_scripts[1]