Based on Eclipse Embedded Development Platform Integration Solution BalanceSli writes' Eclipse embedded development integration scheme Author: balancesli email: balancesli@thizlinux.com.cn Objective: To provide an efficient development platform for the development of embedded Linux products. Users who are ultimately provided by the product provide the greatest support on the "Development Support Platform". Difficulties: Host end operating system selection Linux, Windows, Cygwin development platform, 2.1 Whether to support CVS version control 2.2 Whether the interface interaction is friendly (graphical editing interface) 2.3 Development Kit can support multiple target machine systems (x86 , MIPS, POWERPC, ARM, STRONGARM, XSCAL, etc.) 2.4 Whether the platform provides (C / C ), compiled, debugging, cross-compiled debugging environment, the size of the target code generation and its implementation efficiency. 2.5. Development platform Unrelated support solution: (Solve technology route and specific scheme) is determined by the above Eclipse open work platform. Due to the openness of the Eclipse IDE platform and its friendly interface, it can be rooted in plug-ins. The Eclipse is used as the software development platform. Take advantage of Eclipse's CVS version control interface provides CVS-based version control and resource allocation management. Program management development. (CDT itself as an Eclipse platform plugin, it provides a very efficient editing environment, can be used as a RAD tool for embedded development, greatly improves development efficiency) NOTE: CDT development environment is best to use Linux System Platform 4. CDT Depending on Three GNU Tools Chains: GCC, GDB, and Make or related tools that support cross-compilation. CDT supports automatically generating makefile and standard Makefile Note: Analysis of the CDT source code, whether you can complete some specific needs through its internal transformation. Difficulty is the familiarity and analysis of Java code. Final CDT solution model: UI (user interface) Makefile Generator (Makefile Builder) It generates the corresponding Makefile CDT ELF PARSER (Binary Resolver) Tool Integrator (GNU Tool Chain Integrator) Tool Chain Configuration Management Model (BUILD Model Schema) Managed Build Model Schema Through the above model, you can customize the integration of the 7-type PDA development platform. Note that after installing the CDT plug-in, Welcome.xml already has a significant elaboration The CDT Project Provides A Set of Plugins That Implement A C / C IDE. It adds a C / C Perspective to the Eclipse Workbench that supports C / C development with a number of views, wizards, a powerful editor, and a debugger. The CDT is designed to provide an extensible architecture, that will provide support For Integration Of Tools Provided by Independnt Software Vendors. A very flexible system. .
Build Model Grammar Elements Relation Schema: ManagedBuildInfo: ManagedBuildInfo: By the above model: It can fully infer the design idea of the CDT Toolchain management. Design IDEA is very important! Guess these toolchain configuration management information in the CDT is finally handed over to MakefileGenerator Generate the corresponding Makefile file, then compile it by the Make tool. Here we can transition to org.eclipse.cdt.make.core org.eclipse.cdt.make.ui These two packages are like and manipulating the Make tool The class model in Source and its corresponding class is as follows: Class TARGET CLASS CONFIGURE CLASS TOOL Class Toolreference Class Option Class OptionCategory >>>>>>>>>> Code Source Code: Class Definition in C (Class ) Inner method. Cxxxxxxxxxxx ixxxxxx as for the package relationship As long as the name of each plugin can be understood! ! ! In the Java language for each class corresponding to a document, each interface class file corresponding to a relation of the following two org.eclipse.cdt.managedbuilder.Core org.eclipse.cdt.managedbuilder.ui public class BuildObject implements IBuildObject public class Configuration extends BuildObject implements IConfiguration public class Option extends BuildObject implements IOption public class OptionCategory extends BuildObject implements IOptionCategory public class Target extends BuildObject implements ITarget public class Tool extends BuildObject implements ITool, IOptionCategory class Buildobject ==== >> class Configuration class Option class OptionCategory class Target class Tool Interface relationship public interface IBuildObject public interface IConfiguration extends IBuildObject public interface IOption extends IBuildObject public interface IOptionCategory extends IBuildObject public interface ITarget extends IBuildObject public interface ITool extends IBuildObject interface Buildobject ==== >>
interface Configuration interface Option interface OptionCategory interface Target interface Tool miscellaneous public class ManagedBuilderCorePlugin extends Plugin public class ToolReference implements ITool public class OptionReference implements IOption public class BuildException extends Exception exception class public interface IManagedBuildInfo ManagedBuildInfo.java (cdtsrcorg.eclipse.cdt.managedbuilder.coreinternalcore) public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo ManagedBuildInfo // standard engineering standard C project public class MakefileGenerator public class ManagedCProjectNature implements IProjectNature MakeProjectNature.java (cdtsrcorg.eclipse.cdt.make.corecore) public class MakeProjectNature implements IProjectNature // managed Make project managed C project ManagedCProjectNature.java (cdtsrcorg.eclipse.cdt.managedbuilder.corecore) public class ManagedCProjectNature implements IProjectNature CProjectNature.java (cdtsrcorg.eclipse.cdt.corecore) public class CProjectNature implements IProjectN ature public class ManagedBuilderUIImages public interface ManagedBuilderHelpContextIds public class ManagedBuilderUIPlugin extends Plugin public class GeneratedMakefileBuilder extends ACBuilder public class ManagedBuildManager extends AbstractCExtension implements IScannerInfoProvider ========================== =================================================================================
TabFolderOptionBlock.java (cdtsrcorg.eclipse.cdt.uiuidialogs) public abstract class TabFolderOptionBlock MakeProjectOptionBlock.java (cdtsrcorg.eclipse.cdt.make.uiinternalui) public class MakeProjectOptionBlock extends TabFolderOptionBlock ManagedProjectOptionBlock.java (cdtsrcorg.eclipse.cdt.managedbuilder.uiinternalui) public Class ManagedProjectOptionBlock Extends TabFolderOptionBlock Di-Pack IMARKERGENERATOR.JAVA ( CDTSRCORG.ECLIPSE.CDT.CORECORE) PUBLIC INTERFACE IMARKERGENERATOR? ? ? public abstract class ACBuilder extends IncrementalProjectBuilder implements IMarkerGenerator ACBuilder.java (cdtsrcorg.eclipse.cdt.corecore esources) public abstract class ACBuilder extends IncrementalProjectBuilder implements IMarkerGenerator can be concluded from the above design idea is to Plugin.xml profile contained in the node element ( Node Element Abstract A BuildObject Class Model Timely Thinking Components Model Abstract Class! ! ! Public interface ibuildobject {// schema element names public static final string id = "id"; public static final string name = "name"; public string getId (); public string getname ();
} Most of the interactive interfaces that are configured with Toolchain management are calling SWT, JFACE to implement the build model of specific Toolchain to CDT, which can customize the DOM node model of the PLUGIN.XML configuration file. There is a very picture of whether the overall design model in each plugin can be launched by the PLUGIN.XML configuration file corresponding to the package in the process of reading the source code? Package analysis: ??? Class MakefileCodescanner makefile code scanner After Read Source, a Makefile file contains some rules, macro definition, and then comment they are all collectively referred to as an indicator (Directive). Simply put each indicator to illustrate what role belongs to it. This can be a substantially abstract division of makefile elements. Public interface IDirective} iDirective public interface directive ==
1. public interface ICommand extends IDirective public class Command extends Directive implements ICommand 2. public interface IComment extends IDirective public class Comment extends Directive implements IComment 3.public interface IConditional extends IDirective public abstract class Conditional extends Parent implements Iconditional {public class Else extends Conditional public class Ifdef extends Conditional public class ifeq extends Conditional public class Ifndef extends Conditional public class ifneq extends Conditional} 4.public interface IEmptyLine extends IDirective public class EmptyLine extends Directive implements IEmptyLine interface IMacroDefinition extends IDirective {public class MacroDefinition extends Directive implements IMacroDefinition public interface IVariableDefinition Extends ImacRodefinition Public Class VariableDefinition Extends MacRodefinition Implements IvariableDefinition Public Class Definevariable Extends VariableDefinition Public Class OverridE fine extends DefineVariable public class ExportVariable extends VariableDefinition public class OverrideVariable extends VariableDefinition public class TargetVariable extends VariableDefinition} 6.public interface IParent extends IDirective public abstract class Parent extends Directive implements IParent public interface IInclude extends IParent public class Include extends Parent implements Iinclude public interface IMakefile extends IParent {public Abstract Class Abstractmakefile Extends Parent Implements Imakefile:
public abstract class AbstractMakefile extends Parent implements IMakefile public class GNUMakefile extends AbstractMakefile implements IGNUMakefile public class NullMakefile extends AbstractMakefile public class PosixMakefile extends AbstractMakefile public interface IGNUMakefile extends IMakefile} 7.public interface IRule extends Iparent public interface IInferenceRule extends IRule public class StaticTargetRule extends InferenceRule implements IInferenceRule public interface ISpecialRule extends IRule {public abstract class SpecialRule extends Rule implements ISpecialRule public interface IDefaultRule extends IspecialRule public class DefaultRule extends SpecialRule implements IdefaultRule public interface IDeleteOnErrorRule extends IspecialRule public class DeleteOnErrorRule extends SpecialRule implements IdeleteOnErrorRule public interface IExportAllVariablesRule extends ISpecialRule public class ExportAllVariablesRule extends SpecialRule implements IexportAllVariablesRule Publi c interface IIgnoreRule extends ISpecialRule public class IgnoreRule extends SpecialRule implements IignoreRule public interface IIntermediateRule extends ISpecialRule public class IntermediateRule extends SpecialRule implements IintermediateRule public interface ILowResolutionTimeRule extends IspecialRule public class LowResolutionTimeRule extends SpecialRule implements ILowResolutionTimeRule // ITargetRule | IInferenceRule | IspecialRule public interface INotParallelRule extends ISpecialRule public class NotParallelRule extends SpecialRule implements INotParallelRule public interface IPhonyRule extends IspecialRule public class PhonyRule extends SpecialRule implements IphonyRule public interface IPosixRule extends IspecialRule public class