Changes

Jump to: navigation, search

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

1,341 bytes added, 10:29, 6 September 2022
Introduction
{{InfoBoxTop}}
{{AppliesToAXEL Lite AN}}
{{AppliesToAXEL ULite AN}}
{{InfoBoxBottom}}
 
==History==
 
{| class="wikitable" border="1"
!Page version
!Date
!BSP version
!Notes
|-
|{{oldid|7818|1.0.0}}
|April 2018
|[[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#XUELK_software_components | XUELK 2.0.1]]
|XUELK setup
|-
|2.0.0
|August 2022
|{{pageoldid|DESK-MX6-L|15794|DESK-MX6-L 1.0.0}}
|DESK-MX6-L version
|}
 
==Introduction==
Generally speaking, [[Managed_Virtual_Machine_(MVM)|Managed Virtual Machines]] including Yocto build system provide all the required stuff to remotely debug applications running on the target, via Eclipse/ADT. It is beyond the scope of this article to describe in detail how to use Eclipse{{efn|Please note that Eclipse is not just a debugger, it is a full-featured IDE that allows to manage and build complex projects with a powerful user-friendly graphical interface.}}. Instead, some MVM-related information are provided, in order to properly configure it the host to work with DAVE Embedded Systems products. Also, classical "Hello, world!" example is detailed. For more details about Eclipse Luna please refer to [https://projects.eclipse.org/releases/luna this page]
For more details about {{WarningMessage|text=Eclipse, please refer to these links:*httpsupport has been [https://wwwdocs.yoctoproject.org/docsmigration-guides/1migration-2.7.html?highlight=eclipse removed from Yocto since Warrior release].8/adtReleases greater than {{pageoldid|DESK-MX6-L|15794|DESK-manual/adtMX6-manualL 1.0.0 MVM}} have not been validated nor supported.html}} *https://www{{ImportantMessage|text=The following instructions and screenshots have been taken from DESK-MX6-L MVM.youtubeSelecting the proper cross-tool chain, the same instructions are valid also for {{pageoldid|DESK-MX6UL-L|14293|DESK-MX6UL-L 1.com/watch?v=O22IWe4kUE80.1 MVM}} }}
==Eclipse integration in MVM==
By defaultNo specific operations are required to run Eclipse, cross-tool chain is intalled as shown in /home/dvdk/targetname/sdk/latestthe following example.
targetBy default, cross-specific source tool chain is installed in <code paths:>/home/dvdk/<targetname>/sdk/latest</code>. <code><targetname></code> is the name of the actual development environment (i.e. <code>desk-mx-l</code>, etc.).
=== Configuring the Cross-Toolchains ===
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse1Eclipse.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse2Eclipse-launcher.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse3Eclipse-IDE.png|800px1280px]]
To configure the Cross Compiler Options, you must select the type of toolchain, point to the toolchain, specify the <code>sysroot </code> location, and select the target architecture.
* Select "Preferences" from the "Windows" menu.
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-toolchain1Preferences.png|800px1280px]]
* Select "Yocto Project ADT", add the cross-toolchain configuration and save the profile as your project name ("targetname" <code>desk-mx</code> in this case). Click "Apply" and "OK".
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-toolchain2Yocto-ADT.png|800px1280px]]
===Example===
The following example shows how to build and debug classical "Hello, world!" example when working with [[SBC_Lynx_Embedded_Linux_Kit_(XUELK)AXEL_Lite_SOM/AXEL_Lite_Evaluation_Kit |SBC Lynx Embedded Linux AXEL Lite Evaluation Kit (XUELK)]].  This section first shows how to create an EclipseAs stated before, this example is valid for all of the Yocto-based project. The second part illustrates how to start a debugging session for a simple "Hello world" applicationMVMs.
For more details about This section first shows how to create an Eclipse Kepler please refer -based project. The second part illustrates how to [[http://help.eclipse.org/kepler/indexstart a debugging session for a simple "Hello, world!" application.jsp?topic=/]]
==== Creating the project ====
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse4Eclipse-C-project.png|800px1280px]]  * Expand "C/C++" and select "C Project". Click "Next" 
[[File:Generic-vm-1280-eclipse5.png|800px]]
* Expand "Yocto Project ADT Autotools Project" and select "Hello World ANSI C Autotools Project". Add "Project name". Click "Next" and "Finish".
* Expand "Yocto Project ADT Project" and select "Hello World ANSI C Autotools Project". Add "Project name". Click "Next" and "Finish".
[[File:DESK-MX6-L_MVM-Eclipse-C-Yocto-autotools.png|1280px]]
[[File:Generic-vm-1280-eclipse6.png|800px]]
 * If the "open perspective" prompt appears, click "Yes" so that you are in the C/C++ perspective.
* Click on "C/C++" button on up left bar to view source files.
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse7Eclipse-C-C++-IDE.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse8Eclipse-helloworld-sources.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse9Eclipse-C-project-build.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse10Eclipse-C-project-build-console.png|800px1280px]]
==== 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 your updated binaries/libraries.
* Select "Debug Configurations" from the "Run" menu.
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug1C-project-debug-configurations.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug2C-project-debug-remote.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug3C-project-debug-remote-ssh.png|800px1280px]]
* Insert IP a ddress of the target board in the "Host name field". Click "Next" then "Finish".
* Add Insert the binary tree under test path for the remote device 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:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug4C-project-debug-remote-gdb.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug5C-project-debug-remote-gdb-2.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug6C-project-debug-remote-gdb-debugger.png|800px1280px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug7C-project-debug-remote-gdb-debug.png|800px1280px]]
* If the "Warning" prompt appears, click "Yes" so that you can confirm ssh authenticity.
 
[[File:DESK-MX6-L_MVM-Eclipse-C-project-debug-remote-gdb-ssh.png|1280px]]
* If the "open perspective" prompt appears, click "Yes" so that you in the Debug perspective.
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug8C-project-debug-remote-gdb-session.png|800px1280px]]
----
{{notelist}}
4,650
edits

Navigation menu