1/* 2* This file contains an example of a simple RTEMS 3* application. It instantiates the RTEMS Configuration 4* Information using confdef.h and contains two tasks: 5* a user initialization task and a simple task. 6*/ 7 8#include<rtems.h> 910rtems_taskuser_application(rtems_task_argumentargument);1112rtems_taskinit_task(13rtems_task_argumentignored14)15{16rtems_idtid;17rtems_status_codestatus;18rtems_namename;1920name=rtems_build_name('A','P','P','1')2122status=rtems_task_create(23name,1,RTEMS_MINIMUM_STACK_SIZE,24RTEMS_NO_PREEMPT,RTEMS_FLOATING_POINT,&tid25);26if(status!=RTEMS_SUCCESSFUL){27printf("rtems_task_create failed with status of %d.\n",status);28exit(1);29}3031status=rtems_task_start(tid,user_application,0);32if(status!=RTEMS_SUCCESSFUL){33printf("rtems_task_start failed with status of %d.\n",status);34exit(1);35}3637status=rtems_task_delete(SELF);/* should not return */3839printf("rtems_task_delete returned with status of %d.\n",status);40exit(1);41}4243rtems_taskuser_application(rtems_task_argumentargument)44{45/* application specific initialization goes here */46while(1){/* infinite loop */47/* APPLICATION CODE GOES HERE48 *49 * This code will typically include at least one50 * directive which causes the calling task to51 * give up the processor.52 */53}54}5556/* The Console Driver supplies Standard I/O. */57#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER58/* The Clock Driver supplies the clock tick. */59#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER60#define CONFIGURE_MAXIMUM_TASKS 261#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'E', 'X', 'A', 'M' )62#define CONFIGURE_RTEMS_INIT_TASKS_TABLE63#define CONFIGURE_INIT64#include<rtems/confdefs.h>