Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions sw/cmake_configure.ri5cy.gcc.sh
Original file line number Diff line number Diff line change
@@ -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