Skip to content

Commit

Permalink
merge from arm_port and memory protection branch and some additionnal…
Browse files Browse the repository at this point in the history
… work
  • Loading branch information
ilias committed Apr 10, 2009
1 parent c0166cf commit 53c716b
Show file tree
Hide file tree
Showing 184 changed files with 820 additions and 5,577 deletions.
56 changes: 56 additions & 0 deletions .cdtproject
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-cdt version="2.0"?>

<cdtproject id="org.eclipse.cdt.make.core.make">
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<data>
<item id="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="false" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="false"/>
</scannerInfoProvider>
</profile>
</item>
<item id="org.eclipse.cdt.core.pathentry">
<pathentry kind="src" path=""/>
<pathentry kind="out" path=""/>
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
</item>
</data>
</cdtproject>
81 changes: 81 additions & 0 deletions .project
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Trampoline</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.make.core.makeBuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.command</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.target.inc</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.arguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.environment</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.target.auto</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.target.clean</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.core.errorOutputParser</key>
<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.make.core.makeNature</nature>
<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
</natures>
</projectDescription>
3 changes: 3 additions & 0 deletions .settings/org.eclipse.cdt.core.prefs
@@ -0,0 +1,3 @@
#Thu Apr 09 13:46:34 CEST 2009
eclipse.preferences.version=1
indexerId=org.eclipse.cdt.core.fastIndexer
92 changes: 92 additions & 0 deletions App/defaultAppSimtec.oil
@@ -0,0 +1,92 @@
OIL_VERSION = "2.5" : "test" ;

IMPLEMENTATION trampoline {
TASK {
UINT32 STACKSIZE = 32768 ;
UINT32 PRIORITY = 1 ;
} ;
ISR {
UINT32 STACKSIZE = 32768 ;
} ;
};

CPU test {

OS config {
SYSTEM_CALL = TRUE;
POWEROF2QUEUE = TRUE;
STATUS = EXTENDED;
ERRORHOOK = TRUE;
PRETASKHOOK = TRUE;
APP_SRC = "tpl_default_tasks_simtec.c";
TRAMPOLINE_BASE_PATH = "..";
CFLAGS = "-g";
CFLAGS = "-Wall -pedantic -Wformat -std=c99";
CFLAGS = "-Wmissing-field-initializers"; // -arch ppc";
ASFLAGS = "";
LDFLAGS = "-g --script=../machines/arm/simtec-eb675001/ldscript.bdi2000 -Map trampoline_memory.map";
} ;


APPMODE std {
};

TASK periodicTask {
PRIORITY = 5;
AUTOSTART = FALSE;
ACTIVATION = 1;
SCHEDULE = FULL;
RESOURCE = r1;
};

//default tick is 50 ms
COUNTER counter100ms {
TICKSPERBASE = 2;
MAXALLOWEDVALUE = 10;
MINCYCLE = 1;
/* TYPE = HARDWARE {}; */
};

ALARM alarm1s {
COUNTER = counter100ms;
ACTION = ACTIVATETASK {
TASK = periodicTask;
};
AUTOSTART = TRUE {
ALARMTIME = 1;
CYCLETIME = 10; //each 1000 ms.
APPMODE = std;
};
};

ALARM alarmevent {
COUNTER = counter100ms;
ACTION = SETEVENT {
TASK = t2;
EVENT = evt1;
};
AUTOSTART = TRUE {
ALARMTIME = 1;
CYCLETIME = 10; //each 1000 ms.
APPMODE = std;
};
};

EVENT evt1 { MASK=AUTO; };

RESOURCE r1 { RESOURCEPROPERTY = STANDARD; };
RESOURCE r2 { RESOURCEPROPERTY = STANDARD; };
};

CPU test {

TASK t2 {
PRIORITY = 3;
AUTOSTART = FALSE;
ACTIVATION = 4;
SCHEDULE = FULL;
STACKSIZE = 16000;
RESOURCE = r2;
EVENT = evt1 ;
};
} ;
103 changes: 103 additions & 0 deletions App/simple_simtec.c
@@ -0,0 +1,103 @@
#include <stdio.h>
#include "tpl_os.h"
#include "tpl_os_generated_configuration.h"

#define TRACE(val) flags[count++] = val

int flags[10] = {0};
int count = 0;

int main(void)
{
StartOS(OSDEFAULTAPPMODE);
return 0;
}

void ErrorHook(StatusType error)
{
}

void PreTaskHook(void)
{
/* FIXME */
/* TaskType id;
GetTaskID(&id);*/
}

void PostTaskHook(void)
{
/* TaskType id;
GetTaskID(&id);*/
}

void StartupHook(void)
{
}

void ShutdownHook(StatusType error)
{
}

void trap_func(void)
{

}

TASK(t4)
{
TRACE(6);
trap_func ();
TerminateTask ();
trap_func ();
}

ISR(it2)
{
TRACE(5);
trap_func ();
ActivateTask (t4);
TRACE(5);
trap_func ();
TerminateISR2 ();
trap_func ();
}

ISR(it1)
{
TRACE(4);
trap_func ();
TerminateISR2 ();
trap_func ();
}

TASK(t3)
{
TRACE(3);
trap_func ();
TerminateTask ();
trap_func ();
}

TASK(t2)
{
TRACE(2);
trap_func ();
ActivateTask (t3);
trap_func ();
TRACE(2);
TerminateTask ();
trap_func ();
}

TASK(t1)
{
TRACE(1);
trap_func ();
ActivateTask (t2);
trap_func ();
TRACE(1);
TerminateTask();
trap_func ();
}


0 comments on commit 53c716b

Please sign in to comment.