Find the cross-compilation tool package arm-linux-gcc-4.4.3.tar.gz in the tool directory of Wei Dongshan's "Linux Development and User Manual" CD. The installation steps are as follows:
1. Unzip the cross-compilation development toolkit
sudo tar xvzf arm-linux-gcc-4.4.3.tar.gz -C /
Unzip the toolchain to the root directory. You can specify any directory you want. The system will add the directory /opt/FriendlyARM/toolchain/4.4.3/
2. Modify the environment variables and add the path of the cross compiler to PATH
Use the method of modifying the /etc/bash.bashrc file (there are other methods)
①Open the file with vim:
#sudo vim /etc/bash.bashrc
②Create a new line at the end and add:
export PATH=$PATH:/opt/FriendlyARM/toolschain/4.4.3/bin
3. Make the new environment variables take effect immediately without restarting the computer:
#source /etc/bash.bashrc
{
This is another way to modify the environment variables above
① $sudo -i Enter your own password to enter super user privileges
② cd /root/
vim .bashrc
③ Add export PATH=$PATH:/opt/FriendlyARM/toolschain/4.4.3/bin (path) at the end (note that there should be no space around the equal sign)
④ source ~/.bashrc (takes effect immediately) (it seems to be only for this terminal, log out and the environment variable will always exist)
}
4. Check whether the path is added to PATH
#echo $PATH
If the displayed content contains the directory where the cross-compiler just added is located, it proves that the compilation environment has been installed successfully.
5. Test whether the installation is successful
Instruction: #arm-linux-gcc -v
The above command will display the arm-linux-gcc information and version, and the displayed content information is:
At this point, the installation is successful.
6. Compilation experiment
Write a HelloWorld program to test cross-tool connection
Write the following HelloWorld program and save it as hello.c
#include
int main()
{
printf("HelloWorld!n");
return0;
}
Execute the following command:
#arm-linux-gcc-o hello hello.c
If there is no error, it means the installation is successful.
Previous article:s3c2440 bare metal system clock and timer settings
Next article:2440 bare board program clock initialization
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- Differences between MSP430 programmer emulator and JTAG, SBW, and BSL interfaces
- Common embedded development systems
- BUCK circuit simulation and experiment
- Is there a dedicated chip for PWM output of I2C interface?
- Compact power management solution
- Welcome to the wonderful world of MicroPython
- [RVB2601 Creative Application Development] +01 Unboxing and First Experience
- Urgently looking for! Texas Instruments Ti official website accounts registered before 2020 require registration with corporate email!
- Registration for the prize live broadcast is open | TOF (Time of Flight) technology introduction and product application
- Zero-knowledge open source sharing-the use of ESP8266WIFI module