]> git.sur5r.net Git - freertos/commitdiff
Add the beginnings of a Microblaze project for the KC705. V8.2.0
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 16 Jan 2015 19:16:12 +0000 (19:16 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 16 Jan 2015 19:16:12 +0000 (19:16 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2325 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/.cproject [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/.project [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Blinky_Demo/main_blinky.c [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/RegisterTests.S [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/main_full.c [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lscript.ld [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c [new file with mode: 0644]
FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c [new file with mode: 0644]

index c3dc1e32adc357b71c1090c4d3bedf76daa133d5..29368c00d434bd7856683b2d1616eced2fe8d995 100644 (file)
 /* Dimensions the buffer into which input characters are placed. */\r
 #define cmdMAX_INPUT_SIZE              50\r
 \r
+/* Dimentions a buffer to be used by the UART driver, if the UART driver uses a\r
+buffer at all. */\r
 #define cmdQUEUE_LENGTH                        25\r
 \r
 /* DEL acts as a backspace. */\r
 #define cmdASCII_DEL           ( 0x7F )\r
 \r
-#define cmdMAX_MUTEX_WAIT              ( ( ( TickType_t ) 300 ) / ( portTICK_PERIOD_MS ) )\r
+/* The maximum time to wait for the mutex that guards the UART to become\r
+available. */\r
+#define cmdMAX_MUTEX_WAIT              pdMS_TO_TICKS( 300 )\r
 \r
 #ifndef configCLI_BAUD_RATE\r
        #define configCLI_BAUD_RATE     115200\r
@@ -115,7 +119,11 @@ static const char * const pcWelcomeMessage = "FreeRTOS command server.\r\nType H
 static const char * const pcEndOfOutputMessage = "\r\n[Press ENTER to execute the previous command again]\r\n>";\r
 static const char * const pcNewLine = "\r\n";\r
 \r
-SemaphoreHandle_t xTxMutex = NULL;\r
+/* Used to guard access to the UART in case messages are sent to the UART from\r
+more than one task. */\r
+static SemaphoreHandle_t xTxMutex = NULL;\r
+\r
+/* The handle to the UART port, which is not used by all ports. */\r
 static xComPortHandle xPort = 0;\r
 \r
 /*-----------------------------------------------------------*/\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/.cproject b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/.cproject
new file mode 100644 (file)
index 0000000..a9835d8
--- /dev/null
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">\r
+       <storageModule moduleId="org.eclipse.cdt.core.settings">\r
+               <cconfiguration id="xilinx.gnu.mb.exe.debug.1168698469">\r
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="xilinx.gnu.mb.exe.debug.1168698469" moduleId="org.eclipse.cdt.core.settings" name="Debug">\r
+                               <externalSettings/>\r
+                               <extensions>\r
+                                       <extension id="com.xilinx.sdk.managedbuilder.XELF.mb" point="org.eclipse.cdt.core.BinaryParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                               </extensions>\r
+                       </storageModule>\r
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+                               <configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="xilinx.gnu.mb.exe.debug.1168698469" name="Debug" parent="xilinx.gnu.mb.exe.debug">\r
+                                       <folderInfo id="xilinx.gnu.mb.exe.debug.1168698469." name="/" resourcePath="">\r
+                                               <toolChain id="xilinx.gnu.mb.exe.debug.toolchain.14883112" name="Xilinx MicroBlaze GNU Toolchain" superClass="xilinx.gnu.mb.exe.debug.toolchain">\r
+                                                       <targetPlatform binaryParser="com.xilinx.sdk.managedbuilder.XELF.mb" id="xilinx.mb.target.gnu.base.debug.440787793" isAbstract="false" name="Debug Platform" superClass="xilinx.mb.target.gnu.base.debug"/>\r
+                                                       <builder buildPath="${workspace_loc:/RTOSDemo}/Debug" enableAutoBuild="true" id="xilinx.gnu.mb.toolchain.builder.debug.1044145320" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="GNU make" superClass="xilinx.gnu.mb.toolchain.builder.debug"/>\r
+                                                       <tool id="xilinx.gnu.mb.c.toolchain.assembler.debug.346786001" name="MicroBlaze gcc assembler" superClass="xilinx.gnu.mb.c.toolchain.assembler.debug">\r
+                                                               <option id="xilinx.gnu.mb.assembler.usele.2013548111" name="Produce little endian code (-mlittle-endian)" superClass="xilinx.gnu.mb.assembler.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.both.assembler.option.flags.912339622" name="Assembler Flags" superClass="xilinx.gnu.both.assembler.option.flags" value="--gdwarf2" valueType="string"/>\r
+                                                               <inputType id="xilinx.gnu.assembler.input.456766962" superClass="xilinx.gnu.assembler.input"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.c.toolchain.compiler.debug.610152912" name="MicroBlaze gcc compiler" superClass="xilinx.gnu.mb.c.toolchain.compiler.debug">\r
+                                                               <option defaultValue="gnu.c.optimization.level.none" id="xilinx.gnu.compiler.option.optimization.level.572742481" name="Optimization Level" superClass="xilinx.gnu.compiler.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.option.debugging.level.1760804237" name="Debug Level" superClass="xilinx.gnu.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mbversion.1077404609" name="MicroBlaze Version" superClass="xilinx.gnu.mb.compiler.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.norelax.1720907536" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.compiler.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.garbage.529193311" name="Enable garbage collector (-ffunction-sections -fdata-sections)" superClass="xilinx.gnu.mb.compiler.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usele.1753088010" name="Produce little endian code (-mlittle-endian)" superClass="xilinx.gnu.mb.compiler.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usebarrel.407815412" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.compiler.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usepcmp.871489971" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.compiler.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mul.1218170537" name="Hardware Multiplier" superClass="xilinx.gnu.mb.compiler.inferred.mul" value="xilinx.gnu.mb.compiler.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.inferred.swplatform.includes.1674856733" name="Software Platform Include Path" superClass="xilinx.gnu.compiler.inferred.swplatform.includes" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/include"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.compiler.dircategory.includes.926330011" name="Include Paths" superClass="xilinx.gnu.compiler.dircategory.includes" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/FreeRTOS_Source/include}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Full_Demo/FreeRTOS+CLI}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Full_Demo/Common_Demo_Source/include}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/FreeRTOS_Source/portable/GCC/MicroBlazeV8}&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usediv.176140776" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.compiler.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.fpu.1263402929" name="FPU" superClass="xilinx.gnu.mb.compiler.inferred.fpu" value="xilinx.gnu.mb.compiler.inferred.fpu.full" valueType="enumerated"/>\r
+                                                               <inputType id="xilinx.gnu.compiler.input.958217800" name="C source files" superClass="xilinx.gnu.compiler.input"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.cxx.toolchain.compiler.debug.1001275207" name="MicroBlaze g++ compiler" superClass="xilinx.gnu.mb.cxx.toolchain.compiler.debug">\r
+                                                               <option defaultValue="gnu.c.optimization.level.none" id="xilinx.gnu.compiler.option.optimization.level.1814020666" name="Optimization Level" superClass="xilinx.gnu.compiler.option.optimization.level" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.option.debugging.level.557344078" name="Debug Level" superClass="xilinx.gnu.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mbversion.1730413776" name="MicroBlaze Version" superClass="xilinx.gnu.mb.compiler.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.norelax.2057549652" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.compiler.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.garbage.1466989666" name="Enable garbage collector (-ffunction-sections -fdata-sections)" superClass="xilinx.gnu.mb.compiler.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usele.907576056" name="Produce little endian code (-mlittle-endian)" superClass="xilinx.gnu.mb.compiler.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usebarrel.1583387880" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.compiler.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usepcmp.338938483" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.compiler.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mul.323827691" name="Hardware Multiplier" superClass="xilinx.gnu.mb.compiler.inferred.mul" value="xilinx.gnu.mb.compiler.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.inferred.swplatform.includes.573056167" name="Software Platform Include Path" superClass="xilinx.gnu.compiler.inferred.swplatform.includes" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/include"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usediv.1480225555" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.compiler.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.fpu.1629241772" name="FPU" superClass="xilinx.gnu.mb.compiler.inferred.fpu" value="xilinx.gnu.mb.compiler.inferred.fpu.full" valueType="enumerated"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.toolchain.archiver.1141491931" name="MicroBlaze archiver" superClass="xilinx.gnu.mb.toolchain.archiver"/>\r
+                                                       <tool id="xilinx.gnu.mb.c.toolchain.linker.debug.94585141" name="MicroBlaze gcc linker" superClass="xilinx.gnu.mb.c.toolchain.linker.debug">\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mbversion.821554565" name="MicroBlaze Version" superClass="xilinx.gnu.mb.linker.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.norelax.1563907624" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.linker.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.garbage.991496872" name="Enable garbage collector (-Wl,--gc-sections)" superClass="xilinx.gnu.mb.linker.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usele.884251288" name="Produce little endian artifacts (-mlittle-endian)" superClass="xilinx.gnu.mb.linker.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usebarrel.1310399395" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.linker.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usepcmp.800637548" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.linker.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mul.2032017329" name="Hardware Multiplier" superClass="xilinx.gnu.mb.linker.inferred.mul" value="xilinx.gnu.mb.linker.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.lpath.1354401171" name="Software Platform Library Path" superClass="xilinx.gnu.linker.inferred.swplatform.lpath" valueType="libPaths">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/lib"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.flags.449938459" name="Software Platform Inferred Flags" superClass="xilinx.gnu.linker.inferred.swplatform.flags" valueType="libs">\r
+                                                                       <listOptionValue builtIn="false" value="-Wl,--start-group,-lxil,-lgcc,-lc,--end-group"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.c.linker.option.lscript.1597632372" name="Linker Script" superClass="xilinx.gnu.c.linker.option.lscript" value="../src/lscript.ld" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.c.link.option.other.1673037487" name="Other options (-XLinker [option])" superClass="xilinx.gnu.c.link.option.other" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value="-Map=RTOSDemo.map"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usediv.1149988771" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.linker.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.fpu.1650544141" name="FPU" superClass="xilinx.gnu.mb.linker.inferred.fpu" value="xilinx.gnu.mb.linker.inferred.fpu.full" valueType="enumerated"/>\r
+                                                               <inputType id="xilinx.gnu.linker.input.1784733490" superClass="xilinx.gnu.linker.input">\r
+                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>\r
+                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>\r
+                                                               </inputType>\r
+                                                               <inputType id="xilinx.gnu.linker.input.lscript.1166267030" name="Linker Script" superClass="xilinx.gnu.linker.input.lscript"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.cxx.toolchain.linker.debug.1439732386" name="MicroBlaze g++ linker" superClass="xilinx.gnu.mb.cxx.toolchain.linker.debug">\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mbversion.1509934549" name="MicroBlaze Version" superClass="xilinx.gnu.mb.linker.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.norelax.539737090" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.linker.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.garbage.219174910" name="Enable garbage collector (-Wl,--gc-sections)" superClass="xilinx.gnu.mb.linker.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usele.1849950874" name="Produce little endian artifacts (-mlittle-endian)" superClass="xilinx.gnu.mb.linker.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usebarrel.126401047" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.linker.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usepcmp.2099748712" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.linker.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mul.1773978162" name="Hardware Multiplier" superClass="xilinx.gnu.mb.linker.inferred.mul" value="xilinx.gnu.mb.linker.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.lpath.769655640" name="Software Platform Library Path" superClass="xilinx.gnu.linker.inferred.swplatform.lpath" valueType="libPaths">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/lib"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.flags.29683512" name="Software Platform Inferred Flags" superClass="xilinx.gnu.linker.inferred.swplatform.flags" valueType="libs">\r
+                                                                       <listOptionValue builtIn="false" value="-Wl,--start-group,-lxil,-lgcc,-lc,--end-group"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.c.linker.option.lscript.1987661405" name="Linker Script" superClass="xilinx.gnu.c.linker.option.lscript" value="../src/lscript.ld" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usediv.1593855945" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.linker.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.fpu.1402555537" name="FPU" superClass="xilinx.gnu.mb.linker.inferred.fpu" value="xilinx.gnu.mb.linker.inferred.fpu.full" valueType="enumerated"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.size.debug.725684245" name="MicroBlaze Print Size" superClass="xilinx.gnu.mb.size.debug"/>\r
+                                               </toolChain>\r
+                                       </folderInfo>\r
+                                       <sourceEntries>\r
+                                               <entry excluding="src/platform.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+                                       </sourceEntries>\r
+                               </configuration>\r
+                       </storageModule>\r
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+               </cconfiguration>\r
+               <cconfiguration id="xilinx.gnu.mb.exe.release.414255757">\r
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="xilinx.gnu.mb.exe.release.414255757" moduleId="org.eclipse.cdt.core.settings" name="Release">\r
+                               <externalSettings/>\r
+                               <extensions>\r
+                                       <extension id="com.xilinx.sdk.managedbuilder.XELF.mb" point="org.eclipse.cdt.core.BinaryParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                               </extensions>\r
+                       </storageModule>\r
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+                               <configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="xilinx.gnu.mb.exe.release.414255757" name="Release" parent="xilinx.gnu.mb.exe.release">\r
+                                       <folderInfo id="xilinx.gnu.mb.exe.release.414255757." name="/" resourcePath="">\r
+                                               <toolChain id="xilinx.gnu.mb.exe.release.toolchain.1439667655" name="Xilinx MicroBlaze GNU Toolchain" superClass="xilinx.gnu.mb.exe.release.toolchain">\r
+                                                       <targetPlatform binaryParser="com.xilinx.sdk.managedbuilder.XELF.mb" id="xilinx.mb.target.gnu.base.release.591406865" isAbstract="false" name="Debug Platform" superClass="xilinx.mb.target.gnu.base.release"/>\r
+                                                       <builder buildPath="${workspace_loc:/RTOSDemo}/Release" enableAutoBuild="true" id="xilinx.gnu.mb.toolchain.builder.release.1813699512" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="GNU make" superClass="xilinx.gnu.mb.toolchain.builder.release"/>\r
+                                                       <tool id="xilinx.gnu.mb.c.toolchain.assembler.release.256772050" name="MicroBlaze gcc assembler" superClass="xilinx.gnu.mb.c.toolchain.assembler.release">\r
+                                                               <option id="xilinx.gnu.mb.assembler.usele.738447571" name="Produce little endian code (-mlittle-endian)" superClass="xilinx.gnu.mb.assembler.usele" value="true" valueType="boolean"/>\r
+                                                               <inputType id="xilinx.gnu.assembler.input.610027049" superClass="xilinx.gnu.assembler.input"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.c.toolchain.compiler.release.1443217249" name="MicroBlaze gcc compiler" superClass="xilinx.gnu.mb.c.toolchain.compiler.release">\r
+                                                               <option defaultValue="gnu.c.optimization.level.more" id="xilinx.gnu.compiler.option.optimization.level.21573265" name="Optimization Level" superClass="xilinx.gnu.compiler.option.optimization.level" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.option.debugging.level.1736905032" name="Debug Level" superClass="xilinx.gnu.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mbversion.1564374944" name="MicroBlaze Version" superClass="xilinx.gnu.mb.compiler.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.norelax.1980824775" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.compiler.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.garbage.1188317904" name="Enable garbage collector (-ffunction-sections -fdata-sections)" superClass="xilinx.gnu.mb.compiler.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usele.1634323562" name="Produce little endian code (-mlittle-endian)" superClass="xilinx.gnu.mb.compiler.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usebarrel.572581704" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.compiler.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usepcmp.697475189" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.compiler.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mul.18073345" name="Hardware Multiplier" superClass="xilinx.gnu.mb.compiler.inferred.mul" value="xilinx.gnu.mb.compiler.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.inferred.swplatform.includes.2035386135" name="Software Platform Include Path" superClass="xilinx.gnu.compiler.inferred.swplatform.includes" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/include"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usediv.1563197894" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.compiler.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.fpu.1688506526" name="FPU" superClass="xilinx.gnu.mb.compiler.inferred.fpu" value="xilinx.gnu.mb.compiler.inferred.fpu.full" valueType="enumerated"/>\r
+                                                               <inputType id="xilinx.gnu.compiler.input.1636598870" name="C source files" superClass="xilinx.gnu.compiler.input"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.cxx.toolchain.compiler.release.1123156887" name="MicroBlaze g++ compiler" superClass="xilinx.gnu.mb.cxx.toolchain.compiler.release">\r
+                                                               <option defaultValue="gnu.c.optimization.level.more" id="xilinx.gnu.compiler.option.optimization.level.305690179" name="Optimization Level" superClass="xilinx.gnu.compiler.option.optimization.level" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.option.debugging.level.1674840845" name="Debug Level" superClass="xilinx.gnu.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mbversion.1420112600" name="MicroBlaze Version" superClass="xilinx.gnu.mb.compiler.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.norelax.131790279" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.compiler.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.garbage.697175300" name="Enable garbage collector (-ffunction-sections -fdata-sections)" superClass="xilinx.gnu.mb.compiler.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usele.1682568396" name="Produce little endian code (-mlittle-endian)" superClass="xilinx.gnu.mb.compiler.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usebarrel.1995445573" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.compiler.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usepcmp.1968082329" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.compiler.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.mul.1521748201" name="Hardware Multiplier" superClass="xilinx.gnu.mb.compiler.inferred.mul" value="xilinx.gnu.mb.compiler.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.compiler.inferred.swplatform.includes.1583494665" name="Software Platform Include Path" superClass="xilinx.gnu.compiler.inferred.swplatform.includes" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/include"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.usediv.1207551196" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.compiler.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.compiler.inferred.fpu.1106593933" name="FPU" superClass="xilinx.gnu.mb.compiler.inferred.fpu" value="xilinx.gnu.mb.compiler.inferred.fpu.full" valueType="enumerated"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.toolchain.archiver.1268379117" name="MicroBlaze archiver" superClass="xilinx.gnu.mb.toolchain.archiver"/>\r
+                                                       <tool id="xilinx.gnu.mb.c.toolchain.linker.release.269837122" name="MicroBlaze gcc linker" superClass="xilinx.gnu.mb.c.toolchain.linker.release">\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mbversion.2042414685" name="MicroBlaze Version" superClass="xilinx.gnu.mb.linker.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.norelax.1265316944" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.linker.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.garbage.1863317292" name="Enable garbage collector (-Wl,--gc-sections)" superClass="xilinx.gnu.mb.linker.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usele.149684890" name="Produce little endian artifacts (-mlittle-endian)" superClass="xilinx.gnu.mb.linker.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usebarrel.125003317" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.linker.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usepcmp.1032378219" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.linker.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mul.28454705" name="Hardware Multiplier" superClass="xilinx.gnu.mb.linker.inferred.mul" value="xilinx.gnu.mb.linker.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.lpath.464601386" name="Software Platform Library Path" superClass="xilinx.gnu.linker.inferred.swplatform.lpath" valueType="libPaths">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/lib"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.flags.2029257059" name="Software Platform Inferred Flags" superClass="xilinx.gnu.linker.inferred.swplatform.flags" valueType="libs">\r
+                                                                       <listOptionValue builtIn="false" value="-Wl,--start-group,-lxil,-lgcc,-lc,--end-group"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.c.linker.option.lscript.627698424" name="Linker Script" superClass="xilinx.gnu.c.linker.option.lscript" value="../src/lscript.ld" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usediv.339122145" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.linker.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.fpu.1438305304" name="FPU" superClass="xilinx.gnu.mb.linker.inferred.fpu" value="xilinx.gnu.mb.linker.inferred.fpu.full" valueType="enumerated"/>\r
+                                                               <inputType id="xilinx.gnu.linker.input.295030377" superClass="xilinx.gnu.linker.input">\r
+                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>\r
+                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>\r
+                                                               </inputType>\r
+                                                               <inputType id="xilinx.gnu.linker.input.lscript.1843704465" name="Linker Script" superClass="xilinx.gnu.linker.input.lscript"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.cxx.toolchain.linker.release.2049764997" name="MicroBlaze g++ linker" superClass="xilinx.gnu.mb.cxx.toolchain.linker.release">\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mbversion.408481026" name="MicroBlaze Version" superClass="xilinx.gnu.mb.linker.inferred.mbversion" value="9.4" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.norelax.321430253" name="No relaxation (-Wl,--no-relax)" superClass="xilinx.gnu.mb.linker.inferred.norelax" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.garbage.1811933000" name="Enable garbage collector (-Wl,--gc-sections)" superClass="xilinx.gnu.mb.linker.inferred.garbage" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usele.1277050026" name="Produce little endian artifacts (-mlittle-endian)" superClass="xilinx.gnu.mb.linker.inferred.usele" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usebarrel.1525237857" name="Use Barrel Shifter (-mxl-barrel-shift)" superClass="xilinx.gnu.mb.linker.inferred.usebarrel" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usepcmp.893116745" name="Use Pattern Compare (-mxl-pattern-compare)" superClass="xilinx.gnu.mb.linker.inferred.usepcmp" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.mul.1695487004" name="Hardware Multiplier" superClass="xilinx.gnu.mb.linker.inferred.mul" value="xilinx.gnu.mb.linker.inferred.mul.64bit" valueType="enumerated"/>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.lpath.2083028820" name="Software Platform Library Path" superClass="xilinx.gnu.linker.inferred.swplatform.lpath" valueType="libPaths">\r
+                                                                       <listOptionValue builtIn="false" value="../../BSP/microblaze_0/lib"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.linker.inferred.swplatform.flags.919481051" name="Software Platform Inferred Flags" superClass="xilinx.gnu.linker.inferred.swplatform.flags" valueType="libs">\r
+                                                                       <listOptionValue builtIn="false" value="-Wl,--start-group,-lxil,-lgcc,-lc,--end-group"/>\r
+                                                               </option>\r
+                                                               <option id="xilinx.gnu.c.linker.option.lscript.1354969079" name="Linker Script" superClass="xilinx.gnu.c.linker.option.lscript" value="../src/lscript.ld" valueType="string"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.usediv.1252380414" name="Use hardware divider (-mno-xl-soft-div)" superClass="xilinx.gnu.mb.linker.inferred.usediv" value="true" valueType="boolean"/>\r
+                                                               <option id="xilinx.gnu.mb.linker.inferred.fpu.320989190" name="FPU" superClass="xilinx.gnu.mb.linker.inferred.fpu" value="xilinx.gnu.mb.linker.inferred.fpu.full" valueType="enumerated"/>\r
+                                                       </tool>\r
+                                                       <tool id="xilinx.gnu.mb.size.release.1391967460" name="MicroBlaze Print Size" superClass="xilinx.gnu.mb.size.release"/>\r
+                                               </toolChain>\r
+                                       </folderInfo>\r
+                               </configuration>\r
+                       </storageModule>\r
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+               </cconfiguration>\r
+       </storageModule>\r
+       <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>\r
+       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+               <project id="RTOSDemo.xilinx.gnu.mb.exe.1839712182" name="Xilinx MicroBlaze Executable" projectType="xilinx.gnu.mb.exe"/>\r
+       </storageModule>\r
+       <storageModule moduleId="scannerConfiguration">\r
+               <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>\r
+               <scannerConfigBuildInfo instanceId="xilinx.gnu.mb.exe.debug.1168698469;xilinx.gnu.mb.exe.debug.1168698469.;xilinx.gnu.mb.c.toolchain.compiler.debug.610152912;xilinx.gnu.compiler.input.958217800">\r
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.xilinx.managedbuilder.ui.MBGCCManagedMakePerProjectProfileC"/>\r
+               </scannerConfigBuildInfo>\r
+               <scannerConfigBuildInfo instanceId="xilinx.gnu.mb.exe.debug.1168698469;xilinx.gnu.mb.exe.debug.1168698469.">\r
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.xilinx.managedbuilder.ui.MBGCCManagedMakePerProjectProfileC"/>\r
+               </scannerConfigBuildInfo>\r
+               <scannerConfigBuildInfo instanceId="xilinx.gnu.mb.exe.release.414255757;xilinx.gnu.mb.exe.release.414255757.">\r
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.xilinx.managedbuilder.ui.MBGCCManagedMakePerProjectProfileC"/>\r
+               </scannerConfigBuildInfo>\r
+               <scannerConfigBuildInfo instanceId="xilinx.gnu.mb.exe.release.414255757;xilinx.gnu.mb.exe.release.414255757.;xilinx.gnu.mb.c.toolchain.compiler.release.1443217249;xilinx.gnu.compiler.input.1636598870">\r
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.xilinx.managedbuilder.ui.MBGCCManagedMakePerProjectProfileC"/>\r
+               </scannerConfigBuildInfo>\r
+       </storageModule>\r
+       <storageModule moduleId="refreshScope" versionNumber="2">\r
+               <configuration configurationName="Debug">\r
+                       <resource resourceType="PROJECT" workspacePath="/RTOSDemo"/>\r
+               </configuration>\r
+               <configuration configurationName="Release">\r
+                       <resource resourceType="PROJECT" workspacePath="/RTOSDemo"/>\r
+               </configuration>\r
+       </storageModule>\r
+</cproject>\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/.project b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/.project
new file mode 100644 (file)
index 0000000..3dbb5fb
--- /dev/null
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>RTOSDemo</name>\r
+       <comment></comment>\r
+       <projects>\r
+               <project>BSP</project>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>\r
+                       <triggers>full,incremental,</triggers>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.cdt.core.cnature</nature>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>\r
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>\r
+       </natures>\r
+       <linkedResources>\r
+               <link>\r
+                       <name>src/FreeRTOS_Source</name>\r
+                       <type>2</type>\r
+                       <locationURI>FREERTOS_ROOT/FreeRTOS/Source</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>src/Full_Demo/Common_Demo_Source</name>\r
+                       <type>2</type>\r
+                       <locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>src/Full_Demo/FreeRTOS+CLI</name>\r
+                       <type>2</type>\r
+                       <locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>src/Full_Demo/Sample-CLI-commands.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c</locationURI>\r
+               </link>\r
+               <link>\r
+                       <name>src/Full_Demo/UARTCommandConsole.c</name>\r
+                       <type>1</type>\r
+                       <locationURI>FREERTOS_ROOT/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c</locationURI>\r
+               </link>\r
+       </linkedResources>\r
+       <filteredResources>\r
+               <filter>\r
+                       <id>1420634088772</id>\r
+                       <name>src/FreeRTOS_Source</name>\r
+                       <type>6</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-croutine.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1420634120346</id>\r
+                       <name>src/FreeRTOS_Source/portable</name>\r
+                       <type>9</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-GCC</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1420634120356</id>\r
+                       <name>src/FreeRTOS_Source/portable</name>\r
+                       <type>9</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-MemMang</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1420646347327</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source</name>\r
+                       <type>9</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-include</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1420646347337</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source</name>\r
+                       <type>9</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-Minimal</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1420635505242</id>\r
+                       <name>src/FreeRTOS_Source/portable/GCC</name>\r
+                       <type>9</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-MicroBlazeV8</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421332822358</id>\r
+                       <name>src/FreeRTOS_Source/portable/MemMang</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-heap_4.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118832</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-sp_flop.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118842</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-semtest.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118842</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-dynamic.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118852</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-countsem.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118852</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-GenQTest.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118852</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-recmutex.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118862</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-partest.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118872</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-comtest2.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118872</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-TimerDemo.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118872</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-EventGroupsDemo.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118882</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-TaskNotify.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118882</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-IntSemTest.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118892</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-flash_timer.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1421425118892</id>\r
+                       <name>src/Full_Demo/Common_Demo_Source/Minimal</name>\r
+                       <type>5</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-blocktim.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+       </filteredResources>\r
+       <variableList>\r
+               <variable>\r
+                       <name>FREERTOS_ROOT</name>\r
+                       <value>$%7BPARENT-4-PROJECT_LOC%7D</value>\r
+               </variable>\r
+       </variableList>\r
+</projectDescription>\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Blinky_Demo/main_blinky.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Blinky_Demo/main_blinky.c
new file mode 100644 (file)
index 0000000..45a125f
--- /dev/null
@@ -0,0 +1,231 @@
+/*\r
+    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
+\r
+       ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+       ***************************************************************************\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+       the FAQ page "My application does not run, what could be wrong?".  Have you\r
+       defined configASSERT()?\r
+\r
+       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+       embedded software for free we request you assist our global community by\r
+       participating in the support forum.\r
+\r
+       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+       be as productive as possible as early as possible.  Now you can receive\r
+       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+       Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+/******************************************************************************\r
+ * NOTE 1:  This project provides two demo applications.  A simple blinky\r
+ * style project, and a more comprehensive test and demo application.  The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
+ * between the two.  See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
+ * in main.c.  This file implements the simply blinky style version.\r
+ *\r
+ * NOTE 2:  This file only contains the source code that is specific to the\r
+ * basic demo.  Generic functions, such FreeRTOS hook functions, and functions\r
+ * required to configure the hardware are defined in main.c.\r
+ ******************************************************************************\r
+ *\r
+ * main_blinky() creates one queue, and two tasks.  It then starts the\r
+ * scheduler.\r
+ *\r
+ * The Queue Send Task:\r
+ * The queue send task is implemented by the prvQueueSendTask() function in\r
+ * this file.  prvQueueSendTask() sits in a loop that causes it to repeatedly\r
+ * block for 200 milliseconds, before sending the value 100 to the queue that\r
+ * was created within main_blinky().  Once the value is sent, the task loops\r
+ * back around to block for another 200 milliseconds...and so on.\r
+ *\r
+ * The Queue Receive Task:\r
+ * The queue receive task is implemented by the prvQueueReceiveTask() function\r
+ * in this file.  prvQueueReceiveTask() sits in a loop where it repeatedly\r
+ * blocks on attempts to read data from the queue that was created within\r
+ * main_blinky().  When data is received, the task checks the value of the\r
+ * data, and if the value equals the expected 100, toggles an LED.  The 'block\r
+ * time' parameter passed to the queue receive function specifies that the\r
+ * task should be held in the Blocked state indefinitely to wait for data to\r
+ * be available on the queue.  The queue receive task will only leave the\r
+ * Blocked state when the queue send task writes to the queue.  As the queue\r
+ * send task writes to the queue every 200 milliseconds, the queue receive\r
+ * task leaves the Blocked state every 200 milliseconds, and therefore toggles\r
+ * the LED every 200 milliseconds.\r
+ */\r
+\r
+/* Kernel includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "semphr.h"\r
+\r
+/* Standard demo includes. */\r
+#include "partest.h"\r
+\r
+/* Priorities at which the tasks are created. */\r
+#define mainQUEUE_RECEIVE_TASK_PRIORITY                ( tskIDLE_PRIORITY + 2 )\r
+#define        mainQUEUE_SEND_TASK_PRIORITY            ( tskIDLE_PRIORITY + 1 )\r
+\r
+/* The rate at which data is sent to the queue.  The 200ms value is converted\r
+to ticks using the pdMS_TO_TICKS() macro. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS                    ( pdMS_TO_TICKS( 200UL ) )\r
+\r
+/* The number of items the queue can hold.  This is 1 as the receive task\r
+will remove items as they are added, meaning the send task should always find\r
+the queue empty. */\r
+#define mainQUEUE_LENGTH                                       ( 1 )\r
+\r
+/* The LED toggled by the Rx task. */\r
+#define mainTASK_LED                                           ( 0 )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * The tasks as described in the comments at the top of this file.\r
+ */\r
+static void prvQueueReceiveTask( void *pvParameters );\r
+static void prvQueueSendTask( void *pvParameters );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The queue used by both tasks. */\r
+static QueueHandle_t xQueue = NULL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void main_blinky( void )\r
+{\r
+       /* Create the queue. */\r
+       xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );\r
+\r
+       if( xQueue != NULL )\r
+       {\r
+               /* Start the two tasks as described in the comments at the top of this\r
+               file. */\r
+               xTaskCreate( prvQueueReceiveTask,                               /* The function that implements the task. */\r
+                                       "Rx",                                                           /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
+                                       configMINIMAL_STACK_SIZE,                       /* The size of the stack to allocate to the task. */\r
+                                       NULL,                                                           /* The parameter passed to the task - not used in this case. */\r
+                                       mainQUEUE_RECEIVE_TASK_PRIORITY,        /* The priority assigned to the task. */\r
+                                       NULL );                                                         /* The task handle is not required, so NULL is passed. */\r
+\r
+               xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
+\r
+               /* Start the tasks and timer running. */\r
+               vTaskStartScheduler();\r
+       }\r
+\r
+       /* If all is well, the scheduler will now be running, and the following\r
+       line will never be reached.  If the following line does execute, then\r
+       there was either insufficient FreeRTOS heap memory available for the idle\r
+       and/or timer tasks to be created, or vTaskStartScheduler() was called from\r
+       User mode.  See the memory management section on the FreeRTOS web site for\r
+       more details on the FreeRTOS heap http://www.freertos.org/a00111.html.  The\r
+       mode from which main() is called is set in the C start up code and must be\r
+       a privileged mode (not user mode). */\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvQueueSendTask( void *pvParameters )\r
+{\r
+TickType_t xNextWakeTime;\r
+const uint32_t ulValueToSend = 100UL;\r
+\r
+       /* Remove compiler warning about unused parameter. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Initialise xNextWakeTime - this only needs to be done once. */\r
+       xNextWakeTime = xTaskGetTickCount();\r
+\r
+       for( ;; )\r
+       {\r
+               /* Place this task in the blocked state until it is time to run again. */\r
+               vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );\r
+\r
+               /* Send to the queue - causing the queue receive task to unblock and\r
+               toggle the LED.  0 is used as the block time so the sending operation\r
+               will not block - it shouldn't need to block as the queue should always\r
+               be empty at this point in the code. */\r
+               xQueueSend( xQueue, &ulValueToSend, 0U );\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvQueueReceiveTask( void *pvParameters )\r
+{\r
+uint32_t ulReceivedValue;\r
+const uint32_t ulExpectedValue = 100UL;\r
+\r
+       /* Remove compiler warning about unused parameter. */\r
+       ( void ) pvParameters;\r
+\r
+       for( ;; )\r
+       {\r
+               /* Wait until something arrives in the queue - this task will block\r
+               indefinitely provided INCLUDE_vTaskSuspend is set to 1 in\r
+               FreeRTOSConfig.h. */\r
+               xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );\r
+\r
+               /*  To get here something must have been received from the queue, but\r
+               is it the expected value?  If it is, toggle the LED. */\r
+               if( ulReceivedValue == ulExpectedValue )\r
+               {\r
+                       vParTestToggleLED( mainTASK_LED );\r
+                       ulReceivedValue = 0U;\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/FreeRTOSConfig.h
new file mode 100644 (file)
index 0000000..e1ee403
--- /dev/null
@@ -0,0 +1,188 @@
+/*\r
+    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
+\r
+       ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+       ***************************************************************************\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+       the FAQ page "My application does not run, what could be wrong?".  Have you\r
+       defined configASSERT()?\r
+\r
+       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+       embedded software for free we request you assist our global community by\r
+       participating in the support forum.\r
+\r
+       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+       be as productive as possible as early as possible.  Now you can receive\r
+       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+       Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+#ifndef FREERTOS_CONFIG_H\r
+#define FREERTOS_CONFIG_H\r
+\r
+/*-----------------------------------------------------------\r
+ * Application specific definitions.\r
+ *\r
+ * These definitions should be adjusted for your particular hardware and\r
+ * application requirements.\r
+ *\r
+ * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
+ * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
+ *\r
+ * See http://www.freertos.org/a00110.html.\r
+ *----------------------------------------------------------*/\r
+\r
+/* configINTERRUPT_CONTROLLER_TO_USE must be set to the ID of the interrupt\r
+controller that is going to be used directly by FreeRTOS itself.  Most hardware\r
+designs will only include on interrupt controller. */\r
+#define configINTERRUPT_CONTROLLER_TO_USE XPAR_INTC_SINGLE_DEVICE_ID\r
+\r
+/* If configINSTALL_EXCEPTION_HANDLERS is set to 1, then the kernel will\r
+automatically install its own exception handlers before the kernel is started,\r
+if the application writer has not already caused them to be installed using the\r
+vPortExceptionsInstallHandlers() API function.  See the documentation page for\r
+this demo on the FreeRTOS.org web site for more information. */\r
+#define configINSTALL_EXCEPTION_HANDLERS               1\r
+\r
+\r
+/* Constants related to the behaviour or the scheduler. */\r
+#define configUSE_PREEMPTION                                   1\r
+#define configUSE_TIME_SLICING                                 1\r
+#define configMAX_PRIORITIES                                   ( 7 )\r
+#define configTICK_RATE_HZ                                             ( ( TickType_t ) 1000 )\r
+#define configIDLE_SHOULD_YIELD                                        1\r
+#define configUSE_16_BIT_TICKS                                 0 /* Only for 8 and 16-bit hardware. */\r
+\r
+/* Constants that describe the hardware and memory usage. */\r
+#define configCPU_CLOCK_HZ                                             ( Not used in this demo as it is determined by the hardware )\r
+#define configMINIMAL_STACK_SIZE                               ( ( uint16_t ) 220 )\r
+#define configTOTAL_HEAP_SIZE                                  ( ( size_t ) ( 50 * 1024 ) ) /* No effect if heap_3.c is used. */\r
+#define configMAX_TASK_NAME_LEN                                        ( 12 )\r
+\r
+/* Constants that build features in or out. */\r
+#define configUSE_MUTEXES                                              1\r
+#define configUSE_TICKLESS_IDLE                                        0\r
+#define configUSE_APPLICATION_TASK_TAG                 0\r
+#define configUSE_NEWLIB_REENTRANT                             0\r
+#define configUSE_CO_ROUTINES                                  0\r
+#define configUSE_COUNTING_SEMAPHORES                  1\r
+#define configUSE_RECURSIVE_MUTEXES                            1\r
+#define configUSE_QUEUE_SETS                                   0\r
+#define configUSE_TASK_NOTIFICATIONS                   1\r
+\r
+/* Constants that define which hook (callback) functions should be used. */\r
+#define configUSE_IDLE_HOOK                                            1\r
+#define configUSE_TICK_HOOK                                            1\r
+#define configUSE_MALLOC_FAILED_HOOK                   1\r
+\r
+/* Constants provided for debugging and optimisation assistance. */\r
+#define configCHECK_FOR_STACK_OVERFLOW                 2\r
+#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ )\r
+#define configQUEUE_REGISTRY_SIZE                              0\r
+\r
+/* Constants related to the generation of run time stats. */\r
+#define configGENERATE_RUN_TIME_STATS                  1\r
+#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vMainConfigTimerForRunTimeStats(); /* Only used when configGENERATE_RUN_TIME_STATS is 1. */\r
+#define portGET_RUN_TIME_COUNTER_VALUE()               ulMainGetRunTimeCounterValue();         /* Only used when configGENERATE_RUN_TIME_STATS is 1. */\r
+\r
+/* Software timer definitions. */\r
+#define configUSE_TIMERS                                               1\r
+#define configTIMER_TASK_PRIORITY                              ( configMAX_PRIORITIES - 4 )\r
+#define configTIMER_QUEUE_LENGTH                               10\r
+#define configTIMER_TASK_STACK_DEPTH                   ( configMINIMAL_STACK_SIZE )\r
+\r
+/* Set the following definitions to 1 to include the API function, or zero\r
+to exclude the API function.  NOTE:  Setting an INCLUDE_ parameter to 0 is only\r
+necessary if the linker does not automatically remove functions that are not\r
+referenced anyway. */\r
+#define INCLUDE_vTaskPrioritySet                               1\r
+#define INCLUDE_uxTaskPriorityGet                              1\r
+#define INCLUDE_vTaskDelete                                            1\r
+#define INCLUDE_vTaskCleanUpResources                  0\r
+#define INCLUDE_vTaskSuspend                                   1\r
+#define INCLUDE_vTaskDelayUntil                                        1\r
+#define INCLUDE_vTaskDelay                                             1\r
+#define INCLUDE_uxTaskGetStackHighWaterMark            1\r
+#define INCLUDE_pcTaskGetTaskName                              1\r
+#define INCLUDE_xTaskGetIdleTaskHandle                 0\r
+#define INCLUDE_eTaskGetState                                  1\r
+#define INCLUDE_xTaskResumeFromISR                             0\r
+#define INCLUDE_xTaskGetCurrentTaskHandle              1\r
+#define INCLUDE_xTaskGetSchedulerState                 0\r
+#define INCLUDE_xSemaphoreGetMutexHolder               0\r
+#define INCLUDE_xTimerPendFunctionCall                 1\r
+\r
+/* This demo does not make use of example stats formatting functions.  These\r
+format the raw data provided by the uxTaskGetSystemState() function in to human\r
+readable ASCII form.  See the notes in the implementation of vTaskList() within\r
+FreeRTOS/Source/tasks.c for limitations. */\r
+#define configUSE_TRACE_FACILITY                               1\r
+#define configUSE_STATS_FORMATTING_FUNCTIONS   1\r
+\r
+/* The size of the global output buffer that is available for use when there\r
+are multiple command interpreters running at once (for example, one on a UART\r
+and one on TCP/IP).  This is done to prevent an output buffer being defined by\r
+each implementation - which would waste RAM.  In this case, there is only one\r
+command interpreter running. */\r
+#define configCOMMAND_INT_MAX_OUTPUT_SIZE 1024\r
+\r
+/* Prevent the function prototypes being included from asm files. */\r
+#ifndef __ASSEMBLER__\r
+       void vMainConfigTimerForRunTimeStats( void );\r
+       uint32_t ulMainGetRunTimeCounterValue( void );\r
+       void vAssertCalled( const char * pcFile, unsigned long ulLine );\r
+#endif\r
+\r
+#endif /* FREERTOS_CONFIG_H */\r
+\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/RegisterTests.S b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/RegisterTests.S
new file mode 100644 (file)
index 0000000..6d3d10d
--- /dev/null
@@ -0,0 +1,303 @@
+/*\r
+    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
+\r
+       ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+       ***************************************************************************\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+       the FAQ page "My application does not run, what could be wrong?".  Have you\r
+       defined configASSERT()?\r
+\r
+       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+       embedded software for free we request you assist our global community by\r
+       participating in the support forum.\r
+\r
+       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+       be as productive as possible as early as possible.  Now you can receive\r
+       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+       Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+/*\r
+ * The register test task as described in the comments at the top of main-full.c.\r
+ */\r
+.global vRegTest1Implementation\r
+.global vRegTest2Implementation\r
+\r
+/* Variables that are incremented on each iteration of the reg test tasks -\r
+provided the tasks have not reported any errors.  The check timer inspects these\r
+variables to ensure they are still incrementing as expected.  If a variable\r
+stops incrementing then it is likely that its associate task has stalled or\r
+detected an error. */\r
+.extern ulRegTest1LoopCounter\r
+.extern ulRegTest2LoopCounter\r
+\r
+#warning Does not seem to test the floating point context register.\r
+/*-----------------------------------------------------------*/\r
+\r
+.section .text\r
+.align 2\r
+vRegTest1Implementation:\r
+       /* First fill the relevant registers with known values.  r0 is always 0, r1\r
+       is the stack pointer, and r3 is a read only small data area pointer. */\r
+       addi r3, r0, 3\r
+       addi r4, r0, 4\r
+       addi r5, r0, 5\r
+       addi r6, r0, 6\r
+       addi r7, r0, 7\r
+       addi r8, r0, 8\r
+       addi r9, r0, 9\r
+       addi r10, r0, 10\r
+       addi r11, r0, 11\r
+       addi r12, r0, 12\r
+       /* R13 = read write small data area anchour. */\r
+       /* R14 = return address for interrupt. */\r
+       /* R15 = return address for sub-routine. */\r
+       /* R16 = return address for trap. */\r
+       /* R17 = return address for exceptions. */\r
+       /* R18 = reserved for assembler and compiler temporaries. */\r
+       addi r19, r0, 19\r
+       addi r20, r0, 20\r
+       addi r21, r0, 21\r
+       addi r22, r0, 22\r
+       addi r23, r0, 23\r
+       addi r24, r0, 24\r
+       addi r25, r0, 25\r
+       addi r26, r0, 26\r
+       addi r27, r0, 27\r
+       addi r28, r0, 28\r
+       addi r29, r0, 29\r
+       addi r30, r0, 30\r
+       addi r31, r0, 31\r
+\r
+       /* Now test the register values to ensure they contain the same value that\r
+       was written to them above.       This task will get preempted frequently so\r
+       other tasks are likely to have executed since the register values were\r
+       written.  If any register contains an unexpected value then the task will\r
+       branch to Error_Loop_1, which in turn prevents it from incrementing its\r
+       loop counter, enabling the check timer to determine that all is not as it\r
+       should be. */\r
+\r
+Loop_Start_1:\r
+       xori r18, r3, 3\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r4, 4\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r6, 6\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r7, 7\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r8, 8\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r9, 9\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r10, 10\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r11, 11\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r12, 12\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r19, 19\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r20, 20\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r21, 21\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r22, 22\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r23, 23\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r24, 24\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r25, 25\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r26, 26\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r27, 27\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r28, 28\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r29, 29\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r30, 30\r
+       bnei r18, Error_Loop_1\r
+       xori r18, r31, 31\r
+       bnei r18, Error_Loop_1\r
+\r
+       /* If this task has not branched to the error loop, then everything is ok,\r
+       and the check variable can be incremented to indicate that this task\r
+       is still running.  Then, brach back to the top to check the register\r
+       contents again. */\r
+       lwi r18, r0, ulRegTest1LoopCounter\r
+       addik r18, r18, 1\r
+       swi r18, r0, ulRegTest1LoopCounter\r
+\r
+       bri Loop_Start_1\r
+\r
+       /* The test function will branch here if it discovers an error.  This part\r
+       of the code just sits in a NULL loop, which prevents the check variable\r
+       incrementing any further to allow the check timer to recognize that this\r
+       test has failed. */\r
+Error_Loop_1:\r
+       bri 0\r
+       nop\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+.section .text\r
+.align 2\r
+vRegTest2Implementation:\r
+       /* First fill the relevant registers with known values.  r0 is always 0, r1\r
+       is the stack pointer, and r3 is a read only small data area pointer. */\r
+       addi r3, r0, 30000\r
+       addi r4, r0, 40000\r
+       addi r5, r0, 50000\r
+       addi r6, r0, 60000\r
+       addi r7, r0, 70000\r
+       addi r8, r0, 80000\r
+       addi r9, r0, 90000\r
+       addi r10, r0, 100000\r
+       addi r11, r0, 110000\r
+       addi r12, r0, 120000\r
+       /* R13 = read write small data area anchour. */\r
+       /* R14 = return address for interrupt. */\r
+       /* R15 = return address for sub-routine. */\r
+       /* R16 = return address for trap. */\r
+       /* R17 = return address for exceptions. */\r
+       /* R18 = reserved for assembler and compiler temporaries. */\r
+       addi r19, r0, 190000\r
+       addi r20, r0, 200000\r
+       addi r21, r0, 210000\r
+       addi r22, r0, 220000\r
+       addi r23, r0, 230000\r
+       addi r24, r0, 240000\r
+       addi r25, r0, 250000\r
+       addi r26, r0, 260000\r
+       addi r27, r0, 270000\r
+       addi r28, r0, 280000\r
+       addi r29, r0, 290000\r
+       addi r30, r0, 300000\r
+       addi r31, r0, 310000\r
+\r
+       /* Now test the register values to ensure they contain the same value that\r
+       was written to them above.       This task will get preempted frequently so\r
+       other tasks are likely to have executed since the register values were\r
+       written.  If any register contains an unexpected value then the task will\r
+       branch to Error_Loop_2, which in turn prevents it from incrementing its\r
+       loop counter, enabling the check timer to determine that all is not as it\r
+       should be. */\r
+\r
+Loop_Start_2:\r
+       xori r18, r3, 30000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r4, 40000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r6, 60000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r7, 70000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r8, 80000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r9, 90000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r10, 100000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r11, 110000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r12, 120000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r19, 190000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r20, 200000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r21, 210000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r22, 220000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r23, 230000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r24, 240000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r25, 250000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r26, 260000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r27, 270000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r28, 280000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r29, 290000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r30, 300000\r
+       bnei r18, Error_Loop_2\r
+       xori r18, r31, 310000\r
+       bnei r18, Error_Loop_2\r
+\r
+       /* If this task has not branched to the error loop, then everything is ok,\r
+       and the check variable can be incremented to indicate that this task\r
+       is still running.  Then, brach back to the top to check the register\r
+       contents again. */\r
+       lwi r18, r0, ulRegTest2LoopCounter\r
+       addik r18, r18, 1\r
+       swi r18, r0, ulRegTest2LoopCounter\r
+\r
+       bri Loop_Start_2\r
+\r
+       /* The test function will branch here if it discovers an error.  This part\r
+       of the code just sits in a NULL loop, which prevents the check variable\r
+       incrementing any further to allow the check timer to recognize that this\r
+       test has failed. */\r
+Error_Loop_2:\r
+       bri 0\r
+       nop\r
+\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/main_full.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/Full_Demo/main_full.c
new file mode 100644 (file)
index 0000000..7c1532f
--- /dev/null
@@ -0,0 +1,483 @@
+/*\r
+    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
+\r
+       ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+       ***************************************************************************\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+       the FAQ page "My application does not run, what could be wrong?".  Have you\r
+       defined configASSERT()?\r
+\r
+       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+       embedded software for free we request you assist our global community by\r
+       participating in the support forum.\r
+\r
+       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+       be as productive as possible as early as possible.  Now you can receive\r
+       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+       Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+/******************************************************************************\r
+ * NOTE 1:  This project provides two demo applications.  A simple blinky\r
+ * style project, and a more comprehensive test and demo application.  The\r
+ * mainCREATE_SIMPLY_BLINKY_DEMO_ONLY setting in main.c is used to select\r
+ * between the two.  See the notes on using mainCREATE_SIMPLY_BLINKY_DEMO_ONLY\r
+ * in main.c.  This file implements the comprehensive version.\r
+ *\r
+ * NOTE 2:  This file only contains the source code that is specific to the\r
+ * full demo.  Generic functions, such FreeRTOS hook functions, and functions\r
+ * required to configure the hardware, are defined in main.c.\r
+ *\r
+ ******************************************************************************\r
+ *\r
+ * main_full() creates all the demo application tasks and software timers, then\r
+ * starts the scheduler.  The web documentation provides more details of the\r
+ * standard demo application tasks, which provide no particular functionality,\r
+ * but do provide a good example of how to use the FreeRTOS API.\r
+ *\r
+ * In addition to the standard demo tasks, the following tasks and tests are\r
+ * defined and/or created within this file:\r
+ *\r
+ * FreeRTOS+CLI command console.  The command console is access through the\r
+ * UART to USB connector on the ZC702 Zynq development board (marked J2).  For\r
+ * reasons of robustness testing the UART driver is deliberately written to be\r
+ * inefficient and should not be used as a template for a production driver.\r
+ * Type "help" to see a list of registered commands.  The FreeRTOS+CLI license\r
+ * is different to the FreeRTOS license, see http://www.FreeRTOS.org/cli for\r
+ * license and usage details.  The default baud rate is 115200.\r
+ *\r
+ * "Reg test" tasks - These fill both the core and floating point registers with\r
+ * known values, then check that each register maintains its expected value for\r
+ * the lifetime of the task.  Each task uses a different set of values.  The reg\r
+ * test tasks execute with a very low priority, so get preempted very\r
+ * frequently.  A register containing an unexpected value is indicative of an\r
+ * error in the context switching mechanism.\r
+ *\r
+ * "Check" task - The check task period is initially set to three seconds.  The\r
+ * task checks that all the standard demo tasks, and the register check tasks,\r
+ * are not only still executing, but are executing without reporting any errors.\r
+ * If the check task discovers that a task has either stalled, or reported an\r
+ * error, then it changes its own execution period from the initial three\r
+ * seconds, to just 200ms.  The check task also toggles an LED each time it is\r
+ * called.  This provides a visual indication of the system status:  If the LED\r
+ * toggles every three seconds, then no issues have been discovered.  If the LED\r
+ * toggles every 200ms, then an issue has been discovered with at least one\r
+ * task.\r
+ */\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+\r
+/* Kernel includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "timers.h"\r
+#include "semphr.h"\r
+\r
+/* Standard demo application includes. */\r
+#include "flash_timer.h"\r
+#include "flop.h"\r
+#include "semtest.h"\r
+#include "dynamic.h"\r
+#include "blocktim.h"\r
+#include "countsem.h"\r
+#include "GenQTest.h"\r
+#include "recmutex.h"\r
+#include "partest.h"\r
+#include "serial.h"\r
+#include "TimerDemo.h"\r
+#include "IntQueue.h"\r
+#include "EventGroupsDemo.h"\r
+#include "TaskNotify.h"\r
+#include "IntSemTest.h"\r
+\r
+/* Priorities for the demo application tasks. */\r
+#define mainSEM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 1UL )\r
+#define mainBLOCK_Q_PRIORITY                           ( tskIDLE_PRIORITY + 2UL )\r
+#define mainCREATOR_TASK_PRIORITY                      ( tskIDLE_PRIORITY + 3UL )\r
+#define mainFLOP_TASK_PRIORITY                         ( tskIDLE_PRIORITY )\r
+#define mainUART_COMMAND_CONSOLE_STACK_SIZE    ( configMINIMAL_STACK_SIZE * 3UL )\r
+#define mainCOM_TEST_TASK_PRIORITY                     ( tskIDLE_PRIORITY + 2 )\r
+#define mainCHECK_TASK_PRIORITY                                ( configMAX_PRIORITIES - 1 )\r
+#define mainQUEUE_OVERWRITE_PRIORITY           ( tskIDLE_PRIORITY )\r
+#define mainFLASH_PRIORITY                                     ( tskIDLE_PRIORITY )\r
+\r
+/* The priority used by the UART command console task. */\r
+#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )\r
+\r
+/* The LED used by the check timer. */\r
+#define mainCHECK_LED                                          ( 7 )\r
+\r
+\r
+/* A block time of zero simply means "don't block". */\r
+#define mainDONT_BLOCK                                         ( 0UL )\r
+\r
+/* The period after which the check timer will expire, in ms, provided no errors\r
+have been reported by any of the standard demo tasks.  ms are converted to the\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainNO_ERROR_CHECK_TASK_PERIOD         ( pdMS_TO_TICKS( 3000UL ) )\r
+\r
+/* The period at which the check timer will expire, in ms, if an error has been\r
+reported in one of the standard demo tasks.  ms are converted to the equivalent\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TASK_PERIOD            ( pdMS_TO_TICKS( 200UL ) )\r
+\r
+/* Parameters that are passed into the register check tasks solely for the\r
+purpose of ensuring parameters are passed into tasks correctly. */\r
+#define mainREG_TEST_TASK_1_PARAMETER          ( ( void * ) 0x12345678 )\r
+#define mainREG_TEST_TASK_2_PARAMETER          ( ( void * ) 0x87654321 )\r
+\r
+/* The base period used by the timer test tasks. */\r
+#define mainTIMER_TEST_PERIOD                          ( 50 )\r
+\r
+/* The number of timers to create that just flash LEDs. */\r
+#define mainNUM_FLASH_TIMERS                           ( 3 )\r
+/*-----------------------------------------------------------*/\r
+\r
+\r
+/*\r
+ * The check task, as described at the top of this file.\r
+ */\r
+static void prvCheckTask( void *pvParameters );\r
+\r
+/*\r
+ * Register check tasks, and the tasks used to write over and check the contents\r
+ * of the FPU registers, as described at the top of this file.  The nature of\r
+ * these files necessitates that they are written in an assembly file, but the\r
+ * entry points are kept in the C file for the convenience of checking the task\r
+ * parameter.\r
+ */\r
+static void prvRegTestTaskEntry1( void *pvParameters );\r
+extern void vRegTest1Implementation( void );\r
+static void prvRegTestTaskEntry2( void *pvParameters );\r
+extern void vRegTest2Implementation( void );\r
+\r
+/*\r
+ * Register commands that can be used with FreeRTOS+CLI.  The commands are\r
+ * defined in CLI-Commands.c and File-Related-CLI-Command.c respectively.\r
+ */\r
+extern void vRegisterSampleCLICommands( void );\r
+\r
+/*\r
+ * The task that manages the FreeRTOS+CLI input and output.\r
+ */\r
+extern void vUARTCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority );\r
+\r
+/*\r
+ * When the full demo is build the tick hook it used to demonstrate API\r
+ * functions being called from an interrupt and to perform some tests.\r
+ */\r
+void vFullDemoTickHook( void );\r
+\r
+/*\r
+ * When the full demo is build the idle hook is used to create some timers that\r
+ * cannot be created in main() because the timer demo tasks need the entire\r
+ * command queue.\r
+ */\r
+void vFullDemoIdleHook( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The following two variables are used to communicate the status of the\r
+register check tasks to the check task.  If the variables keep incrementing,\r
+then the register check tasks has not discovered any errors.  If a variable\r
+stops incrementing, then an error has been found. */\r
+volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void main_full( void )\r
+{\r
+       /* Start all the other standard demo/test tasks.  They have not particular\r
+       functionality, but do demonstrate how to use the FreeRTOS API and test the\r
+       kernel port. */\r
+//     vStartInterruptQueueTasks();\r
+\r
+       vStartDynamicPriorityTasks();\r
+       vCreateBlockTimeTasks();\r
+       vStartCountingSemaphoreTasks();\r
+       vStartGenericQueueTasks( tskIDLE_PRIORITY );\r
+       vStartRecursiveMutexTasks();\r
+       vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
+       vStartTimerDemoTask( mainTIMER_TEST_PERIOD );\r
+       vStartEventGroupTasks();\r
+       vStartTaskNotifyTask();\r
+       vStartInterruptSemaphoreTasks();\r
+\r
+       /* Note - the set of standard demo tasks contains two versions of\r
+       vStartMathTasks.c.  One is defined in flop.c, and uses double precision\r
+       floating point numbers and variables.  The other is defined in sp_flop.c,\r
+       and uses single precision floating point numbers and variables.  The\r
+       MicroBlaze floating point unit only handles single precision floating.\r
+       Therefore, to test the floating point hardware, sp_flop.c should be included\r
+       in this project. */\r
+       vStartMathTasks( mainFLOP_TASK_PRIORITY );\r
+\r
+       /* Start the tasks that implements the command console on the UART, as\r
+       described above. */\r
+       vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY );\r
+\r
+       /* Register the standard CLI commands. */\r
+       vRegisterSampleCLICommands();\r
+\r
+       /* Create the register check tasks, as described at the top of this     file */\r
+       xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL );\r
+       xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL );\r
+\r
+       /* Create the task that performs the 'check' functionality,     as described at\r
+       the top of this file. */\r
+       xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+\r
+       /* Start the scheduler. */\r
+       vTaskStartScheduler();\r
+\r
+       /* If all is well, the scheduler will now be running, and the following\r
+       line will never be reached.  If the following line does execute, then\r
+       there was either insufficient FreeRTOS heap memory available for the idle\r
+       and/or timer tasks to be created, or vTaskStartScheduler() was called from\r
+       User mode.  See the memory management section on the FreeRTOS web site for\r
+       more details on the FreeRTOS heap http://www.freertos.org/a00111.html.  The\r
+       mode from which main() is called is set in the C start up code and must be\r
+       a privileged mode (not user mode). */\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvCheckTask( void *pvParameters )\r
+{\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
+TickType_t xLastExecutionTime;\r
+static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
+unsigned long ulErrorFound = pdFALSE;\r
+\r
+       /* Just to stop compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
+       works correctly. */\r
+       xLastExecutionTime = xTaskGetTickCount();\r
+\r
+       /* Cycle for ever, delaying then checking all the other tasks are still\r
+       operating without error.  The onboard LED is toggled on each iteration.\r
+       If an error is detected then the delay period is decreased from\r
+       mainNO_ERROR_CHECK_TASK_PERIOD to mainERROR_CHECK_TASK_PERIOD.  This has the\r
+       effect of increasing the rate at which the onboard LED toggles, and in so\r
+       doing gives visual feedback of the system status. */\r
+       for( ;; )\r
+       {\r
+               /* Delay until it is time to execute again. */\r
+               vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );\r
+\r
+               /* Check all the demo tasks (other than the flash tasks) to ensure\r
+               that they are all still running, and that none have detected an error. */\r
+if( 0 )//              if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 0UL;\r
+               }\r
+\r
+               if( xAreMathsTaskStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 1UL;\r
+               }\r
+\r
+               if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 2UL;\r
+               }\r
+\r
+               if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 4UL;\r
+               }\r
+\r
+               if ( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 5UL;\r
+               }\r
+\r
+               if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 6UL;\r
+               }\r
+\r
+               if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 8UL;\r
+               }\r
+\r
+               if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 10UL;\r
+               }\r
+\r
+               if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 14UL;\r
+               }\r
+\r
+               if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
+               {\r
+                       ulErrorFound |= 1UL << 9UL;\r
+               }\r
+\r
+               if( xAreEventGroupTasksStillRunning() != pdPASS )\r
+               {\r
+                       ulErrorFound |= 1UL << 12UL;\r
+               }\r
+\r
+               if( xAreTaskNotificationTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound |= 1UL << 13UL;\r
+               }\r
+\r
+               /* Check that the register test 1 task is still running. */\r
+               if( ulLastRegTest1Value == ulRegTest1LoopCounter )\r
+               {\r
+                       ulErrorFound |= 1UL << 15UL;\r
+               }\r
+               ulLastRegTest1Value = ulRegTest1LoopCounter;\r
+\r
+               /* Check that the register test 2 task is still running. */\r
+               if( ulLastRegTest2Value == ulRegTest2LoopCounter )\r
+               {\r
+                       ulErrorFound |= 1UL << 16UL;\r
+               }\r
+               ulLastRegTest2Value = ulRegTest2LoopCounter;\r
+\r
+               /* Toggle the check LED to give an indication of the system status.  If\r
+               the LED toggles every mainNO_ERROR_CHECK_TASK_PERIOD milliseconds then\r
+               everything is ok.  A faster toggle indicates an error. */\r
+               vParTestToggleLED( mainCHECK_LED );\r
+\r
+               if( ulErrorFound != pdFALSE )\r
+               {\r
+                       /* An error has been detected in one of the tasks - flash the LED\r
+                       at a higher frequency to give visible feedback that something has\r
+                       gone wrong (it might just be that the loop back connector required\r
+                       by the comtest tasks has not been fitted). */\r
+                       xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTaskEntry1( void *pvParameters )\r
+{\r
+       /* Although the regtest task is written in assembler, its entry point is\r
+       written in C for convenience of checking the task parameter is being passed\r
+       in correctly. */\r
+       if( pvParameters == mainREG_TEST_TASK_1_PARAMETER )\r
+       {\r
+               /* Start the part of the test that is written in assembler. */\r
+               vRegTest1Implementation();\r
+       }\r
+\r
+       /* The following line will only execute if the task parameter is found to\r
+       be incorrect.  The check timer will detect that the regtest loop counter is\r
+       not being incremented and flag an error. */\r
+       vTaskDelete( NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTaskEntry2( void *pvParameters )\r
+{\r
+       /* Although the regtest task is written in assembler, its entry point is\r
+       written in C for convenience of checking the task parameter is being passed\r
+       in correctly. */\r
+       if( pvParameters == mainREG_TEST_TASK_2_PARAMETER )\r
+       {\r
+               /* Start the part of the test that is written in assembler. */\r
+               vRegTest2Implementation();\r
+       }\r
+\r
+       /* The following line will only execute if the task parameter is found to\r
+       be incorrect.  The check timer will detect that the regtest loop counter is\r
+       not being incremented and flag an error. */\r
+       vTaskDelete( NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vFullDemoTickHook( void )\r
+{\r
+       /* The full demo includes a software timer demo/test that requires\r
+       prodding periodically from the tick interrupt. */\r
+       vTimerPeriodicISRTests();\r
+\r
+       /* Call the periodic event group from ISR demo. */\r
+       vPeriodicEventGroupsProcessing();\r
+\r
+       /* Use task notifications from an interrupt. */\r
+       xNotifyTaskFromISR();\r
+\r
+       /* Use mutexes from interrupts. */\r
+       vInterruptSemaphorePeriodicTest();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vFullDemoIdleHook( void )\r
+{\r
+static uint32_t ulStartedTimers = pdFALSE;\r
+\r
+       if( ulStartedTimers == pdFALSE )\r
+       {\r
+               /* The flash timers are not created from main() as the timer demo needs\r
+               the entire timer command queue in order to perform some tests. */\r
+               vStartLEDFlashTimers( mainNUM_FLASH_TIMERS );\r
+               ulStartedTimers = pdTRUE;\r
+       }\r
+}\r
+\r
+\r
+\r
+\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/LEDs.c
new file mode 100644 (file)
index 0000000..0b11d04
--- /dev/null
@@ -0,0 +1,157 @@
+/*\r
+    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
+\r
+       ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+       ***************************************************************************\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+       the FAQ page "My application does not run, what could be wrong?".  Have you\r
+       defined configASSERT()?\r
+\r
+       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+       embedded software for free we request you assist our global community by\r
+       participating in the support forum.\r
+\r
+       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+       be as productive as possible as early as possible.  Now you can receive\r
+       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+       Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+/*-----------------------------------------------------------\r
+ * Simple IO routines to control the LEDs.\r
+ *-----------------------------------------------------------*/\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Demo includes. */\r
+#include "partest.h"\r
+\r
+/* Xilinx includes. */\r
+#include "xgpio.h"\r
+\r
+\r
+#define partstNUM_LEDS 8\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The GPIO instance to which the LEDs are connected. */\r
+static XGpio xOutputGPIOInstance;\r
+\r
+/* Maintains the current LED output state. */\r
+static volatile UBaseType_t uxGPIOState = 0U;\r
+\r
+/* Constant required by the Xilinx peripheral driver API functions that are\r
+relevant to the particular hardware set up. */\r
+static const unsigned long ulGPIOOutputChannel = 1UL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vParTestInitialise( void )\r
+{\r
+portBASE_TYPE xStatus;\r
+const unsigned char ucSetToOutput = 0U;\r
+\r
+       /* Initialize the GPIO for the LEDs. */\r
+       xStatus = XGpio_Initialize( &xOutputGPIOInstance, XPAR_AXI_GPIO_0_DEVICE_ID );\r
+       if( xStatus == XST_SUCCESS )\r
+       {\r
+               /* All bits on this channel are going to be outputs (LEDs). */\r
+               XGpio_SetDataDirection( &xOutputGPIOInstance, ulGPIOOutputChannel, ucSetToOutput );\r
+\r
+               /* Start with all LEDs off. */\r
+               uxGPIOState = 0U;\r
+               XGpio_DiscreteWrite( &xOutputGPIOInstance, ulGPIOOutputChannel, ( uint8_t ) uxGPIOState );\r
+       }\r
+\r
+       configASSERT( ( xStatus == XST_SUCCESS ) );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vParTestSetLED( UBaseType_t uxLED, BaseType_t xValue )\r
+{\r
+       if( uxLED < partstNUM_LEDS )\r
+       {\r
+               taskENTER_CRITICAL();\r
+               {\r
+                       if( xValue != pdFALSE )\r
+                       {\r
+                               uxGPIOState |= ( 1UL << uxLED );\r
+                       }\r
+                       else\r
+                       {\r
+                               uxGPIOState &= ~( 1UL << uxLED );\r
+                       }\r
+\r
+                       XGpio_DiscreteWrite( &xOutputGPIOInstance, ulGPIOOutputChannel, ( uint8_t ) uxGPIOState );\r
+               }\r
+               taskEXIT_CRITICAL();\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
+{\r
+       if( uxLED < partstNUM_LEDS )\r
+       {\r
+               taskENTER_CRITICAL();\r
+               {\r
+                       uxGPIOState ^= ( 1UL << uxLED );\r
+                       XGpio_DiscreteWrite( &xOutputGPIOInstance, ulGPIOOutputChannel, ( uint8_t ) uxGPIOState );\r
+               }\r
+               taskEXIT_CRITICAL();\r
+       }\r
+}\r
+\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lscript.ld b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/lscript.ld
new file mode 100644 (file)
index 0000000..edc96f2
--- /dev/null
@@ -0,0 +1,212 @@
+/*******************************************************************/\r
+/*                                                                 */\r
+/* This file is automatically generated by linker script generator.*/\r
+/*                                                                 */\r
+/* Version:                                 */\r
+/*                                                                 */\r
+/* Copyright (c) 2010 Xilinx, Inc.  All rights reserved.           */\r
+/*                                                                 */\r
+/* Description : MicroBlaze Linker Script                          */\r
+/*                                                                 */\r
+/*******************************************************************/\r
+\r
+_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;\r
+_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x4;\r
+\r
+/* Define Memories in the system */\r
+\r
+MEMORY\r
+{\r
+   microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr : ORIGIN = 0x00000050, LENGTH = 0x0003FFB0\r
+}\r
+\r
+/* Specify the default entry point to the program */\r
+\r
+ENTRY(_start)\r
+\r
+/* Define the sections, and where they are mapped in memory */\r
+\r
+SECTIONS\r
+{\r
+.vectors.reset 0x00000000 : {\r
+   KEEP (*(.vectors.reset))\r
+} \r
+\r
+.vectors.sw_exception 0x00000008 : {\r
+   KEEP (*(.vectors.sw_exception))\r
+} \r
+\r
+.vectors.interrupt 0x00000010 : {\r
+   KEEP (*(.vectors.interrupt))\r
+} \r
+\r
+.vectors.hw_exception 0x00000020 : {\r
+   KEEP (*(.vectors.hw_exception))\r
+} \r
+\r
+.text : {\r
+   *(.text)\r
+   *(.text.*)\r
+   *(.gnu.linkonce.t.*)\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.init : {\r
+   KEEP (*(.init))\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.fini : {\r
+   KEEP (*(.fini))\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.ctors : {\r
+   __CTOR_LIST__ = .;\r
+   ___CTORS_LIST___ = .;\r
+   KEEP (*crtbegin.o(.ctors))\r
+   KEEP (*(EXCLUDE_FILE(*crtend.o) .ctors))\r
+   KEEP (*(SORT(.ctors.*)))\r
+   KEEP (*(.ctors))\r
+   __CTOR_END__ = .;\r
+   ___CTORS_END___ = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.dtors : {\r
+   __DTOR_LIST__ = .;\r
+   ___DTORS_LIST___ = .;\r
+   KEEP (*crtbegin.o(.dtors))\r
+   KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors))\r
+   KEEP (*(SORT(.dtors.*)))\r
+   KEEP (*(.dtors))\r
+   PROVIDE(__DTOR_END__ = .);\r
+   PROVIDE(___DTORS_END___ = .);\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.rodata : {\r
+   __rodata_start = .;\r
+   *(.rodata)\r
+   *(.rodata.*)\r
+   *(.gnu.linkonce.r.*)\r
+   __rodata_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.sdata2 : {\r
+   . = ALIGN(8);\r
+   __sdata2_start = .;\r
+   *(.sdata2)\r
+   *(.sdata2.*)\r
+   *(.gnu.linkonce.s2.*)\r
+   . = ALIGN(8);\r
+   __sdata2_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.sbss2 : {\r
+   __sbss2_start = .;\r
+   *(.sbss2)\r
+   *(.sbss2.*)\r
+   *(.gnu.linkonce.sb2.*)\r
+   __sbss2_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.data : {\r
+   . = ALIGN(4);\r
+   __data_start = .;\r
+   *(.data)\r
+   *(.data.*)\r
+   *(.gnu.linkonce.d.*)\r
+   __data_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.got : {\r
+   *(.got)\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.got1 : {\r
+   *(.got1)\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.got2 : {\r
+   *(.got2)\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.eh_frame : {\r
+   *(.eh_frame)\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.jcr : {\r
+   *(.jcr)\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.gcc_except_table : {\r
+   *(.gcc_except_table)\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.sdata : {\r
+   . = ALIGN(8);\r
+   __sdata_start = .;\r
+   *(.sdata)\r
+   *(.sdata.*)\r
+   *(.gnu.linkonce.s.*)\r
+   __sdata_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.sbss (NOLOAD) : {\r
+   . = ALIGN(4);\r
+   __sbss_start = .;\r
+   *(.sbss)\r
+   *(.sbss.*)\r
+   *(.gnu.linkonce.sb.*)\r
+   . = ALIGN(8);\r
+   __sbss_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.tdata : {\r
+   __tdata_start = .;\r
+   *(.tdata)\r
+   *(.tdata.*)\r
+   *(.gnu.linkonce.td.*)\r
+   __tdata_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.tbss : {\r
+   __tbss_start = .;\r
+   *(.tbss)\r
+   *(.tbss.*)\r
+   *(.gnu.linkonce.tb.*)\r
+   __tbss_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.bss (NOLOAD) : {\r
+   . = ALIGN(4);\r
+   __bss_start = .;\r
+   *(.bss)\r
+   *(.bss.*)\r
+   *(.gnu.linkonce.b.*)\r
+   *(COMMON)\r
+   . = ALIGN(4);\r
+   __bss_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+_SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 );\r
+\r
+_SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 );\r
+\r
+/* Generate Stack and Heap definitions */\r
+\r
+.heap (NOLOAD) : {\r
+   . = ALIGN(8);\r
+   _heap = .;\r
+   _heap_start = .;\r
+   . += _HEAP_SIZE;\r
+   _heap_end = .;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+.stack (NOLOAD) : {\r
+   _stack_end = .;\r
+   . += _STACK_SIZE;\r
+   . = ALIGN(8);\r
+   _stack = .;\r
+   __stack = _stack;\r
+} > microblaze_0_local_memory_ilmb_bram_if_cntlr_microblaze_0_local_memory_dlmb_bram_if_cntlr\r
+\r
+_end = .;\r
+}\r
+\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/main.c
new file mode 100644 (file)
index 0000000..cdbdcd4
--- /dev/null
@@ -0,0 +1,355 @@
+/*\r
+    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
+\r
+       ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+       ***************************************************************************\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+       the FAQ page "My application does not run, what could be wrong?".  Have you\r
+       defined configASSERT()?\r
+\r
+       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+       embedded software for free we request you assist our global community by\r
+       participating in the support forum.\r
+\r
+       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+       be as productive as possible as early as possible.  Now you can receive\r
+       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+       Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/******************************************************************************\r
+ * This project provides two demo applications.  A simple blinky style project,\r
+ * and a more comprehensive test and demo application.  The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to\r
+ * select between the two.  The simply blinky demo is implemented and described\r
+ * in main_blinky.c.  The more comprehensive test and demo application is\r
+ * implemented and described in main_full.c.\r
+ *\r
+ * This file implements the code that is not demo specific, including the\r
+ * hardware setup and FreeRTOS hook functions.\r
+ *\r
+ * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON\r
+ * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO\r
+ * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!\r
+ *\r
+ */\r
+\r
+#warning Try reducing minimal stack size.\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+#include <limits.h>\r
+\r
+/* Scheduler include files. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Demo app includes. */\r
+#include "partest.h"\r
+\r
+/* Xilinx includes. */\r
+#include "xtmrctr.h"\r
+#include "xil_cache.h"\r
+\r
+/* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is used to select between the simply\r
+ * blinky demo and the comprehensive test and demo application.\r
+ *\r
+ * When mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1 the simple blinky example\r
+ * will be run.\r
+ *\r
+ * When mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0 the comprehensive test\r
+ * and demo application will be run.\r
+ */\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     0\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Configure the hardware as necessary to run this demo.\r
+ */\r
+static void prvSetupHardware( void );\r
+\r
+/*\r
+ * See the comments at the top of this file and above the\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY definition.\r
+ */\r
+#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )\r
+       extern void main_blinky( void );\r
+#else\r
+       extern void main_full( void );\r
+#endif\r
+\r
+/* Prototypes for the standard FreeRTOS callback/hook functions implemented\r
+within this file. */\r
+void vApplicationMallocFailedHook( void );\r
+void vApplicationIdleHook( void );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
+void vApplicationTickHook( void );\r
+\r
+/* The dual timer is used to generate the RTOS tick interrupt. */\r
+static XTmrCtr xDualTimerInstance;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+int main( void )\r
+{\r
+       /* Configure the hardware ready to run the demo. */\r
+       prvSetupHardware();\r
+\r
+       /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
+       of this file. */\r
+       #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )\r
+       {\r
+               main_blinky();\r
+       }\r
+       #else\r
+       {\r
+               main_full();\r
+       }\r
+       #endif\r
+\r
+       /* Don't expect to reach here. */\r
+       return 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvSetupHardware( void )\r
+{\r
+#warning Stacks are in BRAM.\r
+#warning Caches are disabled.\r
+//     init_platform();\r
+\r
+       microblaze_disable_interrupts();\r
+\r
+       #if defined( XPAR_MICROBLAZE_USE_ICACHE ) && ( XPAR_MICROBLAZE_USE_ICACHE != 0 )\r
+       {\r
+               Xil_ICacheEnable();\r
+       }\r
+       #endif\r
+\r
+       #if defined( XPAR_MICROBLAZE_USE_DCACHE ) && ( XPAR_MICROBLAZE_USE_DCACHE != 0 )\r
+       {\r
+               Xil_DCacheEnable();\r
+       }\r
+       #endif\r
+\r
+       /* Initialise the LEDs.  ParTest is a historic name which used to stand for\r
+       PARallel port TEST. */\r
+       vParTestInitialise();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationMallocFailedHook( void )\r
+{\r
+volatile uint32_t ulDummy = 0;\r
+\r
+       /* Called if a call to pvPortMalloc() fails because there is insufficient\r
+       free memory available in the FreeRTOS heap.  pvPortMalloc() is called\r
+       internally by FreeRTOS API functions that create tasks, queues, software\r
+       timers, and semaphores.  The size of the FreeRTOS heap is set by the\r
+       configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h.  Force an\r
+       assertion failure. */\r
+       configASSERT( ulDummy != 0 );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
+{\r
+       ( void ) pcTaskName;\r
+       ( void ) pxTask;\r
+\r
+       /* Run time stack overflow checking is performed if\r
+       configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2.  This hook\r
+       function is called if a stack overflow is detected.  Force an assertion\r
+       failuse. */\r
+       configASSERT( ( char * ) pxTask == pcTaskName );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationIdleHook( void )\r
+{\r
+       #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )\r
+       {\r
+               extern void vFullDemoIdleHook( void );\r
+\r
+               /* When the full demo is build the idle hook is used to create some\r
+               timers to flash LEDs. */\r
+               vFullDemoIdleHook();\r
+       }\r
+       #endif\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vAssertCalled( const char * pcFile, unsigned long ulLine )\r
+{\r
+volatile unsigned long ul = 0;\r
+\r
+       ( void ) pcFile;\r
+       ( void ) ulLine;\r
+\r
+       taskENTER_CRITICAL();\r
+       {\r
+               /* Set ul to a non-zero value using the debugger to step out of this\r
+               function. */\r
+               while( ul == 0 )\r
+               {\r
+                       portNOP();\r
+               }\r
+       }\r
+       taskEXIT_CRITICAL();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationTickHook( void )\r
+{\r
+       #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 0 )\r
+       {\r
+               extern void vFullDemoTickHook( void );\r
+\r
+               /* When the full demo is build the tick hook is used to demonstrate\r
+               functions being called from an interrupt and perform some tests. */\r
+               vFullDemoTickHook();\r
+       }\r
+       #endif\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/* This is an application defined callback function used to install the tick\r
+interrupt handler.  It is provided as an application callback because the kernel\r
+will run on lots of different MicroBlaze and FPGA configurations - not all of\r
+which will have the same timer peripherals defined or available.  This example\r
+uses the Dual Timer 0.  If that is available on your hardware platform then this\r
+example callback implementation may not require modification.   The name of the\r
+interrupt handler that must be installed is vPortTickISR(), which the function\r
+below declares as an extern. */\r
+void vApplicationSetupTimerInterrupt( void )\r
+{\r
+portBASE_TYPE xStatus;\r
+const unsigned char ucTimerCounterNumber = ( unsigned char ) 0U;\r
+const unsigned long ulCounterValue = ( ( XPAR_TMRCTR_0_CLOCK_FREQ_HZ / configTICK_RATE_HZ ) - 1UL );\r
+extern void vPortTickISR( void *pvUnused );\r
+\r
+       /* Initialise the timer/counter. */\r
+       xStatus = XTmrCtr_Initialize( &xDualTimerInstance, XPAR_TMRCTR_0_DEVICE_ID );\r
+\r
+       if( xStatus == XST_SUCCESS )\r
+       {\r
+               /* Install the tick interrupt handler as the timer ISR.\r
+               *NOTE* The xPortInstallInterruptHandler() API function must be used for\r
+               this purpose. */\r
+               xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vPortTickISR, NULL );\r
+       }\r
+\r
+       if( xStatus == pdPASS )\r
+       {\r
+               /* Enable the timer interrupt in the interrupt controller.\r
+               *NOTE* The vPortEnableInterrupt() API function must be used for this\r
+               purpose. */\r
+               vPortEnableInterrupt( XPAR_INTC_0_TMRCTR_0_VEC_ID );\r
+\r
+               /* Configure the timer interrupt handler. */\r
+               XTmrCtr_SetHandler( &xDualTimerInstance, ( void * ) vPortTickISR, NULL );\r
+\r
+               /* Set the correct period for the timer. */\r
+               XTmrCtr_SetResetValue( &xDualTimerInstance, ucTimerCounterNumber, ulCounterValue );\r
+\r
+               /* Enable the interrupts.  Auto-reload mode is used to generate a\r
+               periodic tick.  Note that interrupts are disabled when this function is\r
+               called, so interrupts will not start to be processed until the first\r
+               task has started to run. */\r
+               XTmrCtr_SetOptions( &xDualTimerInstance, ucTimerCounterNumber, ( XTC_INT_MODE_OPTION | XTC_AUTO_RELOAD_OPTION | XTC_DOWN_COUNT_OPTION ) );\r
+\r
+               /* Start the timer. */\r
+               XTmrCtr_Start( &xDualTimerInstance, ucTimerCounterNumber );\r
+       }\r
+\r
+       /* Sanity check that the function executed as expected. */\r
+       configASSERT( ( xStatus == pdPASS ) );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/* This is an application defined callback function used to clear whichever\r
+interrupt was installed by the the vApplicationSetupTimerInterrupt() callback\r
+function.  It is provided as an application callback because the kernel will run\r
+on lots of different MicroBlaze and FPGA configurations - not all of which will\r
+have the same timer peripherals defined or available.  This example uses the\r
+dual timer 0.  If that is available on your hardware platform then this example\r
+callback implementation will not require modification provided the example\r
+definition of vApplicationSetupTimerInterrupt() is also not modified. */\r
+void vApplicationClearTimerInterrupt( void )\r
+{\r
+unsigned long ulCSR;\r
+\r
+       /* Clear the timer interrupt */\r
+       ulCSR = XTmrCtr_GetControlStatusReg( XPAR_TMRCTR_0_BASEADDR, 0 );\r
+       XTmrCtr_SetControlStatusReg( XPAR_TMRCTR_0_BASEADDR, 0, ulCSR );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void *malloc( size_t x )\r
+{\r
+       /* Just to check it never gets called as there is no heap defined (other\r
+       than the FreeRTOS heap). */\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vMainConfigTimerForRunTimeStats( void )\r
+{\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+uint32_t ulMainGetRunTimeCounterValue( void )\r
+{\r
+       return 0;\r
+}\r
diff --git a/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c b/FreeRTOS/Demo/MicroBlaze_Kintex7_EthernetLite/RTOSDemo/src/serial.c
new file mode 100644 (file)
index 0000000..c2694c6
--- /dev/null
@@ -0,0 +1,245 @@
+/*\r
+    FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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
+\r
+       ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+       ***************************************************************************\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+       the FAQ page "My application does not run, what could be wrong?".  Have you\r
+       defined configASSERT()?\r
+\r
+       http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+       embedded software for free we request you assist our global community by\r
+       participating in the support forum.\r
+\r
+       http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+       be as productive as possible as early as possible.  Now you can receive\r
+       FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+       Ltd, and the world's leading authority on the world's leading RTOS.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/*\r
+       BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR a UARTLite peripheral.\r
+\r
+       NOTE:  This is not intended to represent an efficient driver.  It is\r
+       designed to test the FreeRTOS port.  Normally a UART driver would use a DMA,\r
+       or at least a circular RAM buffer rather than a queue.  A task notification\r
+       can then be used to unblock any task that is waiting for a complete message\r
+       once a complete message has been buffered.\r
+*/\r
+\r
+/* Scheduler includes. */\r
+#include "FreeRTOS.h"\r
+#include "queue.h"\r
+#include "comtest_strings.h"\r
+\r
+/* Library includes. */\r
+#include "xuartlite.h"\r
+#include "xuartlite_l.h"\r
+\r
+/* Demo application includes. */\r
+#include "serial.h"\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Functions that are installed as the handler for interrupts that are caused by\r
+Rx and Tx events respectively. */\r
+static void prvRxHandler( void *pvUnused, unsigned portBASE_TYPE uxByteCount );\r
+static void prvTxHandler( void *pvUnused, unsigned portBASE_TYPE uxByteCount );\r
+\r
+/* Structure that hold the state of the UARTLite peripheral used by this demo.\r
+This is used by the Xilinx peripheral driver API functions. */\r
+static XUartLite xUartLiteInstance;\r
+\r
+/* The queue used to hold received characters. */\r
+static QueueHandle_t xRxedChars;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+{\r
+BaseType_t xStatus;\r
+\r
+       /* The standard demo header file requires a baud rate to be passed into this\r
+       function.  However, in this case the baud rate is configured when the\r
+       hardware is generated, leaving the ulWantedBaud parameter redundant. */\r
+       ( void ) ulWantedBaud;\r
+\r
+       /* Create the queue used to hold Rx characters. */\r
+       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+\r
+       /* If the queue was created correctly, then setup the serial port\r
+       hardware. */\r
+       if( xRxedChars != NULL )\r
+       {\r
+               xStatus = XUartLite_Initialize( &xUartLiteInstance, XPAR_UARTLITE_0_DEVICE_ID );\r
+\r
+               if( xStatus == XST_SUCCESS )\r
+               {\r
+                       /* Complete initialisation of the UART and its associated\r
+                       interrupts. */\r
+                       XUartLite_ResetFifos( &xUartLiteInstance );\r
+\r
+                       /* Install the handlers that the standard Xilinx library interrupt\r
+                       service routine will call when Rx and Tx events occur\r
+                       respectively. */\r
+                       XUartLite_SetRecvHandler( &xUartLiteInstance, ( XUartLite_Handler ) prvRxHandler, NULL );\r
+                       XUartLite_SetSendHandler( &xUartLiteInstance, ( XUartLite_Handler ) prvTxHandler, NULL );\r
+\r
+                       /* Install the standard Xilinx library interrupt handler itself.\r
+                       *NOTE* The xPortInstallInterruptHandler() API function must be used\r
+                       for     this purpose. */\r
+                       xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_UARTLITE_0_VEC_ID, ( XInterruptHandler ) XUartLite_InterruptHandler, &xUartLiteInstance );\r
+\r
+                       /* Enable the interrupt in the peripheral. */\r
+                       XUartLite_EnableIntr( xUartLiteInstance.RegBaseAddress );\r
+\r
+                       /* Enable the interrupt in the interrupt controller.\r
+                       *NOTE* The vPortEnableInterrupt() API function must be used for this\r
+                       purpose. */\r
+                       vPortEnableInterrupt( XPAR_INTC_0_UARTLITE_0_VEC_ID );\r
+               }\r
+\r
+               configASSERT( xStatus == pdPASS );\r
+       }\r
+\r
+       /* This demo file only supports a single port but something must be\r
+       returned to comply with the standard demo header file. */\r
+       return ( xComPortHandle ) 0;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
+{\r
+portBASE_TYPE xReturn;\r
+\r
+       /* The port handle is not required as this driver only supports one port. */\r
+       ( void ) pxPort;\r
+\r
+       /* Get the next character from the receive queue.  Return false if no\r
+       characters are available, or arrive before xBlockTime expires. */\r
+       if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )\r
+       {\r
+               xReturn = pdTRUE;\r
+       }\r
+       else\r
+       {\r
+               xReturn = pdFALSE;\r
+       }\r
+\r
+       return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
+{\r
+       ( void ) pxPort;\r
+       ( void ) xBlockTime;\r
+\r
+       XUartLite_Send( &xUartLiteInstance, ( unsigned char * ) &cOutChar, sizeof( cOutChar ) );\r
+       return pdPASS;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
+{\r
+       ( void ) pxPort;\r
+\r
+       /* Output uxStringLength bytes starting from pcString. */\r
+       XUartLite_Send( &xUartLiteInstance, ( unsigned char * ) pcString, usStringLength );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRxHandler( void *pvUnused, unsigned portBASE_TYPE uxByteCount )\r
+{\r
+signed char cRxedChar;\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+\r
+       ( void ) pvUnused;\r
+       ( void ) uxByteCount;\r
+\r
+       /* Place any received characters into the receive queue. */\r
+       while( XUartLite_IsReceiveEmpty( xUartLiteInstance.RegBaseAddress ) == pdFALSE )\r
+       {\r
+               cRxedChar = XUartLite_ReadReg( xUartLiteInstance.RegBaseAddress, XUL_RX_FIFO_OFFSET);\r
+               xQueueSendFromISR( xRxedChars, &cRxedChar, &xHigherPriorityTaskWoken );\r
+       }\r
+\r
+       /* If calling xQueueSendFromISR() caused a task to unblock, and the task\r
+       that unblocked has a priority equal to or greater than the task currently\r
+       in the Running state (the task that was interrupted), then\r
+       xHigherPriorityTaskWoken will have been set to pdTRUE internally within the\r
+       xQueueSendFromISR() API function.  If xHigherPriorityTaskWoken is equal to\r
+       pdTRUE then a context switch should be requested to ensure that the\r
+       interrupt returns to the highest priority task that is able     to run. */\r
+       portYIELD_FROM_ISR( xHigherPriorityTaskWoken );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvTxHandler( void *pvUnused, unsigned portBASE_TYPE uxByteCount )\r
+{\r
+       ( void ) pvUnused;\r
+       ( void ) uxByteCount;\r
+\r
+       /* Nothing to do here.  The Xilinx library function takes care of the\r
+       transmission. */\r
+       portNOP();\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r