Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
en:general_information:eclipse [2014/10/22 13:16] – liedmann | en:general_information:eclipse [2019/09/23 11:14] – revised proper usage of the "Arm" trademark lenz | ||
---|---|---|---|
Line 8: | Line 8: | ||
* Eclipse Indigo | * Eclipse Indigo | ||
* CDT 8.0 | * CDT 8.0 | ||
- | * TQMa28 with i.MX28 (ARM9) | + | * TQMa28 with i.MX28 (1 x Arm926EJ-S< |
- | * TQMa35 with i.MX35 (ARM11) | + | * TQMa35 with i.MX35 (1 x Arm1136JF-S< |
* LTIB 9.1.1 | * LTIB 9.1.1 | ||
* ELDK 4.2 | * ELDK 4.2 | ||
Line 21: | Line 21: | ||
http:// | http:// | ||
+ | If you follow on this page the link to the desired Eclipse package (Eclipse CDT 8.0 for Indigo), there is a download link for the different architectures in the right column. | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | **Eclipse IDE for C/C++ Linux Developers (includes Incubating components)** | ||
+ | |||
+ | The executable Eclipse is in the extracted folder. No plugins have to be installed. Sometimes it may happen, however, that a Java runtime environment is required to execute Eclipse. This is installed with the following command: | ||
+ | |||
+ | <code bash> | ||
+ | user@ubuntu: | ||
+ | </ | ||
+ | |||
+ | ==== Installation using apt-get ==== | ||
+ | The Eclipse platform is installed with apt-get: | ||
+ | |||
+ | <code bash> | ||
+ | user@ubuntu: | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP round important> | ||
+ | Ubuntu 10.04 supplies the very old Eclipse Galileo. It is recommended to dirctly download a newer packet. See [[Eclipse# | ||
+ | </ | ||
+ | |||
+ | <WRAP round tip> | ||
+ | The package Eclipse-platform only contains the platform and no language-specific plugins. These must be installed separately using the plugin manager. An existing installation of Eclipse can be used as well. | ||
+ | </ | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | **Workspace**: | ||
+ | |||
+ | **Environment**: | ||
+ | <WRAP round important> | ||
+ | Starting Eclipse by double clicking in the file explorer does not take on the environment variables of the shell. | ||
+ | </ | ||
+ | |||
+ | The first way to use Eclipse with the environment variables is to start Eclipse from the console. | ||
+ | |||
+ | Another option is to write the relevant environment variables to a file, e.g., | ||
+ | <code bash> | ||
+ | user@ubuntu: | ||
+ | export CROSS_COMPILE=arm-linux-' | ||
+ | </ | ||
+ | |||
+ | and then to write a shell script that first sets the environment variables and then starts Eclipse: | ||
+ | |||
+ | <code bash> | ||
+ | echo '# | ||
+ | source ~/ | ||
+ | cd ~/Eclipse | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | By right click and '' | ||
+ | |||
+ | {{: | ||
+ | ===== Creating a new cross compiler project ===== | ||
+ | * Menu '' | ||
+ | * Type in the name of the project and select with the '' | ||
+ | * Select the path to the Cross Compiler via '' | ||
+ | < | ||
+ | (e.g.: | ||
+ | Prefix: arm-none-linux-gnueabi- | ||
+ | Path: / | ||
+ | </ | ||
+ | * Press '' | ||
+ | |||
+ | ===== Creating a project from existing sources ===== | ||
+ | Requirements: | ||
+ | * Source code exists | ||
+ | * Makefile exists | ||
+ | * Project can be built manually at the console | ||
+ | |||
+ | |||
+ | |||
+ | - Start Eclipse: '' | ||
+ | - Create a new project: in menu with '' | ||
+ | - Assign a project name in the wizard (e.g. Hello World) and remove the checkmark at '' | ||
+ | - Select '' | ||
+ | - Close the wizard with '' | ||
+ | |||
+ | |||
+ | - The project with existing source files should now show up on the left of the Project Explorer. Now the automatic makefile has to be disabled in the project properties. | ||
+ | - Right click on the project name and select '' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Build the project with a click on the hammer. | ||
+ | - The binary with the additional information about the architecture, | ||
+ | {{: | ||
+ | |||
+ | <WRAP round info> | ||
+ | The wrong compiler was chosen if the host architecture (e.g. x86) is stated instead of " | ||
+ | |||
+ | [[en: | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Cross compiling with Eclipse ===== | ||
+ | In Eclipse a project can be compiled for a different platform. Therefore a call of the target-specific compiler is required. Using the C compiler that comes with the package LTIB, the necessary settings in Eclipse are illustrated here. For this example, this is GCC 4.3.3. | ||
+ | |||
+ | \\ 1. Note the path to the compiler: | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | \\ 2. Open properties of an Eclipse project (right click on the project in Project Explorer -> Properties) and note the configuration shown above. | ||
+ | \\ 3. Click on '' | ||
+ | \\ 4. Change the command '' | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | \\ 5. Now the include directory of the target Linux has to be given to Eclipse to compile. For this purpose expand '' | ||
+ | \\ 6. Add ''/ | ||
+ | \\ 7. Repeat step 4 for the '' | ||
+ | \\ 8. Click on Libraries under the '' | ||
+ | \\ 9. Add the directories ''/ | ||
+ | \\ 10. Repeat step 4 for the '' | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | \\ 11. Open the tab '' | ||
+ | \\ 12. Change its '' | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | \\ 13. Change its '' | ||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | \\ 14. Apply changes with Apply and OK. | ||
+ | |||
+ | Now the project for the target hardware is built in the chosen configuration. To copy the created binary to the RootFS the following has to be done: | ||
+ | In the project properties click on '' | ||
+ | < | ||
+ | cp /< | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP round info> | ||
+ | Copying directly into LTIB RootFS only works if the user rights of Eclipse permit to write to that location. The rights of the target directory must be set accordingly before, if necessary. | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Demo project ===== | ||
+ | |||
+ | [[: | ||
+ | |||
+ | A "Hello World" demo project was created. With a correctly installed and configured ELDK this project should compile with Eclipse and CDT. | ||
+ | To import the project simply select '' | ||
+ | {{ : | ||
+ | In the next form select the downloaded ZIP archive and complete the import with " | ||
+ | {{ : | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <WRAP round tip> | ||
+ | Should there be problems when compiling, you can first run the build process on the console with a direct call of '' | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Debugging ===== | ||
+ | * [[en: | ||
+ | * [[en: | ||
+ | |||
+ | ===== Sources ===== | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// |