There are two toolchains, depending on what you are developing:
bfin-elf-xxxwhich uses the newlib and libgloss libraries.
The Blackfin toolchain is split up into a few different packages. You must select the proper components for a properly working toolchain. Older versions may not have included as many choices.
A typical install requires only two files.
Exactly which two files is an excerise left for the reader, as it depends on:
|Filename prefix|| Optional or|
| ||required|| GCC-4.3 of
| ||required|| GCC-4.5 of
| ||optional|| GCC-4.3 of
| ||optional|| GCC-4.5 of
Although which exact package you install depends on the functionality you require (default or extended functionality), you must only install just one per version (default or full, but not both) of GCC that installed.
|GCC version||Package name prefix||Description|
|GCC-4.3|| ||default set of configuration options|
|GCC-4.3|| ||extended set of configuration options (wchar/etc…)|
|GCC-4.5|| ||default set of configuration options|
|GCC-4.5|| ||extended set of configuration options (wchar/etc…)|
jtag tools (for developing with an In Circuit Emulator).
The Blackfin toolchain can be obtained from the Blackfin Linux website in the toolchain file release page. You just need to determine your architecture (what host you have), and what files you need.
Depending on the version of the toolchain there may be a variety of file types available. These file types are summarized below:
tar xjf filename.tar.bz2)
tar xzf filename.tar.gz)
Files that include .src. are the source packages that include all of the source code used to build the binary packages. Files that include .i386. or .x86_64. or similar architecture names are prebuilt binary packages for that specific architecture.
You may need some additional packages in order for everything to run smoothly. Please see the section about configuring Linux for more information.
There may also be a number of addons available (for other toolchain tuples like ''bfin-elf'' or for other gcc versions). You normally do not need to install these; they are merely provided in case you have some code which needs an older version of gcc to build. The
bfin-elf toolchain is only needed if you wish to compile code that will be running on bare-metal -- that is, no operating system at all like Linux.
The default install path for all of our toolchains is
/opt/uClinux/. This is not a requirement, just the default, so you can unpack the install files elsewhere if you like. Note however that the RPMs do not have the ability to change install paths, so those must be installed into
/opt/uClinux/ first before being moved.
A quick example for installing toolchain with the tar ball,take the 2012R2-RC2 of toolchain for example, usually we copy the following three files in the same folder and untar them one by one, the generated /opt/uClinux is what we want:
i) tar jxvf blackfin-toolchain-2012R2-RC2.i386.tar.bz2
ii) tar jxvf blackfin-toolchain-elf-gcc-4.3-2012R2-RC2.i386.tar.bz2
iii) tar jxvf blackfin-toolchain-uclibc-default-2012R2-RC2.i386.tar.bz2
Then set the path as described later in this page
There may be more detailed installation instructions in the Toolchain Release Notes.
/optmust be writable. Normally if
/optis on a local machine, just become
/optis network mounted, you will need to call your local IT support person. If this is not possible - you should install from the tarball.
For an RPM file, as root enter the following command:
# rpm -Uvh <filename> (e.g. rpm -Uvh blackfin-toolchain-2012R1-RC2.i386.rpm)
Do not do it. Use the provided pre-compiled tarballs (tar.gz or .tar.bz2). On the off chance that one does not exist …
Many distributions do not utilize RPM's so it may be a pain to try and install one. To get around this, we also provide binary tarballs which are equivalent to the binary RPM's.
These are created using the package rpm2targz. If your distribution does not include it, you can find it here.
Converting it is pretty easy:
$ rpm2targz <rpm> (e.g. rpm2targz blackfin-toolchain-2012R1-RC2.i386.rpm)
This should leave you with a tarball in the same directory named the same as the rpm, but with a '.tar.gz' instead of '.rpm' extension. Then just unpack the tarball and move the files wherever you like.
There are a few reasons not to use the prebuilt binary toolchain:
Normally these should not happen -- we attempt to ensure that there are no bugs, attempt to ensure the widest settings of uClibc (we normally provide two versions of uClibc), and build binaries for many architectures/OSes. If possible -- use the prebuilt binary toolchain. However, if the releases do not satisfy your needs, then you have no choice - either:
Detailed instructions on how to download and build the latest SVN toolchain can be found in the Toolchain Build Script section of the documentation. Or you can view the page on how to build the src rpm.
After installing the Blackfin toolchain the environment variable
PATH must be modified to include the directory where the Blackfin toolchain is installed. This can be done by entering the following command before using the Blackfin toolchain (assuming the Blackfin toolchain binaries are installed in the default location -
/opt/uClinux/bfin-linux-uclibc/bin. If you installed these somewhere else, you will need to modify these examples).
$ export PATH=$PATH:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin
Alternately, to have PATH set automatically edit the file
~/.bashrc to include the following lines:
Now when a new bash shell is started,
PATH will automatically be set to include the path to the Blackfin toolchain.
The Blackfin toolchain should now be installed allowing you to compile programs such as U‑Boot or the uClinux distribution. The default compiler is available under the name
bfin-uclinux-g++ for the C++ compiler). If you wish to execute a specific version, simply append it like
Once you have edited your path, you should check it with:
$ which -a bfin-linux-uclibc-gcc /home/rgetz/blackfin/trunk/gcc4-linux-uclibc/bin/bfin-linux-uclibc-gcc /home/rgetz/blackfin/release/gcc4-linux-uclibc/bin/bfin-linux-uclibc-gcc
Above, there are two toolchains in the path (which is normally bad), to determine which one will be used:
$ which bfin-linux-uclibc-gcc /home/rgetz/blackfin/trunk/gcc4-linux-uclibc/bin/bfin-linux-uclibc-gcc
If this is not the toolchain you want to use, you can edit your
$ echo $PATH :/home/rgetz/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin: /usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin:/usr/sbin:/usr/sbin:/home/rg etz/blackfin/trunk/gcc4-linux-uclibc/bin:/home/rgetz/blackfin/trunk/gcc4-uclinux/bin:/home/rgetz/blac kfin/trunk/gcc4-elf/bin:/home/rgetz/blackfin/release/gcc4-linux-uclibc/bin:/home/rgetz/blackfin/trunk /gcc4-uclinux/bin:/home/rgetz/blackfin/release/gcc4-elf/bin: $ export PATH=:/home/rgetz/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:\ /usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin:/usr/sbin:/usr/sbin:/home/rgetz/blackfin/trunk/gcc4-linux-uclibc/bin:\ /home/rgetz/blackfin/trunk/gcc4-uclinux/bin:/home/rgetz/blackfin/trunk/gcc4-elf/bin:
To remove a toolchain you don't want - depends on how you installed it.
rpmbased package managers - look for
aptbased package managers - look for
tar-ball- if you installed something from source, or by from a binary tar ball, just
rmthe directory in question.
The Blackfin toolchain can be obtained from the Blackfin Linux website in the toolchain file release page.
There is only one Windows toolchain package (installer) available:
Files that include .src. are the source packages that include all of the source code used to build the binary packages. The Windows GNU/Blackfin toolchain includes a complete toolchain for building bare metal applications (
bfin-elf-) and a complete toolchain for building Linux fdpic applications. If you are not sure what the difference is, have a look at the supported targets page.
The Windows installer will add the directory that you installed things into to your default PATH, so you can call the toolchain from any directory. All that is installed is command line callable toolchain - it does not include an IDE (integrated development environment, or graphical editor). It is up to you to either install one (have a peek at eclipse), or use your existing favorite if it allows third party compilers to be called.