From d641be7fc8cc5b9741cc706e8cda22add0128ece Mon Sep 17 00:00:00 2001 From: Georgij Cernysiov Date: Fri, 21 Apr 2023 17:53:30 +0200 Subject: [PATCH] runners: stm32cubeprogrammer: fix program files path for win x64 The '%ProgramFiles%' is not guaranteed to be 'C:\Program Files' on Windows x64. The value will be 'C:\Program Files (x86)' if the west is executed by 32-bit Python. To correct the issue '%ProgramW6432%' must be used. Signed-off-by: Georgij Cernysiov --- scripts/west_commands/runners/stm32cubeprogrammer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/west_commands/runners/stm32cubeprogrammer.py b/scripts/west_commands/runners/stm32cubeprogrammer.py index 12fa5cebedc..026e53274d5 100644 --- a/scripts/west_commands/runners/stm32cubeprogrammer.py +++ b/scripts/west_commands/runners/stm32cubeprogrammer.py @@ -89,7 +89,7 @@ class STM32CubeProgrammerBinaryRunner(ZephyrBinaryRunner): if x86_path.exists(): return x86_path - return Path(os.environ["PROGRAMFILES"]) / cli + return Path(os.environ["PROGRAMW6432"]) / cli if platform.system() == "Darwin": return (