I believe that many users who want to get started with Linux have a headache in the Linux development environment. They used to compile commands, such as compiling main. c use the command arm-Linux-gcc-O main. c. it is inconvenient to use. Now we have the eclipse integrated development environment to make development easier.
First, make sure that eclipse is correctly installed on the computer, as well as ARM Linux GCC. I have installed eclipse on Ubuntu 12.04 and ARM Linux GCC. There are many installation methods on the Internet, there are a lot of things in csdn. You can learn a lot by trying to install it yourself.
1. First establish a PC project,
2. Select the project type and tool chain. Select the C Project, executable file, and empty project and use the Linux GCC tool chain.
3. Create a. c file after the project is created
4. Enter a simple test program.
5. Click Save and compile (shortcut: Ctrl + B)
6. There is no error after compilation is completed. You can run it.
7. The final output result can also be debugged using Debug. The method is very simple and will not be used here as an example.
Create an ARM Linux project,
1. Ensure that the GCC installation in ARM Linux is correct and environment variables have been set.
Enter arm-Linux-gcc-V in the terminal. If you can output the relevant information correctly, you can perform subsequent operations. Otherwise, please refer to the online materials for configuration.
2. Create a C Project
3. Select an executable file. It is also important to select a tool chain.
Select cross GCC. You need to set the ARM Linux GCC tool chain later.
4. This step is very important. Set the arm-Linux-GCC tool chain. The above one sets the compiler prefix arm-Linux-
The following is the path for setting the compiler path, that is, the path of tools such as arm-Linux-GCC, which can be changed according to your actual situation.
5. Create a. c file after the same project is created
6. Enter simple code and you can see the system header file directory of arm-Linux in the include on the left.
7. finally, save the compilation and download to the Development Board for running. Note that this cannot be directly debugged. Later, we will teach you how to use eclipse to develop an embedded Linux driver. It is very nice and the integrated development environment is very convenient, the most convenient method is to use eclipse + GDB for remote debugging. We look forward to the future...