Changes

Jump to: navigation, search

DESK-MX-L-AN-0006: Debugging with Eclipse

2,777 bytes added, 16:04, 31 March 2016
no edit summary
The following example shows how to build and debug classical "Hello, world!" example when working with [[SBC_Lynx_Embedded_Linux_Kit_(XUELK)|SBC Lynx Embedded Linux Kit (XUELK)]].
 
This section first shows how to create an Eclipse-based project. The second part illustrates how to start a debugging session for a simple "Hello world" application.
 
For more details about Eclipse Kepler please refer to [[http://help.eclipse.org/kepler/index.jsp?topic=/]]
 
==== Creating the project ====
 
You can create two types of projects: Autotools-based or Makefile-based. This section describes the first method with Eclipse IDE. To create a project based on Yocto template, follow these steps:
 
 
* Select "Project" from the "File -> New" menu.
 
 
[[File:Generic-vm-1280-eclipse4.png|800px]]
 
 
* Expand "C/C++" and select "C Project". Click "Next"
 
 
[[File:Generic-vm-1280-eclipse5.png|800px]]
 
 
* Expand "Yocto Project ADT Project" and select "Hello World ANSI C Autotools Project". Add "Project name". Click "Next" and "Finish".
 
[[File:Generic-vm-1280-eclipse6.png|800px]]
 
 
* If the "open perspective" prompt appears, click "Yes" so that you in the C/C++ perspective.
* Click on "C/C++" button on up left bar to view source files.
 
 
[[File:Generic-vm-1280-eclipse7.png|800px]]
 
[[File:Generic-vm-1280-eclipse8.png|800px]]
 
 
* To build the project select "Build Project" from the "Project" menu.
 
 
[[File:Generic-vm-1280-eclipse9.png|800px]]
 
[[File:Generic-vm-1280-eclipse10.png|800px]]
 
 
==== Debugging the project ====
 
This section lists the steps required to start a debugging session for the applications. Before debugging remember to compile and install yours updated binaries/libraries.
 
* Select "Debug Configurations" from the "Run" menu.
 
 
[[File:Generic-vm-1280-eclipse-debug1.png|800px]]
 
 
* Expand "C/C++ Remote Application" and select "helloworld_gdb_arm-poky-linux-gnueabii".
 
 
[[File:Generic-vm-1280-eclipse-debug2.png|800px]]
 
 
* Click "New" in "Connection" and select "SSH Only". Click "Next".
 
 
[[File:Generic-vm-1280-eclipse-debug3.png|800px]]
 
 
* Insert IP a ddress of the target board in the "Host name field". Click "Next" then "Finish".
 
* Add binary tree under test in "C/C++ Application" field and remote tree in "Remote Absolute File Path for C/C++ Application" field.
 
* Click "Select other" link near "Using Legacy Remote Create Process Launcher" and select "GDB (DSF) Automatic Remote Debugging Launcher".
 
 
[[File:Generic-vm-1280-eclipse-debug4.png|800px]]
 
[[File:Generic-vm-1280-eclipse-debug5.png|800px]]
 
 
* Select "Debugger" tab and change debugger settings. Click "Debug".
 
 
[[File:Generic-vm-1280-eclipse-debug6.png|800px]]
 
 
* Add root name and password in "Enter Password" dialog box.
 
 
[[File:Generic-vm-1280-eclipse-debug7.png|800px]]
 
 
* If the "Warning" prompt appears, click "Yes" so that you can confirm ssh authenticity.
 
* If the "open perspective" prompt appears, click "Yes" so that you in the Debug perspective.
----
{{notelist}}
a000298_approval, a000298_user, a000298_user_rw
25
edits

Navigation menu