Eclipse contains interesting tools for remote debugging that are part of the Eclipse platform: CDT and DSDP. Because the embedded development parts of Eclipse are leading edge, you need to download the latest Eclipse distribution and packages for embedded development and debugging.
Unlike the other tools in this section, Eclipse isn’t a debugger it’s an entire IDE. In order to use just the debugging features, you must import your project into Eclipse and possibly restructure how the project builds. If you’re starting a new project and use Eclipse from the beginning, this isn’t a factor.
After it’s unpacked, the software is ready to run in the directory where it was unpacked. You can relocate this directory to your /opt or /usr/bin directory; but Eclipse runs just fine in any directory.
When you have Eclipse in the desired directory, run it. Then, do the following to install the Target Management and Device Debugging plug-ins that extend Eclipse functionality:
Eclipse is now updated with the correct plug-ins for remote C and C++ debugging. The first package installed is a tool that manages a remote target; you can use it to copy files to the target without resorting to going to the command line.
To start a remote debugging session, select Run Debug Configurations, and double-click the C and C++ Remote Application item to create a new empty Debug Configuration. This example assumes you’ve created a simple “hello” project in Eclipse earlier and are reusing that code. The program that’s being debugged is less important that the process of configuring Eclipse for remote debugging. You see a dialog that looks like Figure below.
Supply a name for the configuration (it can be anything). The next thing of interest is the connection: this is where you tell Eclipse how to communicate with the remote target when starting a debug session or downloading files. Click the New button to start the wizard. You’re asked the type of system, with Linux being an obvious choice. Don’t be tempted, because this configures Eclipse to communicate with an agent, dstore, that hasn’t been installed on most systems; instead, select Ssh Only, because most embedded systems have small versions of SSH installed.
The next panel asks you for the IP address or host name of the remote machine. In this example, the IP address is 192.168.10.21, but it will likely be different for you. The connection name defaults to the host name or IP address; the Description field is optional. The last two panels in the wizard define how Eclipse opens a shell on the target and transfers files.
Back at the Debug Configuration panel, fill in the name of the project containing the sample program. Next, click the Search Project button, and select the binary for your project. Make the remote path /tmp/remote the place to download the binary to the target machine. You must have write privileges for this directory or the download will fail.
The next step is to switch to the Debugger tab and select a debugger. The default value for this field is GDB, which is the debugger residing on the host system, not on the target. If you’re curious, there’s a drop-down for selecting the protocol where you can select Default, mi1, mi2, or mi3. This field means the version of the machine interface protocol that Eclipse should use when communicating with the debugger. You only need to set this if the debugger in use is older and must use one of the older protocols. For the most part, Default is an acceptable value.
Now, you’re ready to debug. Click the Apply button, and then Debug. A small dialog appears, asking for a user name and password for the remote host, to be used for transferring the file and opening the shell. The application file is downloaded, and the debugger starts. The debugging works the same as if you were debugging locally.
Linux Embedded systems Related Tutorials
Linux Embedded systems Related Interview Questions
|Linux Embedded systems Interview Questions||Red Hat Linux Essentials Interview Questions|
|Red Hat Linux System Administration Interview Questions||Ubuntu Certified Professional Interview Questions|
|IBM AIX Interview Questions||Solaris Interview Questions|
|HP-ux 11iv3 system administration Interview Questions||Red Hat cluster Interview Questions|
|Embedded C Interview Questions||Unix/Linux Interview Questions|
|Unix Shell Scripting Interview Questions||Solaris Administrator Interview Questions|
Linux Embedded systems Related Practice Tests
|Linux Embedded systems Practice Tests||Red Hat Linux Essentials Practice Tests|
|Red Hat Linux System Administration Practice Tests||Ubuntu Certified Professional Practice Tests|
|IBM AIX Practice Tests||Solaris Practice Tests|
|HP-ux 11iv3 system administration Practice Tests|
Linux Embedded Systems Tutorial
About Embedded Linux
Configuring The Software Environment
Target Emulation And Virtual Machines
Starting Your Project
Getting Linux For Your Board
Creating A Linux Distribution From Scratch
Booting The Board
Configuring The Application Development Environment
Kernel Configuration And Development
Using Open Source Software Projects
Handling Field Updates
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.