|
Introduction
Developing applications with the Eclipse C/C++ IDE can be divided on three parts:
- Project creation
- Application development
- Debugging on target
This document will briefly describe how to perform these steps when developing applications for LEON
Project Creation
Create a new project in the Files menu: Files->New->Project. Select 'Managed C project':
In
the second tab, specify the name of the project. In the third tab,
specify the tool chain to be used. Select sparc-elf when BCC will
be used, or sparc-rtems when RCC will be used:
Afterwards, click finish to create the project.
Application development
Development and
compiling is done in the same way as for host-based applications. The
application is automatically compiled when a source file is modified or
saved. Compile options specific to LEON are configurable in the project
options, under 'Hardware settings'. It is possible to select software
floating-point (-msoft-float), flat register file (-mflat) and variable
number of register windows (-qw):
Debugging
To be able to debug an application, the Debug configuration must be selected. This is done through the project properties, under the 'C/C++ Build' options':
To start debugging, a debug configuration must be created. This is done by clicking on the Debugger icon, or through the Run->Debug menu. In the wizard panle, select 'C/C++ local' and click on new:
Under the Debugger panel, select the appropriate debugger
(sparc-elf-gdb or sparc-rtems-gdb), and fill in the port number for
communication with GRMON (2222) or TSIM (1234). Debugging is started by
click Apply and Debug. Befor this is done, GRMON or TSIM must be started in a separate shell and in gdb mode.
The Debugger includes several debugging views, which can be enabled through the Window->Show_View menu:
TSIM and GRMON can also be started and run inside eclipse. This is done
by configuring the tools as External Programs, using the menu Run->External Tools->External Tools. The tool will then appear in the console view:
|
|