]> git.sur5r.net Git - freertos/commitdiff
Add Cortus demo.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 24 Mar 2010 11:24:21 +0000 (11:24 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 24 Mar 2010 11:24:21 +0000 (11:24 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1001 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTUS_APS3_GCC/.cproject [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/.project [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/BSP_ProjectForDebugging.zip [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/CreateProjectDirectoryStructure.bat [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/Demo/7seg.c [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/Demo/7seg.h [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/Demo/ParTest.c [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/Demo/demoGpio.h [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/Demo/main.c [new file with mode: 0644]
Demo/CORTUS_APS3_GCC/Demo/serial.c [new file with mode: 0644]

diff --git a/Demo/CORTUS_APS3_GCC/.cproject b/Demo/CORTUS_APS3_GCC/.cproject
new file mode 100644 (file)
index 0000000..fafcfb7
--- /dev/null
@@ -0,0 +1,527 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<?fileVersion 4.0.0?>\r
+\r
+<cproject>\r
+<storageModule moduleId="org.eclipse.cdt.core.settings">\r
+<cconfiguration id="aps.managedbuild.project.exe.config.debug.77227718">\r
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="aps.managedbuild.project.exe.config.debug.77227718" moduleId="org.eclipse.cdt.core.settings" name="Debug">\r
+<externalSettings/>\r
+<extensions>\r
+<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+</extensions>\r
+</storageModule>\r
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+<configuration artifactName="FreeRTOS" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="aps.managedbuild.project.exe.config.debug.77227718" name="Debug" parent="aps.managedbuild.project.exe.config.debug">\r
+<folderInfo id="aps.managedbuild.project.exe.config.debug.77227718." name="/" resourcePath="">\r
+<toolChain id="aps.managedbuild.exe.config.debug.toolchain.705347401" name="APS3 Tool Chain" superClass="aps.managedbuild.exe.config.debug.toolchain">\r
+<targetPlatform id="aps.managedbuild.exe.config.debug.toolchain.targetplatform.1736682702" name="APS3 Platform" superClass="aps.managedbuild.exe.config.debug.toolchain.targetplatform"/>\r
+<builder buildPath="${workspace_loc:/FreeRTOS/Debug}" id="aps.managedbuild.exe.config.debug.toolchain.builder.1190272241" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make for APS" stopOnErr="true" superClass="aps.managedbuild.exe.config.debug.toolchain.builder"/>\r
+<tool id="aps.managedbuild.toolchain.assembler.1922538025" name="APS3 Assembler" superClass="aps.managedbuild.toolchain.assembler">\r
+<inputType id="aps.managedbuild.tool.assembler.input.1540065745" superClass="aps.managedbuild.tool.assembler.input"/>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.c.compiler.320865439" name="APS3 C Compiler" superClass="aps.managedbuild.toolchain.c.compiler">\r
+<option defaultValue="aps.c.optimization.level.optimize" id="aps.c.compiler.option.optimization.level.1183272934" name="Optimization Level" superClass="aps.c.compiler.option.optimization.level" value="aps.c.optimization.level.none" valueType="enumerated"/>\r
+<option id="aps.c.compiler.option.include.paths.1169759315" name="Include paths (-I)" superClass="aps.c.compiler.option.include.paths" valueType="includePath">\r
+<listOptionValue builtIn="false" value="../Demo/Common/include"/>\r
+<listOptionValue builtIn="false" value="../Demo"/>\r
+<listOptionValue builtIn="false" value="../Source/include"/>\r
+<listOptionValue builtIn="false" value="../Source/portable/GCC/CORTUS_APS3"/>\r
+</option>\r
+<option id="aps.c.compiler.option.misc.other.330923733" name="Other flags" superClass="aps.c.compiler.option.misc.other" value="" valueType="string"/>\r
+<inputType id="aps.managedbuild.tool.c.compiler.input.846359435" superClass="aps.managedbuild.tool.c.compiler.input"/>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.cpp.compiler.1844253933" name="APS3 C++ Compiler" superClass="aps.managedbuild.toolchain.cpp.compiler">\r
+<option defaultValue="aps.c.optimization.level.optimize" id="aps.cpp.compiler.option.optimization.level.1060405565" name="Optimization Level" superClass="aps.cpp.compiler.option.optimization.level" valueType="enumerated"/>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.c.linker.2020114858" name="APS3 C Linker" superClass="aps.managedbuild.toolchain.c.linker">\r
+<inputType id="aps.managedbuild.tool.c.linker.input.95153467" superClass="aps.managedbuild.tool.c.linker.input">\r
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>\r
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>\r
+</inputType>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.cpp.linker.570426443" name="APS3 C++ Linker" superClass="aps.managedbuild.toolchain.cpp.linker"/>\r
+<tool id="aps.managedbuild.toolchain.archiver.2059949874" name="APS3 Librarian" superClass="aps.managedbuild.toolchain.archiver"/>\r
+</toolChain>\r
+</folderInfo>\r
+<sourceEntries>\r
+<entry excluding="Demo/Common/crhook.c|Demo/Common/crflash.c|Demo/Common/climon.c|Demo/Common/cliFatCmds.c|Demo/Common/IntQueue.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+</sourceEntries>\r
+</configuration>\r
+</storageModule>\r
+<storageModule moduleId="scannerConfiguration">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="aps3-gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="aps3-make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<scannerConfigBuildInfo instanceId="aps.managedbuild.project.exe.config.debug.77227718;aps.managedbuild.project.exe.config.debug.77227718.;aps.managedbuild.toolchain.c.compiler.320865439;aps.managedbuild.tool.c.compiler.input.846359435">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.cortus.builddefinitions.APS3PerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="aps3-gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="aps3-make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+</scannerConfigBuildInfo>\r
+</storageModule>\r
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>\r
+<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>\r
+</cconfiguration>\r
+<cconfiguration id="aps.managedbuild.project.exe.config.release.1342017762">\r
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="aps.managedbuild.project.exe.config.release.1342017762" moduleId="org.eclipse.cdt.core.settings" name="Release">\r
+<externalSettings/>\r
+<extensions>\r
+<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>\r
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+</extensions>\r
+</storageModule>\r
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+<configuration artifactName="FreeRTOS" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="aps.managedbuild.project.exe.config.release.1342017762" name="Release" parent="aps.managedbuild.project.exe.config.release" preannouncebuildStep="Rebuild C library and crt0-jtag.o if necessary" prebuildStep="make prebuild">\r
+<folderInfo id="aps.managedbuild.project.exe.config.release.1342017762." name="/" resourcePath="">\r
+<toolChain id="aps.managedbuild.exe.config.rel.toolchain.1154376887" name="APS3 Tool Chain" superClass="aps.managedbuild.exe.config.rel.toolchain">\r
+<targetPlatform id="aps.managedbuild.exe.config.rel.toolchain.targetplatform.944411008" name="APS3 Platform" superClass="aps.managedbuild.exe.config.rel.toolchain.targetplatform"/>\r
+<builder buildPath="${workspace_loc:/FreeRTOS/Release}" id="aps.managedbuild.exe.config.rel.toolchain.builder.1564405757" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make for APS" superClass="aps.managedbuild.exe.config.rel.toolchain.builder"/>\r
+<tool id="aps.managedbuild.toolchain.assembler.2117821479" name="APS3 Assembler" superClass="aps.managedbuild.toolchain.assembler">\r
+<inputType id="aps.managedbuild.tool.assembler.input.1291864346" superClass="aps.managedbuild.tool.assembler.input"/>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.c.compiler.101966342" name="APS3 C Compiler" superClass="aps.managedbuild.toolchain.c.compiler">\r
+<option defaultValue="aps.c.optimization.level.size" id="aps.c.compiler.option.optimization.level.374767543" name="Optimization Level" superClass="aps.c.compiler.option.optimization.level" valueType="enumerated"/>\r
+<option id="aps.c.compiler.option.include.paths.31240964" name="Include paths (-I)" superClass="aps.c.compiler.option.include.paths" valueType="includePath">\r
+<listOptionValue builtIn="false" value="../Demo/Common/include"/>\r
+<listOptionValue builtIn="false" value="../Demo/CORTUS_APS3_GCC"/>\r
+<listOptionValue builtIn="false" value="../Source/include"/>\r
+<listOptionValue builtIn="false" value="../Source/portable/GCC/CORTUS_APS3"/>\r
+</option>\r
+<inputType id="aps.managedbuild.tool.c.compiler.input.1715146867" superClass="aps.managedbuild.tool.c.compiler.input"/>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.cpp.compiler.399777207" name="APS3 C++ Compiler" superClass="aps.managedbuild.toolchain.cpp.compiler">\r
+<option defaultValue="aps.c.optimization.level.size" id="aps.cpp.compiler.option.optimization.level.735472277" name="Optimization Level" superClass="aps.cpp.compiler.option.optimization.level" valueType="enumerated"/>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.c.linker.1546591287" name="APS3 C Linker" superClass="aps.managedbuild.toolchain.c.linker">\r
+<inputType id="aps.managedbuild.tool.c.linker.input.1700836906" superClass="aps.managedbuild.tool.c.linker.input">\r
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>\r
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>\r
+</inputType>\r
+</tool>\r
+<tool id="aps.managedbuild.toolchain.cpp.linker.1669982255" name="APS3 C++ Linker" superClass="aps.managedbuild.toolchain.cpp.linker"/>\r
+<tool id="aps.managedbuild.toolchain.archiver.605551981" name="APS3 Librarian" superClass="aps.managedbuild.toolchain.archiver"/>\r
+</toolChain>\r
+</folderInfo>\r
+<sourceEntries>\r
+<entry excluding="Demo/Common/crhook.c|Demo/Common/crflash.c|Demo/Common/climon.c|Demo/Common/cliFatCmds.c|Demo/Common/IntQueue.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+</sourceEntries>\r
+</configuration>\r
+</storageModule>\r
+<storageModule moduleId="scannerConfiguration">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="aps3-gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="aps3-make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<scannerConfigBuildInfo instanceId="aps.managedbuild.project.exe.config.debug.77227718;aps.managedbuild.project.exe.config.debug.77227718.;aps.managedbuild.toolchain.c.compiler.320865439;aps.managedbuild.tool.c.compiler.input.846359435">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.cortus.builddefinitions.APS3PerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="aps3-gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="com.cortus.builddefinitions.APS3PerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="aps3-make" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+</scannerConfigBuildInfo>\r
+</storageModule>\r
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>\r
+<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>\r
+</cconfiguration>\r
+</storageModule>\r
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+<project id="FreeRTOS.aps.managedbuild.project.exe.331027925" name="APS3 Executable project" projectType="aps.managedbuild.project.exe"/>\r
+</storageModule>\r
+</cproject>\r
diff --git a/Demo/CORTUS_APS3_GCC/.project b/Demo/CORTUS_APS3_GCC/.project
new file mode 100644 (file)
index 0000000..b7d1f0e
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>FreeRTOS</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>\r
+                       <triggers>clean,full,incremental,</triggers>\r
+                       <arguments>\r
+                               <dictionary>\r
+                                       <key>?name?</key>\r
+                                       <value></value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.append_environment</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.autoBuildTarget</key>\r
+                                       <value>all</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.buildArguments</key>\r
+                                       <value></value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.buildCommand</key>\r
+                                       <value>aps3-make</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.buildLocation</key>\r
+                                       <value>${workspace_loc:/FreeRTOS/Debug}</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>\r
+                                       <value>clean</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.contents</key>\r
+                                       <value>org.eclipse.cdt.make.core.activeConfigSettings</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.enableAutoBuild</key>\r
+                                       <value>false</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.fullBuildTarget</key>\r
+                                       <value>all</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.stopOnError</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                               <dictionary>\r
+                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>\r
+                                       <value>true</value>\r
+                               </dictionary>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>\r
+               <nature>org.eclipse.cdt.core.cnature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/Demo/CORTUS_APS3_GCC/BSP_ProjectForDebugging.zip b/Demo/CORTUS_APS3_GCC/BSP_ProjectForDebugging.zip
new file mode 100644 (file)
index 0000000..193eb77
Binary files /dev/null and b/Demo/CORTUS_APS3_GCC/BSP_ProjectForDebugging.zip differ
diff --git a/Demo/CORTUS_APS3_GCC/CreateProjectDirectoryStructure.bat b/Demo/CORTUS_APS3_GCC/CreateProjectDirectoryStructure.bat
new file mode 100644 (file)
index 0000000..04cddd1
--- /dev/null
@@ -0,0 +1,45 @@
+REM This file should be executed from the command line prior to the first\r
+REM build.  It will be necessary to refresh the Eclipse project once the\r
+REM .bat file has been executed (normally just press F5 to refresh).\r
+\r
+REM Copies all the required files from their location within the standard\r
+REM FreeRTOS directory structure to under the Eclipse project directory.\r
+REM This permits the Eclipse project to be used in 'managed' mode and without\r
+REM having to setup any linked resources.\r
+\r
+REM Have the files already been copied?\r
+IF EXIST Source Goto END\r
+\r
+       REM Create the required directory structure.\r
+       MD Source\r
+       MD Source\include       \r
+       MD Source\portable\GCC\CORTUS_APS3\r
+       MD Source\portable\MemMang      \r
+       MD Demo\Common\r
+       MD Demo\Common\include\r
+       \r
+       REM Copy the core kernel files.\r
+       copy ..\..\Source\*.* Source\r
+       \r
+       REM Copy the common header files\r
+       copy ..\..\Source\include\*.* Source\include\r
+       \r
+       REM Copy the portable layer files\r
+       copy ..\..\Source\portable\GCC\CORTUS_APS3\*.* Source\portable\GCC\CORTUS_APS3\r
+       \r
+       REM Copy the basic memory allocation files\r
+       copy ..\..\Source\portable\MemMang\heap_2.c Source\portable\MemMang\r
+\r
+       REM Copy the files that define the common demo tasks.\r
+       copy ..\common\Minimal\BlockQ.c Demo\Common\r
+       copy ..\common\Minimal\comtest.c Demo\Common\r
+       copy ..\common\Minimal\dynamic.c Demo\Common\r
+       copy ..\common\Minimal\flash.c Demo\Common\r
+       copy ..\common\Minimal\integer.c Demo\Common\r
+       copy ..\common\Minimal\PollQ.c Demo\Common\r
+       copy ..\common\Minimal\semtest.c Demo\Common\r
+       \r
+       REM Copy the common demo file headers.\r
+       copy ..\common\include\*.* Demo\Common\include\r
+       \r
+: END\r
diff --git a/Demo/CORTUS_APS3_GCC/Demo/7seg.c b/Demo/CORTUS_APS3_GCC/Demo/7seg.c
new file mode 100644 (file)
index 0000000..2d71598
--- /dev/null
@@ -0,0 +1,178 @@
+/*\r
+    FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+\r
+    ***************************************************************************\r
+    *                                                                         *\r
+    * If you are:                                                             *\r
+    *                                                                         *\r
+    *    + New to FreeRTOS,                                                   *\r
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *\r
+    *    + Looking for basic training,                                        *\r
+    *    + Wanting to improve your FreeRTOS skills and productivity           *\r
+    *                                                                         *\r
+    * then take a look at the FreeRTOS eBook                                  *\r
+    *                                                                         *\r
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *\r
+    *                  http://www.FreeRTOS.org/Documentation                  *\r
+    *                                                                         *\r
+    * A pdf reference manual is also available.  Both are usually delivered   *\r
+    * to your inbox within 20 minutes to two hours when purchased between 8am *\r
+    * and 8pm GMT (although please allow up to 24 hours in case of            *\r
+    * exceptional circumstances).  Thank you for your support!                *\r
+    *                                                                         *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+    ***NOTE*** The exception to the GPL is included to allow you to distribute\r
+    a combined work that includes FreeRTOS without being obliged to provide the\r
+    source code for proprietary components outside of the FreeRTOS kernel.\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
+    more details. You should have received a copy of the GNU General Public \r
+    License and the FreeRTOS license exception along with FreeRTOS; if not it \r
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+    by writing to Richard Barry, contact details for whom are available on the\r
+    FreeRTOS WEB site.\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    http://www.FreeRTOS.org - Documentation, latest information, license and\r
+    contact details.\r
+\r
+    http://www.SafeRTOS.com - A version that is certified for use in safety\r
+    critical systems.\r
+\r
+    http://www.OpenRTOS.com - Commercial support, development, porting,\r
+    licensing and training services.\r
+*/\r
+\r
+#include <stdlib.h>\r
+\r
+/* Scheduler include files. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Demo program include files. */\r
+#include "7seg.h"\r
+#include "demoGpio.h"\r
+\r
+#define x7segSTACK_SIZE                        configMINIMAL_STACK_SIZE\r
+\r
+static portTASK_FUNCTION_PROTO( vRefreshTask, pvParameters );\r
+static portTASK_FUNCTION_PROTO( vCountTask, pvParameters );\r
+\r
+void vStart7SegTasks( unsigned portBASE_TYPE uxPriority )\r
+{\r
+       xTaskCreate (vRefreshTask, ( signed char * ) "7SegRefresh", x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL );\r
+       xTaskCreate (vCountTask,   ( signed char * ) "7SegCount",       x7segSTACK_SIZE, NULL, uxPriority, ( xTaskHandle *) NULL );\r
+}\r
+\r
+/* Value to output to 7 segment display \r
+led_digits[0] is the right most digit */\r
+static signed char seg7_digits[4];\r
+\r
+static portTASK_FUNCTION_PROTO( vRefreshTask, pvParameters )\r
+{\r
+/* This is table 3.3 from the Spartan-3 Starter Kit board user guide */\r
+const unsigned char bits[16] = {\r
+       0x01,\r
+       0x4f,\r
+       0x12,\r
+       0x06,\r
+       0x4c,\r
+       0x24,\r
+       0x20,\r
+       0x0f,\r
+       0x00,\r
+       0x04,\r
+       0x08,\r
+       0x60,\r
+       0x31,\r
+       0x42,\r
+       0x30,\r
+       0x38\r
+};\r
+\r
+const unsigned char apsx[4] = {\r
+       0x06, /* 3 */\r
+       0x24, /* S */\r
+       0x18, /* P */\r
+       0x08  /* A */\r
+};\r
+       \r
+portTickType xRefreshRate, xLastRefreshTime;\r
+\r
+/* Digit to scan */\r
+static int d = 0;\r
+\r
+       xRefreshRate = 2;\r
+\r
+       /* We need to initialise xLastRefreshTime prior to the first call to \r
+       vTaskDelayUntil(). */\r
+       xLastRefreshTime = xTaskGetTickCount();\r
+\r
+       for (;;)\r
+       {\r
+               for (d = 0; d < 4; d++)\r
+               {\r
+                       vTaskDelayUntil ( &xLastRefreshTime, xRefreshRate);\r
+                       \r
+                       /* Display digit */\r
+                       gpio->out.an  = -1;\r
+                       if (seg7_digits[1] == 4 || seg7_digits[1] == 5) {\r
+                               gpio->out.digit = apsx[d];\r
+                       } else {\r
+                               gpio->out.digit = bits[seg7_digits[d]];\r
+                       }\r
+                       gpio->out.dp = 1;\r
+                       gpio->out.an  = ~(1 << d);\r
+               }\r
+       }\r
+}\r
+\r
+\r
+\r
+static portTASK_FUNCTION_PROTO( vCountTask, pvParameters )\r
+{\r
+portTickType xCountRate, xLastCountTime;\r
+\r
+\r
+       /* Approximately 20HZ */\r
+       xCountRate = configTICK_RATE_HZ/20;\r
+\r
+       /* We need to initialise xLastCountTime prior to the first call to \r
+       vTaskDelayUntil(). */\r
+       xLastCountTime = xTaskGetTickCount();\r
+\r
+       for (;;)\r
+       {\r
+               vTaskDelayUntil ( &xLastCountTime, xCountRate);\r
+       \r
+               /* Really ugly way to do BCD arithmetic.... */\r
+               seg7_digits[0] -= 1;\r
+               if (seg7_digits[0] < 0) {\r
+                       seg7_digits[0] = 9;\r
+                       seg7_digits[1] -= 1;\r
+                       if (seg7_digits[1] < 0) {\r
+                               seg7_digits[1] = 9;\r
+                               seg7_digits[2] -= 1;\r
+                               if (seg7_digits[2] < 0) {\r
+                                       seg7_digits[2] = 9;\r
+                                       seg7_digits[3] -= 1;\r
+                                       if (seg7_digits[3] < 0) {\r
+                                               seg7_digits[3] = 9;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+// Local Variables:\r
+// tab-width:4\r
+// End:\r
diff --git a/Demo/CORTUS_APS3_GCC/Demo/7seg.h b/Demo/CORTUS_APS3_GCC/Demo/7seg.h
new file mode 100644 (file)
index 0000000..5aa14d4
--- /dev/null
@@ -0,0 +1,60 @@
+/*\r
+    FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+\r
+    ***************************************************************************\r
+    *                                                                         *\r
+    * If you are:                                                             *\r
+    *                                                                         *\r
+    *    + New to FreeRTOS,                                                   *\r
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *\r
+    *    + Looking for basic training,                                        *\r
+    *    + Wanting to improve your FreeRTOS skills and productivity           *\r
+    *                                                                         *\r
+    * then take a look at the FreeRTOS eBook                                  *\r
+    *                                                                         *\r
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *\r
+    *                  http://www.FreeRTOS.org/Documentation                  *\r
+    *                                                                         *\r
+    * A pdf reference manual is also available.  Both are usually delivered   *\r
+    * to your inbox within 20 minutes to two hours when purchased between 8am *\r
+    * and 8pm GMT (although please allow up to 24 hours in case of            *\r
+    * exceptional circumstances).  Thank you for your support!                *\r
+    *                                                                         *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+    ***NOTE*** The exception to the GPL is included to allow you to distribute\r
+    a combined work that includes FreeRTOS without being obliged to provide the\r
+    source code for proprietary components outside of the FreeRTOS kernel.\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
+    more details. You should have received a copy of the GNU General Public \r
+    License and the FreeRTOS license exception along with FreeRTOS; if not it \r
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+    by writing to Richard Barry, contact details for whom are available on the\r
+    FreeRTOS WEB site.\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    http://www.FreeRTOS.org - Documentation, latest information, license and\r
+    contact details.\r
+\r
+    http://www.SafeRTOS.com - A version that is certified for use in safety\r
+    critical systems.\r
+\r
+    http://www.OpenRTOS.com - Commercial support, development, porting,\r
+    licensing and training services.\r
+*/\r
+\r
+#ifndef SEVENSEG_H\r
+#define SEVENSEG_H\r
+\r
+void vStart7SegTasks( unsigned portBASE_TYPE uxPriority );\r
+\r
+#endif\r
+\r
diff --git a/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h b/Demo/CORTUS_APS3_GCC/Demo/FreeRTOSConfig.h
new file mode 100644 (file)
index 0000000..33110da
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+    FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
+
+    ***************************************************************************
+    *                                                                         *
+    * If you are:                                                             *
+    *                                                                         *
+    *    + New to FreeRTOS,                                                   *
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
+    *    + Looking for basic training,                                        *
+    *    + Wanting to improve your FreeRTOS skills and productivity           *
+    *                                                                         *
+    * then take a look at the FreeRTOS eBook                                  *
+    *                                                                         *
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
+    *                  http://www.FreeRTOS.org/Documentation                  *
+    *                                                                         *
+    * A pdf reference manual is also available.  Both are usually delivered   *
+    * to your inbox within 20 minutes to two hours when purchased between 8am *
+    * and 8pm GMT (although please allow up to 24 hours in case of            *
+    * exceptional circumstances).  Thank you for your support!                *
+    *                                                                         *
+    ***************************************************************************
+
+    This file is part of the FreeRTOS distribution.
+
+    FreeRTOS is free software; you can redistribute it and/or modify it under
+    the terms of the GNU General Public License (version 2) as published by the
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
+    ***NOTE*** The exception to the GPL is included to allow you to distribute
+    a combined work that includes FreeRTOS without being obliged to provide the
+    source code for proprietary components outside of the FreeRTOS kernel.
+    FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained
+    by writing to Richard Barry, contact details for whom are available on the
+    FreeRTOS WEB site.
+
+    1 tab == 4 spaces!
+
+    http://www.FreeRTOS.org - Documentation, latest information, license and
+    contact details.
+
+    http://www.SafeRTOS.com - A version that is certified for use in safety
+    critical systems.
+
+    http://www.OpenRTOS.com - Commercial support, development, porting,
+    licensing and training services.
+*/
+
+#ifndef FREERTOS_CONFIG_H
+#define FREERTOS_CONFIG_H
+
+#include <machine/sfradr.h>
+
+/*-----------------------------------------------------------
+ * Application specific definitions.
+ *
+ * These definitions should be adjusted for your particular hardware and
+ * application requirements.
+ *
+ * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
+ * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
+ *
+ * See http://www.freertos.org/a00110.html.
+ */
+
+/*----------------------------------------------------------*/
+
+#define configUSE_PREEMPTION           1
+#define configUSE_IDLE_HOOK                    0
+#define configUSE_TICK_HOOK                    0
+#define configCPU_CLOCK_HZ                     ( ( unsigned long ) CLOCK_FREQUENCY )
+#define configTICK_RATE_HZ                     ( ( portTickType ) 1000 )
+#define configMAX_PRIORITIES           ( ( unsigned portBASE_TYPE ) 5 )
+#define configMINIMAL_STACK_SIZE       ( ( unsigned short ) 128 )
+#define configTOTAL_HEAP_SIZE          ( ( size_t ) ( 32 * 1024 ) )
+#define configMAX_TASK_NAME_LEN                ( 16 )
+#define configUSE_TRACE_FACILITY       0
+#define configUSE_16_BIT_TICKS         0
+#define configIDLE_SHOULD_YIELD                0
+#define configUSE_MALLOC_FAILED_HOOK 1
+#define configCHECK_FOR_STACK_OVERFLOW 1
+
+/* Co-routine definitions. */
+#define configUSE_CO_ROUTINES          0
+#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
+
+/* Set the following definitions to 1 to include the API function, or zero
+to exclude the API function.
+We use --gc-sections when linking, so there is no harm is setting all of these to 1 */
+
+#define INCLUDE_vTaskPrioritySet               1
+#define INCLUDE_uxTaskPriorityGet              1
+#define INCLUDE_vTaskDelete                            1
+#define INCLUDE_vTaskCleanUpResources  1
+#define INCLUDE_vTaskSuspend                   1
+#define INCLUDE_vTaskDelayUntil                        1
+#define INCLUDE_vTaskDelay                             1
+
+#define BLOCKQ_1                                               1
+
+#endif /* FREERTOS_CONFIG_H */
+
+// Local Variables:
+// tab-width:4
+// End:
diff --git a/Demo/CORTUS_APS3_GCC/Demo/ParTest.c b/Demo/CORTUS_APS3_GCC/Demo/ParTest.c
new file mode 100644 (file)
index 0000000..5437cc1
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+    FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
+
+    ***************************************************************************
+    *                                                                         *
+    * If you are:                                                             *
+    *                                                                         *
+    *    + New to FreeRTOS,                                                   *
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
+    *    + Looking for basic training,                                        *
+    *    + Wanting to improve your FreeRTOS skills and productivity           *
+    *                                                                         *
+    * then take a look at the FreeRTOS eBook                                  *
+    *                                                                         *
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
+    *                  http://www.FreeRTOS.org/Documentation                  *
+    *                                                                         *
+    * A pdf reference manual is also available.  Both are usually delivered   *
+    * to your inbox within 20 minutes to two hours when purchased between 8am *
+    * and 8pm GMT (although please allow up to 24 hours in case of            *
+    * exceptional circumstances).  Thank you for your support!                *
+    *                                                                         *
+    ***************************************************************************
+
+    This file is part of the FreeRTOS distribution.
+
+    FreeRTOS is free software; you can redistribute it and/or modify it under
+    the terms of the GNU General Public License (version 2) as published by the
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
+    ***NOTE*** The exception to the GPL is included to allow you to distribute
+    a combined work that includes FreeRTOS without being obliged to provide the
+    source code for proprietary components outside of the FreeRTOS kernel.
+    FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained
+    by writing to Richard Barry, contact details for whom are available on the
+    FreeRTOS WEB site.
+
+    1 tab == 4 spaces!
+
+    http://www.FreeRTOS.org - Documentation, latest information, license and
+    contact details.
+
+    http://www.SafeRTOS.com - A version that is certified for use in safety
+    critical systems.
+
+    http://www.OpenRTOS.com - Commercial support, development, porting,
+    licensing and training services.
+*/
+
+/* Scheduler includes. */
+#include "FreeRTOS.h"
+#include "portable.h"
+
+/* Demo app includes. */
+#include "partest.h"
+#include "demoGpio.h"
+
+#define partstNUM_LEDS                 ( 8 )
+#define partstALL_OUTPUTS_OFF  ( ( unsigned long ) ~(0xFFFFFFFF << partstNUM_LEDS) )
+
+static unsigned long ulLEDReg;
+
+/*-----------------------------------------------------------
+ * Simple parallel port IO routines.
+ *-----------------------------------------------------------*/
+
+static void SetLeds (unsigned int leds)
+{
+       gpio->out.leds = leds;
+}
+
+/*-----------------------------------------------------------*/
+
+void vParTestInitialise( void )
+{
+       gpio->dir.leds = 0xff;
+}
+
+/*-----------------------------------------------------------*/
+
+void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
+{
+       /* Switch an LED on or off as requested. */
+       if (uxLED < partstNUM_LEDS)
+       {
+               if( xValue )
+               {
+                       ulLEDReg &= ~( 1 << uxLED );
+               }
+               else
+               {
+                       ulLEDReg |= ( 1 << uxLED );
+               }
+
+               SetLeds( ulLEDReg );
+       }
+}
+/*-----------------------------------------------------------*/
+
+void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
+{
+       /* Toggle the state of the requested LED. */
+       if (uxLED < partstNUM_LEDS)
+       {
+               ulLEDReg ^= ( 1 << uxLED );
+               SetLeds( ulLEDReg );
+       }
+}
+
diff --git a/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h b/Demo/CORTUS_APS3_GCC/Demo/demoGpio.h
new file mode 100644 (file)
index 0000000..1b0afed
--- /dev/null
@@ -0,0 +1,97 @@
+/*\r
+    FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+\r
+    ***************************************************************************\r
+    *                                                                         *\r
+    * If you are:                                                             *\r
+    *                                                                         *\r
+    *    + New to FreeRTOS,                                                   *\r
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *\r
+    *    + Looking for basic training,                                        *\r
+    *    + Wanting to improve your FreeRTOS skills and productivity           *\r
+    *                                                                         *\r
+    * then take a look at the FreeRTOS eBook                                  *\r
+    *                                                                         *\r
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *\r
+    *                  http://www.FreeRTOS.org/Documentation                  *\r
+    *                                                                         *\r
+    * A pdf reference manual is also available.  Both are usually delivered   *\r
+    * to your inbox within 20 minutes to two hours when purchased between 8am *\r
+    * and 8pm GMT (although please allow up to 24 hours in case of            *\r
+    * exceptional circumstances).  Thank you for your support!                *\r
+    *                                                                         *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+    ***NOTE*** The exception to the GPL is included to allow you to distribute\r
+    a combined work that includes FreeRTOS without being obliged to provide the\r
+    source code for proprietary components outside of the FreeRTOS kernel.\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
+    more details. You should have received a copy of the GNU General Public \r
+    License and the FreeRTOS license exception along with FreeRTOS; if not it \r
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+    by writing to Richard Barry, contact details for whom are available on the\r
+    FreeRTOS WEB site.\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    http://www.FreeRTOS.org - Documentation, latest information, license and\r
+    contact details.\r
+\r
+    http://www.SafeRTOS.com - A version that is certified for use in safety\r
+    critical systems.\r
+\r
+    http://www.OpenRTOS.com - Commercial support, development, porting,\r
+    licensing and training services.\r
+*/\r
+\r
+/* Layout of pins connected to GPIO on Xilinx FPGA evaluation board \r
+*/\r
+\r
+#include <machine/sfradr.h>\r
+\r
+#ifndef DEMOGPIO_H\r
+#define DEMOGPIO_H\r
+\r
+typedef struct DemoBoardGpioPins\r
+{\r
+       /* Leds on board */\r
+       unsigned leds:8;\r
+       \r
+       /* 7 segment display */\r
+       unsigned digit:7;\r
+\r
+       /* Decimal point */\r
+       unsigned dp:1;\r
+\r
+       /* Select anode for digit and decimal pt to light up */\r
+       unsigned an:4;\r
+\r
+       /* Unused */\r
+       unsigned _fill:12;\r
+\r
+} DemoBoardGpioPins;\r
+\r
+typedef struct DemoBoardGpio\r
+{\r
+       volatile DemoBoardGpioPins out;\r
+       volatile DemoBoardGpioPins in;\r
+       volatile DemoBoardGpioPins dir;\r
+       volatile unsigned _fill;\r
+} DemoBoardGpio;\r
+\r
+#ifdef SFRADR_GPIO1\r
+#define gpio ((DemoBoardGpio*)SFRADR_GPIO1)\r
+#endif\r
+\r
+#endif\r
+\r
+// Local Variables:\r
+// tab-width:4\r
+// End:\r
diff --git a/Demo/CORTUS_APS3_GCC/Demo/main.c b/Demo/CORTUS_APS3_GCC/Demo/main.c
new file mode 100644 (file)
index 0000000..f03f659
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+    FreeRTOS V6.0.4 - Copyright (C) 2010 Real Time Engineers Ltd.
+
+    ***************************************************************************
+    *                                                                         *
+    * If you are:                                                             *
+    *                                                                         *
+    *    + New to FreeRTOS,                                                   *
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
+    *    + Looking for basic training,                                        *
+    *    + Wanting to improve your FreeRTOS skills and productivity           *
+    *                                                                         *
+    * then take a look at the FreeRTOS eBook                                  *
+    *                                                                         *
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
+    *                  http://www.FreeRTOS.org/Documentation                  *
+    *                                                                         *
+    * A pdf reference manual is also available.  Both are usually delivered   *
+    * to your inbox within 20 minutes to two hours when purchased between 8am *
+    * and 8pm GMT (although please allow up to 24 hours in case of            *
+    * exceptional circumstances).  Thank you for your support!                *
+    *                                                                         *
+    ***************************************************************************
+
+    This file is part of the FreeRTOS distribution.
+
+    FreeRTOS is free software; you can redistribute it and/or modify it under
+    the terms of the GNU General Public License (version 2) as published by the
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
+    ***NOTE*** The exception to the GPL is included to allow you to distribute
+    a combined work that includes FreeRTOS without being obliged to provide the
+    source code for proprietary components outside of the FreeRTOS kernel.
+    FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained
+    by writing to Richard Barry, contact details for whom are available on the
+    FreeRTOS WEB site.
+
+    1 tab == 4 spaces!
+
+    http://www.FreeRTOS.org - Documentation, latest information, license and
+    contact details.
+
+    http://www.SafeRTOS.com - A version that is certified for use in safety
+    critical systems.
+
+    http://www.OpenRTOS.com - Commercial support, development, porting,
+    licensing and training services.
+*/
+
+/*
+ * Creates all the demo application tasks, then starts the scheduler.
+ *
+ * Main.c also creates a task called "Check".  This only executes every three
+ * seconds but has the highest priority so is guaranteed to get processor time.
+ * Its main function is to check that all the other tasks are still operational.
+ * Each task (other than the "flash" tasks) maintains a unique count that is
+ * incremented each time the task successfully completes its function.  Should
+ * any error occur within such a task the count is permanently halted.  The
+ * check task inspects the count of each task to ensure it has changed since
+ * the last time the check task executed.  If all the count variables have
+ * changed all the tasks are still executing error free, and the check task
+ * toggles the on board LED.  Should any task contain an error at any time
+ * the LED toggle rate will change from 3 seconds to 500ms.
+ *
+ * NOTE:  The demo application includes tasks that send and receive characters
+ * over the UART. The characters sent by one task are received by another -
+ * with an error condition being flagged should any characters be missed or
+ * received out of order. A loopback connector is required on the 9way D socket
+ * for this mechanism to operation (pins 2 and 3 the socket should be connected
+ * together - a paper clip is normally sufficient).
+ *
+ */
+
+/* Standard includes. */
+#include <stdlib.h>
+#include <string.h>
+
+/* Scheduler includes. */
+#include "FreeRTOS.h"
+#include "task.h"
+
+/* Demo application includes. */
+#include "partest.h"
+#include "flash.h"
+#include "integer.h"
+#include "PollQ.h"
+#include "comtest2.h"
+#include "semtest.h"
+#include "flop.h"
+#include "dynamic.h"
+#include "BlockQ.h"
+#include "serial.h"
+#include "demoGpio.h"
+#include "7seg.h"
+
+/*-----------------------------------------------------------*/
+
+/* Constants for the ComTest tasks. */
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
+#define mainCOM_TEST_LED               ( 5 )
+
+/* Priorities for the demo application tasks. */
+#define mainLED_TASK_PRIORITY          ( tskIDLE_PRIORITY + 3 )
+#define mainCOM_TEST_PRIORITY          ( tskIDLE_PRIORITY + 2 )
+#define mainQUEUE_POLL_PRIORITY                ( tskIDLE_PRIORITY + 2 )
+#define mainCHECK_TASK_PRIORITY                ( tskIDLE_PRIORITY + 4 )
+#define mainSEM_TEST_PRIORITY          ( tskIDLE_PRIORITY + 1 )
+#define mainBLOCK_Q_PRIORITY           ( tskIDLE_PRIORITY + 2 )
+#define main7SEG_TASK_PRIORITY         ( tskIDLE_PRIORITY + 2 )
+
+/* The rate at which the on board LED will toggle when there is/is not an
+error. */
+#define mainNO_ERROR_FLASH_PERIOD      ( ( portTickType ) 3000 / portTICK_RATE_MS      )
+#define mainERROR_FLASH_PERIOD         ( ( portTickType ) 500 / portTICK_RATE_MS  )
+#define mainON_BOARD_LED_BIT           ( ( unsigned long ) 7 )
+
+/* The size of the memory blocks allocated by the vMemCheckTask() task. */
+#define mainMEM_CHECK_SIZE_1           ( ( size_t ) 51 )
+#define mainMEM_CHECK_SIZE_2           ( ( size_t ) 52 )
+#define mainMEM_CHECK_SIZE_3           ( ( size_t ) 151 )
+
+/*-----------------------------------------------------------*/
+
+/*
+ * Checks that all the demo application tasks are still executing without error
+ * - as described at the top of the file.
+ */
+static long prvCheckOtherTasksAreStillRunning( void );
+
+/*
+ * The task that executes at the highest priority and calls
+ * prvCheckOtherTasksAreStillRunning().         See the description at the top
+ * of the file.
+ */
+static void vErrorChecks( void *pvParameters );
+
+/*
+ * Configure the processor for use with the Olimex demo board. This includes
+ * setup for the I/O, system clock, and access timings.
+ */
+static void prvSetupHardware( void );
+
+/*-----------------------------------------------------------*/
+
+/*
+ * Starts all the other tasks, then starts the scheduler.
+ */
+int main( void )
+{
+       /* Setup the hardware for use with the Xilinx evaluation board. */
+       prvSetupHardware();
+
+       /* Start the demo/test application tasks. */
+       vStartIntegerMathTasks( tskIDLE_PRIORITY );
+       vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
+       vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
+       vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
+       vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
+       vStartDynamicPriorityTasks();
+       vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
+       vStart7SegTasks( main7SEG_TASK_PRIORITY );
+
+       /* Start the check task - which is defined in this file. */
+       xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
+
+       /* Now all the tasks have been started - start the scheduler. */
+       vTaskStartScheduler();
+
+       /* Should never reach here! */
+       for( ;; );
+}
+/*-----------------------------------------------------------*/
+
+static void vErrorChecks( void *pvParameters )
+{
+portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
+
+       /* Just to stop compiler warnings. */
+       ( void ) pvParameters;
+
+       /* Cycle for ever, delaying then checking all the other tasks are still
+       operating without error.  If an error is detected then the delay period
+       is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so
+       the on board LED flash rate will increase. */
+
+       for( ;; )
+       {
+               /* Delay until it is time to execute again. */
+               vTaskDelay( xDelayPeriod );
+
+               /* Check all the standard demo application tasks are executing without
+               error.  */
+               if( prvCheckOtherTasksAreStillRunning() != pdPASS )
+               {
+                       /* An error has been detected in one of the tasks - flash faster. */
+                       xDelayPeriod = mainERROR_FLASH_PERIOD;
+               }
+
+               /* The toggle rate of the LED depends on how long this task delays for.
+               An error reduces the delay period and so increases the toggle rate. */
+               vParTestToggleLED( mainON_BOARD_LED_BIT );
+       }
+}
+/*-----------------------------------------------------------*/
+
+static void prvSetupHardware( void )
+{
+       /* Initialise LED outputs. */
+       vParTestInitialise();
+}
+/*-----------------------------------------------------------*/
+
+static long prvCheckOtherTasksAreStillRunning( void )
+{
+long lReturn = pdPASS;
+
+       /* Check all the demo tasks (other than the flash tasks) to ensure
+       that they are all still running, and that none of them have detected
+       an error. */
+
+       if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
+       {
+               lReturn = pdFAIL;
+       }
+
+       if( xAreComTestTasksStillRunning() != pdTRUE )
+       {
+               lReturn = pdFAIL;
+       }
+
+       if( xArePollingQueuesStillRunning() != pdTRUE )
+       {
+               lReturn = pdFAIL;
+       }
+
+       if( xAreSemaphoreTasksStillRunning() != pdTRUE )
+       {
+               lReturn = pdFAIL;
+       }
+
+       if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
+       {
+               lReturn = pdFAIL;
+       }
+
+       if( xAreBlockingQueuesStillRunning() != pdTRUE )
+       {
+               lReturn = pdFAIL;
+       }
+
+       return lReturn;
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
+{
+       /* This function will be called if a task overflows its stack.  Inspect
+       pxCurrentTCB to find the offending task if the overflow was sever enough
+       to corrupt the pcTaskName parameter. */
+       vParTestSetLED( 4, 1 );
+       for( ;; );
+}
+/*-----------------------------------------------------------*/
+
+void vApplicationMallocFailedHook( void )
+{
+       /* This function will be called if a call to pvPortMalloc() fails to return
+       the requested memory.  pvPortMalloc() is called internally by the scheduler
+       whenever a task, queue or semaphore is created. */
+       vParTestSetLED( 4, 1 );
+       for( ;; );
+}
+/*-----------------------------------------------------------*/
+
+
+
diff --git a/Demo/CORTUS_APS3_GCC/Demo/serial.c b/Demo/CORTUS_APS3_GCC/Demo/serial.c
new file mode 100644 (file)
index 0000000..0fe1b94
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+    FreeRTOS V6.0.3 - Copyright (C) 2010 Real Time Engineers Ltd.
+
+    ***************************************************************************
+    *                                                                         *
+    * If you are:                                                             *
+    *                                                                         *
+    *    + New to FreeRTOS,                                                   *
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
+    *    + Looking for basic training,                                        *
+    *    + Wanting to improve your FreeRTOS skills and productivity           *
+    *                                                                         *
+    * then take a look at the FreeRTOS eBook                                  *
+    *                                                                         *
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
+    *                  http://www.FreeRTOS.org/Documentation                  *
+    *                                                                         *
+    * A pdf reference manual is also available.  Both are usually delivered   *
+    * to your inbox within 20 minutes to two hours when purchased between 8am *
+    * and 8pm GMT (although please allow up to 24 hours in case of            *
+    * exceptional circumstances).  Thank you for your support!                *
+    *                                                                         *
+    ***************************************************************************
+
+    This file is part of the FreeRTOS distribution.
+
+    FreeRTOS is free software; you can redistribute it and/or modify it under
+    the terms of the GNU General Public License (version 2) as published by the
+    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
+    ***NOTE*** The exception to the GPL is included to allow you to distribute
+    a combined work that includes FreeRTOS without being obliged to provide the
+    source code for proprietary components outside of the FreeRTOS kernel.
+    FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained
+    by writing to Richard Barry, contact details for whom are available on the
+    FreeRTOS WEB site.
+
+    1 tab == 4 spaces!
+
+    http://www.FreeRTOS.org - Documentation, latest information, license and
+    contact details.
+
+    http://www.SafeRTOS.com - A version that is certified for use in safety
+    critical systems.
+
+    http://www.OpenRTOS.com - Commercial support, development, porting,
+    licensing and training services.
+*/
+
+/*  Basic interrupt driven serial port driver for uart1.
+*/
+
+/* Standard includes. */
+#include <stdlib.h>
+
+/* Kernel includes. */
+#include "FreeRTOS.h"
+#include "queue.h"
+#include "task.h"
+
+/* Demo application includes. */
+#include <machine/uart.h>
+#include <machine/ic.h>
+#include "serial.h"
+/*-----------------------------------------------------------*/
+
+#define COM_BLOCK_RETRYTIME                            10
+/*-----------------------------------------------------------*/
+
+void vUARTInterruptHandlerTxWrapper(void) __attribute((naked));
+void vUARTInterruptHandlerRxWrapper(void) __attribute((naked));
+/*-----------------------------------------------------------*/
+
+/* Queues used to hold received characters, and characters waiting to be
+transmitted. */
+static xQueueHandle xRxedChars;
+static xQueueHandle xCharsForTx;
+extern unsigned portBASE_TYPE *pxVectorTable;
+/*-----------------------------------------------------------*/
+
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
+{
+       /* Create the queues used to hold Rx and Tx characters. */
+       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
+       xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
+
+       if( ( xRxedChars ) && ( xCharsForTx ) )
+       {
+               /* Set up interrupts */
+               /* tx interrupt will be enabled when we need to send something */
+               uart1->tx_mask = 0;
+               uart1->rx_mask = 1;
+               irq[IRQ_UART1_TX].ien = 1;
+               irq[IRQ_UART1_TX].ipl = portSYSTEM_INTERRUPT_PRIORITY_LEVEL;
+               irq[IRQ_UART1_RX].ien = 1;
+               irq[IRQ_UART1_RX].ipl = portSYSTEM_INTERRUPT_PRIORITY_LEVEL;
+       }
+       return ( xComPortHandle ) 0;
+}
+/*-----------------------------------------------------------*/
+
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
+{
+       /* The port handle is not required as this driver only supports uart1. */
+       (void) pxPort;
+
+       /* Get the next character from the buffer.      Return false if no characters
+          are available, or arrive before xBlockTime expires. */
+       if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
+       {
+               return pdTRUE;
+       }
+       else
+       {
+               return pdFALSE;
+       }
+}
+
+/*-----------------------------------------------------------*/
+
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
+{
+       int i;
+       signed char *pChNext;
+
+       /* Send each character in the string, one at a time. */
+       pChNext = ( signed char * )pcString;
+       for( i = 0; i < usStringLength; i++ )
+       {
+               /* Block until character has been transmitted. */
+               while( xSerialPutChar( pxPort, *pChNext, COM_BLOCK_RETRYTIME ) != pdTRUE ); pChNext++;
+       }
+}
+
+/*-----------------------------------------------------------*/
+
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
+{
+       ( void ) pxPort;
+
+       /* Place the character in the queue of characters to be transmitted. */
+       if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
+       {
+               return pdFAIL;
+       }
+
+       /* Turn on the Tx interrupt so the ISR will remove the character from the
+          queue and send it. This does not need to be in a critical section as
+          if the interrupt has already removed the character the next interrupt
+          will simply turn off the Tx interrupt again. */
+       uart1->tx_mask = 1;
+
+       return pdPASS;
+}
+/*-----------------------------------------------------------*/
+
+void vSerialClose( xComPortHandle xPort )
+{
+       /* Not supported as not required by the demo application. */
+       ( void ) xPort;
+}
+/*-----------------------------------------------------------*/
+
+void interrupt_handler( IRQ_UART1_TX )
+{
+static signed char cChar;
+static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
+
+       portSAVE_CONTEXT_REDUCED();
+
+       /* The interrupt was caused by the transmit fifo having space for at least one
+       character. Are there any more characters to transmit? */
+       if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
+       {
+               /* A character was retrieved from the queue so can be sent to the uart now. */
+               uart1->tx_data = cChar;
+       }
+       else
+       {
+               /* Queue empty, nothing to send so turn off the Tx interrupt. */
+               uart1->tx_mask = 0;
+       }
+
+       /* If an event caused a task to unblock then we call "Yield from ISR" to
+       ensure that the unblocked task is the task that executes when the interrupt
+       completes if the unblocked task has a priority higher than the interrupted
+       task. */
+       if( xHigherPriorityTaskWoken )
+       {
+               portYIELD_FROM_ISR();
+       }
+       portRESTORE_CONTEXT_REDUCED();
+}
+/*-----------------------------------------------------------*/
+
+void interrupt_handler( IRQ_UART1_RX )
+{
+static signed char cChar;
+static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
+
+       portSAVE_CONTEXT_REDUCED();
+
+       /* The interrupt was caused by the receiver getting data. */
+       cChar = uart1->rx_data;
+
+       (void)xQueueSendFromISR(xRxedChars, &cChar, &xHigherPriorityTaskWoken);
+
+       /* If an event caused a task to unblock then we call "Yield from ISR" to
+       ensure that the unblocked task is the task that executes when the interrupt
+       completes if the unblocked task has a priority higher than the interrupted
+       task. */
+       if( xHigherPriorityTaskWoken )
+       {
+               portYIELD_FROM_ISR();
+       }
+
+       portRESTORE_CONTEXT_REDUCED();
+}
+/*-----------------------------------------------------------*/
+
+