Search This Blog

Loading...

Tuesday, October 9, 2007

Installing SDCC under ECLIPSE

Getting started with SDCC +Eclipse

PART 1 :- Installation

=========================
Installing the eclipseSDCC Plug-in
=========================
1. Download the SDCC plug-in for Eclipse, eclipseSDCC-1.0.0,
from http://sourceforge.net/projects/eclipse-sdcc

2. Extract the zipfile contents into a new folder.

(For Windows, thezipfile is net.sourceforge.eclipsesdcc-1.0.0-win32.x86.zip)

3. Browse into the extracted folder until you find the folders
“plugins” and “features”

4. Copy the contents of the “plugins” folder to your Eclipse
“plugins” folder (where you installed eclipse before,
C:\Program Files\Eclipse\plugins)

5. Copy the contents of the “features” folder to your Eclipse
“features” folder (where you installed eclipse before,
C:\Program Files\Eclipse\features)

6. Read the help documents in
C:\Program Files\Eclipse\plugins\net.sourceforge.eclipsesdcc_1.0.0\help
for tips on how to create a new MCS51family(SDCC) project. or refer part 2 of this tutorial.

7. Restart Eclipse

Ref : http://ece.colorado.edu/~mcclurel/Installing_SDCC-Eclipse_2-28-2007_handouts6.pdf

===================================================================


====================
PART 2 : Using the Plug in
====================

If you have not already done so read "Before you begin" to make sure all the required software components are in place for your platform.

If you are not familiar with eclipse/CDT you should browse the C/C++ Development User Guide for information on CDT system basics.

Creating an Embedded C Project

EclipseSDCC supports CDT managed make projects. In managed make projects CDT manages the build process by creating and maintaining the underlaying makefiles. CDT keeps track of source dependencies and can automatically rebuild the target when needed.

  1. Create your first managed make project. From the menu bar, select File > New > Project...

    New Project Wizard

  2. In the New Project wizard, select C > Managed Make C Project then click Next.

  3. In the Project name field, type your name as the name of your new project. Do not use spaces or special characters in the project name (for example, "test1").

  4. Leave the box checked to use the default location for your new project. Click Next when you are done.

    New Project Wizard

  5. In the Project Type select "MCS851 family (SDCC)". Click Finish when you are done.

    New Project Wizard

  6. You may be asked if you want to change to the C/C++ perspective. Answer yes.

    New Project Wizard

If all has gone well you should now see a project named test1 in the C/C++ project viewer.

New Project Wizard

Check that eclipseSDCC has correctly determined the default include paths used by the SDCC compiler. These will be seen in the C/C++ project view in the "Includes" folder.

Take a while to familiarise yourself with the environment. Open some on the include files by double-clicking on them. They will be opened in the editor window. Also note the Outline view.

New Project Wizard

The outline view tracks the content of the editor window. The editor will track selections made in the outline. This allows you to move quickly around your code.

Creating C Source files

Source files are held in source folders. Source folders can be nested to any depth allowing you to organize your code logically. To create a source folder select the parent project in the C/C++ project view and right-click. In the pop up menu select select New > Source Folder. Enter a suitable name for your source folder and click Finish.

New Project Wizard

Select the newly created source folder and right-click. In the pop up menu select select New > Source File. Enter a suitable name for your source file and click Finish.

New Project Wizard

The managed make system will attempt to build your source. Inspect the console view to check that this has happened.

New Project Wizard

SDCC Compiler Errors

SDCC compile errors are highlighted in several places.

New Project Wizard

The problems view lists errors in the order they were generated by the SDCC compiler. Double-click on an error to open the source file at the offending line.

In the editor window they are shown as red markers. You can hover over these markers to get the error message.

Errors are also shown in the C/C++ projects view and in the outline view.

What next

Use the Eclipse platform and CDT help documentation to find your way around Eclipse and to resolve generic 'C' problems. Additional help pages are avilable within eclipseSDCC but these only related to eclipseSDCC specific issues.

Eclipse is a fantastic and very stable environment in which to work. As well as 'C' development have a look at the thousands of other plugins that you can download. You'll never go back!




REF: C:/Eclipse/plugins/net.sourceforge.eclipsesdcc_1.0.0/help/gettingStarted.html

The Getting started tutorial is located as under the plug-in directory. as shown above.

No comments: