diff --git a/scripts/west_commands/runners/stm32cubeprogrammer.py b/scripts/west_commands/runners/stm32cubeprogrammer.py index 1335fa3c66e9b..3584b666154fe 100644 --- a/scripts/west_commands/runners/stm32cubeprogrammer.py +++ b/scripts/west_commands/runners/stm32cubeprogrammer.py @@ -122,6 +122,10 @@ def _get_stm32cubeprogrammer_path() -> Path: return Path(os.environ["PROGRAMW6432"]) / cli if platform.system() == "Darwin": + cmd = shutil.which("STM32_Programmer_CLI") + if cmd is not None: + return Path(cmd) + return ( Path("/Applications") / "STMicroelectronics"