Skip to content

Commit

Permalink
Fix reliability issues in CMake sample (#835)
Browse files Browse the repository at this point in the history
* Fix reliability issues in CMake example sample.
  • Loading branch information
kar-rahul-aws authored Oct 17, 2023
1 parent 30283b5 commit 59ba98b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cmake_example/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ];

void exampleTask( void * parameters )
{
/* Unused parameters. */
( void ) parameters;

for( ; ; )
{
/* Example Task Code */
vTaskDelay( 100 ); /* delay 100 ticks */
}
}

int main( void )
void main( void )
{
printf( "Example FreeRTOS Project\n" );

Expand All @@ -71,19 +74,22 @@ int main( void )
exampleTaskStack,
&exampleTaskTCB );

/* Start the scheduler. */
vTaskStartScheduler();

/* should never get here. */
for( ; ; )
{
/* Should not reach here. */
}

return 0;
}

void vApplicationStackOverflowHook( TaskHandle_t xTask,
char * pcTaskName )
{
/* Check pcTaskName for the name of the offending task,
* or pxCurrentTCB if pcTaskName has itself been corrupted. */
( void ) xTask;
( void ) pcTaskName;
}

void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
Expand Down

0 comments on commit 59ba98b

Please sign in to comment.