Starting the GDB Server on the Target. Phytec phyCORE-AM335x


Add to my manuals
92 Pages

advertisement

Starting the GDB Server on the Target. Phytec phyCORE-AM335x | Manualzz

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

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents