zephyr/cmake/emu/mdb.cmake
Alexey Brodkin 408433d5c7 board/nsim: Add support of multi-core ARC HS platform in nSIM
Now when SMP support for ARC is available we may introduce a simulation
platform which might be used for testing & development for SMP setups.

One important note is stand-alone nSIM (as well as its "Free" flavour)
doesn't support SMP simulation so we have to switch to use of nSIM via
proprietary MetaWare debugger [1] and so:
 1. We introduce new emulation target "mdb"
 2. It's only possible to run that platform for those who
    have MetaWare tools installed and valid license.

Though QEMU port for ARC is in work at the moment and once we
open that port and it has SMP support we'll switch to it and everybody
will be able to try ARC HS with SMP.

[1] https://www.synopsys.com/dw/ipdir.php?ds=sw_metaware

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-08-11 21:18:38 +02:00

23 lines
664 B
CMake

# SPDX-License-Identifier: Apache-2.0
find_program(
MDB
mdb
)
if(${CONFIG_SOC_NSIM_HS_SMP})
set(MDB_ARGS mdb_hs_smp.args)
endif()
add_custom_target(run
COMMAND
${MDB} -pset=1 -psetname=core0 -prop=ident=0x00000050 -cmpd=soc
@${BOARD_DIR}/support/${MDB_ARGS} ${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME} &&
${MDB} -pset=2 -psetname=core1 -prop=ident=0x00000150 -cmpd=soc
@${BOARD_DIR}/support/${MDB_ARGS} ${APPLICATION_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME} &&
NSIM_MULTICORE=1 ${MDB} -multifiles=core0,core1 -cmpd=soc -run -cl
DEPENDS ${logical_target_for_zephyr_elf}
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
USES_TERMINAL
)