Skip to content
John Marquard edited this page Feb 25, 2015 · 5 revisions

Contents

List of Applications

No applications at the moment.

Applications' Location

The applications are located in src > Applications.

Each application will have it's own folder located src > Applications > APPLICATION_NAME, with the application *_app.c and *_app.h files within. The application files should be appended with _app.

Creating a new application

This needs to be updated.

Notes

  • Applications are saved in the folder ../src/Applications/"Application Name"/
  • All application *.c and *.h files should be saved in the relevant application folder
  • The application needs to include a function to run xTaskCreate, portTASK_FUNCTION, and portTASK_FUNCTION_PROTO
  • Add '#include <"Application Name"/*.h> into main_full under "BLUESAT APPLICATIONS"
  • Start the application in main_full()
  • Important: 'vTaskNameTask' must be exactly the same in all cases below.
  • Important: 'vStartTaskNameTasks' must be exactly the same in main_full() and the application *.c and *.h files.

In the Application *.c and *.h files

portTASK_FUNCTION_PROTO
static portTASK_FUNCTION_PROTO( vTaskNameTask, pvParameters );

Change:

  • 'vTaskNameTask' to the name of the application, retain the 'v' at the front and 'Task' at the end.
Starting the Application
void vStartTaskNameTasks( UBaseType_t uxPriority )
{
	short sTask;
	
	for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ )
	{
		xTaskCreate( vTaskNameTask, "TaskName", intgSTACK_SIZE, ( void * ) &( xTaskCheck[ sTask ] ), uxPriority, ( TaskHandle_t * ) NULL );
	}
}

Change:

  • 'vStartTaskNameTasks' to the name of the application with the 'vStart' at the front and 'Tasks' at the end.
  • 'vTaskNameTask' to the name of the application, retain the 'v' at the front and 'Task' at the end.
  • 'TaskName' to the name of the application.

Have a look at the freeRTOS page on xTaskCreate for more information on xTaskCreate and its parameters.

portTASK_FUNCTION

This is just an overview of the structure; missing error handling.

static portTASK_FUNCTION( vTaskNAmeTask, pvParameters )
{
	for( ;; )
	{		
		// Application code goes inside here
	}
}

Change:

  • 'vTaskNameTask' to the name of the application, retain the 'v' at the front and 'Task' at the end.

In main_full()

/* BLUESAT APPLICATIONS - INCLUDES */
#include <TaskName/TaskName_app.h>
void main_full( void )
{
	...
	/* BLUESAT APPLICATIONS - START*/
	vStartTaskNameTasks( tskIDLE_PRIORITY );
	...
}

Change:

  • 'TaskName' to the name of the application.
  • 'vStartTaskNameTasks' to the name of the application with the 'vStart' at the front and 'Tasks' at the end.