![]() ![]() That means you should either copy this configuration from one workspace to another or set a fresh new one on each workspace (quite a boring task, indeed). Pay attention: while build configurations are stored into Eclipse project files, debug configurations are stored into. Now go into “Mobile and Device Development” and select plugins like on figure (note: if already installed these entries are masked unless you select otherwise on checkbox “Hide items that are already installed”) :Įclipse remote development pluginNow it’s time to add a debug configuration for remote debugging: select menu “Run > Debug Configurations …” and follow on the left side “C/C++ Remote Application” then press “+” icon on the top to generate related configuration. To use support for remote Linux debugging must install related plugin, on Eclipse follow “Help > Install New Software …” menu and select database for your installation (example “Mars – ) then wait a little bit for plugin list to update. Please follow documentation about gcc compiler option for more details ( link). Conditional compilation could be easily performed through definition of a “DEBUG” symbol (-DDEBUG compiler option) to remove part of code using #ifdef/#ifndef prepocessor statements. Executable build configurationīetter is to reserve a build configuration for debugging purposes to avoid optimizations (-O0 gcc option), to include debugging symbols (-g3 option) and to get rid some functionalitites to may interfere with debugging operations (watchdogs, handler on SIGINT, etc…). There an ssh server daemon is considered as primary way of communication, but you could also setup a simple telnet + ftp scheme.Īs we’ll see in a short time, graphical front-end can be configured to automatically download executable to launch: it is better to reserve a “Debug” build configuration for such purpose. ![]() You should of course set-up network interface to communicate with host PC: you should be able to successfully ping it and enable remote console access. On embedded board side it is mandatory to change your start script to do not launch automatically application (remote debug on running application is possible but not covered here). On host PC side, Eclipse CDT gives graphical front-end that uses gdb from cross-compiler toolchain (as example for PowerPC or ARM targets) to show your application execution into a user friendly environment: it is possible to insert breakpoints, watchpoints, perform step-by-step execution, heap and stack memory analysis, with regards of usual difficulties while debugging embedded multi-thread applications. Mandatory precondition is to have either gdb or gdbserver present on target Linux distribution: this utility will control program execution and communicate remotely with host PC usually through an ssh connection on port 2345. ![]() Into this post I will briefly explain how to connect a CDT Eclipse project to a remote target based on a Linux embedded distribution to achieve step-by-step debugging. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |