This repository has been archived by the owner on Jan 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathINSTALL-MIPS.txt
67 lines (37 loc) · 3.03 KB
/
INSTALL-MIPS.txt
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
62
63
64
65
66
67
With these instructions, you'll be able to set up your development environment to compile MIPS executables (.plg plugins) for the Supercard DSTwo.
If all you want is to set up a pre-built toolchain, see the file INSTALL-MIPS.txt.
-- Step 1: Set up the MIPS side tools --
1. Decide which directory will contain the MIPS side on your local filesystem.
NOTE: IT IS VERY IMPORTANT THAT THIS PATH NOT CONTAIN ANY SPACES. 'make' DOES NOT SUPPORT PATHS WITH SPACES.
Using <scds2 tools directory> as a placeholder for the chosen name, use the following commands to create it and set it as your DSTwo tools directory:
$ export SCDS2_TOOLS=<scds2 tools directory>
$ mkdir -p $SCDS2_TOOLS
If you decided to extract the DSTwo tools outside of your home directory, use 'sudo' before 'mkdir' above, and also complete step 2. Otherwise, go to step 3.
2. Make the extraction directory writable by your user. On UNIX, each user also has a group with the user's name, containing just that user. The owner user can stay 'root'.
$ sudo chown root:$(whoami) $SCDS2_TOOLS
$ sudo chmod 775 $SCDS2_TOOLS
3. Add the following line to your shell's initialisation file (such as $HOME/.bashrc):
export SCDS2_TOOLS=<scds2 tools directory>
4. Extract the MIPS side into the directory you chose:
$ cd $SCDS2_TOOLS
$ tar xjf <path to...>/mips-side.tar.bz2
-- Step 2: Set up the MIPS toolchain --
The toolchain contains a cross-compiler, i.e. a compiler for your machine that produces MIPS executables that your machine may or may not run.
More precisely, it's a bare-metal mipsel (MIPS little-endian) 32-bit ELF compiler. The standard library is provided by the DSTwo tools, described above, and it's statically-linked into every executable as required by the plugin system.
The compiler will be at the following location, which may be referenced in Makefiles:
$(SCDS2_TOOLCHAIN)/bin/mipsel-scds2-elf-gcc
Here's how you'll build this toolchain.
1. Decide which directory will contain the MIPS toolchain on your local filesystem.
NOTE: IT IS VERY IMPORTANT THAT THIS PATH NOT CONTAIN ANY SPACES. 'make' DOES NOT SUPPORT PATHS WITH SPACES.
Using <scds2 toolchain directory> as a placeholder for the chosen name, use the following commands to create it and set it as your DSTwo toolchain directory:
$ export SCDS2_TOOLCHAIN=<scds2 toolchain directory>
$ mkdir -p $SCDS2_TOOLCHAIN
If you decided to extract the DSTwo toolchain outside of your home directory, use 'sudo' before 'mkdir' above, and also complete step 2. Otherwise, go to step 3.
2. Make the extraction directory writable by your user. On UNIX, each user also has a group with the user's name, containing just that user. The owner user can stay 'root'.
$ sudo chown root:$(whoami) $SCDS2_TOOLCHAIN
$ sudo chmod 775 $SCDS2_TOOLCHAIN
3. Add the following line to your shell's initialisation file (such as $HOME/.bashrc):
export SCDS2_TOOLCHAIN=<scds2 toolchain directory>
4. Extract the MIPS toolchain into the directory you chose:
$ cd $SCDS2_TOOLCHAIN
$ tar xjf <path to...>/scds2-gcc-VERSION.tar.bz2