Added the MingW/Eclipse project for the new Win32 port.
parent
ba18beae47
commit
b09733cdfc
@ -0,0 +1,309 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?>
|
||||||
|
|
||||||
|
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.184448914">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.184448914" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.184448914" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
|
||||||
|
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.184448914." name="/" resourcePath="">
|
||||||
|
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1251700323" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
|
||||||
|
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1689770801" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
|
||||||
|
<builder buildPath="${workspace_loc:/RTOSDemo/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1580550423" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
|
||||||
|
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.740677468" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
|
||||||
|
<option id="gnu.both.asm.option.include.paths.1735905904" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath"/>
|
||||||
|
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.947159880" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1486414422" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
|
||||||
|
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1702673982" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
|
||||||
|
<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1113935807" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||||
|
<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1377100001" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.717220069" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
|
||||||
|
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1441629807" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
|
||||||
|
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.368869681" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||||
|
<option id="gnu.c.compiler.option.include.paths.1213993982" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/FreeRTOS/include}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/DemoTasks/include}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/FreeRTOS/portable/MSVC-MingW}""/>
|
||||||
|
</option>
|
||||||
|
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.725671600" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1731687826" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
|
||||||
|
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.305720568" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
</inputType>
|
||||||
|
</tool>
|
||||||
|
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1825251027" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.2058019519;cdt.managedbuild.config.gnu.mingw.exe.release.2058019519.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1403225577;cdt.managedbuild.tool.gnu.c.compiler.input.42137551">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.184448914;cdt.managedbuild.config.gnu.mingw.exe.debug.184448914.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.717220069;cdt.managedbuild.tool.gnu.c.compiler.input.725671600">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="RTOSDemo.cdt.managedbuild.target.gnu.mingw.exe.1011353064" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
|
||||||
|
</storageModule>
|
||||||
|
</cproject>
|
@ -0,0 +1,70 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>RTOSDemo</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
<dictionary>
|
||||||
|
<key>?name?</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||||
|
<value>make</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||||
|
<value>${workspace_loc:/RTOSDemo/Debug}</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.contents</key>
|
||||||
|
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||||
|
<value>false</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,12 @@
|
|||||||
|
#Sun Nov 21 18:36:02 GMT 2010
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/CPATH/delimiter=;
|
||||||
|
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/CPATH/operation=remove
|
||||||
|
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/C_INCLUDE_PATH/delimiter=;
|
||||||
|
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/C_INCLUDE_PATH/operation=remove
|
||||||
|
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/append=true
|
||||||
|
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/appendContributed=true
|
||||||
|
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/LIBRARY_PATH/delimiter=;
|
||||||
|
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/LIBRARY_PATH/operation=remove
|
||||||
|
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/append=true
|
||||||
|
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.184448914/appendContributed=true
|
@ -0,0 +1,54 @@
|
|||||||
|
REM This file should be executed from the command line prior to the first
|
||||||
|
REM build. It will be necessary to refresh the Eclipse project once the
|
||||||
|
REM .bat file has been executed (normally just press F5 to refresh).
|
||||||
|
|
||||||
|
REM Copies all the required files from their location within the standard
|
||||||
|
REM FreeRTOS directory structure to under the Eclipse project directory.
|
||||||
|
REM This permits the Eclipse project to be used in 'managed' mode and without
|
||||||
|
REM having to setup any linked resources.
|
||||||
|
|
||||||
|
REM Have the files already been copied?
|
||||||
|
IF EXIST FreeRTOS Goto END
|
||||||
|
|
||||||
|
REM Create the required directory structure.
|
||||||
|
MD FreeRTOS
|
||||||
|
MD FreeRTOS\include
|
||||||
|
MD FreeRTOS\portable
|
||||||
|
MD FreeRTOS\portable\MSVC-MingW
|
||||||
|
MD FreeRTOS\portable\MemMang
|
||||||
|
MD DemoTasks
|
||||||
|
MD DemoTasks\include
|
||||||
|
|
||||||
|
REM Copy the core kernel files.
|
||||||
|
copy ..\..\Source\tasks.c FreeRTOS
|
||||||
|
copy ..\..\Source\queue.c FreeRTOS
|
||||||
|
copy ..\..\Source\list.c FreeRTOS
|
||||||
|
|
||||||
|
REM Copy the common header files
|
||||||
|
|
||||||
|
copy ..\..\Source\include\*.* FreeRTOS\include
|
||||||
|
|
||||||
|
REM Copy the portable layer files
|
||||||
|
copy ..\..\Source\portable\MSVC-MingW\*.* FreeRTOS\portable\MSVC-MingW
|
||||||
|
|
||||||
|
REM Copy the basic memory allocation files
|
||||||
|
copy ..\..\Source\portable\MemMang\heap_3.c FreeRTOS\portable\MemMang
|
||||||
|
|
||||||
|
REM Copy the common demo files that are used by this demo
|
||||||
|
copy ..\Common\include\BlockQ.h DemoTasks\include
|
||||||
|
copy ..\Common\include\integer.h DemoTasks\include
|
||||||
|
copy ..\Common\include\semtest.h DemoTasks\include
|
||||||
|
copy ..\Common\include\PollQ.h DemoTasks\include
|
||||||
|
copy ..\Common\include\GenQTest.h DemoTasks\include
|
||||||
|
copy ..\Common\include\QPeek.h DemoTasks\include
|
||||||
|
copy ..\Common\include\flop.h DemoTasks\include
|
||||||
|
copy ..\Common\include\recmutex.h DemoTasks\include
|
||||||
|
copy ..\Common\Minimal\BlockQ.c DemoTasks
|
||||||
|
copy ..\Common\Minimal\integer.c DemoTasks
|
||||||
|
copy ..\Common\Minimal\semtest.c DemoTasks
|
||||||
|
copy ..\Common\Minimal\PollQ.c DemoTasks
|
||||||
|
copy ..\Common\Minimal\GenQTest.c DemoTasks
|
||||||
|
copy ..\Common\Minimal\QPeek.c DemoTasks
|
||||||
|
copy ..\Common\Minimal\flop.c DemoTasks
|
||||||
|
|
||||||
|
: END
|
@ -0,0 +1,398 @@
|
|||||||
|
/*
|
||||||
|
FreeRTOS V6.1.0 - Copyright (C) 2010 Real Time Engineers Ltd.
|
||||||
|
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* If you are: *
|
||||||
|
* *
|
||||||
|
* + New to FreeRTOS, *
|
||||||
|
* + Wanting to learn FreeRTOS or multitasking in general quickly *
|
||||||
|
* + Looking for basic training, *
|
||||||
|
* + Wanting to improve your FreeRTOS skills and productivity *
|
||||||
|
* *
|
||||||
|
* then take a look at the FreeRTOS books - available as PDF or paperback *
|
||||||
|
* *
|
||||||
|
* "Using the FreeRTOS Real Time Kernel - a Practical Guide" *
|
||||||
|
* http://www.FreeRTOS.org/Documentation *
|
||||||
|
* *
|
||||||
|
* A pdf reference manual is also available. Both are usually delivered *
|
||||||
|
* to your inbox within 20 minutes to two hours when purchased between 8am *
|
||||||
|
* and 8pm GMT (although please allow up to 24 hours in case of *
|
||||||
|
* exceptional circumstances). Thank you for your support! *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
This file is part of the FreeRTOS distribution.
|
||||||
|
|
||||||
|
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License (version 2) as published by the
|
||||||
|
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||||
|
***NOTE*** The exception to the GPL is included to allow you to distribute
|
||||||
|
a combined work that includes FreeRTOS without being obliged to provide the
|
||||||
|
source code for proprietary components outside of the FreeRTOS kernel.
|
||||||
|
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
more details. You should have received a copy of the GNU General Public
|
||||||
|
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||||
|
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||||
|
by writing to Richard Barry, contact details for whom are available on the
|
||||||
|
FreeRTOS WEB site.
|
||||||
|
|
||||||
|
1 tab == 4 spaces!
|
||||||
|
|
||||||
|
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||||
|
contact details.
|
||||||
|
|
||||||
|
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||||
|
critical systems.
|
||||||
|
|
||||||
|
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||||
|
licensing and training services.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
The tasks defined on this page demonstrate the use of recursive mutexes.
|
||||||
|
|
||||||
|
For recursive mutex functionality the created mutex should be created using
|
||||||
|
xSemaphoreCreateRecursiveMutex(), then be manipulated
|
||||||
|
using the xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() API
|
||||||
|
functions.
|
||||||
|
|
||||||
|
This demo creates three tasks all of which access the same recursive mutex:
|
||||||
|
|
||||||
|
prvRecursiveMutexControllingTask() has the highest priority so executes
|
||||||
|
first and grabs the mutex. It then performs some recursive accesses -
|
||||||
|
between each of which it sleeps for a short period to let the lower
|
||||||
|
priority tasks execute. When it has completed its demo functionality
|
||||||
|
it gives the mutex back before suspending itself.
|
||||||
|
|
||||||
|
prvRecursiveMutexBlockingTask() attempts to access the mutex by performing
|
||||||
|
a blocking 'take'. The blocking task has a lower priority than the
|
||||||
|
controlling task so by the time it executes the mutex has already been
|
||||||
|
taken by the controlling task, causing the blocking task to block. It
|
||||||
|
does not unblock until the controlling task has given the mutex back,
|
||||||
|
and it does not actually run until the controlling task has suspended
|
||||||
|
itself (due to the relative priorities). When it eventually does obtain
|
||||||
|
the mutex all it does is give the mutex back prior to also suspending
|
||||||
|
itself. At this point both the controlling task and the blocking task are
|
||||||
|
suspended.
|
||||||
|
|
||||||
|
prvRecursiveMutexPollingTask() runs at the idle priority. It spins round
|
||||||
|
a tight loop attempting to obtain the mutex with a non-blocking call. As
|
||||||
|
the lowest priority task it will not successfully obtain the mutex until
|
||||||
|
both the controlling and blocking tasks are suspended. Once it eventually
|
||||||
|
does obtain the mutex it first unsuspends both the controlling task and
|
||||||
|
blocking task prior to giving the mutex back - resulting in the polling
|
||||||
|
task temporarily inheriting the controlling tasks priority.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Scheduler include files. */
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
#include "semphr.h"
|
||||||
|
|
||||||
|
/* Demo app include files. */
|
||||||
|
#include "recmutex.h"
|
||||||
|
|
||||||
|
/* Priorities assigned to the three tasks. */
|
||||||
|
#define recmuCONTROLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||||
|
#define recmuBLOCKING_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
#define recmuPOLLING_TASK_PRIORITY ( tskIDLE_PRIORITY + 0 )
|
||||||
|
|
||||||
|
/* In this version the tick period is very long, so the short delay cannot be
|
||||||
|
for too many ticks, or the check task will execute and find that the recmutex
|
||||||
|
tasks have not completed their functionality and then signal an error. The
|
||||||
|
delay does however have to be long enough to allow the lower priority tasks
|
||||||
|
a chance of executing - this is basically achieved by reducing the number
|
||||||
|
of times the loop that takes/gives the recursive mutex executes. */
|
||||||
|
#define recmuMAX_COUNT ( 2 )
|
||||||
|
#define recmuSHORT_DELAY ( 20 )
|
||||||
|
#define recmuNO_DELAY ( ( portTickType ) 0 )
|
||||||
|
#define recmuFIVE_TICK_DELAY ( ( portTickType ) 5 )
|
||||||
|
|
||||||
|
/* The three tasks as described at the top of this file. */
|
||||||
|
static void prvRecursiveMutexControllingTask( void *pvParameters );
|
||||||
|
static void prvRecursiveMutexBlockingTask( void *pvParameters );
|
||||||
|
static void prvRecursiveMutexPollingTask( void *pvParameters );
|
||||||
|
|
||||||
|
/* The mutex used by the demo. */
|
||||||
|
static xSemaphoreHandle xMutex;
|
||||||
|
|
||||||
|
/* Variables used to detect and latch errors. */
|
||||||
|
static volatile portBASE_TYPE xErrorOccurred = pdFALSE, xControllingIsSuspended = pdFALSE, xBlockingIsSuspended = pdFALSE;
|
||||||
|
static volatile unsigned portBASE_TYPE uxControllingCycles = 0, uxBlockingCycles = 0, uxPollingCycles = 0;
|
||||||
|
|
||||||
|
/* Handles of the two higher priority tasks, required so they can be resumed
|
||||||
|
(unsuspended). */
|
||||||
|
static xTaskHandle xControllingTaskHandle, xBlockingTaskHandle;
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void vStartRecursiveMutexTasks( void )
|
||||||
|
{
|
||||||
|
/* Just creates the mutex and the three tasks. */
|
||||||
|
|
||||||
|
xMutex = xSemaphoreCreateRecursiveMutex();
|
||||||
|
|
||||||
|
/* vQueueAddToRegistry() adds the mutex to the registry, if one is
|
||||||
|
in use. The registry is provided as a means for kernel aware
|
||||||
|
debuggers to locate mutex and has no purpose if a kernel aware debugger
|
||||||
|
is not being used. The call to vQueueAddToRegistry() will be removed
|
||||||
|
by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is
|
||||||
|
defined to be less than 1. */
|
||||||
|
vQueueAddToRegistry( ( xQueueHandle ) xMutex, ( signed portCHAR * ) "Recursive_Mutex" );
|
||||||
|
|
||||||
|
|
||||||
|
if( xMutex != NULL )
|
||||||
|
{
|
||||||
|
xTaskCreate( prvRecursiveMutexControllingTask, ( signed portCHAR * ) "Rec1Ctrl", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle );
|
||||||
|
xTaskCreate( prvRecursiveMutexBlockingTask, ( signed portCHAR * ) "Rec2Blck", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle );
|
||||||
|
xTaskCreate( prvRecursiveMutexPollingTask, ( signed portCHAR * ) "Rec3Poll", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, NULL );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvRecursiveMutexControllingTask( void *pvParameters )
|
||||||
|
{
|
||||||
|
unsigned portBASE_TYPE ux;
|
||||||
|
|
||||||
|
/* Just to remove compiler warning. */
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Should not be able to 'give' the mutex, as we have not yet 'taken'
|
||||||
|
it. The first time through, the mutex will not have been used yet,
|
||||||
|
subsequent times through, at this point the mutex will be held by the
|
||||||
|
polling task. */
|
||||||
|
if( xSemaphoreGiveRecursive( xMutex ) == pdPASS )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
for( ux = 0; ux < recmuMAX_COUNT; ux++ )
|
||||||
|
{
|
||||||
|
/* We should now be able to take the mutex as many times as
|
||||||
|
we like.
|
||||||
|
|
||||||
|
The first time through the mutex will be immediately available, on
|
||||||
|
subsequent times through the mutex will be held by the polling task
|
||||||
|
at this point and this Take will cause the polling task to inherit
|
||||||
|
the priority of this task. In this case the block time must be
|
||||||
|
long enough to ensure the polling task will execute again before the
|
||||||
|
block time expires. If the block time does expire then the error
|
||||||
|
flag will be set here. */
|
||||||
|
if( xSemaphoreTakeRecursive( xMutex, recmuFIVE_TICK_DELAY ) != pdPASS )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure the other task attempting to access the mutex (and the
|
||||||
|
other demo tasks) are able to execute to ensure they either block
|
||||||
|
(where a block time is specified) or return an error (where no
|
||||||
|
block time is specified) as the mutex is held by this task. */
|
||||||
|
vTaskDelay( recmuSHORT_DELAY );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For each time we took the mutex, give it back. */
|
||||||
|
for( ux = 0; ux < recmuMAX_COUNT; ux++ )
|
||||||
|
{
|
||||||
|
/* Ensure the other task attempting to access the mutex (and the
|
||||||
|
other demo tasks) are able to execute. */
|
||||||
|
vTaskDelay( recmuSHORT_DELAY );
|
||||||
|
|
||||||
|
/* We should now be able to give the mutex as many times as we
|
||||||
|
took it. When the mutex is available again the Blocking task
|
||||||
|
should be unblocked but not run because it has a lower priority
|
||||||
|
than this task. The polling task should also not run at this point
|
||||||
|
as it too has a lower priority than this task. */
|
||||||
|
if( xSemaphoreGiveRecursive( xMutex ) != pdPASS )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Having given it back the same number of times as it was taken, we
|
||||||
|
should no longer be the mutex owner, so the next give should fail. */
|
||||||
|
if( xSemaphoreGiveRecursive( xMutex ) == pdPASS )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keep count of the number of cycles this task has performed so a
|
||||||
|
stall can be detected. */
|
||||||
|
uxControllingCycles++;
|
||||||
|
|
||||||
|
/* Suspend ourselves so the blocking task can execute. */
|
||||||
|
xControllingIsSuspended = pdTRUE;
|
||||||
|
vTaskSuspend( NULL );
|
||||||
|
xControllingIsSuspended = pdFALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvRecursiveMutexBlockingTask( void *pvParameters )
|
||||||
|
{
|
||||||
|
/* Just to remove compiler warning. */
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* This task will run while the controlling task is blocked, and the
|
||||||
|
controlling task will block only once it has the mutex - therefore
|
||||||
|
this call should block until the controlling task has given up the
|
||||||
|
mutex, and not actually execute past this call until the controlling
|
||||||
|
task is suspended. */
|
||||||
|
if( xSemaphoreTakeRecursive( xMutex, portMAX_DELAY ) == pdPASS )
|
||||||
|
{
|
||||||
|
if( xControllingIsSuspended != pdTRUE )
|
||||||
|
{
|
||||||
|
/* Did not expect to execute until the controlling task was
|
||||||
|
suspended. */
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Give the mutex back before suspending ourselves to allow
|
||||||
|
the polling task to obtain the mutex. */
|
||||||
|
if( xSemaphoreGiveRecursive( xMutex ) != pdPASS )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
xBlockingIsSuspended = pdTRUE;
|
||||||
|
vTaskSuspend( NULL );
|
||||||
|
xBlockingIsSuspended = pdFALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We should not leave the xSemaphoreTakeRecursive() function
|
||||||
|
until the mutex was obtained. */
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The controlling and blocking tasks should be in lock step. */
|
||||||
|
if( uxControllingCycles != ( uxBlockingCycles + 1 ) )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keep count of the number of cycles this task has performed so a
|
||||||
|
stall can be detected. */
|
||||||
|
uxBlockingCycles++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvRecursiveMutexPollingTask( void *pvParameters )
|
||||||
|
{
|
||||||
|
/* Just to remove compiler warning. */
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Keep attempting to obtain the mutex. We should only obtain it when
|
||||||
|
the blocking task has suspended itself, which in turn should only
|
||||||
|
happen when the controlling task is also suspended. */
|
||||||
|
if( xSemaphoreTakeRecursive( xMutex, recmuNO_DELAY ) == pdPASS )
|
||||||
|
{
|
||||||
|
/* Is the blocking task suspended? */
|
||||||
|
if( ( xBlockingIsSuspended != pdTRUE ) || ( xControllingIsSuspended != pdTRUE ) )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Keep count of the number of cycles this task has performed
|
||||||
|
so a stall can be detected. */
|
||||||
|
uxPollingCycles++;
|
||||||
|
|
||||||
|
/* We can resume the other tasks here even though they have a
|
||||||
|
higher priority than the polling task. When they execute they
|
||||||
|
will attempt to obtain the mutex but fail because the polling
|
||||||
|
task is still the mutex holder. The polling task (this task)
|
||||||
|
will then inherit the higher priority. The Blocking task will
|
||||||
|
block indefinitely when it attempts to obtain the mutex, the
|
||||||
|
Controlling task will only block for a fixed period and an
|
||||||
|
error will be latched if the polling task has not returned the
|
||||||
|
mutex by the time this fixed period has expired. */
|
||||||
|
vTaskResume( xBlockingTaskHandle );
|
||||||
|
vTaskResume( xControllingTaskHandle );
|
||||||
|
|
||||||
|
/* The other two tasks should now have executed and no longer
|
||||||
|
be suspended. */
|
||||||
|
if( ( xBlockingIsSuspended == pdTRUE ) || ( xControllingIsSuspended == pdTRUE ) )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Release the mutex, disinheriting the higher priority again. */
|
||||||
|
if( xSemaphoreGiveRecursive( xMutex ) != pdPASS )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if configUSE_PREEMPTION == 0
|
||||||
|
{
|
||||||
|
taskYIELD();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* This is called to check that all the created tasks are still running. */
|
||||||
|
portBASE_TYPE xAreRecursiveMutexTasksStillRunning( void )
|
||||||
|
{
|
||||||
|
portBASE_TYPE xReturn;
|
||||||
|
static unsigned portBASE_TYPE uxLastControllingCycles = 0, uxLastBlockingCycles = 0, uxLastPollingCycles = 0;
|
||||||
|
|
||||||
|
/* Is the controlling task still cycling? */
|
||||||
|
if( uxLastControllingCycles == uxControllingCycles )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uxLastControllingCycles = uxControllingCycles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Is the blocking task still cycling? */
|
||||||
|
if( uxLastBlockingCycles == uxBlockingCycles )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uxLastBlockingCycles = uxBlockingCycles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Is the polling task still cycling? */
|
||||||
|
if( uxLastPollingCycles == uxPollingCycles )
|
||||||
|
{
|
||||||
|
xErrorOccurred = pdTRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uxLastPollingCycles = uxPollingCycles;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( xErrorOccurred == pdTRUE )
|
||||||
|
{
|
||||||
|
xReturn = pdFAIL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xReturn = pdTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return xReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
FreeRTOS V6.1.0 - Copyright (C) 2010 Real Time Engineers Ltd.
|
||||||
|
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* If you are: *
|
||||||
|
* *
|
||||||
|
* + New to FreeRTOS, *
|
||||||
|
* + Wanting to learn FreeRTOS or multitasking in general quickly *
|
||||||
|
* + Looking for basic training, *
|
||||||
|
* + Wanting to improve your FreeRTOS skills and productivity *
|
||||||
|
* *
|
||||||
|
* then take a look at the FreeRTOS books - available as PDF or paperback *
|
||||||
|
* *
|
||||||
|
* "Using the FreeRTOS Real Time Kernel - a Practical Guide" *
|
||||||
|
* http://www.FreeRTOS.org/Documentation *
|
||||||
|
* *
|
||||||
|
* A pdf reference manual is also available. Both are usually delivered *
|
||||||
|
* to your inbox within 20 minutes to two hours when purchased between 8am *
|
||||||
|
* and 8pm GMT (although please allow up to 24 hours in case of *
|
||||||
|
* exceptional circumstances). Thank you for your support! *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
This file is part of the FreeRTOS distribution.
|
||||||
|
|
||||||
|
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License (version 2) as published by the
|
||||||
|
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||||
|
***NOTE*** The exception to the GPL is included to allow you to distribute
|
||||||
|
a combined work that includes FreeRTOS without being obliged to provide the
|
||||||
|
source code for proprietary components outside of the FreeRTOS kernel.
|
||||||
|
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
more details. You should have received a copy of the GNU General Public
|
||||||
|
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||||
|
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||||
|
by writing to Richard Barry, contact details for whom are available on the
|
||||||
|
FreeRTOS WEB site.
|
||||||
|
|
||||||
|
1 tab == 4 spaces!
|
||||||
|
|
||||||
|
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||||
|
contact details.
|
||||||
|
|
||||||
|
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||||
|
critical systems.
|
||||||
|
|
||||||
|
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||||
|
licensing and training services.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef FREERTOS_CONFIG_H
|
||||||
|
#define FREERTOS_CONFIG_H
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------
|
||||||
|
* Application specific definitions.
|
||||||
|
*
|
||||||
|
* These definitions should be adjusted for your particular hardware and
|
||||||
|
* application requirements.
|
||||||
|
*
|
||||||
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
|
#define configUSE_PREEMPTION 1
|
||||||
|
#define configUSE_IDLE_HOOK 1
|
||||||
|
#define configUSE_TICK_HOOK 0
|
||||||
|
#define configTICK_RATE_HZ ( 50 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */
|
||||||
|
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 50 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the win32 thread. */
|
||||||
|
#define configTOTAL_HEAP_SIZE ( ( size_t ) 0 ) /* This parameter has no effect when heap_3.c is included in the project. */
|
||||||
|
#define configMAX_TASK_NAME_LEN ( 12 )
|
||||||
|
#define configUSE_TRACE_FACILITY 1
|
||||||
|
#define configUSE_16_BIT_TICKS 0
|
||||||
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
#define configUSE_CO_ROUTINES 0
|
||||||
|
#define configUSE_MUTEXES 1
|
||||||
|
#define configGENERATE_RUN_TIME_STATS 0
|
||||||
|
#define configCHECK_FOR_STACK_OVERFLOW 0
|
||||||
|
#define configUSE_RECURSIVE_MUTEXES 1
|
||||||
|
#define configQUEUE_REGISTRY_SIZE 0
|
||||||
|
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||||
|
#define configUSE_APPLICATION_TASK_TAG 0
|
||||||
|
|
||||||
|
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )
|
||||||
|
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||||
|
|
||||||
|
|
||||||
|
/* Co-routine definitions. */
|
||||||
|
#define configUSE_CO_ROUTINES 0
|
||||||
|
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||||
|
|
||||||
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
|
to exclude the API function. */
|
||||||
|
|
||||||
|
#define INCLUDE_vTaskPrioritySet 1
|
||||||
|
#define INCLUDE_uxTaskPriorityGet 1
|
||||||
|
#define INCLUDE_vTaskDelete 1
|
||||||
|
#define INCLUDE_vTaskCleanUpResources 0
|
||||||
|
#define INCLUDE_vTaskSuspend 1
|
||||||
|
#define INCLUDE_vTaskDelayUntil 1
|
||||||
|
#define INCLUDE_vTaskDelay 1
|
||||||
|
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||||
|
#define INCLUDE_xTaskGetSchedulerState 1
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* FREERTOS_CONFIG_H */
|
@ -0,0 +1,235 @@
|
|||||||
|
/*
|
||||||
|
FreeRTOS V6.1.0 - Copyright (C) 2010 Real Time Engineers Ltd.
|
||||||
|
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* If you are: *
|
||||||
|
* *
|
||||||
|
* + New to FreeRTOS, *
|
||||||
|
* + Wanting to learn FreeRTOS or multitasking in general quickly *
|
||||||
|
* + Looking for basic training, *
|
||||||
|
* + Wanting to improve your FreeRTOS skills and productivity *
|
||||||
|
* *
|
||||||
|
* then take a look at the FreeRTOS books - available as PDF or paperback *
|
||||||
|
* *
|
||||||
|
* "Using the FreeRTOS Real Time Kernel - a Practical Guide" *
|
||||||
|
* http://www.FreeRTOS.org/Documentation *
|
||||||
|
* *
|
||||||
|
* A pdf reference manual is also available. Both are usually delivered *
|
||||||
|
* to your inbox within 20 minutes to two hours when purchased between 8am *
|
||||||
|
* and 8pm GMT (although please allow up to 24 hours in case of *
|
||||||
|
* exceptional circumstances). Thank you for your support! *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
This file is part of the FreeRTOS distribution.
|
||||||
|
|
||||||
|
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License (version 2) as published by the
|
||||||
|
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||||
|
***NOTE*** The exception to the GPL is included to allow you to distribute
|
||||||
|
a combined work that includes FreeRTOS without being obliged to provide the
|
||||||
|
source code for proprietary components outside of the FreeRTOS kernel.
|
||||||
|
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
more details. You should have received a copy of the GNU General Public
|
||||||
|
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||||
|
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||||
|
by writing to Richard Barry, contact details for whom are available on the
|
||||||
|
FreeRTOS WEB site.
|
||||||
|
|
||||||
|
1 tab == 4 spaces!
|
||||||
|
|
||||||
|
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||||
|
contact details.
|
||||||
|
|
||||||
|
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||||
|
critical systems.
|
||||||
|
|
||||||
|
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||||
|
licensing and training services.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*******************************************************************************
|
||||||
|
* -NOTE- The Win32 port is a simulation (or is that emulation?) only! Do not
|
||||||
|
* expect to get real time behaviour from the Win32 port or this demo
|
||||||
|
* application. It is provided as a convenient development and demonstration
|
||||||
|
* test bed only. Also, at the time of writing, a method of deleting theads
|
||||||
|
* has not been implemented, although doing so would be trivial so this
|
||||||
|
* functionality might be added in at a later date. At present, calling
|
||||||
|
* vTaskDelete() will delete the real time task from FreeRTOS but not the Win32
|
||||||
|
* thread in which the task was executing. DO NOT CALL vTaskDelete() when using
|
||||||
|
* the Win32 port! This was tested using Windows XP on a dual core laptop.
|
||||||
|
*
|
||||||
|
* - READ THE WEB DOCUMENTATION FOR THIS PORT FOR MORE INFORMATION ON USING IT -
|
||||||
|
*******************************************************************************
|
||||||
|
*
|
||||||
|
* main() creates all the demo application tasks, then starts the scheduler.
|
||||||
|
* The web documentation provides more details of the standard demo application
|
||||||
|
* tasks, which provide no particular functionality but do provide a good
|
||||||
|
* example of how to use the FreeRTOS API.
|
||||||
|
*
|
||||||
|
* In addition to the standard demo tasks, the following tasks and tests are
|
||||||
|
* defined and/or created within this file:
|
||||||
|
*
|
||||||
|
* "Check" task - This only executes every five seconds but has a high priority
|
||||||
|
* to ensure it gets processor time. Its main function is to check that all the
|
||||||
|
* standard demo tasks are still operational. While no errors have been
|
||||||
|
* discovered the check task will print out "OK" and the current simulated tick
|
||||||
|
* time. If an error is discovered in the execution of a task then the check
|
||||||
|
* task will print out an appropriate error message.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Standard includes. */
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/* Kernel includes. */
|
||||||
|
#include <FreeRTOS.h>
|
||||||
|
#include "task.h"
|
||||||
|
#include "queue.h"
|
||||||
|
|
||||||
|
/* Standard demo includes. */
|
||||||
|
#include "BlockQ.h"
|
||||||
|
#include "integer.h"
|
||||||
|
#include "semtest.h"
|
||||||
|
#include "PollQ.h"
|
||||||
|
#include "GenQTest.h"
|
||||||
|
#include "QPeek.h"
|
||||||
|
#include "recmutex.h"
|
||||||
|
#include "flop.h"
|
||||||
|
|
||||||
|
/* Priorities at which the tasks are created. */
|
||||||
|
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
|
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||||
|
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||||
|
#define mainFLASH_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
|
#define mainuIP_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||||
|
#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||||
|
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||||
|
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||||
|
|
||||||
|
/* Task function prototypes. */
|
||||||
|
static void prvCheckTask( void *pvParameters );
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
int main( void )
|
||||||
|
{
|
||||||
|
/* Start the check task as described at the top of this file. */
|
||||||
|
xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
|
/* Create the standard demo tasks. */
|
||||||
|
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||||
|
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||||
|
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||||
|
vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );
|
||||||
|
vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );
|
||||||
|
vStartQueuePeekTasks();
|
||||||
|
vStartMathTasks( mainFLOP_TASK_PRIORITY );
|
||||||
|
vStartRecursiveMutexTasks();
|
||||||
|
|
||||||
|
/* Start the scheduler itself. */
|
||||||
|
vTaskStartScheduler();
|
||||||
|
|
||||||
|
/* Should never get here unless there was not enough heap space to create
|
||||||
|
the idle and other system tasks. */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
static void prvCheckTask( void *pvParameters )
|
||||||
|
{
|
||||||
|
portTickType xNextWakeTime;
|
||||||
|
const portTickType xCycleFrequency = 5000 / portTICK_RATE_MS;
|
||||||
|
char *pcStatusMessage = "OK";
|
||||||
|
|
||||||
|
/* Just to remove compiler warning. */
|
||||||
|
( void ) pvParameters;
|
||||||
|
|
||||||
|
/* Initialise xNextWakeTime - this only needs to be done once. */
|
||||||
|
xNextWakeTime = xTaskGetTickCount();
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
/* Place this task in the blocked state until it is time to run again. */
|
||||||
|
vTaskDelayUntil( &xNextWakeTime, xCycleFrequency );
|
||||||
|
|
||||||
|
/* Check the standard demo tasks are running without error. */
|
||||||
|
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: IntMath";
|
||||||
|
}
|
||||||
|
else if( xAreGenericQueueTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: GenQueue";
|
||||||
|
}
|
||||||
|
else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: QueuePeek";
|
||||||
|
}
|
||||||
|
else if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: BlockQueue";
|
||||||
|
}
|
||||||
|
else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: SemTest";
|
||||||
|
}
|
||||||
|
else if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: PollQueue";
|
||||||
|
}
|
||||||
|
else if( xAreMathsTaskStillRunning() != pdPASS )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: Flop";
|
||||||
|
}
|
||||||
|
else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
pcStatusMessage = "Error: RecMutex";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is the only task that uses stdout so its ok to call printf()
|
||||||
|
directly. */
|
||||||
|
printf( "%s - %d\r\n", pcStatusMessage, ( int ) xTaskGetTickCount() );
|
||||||
|
fflush( stdout ); /* Required by Eclipse console. */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void vApplicationIdleHook( void )
|
||||||
|
{
|
||||||
|
/* Sleep to reduce CPU load, but don't sleep indefinitely if not using
|
||||||
|
preemption as as nothing will cause a task switch. */
|
||||||
|
#if( configUSE_PREEMPTION != 0 )
|
||||||
|
{
|
||||||
|
SleepEx( INFINITE, TRUE );
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
const unsigned long ulMSToSleep = 5;
|
||||||
|
|
||||||
|
SleepEx( ulMSToSleep, TRUE );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void vApplicationMallocFailedHook( void )
|
||||||
|
{
|
||||||
|
/* Can be implemented if required, but probably not required in this
|
||||||
|
environment and running this demo. */
|
||||||
|
}
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
void vApplicationStackOverflowHook( void )
|
||||||
|
{
|
||||||
|
/* Can be implemented if required, but not required in this
|
||||||
|
environment and running this demo. */
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue