mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 10:08:33 -04:00
Add Xtensa port
The project file is for Xtensa Xplorer simulator. Also add tests for one size stream buffer.
This commit is contained in:
parent
7d92e4dd8f
commit
c4b1afc4ef
34 changed files with 8564 additions and 5 deletions
214
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.cproject
Normal file
214
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.cproject
Normal file
|
@ -0,0 +1,214 @@
|
|||
<?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:/workplace/FreeRTOSSVN/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Demo/Common/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Source/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Source/portable/ThirdParty/XCC/Xtensa"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/arch/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/lib/xcc/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/xtensa-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++/xtensa-elf"/>
|
||||
</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__="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:/workplace/FreeRTOSSVN/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Demo/Common/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Source/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Source/portable/ThirdParty/XCC/Xtensa"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/arch/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/lib/xcc/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/xtensa-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++/xtensa-elf"/>
|
||||
</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__="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:/workplace/FreeRTOSSVN/FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Demo/Common/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Source/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/workplace/FreeRTOSSVN/FreeRTOS/Source/portable/ThirdParty/XCC/Xtensa"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/arch/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/lib/xcc/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/tools/RG-2017.8-win32/XtensaTools/xtensa-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++"/>
|
||||
<listOptionValue builtIn="false" value="C:/usr/xtensa/XtDevTools/install/builds/RG-2017.8-win32/sample_controller/xtensa-elf/include/xcc/c++/xtensa-elf"/>
|
||||
</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__="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>
|
||||
<storageModule moduleId="refreshScope" versionNumber="1">
|
||||
<resource resourceType="PROJECT" workspacePath="/RTOSDemo"/>
|
||||
</storageModule>
|
||||
</cproject>
|
382
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.project
Normal file
382
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.project
Normal file
|
@ -0,0 +1,382 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>RTOSDemo</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>XtensaInfo</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.tensilica.xide.cdt.xtensamanagedbuilder</name>
|
||||
<arguments>
|
||||
</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.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.tensilica.xide.cdt.XtensaCProjectNature</nature>
|
||||
<nature>com.tensilica.xide.cdt.XtensaCProjectExeNature</nature>
|
||||
<nature>com.tensilica.xide.cdt.XideManagedProjectNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>CommonDemoTasks</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/AbortDelay.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/AbortDelay.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/BlockQ.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/BlockQ.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/EventGroupsDemo.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/EventGroupsDemo.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/GenQTest.c</name>
|
||||
<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>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/IntSemTest.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/MessageBufferDemo.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/MessageBufferDemo.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/PollQ.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/PollQ.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/QPeek.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/QPeek.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/QueueOverwrite.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/QueueOverwrite.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/QueueSet.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/QueueSet.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/QueueSetPolling.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/QueueSetPolling.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/StaticAllocation.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/StaticAllocation.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/StreamBufferDemo.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/StreamBufferDemo.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/StreamBufferInterrupt.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/StreamBufferInterrupt.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/TaskNotify.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/TaskNotify.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/TimerDemo.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/TimerDemo.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/blocktim.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/blocktim.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/countsem.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/countsem.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/death.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/death.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/flop.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/flop.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/include</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/include</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/integer.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/integer.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/recmutex.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/recmutex.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>CommonDemoTasks/semtest.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Common/Minimal/semtest.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/event_groups.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/event_groups.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/list.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/list.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/portable</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/queue.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/queue.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/readme.txt</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/readme.txt</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/stream_buffer.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/stream_buffer.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/tasks.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/tasks.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/timers.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/timers.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/FreeRTOS.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/FreeRTOS.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/event_groups.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/event_groups.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/list.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/list.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/message_buffer.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/message_buffer.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/mpu_prototypes.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/mpu_prototypes.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/mpu_wrappers.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/mpu_wrappers.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/portable.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/portable.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/projdefs.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/projdefs.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/queue.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/queue.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/semphr.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/semphr.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/stream_buffer.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/stream_buffer.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/task.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/task.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/include/timers.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/include/timers.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/portable/MemMang</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/portable/XCC</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/portable/MemMang/heap_4.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/Source/portable/MemMang/heap_4.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FreeRTOS_Source/portable/XCC/port.c</name>
|
||||
<type>1</type>
|
||||
<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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/ThirdParty/XCC/Xtensa/xtensa_vectors.S</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<BuildTarget version="1.0" tool="xtensa">
|
||||
<BuildSettings>
|
||||
<BaseSettings path="project">
|
||||
<LinkerOptions>
|
||||
<LinkerSupport value="sim" key="-mlsp=" custom="false"/>
|
||||
</LinkerOptions>
|
||||
</BaseSettings>
|
||||
</BuildSettings>
|
||||
</BuildTarget>
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<BuildTarget tool="xtensa" version="1.0">
|
||||
<BuildSettings>
|
||||
<BaseSettings path="project">
|
||||
<CompilerOptions>
|
||||
<FlagValueMapOptions>
|
||||
<FlagValueMapEntry>
|
||||
<key>Optimization</key>
|
||||
<value level="0" flag="-O" use="true"/>
|
||||
</FlagValueMapEntry>
|
||||
<FlagValueMapEntry>
|
||||
<key>Debug</key>
|
||||
<value level="-3" flag="-g" use="true"/>
|
||||
</FlagValueMapEntry>
|
||||
</FlagValueMapOptions>
|
||||
</CompilerOptions>
|
||||
<AssemblerOptions>
|
||||
<SingleFlagMapOptions>
|
||||
<SingleFlagMapEntry>
|
||||
<key>AssemblerIncludeDebug</key>
|
||||
<value flag="--gdwarf-2" use="true"/>
|
||||
</SingleFlagMapEntry>
|
||||
<SingleFlagMapEntry>
|
||||
<key>AssemblerLongCall</key>
|
||||
<value flag="--longcalls" use="true"/>
|
||||
</SingleFlagMapEntry>
|
||||
</SingleFlagMapOptions>
|
||||
</AssemblerOptions>
|
||||
<LinkerOptions>
|
||||
<BooleanMapOptions>
|
||||
<BooleanMapEntry>
|
||||
<key>CreateMinsize</key>
|
||||
<value selected="true"/>
|
||||
</BooleanMapEntry>
|
||||
</BooleanMapOptions>
|
||||
<LinkerSupport custom="false" key="-mlsp=" value="sim"/>
|
||||
</LinkerOptions>
|
||||
</BaseSettings>
|
||||
</BuildSettings>
|
||||
</BuildTarget>
|
21
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.xxproject
Normal file
21
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.xxproject
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<xxProperties>
|
||||
<propertyGroup name="project.information">
|
||||
<version value="3.0"/>
|
||||
</propertyGroup>
|
||||
<propertyGroup name="build.property">
|
||||
<buildTarget defaultTarget="Debug"/>
|
||||
</propertyGroup>
|
||||
<propertyGroup name="build.exclusion.data">
|
||||
<buildExclusionDatas>
|
||||
<exclusionSet name="Default" selected="1">
|
||||
<excludedEntry data="/.*/bin/.*"/>
|
||||
</exclusionSet>
|
||||
</buildExclusionDatas>
|
||||
</propertyGroup>
|
||||
<propertyGroup name="build.auto.includes">
|
||||
<exportDirs autoConsumeDirs="true" includeDepDirs="true" mode="auto"/>
|
||||
</propertyGroup>
|
||||
<propertyGroup name="library.dependencies"/>
|
||||
<propertyGroup name="build.custom.steps"/>
|
||||
</xxProperties>
|
250
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/FreeRTOSConfig.h
Normal file
250
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/FreeRTOSConfig.h
Normal file
|
@ -0,0 +1,250 @@
|
|||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
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 modification 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. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
|
||||
/* Required for configuration-dependent settings */
|
||||
#include "xtensa_config.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* Note that the default heap size is deliberately kept small so that
|
||||
* the build is more likely to succeed for configurations with limited
|
||||
* memory.
|
||||
*
|
||||
* 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 0
|
||||
|
||||
#ifdef SMALL_TEST
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#else
|
||||
#define configUSE_TICK_HOOK 1
|
||||
#endif
|
||||
|
||||
#define configTICK_RATE_HZ ( 1000 )
|
||||
|
||||
/* Default clock rate for simulator */
|
||||
#define configCPU_CLOCK_HZ 10000000 //_RB_ was 2MHz
|
||||
|
||||
/* This has impact on speed of search for highest priority */
|
||||
#ifdef SMALL_TEST
|
||||
#define configMAX_PRIORITIES ( 7 )
|
||||
#else
|
||||
#define configMAX_PRIORITIES ( 7 ) //_RB_
|
||||
#endif
|
||||
|
||||
/* Minimal stack size. This may need to be increased for your application */
|
||||
/* NOTE: The FreeRTOS demos may not work reliably with stack size < 4KB. */
|
||||
/* The Xtensa-specific examples should be fine with XT_STACK_MIN_SIZE. */
|
||||
#if !(defined XT_STACK_MIN_SIZE)
|
||||
#error XT_STACK_MIN_SIZE not defined, did you include xtensa_config.h ?
|
||||
#endif
|
||||
|
||||
#ifdef SMALL_TEST
|
||||
#define configMINIMAL_STACK_SIZE (XT_STACK_MIN_SIZE)
|
||||
#else
|
||||
#define configMINIMAL_STACK_SIZE (XT_STACK_MIN_SIZE > 4096 ? XT_STACK_MIN_SIZE : 4096)
|
||||
#endif
|
||||
|
||||
/* The Xtensa port uses a separate interrupt stack. Adjust the stack size */
|
||||
/* to suit the needs of your specific application. */
|
||||
#ifndef configISR_STACK_SIZE
|
||||
#define configISR_STACK_SIZE 2048
|
||||
#endif
|
||||
|
||||
/* Minimal heap size to make sure examples can run on memory limited
|
||||
configs. Adjust this to suit your system. */
|
||||
#ifdef SMALL_TEST
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) (16 * 1024) )
|
||||
#else
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) (512 * 1024) )
|
||||
#endif
|
||||
|
||||
#define configMAX_TASK_NAME_LEN ( 8 )
|
||||
#define configUSE_TRACE_FACILITY 1 /* Used by vTaskList in main.c */
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0 /* Used by vTaskList in main.c */
|
||||
#define configUSE_TRACE_FACILITY_2 0 /* Provided by Xtensa port patch */
|
||||
#define configBENCHMARK 0 /* Provided by Xtensa port patch */
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
|
||||
#ifdef SMALL_TEST
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 0
|
||||
#else
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#endif
|
||||
|
||||
/* 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_xTaskAbortDelay 1
|
||||
#define INCLUDE_xTaskGetHandle 1
|
||||
#define INCLUDE_xSemaphoreGetMutexHolder 1
|
||||
|
||||
/* The priority at which the tick interrupt runs. This should probably be
|
||||
kept at 1. */
|
||||
#define configKERNEL_INTERRUPT_PRIORITY 1
|
||||
|
||||
/* The maximum interrupt priority from which FreeRTOS.org API functions can
|
||||
be called. Only API functions that end in ...FromISR() can be used within
|
||||
interrupts. */
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY XCHAL_EXCM_LEVEL
|
||||
|
||||
/* XT_USE_THREAD_SAFE_CLIB is defined in xtensa_config.h and can be
|
||||
overridden from the compiler/make command line. The small test
|
||||
however always disables C lib thread safety to minimize size. */
|
||||
#ifdef SMALL_TEST
|
||||
#define configUSE_NEWLIB_REENTRANT 0
|
||||
#else
|
||||
#if (XT_USE_THREAD_SAFE_CLIB > 0u)
|
||||
#if XT_HAVE_THREAD_SAFE_CLIB
|
||||
#define configUSE_NEWLIB_REENTRANT 0 //_RB_ 1
|
||||
#else
|
||||
#error "Error: thread-safe C library support not available for this C library."
|
||||
#endif
|
||||
#else
|
||||
#define configUSE_NEWLIB_REENTRANT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Test FreeRTOS timers (with timer task) and more. */
|
||||
/* Some files don't compile if this flag is disabled */
|
||||
#define configUSE_TIMERS 1
|
||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||
#define configTIMER_QUEUE_LENGTH 10
|
||||
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
|
||||
|
||||
#ifdef SMALL_TEST
|
||||
#define INCLUDE_xTimerPendFunctionCall 0
|
||||
#define INCLUDE_eTaskGetState 0
|
||||
#define configUSE_QUEUE_SETS 0
|
||||
#else
|
||||
#define INCLUDE_xTimerPendFunctionCall 1
|
||||
#define INCLUDE_eTaskGetState 1
|
||||
#define configUSE_QUEUE_SETS 1
|
||||
#endif
|
||||
|
||||
/* Specific config for XTENSA (these can be deleted and they will take default values) */
|
||||
|
||||
#if (!defined XT_SIMULATOR) && (!defined XT_BOARD)
|
||||
#define configXT_SIMULATOR 1 /* Simulator mode */
|
||||
#define configXT_BOARD 0 /* Board mode */
|
||||
#endif
|
||||
|
||||
#ifndef SMALL_TEST
|
||||
|
||||
#if (!defined XT_INTEXC_HOOKS)
|
||||
#define configXT_INTEXC_HOOKS 1 /* Exception hooks used by certain tests */
|
||||
#endif
|
||||
|
||||
#if configUSE_TRACE_FACILITY_2
|
||||
#define configASSERT_2 1 /* Specific to Xtensa port */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* It is a good idea to define configASSERT() while developing. configASSERT()
|
||||
uses the same semantics as the standard C assert() macro. */
|
||||
#if !defined __ASSEMBLER__
|
||||
extern void vAssertCalled( unsigned long ulLine, const char * const pcFileName );
|
||||
#endif
|
||||
#define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __LINE__, __FILE__ )
|
||||
|
||||
#define configSTREAM_BUFFER_TRIGGER_LEVEL_TEST_MARGIN ( 2 )
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
|
156
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c
Normal file
156
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/IntQueueTimer.c
Normal file
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.0.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo includes. */
|
||||
#include "IntQueueTimer.h"
|
||||
#include "IntQueue.h"
|
||||
|
||||
/* Xtensa includes. */
|
||||
#include <xtensa/corebits.h>
|
||||
#include <xtensa/config/system.h>
|
||||
#include <xtensa_api.h>
|
||||
#include <xtensa/hal.h>
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* 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
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SECOND_TIMER_AVAILABLE
|
||||
#define SECOND_TIMER_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
||||
/* 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. */
|
||||
#if( SECOND_TIMER_AVAILABLE == 1 )
|
||||
static void prvTimer2Handler( void *arg );
|
||||
#endif /* SECOND_TIMER_AVAILABLE */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vInitialiseTimerForIntQueueTest( void )
|
||||
{
|
||||
unsigned currentCycleCount, firstComparatorValue;
|
||||
|
||||
/* Inform the tick hook function that it can access queues now. */
|
||||
xTimerForQueueTestInitialized = pdTRUE;
|
||||
|
||||
#if( SECOND_TIMER_AVAILABLE == 1 )
|
||||
{
|
||||
/* Install the interrupt handler for second timer. */
|
||||
xt_set_interrupt_handler( XCHAL_TIMER1_INTERRUPT, prvTimer2Handler, NULL );
|
||||
|
||||
/* Read the current cycle count. */
|
||||
currentCycleCount = xthal_get_ccount();
|
||||
|
||||
/* Calculate time of the first timer interrupt. */
|
||||
firstComparatorValue = currentCycleCount + SECOND_TIMER_TICK_DIVISOR;
|
||||
|
||||
/* Set the comparator. */
|
||||
xthal_set_ccompare( SECOND_TIMER_INDEX, firstComparatorValue );
|
||||
|
||||
/* Enable timer interrupt. */
|
||||
xt_ints_on( ( 1 << XCHAL_TIMER1_INTERRUPT ) );
|
||||
}
|
||||
#endif /* SECOND_TIMER_AVAILABLE */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* 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++;
|
||||
old_ccompare = read_ccompare_i();
|
||||
write_ccompare_i( old_ccompare + divisor );
|
||||
service one tick;
|
||||
diff = read_ccount() - old_ccompare;
|
||||
} while ( diff > divisor );
|
||||
*/
|
||||
#if( SECOND_TIMER_AVAILABLE == 1 )
|
||||
|
||||
static void prvTimer2Handler( void *arg )
|
||||
{
|
||||
unsigned oldComparatorValue, newComparatorValue, currentCycleCount;
|
||||
|
||||
/* Unused arguments. */
|
||||
( void )arg;
|
||||
|
||||
do
|
||||
{
|
||||
/* Read old comparator value. */
|
||||
oldComparatorValue = xthal_get_ccompare( SECOND_TIMER_INDEX );
|
||||
|
||||
/* Calculate the new comparator value. */
|
||||
newComparatorValue = oldComparatorValue + SECOND_TIMER_TICK_DIVISOR;
|
||||
|
||||
/* Update comparator and clear interrupt. */
|
||||
xthal_set_ccompare( SECOND_TIMER_INDEX, newComparatorValue );
|
||||
|
||||
/* Process. */
|
||||
portYIELD_FROM_ISR( xSecondTimerHandler() );
|
||||
|
||||
/* Ensure comparator update is complete. */
|
||||
xthal_icache_sync();
|
||||
|
||||
/* Read current cycle count to check if we need to process more
|
||||
* ticks to catch up. */
|
||||
currentCycleCount = xthal_get_ccount();
|
||||
|
||||
} while( ( currentCycleCount - oldComparatorValue ) > SECOND_TIMER_TICK_DIVISOR );
|
||||
}
|
||||
|
||||
#endif /* SECOND_TIMER_AVAILABLE */
|
||||
/*-----------------------------------------------------------*/
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.0.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef INT_QUEUE_TIMER_H
|
||||
#define INT_QUEUE_TIMER_H
|
||||
|
||||
void vInitialiseTimerForIntQueueTest( void );
|
||||
void vTimer2Handler_C( void );
|
||||
|
||||
#endif /* INT_QUEUE_TIMER_H */
|
||||
|
181
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c
Normal file
181
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main.c
Normal file
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.0.1
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* 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 file implements the code that is not demo specific, including the
|
||||
* hardware setup and FreeRTOS hook functions.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* FreeRTOS kernel includes. */
|
||||
#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. */
|
||||
#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.
|
||||
*/
|
||||
extern void main_blinky( void );
|
||||
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 .
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
void vFullDemoTickHookFunction( void );
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int main( void )
|
||||
{
|
||||
/* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top
|
||||
of this file. */
|
||||
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
|
||||
{
|
||||
main_blinky();
|
||||
}
|
||||
#else
|
||||
{
|
||||
main_full();
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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. */
|
||||
vAssertCalled( __LINE__, __FILE__ );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
|
||||
{
|
||||
( void ) 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. */
|
||||
vAssertCalled( __LINE__, __FILE__ );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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()). */
|
||||
|
||||
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY != 1 )
|
||||
{
|
||||
vFullDemoTickHookFunction();
|
||||
}
|
||||
#endif /* mainCREATE_SIMPLE_BLINKY_DEMO_ONLY */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vAssertCalled( unsigned long ulLine, const char * const pcFileName )
|
||||
{
|
||||
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. */
|
||||
|
||||
/* Parameters are not used. */
|
||||
( void ) ulLine;
|
||||
( void ) pcFileName;
|
||||
|
||||
printf( "ASSERT! Line %ld, file %s\r\n", ulLine, pcFileName );
|
||||
|
||||
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. */
|
||||
while( ulSetToNonZeroInDebuggerToContinue == 0 )
|
||||
{
|
||||
__asm volatile( "NOP" );
|
||||
__asm volatile( "NOP" );
|
||||
}
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
265
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c
Normal file
265
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_blinky.c
Normal file
|
@ -0,0 +1,265 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.0.1
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* 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
|
||||
* 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
|
||||
* 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 Queue Send Software Timer:
|
||||
* The timer is an auto-reload timer with a period of two seconds. The timer's
|
||||
* callback function writes the value 200 to the queue. The callback function
|
||||
* is implemented by prvQueueSendTimerCallback() within this file.
|
||||
*
|
||||
* The Queue Receive Task:
|
||||
* The queue receive task is implemented by the prvQueueReceiveTask() function
|
||||
* in this file. prvQueueReceiveTask() waits for data to arrive on the queue.
|
||||
* When data is received, the task checks the value of the data, then outputs a
|
||||
* message to indicate if the data came from the queue send task or the queue
|
||||
* send software timer.
|
||||
*
|
||||
* Expected Behaviour:
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdio.h>
|
||||
|
||||
/* Kernel includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "timers.h"
|
||||
#include "semphr.h"
|
||||
|
||||
/* 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. */
|
||||
#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. */
|
||||
#define mainQUEUE_LENGTH ( 2 )
|
||||
|
||||
/* 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. */
|
||||
static QueueHandle_t xQueue = NULL;
|
||||
|
||||
/* 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;
|
||||
|
||||
/* Create the queue. */
|
||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||
|
||||
if( xQueue != NULL )
|
||||
{
|
||||
/* Start the two tasks as described in the comments at the top of this
|
||||
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. */
|
||||
NULL, /* The parameter passed to the task - not used in this simple case. */
|
||||
mainQUEUE_RECEIVE_TASK_PRIORITY,/* The priority assigned to the task. */
|
||||
NULL ); /* The task handle is not required, so NULL is passed. */
|
||||
|
||||
xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Create the software timer, but don't start it yet. */
|
||||
xTimer = xTimerCreate( "Timer", /* The text name assigned to the software timer - for debug only as it is not used by the kernel. */
|
||||
xTimerPeriod, /* The period of the software timer in ticks. */
|
||||
pdTRUE, /* xAutoReload is set to pdTRUE. */
|
||||
NULL, /* The timer's ID is not used. */
|
||||
prvQueueSendTimerCallback );/* The function executed when the timer expires. */
|
||||
|
||||
if( xTimer != NULL )
|
||||
{
|
||||
xTimerStart( xTimer, 0 );
|
||||
}
|
||||
|
||||
/* Start the tasks and timer running. */
|
||||
vTaskStartScheduler();
|
||||
}
|
||||
|
||||
/* 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. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvQueueSendTask( void *pvParameters )
|
||||
{
|
||||
TickType_t xNextWakeTime;
|
||||
const TickType_t xBlockTime = mainTASK_SEND_FREQUENCY_MS;
|
||||
const uint32_t ulValueToSend = mainVALUE_SENT_FROM_TASK;
|
||||
|
||||
/* Prevent the compiler warning about the unused parameter. */
|
||||
( 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.
|
||||
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. */
|
||||
xQueueSend( xQueue, &ulValueToSend, 0U );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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. */
|
||||
|
||||
/* 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. */
|
||||
xQueueSend( xQueue, &ulValueToSend, 0U );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvQueueReceiveTask( void *pvParameters )
|
||||
{
|
||||
uint32_t ulReceivedValue;
|
||||
|
||||
/* Prevent the compiler warning about the unused parameter. */
|
||||
( void ) pvParameters;
|
||||
|
||||
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. */
|
||||
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. */
|
||||
if( ulReceivedValue == mainVALUE_SENT_FROM_TASK )
|
||||
{
|
||||
printf( "Message received from task\r\n" );
|
||||
}
|
||||
else if( ulReceivedValue == mainVALUE_SENT_FROM_TIMER )
|
||||
{
|
||||
printf( "Message received from software timer\r\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf( "Unexpected message\r\n" );
|
||||
}
|
||||
|
||||
fflush( stdout );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
437
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_full.c
Normal file
437
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/main_full.c
Normal file
|
@ -0,0 +1,437 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.0.1
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Kernel includes. */
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
#include <queue.h>
|
||||
#include <timers.h>
|
||||
#include <semphr.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"
|
||||
#include "TimerDemo.h"
|
||||
#include "countsem.h"
|
||||
#include "death.h"
|
||||
#include "QueueSet.h"
|
||||
#include "QueueOverwrite.h"
|
||||
#include "EventGroupsDemo.h"
|
||||
#include "IntSemTest.h"
|
||||
#include "TaskNotify.h"
|
||||
#include "QueueSetPolling.h"
|
||||
#include "StaticAllocation.h"
|
||||
#include "blocktim.h"
|
||||
#include "AbortDelay.h"
|
||||
#include "MessageBufferDemo.h"
|
||||
#include "StreamBufferDemo.h"
|
||||
#include "StreamBufferInterrupt.h"
|
||||
|
||||
/* Priorities at which the tasks are created. */
|
||||
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )
|
||||
#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 mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainQUEUE_OVERWRITE_PRIORITY ( tskIDLE_PRIORITY )
|
||||
|
||||
#define mainTIMER_TEST_PERIOD ( 50 )
|
||||
|
||||
/* Parameters that are passed into the register check tasks solely for the
|
||||
purpose of ensuring parameters are passed into tasks correctly. */
|
||||
#define mainREG_TEST_TASK_1_PARAMETER ( ( void * ) 0x12345678 )
|
||||
#define mainREG_TEST_TASK_2_PARAMETER ( ( void * ) 0x87654321 )
|
||||
|
||||
/* Whether or not to enable interrupt queue tests. */
|
||||
#define mainENABLE_INT_QUEUE_TESTS ( 0 )
|
||||
|
||||
/* The task that periodically checks that all the standard demo tasks are
|
||||
* still executing and error free.
|
||||
*/
|
||||
static void prvCheckTask( void *pvParameters );
|
||||
|
||||
/* Tasks that implement register tests. */
|
||||
static void prvRegTest1Task( void *pvParameters );
|
||||
static void prvRegTest2Task( void *pvParameters );
|
||||
|
||||
/* Functions implemented in assembly file regtest_xtensa.S. */
|
||||
extern void vRegTest1( void );
|
||||
extern void vRegTest2( void );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The variable into which error messages are latched. */
|
||||
static char *pcStatusMessage = "No errors";
|
||||
|
||||
/* The following two variables are used to communicate the status of the
|
||||
register check tasks to the check task. If the variables keep incrementing,
|
||||
then the register check tasks have not discovered any errors. If a variable
|
||||
stops incrementing, then an error has been found. */
|
||||
volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
|
||||
|
||||
/* The following variable is used to communicate whether the timers for the
|
||||
IntQueue tests have been Initialized. This is needed to ensure that the queues
|
||||
are accessed from the tick hook only after they have been created in the
|
||||
interrupt queue test. */
|
||||
volatile BaseType_t xTimerForQueueTestInitialized = pdFALSE;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int main_full( void )
|
||||
{
|
||||
/* Start the check task as described at the top of this file. */
|
||||
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
#if( mainENABLE_INT_QUEUE_TESTS == 0 )
|
||||
{
|
||||
/* Create the standard demo tasks. */
|
||||
vStartTaskNotifyTask();
|
||||
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();
|
||||
vStartCountingSemaphoreTasks();
|
||||
vStartQueueSetTasks();
|
||||
|
||||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );
|
||||
vStartEventGroupTasks();
|
||||
vStartInterruptSemaphoreTasks();
|
||||
vStartQueueSetPollingTask();
|
||||
vCreateBlockTimeTasks();
|
||||
|
||||
#if( configUSE_PREEMPTION != 0 )
|
||||
{
|
||||
/* Don't expect these tasks to pass when preemption is not used. */
|
||||
vStartTimerDemoTask( mainTIMER_TEST_PERIOD );
|
||||
}
|
||||
#endif
|
||||
|
||||
vCreateAbortDelayTasks();
|
||||
vStartMessageBufferTasks( configMINIMAL_STACK_SIZE );
|
||||
|
||||
vStartStreamBufferTasks();
|
||||
vStartStreamBufferInterruptDemo();
|
||||
|
||||
/* Create the register check tasks, as described at the top of this file */
|
||||
xTaskCreate( prvRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL );
|
||||
|
||||
/* The suicide tasks must be created last as they need to know how many
|
||||
tasks were running prior to their creation. This then allows them to
|
||||
ascertain whether or not the correct/expected number of tasks are running at
|
||||
any given time. */
|
||||
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
|
||||
}
|
||||
#else /* mainENABLE_INT_QUEUE_TESTS */
|
||||
{
|
||||
/* Start interrupt queue test tasks. */
|
||||
vStartInterruptQueueTasks();
|
||||
}
|
||||
#endif /* mainENABLE_INT_QUEUE_TESTS */
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
TickType_t xNextWakeTime;
|
||||
const TickType_t xCycleFrequency = pdMS_TO_TICKS( 5000UL );
|
||||
static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;
|
||||
|
||||
/* 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 );
|
||||
|
||||
#if( mainENABLE_INT_QUEUE_TESTS == 0 )
|
||||
{
|
||||
/* Check the standard demo tasks are running without error. */
|
||||
#if( configUSE_PREEMPTION != 0 )
|
||||
{
|
||||
/* These tasks are only created when preemption is used. */
|
||||
if( xAreTimerDemoTasksStillRunning( xCycleFrequency ) != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: TimerDemo";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if( xAreTaskNotificationTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: Notification";
|
||||
}
|
||||
else if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: BlockQueue";
|
||||
}
|
||||
else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: SemTest";
|
||||
}
|
||||
else if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: PollQueue";
|
||||
}
|
||||
else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: IntMath";
|
||||
}
|
||||
else if( xAreGenericQueueTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: GenQueue";
|
||||
}
|
||||
else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: QueuePeek";
|
||||
}
|
||||
else if( xAreMathsTaskStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Flop";
|
||||
}
|
||||
else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: RecMutex";
|
||||
}
|
||||
else if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: CountSem";
|
||||
}
|
||||
else if( xAreQueueSetTasksStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Queue set";
|
||||
}
|
||||
else if( xIsQueueOverwriteTaskStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Queue overwrite";
|
||||
}
|
||||
else if( xAreEventGroupTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: EventGroup";
|
||||
}
|
||||
else if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: IntSem";
|
||||
}
|
||||
else if( xAreQueueSetPollTasksStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Queue set polling";
|
||||
}
|
||||
else if( xAreBlockTimeTestTasksStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Block time";
|
||||
}
|
||||
else if( xAreAbortDelayTestTasksStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Abort delay";
|
||||
}
|
||||
else if( xAreMessageBufferTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: MessageBuffer";
|
||||
}
|
||||
else if( xAreStreamBufferTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: StreamBuffer";
|
||||
}
|
||||
else if( xIsInterruptStreamBufferDemoStillRunning() != pdPASS )
|
||||
{
|
||||
pcStatusMessage = "Error: Stream buffer interrupt";
|
||||
}
|
||||
else if( xIsCreateTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: Death";
|
||||
}
|
||||
else if( ulLastRegTest1Value == ulRegTest1Counter )
|
||||
{
|
||||
pcStatusMessage = "Error: Reg Test 1";
|
||||
}
|
||||
else if( ulLastRegTest2Value == ulRegTest2Counter )
|
||||
{
|
||||
pcStatusMessage = "Error: Reg Test 2";
|
||||
}
|
||||
|
||||
/* Update register test counters. */
|
||||
ulLastRegTest1Value = ulRegTest1Counter;
|
||||
ulLastRegTest2Value = ulRegTest2Counter;
|
||||
}
|
||||
#else /* mainENABLE_INT_QUEUE_TESTS */
|
||||
{
|
||||
if( xAreIntQueueTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
pcStatusMessage = "Error: IntQueue";
|
||||
}
|
||||
}
|
||||
#endif /* mainENABLE_INT_QUEUE_TESTS */
|
||||
|
||||
/* This is the only task that uses stdout so its ok to call printf()
|
||||
directly. */
|
||||
printf( "%s - tick count %zu - free heap %zu - min free heap %zu\r\n", pcStatusMessage,
|
||||
xTaskGetTickCount(),
|
||||
xPortGetFreeHeapSize(),
|
||||
xPortGetMinimumEverFreeHeapSize() );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Called by vApplicationTickHook(), which is defined in main.c. */
|
||||
void vFullDemoTickHookFunction( void )
|
||||
{
|
||||
TaskHandle_t xTimerTask;
|
||||
|
||||
#if( mainENABLE_INT_QUEUE_TESTS == 0 )
|
||||
{
|
||||
/* Exercise using task notifications from an interrupt. */
|
||||
xNotifyTaskFromISR();
|
||||
|
||||
/* Write to a queue that is in use as part of the queue set demo to
|
||||
* demonstrate using queue sets from an ISR. */
|
||||
vQueueSetAccessQueueSetFromISR();
|
||||
|
||||
/* Call the periodic queue overwrite from ISR demo. */
|
||||
vQueueOverwritePeriodicISRDemo();
|
||||
|
||||
/* Exercise event groups from interrupts. */
|
||||
vPeriodicEventGroupsProcessing();
|
||||
|
||||
/* Exercise giving mutexes from an interrupt. */
|
||||
vInterruptSemaphorePeriodicTest();
|
||||
|
||||
/* Queue set access from interrupt. */
|
||||
vQueueSetPollingInterruptAccess();
|
||||
|
||||
/* Call the periodic timer test, which tests the timer API functions that
|
||||
can be called from an ISR. */
|
||||
#if( configUSE_PREEMPTION != 0 )
|
||||
{
|
||||
/* Only created when preemption is used. */
|
||||
vTimerPeriodicISRTests();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Writes to stream buffer byte by byte to test the stream buffer trigger
|
||||
level functionality. */
|
||||
vPeriodicStreamBufferProcessing();
|
||||
|
||||
/* Writes a string to a string buffer four bytes at a time to demonstrate
|
||||
a stream being sent from an interrupt to a task. */
|
||||
vBasicStreamBufferSendFromISR();
|
||||
}
|
||||
#else /* mainENABLE_INT_QUEUE_TESTS */
|
||||
{
|
||||
/* Access queues from interrupt. Make sure to access after the queues have
|
||||
been created. */
|
||||
if( xTimerForQueueTestInitialized == pdTRUE )
|
||||
{
|
||||
portYIELD_FROM_ISR( xFirstTimerHandler() );
|
||||
}
|
||||
}
|
||||
#endif /* mainENABLE_INT_QUEUE_TESTS */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvRegTest1Task( void *pvParameters )
|
||||
{
|
||||
/* Although the regtest task is written in assembly, its entry point is
|
||||
written in C for convenience of checking the task parameter is being passed
|
||||
in correctly. */
|
||||
if( pvParameters == mainREG_TEST_TASK_1_PARAMETER )
|
||||
{
|
||||
/* Start the part of the test that is written in assembly. */
|
||||
vRegTest1();
|
||||
}
|
||||
|
||||
/* The following line will only execute if the task parameter is found to
|
||||
be incorrect. The check task will detect that the regtest loop counter is
|
||||
not being incremented and flag an error. */
|
||||
vTaskDelete( NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvRegTest2Task( void *pvParameters )
|
||||
{
|
||||
/* Although the regtest task is written in assembly, its entry point is
|
||||
written in C for convenience of checking the task parameter is being passed
|
||||
in correctly. */
|
||||
if( pvParameters == mainREG_TEST_TASK_2_PARAMETER )
|
||||
{
|
||||
/* Start the part of the test that is written in assembly. */
|
||||
vRegTest2();
|
||||
}
|
||||
|
||||
/* The following line will only execute if the task parameter is found to
|
||||
be incorrect. The check task will detect that the regtest loop counter is
|
||||
not being incremented and flag an error. */
|
||||
vTaskDelete( NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
219
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S
Normal file
219
FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/regtest_xtensa.S
Normal file
|
@ -0,0 +1,219 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.0.1
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#include "FreeRTOSConfig.h"
|
||||
//#include "ISR_Support.h"
|
||||
|
||||
.extern ulRegTest1Counter
|
||||
.extern ulRegTest2Counter
|
||||
.extern vPortYield
|
||||
|
||||
.global vRegTest1
|
||||
.global vRegTest2
|
||||
|
||||
.text
|
||||
.align 4
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
vRegTest1:
|
||||
|
||||
/* 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 */
|
||||
#else
|
||||
addi a1, a1, -64
|
||||
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
|
||||
#endif
|
||||
movi a2, 0x11111111
|
||||
movi a3, 0x22222222
|
||||
movi a4, 0x33333333
|
||||
movi a5, 0x44444444
|
||||
movi a6, 0x55555555
|
||||
movi a7, 0x66666666
|
||||
movi a8, 0x77777777
|
||||
movi a9, 0x88888888
|
||||
movi a10, 0x99999999
|
||||
movi a11, 0xaaaaaaaa
|
||||
movi a12, 0xbbbbbbbb
|
||||
movi a13, 0xcccccccc
|
||||
movi a14, 0xdddddddd
|
||||
movi a15, 0xeeeeeeee
|
||||
|
||||
_RegTest1Loop:
|
||||
|
||||
/* Loop checking the values originally loaded into the general purpose
|
||||
registers remain through the life of the task. */
|
||||
movi a0, 0x11111111
|
||||
bne a0, a2, _RegTest1Error
|
||||
movi a0, 0x22222222
|
||||
bne a0, a3, _RegTest1Error
|
||||
movi a0, 0x33333333
|
||||
bne a0, a4, _RegTest1Error
|
||||
movi a0, 0x44444444
|
||||
bne a0, a5, _RegTest1Error
|
||||
movi a0, 0x55555555
|
||||
bne a0, a6, _RegTest1Error
|
||||
movi a0, 0x66666666
|
||||
bne a0, a7, _RegTest1Error
|
||||
movi a0, 0x77777777
|
||||
bne a0, a8, _RegTest1Error
|
||||
movi a0, 0x88888888
|
||||
bne a0, a9, _RegTest1Error
|
||||
movi a0, 0x99999999
|
||||
bne a0, a10, _RegTest1Error
|
||||
movi a0, 0xaaaaaaaa
|
||||
bne a0, a11, _RegTest1Error
|
||||
movi a0, 0xbbbbbbbb
|
||||
bne a0, a12, _RegTest1Error
|
||||
movi a0, 0xcccccccc
|
||||
bne a0, a13, _RegTest1Error
|
||||
movi a0, 0xdddddddd
|
||||
bne a0, a14, _RegTest1Error
|
||||
movi a0, 0xeeeeeeee
|
||||
bne a0, a15, _RegTest1Error
|
||||
|
||||
/* Incrememnt the loop counter to prove this task has not gone into the
|
||||
error null loop. */
|
||||
s32i a2, a1, 20
|
||||
movi a2, ulRegTest1Counter
|
||||
l32i a0, a2, 0
|
||||
addi a0, a0, 1
|
||||
s32i a0, a2, 0
|
||||
l32i a2, a1, 20
|
||||
|
||||
/* Loop again. */
|
||||
j _RegTest1Loop
|
||||
|
||||
_RegTest1Error:
|
||||
.L1:
|
||||
j .L1
|
||||
|
||||
|
||||
.align 4
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
vRegTest2:
|
||||
|
||||
/* 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 */
|
||||
#else
|
||||
addi a1, a1, -64
|
||||
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
|
||||
#endif
|
||||
|
||||
_ReInit:
|
||||
|
||||
movi a2, 0x01010101
|
||||
movi a3, 0x02020202
|
||||
movi a4, 0x03030303
|
||||
movi a5, 0x04040404
|
||||
movi a6, 0x05050505
|
||||
movi a7, 0x06060606
|
||||
movi a8, 0x07070707
|
||||
movi a9, 0x08080808
|
||||
movi a10, 0x09090909
|
||||
movi a11, 0x0a0a0a0a
|
||||
movi a12, 0x0b0b0b0b
|
||||
movi a13, 0x0c0c0c0c
|
||||
movi a14, 0x0d0d0d0d
|
||||
movi a15, 0x0e0e0e0e
|
||||
|
||||
_RegTest2Loop:
|
||||
|
||||
/* Loop checking the values originally loaded into the general purpose
|
||||
registers remain through the life of the task. */
|
||||
movi a0, 0x01010101
|
||||
bne a0, a2, _RegTest1Error
|
||||
movi a0, 0x02020202
|
||||
bne a0, a3, _RegTest1Error
|
||||
movi a0, 0x03030303
|
||||
bne a0, a4, _RegTest1Error
|
||||
movi a0, 0x04040404
|
||||
bne a0, a5, _RegTest1Error
|
||||
movi a0, 0x05050505
|
||||
bne a0, a6, _RegTest1Error
|
||||
movi a0, 0x06060606
|
||||
bne a0, a7, _RegTest1Error
|
||||
movi a0, 0x07070707
|
||||
bne a0, a8, _RegTest1Error
|
||||
movi a0, 0x08080808
|
||||
bne a0, a9, _RegTest1Error
|
||||
movi a0, 0x09090909
|
||||
bne a0, a10, _RegTest1Error
|
||||
movi a0, 0x0a0a0a0a
|
||||
bne a0, a11, _RegTest1Error
|
||||
movi a0, 0x0b0b0b0b
|
||||
bne a0, a12, _RegTest1Error
|
||||
movi a0, 0x0c0c0c0c
|
||||
bne a0, a13, _RegTest1Error
|
||||
movi a0, 0x0d0d0d0d
|
||||
bne a0, a14, _RegTest1Error
|
||||
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. */
|
||||
#ifdef __XTENSA_WINDOWED_ABI__
|
||||
call8 vPortYield
|
||||
#else
|
||||
call0 vPortYield
|
||||
#endif
|
||||
|
||||
/* Increment the loop counter to prove this task has not gone into the
|
||||
error null loop. */
|
||||
s32i a2, a1, 20
|
||||
movi a2, ulRegTest2Counter
|
||||
l32i a0, a2, 0
|
||||
addi a0, a0, 1
|
||||
s32i a0, a2, 0
|
||||
l32i a2, a1, 20
|
||||
|
||||
/* Loop again. */
|
||||
j _ReInit /* See comments above */
|
||||
/* j _RegTest2Loop */
|
||||
|
||||
_RegTest2Error:
|
||||
.L2:
|
||||
j .L2
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue