Using Eclipse to build a remote debugging environment for Raspberry Pi

The content of this article and the previous two articles are continuous, please read as needed.

After using gdb-multiarch to achieve remote debugging on the Ubuntu host, the following instructions explain how to achieve remote debugging in Eclipse.

 

Build remote debugging configuration information

Select [Run]-[Debug Configurations ...] through the menu to start the debug configuration information setting screen, select the [C / C ++ RemoteApplication] item, and right-click to select the [New Configguration] function. Refer to the following figure for details:

First select Projectde and Application in the [Main] setting page, the result is as follows:

Next, enter the [Debugger] property page and select [Main] setting item. Select [Gdb debugger] as gdb-multiarch.

Select the [Connection] setting item in the [Debugger] property page. First make sure that the actual content in the red box at the bottom of the screen is [Using GDB (DSF) Manual Remote Debugging Launcher], and then set the GdbServer related information of the Raspberry Pi. The details are as follows:

Press [Apply] to save the settings.

 

Start remote debugging

Enter the arm_cpp / Debug directory through the Raspberry Pi terminal and enter the following command:

gdbserver :10000 arm_cpp

The Raspberry Pi terminal is expressed as follows:

Press the [Debug] button in the lower right corner of the [Debug Configrations] screen of Eclipse to start debugging. If you see the following screen, it means that remote debugging has started.

When you press F8 to continue execution, the expression of the Raspberry Pi is as follows:

So far, use Eclipse to complete the installation of the Raspberry Pi remote debugging environment!

 

Error message

GdbServer's startup parameters, Raspberry Pi's IP address, Eclipse's connection parameters do not match, or GdbServer does not start, the following error message will appear.

 


 

Find this article helpful? Welcome to like and share with more people.

Read more updated articles, please pay attention to WeChat public account [object-oriented thinking]

Published 412 original articles · praised 679 · 310,000 views

Guess you like

Origin blog.csdn.net/craftsman1970/article/details/105440374
Recommended