Difference between revisions of "IoTGateway/BSP/Linux/iMX6/Eclipse Plug-in"
(→Deploying and Debugging the Application) |
|||
Line 141: | Line 141: | ||
# The debug perspective shows up. | # The debug perspective shows up. | ||
#:[[File:2015-01-28_144541.png]] | #:[[File:2015-01-28_144541.png]] | ||
+ | <br> | ||
=References= | =References= | ||
− | |||
#[http://old-releases.ubuntu.com/releases/precise/|Ubuntu 12.04 LTS (Precise Pangolin)] | #[http://old-releases.ubuntu.com/releases/precise/|Ubuntu 12.04 LTS (Precise Pangolin)] | ||
#[http://www.oracle.com/technetwork/java/archive-139210.html|Oracle Java Archive] - [http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html|Java SE 6] | #[http://www.oracle.com/technetwork/java/archive-139210.html|Oracle Java Archive] - [http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html|Java SE 6] | ||
#[https://www.yoctoproject.org/docs/1.5.3/dev-manual/dev-manual.html|Yocto Project Development Manual] | #[https://www.yoctoproject.org/docs/1.5.3/dev-manual/dev-manual.html|Yocto Project Development Manual] | ||
#[https://eclipse.org/downloads/packages/release/Kepler/R|Eclipse Kepler R Packages] | #[https://eclipse.org/downloads/packages/release/Kepler/R|Eclipse Kepler R Packages] |
Revision as of 08:20, 10 March 2016
Yocto User Guide - Eclipse Plug-in for iMX6 series
Prerequisites
Installing cross toolchain
Please use bitbake command to build one toolchain installer or get a pre-built one.
Qt4 SDK
Please perform following command to make toolchain installer.
$ bitbake fsl-image-x11 -c populate-sdk
Please change working directory to where installer located and perform the following command.
$ sudo ./poky-eglibc-x86_64-fsl-image-x11-cortexa9hf-vfp-neon-toolchain-qt4-1.5.3.sh
Qt5 SDK
Please perform following command to make toolchain installer.
$ bitbake fsl-image-x11-qt5 -c populate-sdk
Please change working directory to where installer located and perform the following command.
$ sudo ./poky-eglibc-x86_64-fsl-image-x11-qt5-cortexa9hf-vfp-neon-toolchain-1.5.3.sh
Working with Eclipse
Installing the Eclipse IDE
Please download "eclipse-standard-kepler-R-linux-gtk-x86_64.tar.gz" manually, put it to directory ~/FILES/ and perform the following commands:
$ cd ~/ $ tar xvf ~/FILES/eclipse-standard-kepler-R-linux-gtk-x86_64.tar.gz
Starting the Eclipse IDE
$ source /opt/poky/1.5.3/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi $ ~/eclipse/eclipse
- select your workspace location
- Make sure you are in your Workbench and select "Install New Software" from the "Help" pull-down menu.
- Select "Kepler - http://download.eclipse.org/releases/kepler" from the "Work with:" pull-down menu.
- Expand the box next to "Linux Tools" and select the LTTng - Linux Tracing Toolkit boxes.
- Expand the box next to "Mobile and Device Development" and select the following boxes:
- Expand the box next to "Programming Languages" and select the following boxes:
- Complete the installation and restart the Eclipse IDE.
Installing the Pre-built Plug-in
- Start up the Eclipse IDE.
- In Eclipse, select "Install New Software" from the "Help" menu.
- Click "Add..." in the "Work with:" area.
- Enter "http://downloads.yoctoproject.org/releases/eclipse-plugin/1.5.4/kepler" in the URL field and provide a meaningful name in the "Name" field.
- Click "OK" to have the entry added to the "Work with:" drop-down list.
- Check the boxes next to following items:
- Complete the remaining software installation steps and then restart the Eclipse IDE to finish the installation of the plug-in.
- Click OK to continue when following dialog shows up.
Configuring the Cross-Compiler Options
- Choose "Preferences" from the "Windows" menu to display the Preferences dialog.
- Click "Yocto Project ADT"
- Specify corret "Toolchain Root Location" & "Sysroot Location".
Creating the Project
- Select "Project" from the "File -> New" menu.
- Expand "C/C++".
- Double click "C Project" to create the project.
- Expand "Yocto Project ADT Autotools Project".
- Select "Hello World ANSI C Autotools Project".
- Put a name in the "Project name:" field. Do not use hyphens as part of the name.
- Click "Next".
- Add information in the Author and Copyright notice fields.
- Be sure the License field is correct.
- Click "Finish".
- If the "open perspective" prompt appears, click "Yes" to open the C/C++ perspective.
- The left-hand navigation pane shows your project. You can display your source by double clicking the project's source file.
Building the Project
Select "Build Project" from the "Project" menu. The console should update and you can note the cross-compiler you are using.
You can also use command, file, to verify the program, helloworld, just compiled in Ubuntu 12.04.
Deploying and Running the Application
- Select "Run Configurations..." from the "Run" menu.
- In the left area, expand "C/C++Remote Application".
- Locate your project and select it to bring up a new tabbed view in the Run Configurations Dialog.
- Create a new connection to the target instance by clicking on "New...".
- Select TCF, and click "Next>".
- Clear out the "host name" field and enter the IP Address of target board.
- Click "Finish" to close the New Connection Dialog.
- Choose correct connection earlier created
- Enter the absolute path into which you want to deploy the application. Use the "Remote Absolute File Path for C/C++Application:" field.
- Click "Run" to bring up a login screen and login.
Deploying and Debugging the Application
- Select "Debug Configurations..." from the "Run" menu.
- In the left area, expand "C/C++Remote Application".
- Locate your project and select it to bring up a new tabbed view in the Debug Configurations Dialog.
- Choose correct connection and enter the absolute path into which you want to deploy the application.
- Click on the "Debugger" tab to see the cross-tool debugger you are using.
- Click "Browse..." to choose GDB debugger.
- Choose "arm-poky-linux-gnueabi-gdb" located in "/opt/poky/1.5.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi".
- Click "OK
- Click "Debug".
- Login if login screen brings up.
- Accept the debug perspective.
- The debug perspective shows up.