Create a cross-compiling environment for uClinux-[Blackfin]

Source: Internet
Author: User

Address: http://www.analogcn.com/Article/wz3/201003/20100325000101.html

My note: I installed the cross-compilation environment in Ubuntu 11.10. 2012.4.1


Perform the following operations In Debian 4:

(1) download the GNU toolchain from the Blackfin uClinux Website:

Address: http://blackfin.uclinux.org/gf/project/toolchain/frs/


There are two types of tool chains for Blackfin processors:

A.
When no operating system is compiled, the program "bare metal" is equivalent to the integrated development environment ide of ordinary single-chip microcomputer.bfin-elf-xxxThe package file ending with tar.bz2.

B. LinuxThe compilation tool chain in the system. Generally, You need to select this for uClinux. Here there are two main packages:

GccToolchain is a cross compiler for Blackfin.

uClibcDatabase-a database that can be set to C for Blackfin. There are two types of full and normal. The full version fully supports more functions, but the corresponding volume is large. In normal version, some rarely used functions are disabled, and the size is small. You can choose one of them based on your own hardware and software resources,NoInstall it at the same time.

I downloaded Blackfin-toolchain-uclibc-full.

To debug and download programs for the target board. You need to download the JTAG tool chain. The author downloadsBlackfin-jtag-tools-08r1.5-14.i386.tar.bz2This package.

(2) install the gun toolchain package.

A. Use the su command to switch to the root permission.

Su Root

B. Copy the four downloaded files to the root directory.

CP Blackfin-toolchain -*/

When I write this document, the version of the downloaded file is described as follows:

Blackfin-toolchain-elf-gcc-4.1-08r1.5-14.i386.tar.bz2

Provides compilation support for programs without Operating Systems

Blackfin-toolchain-08r1.5-14.i386.tar.bz2

GCC cross compiler for Blackfin

Blackfin-toolchain-uclibc-full-08r1.5-14.i386.tar.bz2

Link Library for Blackfin uclibc

Blackfin-jtag-tools-08r1.5-14.i386.tar.bz2

JTAG debugging tool chain

C. Run the tar command to decompress the installation file. The extracted file is copied to the uClinux folder in the/OPT directory.

Tar-vxjf blackfin-toolchain-elf-gcc-4.1-08r1.5-14.i386.tar.bz2

Tar-vxjf blackfin-toolchain-08r1.5-14.i386.tar.bz2

Tar-vxjf blackfin-toolchain-uclibc-full-08r1.5-14.i386.tar.bz2

Tar-vxf blackfin-jtag-tools-08r1.5-14.i386.tar.bz2

The latest is:

Blackfin-toolchain-elf-gcc-4.3-2011R1-RC4.i386.tar.bz2 I'm not installing this,

Blackfin-toolchain-2011R1-RC4.i386.tar.bz2

Blackfin-toolchain-uclibc-default-2011R1-RC4.i386.tar.bz2


(3) set Environment Variables

A. Use Vim to open the bash setting file bashrc

Vim ~ /. Bashrc

Press I to enter the editing mode,

B. Add the following lines at the end of the document.

Export Path = $ path:/opt/uClinux/bfin-uClinux/bin:/opt/uClinux/bfin-Linux-uclibc/bin

After modification, Press ESC to release the editing mode. And press: WQ to save and exit the normal mode.

Check whether the cross-compilation environment is successfully installed?

Once you have edited your path, you should check it:

$ 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

Reference Source: http://docs.blackfin.uclinux.org/doku.php? Id = toolchain: Installing

(4) download the U-boot source code


(5) download the source code of uClinux

The latest is blackfin-linux-dist-2011R1-RC3.tar.bz2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.