2 FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 This file is part of the FreeRTOS distribution.
\r
9 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
10 the terms of the GNU General Public License (version 2) as published by the
\r
11 Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
\r
13 ***************************************************************************
\r
14 >>! NOTE: The modification to the GPL is included to allow you to !<<
\r
15 >>! distribute a combined work that includes FreeRTOS without being !<<
\r
16 >>! obliged to provide the source code for proprietary components !<<
\r
17 >>! outside of the FreeRTOS kernel. !<<
\r
18 ***************************************************************************
\r
20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
\r
23 link: http://www.freertos.org/a00114.html
\r
25 ***************************************************************************
\r
27 * FreeRTOS provides completely free yet professionally developed, *
\r
28 * robust, strictly quality controlled, supported, and cross *
\r
29 * platform software that is more than just the market leader, it *
\r
30 * is the industry's de facto standard. *
\r
32 * Help yourself get started quickly while simultaneously helping *
\r
33 * to support the FreeRTOS project by purchasing a FreeRTOS *
\r
34 * tutorial book, reference manual, or both: *
\r
35 * http://www.FreeRTOS.org/Documentation *
\r
37 ***************************************************************************
\r
39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
\r
40 the FAQ page "My application does not run, what could be wrong?". Have you
\r
41 defined configASSERT()?
\r
43 http://www.FreeRTOS.org/support - In return for receiving this top quality
\r
44 embedded software for free we request you assist our global community by
\r
45 participating in the support forum.
\r
47 http://www.FreeRTOS.org/training - Investing in training allows your team to
\r
48 be as productive as possible as early as possible. Now you can receive
\r
49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
\r
50 Ltd, and the world's leading authority on the world's leading RTOS.
\r
52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
\r
57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
\r
59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
\r
60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
61 licenses offer ticketed support, indemnification and commercial middleware.
\r
63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
64 engineered and independently SIL3 certified version for use in safety and
\r
65 mission critical applications that require provable dependability.
\r
71 * Creates all the demo application tasks, then starts the scheduler. The WEB
\r
72 * documentation provides more details of the demo application tasks.
\r
74 * In addition to the standard demo tasks, the follow demo specific tasks are
\r
77 * The "Check" task. This only executes every three seconds but has the highest
\r
78 * priority so is guaranteed to get processor time. Its main function is to
\r
79 * check that all the other tasks are still operational. Most tasks maintain
\r
80 * a unique count that is incremented each time the task successfully completes
\r
81 * its function. Should any error occur within such a task the count is
\r
82 * permanently halted. The check task inspects the count of each task to ensure
\r
83 * it has changed since the last time the check task executed. If all the count
\r
84 * variables have changed all the tasks are still executing error free, and the
\r
85 * check task toggles the onboard LED. Should any task contain an error at any time
\r
86 * the LED toggle rate will change from 3 seconds to 500ms.
\r
88 * The "Register Check" tasks. These tasks fill the CPU registers with known
\r
89 * values, then check that each register still contains the expected value, the
\r
90 * discovery of an unexpected value being indicative of an error in the RTOS
\r
91 * context switch mechanism. The register check tasks operate at low priority
\r
92 * so are switched in and out frequently.
\r
96 /* Scheduler includes. */
\r
97 #include "FreeRTOS.h"
\r
100 /* Xilinx library includes. */
\r
101 #include "xcache_l.h"
\r
104 /* Demo application includes. */
\r
106 #include "integer.h"
\r
107 #include "comtest2.h"
\r
108 #include "semtest.h"
\r
109 #include "BlockQ.h"
\r
110 #include "dynamic.h"
\r
111 #include "GenQTest.h"
\r
113 #include "blocktim.h"
\r
115 #include "partest.h"
\r
116 #include "countsem.h"
\r
117 #include "recmutex.h"
\r
119 #include "flop-reg-test.h"
\r
121 /* Priorities assigned to the demo tasks. */
\r
122 #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
\r
123 #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
124 #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
125 #define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
126 #define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
127 #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
128 #define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
\r
129 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
130 #define mainFLOP_PRIORITY ( tskIDLE_PRIORITY )
\r
132 /* The first LED used by the COM test and check tasks respectively. */
\r
133 #define mainCOM_TEST_LED ( 4 )
\r
134 #define mainCHECK_TEST_LED ( 3 )
\r
136 /* The baud rate used by the comtest tasks is set by the hardware, so the
\r
137 baud rate parameters passed into the comtest initialisation has no effect. */
\r
138 #define mainBAUD_SET_IN_HARDWARE ( 0 )
\r
140 /* Delay periods used by the check task. If no errors have been found then
\r
141 the check LED will toggle every mainNO_ERROR_CHECK_DELAY milliseconds. If an
\r
142 error has been found at any time then the toggle rate will increase to
\r
143 mainERROR_CHECK_DELAY milliseconds. */
\r
144 #define mainNO_ERROR_CHECK_DELAY ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )
\r
145 #define mainERROR_CHECK_DELAY ( ( TickType_t ) 500 / portTICK_PERIOD_MS )
\r
149 * The tasks defined within this file - described within the comments at the
\r
150 * head of this page.
\r
152 static void prvRegTestTask1( void *pvParameters );
\r
153 static void prvRegTestTask2( void *pvParameters );
\r
154 static void prvErrorChecks( void *pvParameters );
\r
157 * Called by the 'check' task to inspect all the standard demo tasks within
\r
158 * the system, as described within the comments at the head of this page.
\r
160 static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );
\r
163 * Perform any hardware initialisation required by the demo application.
\r
165 static void prvSetupHardware( void );
\r
167 /*-----------------------------------------------------------*/
\r
169 /* xRegTestStatus will get set to pdFAIL by the regtest tasks if they
\r
170 discover an unexpected value. */
\r
171 static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;
\r
173 /* Counters used to ensure the regtest tasks are still running. */
\r
174 static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
\r
176 /*-----------------------------------------------------------*/
\r
181 /* Must be called prior to installing any interrupt handlers! */
\r
182 vPortSetupInterruptController();
\r
184 /* In this case prvSetupHardware() just enables the caches and and
\r
185 configures the IO ports for the LED outputs. */
\r
186 prvSetupHardware();
\r
188 /* Start the standard demo application tasks. Note that the baud rate used
\r
189 by the comtest tasks is set by the hardware, so the baud rate parameter
\r
190 passed has no effect. */
\r
191 vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
\r
192 vStartIntegerMathTasks( tskIDLE_PRIORITY );
\r
193 vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_SET_IN_HARDWARE, mainCOM_TEST_LED );
\r
194 vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
\r
195 vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY );
\r
196 vStartDynamicPriorityTasks();
\r
197 vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
\r
198 vStartQueuePeekTasks();
\r
199 vCreateBlockTimeTasks();
\r
200 vStartCountingSemaphoreTasks();
\r
201 vStartRecursiveMutexTasks();
\r
203 #if ( configUSE_FPU == 1 )
\r
205 /* A different project is provided that has configUSE_FPU set to 1
\r
206 in order to demonstrate all the settings required to use the floating
\r
207 point unit. If you wish to use the floating point unit do not start
\r
208 with this project. */
\r
209 vStartMathTasks( mainFLOP_PRIORITY );
\r
210 vStartFlopRegTests();
\r
214 /* Create the tasks defined within this file. */
\r
215 xTaskCreate( prvRegTestTask1, "Regtest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
\r
216 xTaskCreate( prvRegTestTask2, "Regtest2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
\r
217 xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
\r
219 /* The suicide tasks must be started last as they record the number of other
\r
220 tasks that exist within the system. The value is then used to ensure at run
\r
221 time the number of tasks that exists is within expected bounds. */
\r
222 vCreateSuicidalTasks( mainDEATH_PRIORITY );
\r
224 /* Now start the scheduler. Following this call the created tasks should
\r
226 vTaskStartScheduler();
\r
228 /* vTaskStartScheduler() will only return if an error occurs while the
\r
229 idle task is being created. */
\r
234 /*-----------------------------------------------------------*/
\r
236 static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )
\r
238 portBASE_TYPE lReturn = pdPASS;
\r
239 static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;
\r
241 /* The demo tasks maintain a count that increments every cycle of the task
\r
242 provided that the task has never encountered an error. This function
\r
243 checks the counts maintained by the tasks to ensure they are still being
\r
244 incremented. A count remaining at the same value between calls therefore
\r
245 indicates that an error has been detected. */
\r
247 if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
252 if( xAreComTestTasksStillRunning() != pdTRUE )
\r
257 if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
262 if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
267 if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
\r
272 if( xIsCreateTaskStillRunning() != pdTRUE )
\r
277 if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
282 if( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
287 if( xAreQueuePeekTasksStillRunning() != pdTRUE )
\r
292 if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
\r
297 if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
302 #if ( configUSE_FPU == 1 )
\r
303 if( xAreMathsTaskStillRunning() != pdTRUE )
\r
308 if( xAreFlopRegisterTestsStillRunning() != pdTRUE )
\r
314 /* Have the register test tasks found any errors? */
\r
315 if( xRegTestStatus != pdPASS )
\r
320 /* Are the register test tasks still looping? */
\r
321 if( ulLastRegTest1Counter == ulRegTest1Counter )
\r
327 ulLastRegTest1Counter = ulRegTest1Counter;
\r
330 if( ulLastRegTest2Counter == ulRegTest2Counter )
\r
336 ulLastRegTest2Counter = ulRegTest2Counter;
\r
341 /*-----------------------------------------------------------*/
\r
343 static void prvErrorChecks( void *pvParameters )
\r
345 TickType_t xDelayPeriod = mainNO_ERROR_CHECK_DELAY, xLastExecutionTime;
\r
346 volatile unsigned portBASE_TYPE uxFreeStack;
\r
348 /* Just to remove compiler warning. */
\r
349 ( void ) pvParameters;
\r
351 /* This call is just to demonstrate the use of the function - nothing is
\r
352 done with the value. You would expect the stack high water mark to be
\r
353 lower (the function to return a larger value) here at function entry than
\r
354 later following calls to other functions. */
\r
355 uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
\r
357 /* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
\r
358 works correctly. */
\r
359 xLastExecutionTime = xTaskGetTickCount();
\r
361 /* Cycle for ever, delaying then checking all the other tasks are still
\r
362 operating without error. */
\r
365 /* Again just for demo purposes - uxFreeStack should have a lower value
\r
366 here than following the call to uxTaskGetStackHighWaterMark() on the
\r
368 uxFreeStack = uxTaskGetStackHighWaterMark( NULL );
\r
370 /* Wait until it is time to check again. The time we wait here depends
\r
371 on whether an error has been detected or not. When an error is
\r
372 detected the time is shortened resulting in a faster LED flash rate. */
\r
373 vTaskDelayUntil( &xLastExecutionTime, xDelayPeriod );
\r
375 /* See if the other tasks are all ok. */
\r
376 if( prvCheckOtherTasksAreStillRunning() != pdPASS )
\r
378 /* An error occurred in one of the tasks so shorten the delay
\r
379 period - which has the effect of increasing the frequency of the
\r
381 xDelayPeriod = mainERROR_CHECK_DELAY;
\r
385 vParTestToggleLED( mainCHECK_TEST_LED );
\r
388 /*-----------------------------------------------------------*/
\r
390 static void prvSetupHardware( void )
\r
392 XCache_EnableICache( 0x80000000 );
\r
393 XCache_EnableDCache( 0x80000000 );
\r
395 /* Setup the IO port for use with the LED outputs. */
\r
396 vParTestInitialise();
\r
398 /*-----------------------------------------------------------*/
\r
400 void prvRegTest1Pass( void )
\r
402 /* Called from the inline assembler - this cannot be static
\r
403 otherwise it can get optimised away. */
\r
404 ulRegTest1Counter++;
\r
406 /*-----------------------------------------------------------*/
\r
408 void prvRegTest2Pass( void )
\r
410 /* Called from the inline assembler - this cannot be static
\r
411 otherwise it can get optimised away. */
\r
412 ulRegTest2Counter++;
\r
414 /*-----------------------------------------------------------*/
\r
416 void prvRegTestFail( void )
\r
418 /* Called from the inline assembler - this cannot be static
\r
419 otherwise it can get optimised away. */
\r
420 xRegTestStatus = pdFAIL;
\r
422 /*-----------------------------------------------------------*/
\r
424 static void prvRegTestTask1( void *pvParameters )
\r
426 /* Just to remove compiler warning. */
\r
427 ( void ) pvParameters;
\r
429 /* The first register test task as described at the top of this file. The
\r
430 values used in the registers are different to those use in the second
\r
431 register test task. Also, unlike the second register test task, this task
\r
432 yields between setting the register values and subsequently checking the
\r
433 register values. */
\r
436 "RegTest1Start: \n\t" \
\r
438 " li 0, 301 \n\t" \
\r
439 " mtspr 256, 0 #USPRG0 \n\t" \
\r
440 " li 0, 501 \n\t" \
\r
441 " mtspr 8, 0 #LR \n\t" \
\r
443 " mtspr 1, 0 #XER \n\t" \
\r
454 " li 10, 10 \n\t" \
\r
455 " li 11, 11 \n\t" \
\r
456 " li 12, 12 \n\t" \
\r
457 " li 13, 13 \n\t" \
\r
458 " li 14, 14 \n\t" \
\r
459 " li 15, 15 \n\t" \
\r
460 " li 16, 16 \n\t" \
\r
461 " li 17, 17 \n\t" \
\r
462 " li 18, 18 \n\t" \
\r
463 " li 19, 19 \n\t" \
\r
464 " li 20, 20 \n\t" \
\r
465 " li 21, 21 \n\t" \
\r
466 " li 22, 22 \n\t" \
\r
467 " li 23, 23 \n\t" \
\r
468 " li 24, 24 \n\t" \
\r
469 " li 25, 25 \n\t" \
\r
470 " li 26, 26 \n\t" \
\r
471 " li 27, 27 \n\t" \
\r
472 " li 28, 28 \n\t" \
\r
473 " li 29, 29 \n\t" \
\r
474 " li 30, 30 \n\t" \
\r
475 " li 31, 31 \n\t" \
\r
480 " cmpwi 0, 1 \n\t" \
\r
481 " bne RegTest1Fail \n\t" \
\r
482 " cmpwi 2, 2 \n\t" \
\r
483 " bne RegTest1Fail \n\t" \
\r
484 " cmpwi 3, 3 \n\t" \
\r
485 " bne RegTest1Fail \n\t" \
\r
486 " cmpwi 4, 4 \n\t" \
\r
487 " bne RegTest1Fail \n\t" \
\r
488 " cmpwi 5, 5 \n\t" \
\r
489 " bne RegTest1Fail \n\t" \
\r
490 " cmpwi 6, 6 \n\t" \
\r
491 " bne RegTest1Fail \n\t" \
\r
492 " cmpwi 7, 7 \n\t" \
\r
493 " bne RegTest1Fail \n\t" \
\r
494 " cmpwi 8, 8 \n\t" \
\r
495 " bne RegTest1Fail \n\t" \
\r
496 " cmpwi 9, 9 \n\t" \
\r
497 " bne RegTest1Fail \n\t" \
\r
498 " cmpwi 10, 10 \n\t" \
\r
499 " bne RegTest1Fail \n\t" \
\r
500 " cmpwi 11, 11 \n\t" \
\r
501 " bne RegTest1Fail \n\t" \
\r
502 " cmpwi 12, 12 \n\t" \
\r
503 " bne RegTest1Fail \n\t" \
\r
504 " cmpwi 13, 13 \n\t" \
\r
505 " bne RegTest1Fail \n\t" \
\r
506 " cmpwi 14, 14 \n\t" \
\r
507 " bne RegTest1Fail \n\t" \
\r
508 " cmpwi 15, 15 \n\t" \
\r
509 " bne RegTest1Fail \n\t" \
\r
510 " cmpwi 16, 16 \n\t" \
\r
511 " bne RegTest1Fail \n\t" \
\r
512 " cmpwi 17, 17 \n\t" \
\r
513 " bne RegTest1Fail \n\t" \
\r
514 " cmpwi 18, 18 \n\t" \
\r
515 " bne RegTest1Fail \n\t" \
\r
516 " cmpwi 19, 19 \n\t" \
\r
517 " bne RegTest1Fail \n\t" \
\r
518 " cmpwi 20, 20 \n\t" \
\r
519 " bne RegTest1Fail \n\t" \
\r
520 " cmpwi 21, 21 \n\t" \
\r
521 " bne RegTest1Fail \n\t" \
\r
522 " cmpwi 22, 22 \n\t" \
\r
523 " bne RegTest1Fail \n\t" \
\r
524 " cmpwi 23, 23 \n\t" \
\r
525 " bne RegTest1Fail \n\t" \
\r
526 " cmpwi 24, 24 \n\t" \
\r
527 " bne RegTest1Fail \n\t" \
\r
528 " cmpwi 25, 25 \n\t" \
\r
529 " bne RegTest1Fail \n\t" \
\r
530 " cmpwi 26, 26 \n\t" \
\r
531 " bne RegTest1Fail \n\t" \
\r
532 " cmpwi 27, 27 \n\t" \
\r
533 " bne RegTest1Fail \n\t" \
\r
534 " cmpwi 28, 28 \n\t" \
\r
535 " bne RegTest1Fail \n\t" \
\r
536 " cmpwi 29, 29 \n\t" \
\r
537 " bne RegTest1Fail \n\t" \
\r
538 " cmpwi 30, 30 \n\t" \
\r
539 " bne RegTest1Fail \n\t" \
\r
540 " cmpwi 31, 31 \n\t" \
\r
541 " bne RegTest1Fail \n\t" \
\r
543 " mfspr 0, 256 #USPRG0 \n\t" \
\r
544 " cmpwi 0, 301 \n\t" \
\r
545 " bne RegTest1Fail \n\t" \
\r
546 " mfspr 0, 8 #LR \n\t" \
\r
547 " cmpwi 0, 501 \n\t" \
\r
548 " bne RegTest1Fail \n\t" \
\r
549 " mfspr 0, 1 #XER \n\t" \
\r
550 " cmpwi 0, 4 \n\t" \
\r
551 " bne RegTest1Fail \n\t" \
\r
553 " bl prvRegTest1Pass \n\t" \
\r
554 " b RegTest1Start \n\t" \
\r
556 "RegTest1Fail: \n\t" \
\r
559 " bl prvRegTestFail \n\t" \
\r
560 " b RegTest1Start \n\t" \
\r
563 /*-----------------------------------------------------------*/
\r
565 static void prvRegTestTask2( void *pvParameters )
\r
567 /* Just to remove compiler warning. */
\r
568 ( void ) pvParameters;
\r
570 /* The second register test task as described at the top of this file.
\r
571 Note that this task fills the registers with different values to the
\r
572 first register test task. */
\r
575 "RegTest2Start: \n\t" \
\r
577 " li 0, 300 \n\t" \
\r
578 " mtspr 256, 0 #USPRG0 \n\t" \
\r
579 " li 0, 500 \n\t" \
\r
580 " mtspr 8, 0 #LR \n\t" \
\r
582 " mtspr 1, 0 #XER \n\t" \
\r
593 " li 10, 110 \n\t" \
\r
594 " li 11, 111 \n\t" \
\r
595 " li 12, 112 \n\t" \
\r
596 " li 13, 113 \n\t" \
\r
597 " li 14, 114 \n\t" \
\r
598 " li 15, 115 \n\t" \
\r
599 " li 16, 116 \n\t" \
\r
600 " li 17, 117 \n\t" \
\r
601 " li 18, 118 \n\t" \
\r
602 " li 19, 119 \n\t" \
\r
603 " li 20, 120 \n\t" \
\r
604 " li 21, 121 \n\t" \
\r
605 " li 22, 122 \n\t" \
\r
606 " li 23, 123 \n\t" \
\r
607 " li 24, 124 \n\t" \
\r
608 " li 25, 125 \n\t" \
\r
609 " li 26, 126 \n\t" \
\r
610 " li 27, 127 \n\t" \
\r
611 " li 28, 128 \n\t" \
\r
612 " li 29, 129 \n\t" \
\r
613 " li 30, 130 \n\t" \
\r
614 " li 31, 131 \n\t" \
\r
616 " cmpwi 0, 11 \n\t" \
\r
617 " bne RegTest2Fail \n\t" \
\r
618 " cmpwi 2, 12 \n\t" \
\r
619 " bne RegTest2Fail \n\t" \
\r
620 " cmpwi 3, 13 \n\t" \
\r
621 " bne RegTest2Fail \n\t" \
\r
622 " cmpwi 4, 14 \n\t" \
\r
623 " bne RegTest2Fail \n\t" \
\r
624 " cmpwi 5, 15 \n\t" \
\r
625 " bne RegTest2Fail \n\t" \
\r
626 " cmpwi 6, 16 \n\t" \
\r
627 " bne RegTest2Fail \n\t" \
\r
628 " cmpwi 7, 17 \n\t" \
\r
629 " bne RegTest2Fail \n\t" \
\r
630 " cmpwi 8, 18 \n\t" \
\r
631 " bne RegTest2Fail \n\t" \
\r
632 " cmpwi 9, 19 \n\t" \
\r
633 " bne RegTest2Fail \n\t" \
\r
634 " cmpwi 10, 110 \n\t" \
\r
635 " bne RegTest2Fail \n\t" \
\r
636 " cmpwi 11, 111 \n\t" \
\r
637 " bne RegTest2Fail \n\t" \
\r
638 " cmpwi 12, 112 \n\t" \
\r
639 " bne RegTest2Fail \n\t" \
\r
640 " cmpwi 13, 113 \n\t" \
\r
641 " bne RegTest2Fail \n\t" \
\r
642 " cmpwi 14, 114 \n\t" \
\r
643 " bne RegTest2Fail \n\t" \
\r
644 " cmpwi 15, 115 \n\t" \
\r
645 " bne RegTest2Fail \n\t" \
\r
646 " cmpwi 16, 116 \n\t" \
\r
647 " bne RegTest2Fail \n\t" \
\r
648 " cmpwi 17, 117 \n\t" \
\r
649 " bne RegTest2Fail \n\t" \
\r
650 " cmpwi 18, 118 \n\t" \
\r
651 " bne RegTest2Fail \n\t" \
\r
652 " cmpwi 19, 119 \n\t" \
\r
653 " bne RegTest2Fail \n\t" \
\r
654 " cmpwi 20, 120 \n\t" \
\r
655 " bne RegTest2Fail \n\t" \
\r
656 " cmpwi 21, 121 \n\t" \
\r
657 " bne RegTest2Fail \n\t" \
\r
658 " cmpwi 22, 122 \n\t" \
\r
659 " bne RegTest2Fail \n\t" \
\r
660 " cmpwi 23, 123 \n\t" \
\r
661 " bne RegTest2Fail \n\t" \
\r
662 " cmpwi 24, 124 \n\t" \
\r
663 " bne RegTest2Fail \n\t" \
\r
664 " cmpwi 25, 125 \n\t" \
\r
665 " bne RegTest2Fail \n\t" \
\r
666 " cmpwi 26, 126 \n\t" \
\r
667 " bne RegTest2Fail \n\t" \
\r
668 " cmpwi 27, 127 \n\t" \
\r
669 " bne RegTest2Fail \n\t" \
\r
670 " cmpwi 28, 128 \n\t" \
\r
671 " bne RegTest2Fail \n\t" \
\r
672 " cmpwi 29, 129 \n\t" \
\r
673 " bne RegTest2Fail \n\t" \
\r
674 " cmpwi 30, 130 \n\t" \
\r
675 " bne RegTest2Fail \n\t" \
\r
676 " cmpwi 31, 131 \n\t" \
\r
677 " bne RegTest2Fail \n\t" \
\r
679 " mfspr 0, 256 #USPRG0 \n\t" \
\r
680 " cmpwi 0, 300 \n\t" \
\r
681 " bne RegTest2Fail \n\t" \
\r
682 " mfspr 0, 8 #LR \n\t" \
\r
683 " cmpwi 0, 500 \n\t" \
\r
684 " bne RegTest2Fail \n\t" \
\r
685 " mfspr 0, 1 #XER \n\t" \
\r
686 " cmpwi 0, 4 \n\t" \
\r
687 " bne RegTest2Fail \n\t" \
\r
689 " bl prvRegTest2Pass \n\t" \
\r
690 " b RegTest2Start \n\t" \
\r
692 "RegTest2Fail: \n\t" \
\r
695 " bl prvRegTestFail \n\t" \
\r
696 " b RegTest2Start \n\t" \
\r
699 /*-----------------------------------------------------------*/
\r
701 /* This hook function will get called if there is a suspected stack overflow.
\r
702 An overflow can cause the task name to be corrupted, in which case the task
\r
703 handle needs to be used to determine the offending task. */
\r
704 void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );
\r
705 void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
\r
707 /* To prevent the optimiser removing the variables. */
\r
708 volatile TaskHandle_t xTaskIn = xTask;
\r
709 volatile signed char *pcTaskNameIn = pcTaskName;
\r
711 /* Remove compiler warnings. */
\r
713 ( void ) pcTaskNameIn;
\r
715 /* The following three calls are simply to stop compiler warnings about the
\r
716 functions not being used - they are called from the inline assembly. */
\r