]> git.sur5r.net Git - freertos/blob - Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/main.c
PPC405 work in progress.
[freertos] / Demo / PPC405_Xilinx_Virtex4_GCC / RTOSDemo / main.c
1 /*\r
2         FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.\r
3 \r
4         This file is part of the FreeRTOS.org distribution.\r
5 \r
6         FreeRTOS.org is free software; you can redistribute it and/or modify\r
7         it under the terms of the GNU General Public License as published by\r
8         the Free Software Foundation; either version 2 of the License, or\r
9         (at your option) any later version.\r
10 \r
11         FreeRTOS.org is distributed in the hope that it will be useful,\r
12         but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14         GNU General Public License for more details.\r
15 \r
16         You should have received a copy of the GNU General Public License\r
17         along with FreeRTOS.org; if not, write to the Free Software\r
18         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
19 \r
20         A special exception to the GPL can be applied should you wish to distribute\r
21         a combined work that includes FreeRTOS.org, without being obliged to provide\r
22         the source code for any proprietary components.  See the licensing section\r
23         of http://www.FreeRTOS.org for full details of how and when the exception\r
24         can be applied.\r
25 \r
26         ***************************************************************************\r
27 \r
28         Please ensure to read the configuration and relevant port sections of the \r
29         online documentation.\r
30 \r
31         +++ http://www.FreeRTOS.org +++\r
32         Documentation, latest information, license and contact details.  \r
33 \r
34         +++ http://www.SafeRTOS.com +++\r
35         A version that is certified for use in safety critical systems.\r
36 \r
37         +++ http://www.OpenRTOS.com +++\r
38         Commercial support, development, porting, licensing and training services.\r
39 \r
40         ***************************************************************************\r
41 */\r
42 \r
43 /*\r
44  * Creates all the demo application tasks, then starts the scheduler.  The WEB\r
45  * documentation provides more details of the demo application tasks.\r
46  * \r
47  * In addition to the standard demo tasks, the follow demo specific tasks are\r
48  * create:\r
49  *\r
50  * The "Check" task.  This only executes every three seconds but has the highest \r
51  * priority so is guaranteed to get processor time.  Its main function is to \r
52  * check that all the other tasks are still operational.  Most tasks maintain \r
53  * a unique count that is incremented each time the task successfully completes \r
54  * its function.  Should any error occur within such a task the count is \r
55  * permanently halted.  The check task inspects the count of each task to ensure \r
56  * it has changed since the last time the check task executed.  If all the count \r
57  * variables have changed all the tasks are still executing error free, and the \r
58  * check task toggles the onboard LED.  Should any task contain an error at any time \r
59  * the LED toggle rate will change from 3 seconds to 500ms.\r
60  *\r
61  */\r
62 \r
63 \r
64 /* Scheduler includes. */\r
65 #include "FreeRTOS.h"\r
66 #include "task.h"\r
67 #include "flash.h"\r
68 #include "integer.h"\r
69 #include "comtest2.h"\r
70 #include "semtest.h"\r
71 #include "BlockQ.h"\r
72 #include "dynamic.h"\r
73 #include "flop.h"\r
74 #include "GenQTest.h"\r
75 #include "QPeek.h"\r
76 #include "blocktim.h"\r
77 #include "death.h"\r
78 #include "partest.h"\r
79 #include "xcache_l.h"\r
80 #include "xintc.h"\r
81 \r
82 #define mainCHECK_TASK_PRIORITY                 ( tskIDLE_PRIORITY + 4 )\r
83 #define mainSEM_TEST_PRIORITY                   ( tskIDLE_PRIORITY + 3 )\r
84 #define mainCOM_TEST_PRIORITY                   ( tskIDLE_PRIORITY + 2 )\r
85 #define mainQUEUE_BLOCK_PRIORITY                ( tskIDLE_PRIORITY + 2 )\r
86 #define mainDEATH_PRIORITY                              ( tskIDLE_PRIORITY + 1 )\r
87 #define mainLED_TASK_PRIORITY                   ( tskIDLE_PRIORITY + 1 )\r
88 #define mainGENERIC_QUEUE_PRIORITY              ( tskIDLE_PRIORITY )\r
89 \r
90 #define mainCOM_TEST_BAUD_RATE                  ( 115200UL )\r
91 #define mainCOM_TEST_LED                                ( 4 )\r
92 \r
93 #define mainNO_ERROR_CHECK_DELAY                ( ( portTickType ) 3000 / portTICK_RATE_MS  )\r
94 #define mainERROR_CHECK_DELAY                   ( ( portTickType ) 500 / portTICK_RATE_MS  )\r
95 \r
96 #define mainCHECK_TEST_LED              ( 3 )\r
97 \r
98 static void prvRegTestTask1( void *pvParameters );\r
99 static void prvRegTestTask2( void *pvParameters );\r
100 static void prvFlashTask( void *pvParameters );\r
101 static void prvErrorChecks( void *pvParameters );\r
102 \r
103 static unsigned portBASE_TYPE xRegTestStatus = pdPASS;\r
104 static portSHORT prvCheckOtherTasksAreStillRunning( void );\r
105 \r
106 XIntc xInterruptController;\r
107 extern void vPortISRWrapper( void );\r
108 \r
109 int main( void )\r
110 {\r
111         XCache_EnableICache( 0x80000000 );\r
112         XCache_EnableDCache( 0x80000000 );\r
113 \r
114         XExc_Init();\r
115         XExc_mDisableExceptions( XEXC_NON_CRITICAL );\r
116     XExc_RegisterHandler( XEXC_ID_NON_CRITICAL_INT, (XExceptionHandler)vPortISRWrapper, &xInterruptController );\r
117 \r
118         XIntc_Initialize( &xInterruptController, XPAR_OPB_INTC_0_DEVICE_ID );\r
119         XIntc_Start( &xInterruptController, XIN_REAL_MODE );\r
120 \r
121         vParTestInitialise();\r
122 \r
123         /* Start the standard demo application tasks. */\r
124         vStartLEDFlashTasks( mainLED_TASK_PRIORITY );   \r
125         vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
126         vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );\r
127         vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
128         vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY );  \r
129         vStartDynamicPriorityTasks();   \r
130         vStartMathTasks( tskIDLE_PRIORITY );    \r
131         vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );\r
132         vStartQueuePeekTasks();\r
133         vCreateBlockTimeTasks();\r
134 \r
135         xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
136         xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
137         xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
138 \r
139         /* The suicide tasks must be started last as they record the number of other\r
140         tasks that exist within the system.  The value is then used to ensure at run\r
141         time the number of tasks that exists is within expected bounds. */\r
142         vCreateSuicidalTasks( mainDEATH_PRIORITY );\r
143 \r
144         /* Now start the scheduler.  Following this call the created tasks should\r
145         be executing. */        \r
146         vTaskStartScheduler( );\r
147         \r
148         /* vTaskStartScheduler() will only return if an error occurs while the \r
149         idle task is being created. */\r
150         for( ;; );\r
151 \r
152         return 0;\r
153 }\r
154 \r
155 static portSHORT prvCheckOtherTasksAreStillRunning( void )\r
156 {\r
157 portBASE_TYPE lReturn = pdPASS;\r
158 \r
159         /* The demo tasks maintain a count that increments every cycle of the task\r
160         provided that the task has never encountered an error.  This function \r
161         checks the counts maintained by the tasks to ensure they are still being\r
162         incremented.  A count remaining at the same value between calls therefore\r
163         indicates that an error has been detected. */\r
164 \r
165         if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
166         {\r
167                 lReturn = pdFAIL;\r
168         }\r
169 \r
170         if( xAreComTestTasksStillRunning() != pdTRUE )\r
171         {\r
172                 lReturn = pdFAIL;\r
173         }\r
174         \r
175         if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
176         {\r
177                 lReturn = pdFAIL;\r
178         }\r
179         \r
180         if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
181         {\r
182                 lReturn = pdFAIL;\r
183         }\r
184         \r
185         if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
186         {\r
187                 lReturn = pdFAIL;\r
188         }\r
189         \r
190         if( xAreMathsTaskStillRunning() != pdTRUE )\r
191         {\r
192                 lReturn = pdFAIL;\r
193         }\r
194         \r
195         if( xIsCreateTaskStillRunning() != pdTRUE )\r
196         {\r
197                 lReturn = pdFAIL;\r
198         }\r
199         \r
200         if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
201         {\r
202                 lReturn = pdFAIL;\r
203         }\r
204         \r
205         if ( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
206         {\r
207                 lReturn = pdFAIL;\r
208         }\r
209         \r
210         if ( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
211         {\r
212                 lReturn = pdFAIL;\r
213         }\r
214 \r
215         /* Have the register test tasks found any errors? */\r
216         if( xRegTestStatus != pdPASS )\r
217         {\r
218                 lReturn = pdFAIL;\r
219         }\r
220 \r
221         return lReturn;\r
222 }\r
223 /*-----------------------------------------------------------*/\r
224 \r
225 static void prvErrorChecks( void *pvParameters )\r
226 {\r
227 portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;\r
228 volatile unsigned portBASE_TYPE uxFreeStack;\r
229 \r
230         uxFreeStack = uxTaskGetStackHighWaterMark( NULL );\r
231 \r
232         /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
233         works correctly. */\r
234         xLastExecutionTime = xTaskGetTickCount();\r
235 \r
236         /* Cycle for ever, delaying then checking all the other tasks are still\r
237         operating without error. */\r
238         for( ;; )\r
239         {\r
240                 uxFreeStack = uxTaskGetStackHighWaterMark( NULL );\r
241 \r
242                 /* Wait until it is time to check again.  The time we wait here depends\r
243                 on whether an error has been detected or not.  When an error is \r
244                 detected the time is shortened resulting in a faster LED flash rate. */\r
245                 /* Perform this check every mainCHECK_DELAY milliseconds. */\r
246                 vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );\r
247 \r
248                 /* See if the other tasks are all ok. */\r
249                 if( prvCheckOtherTasksAreStillRunning() != pdPASS )\r
250                 {\r
251                         /* An error occurred in one of the tasks so shorten the delay \r
252                         period - which has the effect of increasing the frequency of the\r
253                         LED toggle. */\r
254                         xDelayPeriod = mainERROR_CHECK_DELAY;\r
255                 }\r
256 \r
257                 /* Flash! */\r
258                 vParTestToggleLED( mainCHECK_TEST_LED );\r
259         }\r
260 }\r
261 /*-----------------------------------------------------------*/\r
262 \r
263 \r
264 static void prvRegTestTask1( void *pvParameters )\r
265 {\r
266         asm volatile\r
267         (\r
268                 "RegTest1Start:                                 \n\t" \\r
269                 "                                                               \n\t" \\r
270                 "       li              0, 1                            \n\t" \\r
271                 "       li              2, 2                            \n\t" \\r
272                 "       li              3, 3                            \n\t" \\r
273                 "       li              4,      4                               \n\t" \\r
274                 "       li              5,      5                               \n\t" \\r
275                 "       li              6,      6                               \n\t" \\r
276                 "       li              7,      7                               \n\t" \\r
277                 "       li              8,      8                               \n\t" \\r
278                 "       li              9,      9                               \n\t" \\r
279                 "       li              10,     10                              \n\t" \\r
280                 "       li              11,     11                              \n\t" \\r
281                 "       li              12,     12                              \n\t" \\r
282                 "       li              13,     13                              \n\t" \\r
283                 "       li              14,     14                              \n\t" \\r
284                 "       li              15,     15                              \n\t" \\r
285                 "       li              16,     16                              \n\t" \\r
286                 "       li              17,     17                              \n\t" \\r
287                 "       li              18,     18                              \n\t" \\r
288                 "       li              19,     19                              \n\t" \\r
289                 "       li              20,     20                              \n\t" \\r
290                 "       li              21,     21                              \n\t" \\r
291                 "       li              22,     22                              \n\t" \\r
292                 "       li              23,     23                              \n\t" \\r
293                 "       li              24,     24                              \n\t" \\r
294                 "       li              25,     25                              \n\t" \\r
295                 "       li              26,     26                              \n\t" \\r
296                 "       li              27,     27                              \n\t" \\r
297                 "       li              28,     28                              \n\t" \\r
298                 "       li              29,     29                              \n\t" \\r
299                 "       li              30,     30                              \n\t" \\r
300                 "       li              31,     31                              \n\t" \\r
301                 "                                                               \n\t" \\r
302                 "       sc                                                      \n\t" \\r
303                 "       nop                                                     \n\t" \\r
304                 "                                                               \n\t" \\r
305                 "       cmpwi   0, 1                            \n\t" \\r
306                 "       bne             RegTest1Fail            \n\t" \\r
307                 "       cmpwi   2, 2                            \n\t" \\r
308                 "       bne             RegTest1Fail            \n\t" \\r
309                 "       cmpwi   3, 3                            \n\t" \\r
310                 "       bne             RegTest1Fail            \n\t" \\r
311                 "       cmpwi   4, 4                            \n\t" \\r
312                 "       bne             RegTest1Fail            \n\t" \\r
313                 "       cmpwi   5, 5                            \n\t" \\r
314                 "       bne             RegTest1Fail            \n\t" \\r
315                 "       cmpwi   6, 6                            \n\t" \\r
316                 "       bne             RegTest1Fail            \n\t" \\r
317                 "       cmpwi   7, 7                            \n\t" \\r
318                 "       bne             RegTest1Fail            \n\t" \\r
319                 "       cmpwi   8, 8                            \n\t" \\r
320                 "       bne             RegTest1Fail            \n\t" \\r
321                 "       cmpwi   9, 9                            \n\t" \\r
322                 "       bne             RegTest1Fail            \n\t" \\r
323                 "       cmpwi   10, 10                          \n\t" \\r
324                 "       bne             RegTest1Fail            \n\t" \\r
325                 "       cmpwi   11, 11                          \n\t" \\r
326                 "       bne             RegTest1Fail            \n\t" \\r
327                 "       cmpwi   12, 12                          \n\t" \\r
328                 "       bne             RegTest1Fail            \n\t" \\r
329                 "       cmpwi   13, 13                          \n\t" \\r
330                 "       bne             RegTest1Fail            \n\t" \\r
331                 "       cmpwi   14, 14                          \n\t" \\r
332                 "       bne             RegTest1Fail            \n\t" \\r
333                 "       cmpwi   15, 15                          \n\t" \\r
334                 "       bne             RegTest1Fail            \n\t" \\r
335                 "       cmpwi   16, 16                          \n\t" \\r
336                 "       bne             RegTest1Fail            \n\t" \\r
337                 "       cmpwi   17, 17                          \n\t" \\r
338                 "       bne             RegTest1Fail            \n\t" \\r
339                 "       cmpwi   18, 18                          \n\t" \\r
340                 "       bne             RegTest1Fail            \n\t" \\r
341                 "       cmpwi   19, 19                          \n\t" \\r
342                 "       bne             RegTest1Fail            \n\t" \\r
343                 "       cmpwi   20, 20                          \n\t" \\r
344                 "       bne             RegTest1Fail            \n\t" \\r
345                 "       cmpwi   21, 21                          \n\t" \\r
346                 "       bne             RegTest1Fail            \n\t" \\r
347                 "       cmpwi   22, 22                          \n\t" \\r
348                 "       bne             RegTest1Fail            \n\t" \\r
349                 "       cmpwi   23, 23                          \n\t" \\r
350                 "       bne             RegTest1Fail            \n\t" \\r
351                 "       cmpwi   24, 24                          \n\t" \\r
352                 "       bne             RegTest1Fail            \n\t" \\r
353                 "       cmpwi   25, 25                          \n\t" \\r
354                 "       bne             RegTest1Fail            \n\t" \\r
355                 "       cmpwi   26, 26                          \n\t" \\r
356                 "       bne             RegTest1Fail            \n\t" \\r
357                 "       cmpwi   27, 27                          \n\t" \\r
358                 "       bne             RegTest1Fail            \n\t" \\r
359                 "       cmpwi   28, 28                          \n\t" \\r
360                 "       bne             RegTest1Fail            \n\t" \\r
361                 "       cmpwi   29, 29                          \n\t" \\r
362                 "       bne             RegTest1Fail            \n\t" \\r
363                 "       cmpwi   30, 30                          \n\t" \\r
364                 "       bne             RegTest1Fail            \n\t" \\r
365                 "       cmpwi   31, 31                          \n\t" \\r
366                 "       bne             RegTest1Fail            \n\t" \\r
367                 "                                                               \n\t" \\r
368                 "       b RegTest1Start                         \n\t" \\r
369                 "                                                               \n\t" \\r
370                 "RegTest1Fail:                                  \n\t" \\r
371                 "                                                               \n\t" \\r
372                 "       xor             0, 0, 0                         \n\t" \\r
373                 "       stw             0, xRegTestStatus( 0 ) \n\t" \\r
374                 "                                                               \n\t" \\r
375                 "       b RegTest1Start                         \n\t" \\r
376         );\r
377 }\r
378 \r
379 static void prvRegTestTask2( void *pvParameters )\r
380 {\r
381         asm volatile\r
382         (\r
383                 "RegTest2Start:                                 \n\t" \\r
384                 "                                                               \n\t" \\r
385                 "       li              0, 11                           \n\t" \\r
386                 "       li              2, 12                           \n\t" \\r
387                 "       li              3, 13                           \n\t" \\r
388                 "       li              4,      14                              \n\t" \\r
389                 "       li              5,      15                              \n\t" \\r
390                 "       li              6,      16                              \n\t" \\r
391                 "       li              7,      17                              \n\t" \\r
392                 "       li              8,      18                              \n\t" \\r
393                 "       li              9,      19                              \n\t" \\r
394                 "       li              10,     110                             \n\t" \\r
395                 "       li              11,     111                             \n\t" \\r
396                 "       li              12,     112                             \n\t" \\r
397                 "       li              13,     113                             \n\t" \\r
398                 "       li              14,     114                             \n\t" \\r
399                 "       li              15,     115                             \n\t" \\r
400                 "       li              16,     116                             \n\t" \\r
401                 "       li              17,     117                             \n\t" \\r
402                 "       li              18,     118                             \n\t" \\r
403                 "       li              19,     119                             \n\t" \\r
404                 "       li              20,     120                             \n\t" \\r
405                 "       li              21,     121                             \n\t" \\r
406                 "       li              22,     122                             \n\t" \\r
407                 "       li              23,     123                             \n\t" \\r
408                 "       li              24,     124                             \n\t" \\r
409                 "       li              25,     125                             \n\t" \\r
410                 "       li              26,     126                             \n\t" \\r
411                 "       li              27,     127                             \n\t" \\r
412                 "       li              28,     128                             \n\t" \\r
413                 "       li              29,     129                             \n\t" \\r
414                 "       li              30,     130                             \n\t" \\r
415                 "       li              31,     131                             \n\t" \\r
416                 "                                                               \n\t" \\r
417                 "       sc                                                      \n\t" \\r
418                 "       nop                                                     \n\t" \\r
419                 "                                                               \n\t" \\r
420                 "       cmpwi   0, 11                           \n\t" \\r
421                 "       bne             RegTest2Fail            \n\t" \\r
422                 "       cmpwi   2, 12                           \n\t" \\r
423                 "       bne             RegTest2Fail            \n\t" \\r
424                 "       cmpwi   3, 13                           \n\t" \\r
425                 "       bne             RegTest2Fail            \n\t" \\r
426                 "       cmpwi   4, 14                           \n\t" \\r
427                 "       bne             RegTest2Fail            \n\t" \\r
428                 "       cmpwi   5, 15                           \n\t" \\r
429                 "       bne             RegTest2Fail            \n\t" \\r
430                 "       cmpwi   6, 16                           \n\t" \\r
431                 "       bne             RegTest2Fail            \n\t" \\r
432                 "       cmpwi   7, 17                           \n\t" \\r
433                 "       bne             RegTest2Fail            \n\t" \\r
434                 "       cmpwi   8, 18                           \n\t" \\r
435                 "       bne             RegTest2Fail            \n\t" \\r
436                 "       cmpwi   9, 19                           \n\t" \\r
437                 "       bne             RegTest2Fail            \n\t" \\r
438                 "       cmpwi   10, 110                         \n\t" \\r
439                 "       bne             RegTest2Fail            \n\t" \\r
440                 "       cmpwi   11, 111                         \n\t" \\r
441                 "       bne             RegTest2Fail            \n\t" \\r
442                 "       cmpwi   12, 112                         \n\t" \\r
443                 "       bne             RegTest2Fail            \n\t" \\r
444                 "       cmpwi   13, 113                         \n\t" \\r
445                 "       bne             RegTest2Fail            \n\t" \\r
446                 "       cmpwi   14, 114                         \n\t" \\r
447                 "       bne             RegTest2Fail            \n\t" \\r
448                 "       cmpwi   15, 115                         \n\t" \\r
449                 "       bne             RegTest2Fail            \n\t" \\r
450                 "       cmpwi   16, 116                         \n\t" \\r
451                 "       bne             RegTest2Fail            \n\t" \\r
452                 "       cmpwi   17, 117                         \n\t" \\r
453                 "       bne             RegTest2Fail            \n\t" \\r
454                 "       cmpwi   18, 118                         \n\t" \\r
455                 "       bne             RegTest2Fail            \n\t" \\r
456                 "       cmpwi   19, 119                         \n\t" \\r
457                 "       bne             RegTest2Fail            \n\t" \\r
458                 "       cmpwi   20, 120                         \n\t" \\r
459                 "       bne             RegTest2Fail            \n\t" \\r
460                 "       cmpwi   21, 121                         \n\t" \\r
461                 "       bne             RegTest2Fail            \n\t" \\r
462                 "       cmpwi   22, 122                         \n\t" \\r
463                 "       bne             RegTest2Fail            \n\t" \\r
464                 "       cmpwi   23, 123                         \n\t" \\r
465                 "       bne             RegTest2Fail            \n\t" \\r
466                 "       cmpwi   24, 124                         \n\t" \\r
467                 "       bne             RegTest2Fail            \n\t" \\r
468                 "       cmpwi   25, 125                         \n\t" \\r
469                 "       bne             RegTest2Fail            \n\t" \\r
470                 "       cmpwi   26, 126                         \n\t" \\r
471                 "       bne             RegTest2Fail            \n\t" \\r
472                 "       cmpwi   27, 127                         \n\t" \\r
473                 "       bne             RegTest2Fail            \n\t" \\r
474                 "       cmpwi   28, 128                         \n\t" \\r
475                 "       bne             RegTest2Fail            \n\t" \\r
476                 "       cmpwi   29, 129                         \n\t" \\r
477                 "       bne             RegTest2Fail            \n\t" \\r
478                 "       cmpwi   30, 130                         \n\t" \\r
479                 "       bne             RegTest2Fail            \n\t" \\r
480                 "       cmpwi   31, 131                         \n\t" \\r
481                 "       bne             RegTest2Fail            \n\t" \\r
482                 "                                                               \n\t" \\r
483                 "       b RegTest2Start                         \n\t" \\r
484                 "                                                               \n\t" \\r
485                 "RegTest2Fail:                                  \n\t" \\r
486                 "                                                               \n\t" \\r
487                 "       xor             0, 0, 0                         \n\t" \\r
488                 "       stw             0, xRegTestStatus( 0 ) \n\t" \\r
489                 "                                                               \n\t" \\r
490                 "       b RegTest2Start                         \n\t" \\r
491         );\r
492 }\r
493 \r
494 \r
495 #if 0\r
496 \r
497 static void prvRegTestTask2( void *pvParameters )\r
498 {\r
499 volatile unsigned int i= 0;\r
500 \r
501         for( ;; )\r
502         {\r
503                 i++;\r
504                 taskYIELD();\r
505         }\r
506 }\r
507 \r
508 static void prvRegTestTask1( void *pvParameters )\r
509 {\r
510 volatile unsigned int i= 0;\r
511 \r
512         for( ;; )\r
513         {\r
514                 i++;\r
515                 taskYIELD();\r
516         }\r
517 }\r
518 \r
519 #endif\r
520 \r
521 void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );\r
522 void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )\r
523 {\r
524         for( ;; );\r
525 }\r
526 \r