cs_tour
Your IP: 38.107.179.214
View number: 424
A switch will be made to the GCC-4.5 based tool chain when it becomes available.
The procedure will remain as described here, only the names will change.
Navigate to our Code Sourcery section of the resource pool:
TopBar -> Files -> Mirrored Files -> C
For kernel and applications development, you want one of the tool chains shown as "hosted".
For development of code that will run before any operating system is loaded (such as before the Linux kernel loads), you want one of the tool chains shown as "standalone".
In such a case, you will also want the tool chain source bundle because it contains the GPL version of the MIPS core, hardware headers.
This tour will presume you want all three downloads.
On the resource pool index page selected above, you have your choice between binaries built to run under Linux (which should work under MacOS also) and ones built to run under Windows.
Both are built for Intel, 32-bit, environments. If you have an Intel, 64-bit, environment, you will have to add the 32-bit compatibility libraries to your system.
Most Linux distributions for x86_64 already do that but on yours it may be optional, your distribution's package manager should be able to tell you.
For Windows 64-bit, I haven't a clue.
The Windows builds are native builds but they are built to also run in a Cygwin-Windows environment if you have that already installed for your development work. You do not need to add Cygwin for these builds.
Each of the bundles listed will open to its descriptor page or page fragment.
On each descriptor page you can find URLs listed to the archiviest's materials, which include a lot of documentation and both Linux and Windows "self installers". None of which can be re-distributed, but are available at the links shown.
Each descriptor page also has links to a file catalog, you can see what is inside of each archive by clicking the link to the catalog. The catalog will open in OpenOffice Calc, or in your browser if your browser has an ods file plug-in.
Above, you navigated to the Code Sourcery section of the index pages:
TopBar -> Files -> Mirrored Files -> C
For this example, you will need to navigate to the description page of three of the entries:
CodeSourcery : Source Bundles : MIPS-4.3-221 (standalone)
CodeSourcery : Linux Bundles : MIPS-4.3-221 (standalone)
CodeSourcery : Linux Bundles : MIPS-4.3-157 (hosted)
From each of those three descriptor listings, download the archive.
For this example, those are:
Local file : Archive : mips-4.3-221-sde-elf_src_2009.06.08.tar.bz2
Local file : Archive : mips-4.3-221-sde-elf_linux_2009.06.08.tar.bz2
Local file : Archive : mips-4.3-154_linux_2009.04.12.tar.bz2
Save those wherever it is your practice to save downloads (here: ~/downloads).
You may also want to add those download links to your bookmarks. If in the future, you access the links from your bookmark entry (after navigating away from any *.minimodding.com domain), you will get the descriptor page for the complete set of files.
All of the Code Sourcery tool chains are built with the sysroot option, meaning they can be located anywhere on your file system.
The two best choices of location would be system-wide, under /opt; or user-specific, under ~/
Installing under /opt will require root (administrator) privledges (sudo or su -l).
Here, I install them under /opt (yes, they are built to co-exist with each other).
mszick@deb2core:~$ su -l Password: deb2core:~# cd /opt deb2core:/opt# ls -1 /home/mszick/downloads/mips-4.3* /home/mszick/downloads/mips-4.3-154_linux_2009.04.12.tar.bz2 /home/mszick/downloads/mips-4.3-221-sde-elf_linux_2009.06.08.tar.bz2 /home/mszick/downloads/mips-4.3-221-sde-elf_src_2009.06.08.tar.bz2 deb2core:/opt# tar --extract --bzip2 --file=/home/mszick/downloads/mips-4.3-154_linux_2009.04.12.tar.bz2 deb2core:/opt# tar --extract --bzip2 --file=/home/mszick/downloads/mips-4.3-221-sde-elf_linux_2009.06.08.tar.bz2 deb2core:/opt# tar --extract --bzip2 --file=/home/mszick/downloads/mips-4.3-221-sde-elf_src_2009.06.08.tar.bz2
Which will create (or add-to) two directories:
deb2core:/opt# ls -1d /opt/mips-4.3* /opt/mips-4.3 /opt/mips-4.3-221-mips-sde-elf deb2core:/opt# exit logout mszick@deb2core:~$
Which, for any user other than "root" are write protected, system locations. Just what you want in this case.
The executable files of both tool chains are here:
mszick@deb2core:~$ ls /opt/mips-4.3/bin mips-linux-gnu-addr2line mips-linux-gnu-gprof mips-sde-elf-as mips-sde-elf-ld mips-linux-gnu-ar mips-linux-gnu-ld mips-sde-elf-c++ mips-sde-elf-nm mips-linux-gnu-as mips-linux-gnu-nm mips-sde-elf-c++filt mips-sde-elf-objcopy mips-linux-gnu-c++ mips-linux-gnu-objcopy mips-sde-elf-conv mips-sde-elf-objdump mips-linux-gnu-c++filt mips-linux-gnu-objdump mips-sde-elf-cpp mips-sde-elf-ranlib mips-linux-gnu-cpp mips-linux-gnu-ranlib mips-sde-elf-g++ mips-sde-elf-readelf mips-linux-gnu-g++ mips-linux-gnu-readelf mips-sde-elf-gcc mips-sde-elf-run mips-linux-gnu-gcc mips-linux-gnu-size mips-sde-elf-gcc-4.3.3 mips-sde-elf-size mips-linux-gnu-gcc-4.3.3 mips-linux-gnu-strings mips-sde-elf-gcov mips-sde-elf-strings mips-linux-gnu-gcov mips-linux-gnu-strip mips-sde-elf-gdb mips-sde-elf-strip mips-linux-gnu-gdb mips-sde-elf-addr2line mips-sde-elf-gdbtui mips-linux-gnu-gdbtui mips-sde-elf-ar mips-sde-elf-gprof
Which are distinguished by a program prefix.
Note the application: mips-sde-elf-run - that is a MIPS simulator for standalone programs built for the "sim" target.
Your source reference materials are here:
mszick@deb2core:~$ ls /opt/mips-4.3-221-mips-sde-elf binutils-4.3-221.tar.bz2 gmp-4.3-221.tar.bz2 mips_toolchain_manual-4.3-221.tar.bz2 coreutils-4.3-221.tar.bz2 gnu-4.3-221-mips-sde-elf.txt mpfr-4.3-221.tar.bz2 expat-4.3-221.tar.bz2 libiconv-4.3-221.tar.bz2 newlib-4.3-221.tar.bz2 gcc-4.3-221.tar.bz2 make-4.3-221.tar.bz2 zlib-4.3-221.tar.bz2 gdb-4.3-221.tar.bz2 mips-4.3-221-mips-sde-elf.sh
Of course, you also downloaded the source bundle file catalog; didn't you?
Just in case your looking for a specific file in all of those archives.
Now that you have the downloads unpacked into a system protected location, all that remains is to make them available to your user name(s).
For the bash shell; Using your favorite text editor, open your ~/.bashrc file.
Add the location to the front of your path:
# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # C.S. cross-toolchains (both compilers) export PATH=/opt/mips-4.3/bin:$PATH
Save, exit the editor, exit this terminal session, start a new terminal session (which will now have the updated PATH variable) - - -
Using the tool chains is just a matter of calling the tools by their pre-fixed names, try:
mszick@deb2core:~$ mips-linux-gnu-gcc -v --help mszick@deb2core:~$ mips-sde-elf-gcc -v --help
In review:
- Download the archive
- Unpack the archive
- Add the path to the resulting */bin directory to the front of your path.
To un-install:
- Remove the change to your path
- Remove the directory created by un-packing the archive
Find and bookmark the "Getting Started" guide in html that is part of the install bundle.
For the above installation location (/opt), the URI is:
file:///opt/mips-4.3/share/doc/mips-mips-sde-elf/html/getting-started/index.html
Contributors to this page: mikez
and
admin
.
Page last modified on Monday 13 of December, 2010 15:04:34 CST by mikez.
