SYS/BIOS 学习历程(一)Creating a SYS/BIOS Project with the TI Resource Explorer

Creating a SYS/BIOS Project with the TI Resource Explorer



Notational Conventions
This document uses the following conventions:
• Program listings, program examples, and interactive displays are shown in a special typeface.
Examples use a bold version of the special typeface for emphasis.
Here is a sample program listing:

#include <xdc/runtime/System.h>
int main(){
System_printf("Hello World!\n");
return (0);
}
• Square brackets ( [ and ] ) identify an optional parameter. If you use an optional parameter, you
specify the information within the brackets. Unless the square brackets are in a bold typeface, do not
enter the brackets themselves.


#include <xdc/std.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <xdc/runtime/System.h>//
/*======== taskFxn ========*/
Void taskFxn(UArg a0, UArg a1)
{
    System_printf("enter taskFxn()\n");
    Task_sleep(10);
    System_printf("exit taskFxn()\n");
}
/*======== main ======== */
Int main()

    Task_Handle task;
    Error_Block eb;
    System_printf("enter main()\n");
    Error_init(&eb);
    task = Task_create(taskFxn, NULL, &eb);
    if (task == NULL) {
        System_printf("Task_create() failed!\n");
        BIOS_exit(0);
    }
    BIOS_start();    /* does not return */
    return(0);
}


参考:TI SYS/BIOS v6.35 Real-time Operating System User's Guide



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值