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 <geo.cgv@gmail.com>
This commit is contained in:
Georgij Cernysiov 2023-04-21 17:53:30 +02:00 committed by Carles Cufí
commit d641be7fc8

View file

@ -89,7 +89,7 @@ class STM32CubeProgrammerBinaryRunner(ZephyrBinaryRunner):
if x86_path.exists(): if x86_path.exists():
return x86_path return x86_path
return Path(os.environ["PROGRAMFILES"]) / cli return Path(os.environ["PROGRAMW6432"]) / cli
if platform.system() == "Darwin": if platform.system() == "Darwin":
return ( return (