summaryrefslogtreecommitdiff
path: root/doc/sphinx/userguide/buildingcoreip.rst
blob: 7fd821e260c41560bbc19c41f3865dec271ccacd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Building for SiFive CoreIP
==========================

Building an Example
-------------------

To compile a bare-metal RISC-V program:

.. code-block:: bash

   make [PROGRAM=hello] [TARGET=coreip-e31-rtl] [CONFIGURATION=debug] software

The square brackets in the above command indicate optional parameters for the
Make invocation. As you can see, the default values of these parameters tell
the build script to build the ``hello`` example for the ``coreip-e31`` target
with the ``debug`` build configuration. If, for example, you wished to build
the ``timer-interrupt`` example for the S51 Core IP target with the ``release``
configuration, you would instead run the command

.. code-block:: bash

   make PROGRAM=timer-interrupt TARGET=coreip-s51-rtl CONFIGURATION=release software

Cleaning a Target Program Build Directory
-----------------------------------------

The ``clean`` target can be used to restore a target program's directory to a clean state.

.. code-block:: bash

   make [PROGRAM=hello] [TARGET=coreip-e31-rtl] [CONFIGURATION=debug] clean