zephyr/cmake/emu/nsim.cmake
Anas Nashif 7ce9615a2b nsim: add run target
Support 'make run' with this target rather than using 'flash' which
might be confusing.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-19 18:59:07 -04:00

22 lines
417 B
CMake

find_program(
NSIM
nsimdrv
)
if(${CONFIG_SOC_NSIM_EM})
set(NSIM_PROPS nsim.props)
elseif(${CONFIG_SOC_NSIM_SEM})
set(NSIM_PROPS nsim_sem.props)
endif()
add_custom_target(run
COMMAND
${NSIM}
-propsfile
${BOARD_DIR}/support/${NSIM_PROPS}
${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}
DEPENDS ${logical_target_for_zephyr_elf}
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
USES_TERMINAL
)