]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_LM3Sxxxx_IAR_Keil/main.c
Update version number to 9.0.0rc2.
[freertos] / FreeRTOS / Demo / CORTEX_LM3Sxxxx_IAR_Keil / main.c
1 /*\r
2     FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
3     All rights reserved\r
4 \r
5     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
6 \r
7     This file is part of the FreeRTOS distribution.\r
8 \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
12 \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
19 \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
24 \r
25     ***************************************************************************\r
26      *                                                                       *\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
31      *                                                                       *\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
36      *                                                                       *\r
37     ***************************************************************************\r
38 \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
42 \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
46 \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
51 \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
55 \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
58 \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
62 \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
66 \r
67     1 tab == 4 spaces!\r
68 */\r
69 \r
70 \r
71 /*\r
72  * Creates all the demo application tasks, then starts the scheduler.  The WEB\r
73  * documentation provides more details of the standard demo application tasks.\r
74  * In addition to the standard demo tasks, the following tasks and tests are\r
75  * defined and/or created within this file:\r
76  *\r
77  * "Fast Interrupt Test" - A high frequency periodic interrupt is generated\r
78  * using a free running timer to demonstrate the use of the\r
79  * configKERNEL_INTERRUPT_PRIORITY configuration constant.  The interrupt\r
80  * service routine measures the number of processor clocks that occur between\r
81  * each interrupt - and in so doing measures the jitter in the interrupt timing.\r
82  * The maximum measured jitter time is latched in the ulMaxJitter variable, and\r
83  * displayed on the OLED display by the 'OLED' task as described below.  The\r
84  * fast interrupt is configured and handled in the timertest.c source file.\r
85  *\r
86  * "OLED" task - the OLED task is a 'gatekeeper' task.  It is the only task that\r
87  * is permitted to access the display directly.  Other tasks wishing to write a\r
88  * message to the OLED send the message on a queue to the OLED task instead of\r
89  * accessing the OLED themselves.  The OLED task just blocks on the queue waiting\r
90  * for messages - waking and displaying the messages as they arrive.\r
91  *\r
92  * "Check" hook -  This only executes every five seconds from the tick hook.\r
93  * Its main function is to check that all the standard demo tasks are still\r
94  * operational.  Should any unexpected behaviour within a demo task be discovered\r
95  * the tick hook will write an error to the OLED (via the OLED task).  If all the\r
96  * demo tasks are executing with their expected behaviour then the check task\r
97  * writes PASS to the OLED (again via the OLED task), as described above.\r
98  *\r
99  * "uIP" task -  This is the task that handles the uIP stack.  All TCP/IP\r
100  * processing is performed in this task.\r
101  */\r
102 \r
103 \r
104 \r
105 \r
106 /*************************************************************************\r
107  * Please ensure to read http://www.freertos.org/portlm3sx965.html\r
108  * which provides information on configuring and running this demo for the\r
109  * various Luminary Micro EKs.\r
110  *************************************************************************/\r
111 \r
112 /* Set the following option to 1 to include the WEB server in the build.  By\r
113 default the WEB server is excluded to keep the compiled code size under the 32K\r
114 limit imposed by the KickStart version of the IAR compiler.  The graphics\r
115 libraries take up a lot of ROM space, hence including the graphics libraries\r
116 and the TCP/IP stack together cannot be accommodated with the 32K size limit. */\r
117 #define mainINCLUDE_WEB_SERVER          0\r
118 \r
119 \r
120 /* Standard includes. */\r
121 #include <stdio.h>\r
122 #include <string.h>\r
123 \r
124 /* Scheduler includes. */\r
125 #include "FreeRTOS.h"\r
126 #include "task.h"\r
127 #include "queue.h"\r
128 #include "semphr.h"\r
129 \r
130 /* Hardware library includes. */\r
131 #include "hw_memmap.h"\r
132 #include "hw_types.h"\r
133 #include "hw_sysctl.h"\r
134 #include "sysctl.h"\r
135 #include "gpio.h"\r
136 #include "grlib.h"\r
137 #include "rit128x96x4.h"\r
138 #include "osram128x64x4.h"\r
139 #include "formike128x128x16.h"\r
140 \r
141 /* Demo app includes. */\r
142 #include "BlockQ.h"\r
143 #include "death.h"\r
144 #include "integer.h"\r
145 #include "blocktim.h"\r
146 #include "flash.h"\r
147 #include "partest.h"\r
148 #include "semtest.h"\r
149 #include "PollQ.h"\r
150 #include "lcd_message.h"\r
151 #include "bitmap.h"\r
152 #include "GenQTest.h"\r
153 #include "QPeek.h"\r
154 #include "recmutex.h"\r
155 #include "IntQueue.h"\r
156 #include "QueueSet.h"\r
157 #include "EventGroupsDemo.h"\r
158 \r
159 /*-----------------------------------------------------------*/\r
160 \r
161 /* The time between cycles of the 'check' functionality (defined within the\r
162 tick hook. */\r
163 #define mainCHECK_DELAY                                         ( ( TickType_t ) 5000 / portTICK_PERIOD_MS )\r
164 \r
165 /* Size of the stack allocated to the uIP task. */\r
166 #define mainBASIC_WEB_STACK_SIZE            ( configMINIMAL_STACK_SIZE * 3 )\r
167 \r
168 /* The OLED task uses the sprintf function so requires a little more stack too. */\r
169 #define mainOLED_TASK_STACK_SIZE                        ( configMINIMAL_STACK_SIZE + 50 )\r
170 \r
171 /* Task priorities. */\r
172 #define mainQUEUE_POLL_PRIORITY                         ( tskIDLE_PRIORITY + 2 )\r
173 #define mainCHECK_TASK_PRIORITY                         ( tskIDLE_PRIORITY + 3 )\r
174 #define mainSEM_TEST_PRIORITY                           ( tskIDLE_PRIORITY + 1 )\r
175 #define mainBLOCK_Q_PRIORITY                            ( tskIDLE_PRIORITY + 2 )\r
176 #define mainCREATOR_TASK_PRIORITY           ( tskIDLE_PRIORITY + 3 )\r
177 #define mainINTEGER_TASK_PRIORITY           ( tskIDLE_PRIORITY )\r
178 #define mainGEN_QUEUE_TASK_PRIORITY                     ( tskIDLE_PRIORITY )\r
179 \r
180 /* The maximum number of message that can be waiting for display at any one\r
181 time. */\r
182 #define mainOLED_QUEUE_SIZE                                     ( 3 )\r
183 \r
184 /* Dimensions the buffer into which the jitter time is written. */\r
185 #define mainMAX_MSG_LEN                                         25\r
186 \r
187 /* The period of the system clock in nano seconds.  This is used to calculate\r
188 the jitter time in nano seconds. */\r
189 #define mainNS_PER_CLOCK                                        ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
190 \r
191 /* Constants used when writing strings to the display. */\r
192 #define mainCHARACTER_HEIGHT                            ( 9 )\r
193 #define mainMAX_ROWS_128                                        ( mainCHARACTER_HEIGHT * 14 )\r
194 #define mainMAX_ROWS_96                                         ( mainCHARACTER_HEIGHT * 10 )\r
195 #define mainMAX_ROWS_64                                         ( mainCHARACTER_HEIGHT * 7 )\r
196 #define mainFULL_SCALE                                          ( 15 )\r
197 #define ulSSI_FREQUENCY                                         ( 3500000UL )\r
198 \r
199 /*-----------------------------------------------------------*/\r
200 \r
201 /*\r
202  * The task that handles the uIP stack.  All TCP/IP processing is performed in\r
203  * this task.\r
204  */\r
205 extern void vuIP_Task( void *pvParameters );\r
206 \r
207 /*\r
208  * The display is written two by more than one task so is controlled by a\r
209  * 'gatekeeper' task.  This is the only task that is actually permitted to\r
210  * access the display directly.  Other tasks wanting to display a message send\r
211  * the message to the gatekeeper.\r
212  */\r
213 static void vOLEDTask( void *pvParameters );\r
214 \r
215 /*\r
216  * Configure the hardware for the demo.\r
217  */\r
218 static void prvSetupHardware( void );\r
219 \r
220 /*\r
221  * Configures the high frequency timers - those used to measure the timing\r
222  * jitter while the real time kernel is executing.\r
223  */\r
224 extern void vSetupHighFrequencyTimer( void );\r
225 \r
226 /*\r
227  * Hook functions that can get called by the kernel.\r
228  */\r
229 void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName );\r
230 void vApplicationTickHook( void );\r
231 \r
232 \r
233 /*-----------------------------------------------------------*/\r
234 \r
235 /* The queue used to send messages to the OLED task. */\r
236 QueueHandle_t xOLEDQueue;\r
237 \r
238 /* The welcome text. */\r
239 const char * const pcWelcomeMessage = "   www.FreeRTOS.org";\r
240 \r
241 /*-----------------------------------------------------------*/\r
242 \r
243 \r
244 /*************************************************************************\r
245  * Please ensure to read http://www.freertos.org/portlm3sx965.html\r
246  * which provides information on configuring and running this demo for the\r
247  * various Luminary Micro EKs.\r
248  *************************************************************************/\r
249 int main( void )\r
250 {\r
251         prvSetupHardware();\r
252 \r
253         /* Create the queue used by the OLED task.  Messages for display on the OLED\r
254         are received via this queue. */\r
255         xOLEDQueue = xQueueCreate( mainOLED_QUEUE_SIZE, sizeof( xOLEDMessage ) );\r
256 \r
257         /* Start the standard demo tasks. */\r
258     vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );\r
259     vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );\r
260     vStartInterruptQueueTasks();\r
261         vStartRecursiveMutexTasks();\r
262         vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );\r
263         vCreateBlockTimeTasks();\r
264         vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
265         vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
266         vStartQueuePeekTasks();\r
267         vStartQueueSetTasks();\r
268         vStartEventGroupTasks();\r
269 \r
270         /* Exclude some tasks if using the kickstart version to ensure we stay within\r
271         the 32K code size limit. */\r
272         #if mainINCLUDE_WEB_SERVER != 0\r
273         {\r
274                 /* Create the uIP task if running on a processor that includes a MAC and\r
275                 PHY. */\r
276                 if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) )\r
277                 {\r
278                         xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );\r
279                 }\r
280         }\r
281         #endif\r
282 \r
283 \r
284 \r
285         /* Start the tasks defined within this file/specific to this demo. */\r
286         xTaskCreate( vOLEDTask, "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
287 \r
288         /* The suicide tasks must be created last as they need to know how many\r
289         tasks were running prior to their creation in order to ascertain whether\r
290         or not the correct/expected number of tasks are running at any given time. */\r
291     vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );\r
292 \r
293         /* Configure the high frequency interrupt used to measure the interrupt\r
294         jitter time. */\r
295         vSetupHighFrequencyTimer();\r
296 \r
297         /* Start the scheduler. */\r
298         vTaskStartScheduler();\r
299 \r
300     /* Will only get here if there was insufficient memory to create the idle\r
301     task. */\r
302         return 0;\r
303 }\r
304 /*-----------------------------------------------------------*/\r
305 \r
306 void prvSetupHardware( void )\r
307 {\r
308     /* If running on Rev A2 silicon, turn the LDO voltage up to 2.75V.  This is\r
309     a workaround to allow the PLL to operate reliably. */\r
310     if( DEVICE_IS_REVA2 )\r
311     {\r
312         SysCtlLDOSet( SYSCTL_LDO_2_75V );\r
313     }\r
314 \r
315         /* Set the clocking to run from the PLL at 50 MHz */\r
316         SysCtlClockSet( SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ );\r
317 \r
318         /*      Enable Port F for Ethernet LEDs\r
319                 LED0        Bit 3   Output\r
320                 LED1        Bit 2   Output */\r
321         SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOF );\r
322         GPIODirModeSet( GPIO_PORTF_BASE, (GPIO_PIN_2 | GPIO_PIN_3), GPIO_DIR_MODE_HW );\r
323         GPIOPadConfigSet( GPIO_PORTF_BASE, (GPIO_PIN_2 | GPIO_PIN_3 ), GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD );\r
324 \r
325         vParTestInitialise();\r
326 }\r
327 /*-----------------------------------------------------------*/\r
328 \r
329 void vApplicationTickHook( void )\r
330 {\r
331 static xOLEDMessage xMessage = { "PASS" };\r
332 static unsigned long ulTicksSinceLastDisplay = 0;\r
333 portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
334 \r
335         /* Called from every tick interrupt.  Have enough ticks passed to make it\r
336         time to perform our health status check again? */\r
337         ulTicksSinceLastDisplay++;\r
338         if( ulTicksSinceLastDisplay >= mainCHECK_DELAY )\r
339         {\r
340                 ulTicksSinceLastDisplay = 0;\r
341 \r
342                 /* Has an error been found in any task? */\r
343                 if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
344                 {\r
345                         xMessage.pcMessage = "ERROR IN GEN Q";\r
346                 }\r
347             else if( xIsCreateTaskStillRunning() != pdTRUE )\r
348             {\r
349                 xMessage.pcMessage = "ERROR IN CREATE";\r
350             }\r
351             else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
352             {\r
353                 xMessage.pcMessage = "ERROR IN MATH";\r
354             }\r
355                 else if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
356                 {\r
357                         xMessage.pcMessage = "ERROR IN INT QUEUE";\r
358                 }\r
359                 else if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
360                 {\r
361                         xMessage.pcMessage = "ERROR IN BLOCK Q";\r
362                 }\r
363                 else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
364                 {\r
365                         xMessage.pcMessage = "ERROR IN BLOCK TIME";\r
366                 }\r
367                 else if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
368                 {\r
369                         xMessage.pcMessage = "ERROR IN SEMAPHORE";\r
370                 }\r
371                 else if( xArePollingQueuesStillRunning() != pdTRUE )\r
372                 {\r
373                         xMessage.pcMessage = "ERROR IN POLL Q";\r
374                 }\r
375                 else if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
376                 {\r
377                         xMessage.pcMessage = "ERROR IN PEEK Q";\r
378                 }\r
379                 else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
380                 {\r
381                         xMessage.pcMessage = "ERROR IN REC MUTEX";\r
382                 }\r
383                 else if( xAreQueueSetTasksStillRunning() != pdPASS )\r
384                 {\r
385                         xMessage.pcMessage = "ERROR IN Q SET";\r
386                 }\r
387                 else if( xAreEventGroupTasksStillRunning() != pdTRUE )\r
388                 {\r
389                         xMessage.pcMessage = "ERROR IN EVNT GRP";\r
390                 }\r
391 \r
392                 configASSERT( strcmp( ( const char * ) xMessage.pcMessage, "PASS" ) == 0 );\r
393 \r
394                 /* Send the message to the OLED gatekeeper for display. */\r
395                 xHigherPriorityTaskWoken = pdFALSE;\r
396                 xQueueSendFromISR( xOLEDQueue, &xMessage, &xHigherPriorityTaskWoken );\r
397         }\r
398 \r
399         /* Write to a queue that is in use as part of the queue set demo to\r
400         demonstrate using queue sets from an ISR. */\r
401         vQueueSetAccessQueueSetFromISR();\r
402 \r
403         /* Call the event group ISR tests. */\r
404         vPeriodicEventGroupsProcessing();\r
405 }\r
406 /*-----------------------------------------------------------*/\r
407 \r
408 void vOLEDTask( void *pvParameters )\r
409 {\r
410 xOLEDMessage xMessage;\r
411 unsigned long ulY, ulMaxY;\r
412 static char cMessage[ mainMAX_MSG_LEN ];\r
413 extern volatile unsigned long ulMaxJitter;\r
414 const unsigned char *pucImage;\r
415 \r
416 /* Functions to access the OLED.  The one used depends on the dev kit\r
417 being used. */\r
418 void ( *vOLEDInit )( unsigned long ) = NULL;\r
419 void ( *vOLEDStringDraw )( const char *, unsigned long, unsigned long, unsigned char ) = NULL;\r
420 void ( *vOLEDImageDraw )( const unsigned char *, unsigned long, unsigned long, unsigned long, unsigned long ) = NULL;\r
421 void ( *vOLEDClear )( void ) = NULL;\r
422 \r
423         /* Map the OLED access functions to the driver functions that are appropriate\r
424         for the evaluation kit being used. */\r
425         switch( HWREG( SYSCTL_DID1 ) & SYSCTL_DID1_PRTNO_MASK )\r
426         {\r
427                 case SYSCTL_DID1_PRTNO_6965     :\r
428                 case SYSCTL_DID1_PRTNO_2965     :       vOLEDInit = OSRAM128x64x4Init;\r
429                                                                                 vOLEDStringDraw = OSRAM128x64x4StringDraw;\r
430                                                                                 vOLEDImageDraw = OSRAM128x64x4ImageDraw;\r
431                                                                                 vOLEDClear = OSRAM128x64x4Clear;\r
432                                                                                 ulMaxY = mainMAX_ROWS_64;\r
433                                                                                 pucImage = pucBasicBitmap;\r
434                                                                                 break;\r
435 \r
436                 case SYSCTL_DID1_PRTNO_1968     :\r
437                 case SYSCTL_DID1_PRTNO_8962 :   vOLEDInit = RIT128x96x4Init;\r
438                                                                                 vOLEDStringDraw = RIT128x96x4StringDraw;\r
439                                                                                 vOLEDImageDraw = RIT128x96x4ImageDraw;\r
440                                                                                 vOLEDClear = RIT128x96x4Clear;\r
441                                                                                 ulMaxY = mainMAX_ROWS_96;\r
442                                                                                 pucImage = pucBasicBitmap;\r
443                                                                                 break;\r
444 \r
445                 default                                         :       vOLEDInit = vFormike128x128x16Init;\r
446                                                                                 vOLEDStringDraw = vFormike128x128x16StringDraw;\r
447                                                                                 vOLEDImageDraw = vFormike128x128x16ImageDraw;\r
448                                                                                 vOLEDClear = vFormike128x128x16Clear;\r
449                                                                                 ulMaxY = mainMAX_ROWS_128;\r
450                                                                                 pucImage = pucGrLibBitmap;\r
451                                                                                 break;\r
452 \r
453         }\r
454 \r
455         ulY = ulMaxY;\r
456 \r
457         /* Initialise the OLED and display a startup message. */\r
458         vOLEDInit( ulSSI_FREQUENCY );\r
459         vOLEDStringDraw( "POWERED BY FreeRTOS", 0, 0, mainFULL_SCALE );\r
460         vOLEDImageDraw( pucImage, 0, mainCHARACTER_HEIGHT + 1, bmpBITMAP_WIDTH, bmpBITMAP_HEIGHT );\r
461 \r
462         for( ;; )\r
463         {\r
464                 /* Wait for a message to arrive that requires displaying. */\r
465                 xQueueReceive( xOLEDQueue, &xMessage, portMAX_DELAY );\r
466 \r
467                 /* Write the message on the next available row. */\r
468                 ulY += mainCHARACTER_HEIGHT;\r
469                 if( ulY >= ulMaxY )\r
470                 {\r
471                         ulY = mainCHARACTER_HEIGHT;\r
472                         vOLEDClear();\r
473                         vOLEDStringDraw( pcWelcomeMessage, 0, 0, mainFULL_SCALE );\r
474                 }\r
475 \r
476                 /* Display the message along with the maximum jitter time from the\r
477                 high priority time test. */\r
478                 sprintf( cMessage, "%s [%uns]", xMessage.pcMessage, ulMaxJitter * mainNS_PER_CLOCK );\r
479                 vOLEDStringDraw( cMessage, 0, ulY, mainFULL_SCALE );\r
480         }\r
481 }\r
482 /*-----------------------------------------------------------*/\r
483 \r
484 void vApplicationStackOverflowHook( TaskHandle_t *pxTask, signed char *pcTaskName )\r
485 {\r
486         ( void ) pxTask;\r
487         ( void ) pcTaskName;\r
488 \r
489         for( ;; );\r
490 }\r
491 /*-----------------------------------------------------------*/\r
492 \r
493 void vAssertCalled( const char *pcFile, unsigned long ulLine )\r
494 {\r
495 volatile unsigned long ulSetTo1InDebuggerToExit = 0;\r
496 \r
497         taskENTER_CRITICAL();\r
498         {\r
499                 while( ulSetTo1InDebuggerToExit == 0 )\r
500                 {\r
501                         /* Nothing do do here.  Set the loop variable to a non zero value in\r
502                         the debugger to step out of this function to the point that caused\r
503                         the assertion. */\r
504                         ( void ) pcFile;\r
505                         ( void ) ulLine;\r
506                 }\r
507         }\r
508         taskEXIT_CRITICAL();\r
509 }\r