mirror of
https://github.com/saymrwulf/pulp-runtime.git
synced 2026-11-18 08:54:44 +00:00
pulpissimo_cv32e40p: Use plusargs to pass simulation parameters
This commit is contained in:
parent
1fd6eeb0d2
commit
564ca51f85
2 changed files with 28 additions and 1 deletions
|
|
@ -3,6 +3,8 @@
|
||||||
export PULPRT_TARGET=pulpissimo
|
export PULPRT_TARGET=pulpissimo
|
||||||
export PULPRUN_TARGET=pulpissimo
|
export PULPRUN_TARGET=pulpissimo
|
||||||
export USE_CV32E40P=1
|
export USE_CV32E40P=1
|
||||||
|
# use plusarg to pass simulation boot parameters instead of floating parameters
|
||||||
|
export CONFIG_PLUSARG_SIM=1
|
||||||
|
|
||||||
if [ -n "${ZSH_VERSION:-}" ]; then
|
if [ -n "${ZSH_VERSION:-}" ]; then
|
||||||
DIR="$(readlink -f -- "${(%):-%x}")"
|
DIR="$(readlink -f -- "${(%):-%x}")"
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,29 @@ endif
|
||||||
#
|
#
|
||||||
# VSIM Flags
|
# VSIM Flags
|
||||||
#
|
#
|
||||||
vsim_flags ?= +ENTRY_POINT=0x1c008080 -dpicpppath /usr/bin/g++ -permit_unmatched_virtual_intf -gBAUDRATE=115200
|
vsim_flags ?= +ENTRY_POINT=0x1c008080 -permit_unmatched_virtual_intf -gBAUDRATE=115200
|
||||||
|
|
||||||
|
ifdef CONFIG_PLUSARG_SIM
|
||||||
|
|
||||||
|
ifdef bootmode
|
||||||
|
ifeq ($(bootmode), spi)
|
||||||
|
vsim_flags += +bootmode=spi_flash
|
||||||
|
else ifeq ($(bootmode), hyperflash)
|
||||||
|
vsim_flags += +bootmode=hyper_flash
|
||||||
|
else ifeq ($(bootmode), fast_debug)
|
||||||
|
vsim_flags += +bootmode=fast_debug_preload
|
||||||
|
else ifeq ($(bootmode), jtag)
|
||||||
|
vsim_flags += +bootmode=jtag
|
||||||
|
else
|
||||||
|
$(error Illegal value supplied for bootmode. Legal values are 'spi', 'hyperflash', 'fast_debug' and 'jtag')
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
# default bootmode
|
||||||
|
vsim_flags += +bootmode=jtag
|
||||||
|
endif
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
ifdef bootmode
|
ifdef bootmode
|
||||||
ifeq ($(bootmode), spi)
|
ifeq ($(bootmode), spi)
|
||||||
vsim_flags += -gSTIM_FROM=SPI_FLASH -gLOAD_L2=STANDALONE -gUSE_S25FS256S_MODEL=1
|
vsim_flags += -gSTIM_FROM=SPI_FLASH -gLOAD_L2=STANDALONE -gUSE_S25FS256S_MODEL=1
|
||||||
|
|
@ -173,6 +195,9 @@ endif
|
||||||
else
|
else
|
||||||
vsim_flags += -gLOAD_L2=JTAG
|
vsim_flags += -gLOAD_L2=JTAG
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifdef vsim_additional_flags
|
ifdef vsim_additional_flags
|
||||||
vsim_flags += $(vsim_additional_flags)
|
vsim_flags += $(vsim_additional_flags)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue