Skip to content

Commit da87952

Browse files
moritz-geiernashif
authored andcommitted
west: runners: stm32cubeprogrammer: Fixed behaivor if programmer is in path
Enabled west commands to use CubeProgrammer installed in custom directory. Signed-off-by: Moritz Geier <[email protected]>
1 parent b0936ae commit da87952

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/west_commands/runners/stm32cubeprogrammer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def _get_stm32cubeprogrammer_path() -> Path:
8585
)
8686

8787
if platform.system() == "Windows":
88+
cmd = shutil.which("STM32_Programmer_CLI")
89+
if cmd is not None:
90+
return Path(cmd)
91+
8892
cli = (
8993
Path("STMicroelectronics")
9094
/ "STM32Cube"

0 commit comments

Comments
 (0)