2 * FreeRTOS Kernel V10.0.0
\r
3 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
6 * this software and associated documentation files (the "Software"), to deal in
\r
7 * the Software without restriction, including without limitation the rights to
\r
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
9 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
10 * subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software. If you wish to use our Amazon
\r
14 * FreeRTOS name, please do so in a fair use way that does not cause confusion.
\r
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
18 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
19 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
23 * http://www.FreeRTOS.org
\r
24 * http://aws.amazon.com/freertos
\r
26 * 1 tab == 4 spaces!
\r
29 /* ****************************************************************************
\r
30 * This project includes a lot of tasks and tests and is therefore complex.
\r
31 * If you would prefer a much simpler project to get started with then select
\r
32 * the 'Blinky' build configuration within the HEW IDE. The Blinky
\r
33 * configuration builds main-blinky.c in place of this file.
\r
34 * ****************************************************************************
\r
36 * Creates all the demo application tasks, then starts the scheduler. The web
\r
37 * documentation provides more details of the standard demo application tasks,
\r
38 * which provide no particular functionality but do provide a good example of
\r
39 * how to use the FreeRTOS API. The tasks defined in flop.c are included in the
\r
40 * set of standard demo tasks to ensure the floating point unit gets some
\r
43 * In addition to the standard demo tasks, the following tasks and tests are
\r
44 * defined and/or created within this file:
\r
46 * Webserver ("uIP") task - This serves a number of dynamically generated WEB
\r
47 * pages to a standard WEB browser. The IP and MAC addresses are configured by
\r
48 * constants defined at the bottom of FreeRTOSConfig.h. Use either a standard
\r
49 * Ethernet cable to connect through a hug, or a cross over (point to point)
\r
50 * cable to connect directly. Ensure the IP address used is compatible with the
\r
51 * IP address of the machine running the browser - the easiest way to achieve
\r
52 * this is to ensure the first three octets of the IP addresses are the same.
\r
54 * "Reg test" tasks - These fill the registers with known values, then check
\r
55 * that each register still contains its expected value. Each task uses
\r
56 * different values. The tasks run with very low priority so get preempted
\r
57 * very frequently. A check variable is incremented on each iteration of the
\r
58 * test loop. A register containing an unexpected value is indicative of an
\r
59 * error in the context switching mechanism and will result in a branch to a
\r
60 * null loop - which in turn will prevent the check variable from incrementing
\r
61 * any further and allow the check task (described below) to determine that an
\r
62 * error has occurred. The nature of the reg test tasks necessitates that they
\r
63 * are written in assembly code.
\r
65 * "Check" timer - The check software timer period is initially set to five
\r
66 * seconds. The callback function associated with the check software timer
\r
67 * checks that all the standard demo tasks, and the register check tasks, are
\r
68 * not only still executing, but are executing without reporting any errors. If
\r
69 * the check software timer discovers that a task has either stalled, or
\r
70 * reported an error, then it changes its own execution period from the initial
\r
71 * five seconds, to just 200ms. The check software timer callback function
\r
72 * also toggles LED3 each time it is called. This provides a visual indication
\r
73 * of the system status: If LED3 toggles every five seconds, then no issues
\r
74 * have been discovered. If the LED toggles every 200ms, then an issue has been
\r
75 * discovered with at least one task.
\r
77 * "High frequency timer test" - A high frequency periodic interrupt is
\r
78 * generated using a timer - the interrupt is assigned a priority above
\r
79 * configMAX_SYSCALL_INTERRUPT_PRIORITY so should not be effected by anything
\r
80 * the kernel is doing. The frequency and priority of the interrupt, in
\r
81 * combination with other standard tests executed in this demo, should result
\r
82 * in interrupts nesting at least 3 and probably 4 deep. This test is only
\r
83 * included in build configurations that have the optimiser switched on. In
\r
84 * optimised builds the count of high frequency ticks is used as the time base
\r
85 * for the run time stats.
\r
87 * *NOTE 1* If LED3 is toggling every 5 seconds then all the demo application
\r
88 * tasks are executing as expected and no errors have been reported in any
\r
89 * tasks. The toggle rate increasing to 200ms indicates that at least one task
\r
90 * has reported unexpected behaviour.
\r
92 * *NOTE 2* vApplicationSetupTimerInterrupt() is called by the kernel to let
\r
93 * the application set up a timer to generate the tick interrupt. In this
\r
94 * example a compare match timer is used for this purpose.
\r
96 * *NOTE 3* The CPU must be in Supervisor mode when the scheduler is started.
\r
97 * The PowerON_Reset_PC() supplied in resetprg.c with this demo has
\r
98 * Change_PSW_PM_to_UserMode() commented out to ensure this is the case.
\r
100 * *NOTE 4* The IntQueue common demo tasks test interrupt nesting and make use
\r
101 * of all the 8bit timers (as two cascaded 16bit units).
\r
105 #include <string.h>
\r
107 /* Hardware specific includes. */
\r
108 #include "iodefine.h"
\r
110 /* Kernel includes. */
\r
111 #include "FreeRTOS.h"
\r
113 #include "timers.h"
\r
114 #include "semphr.h"
\r
116 /* Standard demo includes. */
\r
117 #include "partest.h"
\r
118 #include "flash_timer.h"
\r
119 #include "IntQueue.h"
\r
120 #include "BlockQ.h"
\r
122 #include "integer.h"
\r
123 #include "blocktim.h"
\r
124 #include "semtest.h"
\r
126 #include "GenQTest.h"
\r
128 #include "recmutex.h"
\r
131 /* Values that are passed into the reg test tasks using the task parameter. The
\r
132 tasks check that the values are passed in correctly. */
\r
133 #define mainREG_TEST_1_PARAMETER ( 0x12121212UL )
\r
134 #define mainREG_TEST_2_PARAMETER ( 0x12345678UL )
\r
136 /* Priorities at which the tasks are created. */
\r
137 #define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
\r
138 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
139 #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
140 #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
141 #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
\r
142 #define mainuIP_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
143 #define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
144 #define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
145 #define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
147 /* The WEB server uses string handling functions, which in turn use a bit more
\r
148 stack than most of the other tasks. */
\r
149 #define mainuIP_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 )
\r
151 /* The LED toggled by the check timer. */
\r
152 #define mainCHECK_LED ( 3 )
\r
154 /* The rate at which mainCHECK_LED will toggle when all the tasks are running
\r
155 without error. Controlled by the check timer as described at the top of this
\r
157 #define mainNO_ERROR_CHECK_TIMER_PERIOD_MS ( 5000 / portTICK_PERIOD_MS )
\r
159 /* The rate at which mainCHECK_LED will toggle when an error has been reported
\r
160 by at least one task. Controlled by the check timer as described at the top of
\r
162 #define mainERROR_CHECK_TIMER_PERIOD_MS ( 200 / portTICK_PERIOD_MS )
\r
164 /* A block time of zero simply means "don't block". */
\r
165 #define mainDONT_BLOCK ( 0UL )
\r
167 /* A set of timers are created, each of which toggles and LED. This specifies
\r
168 the number of timers to create. */
\r
169 #define mainNUMBER_OF_LEDS_TO_FLASH ( 3 )
\r
172 * vApplicationMallocFailedHook() will only be called if
\r
173 * configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook
\r
174 * function that will execute if a call to pvPortMalloc() fails.
\r
175 * pvPortMalloc() is called internally by the kernel whenever a task, queue or
\r
176 * semaphore is created. It is also called by various parts of the demo
\r
179 void vApplicationMallocFailedHook( void );
\r
182 * vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set to 1
\r
183 * in FreeRTOSConfig.h. It is a hook function that is called on each iteration
\r
184 * of the idle task. It is essential that code added to this hook function
\r
185 * never attempts to block in any way (for example, call xQueueReceive() with
\r
186 * a block time specified). If the application makes use of the vTaskDelete()
\r
187 * API function (as this demo application does) then it is also important that
\r
188 * vApplicationIdleHook() is permitted to return to its calling function because
\r
189 * it is the responsibility of the idle task to clean up memory allocated by the
\r
190 * kernel to any task that has since been deleted.
\r
192 void vApplicationIdleHook( void );
\r
195 * vApplicationStackOverflowHook() will only be called if
\r
196 * configCHECK_FOR_STACK_OVERFLOW is set to a non-zero value. The handle and
\r
197 * name of the offending task should be passed in the function parameters, but
\r
198 * it is possible that the stack overflow will have corrupted these - in which
\r
199 * case pxCurrentTCB can be inspected to find the same information.
\r
201 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
\r
204 * The reg test tasks as described at the top of this file.
\r
206 static void prvRegTest1Task( void *pvParameters );
\r
207 static void prvRegTest2Task( void *pvParameters );
\r
210 * The actual implementation of the reg test functionality, which, because of
\r
211 * the direct register access, have to be in assembly.
\r
213 static void prvRegTest1Implementation( void );
\r
214 static void prvRegTest2Implementation( void );
\r
217 * The check timer callback function, as described at the top of this file.
\r
219 static void prvCheckTimerCallback( TimerHandle_t xTimer );
\r
222 * Contains the implementation of the WEB server.
\r
224 extern void vuIP_Task( void *pvParameters );
\r
226 /*-----------------------------------------------------------*/
\r
228 /* Variables that are incremented on each iteration of the reg test tasks -
\r
229 provided the tasks have not reported any errors. The check task inspects these
\r
230 variables to ensure they are still incrementing as expected. If a variable
\r
231 stops incrementing then it is likely that its associate task has stalled. */
\r
232 unsigned long ulRegTest1CycleCount = 0UL, ulRegTest2CycleCount = 0UL;
\r
234 /* The status message that is displayed at the bottom of the "task stats" web
\r
235 page, which is served by the uIP task. This will report any errors picked up
\r
236 by the reg test task. */
\r
237 const char *pcStatusMessage = "All tasks executing without error.";
\r
239 /*-----------------------------------------------------------*/
\r
243 TimerHandle_t xCheckTimer;
\r
244 extern void HardwareSetup( void );
\r
246 /* Turn all LEDs off. */
\r
247 vParTestInitialise();
\r
249 /* Start the reg test tasks which test the context switching mechanism. */
\r
250 xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL );
\r
251 xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );
\r
253 /* The web server task. NOTE: COMMENTED OUT AS THE ETHERNET PORT IS NOT
\r
254 YET BEING CONFIGURED IN hwsetup.c. */
\r
255 //xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL );
\r
257 /* Create the standard demo tasks. */
\r
258 vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
\r
259 vCreateBlockTimeTasks();
\r
260 vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
\r
261 vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
\r
262 vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );
\r
263 vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );
\r
264 vStartQueuePeekTasks();
\r
265 vStartRecursiveMutexTasks();
\r
266 vStartInterruptQueueTasks();
\r
267 vStartMathTasks( mainFLOP_TASK_PRIORITY );
\r
269 /* Create the timers used to toggle the LEDs. */
\r
270 vStartLEDFlashTimers( mainNUMBER_OF_LEDS_TO_FLASH );
\r
272 /* Create the software timer that performs the 'check' functionality,
\r
273 as described at the top of this file. */
\r
274 xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */
\r
275 ( mainNO_ERROR_CHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */
\r
276 pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
\r
277 ( void * ) 0, /* The ID is not used, so can be set to anything. */
\r
278 prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */
\r
281 if( xCheckTimer != NULL )
\r
283 xTimerStart( xCheckTimer, mainDONT_BLOCK );
\r
286 /* The suicide tasks must be created last as they need to know how many
\r
287 tasks were running prior to their creation in order to ascertain whether
\r
288 or not the correct/expected number of tasks are running at any given time. */
\r
289 vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
\r
291 /* Start the tasks running. */
\r
292 vTaskStartScheduler();
\r
294 /* If all is well, the scheduler will now be running, and the following line
\r
295 will never be reached. If the following line does execute, then there was
\r
296 insufficient FreeRTOS heap memory available for the idle and/or timer tasks
\r
297 to be created. See the memory management section on the FreeRTOS web site
\r
298 for more details. */
\r
301 /*-----------------------------------------------------------*/
\r
303 static void prvCheckTimerCallback( TimerHandle_t xTimer )
\r
305 static long lChangedTimerPeriodAlready = pdFALSE;
\r
306 static unsigned long ulLastRegTest1CycleCount = 0, ulLastRegTest2CycleCount = 0;
\r
307 long lErrorFound = pdFALSE;
\r
309 /* If this is being executed then the kernel has been started. Start the
\r
310 high frequency timer test as described at the top of this file. This is
\r
311 only included in the optimised build configuration - otherwise it takes up
\r
312 too much CPU time and can disrupt other tests. */
\r
313 #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST
\r
314 vSetupHighFrequencyTimer();
\r
317 /* Check the standard demo tasks are running without error. */
\r
318 if( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
320 lErrorFound = pdTRUE;
\r
321 pcStatusMessage = "Error: GenQueue";
\r
323 else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
\r
325 lErrorFound = pdTRUE;
\r
326 pcStatusMessage = "Error: QueuePeek";
\r
328 else if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
330 lErrorFound = pdTRUE;
\r
331 pcStatusMessage = "Error: BlockQueue";
\r
333 else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
335 lErrorFound = pdTRUE;
\r
336 pcStatusMessage = "Error: BlockTime";
\r
338 else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
340 lErrorFound = pdTRUE;
\r
341 pcStatusMessage = "Error: SemTest";
\r
343 else if( xArePollingQueuesStillRunning() != pdTRUE )
\r
345 lErrorFound = pdTRUE;
\r
346 pcStatusMessage = "Error: PollQueue";
\r
348 else if( xIsCreateTaskStillRunning() != pdTRUE )
\r
350 lErrorFound = pdTRUE;
\r
351 pcStatusMessage = "Error: Death";
\r
353 else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
355 lErrorFound = pdTRUE;
\r
356 pcStatusMessage = "Error: IntMath";
\r
358 else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
360 lErrorFound = pdTRUE;
\r
361 pcStatusMessage = "Error: RecMutex";
\r
363 else if( xAreIntQueueTasksStillRunning() != pdPASS )
\r
365 lErrorFound = pdTRUE;
\r
366 pcStatusMessage = "Error: IntQueue";
\r
368 else if( xAreMathsTaskStillRunning() != pdPASS )
\r
370 lErrorFound = pdTRUE;
\r
371 pcStatusMessage = "Error: Flop";
\r
374 /* Check the reg test tasks are still cycling. They will stop incrementing
\r
375 their loop counters if they encounter an error. */
\r
376 if( ulRegTest1CycleCount == ulLastRegTest1CycleCount )
\r
378 lErrorFound = pdTRUE;
\r
379 pcStatusMessage = "Error: RegTest1";
\r
382 if( ulRegTest2CycleCount == ulLastRegTest2CycleCount )
\r
384 lErrorFound = pdTRUE;
\r
385 pcStatusMessage = "Error: RegTest2";
\r
388 ulLastRegTest1CycleCount = ulRegTest1CycleCount;
\r
389 ulLastRegTest2CycleCount = ulRegTest2CycleCount;
\r
391 /* Toggle the check LED to give an indication of the system status. If
\r
392 the LED toggles every mainNO_ERROR_CHECK_TIMER_PERIOD_MS milliseconds then
\r
393 everything is ok. A faster toggle indicates an error. */
\r
394 vParTestToggleLED( mainCHECK_LED );
\r
396 /* Have any errors been latch in lErrorFound? If so, shorten the
\r
397 period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds.
\r
398 This will result in an increase in the rate at which mainCHECK_LED
\r
400 if( lErrorFound != pdFALSE )
\r
402 if( lChangedTimerPeriodAlready == pdFALSE )
\r
404 lChangedTimerPeriodAlready = pdTRUE;
\r
406 /* This call to xTimerChangePeriod() uses a zero block time.
\r
407 Functions called from inside of a timer callback function must
\r
408 *never* attempt to block. */
\r
409 xTimerChangePeriod( xTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );
\r
413 /*-----------------------------------------------------------*/
\r
415 /* The RX port uses this callback function to configure its tick interrupt.
\r
416 This allows the application to choose the tick interrupt source. */
\r
417 void vApplicationSetupTimerInterrupt( void )
\r
419 /* Enable compare match timer 0. */
\r
422 /* Interrupt on compare match. */
\r
423 CMT0.CMCR.BIT.CMIE = 1;
\r
425 /* Set the compare match value. */
\r
426 CMT0.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ ) -1 ) / 8 );
\r
428 /* Divide the PCLK by 8. */
\r
429 CMT0.CMCR.BIT.CKS = 0;
\r
431 /* Enable the interrupt... */
\r
432 _IEN( _CMT0_CMI0 ) = 1;
\r
434 /* ...and set its priority to the application defined kernel priority. */
\r
435 _IPR( _CMT0_CMI0 ) = configKERNEL_INTERRUPT_PRIORITY;
\r
437 /* Start the timer. */
\r
438 CMT.CMSTR0.BIT.STR0 = 1;
\r
440 /*-----------------------------------------------------------*/
\r
442 /* This function is explained by the comments above its prototype at the top
\r
444 void vApplicationMallocFailedHook( void )
\r
448 /*-----------------------------------------------------------*/
\r
450 /* This function is explained by the comments above its prototype at the top
\r
452 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
\r
456 /*-----------------------------------------------------------*/
\r
458 /* This function is explained by the comments above its prototype at the top
\r
460 void vApplicationIdleHook( void )
\r
463 /*-----------------------------------------------------------*/
\r
465 /* This function is explained in the comments at the top of this file. */
\r
466 static void prvRegTest1Task( void *pvParameters )
\r
468 if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_1_PARAMETER )
\r
470 /* The parameter did not contain the expected value. */
\r
473 /* Stop the tick interrupt so its obvious something has gone wrong. */
\r
474 taskDISABLE_INTERRUPTS();
\r
478 /* This is an inline asm function that never returns. */
\r
479 prvRegTest1Implementation();
\r
481 /*-----------------------------------------------------------*/
\r
483 /* This function is explained in the comments at the top of this file. */
\r
484 static void prvRegTest2Task( void *pvParameters )
\r
486 if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_2_PARAMETER )
\r
488 /* The parameter did not contain the expected value. */
\r
491 /* Stop the tick interrupt so its obvious something has gone wrong. */
\r
492 taskDISABLE_INTERRUPTS();
\r
496 /* This is an inline asm function that never returns. */
\r
497 prvRegTest2Implementation();
\r
499 /*-----------------------------------------------------------*/
\r
501 /* This function is explained in the comments at the top of this file. */
\r
502 #pragma inline_asm prvRegTest1Implementation
\r
503 static void prvRegTest1Implementation( void )
\r
505 ; Put a known value in each register.
\r
522 ; Loop, checking each iteration that each register still contains the
\r
526 ; Push the registers that are going to get clobbered.
\r
529 ; Increment the loop counter to show this task is still getting CPU time.
\r
530 MOV.L #_ulRegTest1CycleCount, R14
\r
535 ; Yield to extend the text coverage. Set the bit in the ITU SWINTR register.
\r
537 MOV.L #0872E0H, R15
\r
542 ; Restore the clobbered registers.
\r
545 ; Now compare each register to ensure it still contains the value that was
\r
546 ; set before this loop was entered.
\r
578 ; All comparisons passed, start a new itteratio of this loop.
\r
582 ; A compare failed, just loop here so the loop counter stops incrementing
\r
583 ; causing the check task to indicate the error.
\r
586 /*-----------------------------------------------------------*/
\r
588 /* This function is explained in the comments at the top of this file. */
\r
589 #pragma inline_asm prvRegTest2Implementation
\r
590 static void prvRegTest2Implementation( void )
\r
592 ; Put a known value in each register.
\r
609 ; Loop, checking on each iteration that each register still contains the
\r
613 ; Push the registers that are going to get clobbered.
\r
616 ; Increment the loop counter to show this task is still getting CPU time.
\r
617 MOV.L #_ulRegTest2CycleCount, R14
\r
622 ; Restore the clobbered registers.
\r
656 ; All comparisons passed, start a new itteratio of this loop.
\r
660 ; A compare failed, just loop here so the loop counter stops incrementing
\r
661 ; - causing the check task to indicate the error.
\r
664 /*-----------------------------------------------------------*/
\r
666 char *pcGetTaskStatusMessage( void )
\r
668 /* Not bothered about a critical section here although technically because of
\r
669 the task priorities the pointer could change it will be atomic if not near
\r
670 atomic and its not critical. */
\r
671 return ( char * ) pcStatusMessage;
\r
673 /*-----------------------------------------------------------*/
\r