1 |
28 |
jlechner |
Building and Installing the GNU Toolchain for the SCARTS Architecture
|
2 |
|
|
---------------------------------------------------------------------
|
3 |
|
|
|
4 |
|
|
1. Prerequisites
|
5 |
|
|
----------------
|
6 |
|
|
|
7 |
|
|
1.1 Dependencies
|
8 |
|
|
----------------
|
9 |
|
|
The GNU Toolchain for the SCARTS architecture requires a bunch of packages
|
10 |
|
|
to be made available on a host machine prior to its installation. Note that
|
11 |
|
|
the following list of dependencies might vary slightly from host to host, but
|
12 |
|
|
should be suitable for most default Linux installations:
|
13 |
|
|
|
14 |
|
|
- gcc-4.1
|
15 |
|
|
- libtool
|
16 |
|
|
- termcap-devel
|
17 |
|
|
- texinfo
|
18 |
|
|
- zlib-devel
|
19 |
|
|
|
20 |
|
|
1.2 Resource Definition Script
|
21 |
|
|
------------------------------
|
22 |
|
|
Edit the resource file scartsrc in ./scripts and adapt the (top level) paths to
|
23 |
|
|
suit your needs. By sourcing the file in the terminal you make the variables in
|
24 |
|
|
scartsrc available in the environment:
|
25 |
|
|
|
26 |
|
|
. ~/scripts/scartsrc (mind the leading dot!)
|
27 |
|
|
|
28 |
|
|
1.3 PATH Environment Variable
|
29 |
|
|
-----------------------------
|
30 |
|
|
Edit the file .bashrc within your home folder and add the 'bin' directory of
|
31 |
|
|
the GNU Toolchain installation directory to $PATH, e.g. via:
|
32 |
|
|
|
33 |
|
|
export PATH=$PATH:/opt/scarts/bin
|
34 |
|
|
|
35 |
|
|
2. Building and Installation
|
36 |
|
|
----------------------------
|
37 |
|
|
For a fresh installation of the GNU toolchain for the SCARTS architecture you
|
38 |
|
|
must follow these steps (in chronological order):
|
39 |
|
|
|
40 |
|
|
2.1 scarts-memmap
|
41 |
|
|
-----------------
|
42 |
|
|
The SCARTS memory mapping tool allows for the management of memory mappings,
|
43 |
|
|
which depend on both the configured word size of the SCARTS processor and the
|
44 |
|
|
selected target platform, from simple configuration files.
|
45 |
|
|
|
46 |
|
|
The memory mapper automatically creates the dependencies (configuration files,
|
47 |
|
|
Makefiles, linker scripts, etc.) for a certain memory map in order that both
|
48 |
|
|
the SCARTS and the GNU toolchain may share the same view of the memory.
|
49 |
|
|
|
50 |
|
|
Although it is recommended to always keep the SCARTS and the GNU toolchain in
|
51 |
|
|
synch, only some of the dependencies are mandatory:
|
52 |
|
|
|
53 |
|
|
- SCARTS VHDL configuration file (scarts_conf.vhd)
|
54 |
|
|
- Makefile and linker scripts for the bootloader
|
55 |
|
|
- Makefile and linker scripts for applications
|
56 |
|
|
|
57 |
|
|
The simulator within the GDB, for example, uses a default memory configuration
|
58 |
|
|
which should be sufficiently large to suit most applications.
|
59 |
|
|
|
60 |
|
|
Please refer to the usage of the memory mapping tool for more information!
|
61 |
|
|
|
62 |
|
|
2.1 scarts-binutils
|
63 |
|
|
-------------------
|
64 |
|
|
Please see the building instructions in ./scarts-binutils/binutils-2.19.1/BUILD.
|
65 |
|
|
|
66 |
|
|
2.2 scarts-gcc
|
67 |
|
|
--------------
|
68 |
|
|
Please see the building instructions in ./scarts-gcc/gcc-4.1.1/BUILD.
|
69 |
|
|
|
70 |
|
|
2.3 scarts-newlib
|
71 |
|
|
-----------------
|
72 |
|
|
Please see the building instructions in ./scarts-newlib/newlib-1.17.0/BUILD.
|
73 |
|
|
|
74 |
|
|
2.4 scarts-hex2quartus
|
75 |
|
|
----------------------
|
76 |
|
|
Please see the building instructions in ./scarts-hex2quartus/BUILD.
|
77 |
|
|
|
78 |
|
|
2.5 scarts-bootloader
|
79 |
|
|
---------------------
|
80 |
|
|
Please see the building instructions in ./scarts-bootloader/BUILD.
|
81 |
|
|
|
82 |
|
|
2.6 scarts-gdb
|
83 |
|
|
--------------
|
84 |
|
|
Please see the building instructions in ./scarts-gdb/gdb-6.8/BUILD.
|
85 |
|
|
|
86 |
|
|
2.7 scarts-gdb-stub
|
87 |
|
|
-------------------
|
88 |
|
|
Please see the building instructions in ./scarts-gdb-stub/BUILD.
|
89 |
|
|
|