west runner: Add exe file to configuration

Add the exe fle to the runnerconfiguration class,
so we can use it from runners which will need it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
diff --git a/cmake/flash/CMakeLists.txt b/cmake/flash/CMakeLists.txt
index 892cfa0..3922748 100644
--- a/cmake/flash/CMakeLists.txt
+++ b/cmake/flash/CMakeLists.txt
@@ -36,6 +36,14 @@
   get_runners_prop(elf_file elf "${KERNEL_ELF_NAME}")
   runners_yaml_append("  # Build outputs:")
   runners_yaml_append("  elf_file: ${elf}")
+  if(CONFIG_BUILD_OUTPUT_EXE)
+    get_runners_prop(exe_file exe "${KERNEL_EXE_NAME}")
+  else()
+    get_runners_prop(exe_file exe "")
+  endif()
+  if(exe)
+    runners_yaml_append("  exe_file: ${exe}")
+  endif()
   if(CONFIG_BUILD_OUTPUT_HEX)
     get_runners_prop(hex_file hex "${KERNEL_HEX_NAME}")
   else()
diff --git a/scripts/west_commands/run_common.py b/scripts/west_commands/run_common.py
index ba62c5c..43d736f 100644
--- a/scripts/west_commands/run_common.py
+++ b/scripts/west_commands/run_common.py
@@ -411,6 +411,7 @@
     return RunnerConfig(build_dir,
                         yaml_config['board_dir'],
                         output_file('elf'),
+                        output_file('exe'),
                         output_file('hex'),
                         output_file('bin'),
                         output_file('uf2'),
diff --git a/scripts/west_commands/runners/core.py b/scripts/west_commands/runners/core.py
index c1f9eb7..fa697fa 100644
--- a/scripts/west_commands/runners/core.py
+++ b/scripts/west_commands/runners/core.py
@@ -283,6 +283,7 @@
     build_dir: str                  # application build directory
     board_dir: str                  # board definition directory
     elf_file: Optional[str]         # zephyr.elf path, or None
+    exe_file: Optional[str]         # zephyr.exe path, or None
     hex_file: Optional[str]         # zephyr.hex path, or None
     bin_file: Optional[str]         # zephyr.bin path, or None
     uf2_file: Optional[str]         # zephyr.uf2 path, or None
diff --git a/scripts/west_commands/tests/conftest.py b/scripts/west_commands/tests/conftest.py
index da89a2d..0224ad9 100644
--- a/scripts/west_commands/tests/conftest.py
+++ b/scripts/west_commands/tests/conftest.py
@@ -11,6 +11,7 @@
 RC_BUILD_DIR = '/test/build-dir'
 RC_BOARD_DIR = '/test/zephyr/boards/test-arch/test-board'
 RC_KERNEL_ELF = 'test-zephyr.elf'
+RC_KERNEL_EXE = 'test-zephyr.exe'
 RC_KERNEL_HEX = 'test-zephyr.hex'
 RC_KERNEL_BIN = 'test-zephyr.bin'
 RC_GDB = 'test-none-gdb'
@@ -21,7 +22,7 @@
 @pytest.fixture
 def runner_config():
     '''Fixture which provides a runners.core.RunnerConfig.'''
-    return RunnerConfig(RC_BUILD_DIR, RC_BOARD_DIR, RC_KERNEL_ELF,
+    return RunnerConfig(RC_BUILD_DIR, RC_BOARD_DIR, RC_KERNEL_ELF, RC_KERNEL_EXE,
                         RC_KERNEL_HEX, RC_KERNEL_BIN, None, FileType.OTHER,
                         gdb=RC_GDB, openocd=RC_OPENOCD,
                         openocd_search=RC_OPENOCD_SEARCH)