Ubuntu18.04 mounting arm-linux-gcc cross compiler tools (with arm-linux-gcc 5.4.0 Package)

Ubuntu18.04 mounting arm-linux-gcc cross compiler tools (with arm-linux-gcc 5.4.0 Package)

 

A download arm-linux-gcc 5.4.0 package

Download (Baidu cloud) link: https: //pan.baidu.com/s/1AeqzkboWkJDJjU9HxtXhrA extraction code: uzup 


Second, the new arm files in / usr / local directory folder, and give the highest authority to enter the new file directory

 
  1. root@nandycool-virtual-machine:/usr/local# mkdir arm

  2. root@nandycool-virtual-machine:/usr/local# chmod 777 arm

  3. root@nandycool-virtual-machine:/usr/local# cd arm


Third, the tool will be downloaded compressed copy of the package into a new file and extract

 
  1. root@nandycool-virtual-machine:/usr/local/arm# cp /mnt/hgfs/Ubuntu-tool/gcc-tool/arm-linux-gcc-5.4.0.tar.gz ./

  2. root@nandycool-virtual-machine:/usr/local/arm# ls

  3. arm-linux-gcc-5.4.0.tar.gz

  4. root@nandycool-virtual-machine:/usr/local/arm# tar xzvf arm-linux-gcc-5.4.0.tar.gz

Decompression process is as follows:

View complete decompression should have the following file


Fourth, find the configuration file / etc / profile, open the profile, add the following sentence at the end:

             export PATH = / usr / local / arm / 5.4.0 (folder version number) / bin: $ PATH


6.3.5 Operating profile files:

root@nandycool-virtual-machine:/usr/local/arm# source  /etc/profile

When such a problem occurs, please pay attention to check whether to delete the stuff in the profile file


Sixth, to view the path:

root@nandycool-virtual-machine:/usr/local/arm# echo $PATH

        If the path /usr/local/arm/5.4.0/bin: represents the successful installation


Seven, the last entered arm-linux-gcc -v view the version information, check whether the installation is complete if the following message appears, then the installation was successful.

root@nandycool-virtual-machine:/usr/local/arm# arm-linux-gcc -v

Version information and version numbers are as follows:


Finally, you can compile the corresponding source file, and the implementation of the

        Compile command: arm-linux-gcc -o hello hello.c (gcc compiler is used: gcc -o hello hello.c)

        Run the command: ./ hello

Guess you like

Origin blog.csdn.net/ll148305879/article/details/94445775