diff --git a/configs/pulp_cv32e40p.sh b/configs/pulp_cv32e40p.sh new file mode 100644 index 0000000..2027403 --- /dev/null +++ b/configs/pulp_cv32e40p.sh @@ -0,0 +1,16 @@ +#!/bin/bash -e + +export PULPRT_TARGET=pulp +export PULPRUN_TARGET=pulp +export USE_CV32E40P=1 + +if [ -n "${ZSH_VERSION:-}" ]; then + DIR="$(readlink -f -- "${(%):-%x}")" + scriptDir="$(dirname $DIR)" +else + + scriptDir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" + +fi + +source $scriptDir/common.sh diff --git a/rules/pulpos/targets/pulp.mk b/rules/pulpos/targets/pulp.mk index 776c0c5..1872a36 100644 --- a/rules/pulpos/targets/pulp.mk +++ b/rules/pulpos/targets/pulp.mk @@ -4,6 +4,12 @@ PULP_CFLAGS += -D__ibex__ -U__riscv__ -UARCHI_CORE_HAS_PULPV2 -DRV_ISA_RV PULP_ARCH_CFLAGS ?= -march=rv32imc PULP_ARCH_LDFLAGS ?= -march=rv32imc PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imc +else ifdef USE_CV32E40P +PULP_LDFLAGS += +PULP_CFLAGS += -D__cv32e40p__ -U__riscv__ -UARCHI_CORE_HAS_PULPV2 +PULP_ARCH_CFLAGS ?= -march=rv32imcxgap9 -mnohwloop +PULP_ARCH_LDFLAGS ?= -march=rv32imcxgap9 -mnohwloop +PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imcxgap9 -mnohwloop else PULP_LDFLAGS += PULP_CFLAGS += -D__riscv__ @@ -55,4 +61,4 @@ ifeq '$(platform)' 'fpga' CONFIG_IO_UART=1 endif -include $(PULPRT_HOME)/rules/pulpos/default_rules.mk \ No newline at end of file +include $(PULPRT_HOME)/rules/pulpos/default_rules.mk