advertisement
phyCORE®-AM335x [PCM-051-xxx]
3.2.1 Starting the GDB Server on the Target
In this passage you will learn how to start the GDB server on the target. The GDB server will be used to start and control the myHelloWorld program.
To debug a program with GDB, the program needs extended debugging symbols. These have already been added while building the program.
Open Microcom.
Type root and press Enter.
Start the GDB server: gdbserver 192.168.3.11:10000 myHelloWorld
You have started the GDB server on the target. The GDB server is now waiting for connections on TCP port 10000.
3.2.2 Configuring and Starting the Debugger in Eclipse
In this passage you will learn how to configure your project settings to use Eclipse with the
GNU debugger. After the configuration of your project settings, the GNU debugger will start and connect to the GDB server on the target.
Start Eclipse if the application is not started yet.
Right-click on the myHelloWorld project in the Navigator window.
Select Debug As ► Debug Configurations.
A dialog to create, manage and run applications appears.
30 © PHYTEC Messtechnik GmbH 2016 L-779e_6
Working with Eclipse
Select myHelloWorld under C/C++ Application (to expand it double-click on it).
Make sure that the Standard Create Process Launcher is used (as shown in the bottom of the window, left from the Apply button). Otherwise click Select other… and select the above named launcher.
Select the Debugger tab.
© PHYTEC Messtechnik GmbH 2016 L-779e_6 31
phyCORE®-AM335x [PCM-051-xxx]
Select gdbserver Debugger from the Debugger drop-down box.
Enter arm‐phytec‐linux‐gnueabi‐gdb
in the GDB Debugger field
Keep the GDB command file field empty.
32 © PHYTEC Messtechnik GmbH 2016 L-779e_6
Select the Connection tab and select TCP in the drop-down box.
Working with Eclipse
Enter
192.168.3.11
(the target's IP address) in the Host name input field.
The host's GDB will connect to this IP address to communicate with the target's GDB server.
Click Apply.
Click Debug.
A new dialog appears.
Select Yes to switch to the Debug perspective.
© PHYTEC Messtechnik GmbH 2016 L-779e_6 33
phyCORE®-AM335x [PCM-051-xxx]
The debug perspective opens and the debugger stops automatically at the first line. The host's GDB is now connected to the GDB server on the target.
You have configured your project for remote debugging. You have started the GNU debugger in Eclipse and connected the host's GDB with the target's GDB server. You can now start to debug the project.
34 © PHYTEC Messtechnik GmbH 2016 L-779e_6
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement
Table of contents
- 7 Introduction
- 7 Rapid Development Kit Documentation
- 7 Professional Support Packages Available
- 8 Overview of these QuickStart Instructions
- 8 System Requirements
- 8 Software used in the Virtual Machine Hard Disk Image
- 8 Ubuntu
- 9 Eclipse
- 9 Qt Creator
- 9 Yocto Project
- 11 Getting Started
- 11 Preparing and Starting the virtual machine
- 13 Starting the Hardware
- 19 Working with Eclipse
- 19 Programming in the C/C++ Perspective
- 19 Work with the Demo Project
- 24 Creating a New Project
- 31 Modifying the Demo Application
- 33 Starting a Program out of Eclipse on the Target
- 35 Debugging an Example Project
- 36 Starting the GDB Server on the Target
- 36 Configuring and Starting the Debugger in Eclipse
- 41 Setting a Breakpoint
- 42 Stepping through and Watching Variable Contents
- 44 Stepping through and Changing Variable Contents
- 45 Using the Memory Monitor
- 49 Working with Qt Creator
- 49 Stop the Running Qt Demo on the Target
- 50 Importing the Demo Application
- 52 Work with the Demo Application
- 55 Compile and Run the Demo Application on the Target
- 57 Compile and Run the Demo Application on the Host
- 59 Debugging the Demo Application
- 59 Using QDebug for simple Debugging Messages
- 61 Using the integrated Qt Creator Debugger
- 65 Getting Started with the BSP
- 65 Add new Packages to the Root Filesystem with Yocto
- 69 Writing the Root Filesystem into the Target’s Flash
- 73 Setup your own Linux Host PC
- 73 Essential Settings
- 73 Installing Ubuntu
- 75 Installation of Software Packages
- 76 Set the Git Configuration
- 76 Build the Board Support Package and Install the SDK
- 78 Set up Eclipse and Integrate Plug-ins
- 80 Install and Setup Qt Creator
- 87 Setting up a TFTP server
- 88 Optional Settings
- 89 Revision History