Main Menu

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

 WIKI

 

     Subtopics

 Eclipse IDE
 Project Setup
 Debug Setup
 Debugging

 

Eclipse with MSPGCC tutorial

Project Setup

When eclipse is started, the following dialog will appear:

Open Dialog

If desired, you can specify your preferred location where all your eclipse projects reside.

After eclipse is running, upon first start a welcome screen appears. This one may be closed. Then click in the navigator area (left) with the right mouse key to pop up a context menu. Select the following entry:

New Project

Then some dialog boxes appears. Among these this one:

The default selections are OK. With Debug, a preselected set of parameters can be established for debug sessions (mostly non-optimized code, or code in RAM) as well for release sessions (optimized compiler coding).

After a project is established you can move existing source files in the project directory. These source files are automatically part of the project. You need not specify which files belong to the project. Take care of this. Do not enter source files in your project directory or a subdirectory when these shall not compile.

You will notice that a build session is started automatically when new files are moved in the project directory. But this is done with the default compiler selection of eclipse/CDT. We will now adjust the project properties for this demo project to have it compiled with mspgcc.

Click the right mouse key while pointing to your project name in the navigator or the C/C++ projects window. Then next dialog window select C/C++ Build. The following window appears (here with information next to "command" filled out as desired): Copy this information into your properties window, of course specify your own processor derivative. Paste the same command line into the "GCC C Linker" Tool Settings area. Enter "msp430-as" into the GCC Assembler area, Command.

Project Properties

Then select the standard include directory for system header files under "Directories". Usually it is in ...mspgcc/msp430/include.

When the dialog is closed, a new build will start automatically. This is also the case when you save a source file.
Under the Build Settings of the properties window, enter "elf" as the "artifact extension". Here you also can specify the exact path/filename of make, when you suspect that another make program on your computer is being executed.
Unter "Binary Parsers" select the elf-format.

Now a first successful build should be the result:

Build result

Note the warning in the edit window. GCC complains that the main function is not defined with a return value. Eclipse provides an error/warning location bar just in parallel with the vertical scroll bar. When you click on it, the cursor is set to the chosen warning or error location.

Now we can initiate a debug session, see next page.

 


next =>