-
Notifications
You must be signed in to change notification settings - Fork 17
/
README.cross
62 lines (47 loc) · 2.51 KB
/
README.cross
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Cross Compilation Instructions
This is a guide for how to produce propeller-elf-gcc tools for
Windows (32 bit) or Raspberry Pi on your Linux machine. Both could
be produced natively, but take a long time to build, so cross compilation
is attractive.
The instructions assume a Ubuntu 12.04 LTS machine is being used to do
the builds. Other Linux versions should work as well (in particular newer
Ubuntu releases). They also assume you can already build the native
Linux tools.
NOTE: all cross-compilations require that the native Propeller tools be
built first, and that they are available on the PATH. Typically this is
done by adding /opt/parallax/bin to your PATH environment variable.
==============================================================
WINDOWS
==============================================================
(1) Install the mingw32 toolchain for Ubuntu:
sudo apt-get install mingw32
(2) Make the native propgcc toolchain (if you haven't already) by doing:
make
in the propgcc directory. The output is in /opt/parallax.
(3) Build the Win32 toolchain by doing:
make CROSS=win32
in the propgcc directory. The output is in /opt/parallax-win32.
==============================================================
RASPBERRY PI
==============================================================
(1) Install a Raspberry Pi cross compiler. I followed the directions from
http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/,
but I skipped all the Eclipse stuff (the command line tools are all
we need). This boils down to:
mkdir ~/rpi
cd ~/rpi
git clone git://github.com/raspberrypi/tools.git
export PATH=$PATH:~/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/
You'll probably want to add the "export PATH=..." stuff to one of your
startup scripts, e.g. .bashrc, so as to avoid typing it every time.
NOTE: if you install the Raspberry Pi cross compiler in a different place,
or use a different cross compiler, then you'll have to adjust the
definitions in the Makefile. In particular the CURSES_PREFIX variable will
have to be set so that the ncurses library can be installed in the proper
place (where the ARM libraries are), and obviously the CROSS_TARGET setting
will have to reflect the proper name for the toolchain -- gcc, for example,
will be invoked as $(CROSS_TARGET)-gcc.
(2) Make the native propgcc toolchain (if you haven't already).
(3) Build the Raspberry Pi toolchain by doing:
make CROSS=rpi
in the propgcc directory. The output is in /opt/parallax-rpi.