Install the cross-compilation tool arm-Linux-gcc

Source: Internet
Author: User

 

Khan !!! This blog was written a few days ago, but there is an error, resulting in uboot compilation errors, only to find the original problem: Decompress the arm-linux-gcc-4.4.3.tgz, the file configuration error, what I saw in a book is configuring/etc/bash. bashrc file. This is incorrect. Configure the/etc/profile file..

 

Port to every one on the Development BoardCodeIt must be cross-compiled before it can be run in the Development Board environment.

Here I use arm-linux-gcc-4.4.3.tgz, of course, you can download other versions online, you can also set up. I remember building it before, right should be learned. If cross-compilation is used, we recommend that you download it.

The following describes how to build a cross-compilation environment:

Copy the arm-linux-gcc-4.4.3.tgz to the/home/directory, unzip: Tar xzvf arm-linux-gcc-4.4.3tgz, extract: friendlyarm/toolschain/4.4.3/, where bin/below you can see: Arm-Linux-GCC. Copy the friendlyarm directory to/opt /.

Now we have the required cross-compilation tool chain: Arm-Linux-GCC.

Finally, you need to: CD/etc/, and find a configuration file: Bash. bashrc. Open this file,

Add: Export Path = $ path:/opt/friendlyarm/toolschain/4.4.3/bin in the last line to specify the path. Restart the instance.

 

Test: 1. Enter "arm-Linux-gcc-V" in the terminal. The GCC version 4.4.3 is displayed, indicating that the tool chain for cross compilation has been installed.

2. Create a New. c file, compile it with arm-Linux-GCC, and generate the binary file.

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.