Aurix-OIL -例程

以下内容是实现书籍

OSEKVCX汽车电子嵌入式软件编程技术的内容,英文:Programming in the OSEK-VDX

1:实现启动

OIL 例子

CPU TC27X {
    OS IFX_TRICORE {
        MCU_DATA = TRICORE {
            MODEL = TC27x;
        };
        
        CPU_DATA = TRICORE {
            CPU_CLOCK = 200.0;
            COMPILER_TYPE = GNU;
            MULTI_STACK = TRUE {
                IRQ_STACK = TRUE {
                    SYS_SIZE = 256;
                };
            };
        };
        STATUS = EXTENDED; 
        STARTUPHOOK = FALSE;
        SHUTDOWNHOOK = FALSE;
        PRETASKHOOK = FALSE;
        POSTTASKHOOK = FALSE;
        ERRORHOOK = FALSE;
        USERESSCHEDULER = FALSE;
        KERNEL_TYPE = ECC2;
    };
    
    APPMODE SINGLE_PLAYER {
        VALUE = AUTO;
    };
 
    TASK IFX_OSTASK_BACKGROUND{
    	SCHEDULE = NON; 
        PRIORITY = 1; 
        ACTIVATION = 1;
        AUTOSTART = TRUE; 
        STACK = PRIVATE {
            SYS_SIZE = 256;
        };
    };

};

例程

void Ifx_OSTask_ApplicationInit(void)
{
    IfxStm_enableOcdsSuspend (&MODULE_STM0);
	StartOS(SINGLE_PLAYER);
}


uint32 Ifx_OSTask_Background_Count;
TASK(IFX_OSTASK_BACKGROUND)
{
	Ifx_OSTask_Background_Count++;
	/*Add your code here*/

	TerminateTask();
}

完整下载:https://download.csdn.net/download/qq_24629245/12327277

 

 

 

 

 

 

 

 

你可能感兴趣的:(Aurix)