mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 20:02:22 +01:00
ESP8266 change recommended framework version to 2.7.2 (#1208)
This commit is contained in:
@@ -4,11 +4,12 @@ import re
|
||||
|
||||
from esphome.config import iter_components
|
||||
from esphome.const import CONF_BOARD_FLASH_MODE, CONF_ESPHOME, CONF_PLATFORMIO_OPTIONS, \
|
||||
HEADER_FILE_EXTENSIONS, SOURCE_FILE_EXTENSIONS, __version__
|
||||
HEADER_FILE_EXTENSIONS, SOURCE_FILE_EXTENSIONS, __version__, ARDUINO_VERSION_ESP8266
|
||||
from esphome.core import CORE, EsphomeError
|
||||
from esphome.helpers import mkdir_p, read_file, write_file_if_changed, walk_files, \
|
||||
copy_file_if_changed
|
||||
from esphome.storage_json import StorageJSON, storage_path
|
||||
from esphome.pins import ESP8266_FLASH_SIZES, ESP8266_LD_SCRIPTS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -213,6 +214,28 @@ def get_ini_content():
|
||||
flash_mode = CORE.config[CONF_ESPHOME][CONF_BOARD_FLASH_MODE]
|
||||
data['board_build.flash_mode'] = flash_mode
|
||||
|
||||
# Build flags
|
||||
if CORE.is_esp8266 and CORE.board in ESP8266_FLASH_SIZES:
|
||||
flash_size = ESP8266_FLASH_SIZES[CORE.board]
|
||||
ld_scripts = ESP8266_LD_SCRIPTS[flash_size]
|
||||
|
||||
versions_with_old_ldscripts = [
|
||||
ARDUINO_VERSION_ESP8266['2.4.0'],
|
||||
ARDUINO_VERSION_ESP8266['2.4.1'],
|
||||
ARDUINO_VERSION_ESP8266['2.4.2'],
|
||||
]
|
||||
if CORE.arduino_version == ARDUINO_VERSION_ESP8266['2.3.0']:
|
||||
# No ld script support
|
||||
ld_script = None
|
||||
if CORE.arduino_version in versions_with_old_ldscripts:
|
||||
# Old ld script path
|
||||
ld_script = ld_scripts[0]
|
||||
else:
|
||||
ld_script = ld_scripts[1]
|
||||
|
||||
if ld_script is not None:
|
||||
data['board_build.ldscript'] = ld_script
|
||||
|
||||
# Ignore libraries that are not explicitly used, but may
|
||||
# be added by LDF
|
||||
# data['lib_ldf_mode'] = 'chain'
|
||||
|
Reference in New Issue
Block a user