Changes

Jump to: navigation, search

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

415 bytes added, 15:15, 25 August 2022
Eclipse integration in MVM
No specific operations are required to run Eclipse, as shown in the following example.
By default, cross-tool chain is installed in <code>/home/dvdk/<targetname>/sdk/latest</code>. <code><targetname></code> is the name of the actual hardware platform development environment (i.e. <code>lynxdesk-mx-l</code>, <code>axelulite</code> etc.).
=== Configuring the Cross-Toolchains ===
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse1Eclipse.png|800px1000px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse2Eclipse-launcher.png|800px1000px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse3Eclipse-IDE.png|800px1000px]]
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|800px1000px]]
* 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|800px1000px]]
===Example===
The following example shows how to build and debug classical "Hello, world!" example when working with [[AXEL_Lite_SOM/AXEL_Lite_Evaluation_Kit | AXEL ULite and SBC Lynx Embedded Linux Lite Evaluation Kit (XUELK)]]. As stated before, this example is valid for all of the Yocto-based MVMs. 
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 Luna please refer to [https://projects.eclipse.org/releases/luna this page]{{ImportantMessage|text=Even if Eclipse support has been [httphttps://helpdocs.eclipseyoctoproject.org/keplermigration-guides/indexmigration-2.7.jsphtml?topichighlight=/]eclipse removed from Yocot since Warrior release], the Eclipse Luna IDE has been installed and tested into DESK-MX6 MVM}}
==== Creating the project ====
[[File:GenericDESK-vmMX6-1280L_MVM-Eclipse-eclipse4.png|800px]]  * Expand "C/C++" and select "C Project". Click "Next"  [[File:Generic-vm-1280-eclipse5project.png|800px1000px]]
* Expand "Yocto Project ADT Autotools Project" and select "Hello World ANSI C Autotools Project". Add "Project name". Click "Next" and "Finish".
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse6Eclipse-C-Yocto-autotools.png|800px1000px]]
* 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|800px1000px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse8Eclipse-helloworld-sources.png|800px1000px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse9Eclipse-C-project-build.png|800px1000px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipse10Eclipse-C-project-build-console.png|800px1000px]]
==== 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|800px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug2C-project-debug-remote.png|800px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug3C-project-debug-remote-ssh.png|800px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug4C-project-debug-remote-gdb.png|800px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug5C-project-debug-remote-gdb-2.png|800px]]
[[File:GenericDESK-vmMX6-1280L_MVM-eclipseEclipse-debug6C-project-debug-remote-gdb-debugger.png|800px]]
8,186
edits

Navigation menu