Main Menu

 Home
 Why MSP430?
 SW-(re)sources
 Projects
 Topics
 Links

 WIKI

 

     Subtopics

 Eclipse IDE
 Project Setup
 Debug Setup
 Debugging

 

Performing a Debug Session

Each debug session can be started by clicking on the bug icon. This defaults to the last project debugged, but can be selected by hitting the small arrow beneath the bug icon. When there was no last project, the debug properties window appears, and its debug-button should be clicked.

Next to the bug icon is the run icon, which starts the target program (or hit F8).

But let's start from the beginning. When the debug session is started, the console window echoes the commands specified in the debug window specification, command section. At the same time, eclipse changes its general appearance. It changes to an appearance optimized for debug purposes. It looks like this:

Debug Screenshot

In the screenshot the program is stopped at a breakpoint I had set. Note that breakpoints cannot be set during execution. This is not a limitation of the MSP430. The screenshot shows the contents of the local variable i (top right). In the debug window (top left), a so called call stack is visible. In this case, the stack shows only the main() level.

This debug window has the buttons for controlling the debugger: run (F8), suspend, stop debugger, step into (F5), step over (F6) and step return (F7). When the run...stop buttons appear grey, you must click in the debug window on the line "Embedded GDB", then these buttons become coloured and active.

When you select the first line in the debug window, the buttons are related to the Proxy program. Clicking the red square would then close the proxy. The console window at the bottom is always related to the highlighted executing program in the debug window, i.e. each background program has its own console.

When you terminate the debug session, please note that eclipse does not automatically return to the standard C/C++ view. Select this view by means of the appropriate button on the top right of the eclipse appearance.

Note: when you modify a source file, the build process will automatically start upon save. When for any reasons a build process must be forced, you must activate Clean... from the Project menu. Otherwise you must deselect the "Build Automatically" feature (also in the Project menu). Then no automatic builds are started, only upon user initiation: Build Project.