2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2018-07-06 22:02:03 +08:00
|
|
|
find_program(
|
|
|
|
NSIM
|
|
|
|
nsimdrv
|
|
|
|
)
|
|
|
|
|
|
|
|
if(${CONFIG_SOC_NSIM_EM})
|
2019-06-03 15:03:38 +08:00
|
|
|
set(NSIM_PROPS nsim_em.props)
|
2018-07-06 22:02:03 +08:00
|
|
|
elseif(${CONFIG_SOC_NSIM_SEM})
|
|
|
|
set(NSIM_PROPS nsim_sem.props)
|
2019-06-04 16:38:31 +08:00
|
|
|
elseif(${CONFIG_SOC_NSIM_HS})
|
|
|
|
set(NSIM_PROPS nsim_hs.props)
|
2018-07-06 22:02:03 +08:00
|
|
|
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
|
|
|
|
)
|
2019-01-11 09:22:45 +08:00
|
|
|
|
|
|
|
add_custom_target(debugserver
|
|
|
|
COMMAND
|
|
|
|
${NSIM}
|
|
|
|
-propsfile
|
|
|
|
${BOARD_DIR}/support/${NSIM_PROPS}
|
|
|
|
-gdb -port=3333
|
|
|
|
DEPENDS ${logical_target_for_zephyr_elf}
|
|
|
|
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
|
|
|
|
USES_TERMINAL
|
|
|
|
)
|