Embedded Linux Tour--Installation of cross-compiling tools for environment building

Source: Internet
Author: User

We also need to install a cross-compilation tool before we can formally begin to write the bare-metal program. What is a cross-compilation tool? It is actually compiling the program on the x86 Ubuntu host and can run the build tool in the ARM environment. GCC is the local compilation tool, which has been installed at the beginning of this article. Now we need to install the cross-compiler tool ARM-LINUX-GCC. I am now directly using the factory-made tools, just unzip and add to the environment variables can:

  sudo tar xzf arm-linux-gcc-4.3.2.tgz-c/

Then modify "/etc/environment" to add the path to the bin file of the cross-compilation tool in Path:

  Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/arm/ 4.3.2/bin "

After logging off or restarting, the environment variable takes effect and can be tested using the following command:

  Arm-linux-gcc-v

If you have the following information output, the installation is successful:

Using built-inchspecs. Target:arm-none-linux-gnueabiconfigured with:/scratch/julian/lite-respin/linux/src/gcc-4.3/configure--build=i686-pc-linux-gnu--host=i686-pc-linux-gnu--target=arm-none-linux-gnueabi--enable-threads-- Disable-libmudflap--DISABLE-LIBSSP--disable-libstdcxx-pch--with-gnu- as--with-gnu-ld--enable-languages=c,c++--enable-shared--enable-symvers=gnu--enable-__cxa_atexit--with-pkgversion ='sourcery g++ Lite 2008q3-72'--with-bugurl=https://support.codesourcery.com/gnutoolchain/--disable-nls--prefix=/opt/codesourcery--with-sysroot=/opt/ CODESOURCERY/ARM-NONE-LINUX-GNUEABI/LIBC--with-build-sysroot=/scratch/julian/lite-respin/linux/install/ ARM-NONE-LINUX-GNUEABI/LIBC--with-gmp=/scratch/julian/lite-respin/linux/obj/ HOST-LIBS-2008Q3-72-ARM-NONE-LINUX-GNUEABI-I686-PC-LINUX-GNU/USR--with-mpfr=/scratch/julian/lite-respin/linux/ OBJ/HOST-LIBS-2008Q3-72-ARM-NONE-LINUX-GNUEABI-I686-PC-LINUX-GNU/USR--disable-libgomp-- Enable-poison-system-directories--with-build-time-tools=/scratch/julian/lite-respin/linux/install/ Arm-none-linux-gnueabi/bin--with-build-time-tools=/scratch/julian/lite-respin/linux/install/ Arm-none-linux-gnueabi/binThread MODEL:POSIXGCC Version4.3.2(Sourcery g++ Lite 2008q3- the)

The following is the beginning of the bare-metal program, and the first section prepares to introduce Gpio.

Embedded Linux Tour--Installation of cross-compiling tools for environment building

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.