2、 团段 New一个新的file
3、 Build
6、 Run Kernel Task 会d出下图
7、 点击Browse
8、点击ok
9、点逗裂击run
在VxWorks启动时自动弊升誉运行自己的程序方法:方法一:
右击任务栏空白租段处-属性-自定义-勾选“启用拖放” ;
左键拖动程序执行文件(.exe,.bat...)的快捷方式,到左下角的开始,不要松鼠标;等菜单d出,仍然不要松鼠标,移动鼠标到所有程序-启动-空内,松开鼠标 。就可以了。
方法二:
打开C:\Documents and Settings\你的用户名\「开始」菜单\程序\启动,将可执行文件的笑茄快捷方式拷贝到这里就可以了。
用普通的文件open()函数就可以了.#include <ioLib.h>open( )NAMEopen( ) - open a fileSYNOPSISint open(const char * name, /* name of the file to open */int flags, /* O_RDONLY, O_WRONLY, O_RDWR, or O_CREAT */int mode /* mode of file to create (UNIX chmod style) */)DESCRIPTIONThis routine opens a file for reading, writing, or updating, and returns a file descriptor for that file. The arguments to open( ) are the filename and the type of access: O_RDONLY (0) (or READ) - open for reading only. O_WRONLY (1) (or WRITE) - open for writing only. O_RDWR (2) (or UPDATE) - open for reading and writing. O_CREAT (0x0200) - create a file. In general, open( ) can only open pre-existing devices and files. However, for NFS network devices only, files can also be created with open( ) by performing a logical OR operation with O_CREAT and the flags argument. In this case, the file is created with a UNIX chmod-style file mode, as indicated with mode. For example: fd = open ("/usr/myFile", O_CREAT | O_RDWR, 0644)Only the NFS driver uses the mode argument. NOTEFor more information about situations when there are no file descriptors available, see the manual entry for iosInit( ). RETURNSA file descriptor number, or ERROR if a file name is not specified, the device does not exist, no file descriptors are available, or the driver returns ERROR. ERRNOELOOP SEE ALSOioLib, creat( ) VARARGS2 其中creat和open效顷拿告果一样,他们最终调用同一个函数,敏乱最终文件保存在你设置里放vxworks的位置,比如我的就放在D:\目录雀明下了,试试看吧欢迎分享,转载请注明来源:内存溢出
评论列表(0条)