To download and use arm Cross compile tool chain general problem solving

Source: Internet
Author: User

acquisition of cross-compilation tool chain

1.1. In ftp.gnu.org get the GCC tool chain related source code, compile a cross compilation tool chain

1.2. Configure using the Crosstool-ng tool (crosstool-ng menuconfig configuration)

1.3. Download the corresponding version of the cross-compilation tool chain at the open source Cross tool chain site and use it after the configuration is uncompressed


Second, the Cross compilation tool chain commonly used to obtain the site

2.1.GNU website

Https://www.gnu.org/software/
GCC Tools: https://gcc.gnu.org/
GDB Tool: https://www.gnu.org/software/gdb/
glibc:https://www.gnu.org/software/libc/
Binutils Tool: https://www.gnu.org/software/binutils/


2.2crosstool-ng Tools

2.2.1. Download the crosstool-ng source code and compile the installation on the website http://crosstool-ng.org/

2.2.2 Run Ct-ng menuconfig, the Configuration menu appears, where you can select the target that corresponds to the processor model, and the supported kernel version number.

2.3. The third party compiles the good Cross compilation tool chain

http://www.linaro.org/downloads/
http://releases.linaro.org/components/toolchain/binaries/


https://www.mentor.com/
https://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/

http://www.veryarm.com/arm-none-linux-gnueabi-gcc


Installation of uncompressed version (Installation environment Ubuntu)

3.1 Download decompression version

Download site: HTTP://WWW.VERYARM.COM/ARM-NONE-LINUX-GNUEABI-GCC

3.2 Enter some commands in bash

3.2.1 Create a folder

Mkdir/usr/local/arm

3.2.2 Unzip the downloaded files to the created directory

sudo tar-xvf arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2-c/usr/local/arm/

3.2.3 Create a soft link for a tool

(1) Access to the tool directory

Cd/usr/local/arm/arm-2014.05/bin

(2) To create soft links for commonly used tools

Ln-s ARM-NONE-LINUX-GNUEABI-GCC ARM-LINUX-GCC
Ln-s arm-none-linux-gnueabi-g++ arm-linux-g++
Ln-s Arm-none-linux-gnueabi-gdb Arm-linux-gdb
Ln-s Arm-none-linux-gnueabi-ld Arm-linux-ld
Ln-s arm-none-linux-gnueabi-objcopy arm-linux-objcopy
Ln-s Arm-none-linux-gnueabi-objdump Arm-linux-objdump
Ln-s arm-none-linux-gnueabi-readelf


3.2.4. Configuring the Usage Environment

Using the user's bash environment configuration, add after the. BASHRC in the user's home directory.

Export path= $PATH:/usr/local/arm/arm-2014.05/bin

3.2.5. Restart the bash terminal or reload the configuration file

source. BASHRC

3.2.6. Test is configured

Arm-linux-gcc–v


For x64-bit machines:

When used for the first time, Arm-linux-gcc–v will be prompted not to find the corresponding file or directory;

This is because of the lack of some 32-bit libraries that need to be supported;

sudo apt-get install Ia32-libs

There will be some hints like the following

Reading Package Lists ... Done
Building Dependency Tree
Reading state information ... Done
Package Ia32-libs is not available, but are referred to by another Package.
This could mean that the package is missing, has been obsoleted, or
is only available from another source
However The following packages replace it:
LIB32Z1 lib32ncurses5 lib32bz2-1.0
E:package ' Ia32-libs ' has no installation candidate

According to the above prompts, execute sequentially:
sudo apt-get install ia32z1
sudo apt-get install lib32ncurses5
sudo apt-get install lib32bz2-1.0

Note: If a library is to be replaced please view it carefully and handle it cautiously, or it may cause some tools to be unusable


-If there is a problem with this blog post, please do not hesitate to enlighten us ^_^


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.