diff options
author | cvs2git <rtems-devel@rtems.org> | 2009-02-06 13:51:36 +0000 |
---|---|---|
committer | cvs2git <rtems-devel@rtems.org> | 2009-02-06 13:51:36 +0000 |
commit | 62bcf3ff91df575f8404f131228982878ee45f9c (patch) | |
tree | 528cd0eb4310da12398aebce3eb085007ad7f684 | |
parent | Prompted by addition of licensing info to RTEMS-CDT Feature. (diff) | |
download | rtems-eclipse-plug-in-v_1_0_1.tar.bz2 |
This commit was manufactured by cvs2svn to create tag 'v_1_0_1'.v_1_0_1
Sprout from master 2009-02-06 13:51:35 UTC Daron Chabot <daron.chabot@gmail.com> 'Prompted by addition of licensing info to RTEMS-CDT Feature.'
Delete:
org.rtems.cdt.toolchain/.classpath
org.rtems.cdt.toolchain/.project
org.rtems.cdt.toolchain/.settings/org.eclipse.jdt.core.prefs
org.rtems.cdt.toolchain/LICENSE
org.rtems.cdt.toolchain/META-INF/MANIFEST.MF
org.rtems.cdt.toolchain/build.properties
org.rtems.cdt.toolchain/plugin.properties
org.rtems.cdt.toolchain/plugin.xml
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/Activator.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/IsRtemsToolChainSupported.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsBspDefinedSymbolsValueHandler.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsCommandLineGenerator.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsEnvironmentVariableSupplier.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsInstallBspDirectoryValueHandler.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsLinkCommandLineInfo.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsManagerRelocationLinkHandler.java
org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java
org.rtems.cdt.toolchain/templates/hello/src/init.c
org.rtems.cdt.toolchain/templates/hello/src/system.h
org.rtems.cdt.toolchain/templates/hello/template.properties
org.rtems.cdt.toolchain/templates/hello/template.xml
org.rtems.cdt.toolchain/templates/serial/src/Basename.c
org.rtems.cdt.toolchain/templates/serial/template.properties
org.rtems.cdt.toolchain/templates/serial/template.xml
org.rtems.cdt.toolchain2/.classpath
org.rtems.cdt.toolchain2/.project
org.rtems.cdt.toolchain2/.settings/org.eclipse.jdt.core.prefs
org.rtems.cdt.toolchain2/LICENSE
org.rtems.cdt.toolchain2/META-INF/MANIFEST.MF
org.rtems.cdt.toolchain2/README
org.rtems.cdt.toolchain2/org/rtems/cdt/Activator.java
org.rtems.cdt.toolchain2/org/rtems/cdt/Constants.java
org.rtems.cdt.toolchain2/org/rtems/cdt/Storage.java
org.rtems.cdt.toolchain2/org/rtems/cdt/VolatilePreferenceStore.java
org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java
org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinCommandLineGenerator.java
org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinEnvironmentSupplier.java
org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinRunScannerInfoProvider.java
org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinScannerInfoCollector.java
org.rtems.cdt.toolchain2/org/rtems/cdt/build/EnvironmentSupplier.java
org.rtems.cdt.toolchain2/org/rtems/cdt/build/RunScannerInfoProvider.java
org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferenceInitializer.java
org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferencePage.java
org.rtems.cdt.toolchain2/org/rtems/cdt/properties/PropertyPage.java
org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/BasicSetup.java
org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/FinishSetup.java
org.rtems.cdt.toolchain2/plugin.xml
47 files changed, 0 insertions, 4071 deletions
diff --git a/org.rtems.cdt.toolchain/.classpath b/org.rtems.cdt.toolchain/.classpath deleted file mode 100644 index 64c5e31..0000000 --- a/org.rtems.cdt.toolchain/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/org.rtems.cdt.toolchain/.project b/org.rtems.cdt.toolchain/.project deleted file mode 100644 index 1fdd4d5..0000000 --- a/org.rtems.cdt.toolchain/.project +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.rtems.cdt.toolchain</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.rtems.cdt.toolchain/.settings/org.eclipse.jdt.core.prefs b/org.rtems.cdt.toolchain/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index f8a6e50..0000000 --- a/org.rtems.cdt.toolchain/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Fri Nov 07 00:24:21 PST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.rtems.cdt.toolchain/LICENSE b/org.rtems.cdt.toolchain/LICENSE deleted file mode 100644 index 4e04964..0000000 --- a/org.rtems.cdt.toolchain/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -# -# $Id$ -# - -All rights are temporarily reserved by author Robert Fu until -author consults with RTEMS community and decides the final license -to use for this RTEMS Eclipse Plug-in. diff --git a/org.rtems.cdt.toolchain/META-INF/MANIFEST.MF b/org.rtems.cdt.toolchain/META-INF/MANIFEST.MF deleted file mode 100644 index a8941d5..0000000 --- a/org.rtems.cdt.toolchain/META-INF/MANIFEST.MF +++ /dev/null @@ -1,16 +0,0 @@ -Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RTEMS Toolchain Plug-in
-Bundle-SymbolicName: org.rtems.cdt.toolchain;singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: org.rtems.cdt.toolchain.Activator
-Bundle-Vendor: RobertF
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.cdt.core,
- org.eclipse.cdt.managedbuilder.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.core.resources
-Bundle-Localization: plugin
-Export-Package: org.rtems.cdt.toolchain
diff --git a/org.rtems.cdt.toolchain/build.properties b/org.rtems.cdt.toolchain/build.properties deleted file mode 100644 index 675404c..0000000 --- a/org.rtems.cdt.toolchain/build.properties +++ /dev/null @@ -1,8 +0,0 @@ -source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- templates/,\
- LICENSE
diff --git a/org.rtems.cdt.toolchain/plugin.properties b/org.rtems.cdt.toolchain/plugin.properties deleted file mode 100644 index 8b31be6..0000000 --- a/org.rtems.cdt.toolchain/plugin.properties +++ /dev/null @@ -1,81 +0,0 @@ -############################################################################### -# Note about steps of updating plugin.properties: -# -# 0. clean then rebuild -# 1. remove the old plugin by deleting the jar file -# 2. start Eclipse, and then close it -# (w/o this step, somehow it remembers old plugin, so you cannot see your -# changes) -# 3. copy new plugin jar file into Eclipse plugins directory -# 4. restart Eclipse -############################################################################### - -RTEMS.Debug=Debug -RTEMS.Release=Release - -RTEMS.C.Linker.Shared.Libgcc=Shared libgcc (-shared-libgcc) -RTEMS.CPP.Linker.Shared.Libgcc=Shared libgcc (-shared-libgcc) - -RTEMS.C.Linker.Start.Address=Start Address (-Wl,-Ttext,) -RTEMS.CPP.Linker.Start.Address=Start Address (-Wl,-Ttext,) - -RTEMS.C.Compiler.CPU.Type=CPU Type (-mtune=) -RTEMS.CPP.Compiler.CPU.Type=CPU Type (-mtune=) -RTEMS.C.Linker.CPU.Type=CPU Type (-mtune=) -RTEMS.CPP.Linker.CPU.Type=CPU Type (-mtune=) - -RTEMS.C.Compiler.Search.Path=Search Path (-B) -RTEMS.CPP.Compiler.Search.Path=Search Path (-B) -RTEMS.C.Link.Search.Path=Search Path (-B) -RTEMS.CPP.Link.Search.Path=Search Path (-B) - -RTEMS.C.Compiler.Specs=Specs (-specs=) -RTEMS.CPP.Compiler.Specs=Specs (-specs=) -RTEMS.C.Linker.Specs=Specs (-specs=) -RTEMS.CPP.Linker.Specs=Specs (-specs=) - -C.Link.OptionCategory.RTEMS=RTEMS Specific -CPP.Link.OptionCategory.RTEMS=RTEMS Specific - -RTEMS.C.Link.Option.Mgr.Barrier=Enable Barrier -RTEMS.CPP.Link.Option.Mgr.Barrier=Enable Barrier - -RTEMS.C.Link.Option.Mgr.Console=Enable Console -RTEMS.CPP.Link.Option.Mgr.Console=Enable Console - -RTEMS.C.Link.Option.Mgr.Dual.Ported.Memory=Enable Dual Ported Memory -RTEMS.CPP.Link.Option.Mgr.Dual.Ported.Memory=Enable Dual Ported Memory - -RTEMS.C.Link.Option.Mgr.Event=Enable Event -RTEMS.CPP.Link.Option.Mgr.Event=Enable Event - -RTEMS.C.Link.Option.Mgr.File.System=Enable File System -RTEMS.CPP.Link.Option.Mgr.File.System=Enable File System - -RTEMS.C.Link.Option.Mgr.IO=Enable I/O -RTEMS.CPP.Link.Option.Mgr.IO=Enable I/O - -RTEMS.C.Link.Option.Mgr.Multi.Processor=Enable Multi-Processor -RTEMS.CPP.Link.Option.Mgr.Multi.Processor=Enable Multi-Processor - -RTEMS.C.Link.Option.Mgr.Message=Enable Message -RTEMS.CPP.Link.Option.Mgr.Message=Enable Message - -RTEMS.C.Link.Option.Mgr.Partition=Enable Partition -RTEMS.CPP.Link.Option.Mgr.Partition=Enable Partition - -RTEMS.C.Link.Option.Mgr.Region=Enable Region -RTEMS.CPP.Link.Option.Mgr.Region=Enable Region - -RTEMS.C.Link.Option.Mgr.Rate.Monotonic=Enable Rate Monotonic -RTEMS.CPP.Link.Option.Mgr.Rate.Monotonic=Enable Rate Monotonic - -RTEMS.C.Link.Option.Mgr.Semaphore=Enable Semaphore -RTEMS.CPP.Link.Option.Mgr.Semaphore=Enable Semaphore - -RTEMS.C.Link.Option.Mgr.Signal=Enable Signal -RTEMS.CPP.Link.Option.Mgr.Signal=Enable Signal - -RTEMS.C.Link.Option.Mgr.Timer=Enable Timer -RTEMS.CPP.Link.Option.Mgr.Timer=Enable Timer - diff --git a/org.rtems.cdt.toolchain/plugin.xml b/org.rtems.cdt.toolchain/plugin.xml deleted file mode 100644 index 7dde72a..0000000 --- a/org.rtems.cdt.toolchain/plugin.xml +++ /dev/null @@ -1,745 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="org.rtems.cdt.toolchain.RtemsGccManagedMakePerProjectProfile"
- name="RTEMS GNU C/C++ managed make per project SCD profile"
- point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
- <scannerInfoCollector
- class="org.rtems.cdt.toolchain.RtemsScannerInfoCollector"
- scope="project"/>
- <buildOutputProvider>
- <open/>
- <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/>
- </buildOutputProvider>
- <scannerInfoProvider providerId="specsFile">
- <run
- arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}"
- command="i386-rtems4.9-gcc"
- class="org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider"/>
- <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/>
- </scannerInfoProvider>
- </extension>
-
- <extension
- id="org.rtems.cdt.toolchain.RtemsGccManagedMakePerProjectProfileC"
- name="RTEMS GNU C/C++ managed make per project SCD profile"
- point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
- <scannerInfoCollector
- class="org.rtems.cdt.toolchain.RtemsScannerInfoCollector"
- scope="project"/>
- <buildOutputProvider>
- <open/>
- <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/>
- </buildOutputProvider>
- <scannerInfoProvider providerId="specsFile">
- <run
- arguments="-E -P -v -dD ${plugin_state_location}/specs.c"
- command="i386-rtems4.9-gcc"
- class="org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider"/>
- <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/>
- </scannerInfoProvider>
- </extension>
-
- <extension
- id="org.rtems.cdt.toolchain.RtemsGccManagedMakePerProjectProfileCPP"
- name="RTEMS GNU C/C++ managed make per project SCD profile"
- point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">
- <scannerInfoCollector
- class="org.rtems.cdt.toolchain.RtemsScannerInfoCollector"
- scope="project"/>
- <buildOutputProvider>
- <open/>
- <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/>
- </buildOutputProvider>
- <scannerInfoProvider providerId="specsFile">
- <run
- arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp"
- command="i386-rtems4.9-g++"
- class="org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider"/>
- <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/>
- </scannerInfoProvider>
- </extension>
-
- <extension
- id="org.rtems.cdt.toolchain"
- name="RTEMS Toolchain"
- point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
-
- <toolChain
- id="cdt.managedbuild.toolchain.gnu.rtems.base"
- name="RTEMS Toolchain"
- archList="all"
- osList="all"
- configurationEnvironmentSupplier="org.rtems.cdt.toolchain.RtemsEnvironmentVariableSupplier"
- isToolChainSupported="org.rtems.cdt.toolchain.IsRtemsToolChainSupported"
- scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain.RtemsGccManagedMakePerProjectProfile"
- targetTool="cdt.managedbuild.tool.gnu.cpp.linker.rtems.base;cdt.managedbuild.tool.gnu.c.linker.rtems.base;cdt.managedbuild.tool.gnu.archiver">
-
- <targetPlatform
- archList="all"
- binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE"
- id="cdt.managedbuild.target.gnu.platform.rtems.base"
- name="Target Platform RTEMS"
- osList="other">
- </targetPlatform>
-
- <builder
- superClass="cdt.managedbuild.target.gnu.builder"
- id="cdt.managedbuild.tool.gnu.builder.rtems.base">
- </builder>
-
- <tool
- command="i386-rtems4.9-as"
- id="cdt.managedbuild.tool.gnu.assembler.rtems.base"
- superClass="cdt.managedbuild.tool.gnu.assembler"
- commandLineGenerator="org.rtems.cdt.toolchain.RtemsCommandLineGenerator">
- </tool>
-
- <tool
- command="i386-rtems4.9-ar"
- id="cdt.managedbuild.tool.gnu.archiver.rtems.base"
- superClass="cdt.managedbuild.tool.gnu.archiver"
- commandLineGenerator="org.rtems.cdt.toolchain.RtemsCommandLineGenerator">
- <enablement type="ALL">
- <checkBuildProperty
- property="org.eclipse.cdt.build.core.buildArtefactType"
- value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
- </enablement>
- </tool>
-
- <tool
- command="i386-rtems4.9-gcc"
- id="cdt.managedbuild.tool.gnu.c.compiler.rtems.base"
- superClass="cdt.managedbuild.tool.gnu.c.compiler"
- commandLineGenerator="org.rtems.cdt.toolchain.RtemsCommandLineGenerator">
- <option
- id="rtems.gnu.c.compiler.option.preprocessor.def.symbols"
- superClass="gnu.c.compiler.option.preprocessor.def.symbols"
- valueHandler="org.rtems.cdt.toolchain.RtemsBspDefinedSymbolsValueHandler">
- </option>
- <option
- command="-B"
- name="%RTEMS.C.Compiler.Search.Path"
- id="rtems.gnu.c.compiler.option.search.path"
- category="gnu.c.compiler.category.other"
- valueHandler="org.rtems.cdt.toolchain.RtemsInstallBspDirectoryValueHandler"
- valueType="string"
- browseType="directory">
- </option>
- <option
- defaultValue="bsp_specs"
- command="-specs="
- name="%RTEMS.C.Compiler.Specs"
- id="rtems.gnu.c.compiler.option.specs"
- category="gnu.c.compiler.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="pentiumpro"
- command="-mtune="
- name="%RTEMS.C.Compiler.CPU.Type"
- id="rtems.gnu.c.compiler.option.mtune"
- category="gnu.c.compiler.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="-qrtems -c -fmessage-length=0"
- id="rtems.gnu.c.compiler.option.misc.other"
- superClass="gnu.c.compiler.option.misc.other">
- </option>
- <inputType
- id="cdt.managedbuild.tool.gnu.c.compiler.input.rtems"
- superClass="cdt.managedbuild.tool.gnu.c.compiler.input"
- scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain.RtemsGccManagedMakePerProjectProfileC"/>
- </tool>
-
- <tool
- command="i386-rtems4.9-g++"
- id="cdt.managedbuild.tool.gnu.cpp.compiler.rtems.base"
- superClass="cdt.managedbuild.tool.gnu.cpp.compiler"
- commandLineGenerator="org.rtems.cdt.toolchain.RtemsCommandLineGenerator">
- <option
- id="rtems.gnu.cpp.compiler.option.preprocessor.def"
- superClass="gnu.cpp.compiler.option.preprocessor.def"
- valueHandler="org.rtems.cdt.toolchain.RtemsBspDefinedSymbolsValueHandler">
- </option>
- <option
- command="-B"
- name="%RTEMS.CPP.Compiler.Search.Path"
- id="rtems.gnu.cpp.compiler.option.search.path"
- category="gnu.cpp.compiler.category.other"
- valueHandler="org.rtems.cdt.toolchain.RtemsInstallBspDirectoryValueHandler"
- valueType="string"
- browseType="directory">
- </option>
- <option
- defaultValue="bsp_specs"
- command="-specs="
- name="%RTEMS.CPP.Compiler.Specs"
- id="rtems.gnu.cpp.compiler.option.specs"
- category="gnu.cpp.compiler.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="pentiumpro"
- command="-mtune="
- name="%RTEMS.CPP.Compiler.CPU.Type"
- id="rtems.gnu.cpp.compiler.option.mtune"
- category="gnu.cpp.compiler.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="-qrtems -c -fmessage-length=0"
- id="rtems.gnu.cpp.compiler.option.other.other"
- superClass="gnu.cpp.compiler.option.other.other">
- </option>
- <inputType
- id="cdt.managedbuild.tool.gnu.cpp.compiler.input.rtems"
- superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"
- scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain.RtemsGccManagedMakePerProjectProfileCPP"/>
- </tool>
-
- <tool
- command="i386-rtems4.9-gcc"
- id="cdt.managedbuild.tool.gnu.c.linker.rtems.base"
- superClass="cdt.managedbuild.tool.gnu.c.linker"
- commandLineGenerator="org.rtems.cdt.toolchain.RtemsCommandLineGenerator">
- <enablement type="ALL">
- <not>
- <checkBuildProperty
- property="org.eclipse.cdt.build.core.buildArtefactType"
- value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
- </not>
- </enablement>
-
- <optionCategory
- owner="cdt.managedbuild.tool.gnu.c.linker.rtems.base"
- name="%C.Link.OptionCategory.RTEMS"
- id="gnu.c.link.category.rtems">
- </optionCategory>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Barrier"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.barrier"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="barrier"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.C.Link.Option.Mgr.Console"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.console"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="console"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Dual.Ported.Memory"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.dual.ported.memory"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="dpmem"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Event"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.event"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="event"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.C.Link.Option.Mgr.File.System"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.filesystem"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="filesystem"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.C.Link.Option.Mgr.IO"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.io"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="io"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Multi.Processor"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.multi.processor"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="mp"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Message"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.message"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="msg"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Partition"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.partition"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="part"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Region"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.region"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="region"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Rate.Monotonic"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.rate.monotonic"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="rtmon"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.C.Link.Option.Mgr.Semaphore"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.semaphore"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="sem"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Signal"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.signal"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="signal"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.C.Link.Option.Mgr.Timer"
- category="gnu.c.link.category.rtems"
- id="rtems.c.link.option.mgr.timer"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="timer"
- valueType="boolean">
- </option>
-
- <option
- command="-B"
- name="%RTEMS.C.Link.Search.Path"
- id="rtems.gnu.c.link.option.search.path"
- category="gnu.c.link.category.other"
- valueHandler="org.rtems.cdt.toolchain.RtemsInstallBspDirectoryValueHandler"
- valueType="string"
- browseType="directory">
- </option>
- <option
- defaultValue="bsp_specs"
- command="-specs="
- name="%RTEMS.C.Linker.Specs"
- id="rtems.gnu.c.link.option.specs"
- category="gnu.c.link.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="pentiumpro"
- command="-mtune="
- name="%RTEMS.C.Linker.CPU.Type"
- id="rtems.gnu.c.link.option.mtune"
- category="gnu.c.link.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="0x00100000"
- command="-Wl,-Ttext,"
- name="%RTEMS.C.Linker.Start.Address"
- id="rtems.gnu.c.link.option.start.address"
- category="gnu.c.link.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="-qrtems"
- id="rtems.gnu.c.link.option.ldflags"
- superClass="gnu.c.link.option.ldflags">
- </option>
- </tool>
-
- <tool
- command="i386-rtems4.9-g++"
- id="cdt.managedbuild.tool.gnu.cpp.linker.rtems.base"
- superClass="cdt.managedbuild.tool.gnu.cpp.linker"
- commandLineGenerator="org.rtems.cdt.toolchain.RtemsCommandLineGenerator">
- <enablement type="ALL">
- <not>
- <checkBuildProperty
- property="org.eclipse.cdt.build.core.buildArtefactType"
- value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
- </not>
- </enablement>
-
- <optionCategory
- owner="cdt.managedbuild.tool.gnu.cpp.linker.rtems.base"
- name="%CPP.Link.OptionCategory.RTEMS"
- id="gnu.cpp.link.category.rtems">
- </optionCategory>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Barrier"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.barrier"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="barrier"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.CPP.Link.Option.Mgr.Console"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.console"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="console"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Dual.Ported.Memory"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.dual.ported.memory"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="dpmem"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Event"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.event"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="event"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.CPP.Link.Option.Mgr.File.System"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.filesystem"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="filesystem"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.CPP.Link.Option.Mgr.IO"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.io"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="io"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Multi.Processor"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.multi.processor"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="mp"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Message"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.message"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="msg"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Partition"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.partition"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="part"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Region"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.region"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="region"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Rate.Monotonic"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.rate.monotonic"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="rtmon"
- valueType="boolean">
- </option>
- <option
- defaultValue="true"
- name="%RTEMS.CPP.Link.Option.Mgr.Semaphore"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.semaphore"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="sem"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Signal"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.signal"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="signal"
- valueType="boolean">
- </option>
- <option
- defaultValue="false"
- name="%RTEMS.CPP.Link.Option.Mgr.Timer"
- category="gnu.cpp.link.category.rtems"
- id="rtems.cpp.link.option.mgr.timer"
- valueHandler="org.rtems.cdt.toolchain.RtemsManagerRelocationLinkHandler"
- valueHandlerExtraArgument="timer"
- valueType="boolean">
- </option>
-
-
- <option
- command="-B"
- name="%RTEMS.CPP.Link.Search.Path"
- id="rtems.gnu.cpp.link.option.search.path"
- category="gnu.cpp.link.category.other"
- valueHandler="org.rtems.cdt.toolchain.RtemsInstallBspDirectoryValueHandler"
- valueType="string"
- browseType="directory">
- </option>
- <option
- defaultValue="bsp_specs"
- command="-specs="
- name="%RTEMS.CPP.Linker.Specs"
- id="rtems.gnu.cpp.link.option.specs"
- category="gnu.cpp.link.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="pentiumpro"
- command="-mtune="
- name="%RTEMS.CPP.Linker.CPU.Type"
- id="rtems.gnu.cpp.link.option.mtune"
- category="gnu.cpp.link.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="0x00100000"
- command="-Wl,-Ttext,"
- name="%RTEMS.CPP.Linker.Start.Address"
- id="rtems.gnu.cpp.link.option.start.address"
- category="gnu.cpp.link.category.other"
- valueType="string">
- </option>
- <option
- defaultValue="-qrtems"
- id="rtems.gnu.cpp.link.option.ldflags"
- superClass="gnu.c.link.option.ldflags">
- </option>
-
- </tool>
-
- </toolChain>
-
-
- <configuration
- id="cdt.managedbuild.config.gnu.rtems.base"
- cleanCommand="rm -rf"
- artifactExtension="exe">
- <enablement type="CONTAINER_ATTRIBUTE"
- attribute="artifactExtension"
- value="dll"
- extensionAdjustment="false">
- <checkBuildProperty
- property="org.eclipse.cdt.build.core.buildArtefactType"
- value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
- </enablement>
- <enablement type="CONTAINER_ATTRIBUTE"
- attribute="artifactExtension"
- value="a"
- extensionAdjustment="false">
- <checkBuildProperty
- property="org.eclipse.cdt.build.core.buildArtefactType"
- value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
- </enablement>
- </configuration>
-
- <projectType
- buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
- id="cdt.managedbuild.target.gnu.rtems.exe"
- isAbstract="false"
- isTest="false"
- >
- <configuration
- name="%RTEMS.Debug"
- cleanCommand="rm -rf"
- id="cdt.managedbuild.config.gnu.rtems.exe.debug"
- parent="cdt.managedbuild.config.gnu.rtems.base"
- buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug">
- <toolChain
- superClass="cdt.managedbuild.toolchain.gnu.rtems.base"
- id="cdt.managedbuild.toolchain.gnu.rtems.exe.debug">
- <targetPlatform
- id="cdt.managedbuild.target.gnu.platform.rtems.exe.debug"
- superClass="cdt.managedbuild.target.gnu.platform.rtems.base">
- </targetPlatform>
- <tool
- id="cdt.managedbuild.tool.gnu.cpp.compiler.rtems.exe.debug"
- superClass="cdt.managedbuild.tool.gnu.cpp.compiler.rtems.base">
- <option
- id="gnu.cpp.compiler.rtems.exe.debug.option.optimization.level"
- superClass="gnu.cpp.compiler.option.optimization.level">
- </option>
- <option
- id="gnu.cpp.compiler.rtems.exe.debug.option.debugging.level"
- superClass="gnu.cpp.compiler.option.debugging.level">
- </option>
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.c.compiler.rtems.exe.debug"
- superClass="cdt.managedbuild.tool.gnu.c.compiler.rtems.base">
- <option
- id="gnu.c.compiler.rtems.exe.debug.option.optimization.level"
- superClass="gnu.c.compiler.option.optimization.level">
- </option>
- <option
- id="gnu.c.compiler.rtems.exe.debug.option.debugging.level"
- superClass="gnu.c.compiler.option.debugging.level">
- </option>
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.c.linker.rtems.exe.debug"
- superClass="cdt.managedbuild.tool.gnu.c.linker.rtems.base">
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.cpp.linker.rtems.exe.debug"
- superClass="cdt.managedbuild.tool.gnu.cpp.linker.rtems.base">
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.assembler.rtems.exe.debug"
- superClass="cdt.managedbuild.tool.gnu.assembler.rtems.base">
- </tool>
- </toolChain>
- </configuration>
-
- <configuration
- name="%RTEMS.Release"
- cleanCommand="rm -rf "
- id="cdt.managedbuild.config.gnu.rtems.exe.release"
- parent="cdt.managedbuild.config.gnu.rtems.base"
- buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release">
- <toolChain
- id="cdt.managedbuild.toolchain.gnu.rtems.exe.release"
- superClass="cdt.managedbuild.toolchain.gnu.rtems.base">
- <targetPlatform
- id="cdt.managedbuild.target.gnu.platform.rtems.exe.release"
- superClass="cdt.managedbuild.target.gnu.platform.rtems.base">
- </targetPlatform>
- <tool
- id="cdt.managedbuild.tool.gnu.cpp.compiler.rtems.exe.release"
- superClass="cdt.managedbuild.tool.gnu.cpp.compiler.rtems.base">
- <option
- id="gnu.cpp.compiler.rtems.exe.release.option.optimization.level"
- superClass="gnu.cpp.compiler.option.optimization.level">
- </option>
- <option
- id="gnu.cpp.compiler.rtems.exe.release.option.debugging.level"
- superClass="gnu.cpp.compiler.option.debugging.level">
- </option>
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.c.compiler.rtems.exe.release"
- superClass="cdt.managedbuild.tool.gnu.c.compiler.rtems.base">
- <option
- id="gnu.c.compiler.rtems.exe.release.option.optimization.level"
- superClass="gnu.c.compiler.option.optimization.level">
- </option>
- <option
- id="gnu.c.compiler.rtems.exe.release.option.debugging.level"
- superClass="gnu.c.compiler.option.debugging.level">
- </option>
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.c.linker.rtems.exe.release"
- superClass="cdt.managedbuild.tool.gnu.c.linker.rtems.base">
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.cpp.linker.rtems.exe.release"
- superClass="cdt.managedbuild.tool.gnu.cpp.linker.rtems.base">
- </tool>
- <tool
- id="cdt.managedbuild.tool.gnu.assembler.rtems.exe.release"
- superClass="cdt.managedbuild.tool.gnu.assembler.rtems.base">
- </tool>
- </toolChain>
- </configuration>
- </projectType>
-
- </extension>
-
- <extension
- point="org.eclipse.cdt.core.templates">
- <template
- id="org.rtems.cdt.toolchain.templates.serial"
- location="$nl$/templates/serial/template.xml"
- filterPattern=".*"
- projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
- </template>
- <template
- filterPattern=".*"
- id="org.rtems.cdt.toolchain.templates.hello"
- location="$nl$/templates/hello/template.xml"
- projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
- </template>
- </extension>
-
- <extension
- point="org.eclipse.cdt.core.templateAssociations">
- <template
- id="org.rtems.cdt.toolchain.templates.serial">
- <toolChain
- id="cdt.managedbuild.toolchain.gnu.rtems.base">
- </toolChain>
- </template>
- <template
- id="org.rtems.cdt.toolchain.templates.hello">
- <toolChain
- id="cdt.managedbuild.toolchain.gnu.rtems.base">
- </toolChain>
- </template>
- </extension>
-
-</plugin>
diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/Activator.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/Activator.java deleted file mode 100644 index 813df03..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/Activator.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.rtems.cdt.toolchain;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.rtems.cdt.toolchain";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/IsRtemsToolChainSupported.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/IsRtemsToolChainSupported.java deleted file mode 100644 index dda639d..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/IsRtemsToolChainSupported.java +++ /dev/null @@ -1,21 +0,0 @@ -/********************************************************************** - * Copyright (c) 2008 RobertF. - * All rights reserved. - **********************************************************************/ - -package org.rtems.cdt.toolchain; - -import org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported; -import org.eclipse.cdt.managedbuilder.core.IToolChain; -import org.eclipse.core.runtime.PluginVersionIdentifier; - -public class IsRtemsToolChainSupported implements IManagedIsToolChainSupported { - public IsRtemsToolChainSupported() { - } - - public boolean isSupported(IToolChain toolChain, - PluginVersionIdentifier version, String instance) { - return RtemsEnvironmentVariableSupplier.toolChainSupported; - } - -} diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsBspDefinedSymbolsValueHandler.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsBspDefinedSymbolsValueHandler.java deleted file mode 100644 index 00bed1e..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsBspDefinedSymbolsValueHandler.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.rtems.cdt.toolchain;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.eclipse.cdt.managedbuilder.core.IBuildObject;
-import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
-import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
-import org.eclipse.cdt.managedbuilder.core.IOption;
-import org.eclipse.cdt.managedbuilder.core.ManagedOptionValueHandler;
-
-public class RtemsBspDefinedSymbolsValueHandler extends ManagedOptionValueHandler
- implements IManagedOptionValueHandler {
- private List<String> bspDefinedSymbolList;
-
- public RtemsBspDefinedSymbolsValueHandler() {
- bspDefinedSymbolList = RtemsScannerInfoCollector.getBspDefinedSymbols();
- }
-
- /**
- * Handles transfer between values between UI element and
- * back-end in different circumstances.
- *
- * @param configuration build configuration of option
- * (may be IConfiguration or IResourceConfiguration)
- * @param holder contains the holder of the option
- * @param option the option that is handled
- * @param extraArgument extra argument for handler
- * @param event event to be handled, one of the following:
- * (EVENT_OPEN = 1, EVENT_CLOSE = 2,
- * EVENT_SETDEFAULT = 3,
- * EVENT_APPLY = 4, EVENT_LOAD = 5)
- *
- * @return True when the event was handled, false otherwise.
- * This enables default event handling can take place.
- */
- public boolean handleValue(IBuildObject configuration, IHoldsOptions holder,
- IOption option, String extraArgument, int event) {
- if (event == EVENT_CLOSE) return false;
-
- try {
- Object defaultValue = option.getDefaultValue();
-
- if ( defaultValue==null
- || ( defaultValue instanceof List
- && ((List)defaultValue).size()<=0
- )
- ) {
- option.setDefaultValue(bspDefinedSymbolList);
- }
- } catch (Exception e) {
- return false;
- }
-
- return true;
- }
-}
diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsCommandLineGenerator.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsCommandLineGenerator.java deleted file mode 100644 index 1e52f85..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsCommandLineGenerator.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.rtems.cdt.toolchain;
-
-import java.util.HashMap;
-
-import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator;
-import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
-import org.eclipse.cdt.managedbuilder.core.ITool;
-import org.eclipse.cdt.managedbuilder.internal.core.ManagedCommandLineGenerator;
-
-public class RtemsCommandLineGenerator extends ManagedCommandLineGenerator
- implements IManagedCommandLineGenerator {
-
- public static final String ENV_RTEMS_TOOLSET = "RTEMS_TOOLSET";
-
- public static final String TOOL_AR = "ar";
- public static final String TOOL_AS = "as";
- public static final String TOOL_GCC = "gcc";
- public static final String TOOL_GPP = "g++";
-
- private static final String DEFAULT_RTEMS_TOOLSET =
- "i386-rtems4.9-ar, i386-rtems4.9-as, i386-rtems4.9-gcc, i386-rtems4.9-g++";
-
- private static HashMap<String, String> toolCmdMap = new HashMap<String, String>(10);
- private String toolName;
-
- static {
- String toolset = System.getenv(ENV_RTEMS_TOOLSET);
- if (toolset==null) toolset = DEFAULT_RTEMS_TOOLSET;
-
- String[] tool = toolset.split(",");
- for (int i=0; i<tool.length; i++) {
- String cmd = tool[i].trim();
-
- if (cmd.endsWith(TOOL_AR)) toolCmdMap.put(TOOL_AR, cmd);
- else if (cmd.endsWith(TOOL_AS)) toolCmdMap.put(TOOL_AS, cmd);
- else if (cmd.endsWith(TOOL_GCC)) toolCmdMap.put(TOOL_GCC, cmd);
- else if (cmd.endsWith(TOOL_GPP)) toolCmdMap.put(TOOL_GPP, cmd);
- }
- }
-
- public RtemsCommandLineGenerator() {
- }
-
- public IManagedCommandLineInfo generateCommandLineInfo(ITool tool,
- String commandName, String[] flags, String outputFlag, String outputPrefix,
- String outputName, String[] inputResources, String commandLinePattern ) {
-
- boolean isLinker = false;
- String cmdName = commandName;
- String toolId = tool.getId();
-
- if (toolId.contains("gnu.archiver")) {
- cmdName = toolCmdMap.get(TOOL_AR);
-
- } else if (toolId.contains("gnu.assembler")) {
- cmdName = toolCmdMap.get(TOOL_AS);
-
- } else if (toolId.contains("gnu.c.compiler")) {
- cmdName = toolCmdMap.get(TOOL_GCC);
-
- } else if (toolId.contains("gnu.c.linker")) {
- cmdName = toolCmdMap.get(TOOL_GCC);
- isLinker = true;
-
- } else if (toolId.contains("gnu.cpp.compiler")) {
- cmdName = toolCmdMap.get(TOOL_GPP);
-
- } else if (toolId.contains("gnu.cpp.linker")) {
- cmdName = toolCmdMap.get(TOOL_GPP);
- isLinker = true;
- }
-
- tool.setToolCommand(cmdName);
-
- IManagedCommandLineInfo cmdLineInfo = super.generateCommandLineInfo(tool,
- cmdName, flags, outputFlag, outputPrefix,
- outputName, inputResources, commandLinePattern);
- if (isLinker){
- RtemsLinkCommandLineInfo rtemsCmdLineInfo = new RtemsLinkCommandLineInfo(
- cmdLineInfo.getCommandLine(), cmdLineInfo.getCommandLinePattern(),
- cmdLineInfo.getCommandName(), cmdLineInfo.getFlags(),
- cmdLineInfo.getOutputFlag(), cmdLineInfo.getOutputPrefix(),
- cmdLineInfo.getOutput(), cmdLineInfo.getInputs() );
-
- return rtemsCmdLineInfo;
-
- } else return cmdLineInfo;
- }
-}
diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsEnvironmentVariableSupplier.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsEnvironmentVariableSupplier.java deleted file mode 100644 index 11865ec..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsEnvironmentVariableSupplier.java +++ /dev/null @@ -1,301 +0,0 @@ -/********************************************************************** - * Copyright (c) 2008 RobertF. - * All rights reserved. - **********************************************************************/ - -package org.rtems.cdt.toolchain; - -import org.eclipse.cdt.managedbuilder.core.IConfiguration; -import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable; -import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier; -import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider; -import org.eclipse.cdt.utils.WindowsRegistry; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; - -public class RtemsEnvironmentVariableSupplier implements - IConfigurationEnvironmentVariableSupplier { - public static final String ENV_RTEMS_TOOL_DIR = "RTEMS_TOOL_DIR"; - public static final String ENV_RTEMS_TARGET_TOOL_DIR = "RTEMS_TARGET_TOOL_DIR"; - public static final String ENV_RTEMS_TARGET_CPU_GCC_LIB_DIR = "RTEMS_TARGET_CPU_GCC_LIB_DIR"; - public static final String ENV_RTEMS_INSTALL_DIR = "RTEMS_INSTALL_DIR"; - public static final String ENV_RTEMS_INSTALL_BSP_DIR = "RTEMS_INSTALL_BSP_DIR"; - - private static IPath toolPath; // e.g., /opt/rtems-4.9 - private static IPath targetToolPath; // e.g., /opt/rtems-4.9/i386-rtems4.9 - private static IPath targetCpuGccLibPath; // e.g., /opt/rtems-4.9/lib/gcc/i386-rtems4.9/4.3.2/mpentiumpro - private static IPath installPath; // e.g., /opt/rtems_install - private static IPath installBspPath; // e.g., /opt/rtems_install/i386-rtems4.9/pc686/lib - - private static IBuildEnvironmentVariable evBinPath = null; - private static IBuildEnvironmentVariable evCIncludePath = null; - private static IBuildEnvironmentVariable evLibPath = null; - - public static boolean toolChainSupported; - public static boolean isOSWindows; - public static String pathSeparator; // ":" on UNIX - private static String drivePrefix; // disk drive prefix: C: for Windows a - // blank for other OS - - private static class RtemsBuildEnvironmentVariable implements IBuildEnvironmentVariable { - private final String name; - private final String value; - private final int operation; - - public RtemsBuildEnvironmentVariable(String name, String value, int operation) { - this.name = name; - this.value = value; - this.operation = operation; - } - - public String getName() { return name; } - public String getValue() { return value; } - public int getOperation() { return operation; } - public String getDelimiter() { return pathSeparator; } - } - - static { - /* Some useful system properties - - property Description - -------------- --------------------------- - os.name Operating system name - os.arch Operating system architecture - os.version Operating system version - file.separator File separator ("/" on UNIX) - path.separator Path separator (":" on UNIX) - */ - pathSeparator = System.getProperty("path.separator"); - - isOSWindows = false; - String osName = System.getProperty("os.name"); - if (osName != null) { - isOSWindows = osName.indexOf("Windows") >= 0; - } - - drivePrefix = isOSWindows ? "C:" : ""; - - toolPath = getRtemsToolDirectory(); - targetToolPath = getRtemsTargetToolDirectory(); - targetCpuGccLibPath = getRtemsTargetCpuGccLibDirectory(); - installPath = getRtemsInstallDirectory(); - installBspPath = getRtemsInstallBspDirectory(); - - toolChainSupported = toolPath != null && targetToolPath != null - && installPath != null && installBspPath != null - && targetCpuGccLibPath != null; - - StringBuffer binPathBuf = new StringBuffer(); - StringBuffer incPathBuf = new StringBuffer(); - StringBuffer libPathBuf = new StringBuffer(); - - if (toolPath != null) { - binPathBuf = binPathBuf.append(toolPath.append("bin").toOSString()); - } - - if (targetCpuGccLibPath != null) { - if (libPathBuf.length()>0) libPathBuf.append(pathSeparator); - libPathBuf = libPathBuf.append(targetCpuGccLibPath.toOSString()); - - - IPath targetGccVersionPath; - try { - targetGccVersionPath = targetCpuGccLibPath.append(".."); - - IPath gccIncPath = targetGccVersionPath.append("include"); - if (!gccIncPath.toFile().isDirectory()) { - targetGccVersionPath = targetCpuGccLibPath; - } - } catch (Exception e) { - targetGccVersionPath = targetCpuGccLibPath; - } - - if (incPathBuf.length()>0) incPathBuf.append(pathSeparator); - incPathBuf = incPathBuf.append(targetGccVersionPath.append("include").toOSString()); - - incPathBuf.append(pathSeparator); - incPathBuf = incPathBuf.append(targetGccVersionPath.append("include-fixed").toOSString()); - - } - - if (targetToolPath != null) { - if (binPathBuf.length()>0) binPathBuf.append(pathSeparator); - binPathBuf = binPathBuf.append(targetToolPath.append("bin").toOSString()); - - if (incPathBuf.length()>0) incPathBuf.append(pathSeparator); - incPathBuf = incPathBuf.append(targetToolPath.append("include").toOSString()); - - if (libPathBuf.length()>0) libPathBuf.append(pathSeparator); - libPathBuf = libPathBuf.append(targetToolPath.append("lib").toOSString()); - } - - if (installPath != null) { - if (binPathBuf.length()>0) binPathBuf.append(pathSeparator); - binPathBuf = binPathBuf.append(installPath.append("bin").toOSString()); - } - - if (installBspPath != null) { - if (binPathBuf.length()>0) binPathBuf.append(pathSeparator); - binPathBuf = binPathBuf.append(installBspPath.append("build-tools").toOSString()); - - IPath bspLibPath = installBspPath.append("lib"); - if (incPathBuf.length()>0) incPathBuf.append(pathSeparator); - incPathBuf = incPathBuf.append(bspLibPath.append("include").toOSString()); - - if (libPathBuf.length()>0) libPathBuf.append(pathSeparator); - libPathBuf = libPathBuf.append(bspLibPath.toOSString()); - } - - evBinPath = new RtemsBuildEnvironmentVariable("PATH", - binPathBuf.toString(), - IBuildEnvironmentVariable.ENVVAR_PREPEND); - evCIncludePath = new RtemsBuildEnvironmentVariable("C_INCLUDE_PATH", - incPathBuf.toString(), - IBuildEnvironmentVariable.ENVVAR_PREPEND); - //evCppIncludePath = new RtemsBuildEnvironmentVariable("CPLUS_INCLUDE_PATH", - // incPath.toString(), - // IBuildEnvironmentVariable.ENVVAR_PREPEND); - evLibPath = new RtemsBuildEnvironmentVariable("LIBRARY_PATH", - libPathBuf.toString(), - IBuildEnvironmentVariable.ENVVAR_PREPEND); - } - - public RtemsEnvironmentVariableSupplier() { - } - - public IBuildEnvironmentVariable getVariable(String variableName, - IConfiguration configuration, IEnvironmentVariableProvider provider) { - if (evBinPath != null && - variableName.equals(evBinPath.getName())) { - return evBinPath; - - } else if (evLibPath != null && - variableName.equals(evLibPath.getName())) { - return evLibPath; - - } else if (evCIncludePath != null && - variableName.equals(evCIncludePath.getName())) { - return evCIncludePath; - } - - return null; - } - - public IBuildEnvironmentVariable[] getVariables( - IConfiguration configuration, IEnvironmentVariableProvider provider) { - return new IBuildEnvironmentVariable[] { - evBinPath, evCIncludePath, evLibPath }; - } - - public static IPath getRtemsToolDirectory() { - IPath path; - - // Preferred way to get RTEMS Tool directory via environment variable - String dir = System.getenv(ENV_RTEMS_TOOL_DIR); - if (dir != null) { - path = new Path(dir); - if (path.toFile().isDirectory()) return path; - } - - // Try to locate RTEMS Tool directory at /opt/rtems - // User can create such a soft link to point to the latest one - path = new Path(drivePrefix + "/opt/rtems"); - if (path.toFile().isDirectory()) return path; - - // Try RTEMS 4.9 specific tool bin directory - path = new Path(drivePrefix + "/opt/rtems-4.9"); - if (path.toFile().isDirectory()) return path; - - // Still not found - return null; - } - - public static IPath getRtemsTargetToolDirectory() { - IPath path; - - // Preferred way to get RTEMS Target Tool directory via environment variable - String dir = System.getenv(ENV_RTEMS_TARGET_TOOL_DIR); - if (dir != null) { - path = new Path(dir); - if (path.toFile().isDirectory()) return path; - } - - // Try to locate RTEMS Target Tool directory at /opt/rtems/i386-rtems4.9 - // User can create such a soft link to point to the latest one - path = new Path(drivePrefix + "/opt/rtems/i386-rtems4.9"); - if (path.toFile().isDirectory()) return path; - - // Try RTEMS 4.9 specific target tool bin directory - path = new Path(drivePrefix + "/opt/rtems-4.9/i386-rtems4.9"); - if (path.toFile().isDirectory()) return path; - - // Still not found - return null; - } - - public static IPath getRtemsTargetCpuGccLibDirectory() { - IPath path; - - // Preferred way to get RTEMS Target Tool directory via environment variable - String dir = System.getenv(ENV_RTEMS_TARGET_CPU_GCC_LIB_DIR); - if (dir != null) { - path = new Path(dir); - if (path.toFile().isDirectory()) return path; - } - - //Try default RTEMS 4.9 Target Tool bin directory - path = new Path(drivePrefix + "/opt/rtems-4.9/lib/gcc/i386-rtems4.9/4.3.2/mpentiumpro"); - if (path.toFile().isDirectory()) return path; - - // Still not found - return null; - } - - public static IPath getRtemsInstallDirectory() { - IPath path; - - // Preferred way to get RTEMS Install directory via environment variable - String dir = System.getenv(ENV_RTEMS_INSTALL_DIR); - if (dir != null) { - path = new Path(dir); - if (path.toFile().isDirectory()) return path; - } - - // Try /opt/rtems_install - path = new Path(drivePrefix + "/opt/rtems_install"); - if (path.toFile().isDirectory()) return path; - - // Still not found - return null; - } - - public static IPath getRtemsInstallBspDirectory() { - IPath path; - - // Preferred way to get installed target lib directory via environment variable - String dir = System.getenv(ENV_RTEMS_INSTALL_BSP_DIR); - if (dir != null) { - path = new Path(dir); - if (path.toFile().isDirectory()) return path; - } - - // Try /opt/rtems_install/i386-rtems4.9/pc686/lib - path = new Path(drivePrefix + "/opt/rtems_install/i386-rtems4.9/pc686/lib"); - if (path.toFile().isDirectory()) return path; - - // Still not found - return null; - } - - public static IPath getRtemsInstallBspLibDirectory() { - IPath installedBspLibPath = getRtemsInstallBspDirectory(); - - if (installedBspLibPath != null) { - installedBspLibPath = installedBspLibPath.append("lib"); - } - - return installedBspLibPath; - } -} - diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsInstallBspDirectoryValueHandler.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsInstallBspDirectoryValueHandler.java deleted file mode 100644 index 9be247e..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsInstallBspDirectoryValueHandler.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.rtems.cdt.toolchain;
-
-import org.eclipse.cdt.managedbuilder.core.IBuildObject;
-import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
-import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
-import org.eclipse.cdt.managedbuilder.core.IOption;
-import org.eclipse.core.runtime.IPath;
-
-public class RtemsInstallBspDirectoryValueHandler implements IManagedOptionValueHandler {
- private IPath installedBspLibPath; // e.g., /opt/rtems_install/i386-rtems4.9/pc686/lib
-
- public RtemsInstallBspDirectoryValueHandler() {
- installedBspLibPath = RtemsEnvironmentVariableSupplier.getRtemsInstallBspLibDirectory();
- }
-
- /**
- * Handles transfer between values between UI element and
- * back-end in different circumstances.
- *
- * @param configuration build configuration of option
- * (may be IConfiguration or IResourceConfiguration)
- * @param holder contains the holder of the option
- * @param option the option that is handled
- * @param extraArgument extra argument for handler
- * @param event event to be handled, one of the following:
- * (EVENT_OPEN = 1, EVENT_CLOSE = 2,
- * EVENT_SETDEFAULT = 3,
- * EVENT_APPLY = 4, EVENT_LOAD = 5)
- *
- * @return True when the event was handled, false otherwise.
- * This enables default event handling can take place.
- */
- public boolean handleValue(IBuildObject configuration, IHoldsOptions holder,
- IOption option, String extraArgument, int event) {
- if (event == EVENT_CLOSE) return false;
-
- try {
- String optionValue = (String) option.getValue();
- if (optionValue==null || optionValue.trim().length()<=0) {
- option.setValue(installedBspLibPath.toPortableString());
- }
- } catch (Exception e) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Checks whether the value of an option is its default value.
- *
- * @param configuration build configuration of option
- * (may be IConfiguration or IResourceConfiguration)
- * @param holder contains the holder of the option
- * @param option the option that is handled
- * @param extraArgument extra argument for handler
- *
- * The additional options besides configuration are supplied to
- * provide enough information for querying the default value from
- * a potential data storage back-end.
- *
- * @return True if the options value is its default value and
- * False otherwise. This enables that default event handling can
- * take place.
- */
- public boolean isDefaultValue(IBuildObject configuration,
- IHoldsOptions holder, IOption option, String extraArgument) {
- if (installedBspLibPath==null) return false;
-
- return installedBspLibPath.toPortableString().equals(option.getValue());
- }
-
- /**
- * Checks whether an enumeration value of an option is currently a
- * valid choice. The use-case for this method is the case, where
- * the set of valid enumerations in the plugin.xml file changes.
- * The UI will remove entries from selection lists if the value
- * returns false.
- *
- * @param configuration build configuration of option
- * (may be IConfiguration or IResourceConfiguration)
- * @param holder contains the holder of the option
- * @param option the option that is handled
- * @param extraArgument extra argument for handler
- * @param enumValue enumeration value that is to be checked
- *
- * The additional options besides configuration are supplied to
- * provide enough information for querying information from a
- * a potential data storage back-end.
- *
- * @return True if the enumeration value is valid and False
- * otherwise.
- */
- public boolean isEnumValueAppropriate(IBuildObject configuration,
- IHoldsOptions holder, IOption option, String extraArgument,
- String enumValue) {
- // By default return true for all the enum values.
- return true;
- }
-
-}
diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsLinkCommandLineInfo.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsLinkCommandLineInfo.java deleted file mode 100644 index a19fef1..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsLinkCommandLineInfo.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.rtems.cdt.toolchain;
-
-import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo;
-import org.eclipse.cdt.managedbuilder.internal.core.ManagedCommandLineInfo;
-
-public class RtemsLinkCommandLineInfo extends ManagedCommandLineInfo
- implements IManagedCommandLineInfo {
-
- public RtemsLinkCommandLineInfo(String commandLine,
- String commandLinePattern, String commandName, String flags,
- String outputFlag, String outputPrefix, String outputName,
- String inputResources) {
- super(commandLine, commandLinePattern, commandName, flags, outputFlag,
- outputPrefix, outputName, inputResources);
- }
-
- public String getCommandLine() {
- String defaultCmdLine = super.getCommandLine();
- String relObjs = RtemsManagerRelocationLinkHandler.getRelocationLinkObjs();
- return defaultCmdLine + relObjs;
- }
-
-}
diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsManagerRelocationLinkHandler.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsManagerRelocationLinkHandler.java deleted file mode 100644 index 5d41b60..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsManagerRelocationLinkHandler.java +++ /dev/null @@ -1,177 +0,0 @@ -package org.rtems.cdt.toolchain;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.cdt.managedbuilder.core.IBuildObject;
-import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
-import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
-import org.eclipse.cdt.managedbuilder.core.IOption;
-
-public class RtemsManagerRelocationLinkHandler implements
- IManagedOptionValueHandler {
- private static HashMap<String, Boolean> defaultMgrStatusMap = new HashMap<String, Boolean>(32);
- private static HashMap<String, Boolean> mgrStatusMap = new HashMap<String, Boolean>(32);
- private static HashMap<String, String> no_mgr_relMap = new HashMap<String, String>(32);
-
- private static String bspLibDir;
- private static String relocationLinkObjs;
-
- static {
- bspLibDir = " " + RtemsEnvironmentVariableSupplier.
- getRtemsInstallBspLibDirectory().toPortableString() + "/";
-
- defaultMgrStatusMap.put("barrier", Boolean.FALSE);
- defaultMgrStatusMap.put("console", Boolean.TRUE);
- defaultMgrStatusMap.put("dpmem", Boolean.FALSE);
- defaultMgrStatusMap.put("event", Boolean.FALSE);
- defaultMgrStatusMap.put("ext", Boolean.FALSE);
- defaultMgrStatusMap.put("filesystem", Boolean.FALSE);
- defaultMgrStatusMap.put("io", Boolean.TRUE);
- defaultMgrStatusMap.put("mp", Boolean.FALSE);
- defaultMgrStatusMap.put("msg", Boolean.FALSE);
- defaultMgrStatusMap.put("part", Boolean.FALSE);
- defaultMgrStatusMap.put("region", Boolean.FALSE);
- defaultMgrStatusMap.put("rtmon", Boolean.FALSE);
- defaultMgrStatusMap.put("sem", Boolean.FALSE);
- defaultMgrStatusMap.put("signal", Boolean.FALSE);
- defaultMgrStatusMap.put("timer", Boolean.FALSE);
-
- no_mgr_relMap.put("barrier" , "no-barrier.rel");
- no_mgr_relMap.put("console" , "no-console.rel");
- no_mgr_relMap.put("dpmem" , "no-dpmem.rel");
- no_mgr_relMap.put("event" , "no-event.rel");
- no_mgr_relMap.put("ext" , "no-ext.rel");
- no_mgr_relMap.put("filesystem", "no-filesystem.rel");
- no_mgr_relMap.put("io" , "no-io.rel");
- no_mgr_relMap.put("mp" , "no-mp.rel");
- no_mgr_relMap.put("msg" , "no-msg.rel");
- no_mgr_relMap.put("part" , "no-part.rel");
- no_mgr_relMap.put("region" , "no-region.rel");
- no_mgr_relMap.put("rtmon" , "no-rtmon.rel");
- no_mgr_relMap.put("sem" , "no-sem.rel");
- no_mgr_relMap.put("signal" , "no-signal.rel");
- no_mgr_relMap.put("timer" , "no-timer.rel");
- }
-
- public RtemsManagerRelocationLinkHandler() {
- }
-
- /**
- * @return the relocationLinkObjs
- */
- public static synchronized String getRelocationLinkObjs() {
- return relocationLinkObjs;
- }
-
- private static synchronized void updateRelocationLink(String selectedMgrId,
- Boolean enabled) {
- StringBuilder rel = new StringBuilder(1024); // relocation link builder
- mgrStatusMap.put(selectedMgrId, enabled);
-
- for(Iterator<Map.Entry<String, Boolean>>
- i = mgrStatusMap.entrySet().iterator(); i.hasNext(); ) {
- Map.Entry<String, Boolean> entry = (Map.Entry<String, Boolean>) i.next();
-
- String mgrId = (String)entry.getKey();
- Boolean mgrEnabled = (Boolean) entry.getValue();
-
- if (!mgrEnabled.booleanValue()) {
- rel = rel.append(bspLibDir).append( no_mgr_relMap.get(mgrId) );
- }
- }
-
- relocationLinkObjs = rel.toString();
- }
-
- /**
- * Handles transfer between values between UI element and
- * back-end in different circumstances.
- *
- * @param configuration build configuration of option
- * (may be IConfiguration or IResourceConfiguration)
- * @param holder contains the holder of the option
- * @param option the option that is handled
- * @param extraArgument extra argument for handler
- * @param event event to be handled, one of the following:
- * (EVENT_OPEN = 1, EVENT_CLOSE = 2,
- * EVENT_SETDEFAULT = 3,
- * EVENT_APPLY = 4, EVENT_LOAD = 5)
- *
- * @return True when the event was handled, false otherwise.
- * This enables default event handling can take place.
- */
- public boolean handleValue(IBuildObject configuration, IHoldsOptions holder,
- IOption option, String extraArgument, int event) {
- if (event == EVENT_CLOSE) return false;
-
- try {
- String mgrId = extraArgument;
- Boolean enabled = (Boolean) option.getValue();
-
- if (enabled==null) {
- enabled = defaultMgrStatusMap.get(mgrId);
- option.setValue(enabled.booleanValue());
- }
-
- updateRelocationLink(mgrId, enabled);
- } catch (Exception e) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Checks whether the value of an option is its default value.
- *
- * @param configuration build configuration of option
- * (may be IConfiguration or IResourceConfiguration)
- * @param holder contains the holder of the option
- * @param option the option that is handled
- * @param extraArgument extra argument for handler
- *
- * The additional options besides configuration are supplied to
- * provide enough information for querying the default value from
- * a potential data storage back-end.
- *
- * @return True if the options value is its default value and
- * False otherwise. This enables that default event handling can
- * take place.
- */
- public boolean isDefaultValue(IBuildObject configuration,
- IHoldsOptions holder, IOption option, String extraArgument) {
- String mgrId = extraArgument;
- return defaultMgrStatusMap.get(mgrId).equals(option.getValue());
- }
-
- /**
- * Checks whether an enumeration value of an option is currently a
- * valid choice. The use-case for this method is the case, where
- * the set of valid enumerations in the plugin.xml file changes.
- * The UI will remove entries from selection lists if the value
- * returns false.
- *
- * @param configuration build configuration of option
- * (may be IConfiguration or IResourceConfiguration)
- * @param holder contains the holder of the option
- * @param option the option that is handled
- * @param extraArgument extra argument for handler
- * @param enumValue enumeration value that is to be checked
- *
- * The additional options besides configuration are supplied to
- * provide enough information for querying information from a
- * a potential data storage back-end.
- *
- * @return True if the enumeration value is valid and False
- * otherwise.
- */
- public boolean isEnumValueAppropriate(IBuildObject configuration,
- IHoldsOptions holder, IOption option, String extraArgument,
- String enumValue) {
- // By default return true for all the enum values.
- return true;
- }
-
-}
diff --git a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java deleted file mode 100644 index 0f35fc9..0000000 --- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 RobertF - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * RobertF - Initial API and implementation - *******************************************************************************/ -package org.rtems.cdt.toolchain; - -import java.util.Iterator; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; - -import org.eclipse.cdt.make.core.scannerconfig.InfoContext; -import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.Path; -import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3; -import org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector; -import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerConfigUtil; -import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector; -import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil; - -/** - * Implementation class for gathering the built-in compiler settings for - * Rtems-based targets. - * - * @since 5.0.1 - */ -public class RtemsScannerInfoCollector extends PerProjectSICollector - implements IScannerInfoCollector3, IManagedScannerInfoCollector { - // extends DefaultGCCScannerInfoCollector <- has restriction, cannot be used - public static final String ENV_RTEMS_BSP_DEFINED_SYMBOLS = "RTEMS_BSP_DEFINED_SYMBOLS"; - - /* (non-Javadoc) - * @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector#contributeToScannerConfig(java.lang.Object, java.util.Map) - */ - public void contributeToScannerConfig(Object resource, Map scannerInfo) { - - List filteredIncludes = (List) scannerInfo.get(ScannerInfoTypes.INCLUDE_PATHS); - - // This method will be called by the parser each time there is a new value - Iterator pathIter = filteredIncludes.listIterator(); - while (pathIter.hasNext()) { - String incPath = (String) pathIter.next(); - // Could find the switch to disable auto discovery, so filtered - // out MinGW and Cygwin default includes - if (incPath.contains("MinGW") || incPath.contains("mingw") - || incPath.contains("Cygwin") || incPath.contains("cygwin")) { - pathIter.remove(); - } - } - //scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, filteredIncludes); - - List definedSymbols = (List) scannerInfo.get(ScannerInfoTypes.SYMBOL_DEFINITIONS); - - addBspDefinedSymbols(definedSymbols); - - //scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, definedSymbols); - - super.contributeToScannerConfig(resource, scannerInfo); - } - - private static void addBspDefinedSymbols(List definedSymbols) { - if (definedSymbols==null) return; - - String bspSymbols = System.getenv(ENV_RTEMS_BSP_DEFINED_SYMBOLS); - // e.g., "STDC_HEADERS,HAVE_SYS_TYPES_H,HAVE_SYS_STAT_H,HAVE_STDLIB_H..." - //NOTE: it's insufficient to test for a non-null string, thus the test for length>0 - if (bspSymbols != null && bspSymbols.length() > 0) { - String[] macro = bspSymbols.split(","); - for (int i=0; i<macro.length; i++) { - String symbol = macro[i].trim() + "=1"; - if (!definedSymbols.contains(symbol)) definedSymbols.add(symbol); - } - } - } - - public static List<String> getBspDefinedSymbols() { - ArrayList<String> definedSymbols = new ArrayList<String>(); - - addBspDefinedSymbols(definedSymbols); - - return definedSymbols; - } - - /** - * Answers a map of collected defines that the the compiler uses by default. - * The symbols are defined in the map as a (macro, value) pair as follows - * <p><p><code>-DFOO</code> will be stored as ("FOO","") - * <p><code>-DFOO=BAR</code> will be stored as ("FOO","BAR") - * <p><p>Duplicates will not be stored in the map and any whitespaces in - * the macro or value will be trimmed out. - * - * @return a <code>Map</code> of defined symbols and values - */ - /* - public Map getDefinedSymbols() { - HashMap symbolMap = new HashMap(); - - String bspSymbols = System.getenv(ENV_RTEMS_BSP_DEFINED_SYMBOLS); - //String bspSymbols ="STDC_HEADERS,HAVE_SYS_TYPES_H,HAVE_SYS_STAT_H,HAVE_STDLIB_H,HAVE_STRING_H,HAVE_INTTYPES_H,HAVE_STDINT_H,HAVE_UNISTD_H,HAVE_CSTDIO,HAVE_CSTDLIB,HAVE_IOSTREAM"; - - if (bspSymbols != null) { - String[] macro = bspSymbols.split(","); - for (int i=0; i<macro.length; i++) { - symbolMap.put(macro[i].trim(), "1"); - } - } - - return symbolMap; - } - */ - - public void setProject(IProject project) { - super.setProject(project); - } - - public void setInfoContext(InfoContext context) { - super.setInfoContext(context); - } -} diff --git a/org.rtems.cdt.toolchain/templates/hello/src/init.c b/org.rtems.cdt.toolchain/templates/hello/src/init.c deleted file mode 100644 index e02a23c..0000000 --- a/org.rtems.cdt.toolchain/templates/hello/src/init.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#define CONFIGURE_INIT -#include "system.h" -#include <stdio.h> -#include <stdlib.h> - -rtems_task Init( - rtems_task_argument ignored -) -{ - printf( "\n\n*** HELLO WORLD TEST ***\n" ); - printf( "Hello World\n" ); - printf( "*** END OF HELLO WORLD TEST ***\n" ); - exit( 0 ); -} diff --git a/org.rtems.cdt.toolchain/templates/hello/src/system.h b/org.rtems.cdt.toolchain/templates/hello/src/system.h deleted file mode 100644 index a4ac1a5..0000000 --- a/org.rtems.cdt.toolchain/templates/hello/src/system.h +++ /dev/null @@ -1,40 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the test set. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -/* configuration information */ - -#include <bsp.h> /* for device driver prototypes */ - -/* NOTICE: the clock driver is explicitly disabled */ -#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 1 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM - -#include <rtems/confdefs.h> - -/* end of include file */ diff --git a/org.rtems.cdt.toolchain/templates/hello/template.properties b/org.rtems.cdt.toolchain/templates/hello/template.properties deleted file mode 100644 index 9445db7..0000000 --- a/org.rtems.cdt.toolchain/templates/hello/template.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Template Default Values -RTEMS.Hello.Template.Label=RTEMS Hello-World Project -RTEMS.Hello.Template.Label.Description=The prototypical "Hello World" project. Creates a folder for sources and another for include. diff --git a/org.rtems.cdt.toolchain/templates/hello/template.xml b/org.rtems.cdt.toolchain/templates/hello/template.xml deleted file mode 100644 index 62f5c89..0000000 --- a/org.rtems.cdt.toolchain/templates/hello/template.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<template type="ProjTempl" version="1.0" - supplier="www.rtems.com" revision="1.0" - author="chabotd" - copyright="" - id="RTEMSHelloWorldProject" - label="%RTEMS.Hello.Template.Label" - description="%RTEMS.Hello.Template.Label.Description" - help="help.html"> - - <property-group id="basics" label="RTEMS Preferences Overrides" description="Specify per-project RTEMS-preference page overrides." type="PAGES-ONLY" help="help.html"> - <property id="RTEMSInstallDir" - label="RTEMS install directory" - description="This is where the user could override Preference settings" - type="browse" - pattern=".*" - default="/opt/rtems" - hidden="false" - persist="true"/> - <property id="RTEMSTargetArch" - label="Target Architecture" - description="This is where the user could override Preference settings" - type="select" - pattern=".*" - hidden="false" - persist="true"> - <item label="i386" selected="true" name="i386"/> - <item label="m68k" selected="false" name="m68k"/> - <item label="ppc" selected="false" name="ppc"/> - <item label="sparc" selected="false" name="sparc"/> - </property> - <property id="RTEMSBSP" - label="Target BSP" - description="This is where the user could override Preference settings" - type="select" - pattern=".*" - hidden="false" - persist="true"> - <item label="pc386" selected="true" name="pc386"/> - <item label="pc586" selected="false" name="pc586"/> - <item label="pc686" selected="false" name="pc686"/> - </property> - <property id="sourceDir" - label="Source" - description="Directory for project source files" - type="input" - default="src" - pattern="[a-zA-Z0-9]+" - mandatory="false" - persist="true"/> - </property-group> - - <process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject"> - <simple name="name" value="$(projectName)" /> - <simple name="artifactExtension" value="exe" /> - <simple name="isCProject" value="true" /> - </process> - - <process type="org.eclipse.cdt.core.CreateSourceFolder"> - <simple name="projectName" value="$(projectName)"/> - <simple name="path" value="$(sourceDir)"/> - </process> - - <process type="org.eclipse.cdt.core.AddFiles"> - <simple name="projectName" value="$(projectName)"/> - <complex-array name="files"> - <element> - <simple name="source" value="src/init.c"/> - <simple name="target" value="$(sourceDir)/$(projectName).c"/> - <simple name="replaceable" value="true"/> - </element> - <element> - <simple name="source" value="src/system.h"/> - <simple name="target" value="$(sourceDir)/system.h"/> - <simple name="replaceable" value="true"/> - </element> - </complex-array> - </process> - -</template> - diff --git a/org.rtems.cdt.toolchain/templates/serial/src/Basename.c b/org.rtems.cdt.toolchain/templates/serial/src/Basename.c deleted file mode 100644 index def460a..0000000 --- a/org.rtems.cdt.toolchain/templates/serial/src/Basename.c +++ /dev/null @@ -1,162 +0,0 @@ -/*
- * File Name : $(baseName).c
- * Author : $(author)
- * Version :
- * Description : A simple serial and shell test program if defined TEST_COM1;
- * A serial remote debug test program otherwise
- * Copyright : $(copyright)
- */
-
-#define CONFIGURE_INIT
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <string.h> /* String function definitions */
-#include <unistd.h> /* UNIX standard function definitions */
-#include <fcntl.h> /* File control definitions */
-#include <errno.h> /* Error number definitions */
-#include <termios.h> /* POSIX terminal control definitions */
-
-#include <rtems.h>
-#include <rtems/shell.h>
-
-// BSP specific include
-#include <bsp.h>
-#include <bsp/uart.h>
-#include <bsp/tty_drv.h>
-
-
-extern rtems_task Init(rtems_task_argument argument);
-
-#define CONFIGURE_APPLICATION_EXTRA_DRIVERS TTY1_DRIVER_TABLE_ENTRY
-
-#ifdef RTEMS_BSP_HAS_IDE_DRIVER
-#include <libchip/ata.h> /* for ata driver prototype */
-#include <libchip/ide_ctrl.h> /* for general ide driver prototype */
-#endif
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#ifdef RTEMS_BSP_HAS_IDE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
-#endif
-#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
-#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-
-/*
- * these values are higher than needed...
- */
-#define CONFIGURE_MAXIMUM_TASKS 20
-#define CONFIGURE_MAXIMUM_SEMAPHORES 20
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
-#define STACK_CHECKER_ON
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_EXTRA_TASK_STACKS (6 * RTEMS_MINIMUM_STACK_SIZE)
-
-#define CONFIGURE_MALLOC_STATISTICS
-
-
-#include <rtems/confdefs.h>
-
-
-#define CONFIGURE_SHELL_COMMANDS_INIT
-#define CONFIGURE_SHELL_COMMANDS_ALL
-
-#include <rtems/shellconfig.h>
-
-extern int BSPConsolePort;
-
-/* Temporarily worked around the issue with remote_debug in i386.
- "int remote_debug;" is defined in m68k-stub.c, but only declared
- in i386-stub.c. Also except "remote_debug = !(remote_debug);", nowhere else
- value is assigned to remote_debug.
- */
-int remote_debug = 1;
-
-/*
- * Setup GDB as described in c\src\lib\libbsp\i386\shared\comm\GDB.HOWTO.
- *
- * Later found similar function: init_remote_gdb in
- * c\src\lib\libbsp\i386\shared\comm\gdb_glue.c. But it does not fit with the
- * following hardware configuration:
- * there exist VGA console and COM1, but not COM2.
- */
-void setupRemoteGDB(void) {
- // Initialize GDB glue
- /*
- if(BSPConsolePort != BSP_UART_COM2) {
- // If com2 is not used as console use it for debugging
- i386_stub_glue_init(BSP_UART_COM2);
- } else { // Otherwise use com1 */
- i386_stub_glue_init(BSP_UART_COM1);
- //}
-
- // Initialize GDB stub itself
- set_debug_traps();
-
- // Initialize GDB break in capability
- // It has to be called after set_debug_traps
- i386_stub_glue_init_breakin();
-
- // Put breakpoint in
- breakpoint();
-}
-
-void testIO(char *devName) {
- char buffer[256];
-
- #ifdef TEST_COM1
- printf("*** Simple COM1 Test (9600 8N1) ***\n");
- #else
- printf("*** Simple Remote Debug Test ***\n");
- #endif
-
- int fd = open(devName, O_RDWR | O_NOCTTY | _FNDELAY);
-
- int numBytes = write(fd, "Hello, I'm waiting for input...\r\n", 33);
- if (numBytes < 0) {
- printf("\nFailed to write to %s!\n", devName);
- }
-
- numBytes = read(fd, buffer, 255);
- if (numBytes < 0) {
- printf("\nFailed to read from %s!\n", devName);
-
- } else {
- buffer[numBytes] = 0; // terminate
- printf(buffer);
- }
-
- close(fd);
- }
-
-void startShell(void) {
- printf("\n====== starting shell ======\n");
- rtems_shell_init(
- "SHLL", /* task_name */
- RTEMS_MINIMUM_STACK_SIZE * 4, /* task_stacksize */
- 100, /* task_priority */
- "/dev/console", /* devname */
- 0, /* forever */
- 1 /* wait */
- );
-}
-
-rtems_task Init(rtems_task_argument ignored) {
-#ifdef TEST_COM1
- char devName[] = "/dev/ttyS1";
-#else
- char devName[] = "/dev/console";
-
- setupRemoteGDB();
-#endif
-
- testIO(devName);
-
- startShell();
-
- exit( 0 );
-}
diff --git a/org.rtems.cdt.toolchain/templates/serial/template.properties b/org.rtems.cdt.toolchain/templates/serial/template.properties deleted file mode 100644 index 17bc9b2..0000000 --- a/org.rtems.cdt.toolchain/templates/serial/template.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Template Default Values -RTEMS.Serial.Template.Label=RTEMS Serial Remote Debug Project -RTEMS.Serial.Template.Label.Description=A skeletal RTEMS serial remote debug project. Creates a folder for sources and another for include. diff --git a/org.rtems.cdt.toolchain/templates/serial/template.xml b/org.rtems.cdt.toolchain/templates/serial/template.xml deleted file mode 100644 index 39f32b1..0000000 --- a/org.rtems.cdt.toolchain/templates/serial/template.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<template type="ProjTempl" version="1.0" - supplier="RobertF" revision="1.0" - author="" - copyright="" - id="SerialRemoteDebugProject" - label="%RTEMS.Serial.Template.Label" - description="%RTEMS.Serial.Template.Label.Description" - help="help.html"> - - <property-group id="basics" label="Basic Settings" description="Basic properties" type="PAGES-ONLY" help="help.html"> - <property id="author" - label="Author" - description="Name of the author" - type="input" - pattern=".*" - default="Your name here" - hidden="false" - persist="true"/> - <property id="copyright" - label="Copyright notice" - description="Your copyright notice" - type="input" - pattern=".*" - default="Your copyright notice" - hidden="false" - persist="true"/> - <property id="message" - label="message" - description="message" - type="input" - pattern=".*" - default="Hello, I'm waiting for input...\r\n" - hidden="false" - persist="true"/> - <property id="sourceDir" - label="Source" - description="Directory for project source files" - type="input" - default="src" - pattern="[a-zA-Z0-9]+" - mandatory="false" - persist="true"/> - </property-group> - - <process type="org.eclipse.cdt.managedbuilder.core.NewManagedProject"> - <simple name="name" value="$(projectName)" /> - <simple name="artifactExtension" value="exe" /> - <simple name="isCProject" value="true" /> - </process> - - <process type="org.eclipse.cdt.core.CreateSourceFolder"> - <simple name="projectName" value="$(projectName)"/> - <simple name="path" value="$(sourceDir)"/> - </process> - - <process type="org.eclipse.cdt.core.AddFiles"> - <simple name="projectName" value="$(projectName)"/> - <complex-array name="files"> - <element> - <simple name="source" value="src/Basename.c"/> - <simple name="target" value="$(sourceDir)/$(projectName).c"/> - <simple name="replaceable" value="true"/> - </element> - </complex-array> - </process> - -</template> - diff --git a/org.rtems.cdt.toolchain2/.classpath b/org.rtems.cdt.toolchain2/.classpath deleted file mode 100644 index 6c9b5f1..0000000 --- a/org.rtems.cdt.toolchain2/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path=""/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/org.rtems.cdt.toolchain2/.project b/org.rtems.cdt.toolchain2/.project deleted file mode 100644 index fd7552d..0000000 --- a/org.rtems.cdt.toolchain2/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.rtems.cdt.toolchain2</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/org.rtems.cdt.toolchain2/.settings/org.eclipse.jdt.core.prefs b/org.rtems.cdt.toolchain2/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index a24d9b6..0000000 --- a/org.rtems.cdt.toolchain2/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Wed Nov 26 08:27:29 CET 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/org.rtems.cdt.toolchain2/LICENSE b/org.rtems.cdt.toolchain2/LICENSE deleted file mode 100644 index 1d85bbf..0000000 --- a/org.rtems.cdt.toolchain2/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ - LICENSE INFORMATION - -RTEMS is free software; you can redistribute it and/or modify it under -terms of the GNU General Public License as published by the -Free Software Foundation; either version 2, or (at your option) any -later version. RTEMS is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. You should have received -a copy of the GNU General Public License along with RTEMS; see -file COPYING. If not, write to the Free Software Foundation, 675 -Mass Ave, Cambridge, MA 02139, USA. - -As a special exception, including RTEMS header files in a file, -instantiating RTEMS generics or templates, or linking other files -with RTEMS objects to produce an executable application, does not -by itself cause the resulting executable application to be covered -by the GNU General Public License. This exception does not -however invalidate any other reasons why the executable file might be -covered by the GNU Public License. diff --git a/org.rtems.cdt.toolchain2/META-INF/MANIFEST.MF b/org.rtems.cdt.toolchain2/META-INF/MANIFEST.MF deleted file mode 100644 index 68542fa..0000000 --- a/org.rtems.cdt.toolchain2/META-INF/MANIFEST.MF +++ /dev/null @@ -1,21 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: RTEMS CDT Plug-in -Bundle-SymbolicName: org.rtems.cdt.toolchain2;singleton:=true -Bundle-Version: 1.0.0 -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.cdt.managedbuilder.core, - org.eclipse.swt, - org.eclipse.ui, - org.eclipse.core.resources, - org.eclipse.cdt.ui, - org.eclipse.core.runtime, - org.eclipse.cdt.managedbuilder.ui, - org.eclipse.cdt.core -Bundle-Vendor: Embedded Brains GmbH -Import-Package: org.eclipse.cdt.core.model, - org.eclipse.cdt.managedbuilder.ui.wizards, - org.eclipse.jface.resource, - org.eclipse.ui.wizards.newresource -Bundle-Activator: org.rtems.cdt.Activator -Bundle-ActivationPolicy: lazy diff --git a/org.rtems.cdt.toolchain2/README b/org.rtems.cdt.toolchain2/README deleted file mode 100644 index a1f0697..0000000 --- a/org.rtems.cdt.toolchain2/README +++ /dev/null @@ -1,3 +0,0 @@ -DO NOT USE THIS PLUG-IN! - -This project is dead. Use the 'org.rtems.cdt' plug-in instead.
\ No newline at end of file diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/Activator.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/Activator.java deleted file mode 100644 index 7d45944..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/Activator.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt; - -import java.io.BufferedWriter; -import java.io.FileWriter; -import java.io.IOException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -public class Activator extends AbstractUIPlugin { - private static Activator mPlugin; - - public void start( BundleContext context) throws Exception { - super.start( context); - mPlugin = this; - createBSPInfoMakefile(); - } - - public void stop( BundleContext context) throws Exception { - mPlugin = null; - super.stop( context); - } - - public static Activator getDefault() { - return mPlugin; - } - - public IPath getMakefileLocation() { - return getStateLocation(); - } - - private void createBSPInfoMakefile() { - IPath makefile = getMakefileLocation().append( "Makefile"); - BufferedWriter out = null; - try { - out = new BufferedWriter( new FileWriter( makefile.toFile())); - out.write( - "include $(" + Constants.BSP_PATH_MAKE_VARIABLE + ")/Makefile.inc\n" - + "include $(RTEMS_CUSTOM)\n" - + "include $(PROJECT_ROOT)/make/leaf.cfg\n" - + "all:\n" - + "\t@echo " + Constants.TOOL_ARCHIVER_KEY + "\n" - + "\t@for i in $(AR) ; do printf \"\\t%s\\n\" \"$$i\" ; done\n" - + "\t@echo " + Constants.TOOL_ASSEMBLER_KEY + "\n" - + "\t@for i in $(AS) ; do printf \"\\t%s\\n\" \"$$i\" ; done\n" - + "\t@echo " + Constants.TOOL_COMPILER_C_KEY + "\n" - + "\t@for i in $(COMPILE.c) ; do printf \"\\t%s\\n\" \"$$i\" ; done\n" - + "\t@echo " + Constants.TOOL_COMPILER_CPP_KEY + "\n" - + "\t@for i in $(COMPILE.cc) ; do printf \"\\t%s\\n\" \"$$i\" ; done\n" - + "\t@echo " + Constants.TOOL_LINKER_C_KEY + "\n" - + "\t@for i in $(LINK.c) ; do printf \"\\t%s\\n\" \"$$i\" ; done\n" - + "\t@echo " + Constants.TOOL_LINKER_CPP_KEY + "\n" - + "\t@for i in $(LINK.cc) ; do printf \"\\t%s\\n\" \"$$i\" ; done\n" - ); - } catch (IOException e) { - e.printStackTrace(); - } finally { - try { - if (out != null) { - out.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/Constants.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/Constants.java deleted file mode 100644 index 829a5b2..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/Constants.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt; - -import java.util.Map; - -public class Constants { - public static final String PATH_SEPARATOR = System.getProperty( "path.separator"); - - public static final String PATH_VARIABLE_NAME = getPathVariableName(); - - public static final String PLATFORM_DEFAULT = "default"; - - public static final String PLATFORM_CYGWIN = "cygwin"; - - public static final String BSP_PATH_MAKE_VARIABLE = "PROJECT_RELEASE"; - - public static final String DEFAULT_BASE_PATH = "/opt/rtems-4.9"; - - public static final String DEFAULT_BSP_PATH = "/opt/rtems-4.9/powerpc-rtems4.9/psim"; - - public static final String DEFAULT_CYGWIN_PATH = "C:\\"; - - public static final String DEFAULT_MINGW_PATH = "C:\\"; - - public static final String DEFAULT_MSYS_PATH = "C:\\"; - - public static final String KEY_PREFIX = "org.rtems.cdt"; - - public static final String PLATFORM_KEY = KEY_PREFIX + ".platform"; - - public static final String BASE_PATH_KEY = KEY_PREFIX + ".basePath"; - - public static final String BSP_PATH_KEY = KEY_PREFIX + ".bspPath"; - - public static final String CYGWIN_PATH_KEY = KEY_PREFIX + ".cygwinPath"; - - public static final String MINGW_PATH_KEY = KEY_PREFIX + ".mingwPath"; - - public static final String MSYS_PATH_KEY = KEY_PREFIX + ".msysPath"; - - public static final String PATH_PREPEND_KEY = KEY_PREFIX + ".pathPrepend"; - - public static final String TOOL_KEY_PREFIX = KEY_PREFIX + ".tool"; - - public static final String TOOL_ARCHIVER_KEY = TOOL_KEY_PREFIX + ".archiver"; - - public static final String TOOL_ASSEMBLER_KEY = TOOL_KEY_PREFIX + ".assembler"; - - public static final String COMPILER_KEY_PREFIX = TOOL_KEY_PREFIX + ".compiler"; - - public static final String TOOL_COMPILER_C_KEY = COMPILER_KEY_PREFIX + ".c"; - - public static final String TOOL_COMPILER_CPP_KEY = COMPILER_KEY_PREFIX + ".cpp"; - - public static final String LINKER_KEY_PREFIX = TOOL_KEY_PREFIX + ".linker"; - - public static final String TOOL_LINKER_C_KEY = LINKER_KEY_PREFIX + ".c"; - - public static final String TOOL_LINKER_CPP_KEY = LINKER_KEY_PREFIX + ".cpp"; - - public static final String TOOL_OPTIONS_KEY_POSTFIX = ".options"; - - public static final String TOOL_OPTIONS_ARCHIVER_KEY = TOOL_ARCHIVER_KEY + TOOL_OPTIONS_KEY_POSTFIX; - - public static final String TOOL_OPTIONS_ASSEMBLER_KEY = TOOL_ASSEMBLER_KEY + TOOL_OPTIONS_KEY_POSTFIX; - - public static final String TOOL_OPTIONS_COMPILER_C_KEY = TOOL_COMPILER_C_KEY + TOOL_OPTIONS_KEY_POSTFIX; - - public static final String TOOL_OPTIONS_COMPILER_CPP_KEY = TOOL_COMPILER_CPP_KEY + TOOL_OPTIONS_KEY_POSTFIX; - - public static final String TOOL_OPTIONS_LINKER_C_KEY = TOOL_LINKER_C_KEY + TOOL_OPTIONS_KEY_POSTFIX; - - public static final String TOOL_OPTIONS_LINKER_CPP_KEY = TOOL_LINKER_CPP_KEY + TOOL_OPTIONS_KEY_POSTFIX; - - private static String getPathVariableName() { - Map<String, String> env = System.getenv(); - for (String name : env.keySet()) { - if (name.equalsIgnoreCase( "PATH")) { - return name; - } - } - - return "PATH"; - } - - private Constants() { - // Do nothing - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/Storage.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/Storage.java deleted file mode 100644 index a1c2190..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/Storage.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext; -import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager; -import org.eclipse.cdt.core.model.CoreModel; -import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; -import org.eclipse.cdt.core.settings.model.ICProjectDescription; -import org.eclipse.cdt.managedbuilder.core.IConfiguration; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.QualifiedName; - -public class Storage { - private static final String OPTION_SEPARATOR = "\0"; - - private static final String VALUE_START_TOKEN = "\t"; - - private static final int EXPECT_OPTION = 0; - - private static final int EXPECT_COMMAND = 1; - - private static final int EXPECT_KEY = 2; - - private static final int TOOL_COMPLETE = 3; - - public static String getPreference( String key) { - return Activator.getDefault().getPreferenceStore().getString( key); - } - - public static String getPristineProperty( IProject project, String key) { - String value = null; - - try { - value = project.getPersistentProperty( new QualifiedName( "", key)); - } catch (CoreException e) { - e.printStackTrace(); - } - - return value; - } - - public static String getProperty( IProject project, String key) { - String value = getPristineProperty( project, key); - - if (value == null) { - if (key.startsWith( Constants.TOOL_KEY_PREFIX)) { - changePlatform( project, Constants.PLATFORM_DEFAULT); - } else { - value = getPreference( key); - setProperty( project, key, value); - } - } - - return value; - } - - public static void setProperty( IProject project, String key, String value) { - try { - project.setPersistentProperty( new QualifiedName( "", key), value); - } catch (CoreException e) { - e.printStackTrace(); - } - } - - public static IConfiguration [] getConfigurations( IProject project) { - ICProjectDescription pd = CoreModel.getDefault().getProjectDescription( project); - - ICConfigurationDescription cds [] = pd.getConfigurations(); - IConfiguration cfgs [] = new IConfiguration [cds.length]; - for (int i = 0; i < cds.length; ++i) { - cfgs [i] = ManagedBuildManager.getConfigurationForDescription( cds [i]); - } - - return cfgs; - } - - public static IConfiguration getActiveConfiguration( IProject project) { - ICProjectDescription pd = CoreModel.getDefault().getProjectDescription( project); - - ICConfigurationDescription cd = pd.getActiveConfiguration(); - IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription( cd); - - return cfg; - } - - public static String prependToPath( String path, String part) { - if (path == null || path.isEmpty()) { - return part; - } else { - return part + Constants.PATH_SEPARATOR + path; - } - } - - public static String prependToPathByPreference( String path, String key) { - String basePath = getPreference( key); - - if (basePath != null) { - IPath part = new Path( basePath).append( "bin"); - - return prependToPath( path, part.toOSString()); - } - - return path; - } - - public static String prependToPathByProperty( IProject project, String path, String key) { - String basePath = getProperty( project, key); - - if (basePath != null) { - IPath part = new Path( basePath).append( "bin"); - - return prependToPath( path, part.toOSString()); - } - - return path; - } - - public static void clearPlatform( IProject project) { - setProperty( project, Constants.PLATFORM_KEY, null); - - // Delete discovered paths for all configurations of the project - for (IConfiguration cfg : getConfigurations( project)) { - CfgDiscoveredPathManager.getInstance().removeDiscoveredInfo( - project, - new CfgInfoContext( cfg) - ); - } - } - - public static String getPlatform( IProject project) { - return getPristineProperty( project, Constants.PLATFORM_KEY); - } - - public static void changePlatform( IProject project, String newPlatform) { - String platform = getPlatform( project); - - // Check if we have already the requested platform - if (platform != null && platform == newPlatform) { - // Nothing to do - return; - } - - // Set new platform - setProperty( project, Constants.PLATFORM_KEY, newPlatform); - - // Update path prepends - String path = null; - if (Platform.getOS().equals( Platform.OS_WIN32)) { - if (newPlatform.equals( Constants.PLATFORM_CYGWIN)) { - path = prependToPathByPreference( path, Constants.CYGWIN_PATH_KEY); - } else { - path = prependToPathByPreference( path, Constants.MINGW_PATH_KEY); - path = prependToPathByPreference( path, Constants.MSYS_PATH_KEY); - } - } - path = prependToPathByProperty( project, path, Constants.BASE_PATH_KEY); - setProperty( project, Constants.PATH_PREPEND_KEY, path); - - // Update tools - updateTools( project, newPlatform); - } - - private static void updateTools( IProject project, String platform) { - String bspPath = getProperty( project, Constants.BSP_PATH_KEY); - IPath make = new Path( "make"); - - // Translate path if necessary - if (Platform.getOS().equals( Platform.OS_WIN32)) { - if (platform.equals( Constants.PLATFORM_CYGWIN)) { - String s [] = bspPath.split( ":"); - if (s.length > 0) { - bspPath = bspPath.replaceFirst( "^" + s [0] + ":", "/cygdrive/" + s [0]); - } - } - bspPath = bspPath.replaceAll( "\\\\", "/"); - } - - // Create make process builder - ProcessBuilder pb = new ProcessBuilder(); - - // Change working directory to the Makefile location - pb.directory( Activator.getDefault().getMakefileLocation().toFile()); - - // Update path environment variable - Map<String, String> env = pb.environment(); - String path = env.get( Constants.PATH_VARIABLE_NAME); - String part = getProperty( project, Constants.PATH_PREPEND_KEY); - path = Storage.prependToPath( path, part); - env.put( Constants.PATH_VARIABLE_NAME, path); - - // On windows we have to search for the make program in the new path environment - if (Platform.getOS().equals( Platform.OS_WIN32)) { - String parts [] = path.split( Constants.PATH_SEPARATOR); - for (String p : parts) { - IPath makeCandidate = new Path( p).append( "make.exe"); - File file = new File( makeCandidate.toOSString()); - if (file.exists()) { - make = makeCandidate; - break; - } - } - } - - // Set command line - pb.command( - make.toOSString(), - Constants.BSP_PATH_MAKE_VARIABLE + "=" + bspPath - ); - - // Start make process and parse its output - Process p = null; - try { - p = pb.start(); - InputStream is = p.getInputStream(); - BufferedReader br = new BufferedReader( new InputStreamReader( is)); - String line = br.readLine(); - String key = null; - String command = null; - List<String> options = new LinkedList<String>(); - int state = EXPECT_KEY; - while (line != null) { - switch (state) { - case EXPECT_OPTION: - if (line.startsWith( VALUE_START_TOKEN)) { - options.add( line.substring( 1)); - } else { - state = TOOL_COMPLETE; - continue; - } - break; - case EXPECT_COMMAND: - if (line.startsWith( VALUE_START_TOKEN)) { - command = line.substring( 1); - state = EXPECT_OPTION; - } else { - throw new IOException( "Unexpected line format"); - } - break; - case EXPECT_KEY: - if (line.length() > Constants.TOOL_KEY_PREFIX.length()) { - key = line; - state = EXPECT_COMMAND; - } else { - throw new IOException( "Unexpected line format"); - } - break; - case TOOL_COMPLETE: - updateTool( project, key, command, options); - options.clear(); - state = EXPECT_KEY; - continue; - default: - throw new IOException( "Unexpected state"); - } - line = br.readLine(); - } - if (state == EXPECT_OPTION) { - updateTool( project, key, command, options); - } - } catch (IOException e) { - e.printStackTrace(); - } finally { - while (true) { - try { - p.waitFor(); - break; - } catch (InterruptedException e) { - continue; - } - } - } - } - - private static void updateTool( IProject project, String toolKey, String command, List<String> options) { - List<String> filteredOptions = new LinkedList<String>(); - - // Filter options - if (toolKey.startsWith( Constants.COMPILER_KEY_PREFIX) || toolKey.startsWith( Constants.LINKER_KEY_PREFIX)) { - for (String option : options) { - if (!(option.isEmpty() || option.trim().matches( "^-c|-O[0123s]|-g|-W[\\w-]*$"))) { - filteredOptions.add( option); - } - } - } else { - filteredOptions = options; - } - - // Transform filtered option list into option string value - String optionsValue = new String(); - if (!options.isEmpty()) { - optionsValue = filteredOptions.get( 0); - filteredOptions.remove( 0); - } - for (String option : filteredOptions) { - optionsValue += OPTION_SEPARATOR + option; - } - - // Set properties - setProperty( project, toolKey, command); - setProperty( project, toolKey + Constants.TOOL_OPTIONS_KEY_POSTFIX, optionsValue); - } - - public static String [] getToolOptions( IProject project, String toolKey) { - String optionsValue = getProperty( project, toolKey + Constants.TOOL_OPTIONS_KEY_POSTFIX); - - return optionsValue.split( OPTION_SEPARATOR); - } - - private Storage() { - // Do nothing - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/VolatilePreferenceStore.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/VolatilePreferenceStore.java deleted file mode 100644 index eca7053..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/VolatilePreferenceStore.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt; - -import java.io.OutputStream; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferenceStore; - -public class VolatilePreferenceStore extends PreferenceStore implements IPreferenceStore { - public void save() { - // Do nothing - } - - public void save( OutputStream out, String header) { - // Do nothing - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java deleted file mode 100644 index 9fa7bdd..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CommandLineGenerator.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.build; - -import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator; -import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineInfo; -import org.eclipse.cdt.managedbuilder.core.ITool; -import org.eclipse.cdt.managedbuilder.internal.core.ManagedCommandLineGenerator; -import org.eclipse.core.resources.IProject; -import org.rtems.cdt.Constants; -import org.rtems.cdt.Storage; - -public class CommandLineGenerator extends ManagedCommandLineGenerator implements IManagedCommandLineGenerator { - protected String getPlatform() { - return Constants.PLATFORM_DEFAULT; - } - - public IManagedCommandLineInfo generateCommandLineInfo( - ITool tool, - String commandName, - String [] userOptions, - String outputFlag, - String outputPrefix, - String outputName, - String [] inputResources, - String commandLinePattern - ) { - // Get associated project of the tool - IProject project = (IProject) tool.getParentResourceInfo().getParent().getOwner(); - - // Change platform - Storage.changePlatform( project, getPlatform()); - - // Determine tool key via the tool ID - String id = tool.getId(); - String toolKey = "gcc"; - if (id.contains( "archiver")) { - toolKey = Constants.TOOL_ARCHIVER_KEY; - } else if (id.contains( "assembler")) { - toolKey = Constants.TOOL_ASSEMBLER_KEY; - } else if (id.contains( "compiler.cpp")) { - toolKey = Constants.TOOL_COMPILER_CPP_KEY; - } else if (id.contains( "compiler.c")) { - toolKey = Constants.TOOL_COMPILER_C_KEY; - } else if (id.contains( "linker.cpp")) { - toolKey = Constants.TOOL_LINKER_CPP_KEY; - } else if (id.contains( "linker.c")) { - toolKey = Constants.TOOL_LINKER_C_KEY; - } - - // Set command name - commandName = Storage.getProperty( project, toolKey); - tool.setToolCommand( commandName); - - // Combine tool and user options - String [] toolOptions = Storage.getToolOptions( project, toolKey); - String options [] = new String [toolOptions.length + userOptions.length]; - System.arraycopy( toolOptions, 0, options, 0, toolOptions.length); - System.arraycopy( userOptions, 0, options, toolOptions.length, userOptions.length); - - return super.generateCommandLineInfo( - tool, - commandName, - options, - outputFlag, - outputPrefix, - outputName, - inputResources, - commandLinePattern - ); - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinCommandLineGenerator.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinCommandLineGenerator.java deleted file mode 100644 index b7012e6..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinCommandLineGenerator.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.build; - -import org.rtems.cdt.Constants; - -public class CygwinCommandLineGenerator extends CommandLineGenerator { - protected String getPlatform() { - return Constants.PLATFORM_CYGWIN; - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinEnvironmentSupplier.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinEnvironmentSupplier.java deleted file mode 100644 index cb0ecac..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinEnvironmentSupplier.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.build; - -import org.rtems.cdt.Constants; - -public class CygwinEnvironmentSupplier extends EnvironmentSupplier { - protected String getPlatform() { - return Constants.PLATFORM_CYGWIN; - } -}
\ No newline at end of file diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinRunScannerInfoProvider.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinRunScannerInfoProvider.java deleted file mode 100644 index 75027c3..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinRunScannerInfoProvider.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.build; - -import org.rtems.cdt.Constants; - -public class CygwinRunScannerInfoProvider extends RunScannerInfoProvider { - protected String getPlatform() { - return Constants.PLATFORM_CYGWIN; - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinScannerInfoCollector.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinScannerInfoCollector.java deleted file mode 100644 index 56e627d..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/CygwinScannerInfoCollector.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.build; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.cdt.make.core.scannerconfig.InfoContext; -import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3; -import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes; -import org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector; -import org.eclipse.cdt.make.internal.core.scannerconfig.util.CygpathTranslator; -import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector; -import org.eclipse.core.resources.IProject; - -/** - * This class exists only to disable the specialized UI elements of the scanner configuration. - * - * See also 'org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector'. - */ -public class CygwinScannerInfoCollector extends PerProjectSICollector implements IScannerInfoCollector3, IManagedScannerInfoCollector { - private IProject mProject; - - public void contributeToScannerConfig( Object resource, Map scannerInfo) { - List<String> includes = (List<String>) scannerInfo.get( ScannerInfoTypes.INCLUDE_PATHS); - List<String> translatedIncludes = CygpathTranslator.translateIncludePaths( mProject, includes); - - Iterator<String> iter = translatedIncludes.listIterator(); - while (iter.hasNext()) { - String convertedPath = iter.next(); - if (convertedPath.startsWith( "/")) { - iter.remove(); - } - } - scannerInfo.put( ScannerInfoTypes.INCLUDE_PATHS, translatedIncludes); - - super.contributeToScannerConfig( resource, scannerInfo); -} - - public void setProject( IProject project) { - mProject = project; - super.setProject( project); - } - - public void setInfoContext( InfoContext context) { - mProject = context.getProject(); - super.setInfoContext( context); - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/EnvironmentSupplier.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/EnvironmentSupplier.java deleted file mode 100644 index acde119..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/EnvironmentSupplier.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.build; - -import org.eclipse.core.resources.IProject; -import org.eclipse.cdt.managedbuilder.core.IConfiguration; -import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable; -import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier; -import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider; -import org.eclipse.cdt.managedbuilder.internal.envvar.BuildEnvVar; -import org.rtems.cdt.Constants; -import org.rtems.cdt.Storage; - -public class EnvironmentSupplier implements IConfigurationEnvironmentVariableSupplier { - private static final int PATH_INDEX = 0; - - private static final int VARIABLE_COUNT = 1; - - protected String getPlatform() { - return Constants.PLATFORM_DEFAULT; - } - - public IBuildEnvironmentVariable getVariable( String name, IConfiguration configuration, IEnvironmentVariableProvider provider) { - if (name.equals( "PATH")) { - IProject project = (IProject) configuration.getOwner(); - - // Change platform - Storage.changePlatform( project, getPlatform()); - - // Get path parts - String part = Storage.getProperty( project, Constants.PATH_PREPEND_KEY); - - return new BuildEnvVar( name, part, IBuildEnvironmentVariable.ENVVAR_PREPEND, Constants.PATH_SEPARATOR); - } - - return null; - } - - public IBuildEnvironmentVariable [] getVariables( IConfiguration configuration, IEnvironmentVariableProvider provider) { - IBuildEnvironmentVariable variables [] = new IBuildEnvironmentVariable [VARIABLE_COUNT]; - - variables [PATH_INDEX] = getVariable( "PATH", configuration, provider); - - return variables; - } -}
\ No newline at end of file diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/RunScannerInfoProvider.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/build/RunScannerInfoProvider.java deleted file mode 100644 index 1e11df3..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/build/RunScannerInfoProvider.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.build; - -import org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Path; -import org.rtems.cdt.Constants; -import org.rtems.cdt.Storage; - -public class RunScannerInfoProvider extends GCCSpecsRunSIProvider { - protected String getPlatform() { - return Constants.PLATFORM_DEFAULT; - } - - protected boolean initialize() { - if (!super.initialize()) { - return false; - } - - IProject project = resource.getProject(); - - /* - * FIXME: This is a hack to avoid to early discovery of internal - * compiler include paths and symbols. The discovery is suppressed for - * empty projects which contain only the '.project' and '.cproject' - * files. - */ - try { - if (project.members().length < 3) { - return false; - } - } catch (CoreException e) { - e.printStackTrace(); - return false; - } - - // Change platform - Storage.changePlatform( project, getPlatform()); - - /* - * FIXME: Added absolute path since it seams that the build - * environment is ignored. - */ - fCompileCommand = new Path( - Storage.getProperty( project, Constants.BASE_PATH_KEY) - ); - fCompileCommand = fCompileCommand.append( "bin"); - fCompileCommand = fCompileCommand.append( - Storage.getProperty( project, Constants.TOOL_COMPILER_C_KEY) - ); - - // Add the standard options to the command arguments - String options [] = Storage.getToolOptions( project, Constants.TOOL_COMPILER_C_KEY); - String newCompileArguments [] = new String [options.length + fCompileArguments.length]; - System.arraycopy( options, 0, newCompileArguments, 0, options.length); - System.arraycopy( fCompileArguments, 0, newCompileArguments, options.length, fCompileArguments.length); - fCompileArguments = newCompileArguments; - - return true; - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferenceInitializer.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferenceInitializer.java deleted file mode 100644 index c15343b..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferenceInitializer.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.preferences; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; -import org.rtems.cdt.Activator; -import org.rtems.cdt.Constants; - -public class PreferenceInitializer extends AbstractPreferenceInitializer { - public void initializeDefaultPreferences() { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - store.setDefault( Constants.BASE_PATH_KEY, Constants.DEFAULT_BASE_PATH); - store.setDefault( Constants.BSP_PATH_KEY, Constants.DEFAULT_BSP_PATH); - if (Platform.getOS().equals( Platform.OS_WIN32)) { - store.setDefault( Constants.CYGWIN_PATH_KEY, Constants.DEFAULT_CYGWIN_PATH); - store.setDefault( Constants.MINGW_PATH_KEY, Constants.DEFAULT_MINGW_PATH); - store.setDefault( Constants.MSYS_PATH_KEY, Constants.DEFAULT_MSYS_PATH); - } - } -} diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferencePage.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferencePage.java deleted file mode 100644 index efe214c..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/preferences/PreferencePage.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.preferences; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.IWorkbench; -import org.rtems.cdt.Activator; -import org.rtems.cdt.Constants; - -public class PreferencePage - extends FieldEditorPreferencePage - implements IWorkbenchPreferencePage { - public PreferencePage() { - super( GRID); - setPreferenceStore( Activator.getDefault().getPreferenceStore()); - setDescription( "Select the RTEMS base installation path and the board support package (BSP) installation path. This provides the default values for all projects."); - } - - public void createFieldEditors() { - addField( - new DirectoryFieldEditor( - Constants.BASE_PATH_KEY, - "Base path:", - getFieldEditorParent() - ) - ); - addField( - new DirectoryFieldEditor( - Constants.BSP_PATH_KEY, - "BSP path:", - getFieldEditorParent() - ) - ); - if (Platform.getOS().equals( Platform.OS_WIN32)) { - addField( - new DirectoryFieldEditor( - Constants.CYGWIN_PATH_KEY, - "Cygwin path:", - getFieldEditorParent() - ) - ); - addField( - new DirectoryFieldEditor( - Constants.MINGW_PATH_KEY, - "MinGW path:", - getFieldEditorParent() - ) - ); - addField( - new DirectoryFieldEditor( - Constants.MSYS_PATH_KEY, - "MSYS path:", - getFieldEditorParent() - ) - ); - } - } - - public void init( IWorkbench workbench) { - // Do nothing - } -}
\ No newline at end of file diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/properties/PropertyPage.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/properties/PropertyPage.java deleted file mode 100644 index 65365e3..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/properties/PropertyPage.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.properties; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.ui.IWorkbenchPropertyPage; -import org.eclipse.cdt.core.model.ICElement; -import org.rtems.cdt.Activator; -import org.rtems.cdt.Constants; -import org.rtems.cdt.Storage; -import org.rtems.cdt.VolatilePreferenceStore; - -public class PropertyPage extends FieldEditorPreferencePage implements IWorkbenchPropertyPage { - private IAdaptable mElement; - - private IPreferenceStore mStore; - - private IProject mProject; - - public PropertyPage() { - super( GRID); - - // Store properties in a volatile preference store - mStore = new VolatilePreferenceStore(); - setPreferenceStore( mStore); - - setDescription( "You can change the RTEMS base installation path and the board support package (BSP) installation path. This affects only the current project."); - } - - private void setupStoreValue( IPreferenceStore defaultStore, String key) { - mStore.setDefault( key, defaultStore.getString( key)); - mStore.setValue( key, Storage.getProperty( mProject, key)); - } - - protected void createFieldEditors() { - // Get current project - mProject = ((IResource) getElement().getAdapter( IResource.class)).getProject(); - if (mProject == null) { - mProject = ((ICElement) getElement().getAdapter( ICElement.class)).getCProject().getProject(); - } - - // Get the default values from the current workbench preferences - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - - // Setup store values - setupStoreValue( store, Constants.BASE_PATH_KEY); - setupStoreValue( store, Constants.BSP_PATH_KEY); - - // Add field editors - addField( - new DirectoryFieldEditor( - Constants.BASE_PATH_KEY, - "Base path:", - getFieldEditorParent() - ) - ); - addField( - new DirectoryFieldEditor( - Constants.BSP_PATH_KEY, - "BSP path:", - getFieldEditorParent() - ) - ); - } - - private void setProperty( String key) { - Storage.setProperty( mProject, key, mStore.getString( key)); - } - - public boolean performOk() { - super.performOk(); - - // Set the new properties - setProperty( Constants.BASE_PATH_KEY); - setProperty( Constants.BSP_PATH_KEY); - - // Clear platform - Storage.clearPlatform( mProject); - - return true; - } - - public IAdaptable getElement() { - return mElement; - } - - public void setElement( IAdaptable element) { - this.mElement = element; - } -}
\ No newline at end of file diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/BasicSetup.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/BasicSetup.java deleted file mode 100644 index d6794fe..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/BasicSetup.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.wizards; - -import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage; -import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager; -import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard; -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.DirectoryDialog; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Text; -import org.eclipse.swt.SWT; -import org.rtems.cdt.Constants; -import org.rtems.cdt.Storage; - -public class BasicSetup extends MBSCustomPage { - public static final String PAGE_ID = "org.rtems.cdt.wizards.BasicSetup"; - - public static final String BROWSE = " &Browse... "; - - private Composite mComposite; - - private Text mBasePath; - - private Text mBSPPath; - - public BasicSetup() { - pageID = PAGE_ID; - } - - public boolean canFlipToNextPage() { - return MBSCustomPageManager.getNextPage( pageID) != null; - } - - public String getName() { - return "Basic Setup Page"; - } - - public void createControl( Composite parent) { - // Create base widget - mComposite = new Composite( parent, SWT.NONE); - - GridData gd = new GridData( GridData.FILL_BOTH); - mComposite.setLayoutData( gd); - - GridLayout layout = new GridLayout(); - layout.numColumns = 3; - mComposite.setLayout( layout); - - // Base path - Label label = new Label( mComposite, SWT.LEFT); - label.setText( "Base path:"); - - mBasePath = new Text( mComposite, SWT.LEFT | SWT.BORDER); - gd = new GridData( GridData.FILL_HORIZONTAL); - mBasePath.setLayoutData( gd); - - Button button = new Button( mComposite, SWT.PUSH); - button.setText( BROWSE); - button.addSelectionListener( - new SelectionAdapter() { - public void widgetSelected( SelectionEvent e) { - browseForPath( mBasePath); - } - } - ); - - // BSP path - label = new Label( mComposite, SWT.LEFT); - label.setText( "BSP path:"); - - mBSPPath = new Text( mComposite, SWT.LEFT | SWT.BORDER); - gd = new GridData( GridData.FILL_HORIZONTAL); - mBSPPath.setLayoutData( gd); - - button = new Button( mComposite, SWT.PUSH); - button.setText( BROWSE); - button.addSelectionListener( - new SelectionAdapter() { - public void widgetSelected( SelectionEvent e) { - browseForPath( mBSPPath); - } - } - ); - - // Connect user input - mBasePath.addModifyListener( - new ModifyListener() { - public void modifyText( ModifyEvent e) { - basePathChanged(); - } - } - ); - mBSPPath.addModifyListener( - new ModifyListener() { - public void modifyText( ModifyEvent e) { - bspPathChanged(); - } - } - ); - - // Trigger initial setup - basePathChanged(); - bspPathChanged(); - } - - public void dispose() { - mComposite.dispose(); - } - - public Control getControl() { - return mComposite; - } - - public String getDescription() { - return "Select the RTEMS base installation path and the board support package (BSP) installation path."; - } - - public String getErrorMessage() { - return null; - } - - public Image getImage() { - return wizard.getDefaultPageImage(); - } - - public String getMessage() { - return null; - } - - public String getTitle() { - return "RTEMS Setup"; - } - - public void performHelp() { - // Do nothing - } - - public void setDescription( String description) { - // Do nothing - } - - public void setImageDescriptor( ImageDescriptor image) { - // Do nothing - } - - public void setTitle( String title) { - // Do nothing - } - - public void setVisible( boolean visible) { - // Get current project - CDTCommonProjectWizard wizard = (CDTCommonProjectWizard) getWizard(); - IProject project = wizard.getLastProject(); - - /* - * Here we have to take care about the synchronization between the wizard - * and the properties of the new project (advanced settings dialog). - */ - if (visible) { - if (project != null) { - // For already created projects use the properties - mBasePath.setText( Storage.getProperty( project, Constants.BASE_PATH_KEY)); - mBSPPath.setText( Storage.getProperty( project, Constants.BSP_PATH_KEY)); - } else { - // For not yet created projects use the preferences - mBasePath.setText( Storage.getPreference( Constants.BASE_PATH_KEY)); - mBSPPath.setText( Storage.getPreference( Constants.BSP_PATH_KEY)); - } - } else { - if (project != null) { - // Store the wizard values in the properties if the project exists already - Storage.setProperty( project, Constants.BASE_PATH_KEY, mBasePath.getText()); - Storage.setProperty( project, Constants.BSP_PATH_KEY, mBSPPath.getText()); - } - } - - mComposite.setVisible( visible); - } - - protected boolean isCustomPageComplete() { - return true; - } - - private void browseForPath( Text text) { - DirectoryDialog dialog = new DirectoryDialog( mComposite.getShell(), SWT.NONE); - dialog.setFilterPath( text.getText()); - String path = dialog.open(); - if (path != null) { - text.setText( path); - } - } - - private void basePathChanged() { - MBSCustomPageManager.addPageProperty( pageID, Constants.BASE_PATH_KEY, mBasePath.getText()); - } - - private void bspPathChanged() { - MBSCustomPageManager.addPageProperty( pageID, Constants.BSP_PATH_KEY, mBSPPath.getText()); - } -}
\ No newline at end of file diff --git a/org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/FinishSetup.java b/org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/FinishSetup.java deleted file mode 100644 index 6b37412..0000000 --- a/org.rtems.cdt.toolchain2/org/rtems/cdt/wizards/FinishSetup.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de - * - * The license and distribution terms for this file may be found in the file - * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. - */ - -package org.rtems.cdt.wizards; - -import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager; -import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard; -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.wizard.IWizardPage; -import org.rtems.cdt.Constants; -import org.rtems.cdt.Storage; - -public class FinishSetup implements Runnable { - public void run() { - // Get a handle to the wizard - IWizardPage [] pages = MBSCustomPageManager.getPages(); - - if (pages != null && pages.length > 0) { - // Get last project - CDTCommonProjectWizard wizard = (CDTCommonProjectWizard) pages [0].getWizard(); - IProject project = wizard.getLastProject(); - - // Get wizard values - String basePath = (String) MBSCustomPageManager.getPageProperty( - BasicSetup.PAGE_ID, Constants.BASE_PATH_KEY - ); - String bspPath = (String) MBSCustomPageManager.getPageProperty( - BasicSetup.PAGE_ID, Constants.BSP_PATH_KEY - ); - - // Set project properties - Storage.setProperty( project, Constants.BASE_PATH_KEY, basePath); - Storage.setProperty( project, Constants.BSP_PATH_KEY, bspPath); - - // Clear platform - Storage.clearPlatform( project); - } - } -} diff --git a/org.rtems.cdt.toolchain2/plugin.xml b/org.rtems.cdt.toolchain2/plugin.xml deleted file mode 100644 index 05d2b3a..0000000 --- a/org.rtems.cdt.toolchain2/plugin.xml +++ /dev/null @@ -1,377 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.2"?> -<!-- - Copyright (c) 2008 - Embedded Brains GmbH - Obere Lagerstr. 30 - D-82178 Puchheim - Germany - rtems@embedded-brains.de - - The license and distribution terms for this file may be found in the file - LICENSE in this distribution or at http://www.rtems.com/license/LICENSE. ---> -<plugin> - <!-- Scanner Configuration Discovery Profiles --> - <extension - id="RtemsSCDProfile" - name="RTEMS Scanner Configuration Discovery Profile" - point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> - <scannerInfoCollector - class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector" - scope="project"/> - <buildOutputProvider> - <open/> - <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/> - </buildOutputProvider> - <scannerInfoProvider providerId="specsFile"> - <run - arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" - class="org.rtems.cdt.build.RunScannerInfoProvider"/> - <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/> - </scannerInfoProvider> - </extension> - <extension - id="RtemsSCDProfileC" - name="RTEMS Scanner Configuration Discovery Profile" - point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> - <scannerInfoCollector - class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector" - scope="project"/> - <buildOutputProvider> - <open/> - <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/> - </buildOutputProvider> - <scannerInfoProvider providerId="specsFile"> - <run - arguments="-E -P -v -dD ${plugin_state_location}/specs.c" - class="org.rtems.cdt.build.RunScannerInfoProvider"/> - <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/> - </scannerInfoProvider> - </extension> - <extension - id="RtemsSCDProfileCPP" - name="RTEMS Scanner Configuration Discovery Profile" - point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> - <scannerInfoCollector - class="org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector" - scope="project"/> - <buildOutputProvider> - <open/> - <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/> - </buildOutputProvider> - <scannerInfoProvider providerId="specsFile"> - <run - arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" - class="org.rtems.cdt.build.RunScannerInfoProvider"/> - <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/> - </scannerInfoProvider> - </extension> - <extension - id="RtemsSCDProfileWin" - name="RTEMS Scanner Configuration Discovery Profile (Windows)" - point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> - <scannerInfoCollector - class="org.rtems.cdt.build.CygwinScannerInfoCollector" - scope="project"/> - <buildOutputProvider> - <open/> - <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/> - </buildOutputProvider> - <scannerInfoProvider providerId="specsFile"> - <run - arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" - class="org.rtems.cdt.build.CygwinRunScannerInfoProvider"/> - <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/> - </scannerInfoProvider> - </extension> - <extension - id="RtemsSCDProfileWinC" - name="RTEMS Scanner Configuration Discovery Profile (Windows)" - point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> - <scannerInfoCollector - class="org.rtems.cdt.build.CygwinScannerInfoCollector" - scope="project"/> - <buildOutputProvider> - <open/> - <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/> - </buildOutputProvider> - <scannerInfoProvider providerId="specsFile"> - <run - arguments="-E -P -v -dD ${plugin_state_location}/specs.c" - class="org.rtems.cdt.build.CygwinRunScannerInfoProvider"/> - <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/> - </scannerInfoProvider> - </extension> - <extension - id="RtemsSCDProfileWinCPP" - name="RTEMS Scanner Configuration Discovery Profile (Windows)" - point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile"> - <scannerInfoCollector - class="org.rtems.cdt.build.CygwinScannerInfoCollector" - scope="project"/> - <buildOutputProvider> - <open/> - <scannerInfoConsoleParser class="org.eclipse.cdt.managedbuilder.internal.scannerconfig.ManagedGCCScannerInfoConsoleParser"/> - </buildOutputProvider> - <scannerInfoProvider providerId="specsFile"> - <run - arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" - class="org.rtems.cdt.build.CygwinRunScannerInfoProvider"/> - <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/> - </scannerInfoProvider> - </extension> - - <!-- Build Definitions --> - <extension - id="org.rtems.cdt.build" - point="org.eclipse.cdt.managedbuilder.core.buildDefinitions"> - - <!-- Configuration --> - <configuration - id="org.rtems.cdt.config.base" - name="RTEMS Configuration" - cleanCommand="rm -rf" - artifactExtension="exe"> - <enablement type="CONTAINER_ATTRIBUTE" - attribute="artifactExtension" - value="a" - extensionAdjustment="false"> - <checkBuildProperty - property="org.eclipse.cdt.build.core.buildArtefactType" - value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> - </enablement> - </configuration> - - <!-- Toolchain (Standard) --> - <toolChain - archList="all" - configurationEnvironmentSupplier="org.rtems.cdt.build.EnvironmentSupplier" - id="org.rtems.cdt.toolchain" - name="RTEMS Toolchain" - osList="all" - scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfile" - targetTool="org.rtems.cdt.linker.c;org.rtems.cdt.linker.cpp;org.rtems.cdt.archiver"> - <targetPlatform - id="org.rtems.cdt.target" - name="RTEMS Target" - binaryParser="org.eclipse.cdt.core.ELF" - osList="all" - archList="all"> - </targetPlatform> - <builder - id="org.rtems.cdt.builder" - superClass="cdt.managedbuild.target.gnu.builder"/> - <tool - id="org.rtems.cdt.assembler" - superClass="cdt.managedbuild.tool.gnu.assembler" - commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> - </tool> - <tool - id="org.rtems.cdt.compiler.c" - superClass="cdt.managedbuild.tool.gnu.c.compiler" - commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> - <inputType - id="org.rtems.cdt.compiler.input.c" - superClass="cdt.managedbuild.tool.gnu.c.compiler.input" - scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileC"/> - </tool> - <tool - id="org.rtems.cdt.compiler.cpp" - superClass="cdt.managedbuild.tool.gnu.cpp.compiler" - commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> - <inputType - id="org.rtems.cdt.compiler.cpp.input" - superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input" - scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileCPP"/> - </tool> - <tool - id="org.rtems.cdt.linker.c" - superClass="cdt.managedbuild.tool.gnu.c.linker" - commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> - <enablement type="ALL"> - <not> - <checkBuildProperty - property="org.eclipse.cdt.build.core.buildArtefactType" - value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> - </not> - </enablement> - </tool> - <tool - id="org.rtems.cdt.linker.cpp" - superClass="cdt.managedbuild.tool.gnu.cpp.linker" - commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> - <enablement type="ALL"> - <not> - <checkBuildProperty - property="org.eclipse.cdt.build.core.buildArtefactType" - value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> - </not> - </enablement> - </tool> - <tool - id="org.rtems.cdt.archiver" - superClass="cdt.managedbuild.tool.gnu.archiver" - commandLineGenerator="org.rtems.cdt.build.CommandLineGenerator"> - <enablement type="ALL"> - <checkBuildProperty - property="org.eclipse.cdt.build.core.buildArtefactType" - value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> - </enablement> - </tool> - </toolChain> - - <!-- Toolchain (Cygwin) --> - <toolChain - id="org.rtems.cdt.toolchain.cygwin" - name="RTEMS Toolchain (Cygwin)" - archList="all" - osList="win32" - targetTool="org.rtems.cdt.linker.c.cygwin;org.rtems.cdt.linker.cpp.cygwin;org.rtems.cdt.archiver.cygwin" - configurationEnvironmentSupplier="org.rtems.cdt.build.CygwinEnvironmentSupplier" - isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.cygwin.IsGnuCygwinToolChainSupported" - scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWin"> - <targetPlatform - id="org.rtems.cdt.target.cygwin" - name="RTEMS Target" - binaryParser="org.eclipse.cdt.core.ELF" - osList="all" - archList="all"> - </targetPlatform> - <builder - id="org.rtems.cdt.builder.cygwin" - superClass="cdt.managedbuild.target.gnu.builder"/> - <tool - id="org.rtems.cdt.assembler.cygwin" - superClass="cdt.managedbuild.tool.gnu.assembler" - commandLineGenerator="org.rtems.cdt.build.CygwinCommandLineGenerator"> - </tool> - <tool - id="org.rtems.cdt.compiler.c.cygwin" - superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin" - commandLineGenerator="org.rtems.cdt.build.CygwinCommandLineGenerator"> - <inputType - id="org.rtems.cdt.compiler.input.c.cygwin" - superClass="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin" - scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWinC"/> - </tool> - <tool - id="org.rtems.cdt.compiler.cpp.cygwin" - superClass="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin" - commandLineGenerator="org.rtems.cdt.build.CygwinCommandLineGenerator"> - <inputType - id="org.rtems.cdt.compiler.cpp.input.cygwin" - scannerConfigDiscoveryProfileId="org.rtems.cdt.toolchain2.RtemsSCDProfileWinCPP" - superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin"/> - </tool> - <tool - id="org.rtems.cdt.linker.c.cygwin" - superClass="cdt.managedbuild.tool.gnu.c.linker.cygwin" - commandLineGenerator="org.rtems.cdt.build.CygwinCommandLineGenerator"> - <enablement type="ALL"> - <not> - <checkBuildProperty - property="org.eclipse.cdt.build.core.buildArtefactType" - value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> - </not> - </enablement> - </tool> - <tool - id="org.rtems.cdt.linker.cpp.cygwin" - superClass="cdt.managedbuild.tool.gnu.cpp.linker.cygwin" - commandLineGenerator="org.rtems.cdt.build.CygwinCommandLineGenerator"> - <enablement type="ALL"> - <not> - <checkBuildProperty - property="org.eclipse.cdt.build.core.buildArtefactType" - value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> - </not> - </enablement> - </tool> - <tool - id="org.rtems.cdt.archiver.cygwin" - superClass="cdt.managedbuild.tool.gnu.archiver" - commandLineGenerator="org.rtems.cdt.build.CygwinCommandLineGenerator"> - <enablement type="ALL"> - <checkBuildProperty - property="org.eclipse.cdt.build.core.buildArtefactType" - value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/> - </enablement> - </tool> - </toolChain> - - <!-- Project Type --> - <projectType - buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" - id="org.rtems.cdt.projectType" - name="RTEMS Executable"> - <configuration - id="org.rtems.cdt.config" - name="RTEMS Executable Configuration" - parent="org.rtems.cdt.config.base"> - <toolChain - id="org.rtems.cdt.config.toolchain" - superClass="org.rtems.cdt.toolchain"> - </toolChain> - </configuration> - <configuration - id="org.rtems.cdt.config.cygwin" - name="RTEMS Executable Configuration" - parent="org.rtems.cdt.config.base"> - <toolChain - id="org.rtems.cdt.config.toolchain.cygwin" - superClass="org.rtems.cdt.toolchain.cygwin"> - </toolChain> - </configuration> - </projectType> - </extension> - - <!-- New Project Wizard --> - <extension - point="org.eclipse.cdt.managedbuilder.ui.newWizardPages"> - <wizardPage - ID="org.rtems.cdt.wizards.BasicSetup" - operationClass="org.rtems.cdt.wizards.FinishSetup" - pageClass="org.rtems.cdt.wizards.BasicSetup"/> - </extension> - - <!-- Preferences --> - <extension - point="org.eclipse.ui.preferencePages"> - <page - category="org.eclipse.cdt.ui.preferences.CPluginPreferencePage" - class="org.rtems.cdt.preferences.PreferencePage" - id="org.rtems.cdt.preferences.PreferencePage" - name="RTEMS"> - </page> - </extension> - <extension - point="org.eclipse.core.runtime.preferences"> - <initializer - class="org.rtems.cdt.preferences.PreferenceInitializer"/> - </extension> - - <!-- Properties --> - <extension - point="org.eclipse.ui.propertyPages"> - <page - category="org.eclipse.cdt.managedbuilder.ui.properties.Page_head_build" - class="org.rtems.cdt.properties.PropertyPage" - id="org.rtems.cdt.properties.PropertyPage" - name="RTEMS"> - <filter - name="projectNature" - value="org.eclipse.cdt.managedbuilder.core.managedBuildNature"/> - <enabledWhen> - <or> - <instanceof value="org.eclipse.cdt.core.model.ICContainer"/> - <instanceof value="org.eclipse.cdt.core.model.ICProject"/> - <instanceof value="org.eclipse.cdt.core.model.ITranslationUnit"/> - <instanceof value="org.eclipse.core.resources.IFile"/> - <instanceof value="org.eclipse.core.resources.IFolder"/> - <instanceof value="org.eclipse.core.resources.IProject"/> - </or> - </enabledWhen> - </page> - </extension> -</plugin> |