In the previous article, how to compile, run Arm-linux-gdb and Gdbserver, this article describes how to combine ECLIPSE-CDT for graphical compilation debugging
The first thing to do is to create the project with the CDT and add the source files.
- On the left side of Project Explorer, right-click->properties Enter project property settings
- Select C/C + + build->settings in tool Settings, change toolchain to arm version
GCC c COMPILER:ARM-LINUX-GCCGCC C LINKER:ARM-LINUX-GCCGCC c Assembler:arm-linux-ar
Other options are good by default and need to be modified by yourself
- [Optional] Build Steps Here you can fill in the compilation steps, I would like to compile the program automatically copied to the TFTPD directory to facilitate direct download of the arm side
Then fill in the Command: post-build stepsCP Ipcam/tftpboot
The compilation section is finished, and the debugging section follows
- Select Item--Menu bar "Run"->debug configurations ...
- Double-click Applecation to create a new configuration, eclipse initializes most of the configuration based on the currently selected project, just modify the debugger configuration page
- Choose to go to the debugger configuration page
Debugger:
Select Gdbserver Debugger
Debugger Options:
GDB Debugger This, if the previous article compiled the ARM-LINUX-GDB copy to the path directory, or the ARM-LINUX-GDB directory to join the path, then the direct fill arm-linux-gdb here, Otherwise browse directory Select the command with path shared libraries This, you can add a library path, such as the debugging process to step into the external function, you must give the debug information in the library file path, otherwise you will not find the definition of the function
Connection this is the key: type select Tcp,host name or IP address to fill the arm side of the IP, the port number is default, this port number will be completed on the arm side when running Gdbserver
- All configurations complete, click Apple and then turn off the configuration page
Start debugging
- Running programs on the arm side
# tftp-g-R ipcam 192.168.1.100# gdbserver 192.168.1.100:10000 Ipcam
192.168.1.100 is the host IP 10000 is the previously set port
- Start debugging at Eclipse
ECLIPSE-CDT with Gdbserver for remote debugging of ARM program