2 FreeRTOS V9.0.1 - Copyright (C) 2017 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
70 /* ****************************************************************************
\r
71 * This project includes a lot of tasks and tests and is therefore complex.
\r
72 * If you would prefer a much simpler project to get started with then select
\r
73 * the 'Blinky' build configuration within the HEW IDE.
\r
74 * ****************************************************************************
\r
76 * Creates all the demo application tasks, then starts the scheduler. The web
\r
77 * documentation provides more details of the standard demo application tasks,
\r
78 * which provide no particular functionality but do provide a good example of
\r
79 * how to use the FreeRTOS API. The tasks defined in flop.c are included in the
\r
80 * set of standard demo tasks to ensure the floating point unit gets some
\r
83 * In addition to the standard demo tasks, the following tasks and tests are
\r
84 * defined and/or created within this file:
\r
86 * Webserver ("uIP") task - This serves a number of dynamically generated WEB
\r
87 * pages to a standard WEB browser. The IP and MAC addresses are configured by
\r
88 * constants defined at the bottom of FreeRTOSConfig.h. Use either a standard
\r
89 * Ethernet cable to connect through a hug, or a cross over (point to point)
\r
90 * cable to connect directly. Ensure the IP address used is compatible with the
\r
91 * IP address of the machine running the browser - the easiest way to achieve
\r
92 * this is to ensure the first three octets of the IP addresses are the same.
\r
94 * "Reg test" tasks - These fill the registers with known values, then check
\r
95 * that each register still contains its expected value. Each task uses
\r
96 * different values. The tasks run with very low priority so get preempted
\r
97 * very frequently. A check variable is incremented on each iteration of the
\r
98 * test loop. A register containing an unexpected value is indicative of an
\r
99 * error in the context switching mechanism and will result in a branch to a
\r
100 * null loop - which in turn will prevent the check variable from incrementing
\r
101 * any further and allow the check task (described below) to determine that an
\r
102 * error has occurred. The nature of the reg test tasks necessitates that they
\r
103 * are written in assembly code.
\r
105 * "Check" task - This only executes every five seconds but has a high priority
\r
106 * to ensure it gets processor time. Its main function is to check that all the
\r
107 * standard demo tasks are still operational. While no errors have been
\r
108 * discovered the check task will toggle LED 5 every 5 seconds - the toggle
\r
109 * rate increasing to 200ms being a visual indication that at least one task has
\r
110 * reported unexpected behaviour.
\r
112 * "High frequency timer test" - A high frequency periodic interrupt is
\r
113 * generated using a timer - the interrupt is assigned a priority above
\r
114 * configMAX_SYSCALL_INTERRUPT_PRIORITY so should not be effected by anything
\r
115 * the kernel is doing. The frequency and priority of the interrupt, in
\r
116 * combination with other standard tests executed in this demo, should result
\r
117 * in interrupts nesting at least 3 and probably 4 deep. This test is only
\r
118 * included in build configurations that have the optimiser switched on. In
\r
119 * optimised builds the count of high frequency ticks is used as the time base
\r
120 * for the run time stats.
\r
122 * *NOTE 1* If LED5 is toggling every 5 seconds then all the demo application
\r
123 * tasks are executing as expected and no errors have been reported in any
\r
124 * tasks. The toggle rate increasing to 200ms indicates that at least one task
\r
125 * has reported unexpected behaviour.
\r
127 * *NOTE 2* vApplicationSetupTimerInterrupt() is called by the kernel to let
\r
128 * the application set up a timer to generate the tick interrupt. In this
\r
129 * example a compare match timer is used for this purpose.
\r
131 * *NOTE 3* The CPU must be in Supervisor mode when the scheduler is started.
\r
132 * The PowerON_Reset_PC() supplied in resetprg.c with this demo has
\r
133 * Change_PSW_PM_to_UserMode() commented out to ensure this is the case.
\r
135 * *NOTE 4* The IntQueue common demo tasks test interrupt nesting and make use
\r
136 * of all the 8bit timers (as two cascaded 16bit units).
\r
139 /* Hardware specific includes. */
\r
140 #include "iodefine.h"
\r
142 /* Kernel includes. */
\r
143 #include "FreeRTOS.h"
\r
146 /* Standard demo includes. */
\r
147 #include "partest.h"
\r
149 #include "IntQueue.h"
\r
150 #include "BlockQ.h"
\r
152 #include "integer.h"
\r
153 #include "blocktim.h"
\r
154 #include "semtest.h"
\r
156 #include "GenQTest.h"
\r
158 #include "recmutex.h"
\r
161 /* Values that are passed into the reg test tasks using the task parameter. The
\r
162 tasks check that the values are passed in correctly. */
\r
163 #define mainREG_TEST_1_PARAMETER ( 0x12121212UL )
\r
164 #define mainREG_TEST_2_PARAMETER ( 0x12345678UL )
\r
166 /* Priorities at which the tasks are created. */
\r
167 #define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
\r
168 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
169 #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
170 #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
171 #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
\r
172 #define mainFLASH_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
173 #define mainuIP_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
174 #define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
175 #define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
176 #define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )
\r
178 /* The WEB server uses string handling functions, which in turn use a bit more
\r
179 stack than most of the other tasks. */
\r
180 #define mainuIP_STACK_SIZE ( configMINIMAL_STACK_SIZE * 3 )
\r
182 /* The LED toggled by the check task. */
\r
183 #define mainCHECK_LED ( 5 )
\r
185 /* The rate at which mainCHECK_LED will toggle when all the tasks are running
\r
186 without error. Controlled by the check task as described at the top of this
\r
188 #define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_PERIOD_MS )
\r
190 /* The rate at which mainCHECK_LED will toggle when an error has been reported
\r
191 by at least one task. Controlled by the check task as described at the top of
\r
193 #define mainERROR_CYCLE_TIME ( 200 / portTICK_PERIOD_MS )
\r
196 * vApplicationMallocFailedHook() will only be called if
\r
197 * configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook
\r
198 * function that will execute if a call to pvPortMalloc() fails.
\r
199 * pvPortMalloc() is called internally by the kernel whenever a task, queue or
\r
200 * semaphore is created. It is also called by various parts of the demo
\r
203 void vApplicationMallocFailedHook( void );
\r
206 * vApplicationIdleHook() will only be called if configUSE_IDLE_HOOK is set to 1
\r
207 * in FreeRTOSConfig.h. It is a hook function that is called on each iteration
\r
208 * of the idle task. It is essential that code added to this hook function
\r
209 * never attempts to block in any way (for example, call xQueueReceive() with
\r
210 * a block time specified). If the application makes use of the vTaskDelete()
\r
211 * API function (as this demo application does) then it is also important that
\r
212 * vApplicationIdleHook() is permitted to return to its calling function because
\r
213 * it is the responsibility of the idle task to clean up memory allocated by the
\r
214 * kernel to any task that has since been deleted.
\r
216 void vApplicationIdleHook( void );
\r
219 * vApplicationStackOverflowHook() will only be called if
\r
220 * configCHECK_FOR_STACK_OVERFLOW is set to a non-zero value. The handle and
\r
221 * name of the offending task should be passed in the function parameters, but
\r
222 * it is possible that the stack overflow will have corrupted these - in which
\r
223 * case pxCurrentTCB can be inspected to find the same information.
\r
225 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );
\r
228 * The reg test tasks as described at the top of this file.
\r
230 static void prvRegTest1Task( void *pvParameters );
\r
231 static void prvRegTest2Task( void *pvParameters );
\r
234 * The actual implementation of the reg test functionality, which, because of
\r
235 * the direct register access, have to be in assembly.
\r
237 static void prvRegTest1Implementation( void );
\r
238 static void prvRegTest2Implementation( void );
\r
241 * The check task as described at the top of this file.
\r
243 static void prvCheckTask( void *pvParameters );
\r
246 * Contains the implementation of the WEB server.
\r
248 extern void vuIP_Task( void *pvParameters );
\r
250 /*-----------------------------------------------------------*/
\r
252 /* Variables that are incremented on each iteration of the reg test tasks -
\r
253 provided the tasks have not reported any errors. The check task inspects these
\r
254 variables to ensure they are still incrementing as expected. If a variable
\r
255 stops incrementing then it is likely that its associate task has stalled. */
\r
256 unsigned long ulRegTest1CycleCount = 0UL, ulRegTest2CycleCount = 0UL;
\r
258 /* The status message that is displayed at the bottom of the "task stats" web
\r
259 page, which is served by the uIP task. This will report any errors picked up
\r
260 by the reg test task. */
\r
261 const char *pcStatusMessage = "All tasks executing without error.";
\r
263 /*-----------------------------------------------------------*/
\r
267 extern void HardwareSetup( void );
\r
269 /* Renesas provided CPU configuration routine. The clocks are configured in
\r
273 /* Turn all LEDs off. */
\r
274 vParTestInitialise();
\r
276 /* Start the reg test tasks which test the context switching mechanism. */
\r
277 xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL );
\r
278 xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );
\r
280 /* The web server task. */
\r
281 xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL );
\r
283 /* Start the check task as described at the top of this file. */
\r
284 xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE * 3, NULL, mainCHECK_TASK_PRIORITY, NULL );
\r
286 /* Create the standard demo tasks. */
\r
287 vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
\r
288 vCreateBlockTimeTasks();
\r
289 vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
\r
290 vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
\r
291 vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );
\r
292 vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );
\r
293 vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );
\r
294 vStartQueuePeekTasks();
\r
295 vStartRecursiveMutexTasks();
\r
296 vStartInterruptQueueTasks();
\r
297 vStartMathTasks( mainFLOP_TASK_PRIORITY );
\r
299 /* The suicide tasks must be created last as they need to know how many
\r
300 tasks were running prior to their creation in order to ascertain whether
\r
301 or not the correct/expected number of tasks are running at any given time. */
\r
302 vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
\r
304 /* Start the tasks running. */
\r
305 vTaskStartScheduler();
\r
307 /* If all is well we will never reach here as the scheduler will now be
\r
308 running. If we do reach here then it is likely that there was insufficient
\r
309 heap available for the idle task to be created. */
\r
312 /*-----------------------------------------------------------*/
\r
314 static void prvCheckTask( void *pvParameters )
\r
316 static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;
\r
317 TickType_t xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;
\r
318 extern void vSetupHighFrequencyTimer( void );
\r
320 /* If this is being executed then the kernel has been started. Start the high
\r
321 frequency timer test as described at the top of this file. This is only
\r
322 included in the optimised build configuration - otherwise it takes up too much
\r
323 CPU time and can disrupt other tests. */
\r
324 #ifdef INCLUDE_HIGH_FREQUENCY_TIMER_TEST
\r
325 vSetupHighFrequencyTimer();
\r
328 /* Initialise xNextWakeTime - this only needs to be done once. */
\r
329 xNextWakeTime = xTaskGetTickCount();
\r
333 /* Place this task in the blocked state until it is time to run again. */
\r
334 vTaskDelayUntil( &xNextWakeTime, xCycleFrequency );
\r
336 /* Check the standard demo tasks are running without error. */
\r
337 if( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
339 /* Increase the rate at which this task cycles, which will increase the
\r
340 rate at which mainCHECK_LED flashes to give visual feedback that an error
\r
342 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
343 pcStatusMessage = "Error: GenQueue";
\r
345 else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
\r
347 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
348 pcStatusMessage = "Error: QueuePeek";
\r
350 else if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
352 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
353 pcStatusMessage = "Error: BlockQueue";
\r
355 else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
357 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
358 pcStatusMessage = "Error: BlockTime";
\r
360 else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
362 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
363 pcStatusMessage = "Error: SemTest";
\r
365 else if( xArePollingQueuesStillRunning() != pdTRUE )
\r
367 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
368 pcStatusMessage = "Error: PollQueue";
\r
370 else if( xIsCreateTaskStillRunning() != pdTRUE )
\r
372 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
373 pcStatusMessage = "Error: Death";
\r
375 else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
377 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
378 pcStatusMessage = "Error: IntMath";
\r
380 else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
382 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
383 pcStatusMessage = "Error: RecMutex";
\r
385 else if( xAreIntQueueTasksStillRunning() != pdPASS )
\r
387 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
388 pcStatusMessage = "Error: IntQueue";
\r
390 else if( xAreMathsTaskStillRunning() != pdPASS )
\r
392 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
393 pcStatusMessage = "Error: Flop";
\r
396 /* Check the reg test tasks are still cycling. They will stop incrementing
\r
397 their loop counters if they encounter an error. */
\r
398 if( ulRegTest1CycleCount == ulLastRegTest1CycleCount )
\r
400 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
401 pcStatusMessage = "Error: RegTest1";
\r
404 if( ulRegTest2CycleCount == ulLastRegTest2CycleCount )
\r
406 xCycleFrequency = mainERROR_CYCLE_TIME;
\r
407 pcStatusMessage = "Error: RegTest2";
\r
410 ulLastRegTest1CycleCount = ulRegTest1CycleCount;
\r
411 ulLastRegTest2CycleCount = ulRegTest2CycleCount;
\r
413 /* Toggle the check LED to give an indication of the system status. If
\r
414 the LED toggles every 5 seconds then everything is ok. A faster toggle
\r
415 indicates an error. */
\r
416 vParTestToggleLED( mainCHECK_LED );
\r
419 /*-----------------------------------------------------------*/
\r
421 /* The RX port uses this callback function to configure its tick interrupt.
\r
422 This allows the application to choose the tick interrupt source. */
\r
423 void vApplicationSetupTimerInterrupt( void )
\r
425 /* Enable compare match timer 0. */
\r
428 /* Interrupt on compare match. */
\r
429 CMT0.CMCR.BIT.CMIE = 1;
\r
431 /* Set the compare match value. */
\r
432 CMT0.CMCOR = ( unsigned short ) ( ( ( configPERIPHERAL_CLOCK_HZ / configTICK_RATE_HZ ) -1 ) / 8 );
\r
434 /* Divide the PCLK by 8. */
\r
435 CMT0.CMCR.BIT.CKS = 0;
\r
437 /* Enable the interrupt... */
\r
438 _IEN( _CMT0_CMI0 ) = 1;
\r
440 /* ...and set its priority to the application defined kernel priority. */
\r
441 _IPR( _CMT0_CMI0 ) = configKERNEL_INTERRUPT_PRIORITY;
\r
443 /* Start the timer. */
\r
444 CMT.CMSTR0.BIT.STR0 = 1;
\r
446 /*-----------------------------------------------------------*/
\r
448 /* This function is explained by the comments above its prototype at the top
\r
450 void vApplicationMallocFailedHook( void )
\r
454 /*-----------------------------------------------------------*/
\r
456 /* This function is explained by the comments above its prototype at the top
\r
458 void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )
\r
462 /*-----------------------------------------------------------*/
\r
464 /* This function is explained by the comments above its prototype at the top
\r
466 void vApplicationIdleHook( void )
\r
469 /*-----------------------------------------------------------*/
\r
471 /* This function is explained in the comments at the top of this file. */
\r
472 static void prvRegTest1Task( void *pvParameters )
\r
474 if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_1_PARAMETER )
\r
476 /* The parameter did not contain the expected value. */
\r
479 /* Stop the tick interrupt so its obvious something has gone wrong. */
\r
480 taskDISABLE_INTERRUPTS();
\r
484 /* This is an inline asm function that never returns. */
\r
485 prvRegTest1Implementation();
\r
487 /*-----------------------------------------------------------*/
\r
489 /* This function is explained in the comments at the top of this file. */
\r
490 static void prvRegTest2Task( void *pvParameters )
\r
492 if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_2_PARAMETER )
\r
494 /* The parameter did not contain the expected value. */
\r
497 /* Stop the tick interrupt so its obvious something has gone wrong. */
\r
498 taskDISABLE_INTERRUPTS();
\r
502 /* This is an inline asm function that never returns. */
\r
503 prvRegTest2Implementation();
\r
505 /*-----------------------------------------------------------*/
\r
507 /* This function is explained in the comments at the top of this file. */
\r
508 #pragma inline_asm prvRegTest1Implementation
\r
509 static void prvRegTest1Implementation( void )
\r
511 ; Put a known value in each register.
\r
528 ; Loop, checking each iteration that each register still contains the
\r
532 ; Push the registers that are going to get clobbered.
\r
535 ; Increment the loop counter to show this task is still getting CPU time.
\r
536 MOV.L #_ulRegTest1CycleCount, R14
\r
541 ; Yield to extend the text coverage. Set the bit in the ITU SWINTR register.
\r
543 MOV.L #0872E0H, R15
\r
548 ; Restore the clobbered registers.
\r
551 ; Now compare each register to ensure it still contains the value that was
\r
552 ; set before this loop was entered.
\r
584 ; All comparisons passed, start a new itteratio of this loop.
\r
588 ; A compare failed, just loop here so the loop counter stops incrementing
\r
589 ; causing the check task to indicate the error.
\r
592 /*-----------------------------------------------------------*/
\r
594 /* This function is explained in the comments at the top of this file. */
\r
595 #pragma inline_asm prvRegTest2Implementation
\r
596 static void prvRegTest2Implementation( void )
\r
598 ; Put a known value in each register.
\r
615 ; Loop, checking on each iteration that each register still contains the
\r
619 ; Push the registers that are going to get clobbered.
\r
622 ; Increment the loop counter to show this task is still getting CPU time.
\r
623 MOV.L #_ulRegTest2CycleCount, R14
\r
628 ; Restore the clobbered registers.
\r
662 ; All comparisons passed, start a new itteratio of this loop.
\r
666 ; A compare failed, just loop here so the loop counter stops incrementing
\r
667 ; - causing the check task to indicate the error.
\r
670 /*-----------------------------------------------------------*/
\r
672 char *pcGetTaskStatusMessage( void )
\r
674 /* Not bothered about a critical section here although technically because of
\r
675 the task priorities the pointer could change it will be atomic if not near
\r
676 atomic and its not critical. */
\r
677 return ( char * ) pcStatusMessage;
\r
679 /*-----------------------------------------------------------*/
\r