Use higher default baudrate for USB upload (#761)

See also https://github.com/espressif/esptool/issues/435
This commit is contained in:
Otto Winter 2019-10-18 10:23:06 +02:00 committed by GitHub
parent ee0b6e835f
commit 22aecdfc6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -166,7 +166,7 @@ def compile_program(args, config):
def upload_using_esptool(config, port):
path = CORE.firmware_bin
cmd = ['esptool.py', '--before', 'default_reset', '--after', 'hard_reset',
'--baud', str(config[CONF_ESPHOME][CONF_PLATFORMIO_OPTIONS].get('upload_speed', 115200)),
'--baud', str(config[CONF_ESPHOME][CONF_PLATFORMIO_OPTIONS].get('upload_speed', 460800)),
'--chip', 'esp8266', '--port', port, 'write_flash', '0x0', path]
if os.environ.get('ESPHOME_USE_SUBPROCESS') is None:

View file

@ -31,7 +31,7 @@ def validate_rx_pin(value):
CONFIG_SCHEMA = cv.All(cv.Schema({
cv.GenerateID(): cv.declare_id(UARTComponent),
cv.Required(CONF_BAUD_RATE): cv.int_range(min=1, max=115200),
cv.Required(CONF_BAUD_RATE): cv.int_range(min=1),
cv.Optional(CONF_TX_PIN): pins.output_pin,
cv.Optional(CONF_RX_PIN): validate_rx_pin,
}).extend(cv.COMPONENT_SCHEMA), cv.has_at_least_one_key(CONF_TX_PIN, CONF_RX_PIN))

View file

@ -191,7 +191,7 @@ def get_ini_content():
'framework': 'arduino',
'lib_deps': lib_deps + ['${common.lib_deps}'],
'build_flags': build_flags + ['${common.build_flags}'],
'upload_speed': UPLOAD_SPEED_OVERRIDE.get(CORE.board, 115200),
'upload_speed': UPLOAD_SPEED_OVERRIDE.get(CORE.board, 460800),
}
if CORE.is_esp32: