您现在的位置:机电论文网>> 嵌入式系统>> 正文内容

Nucleus uiPLUS启动流程(图)

作者: 来源: 发布时间:2009/9/1 10:16:56  点击数:908

 

/*************************uiPLUS初始化简单流程********************************/
/* System Reset          */
/* Hardware initialized         */
/* INT_Initialize(In uiPLUS provided as the file called INT_XXX.YYY)   */
/* INC_Initialize(The kernel executes Nucleus PLUS’s initialization process.)  */
/* Application_Initialize(The kernel calls the initialization routine)   */
/* Configurator calls  uiPLUS’initialization routine in the Application_Initialize */ //When using μiPLUS,you always have to call mIP_Initialize in the top of Application_Initialize routine; however, by using the configurator, this process will be automatically created
/*************************uiPLUS初始化简单流程图******************************/


/*****************************Example****************************/
Ex.) Define task by Configuration File (system.cfg)
#define STACK_SIZE 2048
#define PRIORITY_DEF 1
CRE_TSK(TASK_MAIN, { TA_HLNG|TA_ACT, 1, task_main, PRIORITY_DEF,
STACK_SIZE, NULL });
The Configurator reads the configuration file and outputs kernel_cfg.c
#define STACK_SIZE 2048
#define PRIORITY_DEF 1
char __mip_tsk1_stack[STACK_SIZE];
T_CTSK __mip_tsk1_ctsk;
MIPTSK_DATA __mip_tsk1 = { TASK_MAIN, TA_HLNG|TA_ACT, 1, task_main,
PRIORITY_DEF, STACK_SIZE, __mip_tsk1_stack };
/*--- Kernel initialize ---*/
void Application_Initialize(VOID *first_available_memory)
{
ER errcd;
/* Initialize object management module */
errcd = mIP_Initialize(first_available_memory, TSZ_KERNEL_POOL_SIZE);
__mip_tsk1_ctsk.tskatr = __mip_tsk1.tskatr;
__mip_tsk1_ctsk.exinf = __mip_tsk1.exinf;
__mip_tsk1_ctsk.task = __mip_tsk1.task;
__mip_tsk1_ctsk.itskpri = __mip_tsk1.itskpri;
__mip_tsk1_ctsk.stksz = __mip_tsk1.stksz;
__mip_tsk1_ctsk.stk = __mip_tsk1.stk;
errcd = __cre_tsk(__mip_tsk1.tskid, &__mip_tsk1_ctsk);
_
kernel_cfg.c : The start-up code for creating TASK_MAIN, which has been specified by the static API
in the configuration file, is created. It has not been mentioned here, but kernel_cfg.c outputs the area
needed for the kernel to manage the object as well.

 


更多
字体:【小】-【中】-【大】【关闭此页】

上一篇:基于OMAP1510的Nucleus'   下一篇:SOPC中自定义外设和自定义指令性能'


特别声明:机电之家(http://www.jdzj.com )所共享的机电类资料,机电论文、机电类文章、机电企业类管理制度、机电类软件都来自网上收集,其版权归作者本人所有,如果有任何侵犯您权益的地方,请联系我们,我们将马上进行处理。购买的论文都出自原创,保证作者的原创的版权的转让,任何纠纷由法律解决。