/* * Starts all the other tasks, then starts the scheduler. */ int main( void ) { /* Setup the hardware for use with the Olimex demo board. */ prvSetupHardware(); /* Start the demo/test application tasks. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartMathTasks( tskIDLE_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the check task - which is defined in this file. */ xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used here. */ vTaskStartScheduler(); /* Should never reach here! */ return 0; }
/* * Starts all the other tasks, then starts the scheduler. */ int main( void ) { /* Configure the processor. */ prvSetupHardware(); /* Setup the port used to flash the LED's. */ vParTestInitialise(); /* Start the task that handles the TCP/IP and WEB server functionality. */ xTaskCreate( vuIP_TASK, "uIP", mainUIP_TASK_STACK_SIZE, NULL, mainUIP_PRIORITY, NULL ); /* Start the demo/test application tasks. These are created in addition to the TCP/IP task for demonstration and test purposes. */ vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartDynamicPriorityTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartLEDFlashTasks( mainFLASH_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartMathTasks( tskIDLE_PRIORITY ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the check task - which is defined in this file. */ xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Must be last to get created. */ vCreateSuicidalTasks( mainDEATH_PRIORITY ); /* Now all the tasks have been started - start the scheduler. */ vTaskStartScheduler(); /* Should never reach here because the tasks should now be executing! */ return 0; }
/* * Start all the tasks then start the scheduler. */ int main( void ) { /* Setup the LED's for output. */ vParTestInitialise(); /* Start the various standard demo application tasks. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartMathTasks( tskIDLE_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the 'Check' task. */ xTaskCreate( vErrorChecks, ( signed char * )"Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* In this port, to use preemptive scheduler define configUSE_PREEMPTION as 1 in portmacro.h. To use the cooperative scheduler define configUSE_PREEMPTION as 0. */ vTaskStartScheduler(); /* Should never get here! */ return 0; }
/* ------------------------ Implementation -------------------------------- */ int main( int argc, char *argv[] ) { asm volatile ( "move.w #0x2000, %sr\n\t" ); xSTDComPort = xSerialPortInitMinimal( 38400, 8 ); /* Start the demo/test application tasks. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartMathTasks( tskIDLE_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartDynamicPriorityTasks( ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); /* Start the check task - which is defined in this file. */ xTaskCreate( vErrorChecks, "Check", 512, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Now all the tasks have been started - start the scheduler. */ vTaskStartScheduler( ); /* Should never get here! */ return 0; }
void main_full( void ) { /* This demo sets the clock to its maximum. The blinky demo uses as slower clock as it uses low power features. */ prvConfigureClocks(); /* Init the serial port for use by the CLI. The baud rate parameter is not used so set to 0 to make this obvious. */ xSerialPortInitMinimal( 0, mainRX_QUEUE_LENGTH ); /* Start all the other standard demo/test tasks. They have no particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartInterruptQueueTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartEventGroupTasks(); vStartTaskNotifyTask(); vStartInterruptSemaphoreTasks(); /* Note - the set of standard demo tasks contains two versions of vStartMathTasks.c. One is defined in flop.c, and uses double precision floating point numbers and variables. The other is defined in sp_flop.c, and uses single precision floating point numbers and variables. sp_flop. c should be included in this project. */ vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* Start the tasks that implements the command console on the UART, as described above. */ vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY ); /* Register the standard CLI commands. */ vRegisterSampleCLICommands(); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the task that performs the 'check' functionality, as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was either insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created, or vTaskStartScheduler() was called from User mode. See the memory management section on the FreeRTOS web site for more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The mode from which main() is called is set in the C start up code and must be a privileged mode (not user mode). */ for( ;; ); }
int main_full( void ) { /* Start the check task as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartTaskNotifyTask(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); vStartRecursiveMutexTasks(); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); vStartQueueSetTasks(); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); vStartEventGroupTasks(); vStartInterruptSemaphoreTasks(); vStartQueueSetPollingTask(); vCreateBlockTimeTasks(); vCreateAbortDelayTasks(); xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvPermanentlyBlockingSemaphoreTask, "BlockSem", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvPermanentlyBlockingNotificationTask, "BlockNoti", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); #if( configSUPPORT_STATIC_ALLOCATION == 1 ) { vStartStaticallyAllocatedTasks(); } #endif #if( configUSE_PREEMPTION != 0 ) { /* Don't expect these tasks to pass when preemption is not used. */ vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); } #endif /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation. This then allows them to ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Create the semaphore that will be deleted in the idle task hook. This is done purely to test the use of vSemaphoreDelete(). */ xMutexToDelete = xSemaphoreCreateMutex(); /* Start the scheduler itself. */ vTaskStartScheduler(); /* Should never get here unless there was not enough heap space to create the idle and other system tasks. */ return 0; }
static void prvStartMathTasks( void ) { #ifdef BCC_INDUSTRIAL_PC_PORT /* The Borland project does not yet support floating point. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); #else vStartMathTasks( tskIDLE_PRIORITY ); #endif }
/* * Starts all the other tasks, then starts the scheduler. */ void main( void ) { #ifdef DEBUG debug(); #endif /* Setup any hardware that has not already been configured by the low level init routines. */ prvSetupHardware(); /* Create the queue used to send data to the LCD task. */ xLCDQueue = xQueueCreate( mainLCD_QUEUE_LEN, sizeof( xLCDMessage ) ); /* Start all the standard demo application tasks. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartDynamicPriorityTasks(); vStartMathTasks( tskIDLE_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY ); vStartQueuePeekTasks(); /* Start the tasks which are defined in this file. */ xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); xTaskCreate( prvLCDTask, "LCD", configMINIMAL_STACK_SIZE, ( void * ) &xLCDQueue, mainLCD_TASK_PRIORITY, NULL ); xTaskCreate( prvLCDMessageTask, "MSG", configMINIMAL_STACK_SIZE, ( void * ) &xLCDQueue, mainMSG_TASK_PRIORITY, NULL ); /* Start either the uIP TCP/IP stack or the lwIP TCP/IP stack. */ #ifdef STACK_UIP /* Finally, create the WEB server task. */ xTaskCreate( vuIP_Task, "uIP", configMINIMAL_STACK_SIZE * 3, NULL, mainCHECK_TASK_PRIORITY - 1, NULL ); #endif #ifdef STACK_LWIP /* Create the lwIP task. This uses the lwIP RTOS abstraction layer.*/ vlwIPInit(); sys_set_state( ( signed portCHAR * ) "httpd", lwipBASIC_SERVER_STACK_SIZE ); sys_thread_new( vBasicWEBServer, ( void * ) NULL, basicwebWEBSERVER_PRIORITY ); sys_set_default_state(); #endif /* Start the scheduler. NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode. The processor MUST be in supervisor mode when vTaskStartScheduler is called. The demo applications included in the FreeRTOS.org download switch to supervisor mode prior to main being called. If you are not using one of these demo application projects then ensure Supervisor mode is used here. */ vTaskStartScheduler(); /* We should never get here as control is now taken by the scheduler. */ for( ;; ); }
void main_full( void ) { xTimerHandle xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); } /* The set of tasks created by the following function call have to be created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the scheduler. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. */ for( ;; ) { __asm volatile( "NOP" ); } }
static void prvOptionallyCreateComprehensveTestApplication( void ) { #if ( mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY == 0 ) { xTimerHandle xCheckTimer = NULL; /* Start all the other standard demo/test tasks. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); /* Most importantly, start the tasks that use the FPU. */ vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */ ); if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); } /* This task has to be created last as it keeps account of the number of tasks it expects to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); } #else /* mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY */ { /* Just to prevent compiler warnings when the configuration options are set such that these static functions are not used. */ ( void ) vRegTest1Task; ( void ) vRegTest2Task; ( void ) prvCheckTimerCallback; ( void ) prvSetupNestedFPUInterruptsTest; } #endif /* mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY */ }
void main_full( void ) { /* Start all the other standard demo/test tasks. They have no particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartDynamicPriorityTasks(); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartEventGroupTasks(); vStartTaskNotifyTask(); vStartInterruptSemaphoreTasks(); /* Note - the set of standard demo tasks contains two versions of vStartMathTasks.c. One is defined in flop.c, and uses double precision floating point numbers and variables. The other is defined in sp_flop.c, and uses single precision floating point numbers and variables. The MicroBlaze floating point unit only handles single precision floating. Therefore, to test the floating point hardware, sp_flop.c should be included in this project. */ vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* Start the tasks that implements the command console on the UART, as described above. */ vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY ); /* Register the standard CLI commands. */ vRegisterSampleCLICommands(); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the task that performs the 'check' functionality, as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the Idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details on the FreeRTOS heap http://www.freertos.org/a00111.html. */ for( ;; ); }
int main(void) { extern void HardwareSetup( void ); /* Renesas provided CPU configuration routine. The clocks are configured in here. */ HardwareSetup(); /* Turn all LEDs off. */ vParTestInitialise(); /* Start the reg test tasks which test the context switching mechanism. */ xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* The web server task. */ xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); /* Start the check task as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartRecursiveMutexTasks(); vStartInterruptQueueTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the tasks running. */ vTaskStartScheduler(); /* If all is well we will never reach here as the scheduler will now be running. If we do reach here then it is likely that there was insufficient heap available for the idle task to be created. */ for( ;; ); return 0; }
void main_full( void ) { /* Start all the other standard demo/test tasks. They have no particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartInterruptQueueTasks(); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartMathTasks( mainFLOP_TASK_PRIORITY ); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); vStartEventGroupTasks(); vStartInterruptSemaphoreTasks(); vStartQueueSetTasks(); vStartTaskNotifyTask(); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the task that performs the 'check' functionality, as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The set of tasks created by the following function call have to be created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the scheduler. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was either insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created, or vTaskStartScheduler() was called from User mode. See the memory management section on the FreeRTOS web site for more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The mode from which main() is called is set in the C start up code and must be a privileged mode (not user mode). */ for( ;; ); }
/* Start all the demo application tasks, then start the scheduler. */ void main(void) { /* Initialise the hardware ready for the demo. */ prvSetupHardware(); /* Start the standard demo application tasks. */ vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED - 1 ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY ); vStartDynamicPriorityTasks(); vStartMathTasks( tskIDLE_PRIORITY ); vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY ); vStartQueuePeekTasks(); vCreateBlockTimeTasks(); vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES ); /* Start the 'Check' task which is defined in this file. */ xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the 'Register Test' tasks as described at the top of this file. */ xTaskCreate( vFirstRegisterTestTask, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vSecondRegisterTestTask, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* Start the task that write trace information to the UART. */ vUtilityStartTraceTask( mainUTILITY_TASK_PRIORITY ); /* If we are going to service the watchdog from within a task, then create the task here. */ #if WATCHDOG == WTC_IN_TASK vStartWatchdogTask( mainWATCHDOG_TASK_PRIORITY ); #endif /* The suicide tasks must be started last as they record the number of other tasks that exist within the system. The value is then used to ensure at run time the number of tasks that exists is within expected bounds. */ vCreateSuicidalTasks( mainDEATH_PRIORITY ); /* Now start the scheduler. Following this call the created tasks should be executing. */ vTaskStartScheduler( ); /* vTaskStartScheduler() will only return if an error occurs while the idle task is being created. */ for( ;; ); }
/* * Creates the majority of the demo application tasks before starting the * scheduler. */ void main(void) { TaskHandle_t xCreatedTask; prvSetupHardware(); /* Start the reg test tasks which test the context switching mechanism. */ xTaskCreate( vRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); xTaskCreate( vRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xCreatedTask ); xPortUsesFloatingPoint( xCreatedTask ); xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL ); /* Start the check task as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the standard demo tasks. These don't perform any particular useful functionality, other than to demonstrate the FreeRTOS API being used. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartRecursiveMutexTasks(); /* Start the math tasks as described at the top of this file. */ vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the tasks running. */ vTaskStartScheduler(); /* Will only get here if there was insufficient heap memory to create the idle task. Increase the configTOTAL_HEAP_SIZE setting in FreeRTOSConfig.h. */ for( ;; ); }
void main( void ) { /* Place your initialization/startup code here (e.g. MyInst_Start()) */ prvHardwareSetup(); /* Start the standard demo tasks. These are just here to exercise the kernel port and provide examples of how the FreeRTOS API can be used. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); vStartMathTasks( mainINTEGER_TASK_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartQueuePeekTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartLEDFlashTasks( mainFLASH_TEST_TASK_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_TASK_PRIORITY, 57600, mainCOM_LED ); vStartInterruptQueueTasks(); /* Start the error checking task. */ ( void ) xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Configure the timers used by the fast interrupt timer test. */ vSetupTimerTest(); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation in order to ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Will only get here if there was insufficient memory to create the idle task. The idle task is created within vTaskStartScheduler(). */ vTaskStartScheduler(); /* Should never reach here as the kernel will now be running. If vTaskStartScheduler() does return then it is very likely that there was insufficient (FreeRTOS) heap space available to create all the tasks, including the idle task that is created within vTaskStartScheduler() itself. */ for( ;; ); }
int main( void ) { /* Start the crystal oscillator 0 and switch the main clock to it. */ pm_switch_to_osc0(&AVR32_PM, FOSC0, OSC0_STARTUP); portDBG_TRACE("Starting the FreeRTOS AVR32 UC3 Demo..."); /* Setup the LED's for output. */ vParTestInitialise(); /* Start the standard demo tasks. See the WEB documentation for more information. */ vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartMathTasks( tskIDLE_PRIORITY ); /* Start the demo tasks defined within this file, specifically the check task as described at the top of this file. */ xTaskCreate( vErrorChecks , (const signed portCHAR *)"ErrCheck" , configMINIMAL_STACK_SIZE , NULL , mainCHECK_TASK_PRIORITY , NULL ); /* Start the scheduler. */ vTaskStartScheduler(); /* Will only get here if there was insufficient memory to create the idle task. */ return 0; }
int main( void ) { /* Start the check task as described at the top of this file. */ xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); vStartRecursiveMutexTasks(); /* Start the scheduler itself. */ vTaskStartScheduler(); /* Should never get here unless there was not enough heap space to create the idle and other system tasks. */ return 0; }
int main_full( void ) { /* Start the check task as described at the top of this file. */ xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Create the standard demo tasks. */ vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); vStartRecursiveMutexTasks(); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); vStartQueueSetTasks(); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); xTaskCreate( prvDemoQueueSpaceFunctions, ( signed char * ) "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* The suicide tasks must be created last as they need to know how many tasks were running prior to their creation. This then allows them to ascertain whether or not the correct/expected number of tasks are running at any given time. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Create the semaphore that will be deleted in the idle task hook. This is done purely to test the use of vSemaphoreDelete(). */ xMutexToDelete = xSemaphoreCreateMutex(); /* Start the scheduler itself. */ vTaskStartScheduler(); /* Should never get here unless there was not enough heap space to create the idle and other system tasks. */ return 0; }
/* Creates the tasks, then starts the scheduler. */ void main( void ) { /* Initialise the required hardware. */ vParTestInitialise(); /* Send a character so we have some visible feedback of a reset. */ xSerialPortInitMinimal( mainBAUD_RATE, mainCOMMS_QUEUE_LENGTH ); xSerialPutChar( NULL, 'X', mainNO_BLOCK ); /* Start a few of the standard demo tasks found in the demo\common directory. */ vStartMathTasks( tskIDLE_PRIORITY ); vStartLEDFlashTasks( mainLED_FLASH_PRIORITY ); /* Start the check task defined in this file. */ xTaskCreate( vErrorChecks, ( const char * const ) "Check", portMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* Start the scheduler. Will never return here. */ vTaskStartScheduler(); while(1) /* This point should never be reached. */ { } }
int main( void ) { #if UC3L /*! \name Clock frequencies */ //! @{ #define EXAMPLE_TARGET_DFLL_FREQ_HZ 96000000 // DFLL target frequency, in Hz #define EXAMPLE_TARGET_MCUCLK_FREQ_HZ 12000000 // MCU clock target frequency, in Hz #define EXAMPLE_TARGET_PBACLK_FREQ_HZ 12000000 // PBA clock target frequency, in Hz //! @} /*! \name Parameters to pcl_configure_clocks(). */ //! @{ static scif_gclk_opt_t gc_dfllif_ref_opt = { SCIF_GCCTRL_SLOWCLOCK, 0, false}; static pcl_freq_param_t pcl_dfll_freq_param = { .main_clk_src = PCL_MC_DFLL0, .cpu_f = EXAMPLE_TARGET_MCUCLK_FREQ_HZ, .pba_f = EXAMPLE_TARGET_PBACLK_FREQ_HZ, .pbb_f = EXAMPLE_TARGET_PBACLK_FREQ_HZ, .dfll_f = EXAMPLE_TARGET_DFLL_FREQ_HZ, .pextra_params = &gc_dfllif_ref_opt }; //! @} // Note: on the AT32UC3L-EK and UC3-L0-Xplained board, there are no crystal/external // clock connected to the OSC0 pinout XIN0/XOUT0. We shall then program the DFLL and // switch the main clock source to the DFLL. pcl_configure_clocks(&pcl_dfll_freq_param); // Note: since it is dynamically computing the appropriate field values of the // configuration registers from the parameters structure, this function is not // optimal in terms of code size. For a code size optimal solution, it is better // to create a new function from pcl_configure_clocks_dfll0() and modify it // to use preprocessor computation from pre-defined target frequencies. #else // Configure Osc0 in crystal mode (i.e. use of an external crystal source, with // frequency FOSC0) with an appropriate startup time then switch the main clock // source to Osc0. pcl_switch_to_osc(PCL_OSC0, FOSC0, OSC0_STARTUP); #endif portDBG_TRACE("Starting the FreeRTOS AVR32 UC3 Demo..."); /* Setup the LED's for output. */ vParTestInitialise(); /* Start the standard demo tasks. See the WEB documentation for more information. Note that the UC3L and UC3B parts do not have enough internal RAM to launch all the tasks of this example. That's why some of them are commented out using respectively #if (BOARD != UC3L_EK) or #if (BOARD != EVK1101) compiler directives. */ vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); #if (BOARD != UC3L_EK) vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartDynamicPriorityTasks(); #endif #if (BOARD != EVK1101) && (BOARD != UC3L_EK) vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartMathTasks( tskIDLE_PRIORITY ); #endif /* Start the demo tasks defined within this file, specifically the check task as described at the top of this file. */ xTaskCreate( vErrorChecks , (const signed portCHAR *)"ErrCheck" , configMINIMAL_STACK_SIZE , NULL , mainCHECK_TASK_PRIORITY , NULL ); /* Start the scheduler. */ vTaskStartScheduler(); /* Will only get here if there was insufficient memory to create the idle task. */ return 0; }
void main_full( void ) { /* The baud rate setting here has no effect, hence it is set to 0 to make that obvious. */ xSerialPortInitMinimal( 0, mainUART_QUEUE_LENGTHS ); /* If the file system is only going to be accessed from one task then F_FS_THREAD_AWARE can be set to 0 and the set of example files are created before the RTOS scheduler is started. If the file system is going to be access from more than one task then F_FS_THREAD_AWARE must be set to 1 and the set of sample files are created from the idle task hook function vApplicationIdleHook() - which is defined in this file. */ #if ( mainINCLUDE_FAT_SL_DEMO == 1 )&& ( F_FS_THREAD_AWARE == 0 ) { /* Initialise the drive and file system, then create a few example files. The output from this function just goes to the stdout window, allowing the output to be viewed when the UDP command console is not connected. */ vCreateAndVerifySampleFiles(); } #endif /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartMathTasks( mainFLOP_TASK_PRIORITY ); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); #if mainINCLUDE_FAT_SL_DEMO == 1 { /* Start the tasks that implements the command console on the UART, as described above. */ vUARTCommandConsoleStart( mainUART_COMMAND_CONSOLE_STACK_SIZE, mainUART_COMMAND_CONSOLE_TASK_PRIORITY ); /* Register both the standard and file system related CLI commands. */ vRegisterSampleCLICommands(); vRegisterFileSystemCLICommands(); } #else { /* The COM test tasks can use the UART if the CLI is not used by the FAT SL demo. The COM test tasks require a UART connector to be fitted to the UART port. */ vAltStartComTestTasks( mainCOM_TEST_TASK_PRIORITY, mainBAUD_RATE, mainCOM_TEST_LED ); } #endif /* Create the register check tasks, as described at the top of this file */ xTaskCreate( prvRegTestTaskEntry1, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTaskEntry2, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the task that performs the 'check' functionality, as described at the top of this file. */ xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The set of tasks created by the following function call have to be created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* Start the scheduler. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was either insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created, or vTaskStartScheduler() was called from User mode. See the memory management section on the FreeRTOS web site for more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The mode from which main() is called is set in the C start up code and must be a privileged mode (not user mode). */ for( ;; ); }
/*--------------------------------------------------------------------------- * main() *---------------------------------------------------------------------------*/ void main( void ) { InitIrqLevels(); /* Initialize interrupts */ __set_il( 7 ); /* Allow all levels */ prvSetupHardware(); #if WATCHDOG == WTC_IN_TASK vStartWatchdogTask( WTC_TASK_PRIORITY ); #endif /* Start the standard demo application tasks. */ #if ( INCLUDE_StartLEDFlashTasks == 1 ) vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); #endif #if ( INCLUDE_StartIntegerMathTasks == 1 ) vStartIntegerMathTasks( tskIDLE_PRIORITY ); #endif #if ( INCLUDE_AltStartComTestTasks == 1 ) vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED - 1 ); #endif #if ( INCLUDE_StartPolledQueueTasks == 1 ) vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); #endif #if ( INCLUDE_StartSemaphoreTasks == 1 ) vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); #endif #if ( INCLUDE_StartBlockingQueueTasks == 1 ) vStartBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY ); #endif #if ( INCLUDE_StartDynamicPriorityTasks == 1 ) vStartDynamicPriorityTasks(); #endif #if ( INCLUDE_StartMathTasks == 1 ) vStartMathTasks( tskIDLE_PRIORITY ); #endif #if ( INCLUDE_StartFlashCoRoutines == 1 ) vStartFlashCoRoutines( ledNUMBER_OF_LEDS ); #endif #if ( INCLUDE_StartHookCoRoutines == 1 ) vStartHookCoRoutines(); #endif #if ( INCLUDE_StartGenericQueueTasks == 1 ) vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY ); #endif #if ( INCLUDE_StartQueuePeekTasks == 1 ) vStartQueuePeekTasks(); #endif #if ( INCLUDE_CreateBlockTimeTasks == 1 ) vCreateBlockTimeTasks(); #endif #if ( INCLUDE_CreateSuicidalTasks == 1 ) vCreateSuicidalTasks( mainDEATH_PRIORITY ); #endif #if ( INCLUDE_TraceListTasks == 1 ) vTraceListTasks( TASK_UTILITY_PRIORITY ); #endif /* Start the 'Check' task which is defined in this file. */ xTaskCreate( vErrorChecks, (signed portCHAR *) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); vTaskStartScheduler(); /* Should not reach here */ while( 1 ) { __asm( " NOP " ); /* // */ } }
/* * Create the demo tasks then start the scheduler. */ int main_full( void ) { TimerHandle_t xTimer = NULL; /* Create all the other standard demo tasks. */ vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS ); vCreateBlockTimeTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartInterruptQueueTasks(); vStartISRTriggeredTask(); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY ); vStartQueueSetTasks(); vStartRecursiveMutexTasks(); vStartEventGroupTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* Create the tasks defined within this file. */ xTaskCreate( prvRegTestTask1, /* The function that implements the task. */ "Reg1", /* Text name for the task to assist debugger - not used by FreeRTOS itself. */ configMINIMAL_STACK_SIZE, /* The stack size to allocate for the task - specified in words not bytes. */ NULL, /* The parameter to pass into the task - not used in this case so set to NULL. */ tskIDLE_PRIORITY, /* The priority to assign to the task. */ NULL ); /* Used to obtain a handle to the task being created - not used in this case so set to NULL. */ xTaskCreate( prvRegTestTask2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ xTimer = xTimerCreate( "CheckTimer",/* A text name, purely to help debugging. */ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */ ( void * ) 0, /* The ID is not used, so can be set to anything. */ prvCheckTimerCallback ); /* The callback function that inspects the status of all the other tasks. */ if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); } /* A software timer is also used to start the high frequency timer test. This is to ensure the test does not start before the kernel. This time a one shot software timer is used. */ xTimer = xTimerCreate( "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest ); if( xTimer != NULL ) { xTimerStart( xTimer, mainDONT_BLOCK ); } /* Finally start the scheduler. */ vTaskStartScheduler(); /* If all is well, the scheduler will now be running, and the following line will never be reached. If the following line does execute, then there was insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created. See the memory management section on the FreeRTOS web site for more details. http://www.freertos.org/a00111.html */ for( ;; ); }