mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
minor tweaking
This commit is contained in:
parent
31c33ca853
commit
3da0d78170
@ -162,11 +162,13 @@ def flash_bossac(board, firmware):
|
|||||||
timeout = ENUM_TIMEOUT
|
timeout = ENUM_TIMEOUT
|
||||||
while timeout:
|
while timeout:
|
||||||
if os.path.exists(port):
|
if os.path.exists(port):
|
||||||
time.sleep(0.5)
|
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
timeout = timeout - 0.5
|
timeout = timeout - 0.5
|
||||||
|
assert timeout, 'bossac bootloader is not available'
|
||||||
|
# sleep a bit more for bootloader to be ready
|
||||||
|
time.sleep(0.5)
|
||||||
ret = subprocess.run(f'bossac --port {port} {board["flasher_args"]} -U -i -R -e -w {firmware}', shell=True, stdout=subprocess.PIPE,
|
ret = subprocess.run(f'bossac --port {port} {board["flasher_args"]} -U -i -R -e -w {firmware}', shell=True, stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT)
|
stderr=subprocess.STDOUT)
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
x
Reference in New Issue
Block a user