add initial setup instructions
This commit is contained in:
31
docs/Getting-Started/Initial-Repo-Setup.rst
Normal file
31
docs/Getting-Started/Initial-Repo-Setup.rst
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
Initial Repository Setup
|
||||||
|
========================================================
|
||||||
|
|
||||||
|
Checking out the sources
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
After cloning this repo, you will need to initialize all of the submodules.
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
git clone https://github.com/ucb-bar/project-template.git
|
||||||
|
cd project-template
|
||||||
|
./scripts/init-submodules-no-riscv-tools.sh
|
||||||
|
|
||||||
|
Building a Toolchain
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
The `toolchains` directory contains toolchains that include a cross-compiler toolchain, frontend server, and proxy kernel, which you will need in order to compile code to RISC-V instructions and run them on your design.
|
||||||
|
Currently there are two toolchains, one for normal RISC-V programs, and another for Hwacha (``esp-tools``).
|
||||||
|
There are detailed instructions at https://github.com/riscv/riscv-tools to install the ``riscv-tools`` toolchain, however, the instructions are similar for the Hwacha ``esp-tools`` toolchain.
|
||||||
|
But to get a basic installation, just the following steps are necessary.
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
./scripts/build-toolchains.sh riscv # for a normal risc-v toolchain
|
||||||
|
|
||||||
|
# OR
|
||||||
|
|
||||||
|
./scripts/build-toolchains.sh hwacha # for a hwacha modified risc-v toolchain
|
||||||
|
|
||||||
|
Once the script is run, a ``env.sh`` file is emitted at sets the ``PATH``, ``RISCV``, and ``LD_LIBRARY_PATH`` environment variables.
|
||||||
|
You can put this in your ``.bashrc`` or equivalent environment setup file to get the proper variables.
|
||||||
|
These variables need to be set for the make system to work properly.
|
||||||
@@ -16,5 +16,6 @@ Hit next to get started!
|
|||||||
REBAR-Basics
|
REBAR-Basics
|
||||||
Configs-Parameters-Mixins
|
Configs-Parameters-Mixins
|
||||||
Adding-An-Accelerator-Tutorial
|
Adding-An-Accelerator-Tutorial
|
||||||
|
Initial-Repo-Setup
|
||||||
Running-A-Simulation
|
Running-A-Simulation
|
||||||
rebar-generator-mixins
|
rebar-generator-mixins
|
||||||
|
|||||||
Reference in New Issue
Block a user