|     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

The Open Source Committee (OSCom) is currently considering the addition of both an individual and an entity General CLA to cover all licenses on the IEEE SA OPEN platform. Please share your thoughts regarding the proposed General CLAs by May 17, 2022.

Commit 58abb53b authored by Alfredo Herrera's avatar Alfredo Herrera
Browse files

pruned files

parent eca8f65e
# Copyright (c) 2019 BTA Design Services Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
# Authors: Alfredo Herrera (
# KichwaCoders (
# This script can be used to install a subset of RISC-V tools to study,
# configure as-referred, modify, implement or release hardware based on the
# RISC-V Instruction Set Architecture. The VM is preconfigured for RISC-V HW
# development.
# * RISC-V SW tool chain using the Eclipse-IDE
# * RISC-V Imperas OVPSim model
# * RISC-V Verilator model
# Exit if not in a script, if not sudo/root or if runtime errors
function die() {
echo "$@: " 1>&2
exit 1
# ref:
if ! [ $(id -u) = 0 ]; then
echo "The RISC-V VM installtion script needs to be run as root." >&2
exit 1
# Show commands being used and error out on unexpected situations
set -eux
# Update UBUNTU OS prior to installing tools
echo "Updating Ubuntu"; echo""
apt-get install openssh-server xauth git-core lsb-core xorg vim-gtk3 dos2unix
# libudev package not available
apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libusb-1.0-0-dev libudev1 libudev-dev g++ openjdk-8-jdk
apt-get upgrade
apt-get clean
apt-get autoremove --purge
# Install PULP-Platform GNU toolchain
echo "Installing PULP GNU toolchain"; echo""
cd /home/user
sudo -u user git clone -recursive
cd pulp-riscv-gnu-toolchain
sudo -u user ./configure --prefix=/opt/pulp --with-arch=rv32imc --with-cmodel=medlow --enable-multilib
sudo -u user make
cd ..
rm -rf pulp-riscv-gnu-toolchain
echo "Installing Verilator tool"; echo""
cd /home/user
apt-get install libfl2 libfl-dev
git clone
cd verilator
git pull
git checkout stable
sudo make install
cd ..
rm -rf verilator
echo "Installing rv32m1 tools"; echo""
curl -L >
# Convert SDK shell script into the tar file -- this implictly accepts the license and extract to ./vega
ARCHIVE=$(awk '/^__ARCHIVE__/ {print NR + 1; exit 0; }' "")
tail -n+${ARCHIVE} "" | tar -xz > /dev/null 2>&1 || true
mkdir vega
(cd vega && tar xf ../rv32m1_sdk_riscv.tar.gz)
curl -L > Toolchain_Linux.tar.gz
# Extract toolchain, takes two steps as there are archives in Toolchain_Linux.tar.gz)
mkdir toolchain
pushd toolchain
tar xf ../Toolchain_Linux.tar.gz # this makes tar files for next lines
tar xf riscv32-unknown-elf-gcc.tar.gz
rm riscv32-unknown-elf-gcc.tar.gz
tar xf openocd.tar.gz
rm openocd.tar.gz
echo "Installing Eclipse-IDE and MCU plugins"; echo""
curl -L > 20190101-2023-gnumcueclipse-4.5.1-2018-12-R-linux.gtk.x86_64.tar.gz
curl -L >
# Extract eclipse that includes GNU MCU plugins, eclipse executable will be ./eclipse/eclipse
tar xf 20190101-2023-gnumcueclipse-4.5.1-2018-12-R-linux.gtk.x86_64.tar.gz
# Set the toolchain defaults for GNU MCU plug-ins to what we just "installed"
mkdir -p eclipse/configuration/.settings/
# openocd location
echo "eclipse.preferences.version=1" > eclipse/configuration/.settings/ilg.gnumcueclipse.debug.gdbjtag.openocd.prefs
echo "install.folder=$PWD/toolchain" >> eclipse/configuration/.settings/ilg.gnumcueclipse.debug.gdbjtag.openocd.prefs
# gcc & friends location
echo "eclipse.preferences.version=1" > eclipse/configuration/.settings/ilg.gnumcueclipse.managedbuild.cross.riscv.prefs
# (magic number comes from
echo "toolchain.path.512258282=$PWD/toolchain/riscv32-unknown-elf-gcc/bin" >> eclipse/configuration/.settings/ilg.gnumcueclipse.managedbuild.cross.riscv.prefs
# Setup RISC-V OVP Simulator
mv riscv-ovpsim-master riscv-ovpsim
# Optional, comment to preserve downloads
cd ~
rm rv32m1_sdk_riscv.tar.gz 20190101-2023-gnumcueclipse-4.5.1-2018-12-R-linux.gtk.x86_64.tar.gz Toolchain_Linux.tar.gz
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment