From f9dca7b8d16a35c3ad897e82702a4421261e04bb Mon Sep 17 00:00:00 2001 From: hoangt Date: Thu, 2 Feb 2017 15:13:47 -0800 Subject: [PATCH] sw/cmake_configure.ri5cy.gcc.sh --- sw/cmake_configure.ri5cy.gcc.sh | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 sw/cmake_configure.ri5cy.gcc.sh diff --git a/sw/cmake_configure.ri5cy.gcc.sh b/sw/cmake_configure.ri5cy.gcc.sh new file mode 100755 index 00000000..5323923a --- /dev/null +++ b/sw/cmake_configure.ri5cy.gcc.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +OBJDUMP=`which riscv32-unknown-elf-objdump` +OBJCOPY=`which riscv32-unknown-elf-objcopy` + +#COMPILER=`which riscv32-unknown-elf-gcc` +COMPILER=`which riscv32-unknown-elf-gcc-5.2.0` + +TARGET_C_FLAGS="-O3 -m32 -g" + +VSIM=`which vsim` + +# if you want to have compressed instructions, set this to 1 +RVC=0 + +# if you are using the ETH gcc compiler that supports the extended instruction +# of RI5CY, set this to 1 +# Otherwise it is assumed that the official riscv compiler is used and no special +# instructions are inserted +GCC_ETH=1 + + +PULP_GIT_DIRECTORY=../../ +SIM_DIRECTORY="$PULP_GIT_DIRECTORY/vsim" + +cmake "$PULP_GIT_DIRECTORY"/sw/ \ + -DPULP_MODELSIM_DIRECTORY="$SIM_DIRECTORY" \ + -DCMAKE_C_COMPILER="$COMPILER" \ + -DVSIM="$VSIM" \ + -DRVC="$RVC" \ + -DGCC_ETH="$GCC_ETH" \ + -DCMAKE_C_FLAGS="$TARGET_C_FLAGS" \ + -DCMAKE_OBJCOPY="$OBJCOPY" \ + -DCMAKE_OBJDUMP="$OBJDUMP" + +# Add -G "Ninja" to the cmake call above to use ninja instead of make