VAR-SOM-AM33 Linux SDK 7 Basic debug with Eclipse: Difference between revisions

From Variscite Wiki
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{PageHeader|Eclipse}}
{{PageHeader|Application debugging with Eclipse}}


__toc__
__toc__


= Introduction =
= Introduction =
This wiki will explain how to use eclipse to develop simple application for Variscite VAR-SOM-AM33.
This wiki page explains how to use Eclipse to develop simple application on Variscite's VAR-SOM-AM33.


= Download and install =
= Download and install =
Line 12: Line 12:
[http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz]
[http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz]
<pre>$&nbsp;cd ~/
<pre>$&nbsp;cd ~/
$&nbsp;tar xvf ../Downloads/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz
$&nbsp;tar xvf ~/Downloads/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz
</pre>
</pre>
Run Eclipse:
* Install OpenJDK Java 7 runtime using Ubuntu software center
* Run Eclipse:
<pre>$&nbsp;eclipse/eclipse &
<pre>$&nbsp;eclipse/eclipse &
</pre>
</pre>
Line 36: Line 37:
{{note|Comment:<br/>Some of the packages may be already installed.|info}} An install window example:<br/> [[File:Eclipse install add.jpg]] <br/>
{{note|Comment:<br/>Some of the packages may be already installed.|info}} An install window example:<br/> [[File:Eclipse install add.jpg]] <br/>


 
= Change target's password  =
= Change target password  =


<pre>$ passwd
<pre>$ passwd
Line 48: Line 48:
<br/>Just click next for the default:<br/> [[File:Am33_create3.jpg]]<br/>
<br/>Just click next for the default:<br/> [[File:Am33_create3.jpg]]<br/>
<br/>Set the tools path and prefix. Browse to the actual SDK location:
<br/>Set the tools path and prefix. Browse to the actual SDK location:
.../ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin
<br/>.../ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin
arm-linux-gnueabihf-
<br/>arm-linux-gnueabihf-
<br/> [[File:Am33_create4.png]]<br/>
<br/> [[File:Am33_create4.png]]<br/>
<br/>Expand the Hello project select the Console tab and hit ctrl b :<br/> [[File:Am33_create5.png]]<br/>
<br/>Expand the Hello project select the Console tab and hit ctrl b :<br/> [[File:Am33_create5.png]]<br/>

Latest revision as of 23:01, 21 June 2014

Application debugging with Eclipse

Introduction

This wiki page explains how to use Eclipse to develop simple application on Variscite's VAR-SOM-AM33.

Download and install

Download from:

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz

$ cd ~/
$ tar xvf ~/Downloads/eclipse-cpp-kepler-SR1-linux-gtk-x86_64.tar.gz
  • Install OpenJDK Java 7 runtime using Ubuntu software center
  • Run Eclipse:
$ eclipse/eclipse &

Set your workspace:
Eclipse ws.jpg
You can select any folder you like.
Close the "welcome window".
You should be at:
Eclipse main.jpg

Eclipse installations of additional packages

  1. Start the Eclipse IDE.
  2. Make sure you are in your Workbench and select "Install New Software" from the "Help" pull-down menu.
  3. Select Kepler - http://download.eclipse.org/releases/kepler from the "Work with:" pull-down menu.
  4. Expand the box next to "Linux Tools" and select the LTTng - Linux Tracing Toolkit boxes.
  5. Expand the box next to "Mobile and Device Development" and select the following boxes:
    1. C/C++ Remote Launch
    2. Remote System Explorer End-user Runtime
    3. Remote System Explorer User Actions
    4. Target Management Terminal
    5. TCF Remote System Explorer add-in
    6. TCF Target Explorer
  6. Expand the box next to "Programming Languages" and select the Autotools Support for CDT and C/C++ Development Tools boxes.
  7. Complete the installation and restart the Eclipse IDE.
Comment:
Some of the packages may be already installed.

An install window example:
Eclipse install add.jpg

Change target's password

$ passwd
use root as password type 3 times.

Create a simple project for VAR-SOM_AM33

Create a new project:
Am33 create1.png

Set basic information:
Am33 create2.png

Just click next for the default:
Am33 create3.jpg

Set the tools path and prefix. Browse to the actual SDK location:
.../ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin
arm-linux-gnueabihf-
Am33 create4.png

Expand the Hello project select the Console tab and hit ctrl b :
Am33 create5.png

Project is built and ready to be debugged.

Create communication link to VAR-SOM_AM33 taregt

Switch to Remote System Explorer tab:
Am33 remote1.jpg

Create a new connection select SSH only:
Am33 remote2.jpg

Set target IP and name:
Am33 remote3.png

Hit finish to create the remote connection. Right click on the new connection name and hit connect.
Enter user name and password. Use root/root for both:
Am33 remote4.jpg
Hit OK. You should be able to browse target file system via the connection manager.

Debug the project on VAR-SOM_AM33 target


Switch back to the c/c++ view. Click on the Hello project from the left tab. Run->Debug configuration. Double click o the C/C++ Remote Application:
Am33 remote5.jpg
Fill the Remote Absolute File path
Switch to debugger tab and fill the gdb prefix:
Am33 remote7.jpg

Hit debug and you should be able to debug the file on target:
Am33 remote8.png