forked from M-Labs/artiq
1
0
Fork 0

artiq_flash: bail out if scan chain is wrong

Due to OpenOCD limitations, there currently doesn't seem to be a better way of doing it. Upstream patch may be coming.
This commit is contained in:
kk1050 2022-07-26 09:49:48 +08:00 committed by GitHub
parent 4b1715c80b
commit 748e28be38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -118,7 +118,12 @@ class Programmer:
"telnet_port disabled" "telnet_port disabled"
] + preinit_script ] + preinit_script
self._loaded = defaultdict(lambda: None) self._loaded = defaultdict(lambda: None)
self._script = ["init"] self._script = [
"set error_msg \"Trying to use configured scan chain anyway\"",
"if {[string first $error_msg [capture \"init\"]] != -1} {",
"puts \"Found error and exiting\"",
"exit}"
]
def _transfer_script(self, script): def _transfer_script(self, script):
if isinstance(self._client, LocalClient): if isinstance(self._client, LocalClient):