tweak openocd flash command

This commit is contained in:
hathach 2023-12-11 20:43:59 +07:00
parent aa9dce09a1
commit bd1009e135
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA

View File

@ -115,7 +115,7 @@ def flash_jlink(board, firmware):
def flash_openocd(board, firmware):
ret = subprocess.run(
f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware} reset exit"',
f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware}" -c "reset init" -c "resume" -c "exit"',
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
return ret