cmake: emu: nsim: Allow all nsim platform use mdb
Currently the default runner of nsim_hs_smp is mdb, the runner of other nsim platform is nsimdrv, user can't change the default runner unless he uses west command(--runner). With this change cmake will choose runner according to BOARD_DEBUG_RUNNER or BOARD_FLASH_RUNNER. so if add -DBOARD_FLASH_RUNNER=mdb-nsim or -DBOARD_DEBUG_RUNNER=mdb-nsim to cmake command, the apllication will be run with mdb. Signed-off-by: Jingru Wang <jingru@synopsys.com>
This commit is contained in:
parent
f1c8fcac8b
commit
cd87366016
2 changed files with 42 additions and 44 deletions
|
@ -2,29 +2,18 @@
|
|||
set(EMU_PLATFORM nsim)
|
||||
|
||||
if(NOT (CONFIG_SOC_NSIM_HS_SMP OR CONFIG_SOC_NSIM_HS6X_SMP))
|
||||
board_set_flasher_ifnset(arc-nsim)
|
||||
board_set_debugger_ifnset(arc-nsim)
|
||||
board_set_flasher_ifnset(arc-nsim)
|
||||
board_set_debugger_ifnset(arc-nsim)
|
||||
|
||||
board_runner_args(arc-nsim "--props=${BOARD}.props")
|
||||
set(NSIM_PROPS "${BOARD}.props")
|
||||
endif()
|
||||
|
||||
if(${CONFIG_SOC_NSIM_EM})
|
||||
board_runner_args(arc-nsim "--props=nsim_em.props")
|
||||
board_runner_args(mdb-nsim "--nsim_args=mdb_em.args")
|
||||
elseif(${CONFIG_SOC_NSIM_EM7D_V22})
|
||||
board_runner_args(arc-nsim "--props=nsim_em7d_v22.props")
|
||||
board_runner_args(mdb-nsim "--nsim_args=mdb_em7d_v22.args")
|
||||
elseif(${CONFIG_SOC_NSIM_SEM})
|
||||
board_runner_args(arc-nsim "--props=nsim_sem.props")
|
||||
board_runner_args(mdb-nsim "--nsim_args=mdb_sem.args")
|
||||
elseif(${CONFIG_SOC_NSIM_HS})
|
||||
board_runner_args(arc-nsim "--props=nsim_hs.props")
|
||||
board_runner_args(mdb-nsim "--nsim_args=mdb_hs.args")
|
||||
elseif(${CONFIG_SOC_NSIM_HS_SMP})
|
||||
board_runner_args(mdb-nsim "--cores=${CONFIG_MP_NUM_CPUS}" "--nsim_args=mdb_hs_smp.args")
|
||||
elseif(${CONFIG_SOC_NSIM_HS6X})
|
||||
board_runner_args(arc-nsim "--props=nsim_hs6x.props")
|
||||
board_runner_args(mdb-nsim "--nsim_args=mdb_hs6x.args")
|
||||
elseif(${CONFIG_SOC_NSIM_HS6X_SMP})
|
||||
board_runner_args(mdb-nsim "--cores=${CONFIG_MP_NUM_CPUS}" "--nsim_args=mdb_hs6x_smp.args")
|
||||
string(REPLACE "nsim" "mdb" MDB_ARGS "${BOARD}.args")
|
||||
if((CONFIG_SOC_NSIM_HS_SMP OR CONFIG_SOC_NSIM_HS6X_SMP))
|
||||
board_runner_args(mdb-nsim "--cores=${CONFIG_MP_NUM_CPUS}" "--nsim_args=${MDB_ARGS}")
|
||||
else()
|
||||
board_runner_args(mdb-nsim "--nsim_args=${MDB_ARGS}")
|
||||
endif()
|
||||
|
||||
board_finalize_runner_args(arc-nsim)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue