zephyr/cmake/emu/nsim.cmake
Alexey Brodkin 61f073a735 board/nsim: Add support of ARC HS cores in nSIM
ARC nSIM simulates pretty much any modern ARC core,
moreover it emulates a lot of different core features so
it is possible to play with them even wo real hardware.

Thus we add yet another ARC core family to be used on simulated
nSIM board.

For now it's just a basic configuration with ARC UART for
smoke-testing of Zephyr on ARC HS CPUs.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-07-31 09:25:15 -07:00

37 lines
748 B
CMake

# SPDX-License-Identifier: Apache-2.0
find_program(
NSIM
nsimdrv
)
if(${CONFIG_SOC_NSIM_EM})
set(NSIM_PROPS nsim_em.props)
elseif(${CONFIG_SOC_NSIM_SEM})
set(NSIM_PROPS nsim_sem.props)
elseif(${CONFIG_SOC_NSIM_HS})
set(NSIM_PROPS nsim_hs.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
)
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
)