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>
This commit is contained in:
parent
22042e7b4e
commit
f8455b410e
|
@ -36,6 +36,14 @@ function(runners_yaml_append_config)
|
||||||
get_runners_prop(elf_file elf "${KERNEL_ELF_NAME}")
|
get_runners_prop(elf_file elf "${KERNEL_ELF_NAME}")
|
||||||
runners_yaml_append(" # Build outputs:")
|
runners_yaml_append(" # Build outputs:")
|
||||||
runners_yaml_append(" elf_file: ${elf}")
|
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)
|
if(CONFIG_BUILD_OUTPUT_HEX)
|
||||||
get_runners_prop(hex_file hex "${KERNEL_HEX_NAME}")
|
get_runners_prop(hex_file hex "${KERNEL_HEX_NAME}")
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -411,6 +411,7 @@ def get_runner_config(build_dir, yaml_path, runners_yaml, args=None):
|
||||||
return RunnerConfig(build_dir,
|
return RunnerConfig(build_dir,
|
||||||
yaml_config['board_dir'],
|
yaml_config['board_dir'],
|
||||||
output_file('elf'),
|
output_file('elf'),
|
||||||
|
output_file('exe'),
|
||||||
output_file('hex'),
|
output_file('hex'),
|
||||||
output_file('bin'),
|
output_file('bin'),
|
||||||
output_file('uf2'),
|
output_file('uf2'),
|
||||||
|
|
|
@ -283,6 +283,7 @@ class RunnerConfig(NamedTuple):
|
||||||
build_dir: str # application build directory
|
build_dir: str # application build directory
|
||||||
board_dir: str # board definition directory
|
board_dir: str # board definition directory
|
||||||
elf_file: Optional[str] # zephyr.elf path, or None
|
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
|
hex_file: Optional[str] # zephyr.hex path, or None
|
||||||
bin_file: Optional[str] # zephyr.bin path, or None
|
bin_file: Optional[str] # zephyr.bin path, or None
|
||||||
uf2_file: Optional[str] # zephyr.uf2 path, or None
|
uf2_file: Optional[str] # zephyr.uf2 path, or None
|
||||||
|
|
|
@ -11,6 +11,7 @@ from runners.core import RunnerConfig, FileType
|
||||||
RC_BUILD_DIR = '/test/build-dir'
|
RC_BUILD_DIR = '/test/build-dir'
|
||||||
RC_BOARD_DIR = '/test/zephyr/boards/test-arch/test-board'
|
RC_BOARD_DIR = '/test/zephyr/boards/test-arch/test-board'
|
||||||
RC_KERNEL_ELF = 'test-zephyr.elf'
|
RC_KERNEL_ELF = 'test-zephyr.elf'
|
||||||
|
RC_KERNEL_EXE = 'test-zephyr.exe'
|
||||||
RC_KERNEL_HEX = 'test-zephyr.hex'
|
RC_KERNEL_HEX = 'test-zephyr.hex'
|
||||||
RC_KERNEL_BIN = 'test-zephyr.bin'
|
RC_KERNEL_BIN = 'test-zephyr.bin'
|
||||||
RC_GDB = 'test-none-gdb'
|
RC_GDB = 'test-none-gdb'
|
||||||
|
@ -21,7 +22,7 @@ RC_OPENOCD_SEARCH = ['/test/openocd/search']
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def runner_config():
|
def runner_config():
|
||||||
'''Fixture which provides a runners.core.RunnerConfig.'''
|
'''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,
|
RC_KERNEL_HEX, RC_KERNEL_BIN, None, FileType.OTHER,
|
||||||
gdb=RC_GDB, openocd=RC_OPENOCD,
|
gdb=RC_GDB, openocd=RC_OPENOCD,
|
||||||
openocd_search=RC_OPENOCD_SEARCH)
|
openocd_search=RC_OPENOCD_SEARCH)
|
||||||
|
|
Loading…
Reference in a new issue