software: compile compiler-rt ourselves
[litex.git] / README
1 [> Milkymist-NG system-on-chip
2 ------------------------------
3
4 This is the next-generation Milkymist(tm) system-on-chip design,
5 introducing two key innovations:
6 * Built on the powerful Migen VLSI logic design system.
7 * Increased system memory performance thanks to a new architecture
8 (ASMI) containing a transaction-reordering and superscalar controller.
9
10 The Milkymist-NG SoC supports the Milkymist One board. Obtain yours at:
11 http://milkymist.org
12
13 Note that the -NG version is still experimental work in progress. For the
14 production version of Milkymist SoC, visit:
15 https://github.com/milkymist/milkymist
16
17 [> Instructions (software)
18 --------------------------
19 1. Compile and install binutils. Take the latest version from GNU.
20 ./configure --target=lm32-elf
21 make
22 make install
23
24 2. Compile and install LLVM and Clang.
25 git clone git://github.com/milkymist/llvm-lm32.git
26 cd llvm-lm32/tools
27 git clone git://github.com/milkymist/clang-lm32.git clang
28 cd ..
29 mkdir build
30 cmake ..
31 make
32 make install
33
34 3. Obtain compiler-rt and set the CRTDIR environment variable to the root of
35 its source tree.
36 svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
37 export CRTDIR=/path_to/compiler-rt
38
39 4. Build and flash the BIOS (part of this source distribution).
40 cd software/bios
41 make
42 make flash
43
44 The second command requires m1nor, FJMEM and UrJTAG.
45 These tools can be found respectively at:
46 http://projects.qi-hardware.com/index.php/p/wernermisc/
47 https://github.com/milkymist/fjmem-m1
48 http://urjtag.org
49
50 [> Instructions (gateware)
51 --------------------------
52 First, download and install Migen from:
53 https://github.com/milkymist/migen
54
55 Once this is done, build the bitstream with:
56 make
57 This will generate the build/soc.bit programming file.
58 Use:
59 make load
60 to load it with UrJTAG.
61
62 The SoC expects a bootloader to be located in flash at 0x860000, just
63 like the legacy SoC did. However, there is no binary compatibility and a
64 new BIOS needs to be built and flashed for the -NG SoC.
65
66 Enjoy!
67
68 [> Misc
69 -------
70 Code repository:
71 https://github.com/milkymist/milkymist-ng
72
73 Send questions, comments and patches to devel [AT] lists.milkymist.org
74 We are also on IRC: #milkymist on the Freenode network.
75
76 Milkymist-NG is free software: you can redistribute it and/or modify it
77 under the terms of the GNU General Public License as published by the
78 Free Software Foundation, version 3 of the License. This program is
79 distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
80 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
81 PARTICULAR PURPOSE. See the GNU General Public License for more details.
82
83 The authors grant the additional permissions that the code can be used in
84 conjunction with the LatticeMico32 CPU core from Lattice.
85
86 Unless otherwise noted, Milkymist-NG's source code is copyright (C)
87 2011-2012 Sebastien Bourdeauducq. Other authors retain ownership of their
88 contributions. If a submission can reasonably be considered independently
89 copyrightable, it's yours and I encourage you to claim it with
90 appropriate copyright notices. This submission then falls under the
91 "otherwise noted" category. All submissions must use a license compatible
92 with the GPL and the additional permissions above.