Skip to content
Commit 7eaca455 authored by Mike Szczys's avatar Mike Szczys Committed by Anas Nashif
Browse files

twister: fix serial connection for flash_before



The --flash-before flag allows devices to be flashed before the serial
connection is established. However, the implementation was incomplete and
only worked if the port address already existed at the start of the run.
This is incompatible with devices that implement the USB in software
(eg: USB-CDC).

This commit fixes the implementation to delay setting up the connection
until after the device is flashed, and to retry the connection for two
seconds after flashing to give the device time to enumerate as a USB
device.

Signed-off-by: default avatarMike Szczys <mike@golioth.io>
parent d082cd29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment