summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2git <rtems-devel@rtems.org>2008-11-24 03:01:04 +0000
committercvs2git <rtems-devel@rtems.org>2008-11-24 03:01:04 +0000
commit48e45f46d243b0c5abb7454f252ca8c09b90b742 (patch)
treeef668daf00a8fd4dafc613b43debc1a7724cd439
parentInitial import. (diff)
downloadrtems-eclipse-plug-in-48e45f46d243b0c5abb7454f252ca8c09b90b742.tar.bz2
This commit was manufactured by cvs2svn to create tag 'v0_1'.v0_1
Sprout from initial-import 2008-11-20 16:33:19 UTC Joel Sherrill <joel.sherrill@OARcorp.com> 'Initial import.' Cherrypick from master 2008-11-24 03:01:03 UTC Daron Chabot <daron.chabot@gmail.com> 'Clean up of plugin.xml and addition of simpler, "Hello World" template.': org.rtems.cdt.toolchain/.classpath org.rtems.cdt.toolchain/plugin.xml 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
-rw-r--r--org.rtems.cdt.toolchain/.classpath16
-rw-r--r--org.rtems.cdt.toolchain/plugin.xml62
-rw-r--r--org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java3
-rw-r--r--org.rtems.cdt.toolchain/templates/hello/src/init.c36
-rw-r--r--org.rtems.cdt.toolchain/templates/hello/src/system.h40
-rw-r--r--org.rtems.cdt.toolchain/templates/hello/template.properties3
-rw-r--r--org.rtems.cdt.toolchain/templates/hello/template.xml81
7 files changed, 193 insertions, 48 deletions
diff --git a/org.rtems.cdt.toolchain/.classpath b/org.rtems.cdt.toolchain/.classpath
index 2409da5..64c5e31 100644
--- a/org.rtems.cdt.toolchain/.classpath
+++ b/org.rtems.cdt.toolchain/.classpath
@@ -1,9 +1,7 @@
-<?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="lib" path="C:/java/eclipseSDK/plugins/org.eclipse.cdt.core.lrparser_5.0.1.200809120802.jar"/>
- <classpathentry kind="lib" path="C:/java/eclipseSDK/plugins/org.eclipse.cdt.core.parser.upc_5.0.0.200809120802.jar"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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/plugin.xml b/org.rtems.cdt.toolchain/plugin.xml
index 66a67d7..7dde72a 100644
--- a/org.rtems.cdt.toolchain/plugin.xml
+++ b/org.rtems.cdt.toolchain/plugin.xml
@@ -70,18 +70,18 @@
id="cdt.managedbuild.toolchain.gnu.rtems.base"
name="RTEMS Toolchain"
archList="all"
- osList="win32"
+ 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
- id="cdt.managedbuild.target.gnu.platform.rtems.base"
- name="Target Platform RTEMS"
- binaryParser="org.eclipse.cdt.core.PE"
- osList="win32"
- archList="all">
+ 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
@@ -144,7 +144,7 @@
valueType="string">
</option>
<option
- defaultValue="-qrtems -D_REENTRANT -c -fmessage-length=0"
+ defaultValue="-qrtems -c -fmessage-length=0"
id="rtems.gnu.c.compiler.option.misc.other"
superClass="gnu.c.compiler.option.misc.other">
</option>
@@ -190,7 +190,7 @@
valueType="string">
</option>
<option
- defaultValue="-qrtems -D_REENTRANT -c -fmessage-length=0"
+ defaultValue="-qrtems -c -fmessage-length=0"
id="rtems.gnu.cpp.compiler.option.other.other"
superClass="gnu.cpp.compiler.option.other.other">
</option>
@@ -379,23 +379,10 @@
valueType="string">
</option>
<option
- defaultValue="-qrtems -D_REENTRANT"
+ defaultValue="-qrtems"
id="rtems.gnu.c.link.option.ldflags"
superClass="gnu.c.link.option.ldflags">
</option>
- <option
- defaultValue="true"
- name="%RTEMS.C.Linker.Shared.Libgcc"
- category="gnu.c.link.category.shared"
- command="-shared-libgcc"
- id="rtems.gnu.c.link.option.shared.libgcc"
- valueType="boolean">
- </option>
- <outputType
- id="cdt.managedbuild.tool.gnu.c.linker.rtems.so.output.base"
- superClass="cdt.managedbuild.tool.gnu.c.linker.output.so"
- outputs="dll">
- </outputType>
</tool>
<tool
@@ -578,24 +565,11 @@
valueType="string">
</option>
<option
- defaultValue="-qrtems -D_REENTRANT"
- id="rtems.gnu.cpp.link.option.other.flags"
- superClass="gnu.cpp.link.option.flags">
+ defaultValue="-qrtems"
+ id="rtems.gnu.cpp.link.option.ldflags"
+ superClass="gnu.c.link.option.ldflags">
</option>
- <option
- defaultValue="true"
- name="%RTEMS.CPP.Linker.Shared.Libgcc"
- category="gnu.cpp.link.category.shared"
- command="-shared-libgcc"
- id="rtems.gnu.cpp.link.option.shared.libgcc"
- valueType="boolean">
- </option>
- <outputType
- id="cdt.managedbuild.tool.gnu.cpp.linker.rtems.so.output.base"
- superClass="cdt.managedbuild.tool.gnu.cpp.linker.output.so"
- outputs="dll">
- </outputType>
</tool>
</toolChain>
@@ -744,6 +718,12 @@
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
@@ -754,6 +734,12 @@
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/RtemsScannerInfoCollector.java b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java
index e074544..0f35fc9 100644
--- a/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java
+++ b/org.rtems.cdt.toolchain/src/org/rtems/cdt/toolchain/RtemsScannerInfoCollector.java
@@ -72,7 +72,8 @@ public class RtemsScannerInfoCollector extends PerProjectSICollector
String bspSymbols = System.getenv(ENV_RTEMS_BSP_DEFINED_SYMBOLS);
// e.g., "STDC_HEADERS,HAVE_SYS_TYPES_H,HAVE_SYS_STAT_H,HAVE_STDLIB_H..."
- if (bspSymbols != null) {
+ //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";
diff --git a/org.rtems.cdt.toolchain/templates/hello/src/init.c b/org.rtems.cdt.toolchain/templates/hello/src/init.c
new file mode 100644
index 0000000..e02a23c
--- /dev/null
+++ b/org.rtems.cdt.toolchain/templates/hello/src/init.c
@@ -0,0 +1,36 @@
+/* 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
new file mode 100644
index 0000000..a4ac1a5
--- /dev/null
+++ b/org.rtems.cdt.toolchain/templates/hello/src/system.h
@@ -0,0 +1,40 @@
+/* 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
new file mode 100644
index 0000000..9445db7
--- /dev/null
+++ b/org.rtems.cdt.toolchain/templates/hello/template.properties
@@ -0,0 +1,3 @@
+#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
new file mode 100644
index 0000000..62f5c89
--- /dev/null
+++ b/org.rtems.cdt.toolchain/templates/hello/template.xml
@@ -0,0 +1,81 @@
+<?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>
+