SYS/BIOS 学习历程(一)Creating a SYS/BIOS Project with the TI Resource Explorer
2014-06-06 11:02
513 查看
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
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
相关文章推荐
- 【安卓学习问题日志】The project was not built due to "A resource exists with a different case
- Error: Resource named 'back' does not start with the project's resource prefix 'xxxx';
- android出现the project was not built due to "a resource exists with a different case问题
- 文件系统不同步问题resource is out of sync with the file sys
- Android -- the project was not built due to a resource exists with a different case...
- 【转】eclipse -- the project was not built due to a resource exists with a different case...
- Error creating bean with name 'sysUserController': Injection of resource dependencies failed; nested
- Error creating bean with name 'dwrSysuserDao' defined in ServletContext resource
- 学习spring的入门好书:Professional Java Development with the Spring Framework
- Nullsoft Winamp Plug-in With Bitmapped UI, Docking and Restrictive Resizing - The Code Project - Dialog and Windows
- Professional Java Development with the Spring Framework学习笔记(1) - JdbcTemplate
- Programming Flex 2: The comprehensive guide to creating rich media applications with Adobe Flex
- XML配置出错导致HTTP404问题:The requested resource (/WebMailSys/Inbox) is not available.
- Error creating bean with name 'sessionFactory' defined in ServletContext resource
- how to deal with fdisk error: Re-reading the partition table failed with error 16: Device or resource busy.
- resource is out of sync with the file system
- Resource is out of sync with the file system的解决办法
- tomcat报错:Resource is out of sync with the file system
- Test-Driven C# Improve the Design and Flexibility of Your Project with Extreme Programming Techniques
- Professional Java Development with the Spring Framework学习笔记(1) - JdbcTemplate 中Query的几种用法