]> git.sur5r.net Git - freertos/commitdiff
RXv1 tests running before updating to RXv2.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 6 Mar 2014 12:46:16 +0000 (12:46 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 6 Mar 2014 12:46:16 +0000 (12:46 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2222 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/.HardwareDebuglinker
FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/.cproject
FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/.project
FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/FreeRTOSConfig.h
FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src [new file with mode: 0644]
FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main.c
FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_blinky.c
FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c [new file with mode: 0644]

index 99f3c2cda89e335301cb9975d8f92bd923c60673..ee26509c696f60d5480620b76c0aed4d2c831460 100644 (file)
   <sections name="R"/>\r
   <sections name="SU"/>\r
   <sections name="SI"/>\r
-  <sections name="PResetPRG">\r
-    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4294934528"/>\r
-  </sections>\r
   <sections name="C_1">\r
-    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4294934784"/>\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4290772992"/>\r
   </sections>\r
   <sections name="C_2"/>\r
   <sections name="C"/>\r
@@ -32,6 +29,9 @@
   <sections name="W_2"/>\r
   <sections name="W"/>\r
   <sections name="L"/>\r
+  <sections name="PResetPRG">\r
+    <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4294934528"/>\r
+  </sections>\r
   <sections name="FIXEDVECT">\r
     <sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4294967248"/>\r
   </sections>\r
index 412d691d97df7a60ffb206e82e6ffcaa9967612c..06a09b34bc797a422c8fcaaabd4748f3c25555b5 100644 (file)
                                                                <option id="com.renesas.cdt.rxc.HardwareDebug.StandardLibrary.option.endian.402722613" name="Data Endian" superClass="com.renesas.cdt.rxc.HardwareDebug.StandardLibrary.option.endian" value="Little-endian data" valueType="enumerated"/>\r
                                                                <option id="com.renesas.cdt.rxc.HardwareDebug.StandardLibrary.option.address.2030989684" name="Address" superClass="com.renesas.cdt.rxc.HardwareDebug.StandardLibrary.option.address" value="00000000" valueType="string"/>\r
                                                                <option id="com.renesas.cdt.renesas.StandardLibrary.option.libConfiguration.365502198" name="Library configuration" superClass="com.renesas.cdt.renesas.StandardLibrary.option.libConfiguration" value="C(C89)" valueType="enumerated"/>\r
-                                                               <option id="com.renesas.cdt.renesas.StandardLibrary.option.mathc89.1961101149" name="math.h (C89/C99): Mathematical/trigonometric operations (double-precision)" superClass="com.renesas.cdt.renesas.StandardLibrary.option.mathc89" value="false" valueType="boolean"/>\r
+                                                               <option id="com.renesas.cdt.renesas.StandardLibrary.option.mathc89.1961101149" name="math.h (C89/C99): Mathematical/trigonometric operations (double-precision)" superClass="com.renesas.cdt.renesas.StandardLibrary.option.mathc89" value="true" valueType="boolean"/>\r
                                                                <option id="com.renesas.cdt.renesas.StandardLibrary.option.stdioc89.219852317" name="stdio.h (C89/C99): Input/Output" superClass="com.renesas.cdt.renesas.StandardLibrary.option.stdioc89" value="false" valueType="boolean"/>\r
                                                                <option id="com.renesas.cdt.renesas.StandardLibrary.option.stdlibc89.603288235" name="stdlib.h (C89/C99): General purpose library features" superClass="com.renesas.cdt.renesas.StandardLibrary.option.stdlibc89" value="true" valueType="boolean"/>\r
                                                                <option id="com.renesas.cdt.renesas.StandardLibrary.option.stringc89.298274803" name="string.h (C89/C99): String handling operations" superClass="com.renesas.cdt.renesas.StandardLibrary.option.stringc89" value="true" valueType="boolean"/>\r
                                                        <tool command="optlnk" id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.convertor.Id.1803349405" name="Converter" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.convertor.Id"/>\r
                                                </toolChain>\r
                                        </folderInfo>\r
+                                       <folderInfo id="com.renesas.cdt.rxc.hardwaredebug.win32.configuration.Id.534038930.435561194" name="/" resourcePath="Source/Common_Demo_Source/Minimal">\r
+                                               <toolChain id="com.renesas.cdt.rxc.hardwaredebug.win32.toolChain.Id.1875847603" name="Renesas RXC Toolchain" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.toolChain.Id" unusedChildren="">\r
+                                                       <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.rxc.hardwaredebug.win32.targetPlatform.Id" isAbstract="false" osList="win32" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.targetPlatform.Id"/>\r
+                                                       <tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.compiler.Id.509729027" name="Compiler" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.compiler.Id.244125284">\r
+                                                               <inputType id="%Base.Compiler.Shc.C.Input.Id.1020678920" name="C Input" superClass="%Base.Compiler.Shc.C.Input.Id"/>\r
+                                                               <inputType id="%Base.Compiler.Shc.C.Input1.Id.1857995866" name="C++ Input" superClass="%Base.Compiler.Shc.C.Input1.Id"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.assembler.Id.1587336802" name="Assembler" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.assembler.Id.1919439319">\r
+                                                               <inputType id="%Base.Assembler.shcInputType.Id.62843888" name="Assembler InputType" superClass="%Base.Assembler.shcInputType.Id"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.linker.Id.629169293" name="Linker" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.linker.Id.1242574850"/>\r
+                                                       <tool id="%com.renesas.cdt.rxc.hardwaredebug.win32.tool.libgen.Id.1105527095" name="Standard Library" superClass="%com.renesas.cdt.rxc.hardwaredebug.win32.tool.libgen.Id.1405860605"/>\r
+                                                       <tool id="com.renesas.cdt.rxc.hardwaredebug.win32.tool.convertor.Id.794872766" name="Converter" superClass="com.renesas.cdt.rxc.hardwaredebug.win32.tool.convertor.Id.1803349405"/>\r
+                                               </toolChain>\r
+                                       </folderInfo>\r
                                        <sourceEntries>\r
                                                <entry excluding="src" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>\r
                                        </sourceEntries>\r
index 29a634b92d1c35dac762a40b768e84e994d66f32..281d83f6a52026a2aad1893c11819104c6646c19 100644 (file)
                        <type>2</type>\r
                        <locationURI>virtual:/virtual</locationURI>\r
                </link>\r
+               <link>\r
+                       <name>Source/Common_Demo_Source/Minimal</name>\r
+                       <type>2</type>\r
+                       <locationURI>FREERTOS_ROOT/FreeRTOS/Demo/Common/Minimal</locationURI>\r
+               </link>\r
                <link>\r
                        <name>Source/Common_Demo_Source/include</name>\r
                        <type>2</type>\r
                </link>\r
        </linkedResources>\r
        <filteredResources>\r
+               <filter>\r
+                       <id>1394031827230</id>\r
+                       <name>Source/Common_Demo_Source/Minimal</name>\r
+                       <type>6</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-alt*.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1394031827245</id>\r
+                       <name>Source/Common_Demo_Source/Minimal</name>\r
+                       <type>6</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-com*.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1394031827261</id>\r
+                       <name>Source/Common_Demo_Source/Minimal</name>\r
+                       <type>6</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-cr*.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1394031827261</id>\r
+                       <name>Source/Common_Demo_Source/Minimal</name>\r
+                       <type>6</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-IntQueue.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
+               <filter>\r
+                       <id>1394031827276</id>\r
+                       <name>Source/Common_Demo_Source/Minimal</name>\r
+                       <type>6</type>\r
+                       <matcher>\r
+                               <id>org.eclipse.ui.ide.multiFilter</id>\r
+                               <arguments>1.0-name-matches-false-false-sp_flop.c</arguments>\r
+                       </matcher>\r
+               </filter>\r
                <filter>\r
                        <id>1393853702360</id>\r
                        <name>Source/FreeRTOS_Source/portable</name>\r
index b370b3d7315f90f37fd9aed1a259dbbeb44a3586..bfb27922e569ee57834097781830eb1f2d460b3f 100644 (file)
@@ -83,7 +83,7 @@
 \r
 #define configUSE_PREEMPTION                   1\r
 #define configUSE_IDLE_HOOK                            1\r
-#define configUSE_TICK_HOOK                            0\r
+#define configUSE_TICK_HOOK                            1\r
 #define configCPU_CLOCK_HZ                             ( 120000000UL ) /*_RB_ guess*/\r
 #define configPERIPHERAL_CLOCK_HZ              ( 60000000UL ) /*_RB_ guess*/\r
 #define configTICK_RATE_HZ                             ( ( TickType_t ) 1000 )\r
 #define configQUEUE_REGISTRY_SIZE              0\r
 #define configUSE_MALLOC_FAILED_HOOK   1\r
 #define configUSE_APPLICATION_TASK_TAG 0\r
-\r
+#define configUSE_QUEUE_SETS                   1\r
+#define configUSE_COUNTING_SEMAPHORES  1\r
 #define configMAX_PRIORITIES                   ( 7 )\r
 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
 \r
 /* Software timer definitions. */\r
 #define configUSE_TIMERS                               1\r
-#define configTIMER_TASK_PRIORITY              ( 3 )\r
+#define configTIMER_TASK_PRIORITY              ( configMAX_PRIORITIES - 1 )\r
 #define configTIMER_QUEUE_LENGTH               5\r
 #define configTIMER_TASK_STACK_DEPTH   ( configMINIMAL_STACK_SIZE )\r
 \r
@@ -138,6 +139,7 @@ to exclude the API function. */
 #define INCLUDE_uxTaskGetStackHighWaterMark    1\r
 #define INCLUDE_xTaskGetSchedulerState         1\r
 #define INCLUDE_eTaskGetState                          1\r
+#define INCLUDE_xTimerPendFunctionCall         1\r
 \r
 void vAssertCalled( void );\r
 #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled()\r
diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/RegTest.src
new file mode 100644 (file)
index 0000000..27cc31e
--- /dev/null
@@ -0,0 +1,238 @@
+;/*\r
+;    FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+;    All rights reserved\r
+;\r
+;    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+;\r
+;    ***************************************************************************\r
+;     *                                                                       *\r
+;     *    FreeRTOS provides completely free yet professionally developed,    *\r
+;     *    robust, strictly quality controlled, supported, and cross          *\r
+;     *    platform software that has become a de facto standard.             *\r
+;     *                                                                       *\r
+;     *    Help yourself get started quickly and support the FreeRTOS         *\r
+;     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+;     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+;     *                                                                       *\r
+;     *    Thank you!                                                         *\r
+;     *                                                                       *\r
+;    ***************************************************************************\r
+;\r
+;    This file is part of the FreeRTOS distribution.\r
+;\r
+;    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+;    the terms of the GNU General Public License (version 2) as published by the\r
+;    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+;\r
+;    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+;    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+;    >>! the source code for proprietary components outside of the FreeRTOS\r
+;    >>! kernel.\r
+;\r
+;    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+;    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+;    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+;    link: http://www.freertos.org/a00114.html\r
+;\r
+;    1 tab == 4 spaces!\r
+;\r
+;    ***************************************************************************\r
+;     *                                                                       *\r
+;     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+;     *    not run, what could be wrong?"                                     *\r
+;     *                                                                       *\r
+;     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+;     *                                                                       *\r
+;    ***************************************************************************\r
+;\r
+;    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+;    license and Real Time Engineers Ltd. contact details.;\r
+;\r
+;    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+;    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+;    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+;\r
+;    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+;    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+;    licenses offer ticketed support, indemnification and middleware.\r
+;\r
+;    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+;    engineered and independently SIL3 certified version for use in safety and\r
+;    mission critical applications that require provable dependability.\r
+;\r
+;    1 tab == 4 spaces!\r
+;*/\r
+\r
+       .GLB _vRegTest1Implementation\r
+       .GLB _vRegTest2Implementation\r
+\r
+       .GLB _ulRegTest1LoopCounter\r
+       .GLB _ulRegTest2LoopCounter\r
+\r
+       .SECTION   P,CODE\r
+\r
+\r
+;/* This function is explained in the comments at the top of main.c. */\r
+_vRegTest1Implementation:\r
+\r
+       ;/* Put a known value in each register. */\r
+       MOV.L   #1, R1\r
+       MOV.L   #2, R2\r
+       MOV.L   #3, R3\r
+       MOV.L   #4, R4\r
+       MOV.L   #5, R5\r
+       MOV.L   #6, R6\r
+       MOV.L   #7, R7\r
+       MOV.L   #8, R8\r
+       MOV.L   #9, R9\r
+       MOV.L   #10, R10\r
+       MOV.L   #11, R11\r
+       MOV.L   #12, R12\r
+       MOV.L   #13, R13\r
+       MOV.L   #14, R14\r
+       MOV.L   #15, R15\r
+       \r
+       ;/* Loop, checking each itteration that each register still contains the\r
+       ;expected value. */\r
+TestLoop1:                                                             \r
+\r
+       ;/* Push the registers that are going to get clobbered. */\r
+       PUSHM   R14-R15                                         \r
+       \r
+       ;/* Increment the loop counter to show this task is still getting CPU time. */\r
+       MOV.L   #_ulRegTest1LoopCounter, R14\r
+       MOV.L   [ R14 ], R15\r
+       ADD     #1, R15                                         \r
+       MOV.L   R15, [ R14 ]\r
+       \r
+       ;/* Yield to extend the text coverage.  Set the bit in the ITU SWINTR register. */\r
+       MOV.L   #1, R14\r
+       MOV.L   #0872E0H, R15\r
+       MOV.B   R14, [R15]\r
+       NOP                                                             \r
+       NOP                                                             \r
+       \r
+       ;/* Restore the clobbered registers. */\r
+       POPM    R14-R15                                         \r
+       \r
+       ;/* Now compare each register to ensure it still contains the value that was\r
+       ;set before this loop was entered. */\r
+       CMP     #1, R1                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #2, R2                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #3, R3                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #4, R4                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #5, R5                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #6, R6                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #7, R7                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #8, R8                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #9, R9                                          \r
+       BNE     RegTest1Error                           \r
+       CMP     #10, R10                                        \r
+       BNE     RegTest1Error                           \r
+       CMP     #11, R11                                        \r
+       BNE     RegTest1Error                           \r
+       CMP     #12, R12                                        \r
+       BNE     RegTest1Error                           \r
+       CMP     #13, R13                                        \r
+       BNE     RegTest1Error                           \r
+       CMP     #14, R14                                        \r
+       BNE     RegTest1Error                           \r
+       CMP     #15, R15                                        \r
+       BNE     RegTest1Error                           \r
+\r
+       ;/* All comparisons passed, start a new itteratio of this loop. */\r
+       BRA             TestLoop1                               \r
+       \r
+RegTest1Error:                                                 \r
+       ;/* A compare failed, just loop here so the loop counter stops incrementing\r
+       ;- causing the check task to indicate the error. */\r
+       BRA RegTest1Error                                       \r
+;/*-----------------------------------------------------------*/\r
+\r
+;/* This function is explained in the comments at the top of main.c. */\r
+_vRegTest2Implementation:\r
+\r
+       ;/* Put a known value in each register. */\r
+       MOV.L   #10H, R1\r
+       MOV.L   #20H, R2\r
+       MOV.L   #30H, R3\r
+       MOV.L   #40H, R4\r
+       MOV.L   #50H, R5\r
+       MOV.L   #60H, R6\r
+       MOV.L   #70H, R7\r
+       MOV.L   #80H, R8\r
+       MOV.L   #90H, R9\r
+       MOV.L   #100H, R10\r
+       MOV.L   #110H, R11\r
+       MOV.L   #120H, R12\r
+       MOV.L   #130H, R13\r
+       MOV.L   #140H, R14\r
+       MOV.L   #150H, R15\r
+       \r
+       ;/* Loop, checking each itteration that each register still contains the\r
+       ;expected value. */\r
+TestLoop2:                                                             \r
+\r
+       ;/* Push the registers that are going to get clobbered. */\r
+       PUSHM   R14-R15                                         \r
+       \r
+       ;/* Increment the loop counter to show this task is still getting CPU time. */\r
+       MOV.L   #_ulRegTest2LoopCounter, R14\r
+       MOV.L   [ R14 ], R15\r
+       ADD     #1, R15                                         \r
+       MOV.L   R15, [ R14 ]\r
+       \r
+       ;/* Restore the clobbered registers. */\r
+       POPM    R14-R15                                         \r
+       \r
+       ;/* Now compare each register to ensure it still contains the value that was\r
+       ;set before this loop was entered. */\r
+       CMP     #10H, R1                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #20H, R2                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #30H, R3                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #40H, R4                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #50H, R5                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #60H, R6                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #70H, R7                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #80H, R8                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #90H, R9                                        \r
+       BNE     RegTest2Error                           \r
+       CMP     #100H, R10                                      \r
+       BNE     RegTest2Error                           \r
+       CMP     #110H, R11                                      \r
+       BNE     RegTest2Error                           \r
+       CMP     #120H, R12                                      \r
+       BNE     RegTest2Error                           \r
+       CMP     #130H, R13                                      \r
+       BNE     RegTest2Error                           \r
+       CMP     #140H, R14                                      \r
+       BNE     RegTest2Error                           \r
+       CMP     #150H, R15                                      \r
+       BNE     RegTest2Error                           \r
+\r
+       ;/* All comparisons passed, start a new itteratio of this loop. */\r
+       BRA     TestLoop2                                       \r
+       \r
+RegTest2Error:                                                 \r
+       ;/* A compare failed, just loop here so the loop counter stops incrementing\r
+       ;- causing the check task to indicate the error. */\r
+       BRA RegTest2Error                                       \r
+\r
+       \r
+       .END\r
index 9dbd3b13b74ab7ab63b360c96424b959e1b20577..4c51843c5ba72eabace08f0689e9178182007634 100644 (file)
 #include "semphr.h"\r
 \r
 /* Standard demo includes. */\r
-//#include "partest.h"\r
-//#include "TimerDemo.h"\r
-//#include "QueueOverwrite.h"\r
-//#include "EventGroupsDemo.h"\r
+#include "partest.h"\r
+#include "TimerDemo.h"\r
+#include "QueueOverwrite.h"\r
+#include "EventGroupsDemo.h"\r
 \r
 /* Renesas includes. */\r
 #include "r_cg_macrodriver.h"\r
-//#include "r_cg_cgc.h"\r
-//#include "r_cg_cmt.h"\r
-//#include "r_cg_userdefine.h"\r
 \r
 /* Set option bytes */\r
 #pragma address OFS0_location = 0xFFFFFF8CUL\r
@@ -106,7 +103,7 @@ volatile const uint32_t OFS1_location = 0xFFFFFFFFUL;
 \r
 /* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
 or 0 to run the more comprehensive test and demo application. */\r
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     1\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     0\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -251,6 +248,11 @@ volatile unsigned long ul = 0;
 This allows the application to choose the tick interrupt source. */\r
 void vApplicationSetupTimerInterrupt( void )\r
 {\r
+const uint32_t ulEnableRegisterWrite = 0xA50BUL, ulDisableRegisterWrite = 0xA500UL;\r
+\r
+    /* Disable register write protection. */\r
+    SYSTEM.PRCR.WORD = ulEnableRegisterWrite;\r
+\r
        /* Enable compare match timer 0. */\r
        MSTP( CMT0 ) = 0;\r
 \r
@@ -271,5 +273,8 @@ void vApplicationSetupTimerInterrupt( void )
 \r
        /* Start the timer. */\r
        CMT.CMSTR0.BIT.STR0 = 1;\r
+\r
+    /* Reneable register protection. */\r
+    SYSTEM.PRCR.WORD = ulDisableRegisterWrite;\r
 }\r
 /*-----------------------------------------------------------*/\r
index b84f2a02005f30bf41d768f5aba8e7cc27ee5748..9c39e72b9eaba3f1b998bd57c504830127c62289 100644 (file)
@@ -182,7 +182,7 @@ void main_blinky( void )
 static void prvQueueSendTask( void *pvParameters )\r
 {\r
 TickType_t xNextWakeTime;\r
-const unsigned long ulValueToSend = 100UL;\r
+const uint32_t ulValueToSend = 100UL;\r
 \r
        /* Remove compiler warning about unused parameter. */\r
        ( void ) pvParameters;\r
@@ -204,10 +204,12 @@ const unsigned long ulValueToSend = 100UL;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+volatile uint32_t ulRxEvents = 0;\r
+\r
 static void prvQueueReceiveTask( void *pvParameters )\r
 {\r
-unsigned long ulReceivedValue;\r
-const unsigned long ulExpectedValue = 100UL;\r
+uint32_t ulReceivedValue;\r
+const uint32_t ulExpectedValue = 100UL;\r
 \r
        /* Remove compiler warning about unused parameter. */\r
        ( void ) pvParameters;\r
@@ -225,6 +227,7 @@ const unsigned long ulExpectedValue = 100UL;
                {\r
                        vParTestToggleLED( mainTASK_LED );\r
                        ulReceivedValue = 0U;\r
+                       ulRxEvents++;\r
                }\r
        }\r
 }\r
diff --git a/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c b/FreeRTOS/Demo/RX600_RX64M_RSK_Renesas_e2studio/Source/main_full.c
new file mode 100644 (file)
index 0000000..075430e
--- /dev/null
@@ -0,0 +1,491 @@
+/*\r
+    FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+    All rights reserved\r
+\r
+    VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that has become a de facto standard.             *\r
+     *                                                                       *\r
+     *    Help yourself get started quickly and support the FreeRTOS         *\r
+     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
+     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
+     *                                                                       *\r
+     *    Thank you!                                                         *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    This file is part of the FreeRTOS distribution.\r
+\r
+    FreeRTOS is free software; you can redistribute it and/or modify it under\r
+    the terms of the GNU General Public License (version 2) as published by the\r
+    Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+    >>! a combined work that includes FreeRTOS without being obliged to provide\r
+    >>! the source code for proprietary components outside of the FreeRTOS\r
+    >>! kernel.\r
+\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    link: http://www.freertos.org/a00114.html\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    ***************************************************************************\r
+     *                                                                       *\r
+     *    Having a problem?  Start by reading the FAQ "My application does   *\r
+     *    not run, what could be wrong?"                                     *\r
+     *                                                                       *\r
+     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *                                                                       *\r
+    ***************************************************************************\r
+\r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+    license and Real Time Engineers Ltd. contact details.\r
+\r
+    http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+    including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+    compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and middleware.\r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
+    mission critical applications that require provable dependability.\r
+\r
+    1 tab == 4 spaces!\r
+*/\r
+\r
+/******************************************************************************\r
+ * NOTE 1:  This project provides two demo applications.  A simple blinky style\r
+ * project, and a more comprehensive test and demo application.  The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
+ * between the two.  See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
+ * in main.c.  This file implements the comprehensive test and demo version.\r
+ *\r
+ * NOTE 2:  This file only contains the source code that is specific to the\r
+ * full demo.  Generic functions, such FreeRTOS hook functions, and functions\r
+ * required to configure the hardware, are defined in main.c.\r
+ *\r
+ ******************************************************************************\r
+ *\r
+ * main_full() creates all the demo application tasks and software timers, then\r
+ * starts the scheduler.  The web documentation provides more details of the\r
+ * standard demo application tasks, which provide no particular functionality,\r
+ * but do provide a good example of how to use the FreeRTOS API.\r
+ *\r
+ * In addition to the standard demo tasks, the following tasks and tests are\r
+ * defined and/or created within this file:\r
+ *\r
+ * FreeRTOS+CLI command console.  The command console is access through the\r
+ * UART to USB connector on the ZC702 Zynq development board (marked J2).  For\r
+ * reasons of robustness testing the UART driver is deliberately written to be\r
+ * inefficient and should not be used as a template for a production driver.\r
+ * Type "help" to see a list of registered commands.  The FreeRTOS+CLI license\r
+ * is different to the FreeRTOS license, see http://www.FreeRTOS.org/cli for\r
+ * license and usage details.  The default baud rate is 115200.\r
+ *\r
+ * "Reg test" tasks - These fill both the core and floating point registers with\r
+ * known values, then check that each register maintains its expected value for\r
+ * the lifetime of the task.  Each task uses a different set of values.  The reg\r
+ * test tasks execute with a very low priority, so get preempted very\r
+ * frequently.  A register containing an unexpected value is indicative of an\r
+ * error in the context switching mechanism.\r
+ *\r
+ * "Check" task - The check task period is initially set to three seconds.  The\r
+ * task checks that all the standard demo tasks, and the register check tasks,\r
+ * are not only still executing, but are executing without reporting any errors.\r
+ * If the check task discovers that a task has either stalled, or reported an\r
+ * error, then it changes its own execution period from the initial three\r
+ * seconds, to just 200ms.  The check task also toggles an LED each time it is\r
+ * called.  This provides a visual indication of the system status:  If the LED\r
+ * toggles every three seconds, then no issues have been discovered.  If the LED\r
+ * toggles every 200ms, then an issue has been discovered with at least one\r
+ * task.\r
+ */\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+\r
+/* Kernel includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "timers.h"\r
+#include "semphr.h"\r
+\r
+/* Standard demo application includes. */\r
+#include "flop.h"\r
+#include "semtest.h"\r
+#include "dynamic.h"\r
+#include "BlockQ.h"\r
+#include "blocktim.h"\r
+#include "countsem.h"\r
+#include "GenQTest.h"\r
+#include "recmutex.h"\r
+#include "death.h"\r
+#include "partest.h"\r
+#include "comtest2.h"\r
+#include "serial.h"\r
+#include "TimerDemo.h"\r
+#include "QueueOverwrite.h"\r
+#include "IntQueue.h"\r
+#include "EventGroupsDemo.h"\r
+\r
+/* Priorities for the demo application tasks. */\r
+#define mainSEM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 1UL )\r
+#define mainBLOCK_Q_PRIORITY                           ( tskIDLE_PRIORITY + 2UL )\r
+#define mainCREATOR_TASK_PRIORITY                      ( tskIDLE_PRIORITY + 3UL )\r
+#define mainFLOP_TASK_PRIORITY                         ( tskIDLE_PRIORITY )\r
+#define mainUART_COMMAND_CONSOLE_STACK_SIZE    ( configMINIMAL_STACK_SIZE * 3UL )\r
+#define mainCOM_TEST_TASK_PRIORITY                     ( tskIDLE_PRIORITY + 2 )\r
+#define mainCHECK_TASK_PRIORITY                                ( configMAX_PRIORITIES - 1 )\r
+#define mainQUEUE_OVERWRITE_PRIORITY           ( tskIDLE_PRIORITY )\r
+\r
+/* The priority used by the UART command console task. */\r
+#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )\r
+\r
+/* The LED used by the check timer. */\r
+#define mainCHECK_LED                                          ( 0 )\r
+\r
+/* A block time of zero simply means "don't block". */\r
+#define mainDONT_BLOCK                                         ( 0UL )\r
+\r
+/* The period after which the check timer will expire, in ms, provided no errors\r
+have been reported by any of the standard demo tasks.  ms are converted to the\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainNO_ERROR_CHECK_TASK_PERIOD         ( 3000UL / portTICK_PERIOD_MS )\r
+\r
+/* The period at which the check timer will expire, in ms, if an error has been\r
+reported in one of the standard demo tasks.  ms are converted to the equivalent\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TASK_PERIOD            ( 200UL / portTICK_PERIOD_MS )\r
+\r
+/* Parameters that are passed into the register check tasks solely for the\r
+purpose of ensuring parameters are passed into tasks correctly. */\r
+#define mainREG_TEST_TASK_1_PARAMETER          ( ( void * ) 0x12345678 )\r
+#define mainREG_TEST_TASK_2_PARAMETER          ( ( void * ) 0x87654321 )\r
+\r
+/* The base period used by the timer test tasks. */\r
+#define mainTIMER_TEST_PERIOD                          ( 50 )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Called by main() to run the full demo (as opposed to the blinky demo) when\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
+ */\r
+void main_full( void );\r
+\r
+/*\r
+ * The check task, as described at the top of this file.\r
+ */\r
+static void prvCheckTask( void *pvParameters );\r
+\r
+/*\r
+ * Register check tasks, and the tasks used to write over and check the contents\r
+ * of the FPU registers, as described at the top of this file.  The nature of\r
+ * these files necessitates that they are written in an assembly file, but the\r
+ * entry points are kept in the C file for the convenience of checking the task\r
+ * parameter.\r
+ */\r
+static void prvRegTestTaskEntry1( void *pvParameters );\r
+extern void vRegTest1Implementation( void );\r
+static void prvRegTestTaskEntry2( void *pvParameters );\r
+extern void vRegTest2Implementation( void );\r
+\r
+/*\r
+ * Register commands that can be used with FreeRTOS+CLI.  The commands are\r
+ * defined in CLI-Commands.c and File-Related-CLI-Command.c respectively.\r
+ */\r
+extern void vRegisterSampleCLICommands( void );\r
+\r
+/*\r
+ * The task that manages the FreeRTOS+CLI input and output.\r
+ */\r
+extern void vUARTCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority );\r
+\r
+/*\r
+ * A high priority task that does nothing other than execute at a pseudo random\r
+ * time to ensure the other test tasks don't just execute in a repeating\r
+ * pattern.\r
+ */\r
+static void prvPseudoRandomiser( void *pvParameters );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The following two variables are used to communicate the status of the\r
+register check tasks to the check task.  If the variables keep incrementing,\r
+then the register check tasks has not discovered any errors.  If a variable\r
+stops incrementing, then an error has been found. */\r
+volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void main_full( void )\r
+{\r
+       /* Start all the other standard demo/test tasks.  They have not particular\r
+       functionality, but do demonstrate how to use the FreeRTOS API and test the\r
+       kernel port. */\r
+//     vStartInterruptQueueTasks();\r
+       vStartDynamicPriorityTasks();\r
+       vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );\r
+       vCreateBlockTimeTasks();\r
+       vStartCountingSemaphoreTasks();\r
+       vStartGenericQueueTasks( tskIDLE_PRIORITY );\r
+       vStartRecursiveMutexTasks();\r
+       vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
+       vStartMathTasks( mainFLOP_TASK_PRIORITY );\r
+       vStartTimerDemoTask( mainTIMER_TEST_PERIOD );\r
+       vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );\r
+       vStartEventGroupTasks();\r
+\r
+       /* Start the tasks that implements the command console on the UART, as\r
+       described above. */\r
+//     vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY );\r
+\r
+       /* Register the standard CLI commands. */\r
+//     vRegisterSampleCLICommands();\r
+\r
+       /* Create the register check tasks, as described at the top of this     file */\r
+       xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL );\r
+       xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL );\r
+\r
+       /* Create the task that just adds a little random behaviour. */\r
+       xTaskCreate( prvPseudoRandomiser, "Rnd", configMINIMAL_STACK_SIZE, NULL, configMAX_PRIORITIES - 1, NULL );\r
+\r
+       /* Create the task that performs the 'check' functionality,     as described at\r
+       the top of this file. */\r
+       xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+\r
+       /* The set of tasks created by the following function call have to be\r
+       created last as they keep account of the number of tasks they expect to see\r
+       running. */\r
+       vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );\r
+\r
+       /* Start the scheduler. */\r
+       vTaskStartScheduler();\r
+\r
+       /* If all is well, the scheduler will now be running, and the following\r
+       line will never be reached.  If the following line does execute, then\r
+       there was either insufficient FreeRTOS heap memory available for the idle\r
+       and/or timer tasks to be created, or vTaskStartScheduler() was called from\r
+       User mode.  See the memory management section on the FreeRTOS web site for\r
+       more details on the FreeRTOS heap http://www.freertos.org/a00111.html.  The\r
+       mode from which main() is called is set in the C start up code and must be\r
+       a privileged mode (not user mode). */\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvCheckTask( void *pvParameters )\r
+{\r
+TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;\r
+TickType_t xLastExecutionTime;\r
+static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
+unsigned long ulErrorFound = pdFALSE;\r
+\r
+       /* Just to stop compiler warnings. */\r
+       ( void ) pvParameters;\r
+\r
+       /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
+       works correctly. */\r
+       xLastExecutionTime = xTaskGetTickCount();\r
+\r
+       /* Cycle for ever, delaying then checking all the other tasks are still\r
+       operating without error.  The onboard LED is toggled on each iteration.\r
+       If an error is detected then the delay period is decreased from\r
+       mainNO_ERROR_CHECK_TASK_PERIOD to mainERROR_CHECK_TASK_PERIOD.  This has the\r
+       effect of increasing the rate at which the onboard LED toggles, and in so\r
+       doing gives visual feedback of the system status. */\r
+       for( ;; )\r
+       {\r
+               /* Delay until it is time to execute again. */\r
+               vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );\r
+\r
+               /* Check all the demo tasks (other than the flash tasks) to ensure\r
+               that they are all still running, and that none have detected an error. */\r
+//             if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
+               {\r
+//                     ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xAreMathsTaskStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if ( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if ( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if ( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xIsCreateTaskStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xIsQueueOverwriteTaskStillRunning() != pdPASS )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               if( xAreEventGroupTasksStillRunning() != pdPASS )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+\r
+               /* Check that the register test 1 task is still running. */\r
+               if( ulLastRegTest1Value == ulRegTest1LoopCounter )\r
+               {\r
+                       ulErrorFound = pdTRUE;\r
+               }\r
+               ulLastRegTest1Value = ulRegTest1LoopCounter;\r
+\r
+               /* Check that the register test 2 task is still running. */\r
+               if( ulLastRegTest2Value == ulRegTest2LoopCounter )\r
+               {\r
+//                     ulErrorFound = pdTRUE;\r
+               }\r
+               ulLastRegTest2Value = ulRegTest2LoopCounter;\r
+\r
+               /* Toggle the check LED to give an indication of the system status.  If\r
+               the LED toggles every mainNO_ERROR_CHECK_TASK_PERIOD milliseconds then\r
+               everything is ok.  A faster toggle indicates an error. */\r
+               vParTestToggleLED( mainCHECK_LED );\r
+\r
+               if( ulErrorFound != pdFALSE )\r
+               {\r
+                       /* An error has been detected in one of the tasks - flash the LED\r
+                       at a higher frequency to give visible feedback that something has\r
+                       gone wrong (it might just be that the loop back connector required\r
+                       by the comtest tasks has not been fitted). */\r
+                       xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;\r
+               }\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTaskEntry1( void *pvParameters )\r
+{\r
+       /* Although the regtest task is written in assembler, its entry point is\r
+       written in C for convenience of checking the task parameter is being passed\r
+       in correctly. */\r
+       if( pvParameters == mainREG_TEST_TASK_1_PARAMETER )\r
+       {\r
+               /* The reg test task also tests the floating point registers.  Tasks\r
+               that use the floating point unit must call vPortTaskUsesFPU() before\r
+               any floating point instructions are executed. */\r
+//             vPortTaskUsesFPU();\r
+\r
+               /* Start the part of the test that is written in assembler. */\r
+               vRegTest1Implementation();\r
+       }\r
+\r
+       /* The following line will only execute if the task parameter is found to\r
+       be incorrect.  The check timer will detect that the regtest loop counter is\r
+       not being incremented and flag an error. */\r
+       vTaskDelete( NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTestTaskEntry2( void *pvParameters )\r
+{\r
+       /* Although the regtest task is written in assembler, its entry point is\r
+       written in C for convenience of checking the task parameter is being passed\r
+       in correctly. */\r
+       if( pvParameters == mainREG_TEST_TASK_2_PARAMETER )\r
+       {\r
+               /* The reg test task also tests the floating point registers.  Tasks\r
+               that use the floating point unit must call vPortTaskUsesFPU() before\r
+               any floating point instructions are executed. */\r
+//             vPortTaskUsesFPU();\r
+\r
+               /* Start the part of the test that is written in assembler. */\r
+               vRegTest2Implementation();\r
+       }\r
+\r
+       /* The following line will only execute if the task parameter is found to\r
+       be incorrect.  The check timer will detect that the regtest loop counter is\r
+       not being incremented and flag an error. */\r
+       vTaskDelete( NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvPseudoRandomiser( void *pvParameters )\r
+{\r
+const uint32_t ulMultiplier = 0x015a4e35UL, ulIncrement = 1UL, ulMinDelay = ( 35 / portTICK_PERIOD_MS );\r
+volatile uint32_t ulNextRand = ( uint32_t ) &pvParameters, ulValue;\r
+\r
+       /* This task does nothing other than ensure there is a little bit of\r
+       disruption in the scheduling pattern of the other tasks.  Normally this is\r
+       done by generating interrupts at pseudo random times. */\r
+       for( ;; )\r
+       {\r
+               ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement;\r
+               ulValue = ( ulNextRand >> 16UL ) & 0xffUL;\r
+\r
+               if( ulValue < ulMinDelay )\r
+               {\r
+                       ulValue = ulMinDelay;\r
+               }\r
+\r
+               vTaskDelay( ulValue );\r
+\r
+               while( ulValue > 0 )\r
+               {\r
+                       nop();\r
+                       nop();\r
+                       nop();\r
+\r
+                       ulValue--;\r
+               }\r
+       }\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r