Commit 0ed79110 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

doc: LM32 software compilation updated

parent a5d2d6d4
...@@ -206,8 +206,10 @@ section \ref{Repositories and Releases}: ...@@ -206,8 +206,10 @@ section \ref{Repositories and Releases}:
\begin{lstlisting} \begin{lstlisting}
$ git clone git://ohwr.org/misc/hdl-make.git <your_location>/hdl-make $ git clone git://ohwr.org/misc/hdl-make.git <your_location>/hdl-make
$ cd <your_location>/hdl-make $ cd <your_location>/hdl-make
$ git checkout 9d303ee TODO: update commit id $ git checkout c4789c4
\end{lstlisting} \end{lstlisting}
This checks out \textit{hdlmake} version 2.1 patched with the Arria V FPGA
support (VFC-HD board).
Then, using your favorite editor, you should create an \textit{hdlmake} script in Then, using your favorite editor, you should create an \textit{hdlmake} script in
/usr/bin to be able to call it from any directory. The script should have the /usr/bin to be able to call it from any directory. The script should have the
...@@ -298,67 +300,59 @@ scratch you can use the following commands: ...@@ -298,67 +300,59 @@ scratch you can use the following commands:
\subsection{LM32 software compilation} \subsection{LM32 software compilation}
\label{LM32 software compilation} \label{LM32 software compilation}
\textbf{Note:} By default, the \codeHook{lm32} software for a stable release is embedded \textbf{Note:} By default, the LM32 software for a stable release is embedded
inside the FPGA bitstream you've downloaded from \textit{ohwr.org} or synthesized in inside the FPGA bitstream you've downloaded from \textit{ohwr.org} or
the previous step. This means you don't have to do a manual compilation of the synthesized in section \ref{HDL synthesis}. You can skip this section, unless
\codeHook{lm32} software unless you want to use a development version or you've made you need to make some custom changes to the LM32 software and compile it
some changes required by your application. yourself.\\
\vspace{1em}
To compile the \codeHook{lm32} software for the White Rabbit \codeHook{ptp} Core you will
need to download and unpack the \codeHook{lm32} toolchain from the location mentioned
in section \ref{Repositories and Releases}:
First, you need to download and unpack the LM32 toolchain from the location
mentioned in section \ref{Repositories and Releases}:
\begin{lstlisting} \begin{lstlisting}
$ wget http://www.ohwr.org/attachments/download/1133/lm32.tar.xz $ wget http://www.ohwr.org/attachments/download/1133/lm32.tar.xz
$ tar xJf lm32.tar.xz -C <your_lm32_location> $ tar xJf lm32.tar.xz -C <your_location>
\end{lstlisting} \end{lstlisting}
Then you need to set a \texttt{CROSS\_COMPILE} variable in order Then you need to set a \texttt{CROSS\_COMPILE} environment variable in order
to compile the software for the \codeHook{lm32} processor: to compile the software for the LM32 processor:
\begin{lstlisting} \begin{lstlisting}
$ export CROSS_COMPILE="<your_lm32_location>/lm32/bin/lm32-elf-" $ export CROSS_COMPILE="<your_location>/lm32/bin/lm32-elf-"
\end{lstlisting} \end{lstlisting}
To get the sources of the \codeHook{wrpc} software please clone the \textit{wrpc-sw} git To get the sources of the WRPC software, please clone the \textit{wrpc-sw} git
repository tagged with wrpc-v3.0 tag. If you use \codeHook{wrpc} within another repository tagged with \texttt{wrpc-v3.1} tag. The commands in the listing below
project, you may need to checkout a different tag or a specific commit. If this do that together with submodules needed for this software.\\
applies, please refer to a documentation for this project.
\begin{lstlisting} \begin{lstlisting}
$ git clone git://ohwr.org/hdl-core-lib/wr-cores/wrpc-sw.git <your_location>/wrpc-sw $ git clone git://ohwr.org/hdl-core-lib/wr-cores/wrpc-sw.git \
<your_location>/wrpc-sw
$ cd <your_location>/wrpc-sw $ cd <your_location>/wrpc-sw
$ git checkout wrpc-v3.0 # or "git checkout master" $ git checkout wrpc-v3.1
\end{lstlisting} \end{lstlisting}
Before you can compile \textit{wrpc-sw} you need to make a few configuration choices. \textbf{Note:} If you use WRPC within another project, you may need to checkout
The package uses \textit{Kconfig} as a configuration engine, so you may run one of the a different tag or a specific commit. If this applies, please refer to a
following commnads (the first is text-mode, the second uses a KDE GUI documentation for this project.\\
and the third uses a Gnome GUI):
Before you can compile \textit{wrpc-sw}, you can make some configuration
choices. The package uses \textit{Kconfig} as a configuration engine, so you may
run one of the following commands (the first is text-mode, the second uses a KDE
GUI and the third uses a Gnome GUI):
\begin{lstlisting} \begin{lstlisting}
$ make menuconfig $ make menuconfig
$ make xconfig $ make xconfig
$ make gconfig $ make gconfig
\end{lstlisting} \end{lstlisting}
Other \textit{Kconfig} target applies, like \code{config}, \code{oldconfig} Other \code{Kconfig} target applies, like \code{config}, \code{oldconfig}
and so on. A few default known-good configurations are found in and so on. A few default known-good configurations are found in
\texttt{./configs} and you choose one by \textit{make}ing it by name: \texttt{./configs} and you choose one by \code{make}ing it by name. For all
three boards mentioned in this manual \code{spec\_defconfig} can be used.
\begin{lstlisting} \begin{lstlisting}
$ make spec_defconfig $ make spec_defconfig
\end{lstlisting} \end{lstlisting}
The most important configuration choice at this point in time is After the package is configured, just run \code{make} without parameters to
whether to enable Etherbone or not. It is disabled by default in build your binary file:
\code{spec\_defconfig} and enabled by default in
\code{etherbone\_defconfig}.
After the package is configured, just run \code{make} without
parameters to build your binary file:
\begin{lstlisting} \begin{lstlisting}
$ make $ make
\end{lstlisting} \end{lstlisting}
...@@ -369,8 +363,8 @@ by hand. The second and later build won't download anything ...@@ -369,8 +363,8 @@ by hand. The second and later build won't download anything
from the network. from the network.
The resulting binary \textit{wrc.bin} can be then used with the loader from The resulting binary \textit{wrc.bin} can be then used with the loader from
\textit{spec-sw} software package to program the \codeHook{lm32} inside the White Rabbit \codeHook{ptp} \textit{spec-sw} or \textit{svec-sw} software package to program the LM32 inside
Core (section \ref{Running and Configuring}). the White Rabbit PTP Core (see section \ref{Running and Configuring} for details).
% ########################################################################## % ##########################################################################
\section{Running and Configuring} \section{Running and Configuring}
......
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