Skip to content

Commit 3d42a1c

Browse files
EricNRSkartben
authored andcommitted
west: runners: add option 'v' prefix to OpenOCD version string
The Espressif branch of OpenOCD uses the version string "v0.12.0" instead of "0.12.0" causing the version regex match to fail. Add an optional 'v' prefix to avoid the failure. Fixes: #83373 Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
1 parent 7a189ae commit 3d42a1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/west_commands/runners/openocd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def read_version(self):
222222
out = self.check_output([self.openocd_cmd[0], '--version'],
223223
stderr=subprocess.STDOUT).decode()
224224

225-
version_match = re.search(r"Open On-Chip Debugger (\d+.\d+.\d+)", out)
225+
version_match = re.search(r"Open On-Chip Debugger v?(\d+.\d+.\d+)", out)
226226
version = version_match.group(1).split('.')
227227

228228
return [to_num(i) for i in version]

0 commit comments

Comments
 (0)