Fix Xtensa project file and some documentation improvements.

This commit is contained in:
Gaurav Aggarwal
2018-10-02 23:54:51 +00:00
parent c6de0001fa
commit 1af80854e6
9 changed files with 641 additions and 700 deletions

View File

@ -1,220 +0,0 @@
<?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">
<buildSystem id="Xtensa.600602548">
<storageModule id="Xtensa.600602548" moduleId="org.eclipse.cdt.core.settings"/>
</buildSystem>
<cconfiguration id="Xtensa.600602548">
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration buildProperties="" description="" errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;com.tensilica.xide.cdt.XCCErrorParser;org.eclipse.cdt.core.GASErrorParser;com.tensilica.xide.cdt.XtLDErrorParser;com.tensilica.xide.cdt.TCErrorParser;com.tensilica.xide.cdt.FlexLmErrorParser" id="Xtensa.600602548" name="Xtensa" parent="org.eclipse.cdt.build.core.prefbase.cfg">
<folderInfo id="Xtensa.600602548." name="/" resourcePath="">
<toolChain errorParsers="" id="org.eclipse.cdt.build.core.prefbase.toolchain.1124911838" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform binaryParser="com.tensilica.xide.cdt.XtensaELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.1124911838.1653706502" name=""/>
<builder command="${default_xttools_make_path}" enableAutoBuild="false" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="org.eclipse.cdt.build.core.settings.default.builder.1420142413" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder">
<outputEntries>
<entry excluding="**/.genned|**/*.pstamp|**/*.props|**/*.d|**/objFiles.list|**/*.interlock|**/*.icmiss|**/*.dcmiss|**/*.icmiss_cyc|**/*.dcmiss_cyc|**/*.cc_miss|**/*.cc_miss_cyc|**/*.cyc|**/*.insn|**/*.bdelay" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="bin"/>
</outputEntries>
</builder>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GASErrorParser" id="org.eclipse.cdt.build.core.settings.holder.libs.283188354" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GASErrorParser" id="org.eclipse.cdt.build.core.settings.holder.1363672131" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.818579882" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/arch/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/lib/xcc/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/xtensa-elf/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++/xtensa-elf"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/Common/include"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Source/portable/XCC/Xtensa"/>
<listOptionValue builtIn="false" value="&quot;../${workspace_loc:RTOSDemo\FreeRTOS_Source\include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;../${workspace_loc:RTOSDemo\FreeRTOS_Source\portable\XCC}&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\ribarry\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\Tensilica_Simulator_Xplorer_XCC&quot;"/>
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1072492848" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
<listOptionValue builtIn="false" value="__WCHAR_MAX__=65535U"/>
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=0"/>
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
<listOptionValue builtIn="false" value="__XCC__=12000"/>
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
<listOptionValue builtIn="false" value="__XTENSA_EL__=1"/>
<listOptionValue builtIn="false" value="__XCC_MINOR__=8"/>
<listOptionValue builtIn="false" value="__GNUC__=4"/>
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
<listOptionValue builtIn="false" value="__VERSION__=&quot;4.2.0"/>
<listOptionValue builtIn="false" value="__XTENSA_SOFT_FLOAT__=1"/>
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
<listOptionValue builtIn="false" value="__ELF__=1"/>
<listOptionValue builtIn="false" value="__xtensa__=1"/>
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=short"/>
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
<listOptionValue builtIn="false" value="__XTENSA_WINDOWED_ABI__=1"/>
<listOptionValue builtIn="false" value="__XTENSA__=1"/>
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
<listOptionValue builtIn="false" value="__XTENSA_SOFT_DOUBLE__=1"/>
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
<listOptionValue builtIn="false" value="__STDC__=1"/>
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1208833786" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GASErrorParser" id="org.eclipse.cdt.build.core.settings.holder.29534978" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1529034681" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/arch/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/lib/xcc/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/xtensa-elf/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++/xtensa-elf"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/Common/include"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Source/portable/XCC/Xtensa"/>
<listOptionValue builtIn="false" value="&quot;../${workspace_loc:RTOSDemo\FreeRTOS_Source\include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;../${workspace_loc:RTOSDemo\FreeRTOS_Source\portable\XCC}&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\ribarry\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\Tensilica_Simulator_Xplorer_XCC&quot;"/>
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.459736431" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
<listOptionValue builtIn="false" value="__WCHAR_MAX__=65535U"/>
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=0"/>
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
<listOptionValue builtIn="false" value="__XCC__=12000"/>
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
<listOptionValue builtIn="false" value="__XTENSA_EL__=1"/>
<listOptionValue builtIn="false" value="__XCC_MINOR__=8"/>
<listOptionValue builtIn="false" value="__GNUC__=4"/>
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
<listOptionValue builtIn="false" value="__VERSION__=&quot;4.2.0"/>
<listOptionValue builtIn="false" value="__XTENSA_SOFT_FLOAT__=1"/>
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
<listOptionValue builtIn="false" value="__ELF__=1"/>
<listOptionValue builtIn="false" value="__xtensa__=1"/>
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=short"/>
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
<listOptionValue builtIn="false" value="__XTENSA_WINDOWED_ABI__=1"/>
<listOptionValue builtIn="false" value="__XTENSA__=1"/>
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
<listOptionValue builtIn="false" value="__XTENSA_SOFT_DOUBLE__=1"/>
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
<listOptionValue builtIn="false" value="__STDC__=1"/>
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1865337768" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GASErrorParser" id="org.eclipse.cdt.build.core.settings.holder.541186543" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.2101310742" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/arch/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/lib/xcc/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/xtensa-elf/include"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++"/>
<listOptionValue builtIn="false" value="C:/devtools/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++/xtensa-elf"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Demo/Common/include"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="C:/Users/ribarry/Dev/FreeRTOS/WorkingCopy/FreeRTOS/Source/portable/XCC/Xtensa"/>
<listOptionValue builtIn="false" value="&quot;../${workspace_loc:RTOSDemo\FreeRTOS_Source\include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;../${workspace_loc:RTOSDemo\FreeRTOS_Source\portable\XCC}&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\Users\ribarry\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\Tensilica_Simulator_Xplorer_XCC&quot;"/>
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.740810983" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
<listOptionValue builtIn="false" value="__WCHAR_MAX__=65535U"/>
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=0"/>
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
<listOptionValue builtIn="false" value="__XCC__=12000"/>
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
<listOptionValue builtIn="false" value="__XTENSA_EL__=1"/>
<listOptionValue builtIn="false" value="__XCC_MINOR__=8"/>
<listOptionValue builtIn="false" value="__GNUC__=4"/>
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
<listOptionValue builtIn="false" value="__VERSION__=&quot;4.2.0"/>
<listOptionValue builtIn="false" value="__XTENSA_SOFT_FLOAT__=1"/>
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
<listOptionValue builtIn="false" value="__ELF__=1"/>
<listOptionValue builtIn="false" value="__xtensa__=1"/>
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=short"/>
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
<listOptionValue builtIn="false" value="__XTENSA_WINDOWED_ABI__=1"/>
<listOptionValue builtIn="false" value="__XTENSA__=1"/>
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
<listOptionValue builtIn="false" value="__XTENSA_SOFT_DOUBLE__=1"/>
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
<listOptionValue builtIn="false" value="__STDC__=1"/>
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1982908514" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="Xtensa.600602548" moduleId="org.eclipse.cdt.core.settings" name="Xtensa">
<externalSettings/>
<extensions>
<extension id="com.tensilica.xide.cdt.XtensaELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.tensilica.xide.cdt.FlexLmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.tensilica.xide.cdt.TCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.tensilica.xide.cdt.XtLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.tensilica.xide.cdt.XCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="RTOSDemo.null.2024905137" name="RTOSDemo"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="Xtensa.600602548">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>

View File

@ -58,6 +58,11 @@
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/GenQTest.c</locationURI>
</link>
<link>
<name>CommonDemoTasks/IntQueue.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/IntQueue.c</locationURI>
</link>
<link>
<name>CommonDemoTasks/IntSemTest.c</name>
<type>1</type>
@ -133,11 +138,6 @@
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/death.c</locationURI>
</link>
<link>
<name>CommonDemoTasks/dynamic.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/dynamic.c</locationURI>
</link>
<link>
<name>CommonDemoTasks/flop.c</name>
<type>1</type>
@ -291,92 +291,92 @@
<link>
<name>FreeRTOS_Source/portable/XCC/port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/port.c</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/port.c</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/portasm.S</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/portasm.S</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portasm.S</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/portbenchmark.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/portbenchmark.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portbenchmark.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/portclib.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/portclib.c</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portclib.c</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/portmacro.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/portmacro.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/portmacro.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/porttrace.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/porttrace.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/porttrace.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/readme_xtensa.txt</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/readme_xtensa.txt</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/readme_xtensa.txt</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_api.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_api.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_api.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_config.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_config.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_config.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_context.S</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_context.S</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_context.S</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_context.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_context.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_context.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_init.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_init.c</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_init.c</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_intr.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_intr.c</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_intr.c</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_intr_asm.S</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_intr_asm.S</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_intr_asm.S</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_overlay_os_hook.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_overlay_os_hook.c</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_overlay_os_hook.c</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_rtos.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_rtos.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_rtos.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_timer.h</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_timer.h</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_timer.h</locationURI>
</link>
<link>
<name>FreeRTOS_Source/portable/XCC/xtensa_vectors.S</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/XCC/Xtensa/xtensa_vectors.S</locationURI>
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/ThirdParty/XCC/Xtensa/xtensa_vectors.S</locationURI>
</link>
</linkedResources>
</projectDescription>

View File

@ -43,32 +43,38 @@
/* Check if Timer1 is available. */
#if XCHAL_TIMER1_INTERRUPT != XTHAL_TIMER_UNCONFIGURED
#if XCHAL_INT_LEVEL(XCHAL_TIMER1_INTERRUPT) <= XCHAL_EXCM_LEVEL
#define SECOND_TIMER_AVAILABLE 1
#if XCHAL_INT_LEVEL( XCHAL_TIMER1_INTERRUPT ) <= XCHAL_EXCM_LEVEL
#define SECOND_TIMER_AVAILABLE 1
#endif
#endif
#ifndef SECOND_TIMER_AVAILABLE
#define SECOND_TIMER_AVAILABLE 0
#define SECOND_TIMER_AVAILABLE 0
#endif
/* Timer0 is used to drive systick and therefore we use Timer1
/**
* Timer0 is used to drive systick and therefore we use Timer1
* as second interrupt which runs on a higher priority than
* Timer0. This ensures that systick will get interrupted by
* this timer and hence we can test interrupt nesting. */
#define SECOND_TIMER_INDEX 1
* this timer and hence we can test interrupt nesting.
*/
#define SECOND_TIMER_INDEX 1
/* Frequency of the second timer - This timer is configured at
* a frequency offset of 17 from the systick timer. */
#define SECOND_TIMER_TICK_RATE_HZ ( configTICK_RATE_HZ + 17 )
#define SECOND_TIMER_TICK_DIVISOR ( configCPU_CLOCK_HZ / SECOND_TIMER_TICK_RATE_HZ )
/**
* Frequency of the second timer - This timer is configured at
* a frequency offset of 17 from the systick timer.
*/
#define SECOND_TIMER_TICK_RATE_HZ ( configTICK_RATE_HZ + 17 )
#define SECOND_TIMER_TICK_DIVISOR ( configCPU_CLOCK_HZ / SECOND_TIMER_TICK_RATE_HZ )
/*-----------------------------------------------------------*/
/* Defined in main_full.c. */
extern BaseType_t xTimerForQueueTestInitialized;
/*-----------------------------------------------------------*/
/* Interrupt handler for timer interrupt. */
/**
* Interrupt handler for timer interrupt.
*/
#if( SECOND_TIMER_AVAILABLE == 1 )
static void prvTimer2Handler( void *arg );
#endif /* SECOND_TIMER_AVAILABLE */
@ -103,13 +109,15 @@ unsigned currentCycleCount, firstComparatorValue;
/*-----------------------------------------------------------*/
/*
* Xtensa timers work by comparing a cycle counter with a preset value. Once the match occurs
* an interrupt is generated, and the handler has to set a new cycle count into the comparator.
* To avoid clock drift due to interrupt latency, the new cycle count is computed from the old,
* not the time the interrupt was serviced. However if a timer interrupt is ever serviced more
* than one tick late, it is necessary to process multiple ticks until the new cycle count is
* in the future, otherwise the next timer interrupt would not occur until after the cycle
* counter had wrapped (2^32 cycles later).
* Xtensa timers work by comparing a cycle counter with a preset value.
* Once the match occurs an interrupt is generated, and the handler has
* to set a new cycle count into the comparator. To avoid clock drift
* due to interrupt latency, the new cycle count is computed from the
* old, not the time the interrupt was serviced. However if a timer
* interrupt is ever serviced more than one tick late, it is necessary
* to process multiple ticks until the new cycle count is in the future,
* otherwise the next timer interrupt would not occur until after the
* cycle counter had wrapped (2^32 cycles later).
do {
ticks++;

View File

@ -29,8 +29,9 @@
#ifndef INT_QUEUE_TIMER_H
#define INT_QUEUE_TIMER_H
/**
* The function called from interrupt tests to initialise timer.
*/
void vInitialiseTimerForIntQueueTest( void );
void vTimer2Handler_C( void );
#endif /* INT_QUEUE_TIMER_H */

View File

@ -26,15 +26,17 @@
*/
/******************************************************************************
* This project provides two demo applications. A simple blinky style project,
* and a more comprehensive test and demo application. The
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two.
* The simply blinky demo is implemented and described in main_blinky.c. The
* more comprehensive test and demo application is implemented and described in
* main_full.c.
* This project provides two demo applications:
* - A simple blinky style demo application.
* - A more comprehensive test and demo application.
* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY macro is used to select between the two.
*
* This file implements the code that is not demo specific, including the
* hardware setup and FreeRTOS hook functions.
* The simply blinky demo is implemented and described in the file main_blinky.c.
* The more comprehensive test and demo application is implemented and described
* in the file main_full.c.
*
* This file implements the code that is not demo specific, including the FreeRTOS
* hook functions.
*
*******************************************************************************
*/
@ -47,48 +49,60 @@
#include "FreeRTOS.h"
#include "task.h"
/* This project provides two demo applications. A simple blinky style demo
application, and a more comprehensive test and demo application. The
mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two.
If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is 1 then the blinky demo will be built.
The blinky demo is implemented and described in main_blinky.c.
If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is not 1 then the comprehensive test and
demo application will be built. The comprehensive test and demo application is
implemented and described in main_full.c. */
/**
* This project provides two demo applications:
* - A simple blinky style demo application.
* - A more comprehensive test and demo application.
* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY macro is used to select between the two.
*
* If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1 then the blinky demo will be
* built. The blinky demo is implemented and described in main_blinky.c.
*
* If mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0 then the comprehensive test
* and demo application will be built. The comprehensive test and demo application
* is implemented and described in main_full.c.
*/
#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0
/*-----------------------------------------------------------*/
/*
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
/**
* The entry function for the blinky demo application.
*
* This is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
*/
extern void main_blinky( void );
/**
* The entry function for the comprehensive test and demo application.
*
* This is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
*/
extern void main_full( void );
/*
/**
* Prototypes for the standard FreeRTOS application hook (callback) functions
* implemented within this file. See http://www.freertos.org/a00016.html .
* implemented within this file.
*
* @see http://www.freertos.org/a00016.html
*/
void vApplicationMallocFailedHook( void );
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
void vApplicationTickHook( void );
/*
* Only the comprehensive demo uses application hook (callback) functions. See
* http://www.freertos.org/a00016.html for more information.
/**
* The function called from the tick hook.
*
* @note Only the comprehensive demo uses application hook (callback) functions.
*
* @see http://www.freertos.org/a00016.html
*/
void vFullDemoTickHookFunction( void );
/*-----------------------------------------------------------*/
int main( void )
{
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
of this file. */
* of this file. */
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
{
main_blinky();
@ -106,17 +120,17 @@ int main( void )
void vApplicationMallocFailedHook( void )
{
/* vApplicationMallocFailedHook() will only be called if
configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook
function that will get called if a call to pvPortMalloc() fails.
pvPortMalloc() is called internally by the kernel whenever a task, queue,
timer or semaphore is created. It is also called by various parts of the
demo application. If heap_1.c, heap_2.c or heap_4.c is being used, then the
size of the heap available to pvPortMalloc() is defined by
configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize()
API function can be used to query the size of free heap space that remains
(although it does not provide information on how the remaining heap might be
fragmented). See http://www.freertos.org/a00111.html for more
information. */
* configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook
* function that will get called if a call to pvPortMalloc() fails.
* pvPortMalloc() is called internally by the kernel whenever a task, queue,
* timer or semaphore is created. It is also called by various parts of the
* demo application. If heap_1.c, heap_2.c or heap_4.c is being used, then
* the size of the heap available to pvPortMalloc() is defined by
* configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and the xPortGetFreeHeapSize()
* API function can be used to query the size of free heap space that remains
* (although it does not provide information on how the remaining heap might be
* fragmented). See http://www.freertos.org/a00111.html for more information.
*/
vAssertCalled( __LINE__, __FILE__ );
}
/*-----------------------------------------------------------*/
@ -127,10 +141,8 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
( void ) pxTask;
/* Run time stack overflow checking is performed if
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
function is called if a stack overflow is detected. This function is
provided as an example only as stack overflow checking does not function
when running the FreeRTOS Windows port. */
* configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
* function is called if a stack overflow is detected. */
vAssertCalled( __LINE__, __FILE__ );
}
/*-----------------------------------------------------------*/
@ -138,11 +150,10 @@ void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
void vApplicationTickHook( void )
{
/* This function will be called by each tick interrupt if
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
added here, but the tick hook is called from an interrupt context, so
code must not attempt to block, and only the interrupt safe FreeRTOS API
functions can be used (those that end in FromISR()). */
* configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
* added here, but the tick hook is called from an interrupt context, so
* code must not attempt to block, and only the interrupt safe FreeRTOS API
* functions can be used (those that end in FromISR()). */
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1 )
{
vFullDemoTickHookFunction();
@ -157,19 +168,17 @@ static BaseType_t xPrinted = pdFALSE;
volatile uint32_t ulSetToNonZeroInDebuggerToContinue = 0;
/* Called if an assertion passed to configASSERT() fails. See
http://www.freertos.org/a00110.html#configASSERT for more information. */
* http://www.freertos.org/a00110.html#configASSERT for more information. */
/* Parameters are not used. */
( void ) ulLine;
( void ) pcFileName;
printf( "ASSERT! Line %ld, file %s\r\n", ulLine, pcFileName );
taskENTER_CRITICAL();
taskENTER_CRITICAL();
{
/* You can step out of this function to debug the assertion by using
the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
value. */
* the debugger to set ulSetToNonZeroInDebuggerToContinue to a non-zero
* value. */
while( ulSetToNonZeroInDebuggerToContinue == 0 )
{
__asm volatile( "NOP" );

View File

@ -26,33 +26,18 @@
*/
/******************************************************************************
* NOTE 1: Windows will not be running the FreeRTOS demo threads continuously, so
* do not expect to get real time behaviour from the FreeRTOS Windows port, or
* this demo application. Also, the timing information in the FreeRTOS+Trace
* logs have no meaningful units. See the documentation page for the Windows
* port for further information:
* http://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html
*
* NOTE 2: This project provides two demo applications. A simple blinky style
* project, and a more comprehensive test and demo application. The
* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select
* between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY
* in main.c. This file implements the simply blinky version. Console output
* is used in place of the normal LED toggling.
*
* NOTE 3: This file only contains the source code that is specific to the
* NOTE: This file only contains the source code that is specific to the
* basic demo. Generic functions, such FreeRTOS hook functions, are defined
* in main.c.
******************************************************************************
*
* main_blinky() creates one queue, one software timer, and two tasks. It then
* main_blinky() creates one queue, one software timer, and two tasks. It then
* starts the scheduler.
*
* The Queue Send Task:
* The queue send task is implemented by the prvQueueSendTask() function in
* this file. It uses vTaskDelayUntil() to create a periodic task that sends
* the value 100 to the queue every 200 milliseconds (please read the notes
* above regarding the accuracy of timing under Windows).
* the value 100 to the queue every 200 milliseconds.
*
* The Queue Send Software Timer:
* The timer is an auto-reload timer with a period of two seconds. The timer's
@ -66,19 +51,13 @@
* message to indicate if the data came from the queue send task or the queue
* send software timer.
*
* Expected Behaviour:
* Expected Behavior:
* - The queue send task writes to the queue every 200ms, so every 200ms the
* queue receive task will output a message indicating that data was received
* on the queue from the queue send task.
* - The queue send software timer has a period of two seconds, and is reset
* each time a key is pressed. So if two seconds expire without a key being
* pressed then the queue receive task will output a message indicating that
* data was received on the queue from the queue send software timer.
*
* NOTE: Console input and output relies on Windows system calls, which can
* interfere with the execution of the FreeRTOS Windows port. This demo only
* uses Windows system call occasionally. Heavier use of Windows system calls
* can crash the port.
* - The queue send software timer has a period of two seconds, so every two
* seconds the queue receive task will output a message indicating that data
* was received on the queue from the queue send software timer.
*/
/* Standard includes. */
@ -90,47 +69,55 @@
#include "timers.h"
#include "semphr.h"
/* Priorities at which the tasks are created. */
/**
* Priorities at which the tasks are created.
*/
#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
/* The rate at which data is sent to the queue. The times are converted from
milliseconds to ticks using the pdMS_TO_TICKS() macro. */
/**
* The rate at which data is sent to the queue. The times are converted from
* milliseconds to ticks using the pdMS_TO_TICKS() macro.
*/
#define mainTASK_SEND_FREQUENCY_MS pdMS_TO_TICKS( 200UL )
#define mainTIMER_SEND_FREQUENCY_MS pdMS_TO_TICKS( 2000UL )
/* The number of items the queue can hold at once. */
/**
* The number of items the queue can hold at once.
*/
#define mainQUEUE_LENGTH ( 2 )
/* The values sent to the queue receive task from the queue send task and the
queue send software timer respectively. */
/**
* The values sent to the queue receive task from the queue send task and the
* queue send software timer respectively.
*/
#define mainVALUE_SENT_FROM_TASK ( 100UL )
#define mainVALUE_SENT_FROM_TIMER ( 200UL )
/*-----------------------------------------------------------*/
/*
/**
* The tasks as described in the comments at the top of this file.
*/
static void prvQueueReceiveTask( void *pvParameters );
static void prvQueueSendTask( void *pvParameters );
/*
/**
* The callback function executed when the software timer expires.
*/
static void prvQueueSendTimerCallback( TimerHandle_t xTimerHandle );
/*-----------------------------------------------------------*/
/* The queue used by both tasks. */
/**
* The queue used by both tasks.
*/
static QueueHandle_t xQueue = NULL;
/* A software timer that is started from the tick hook. */
/**
* A software timer that is started from the tick hook.
*/
static TimerHandle_t xTimer = NULL;
/*-----------------------------------------------------------*/
/*** SEE THE COMMENTS AT THE TOP OF THIS FILE ***/
void main_blinky( void )
{
const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
@ -141,7 +128,7 @@ const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
if( xQueue != NULL )
{
/* Start the two tasks as described in the comments at the top of this
file. */
* file. */
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
@ -168,10 +155,10 @@ const TickType_t xTimerPeriod = mainTIMER_SEND_FREQUENCY_MS;
}
/* If all is well, the scheduler will now be running, and the following
line will never be reached. If the following line does execute, then
there was insufficient FreeRTOS heap memory available for the idle and/or
timer tasks to be created. See the memory management section on the
FreeRTOS web site for more details. */
* line will never be reached. If the following line does execute, then
* there was insufficient FreeRTOS heap memory available for the idle and/or
* timer tasks to be created. See the memory management section on the
* FreeRTOS web site for more details. */
for( ;; );
}
/*-----------------------------------------------------------*/
@ -191,15 +178,15 @@ const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TASK;
for( ;; )
{
/* Place this task in the blocked state until it is time to run again.
The block time is specified in ticks, pdMS_TO_TICKS() was used to
convert a time specified in milliseconds into a time specified in ticks.
While in the Blocked state this task will not consume any CPU time. */
* The block time is specified in ticks, pdMS_TO_TICKS() was used to
* convert a time specified in milliseconds into a time specified in ticks.
* While in the Blocked state this task will not consume any CPU time. */
vTaskDelayUntil( &xNextWakeTime, xBlockTime );
/* Send to the queue - causing the queue receive task to unblock and
write to the console. 0 is used as the block time so the send operation
will not block - it shouldn't need to block as the queue should always
have at least one space at this point in the code. */
* write to the console. 0 is used as the block time so the send operation
* will not block - it shouldn't need to block as the queue should always
* have at least one space at this point in the code. */
xQueueSend( xQueue, &ulValueToSend, 0U );
}
}
@ -210,16 +197,16 @@ static void prvQueueSendTimerCallback( TimerHandle_t xTimerHandle )
const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TIMER;
/* This is the software timer callback function. The software timer has a
period of two seconds and is reset each time a key is pressed. This
callback function will execute if the timer expires, which will only happen
if a key is not pressed for two seconds. */
* period of two seconds and is reset each time a key is pressed. This
* callback function will execute if the timer expires, which will only happen
* if a key is not pressed for two seconds. */
/* Avoid compiler warnings resulting from the unused parameter. */
( void ) xTimerHandle;
/* Send to the queue - causing the queue receive task to unblock and
write out a message. This function is called from the timer/daemon task, so
must not block. Hence the block time is set to 0. */
* write out a message. This function is called from the timer/daemon task,
* so must not block. Hence the block time is set to 0. */
xQueueSend( xQueue, &ulValueToSend, 0U );
}
/*-----------------------------------------------------------*/
@ -234,17 +221,14 @@ uint32_t ulReceivedValue;
for( ;; )
{
/* Wait until something arrives in the queue - this task will block
indefinitely provided INCLUDE_vTaskSuspend is set to 1 in
FreeRTOSConfig.h. It will not use any CPU time while it is in the
Blocked state. */
* indefinitely provided INCLUDE_vTaskSuspend is set to 1 in
* FreeRTOSConfig.h. It will not use any CPU time while it is in the
* Blocked state. */
xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );
/* To get here something must have been received from the queue, but
is it an expected value? Normally calling printf() from a task is not
a good idea. Here there is lots of stack space and only one task is
using console IO so it is ok. However, note the comments at the top of
this file about the risks of making Windows system calls (such as
console output) from a FreeRTOS task. */
* is it an expected value? This is the only task that uses stdout so its
* ok to call printf() directly. Do not call printf from any other task. */
if( ulReceivedValue == mainVALUE_SENT_FROM_TASK )
{
printf( "Message received from task\r\n" );
@ -262,4 +246,3 @@ uint32_t ulReceivedValue;
}
}
/*-----------------------------------------------------------*/

File diff suppressed because it is too large Load Diff

View File

@ -43,15 +43,15 @@
vRegTest1:
/* Set initial values into the general purpose registers. */
/* a0 = return address, a1 = stack pointer. */
/* Set initial values into the general purpose registers.
* a0 = return address, a1 = stack pointer. */
#ifdef __XTENSA_WINDOWED_ABI__
entry a1, 64
s32i a0, a1, 0 /* Save return address */
s32i a0, a1, 0 /* Save return address. */
#else
addi a1, a1, -64
s32i a0, a1, 0 /* Save return address */
s32i a12, a1, 4 /* Save callee-saved regs if call0 ABI */
s32i a0, a1, 0 /* Save return address. */
s32i a12, a1, 4 /* Save callee-saved regs if call0 ABI. */
s32i a13, a1, 8
s32i a14, a1, 12
s32i a15, a1, 16
@ -74,7 +74,7 @@ vRegTest1:
_RegTest1Loop:
/* Loop checking the values originally loaded into the general purpose
registers remain through the life of the task. */
* registers remain through the life of the task. */
movi a0, 0x11111111
bne a0, a2, _RegTest1Error
movi a0, 0x22222222
@ -105,7 +105,7 @@ _RegTest1Loop:
bne a0, a15, _RegTest1Error
/* Incrememnt the loop counter to prove this task has not gone into the
error null loop. */
* error null loop. */
s32i a2, a1, 20
movi a2, ulRegTest1Counter
l32i a0, a2, 0
@ -127,15 +127,15 @@ _RegTest1Error:
vRegTest2:
/* Set initial values into the general purpose registers. */
/* a0 = return address, a1 = stack pointer. */
/* Set initial values into the general purpose registers.
* a0 = return address, a1 = stack pointer. */
#ifdef __XTENSA_WINDOWED_ABI__
entry a1, 64
s32i a0, a1, 0 /* Save return address */
s32i a0, a1, 0 /* Save return address. */
#else
addi a1, a1, -64
s32i a0, a1, 0 /* Save return address */
s32i a12, a1, 4 /* Save callee-saved regs if call0 ABI */
s32i a0, a1, 0 /* Save return address. */
s32i a12, a1, 4 /* Save callee-saved regs if call0 ABI. */
s32i a13, a1, 8
s32i a14, a1, 12
s32i a15, a1, 16
@ -161,7 +161,7 @@ _ReInit:
_RegTest2Loop:
/* Loop checking the values originally loaded into the general purpose
registers remain through the life of the task. */
* registers remain through the life of the task. */
movi a0, 0x01010101
bne a0, a2, _RegTest1Error
movi a0, 0x02020202
@ -191,9 +191,9 @@ _RegTest2Loop:
movi a0, 0x0e0e0e0e
bne a0, a15, _RegTest1Error
/* Force a yield from one of the reg test tasks to increase coverage. */
/* IMPORTANT: this call will trash some number of registers. Branch */
/* to _ReInit to set things up again. */
/* Force a yield from one of the reg test tasks to increase coverage.
* IMPORTANT: this call will trash some number of registers. Branch
* to _ReInit to set things up again. */
#ifdef __XTENSA_WINDOWED_ABI__
call8 vPortYield
#else
@ -201,7 +201,7 @@ _RegTest2Loop:
#endif
/* Increment the loop counter to prove this task has not gone into the
error null loop. */
* error null loop. */
s32i a2, a1, 20
movi a2, ulRegTest2Counter
l32i a0, a2, 0
@ -210,10 +210,8 @@ _RegTest2Loop:
l32i a2, a1, 20
/* Loop again. */
j _ReInit /* See comments above */
/* j _RegTest2Loop */
j _ReInit /* See comments above about not using j _RegTest2Loop. */
_RegTest2Error:
.L2:
j .L2