没有合适的资源?快使用搜索试试~ 我知道了~
vxworks_application_programmers_guide_6.9.pdf
需积分: 5 2 下载量 106 浏览量
2022-06-23
10:30:17
上传
评论
收藏 2.39MB PDF 举报
温馨提示
试读
388页
vxworks_application_programmers_guide_6.9
资源详情
资源评论
资源推荐
VxWorks
APPLICATION PROGRAMMER'S GUIDE
6.9
Edition 8
®
VxWorks Application Programmer's Guide, 6.9
Copyright © 2014 Wind River Systems, Inc.
All rights reserved. No part of this publication may be reproduced or transmitted in any
form or by any means without the prior written permission of Wind River Systems, Inc.
Wind River, Tornado, and VxWorks are registered trademarks of Wind River Systems, Inc.
The Wind River logo is a trademark of Wind River Systems, Inc. Any third-party
trademarks referenced are the property of their respective owners. For further information
regarding Wind River trademarks, please see:
www.windriver.com/company/terms/trademark.html
This product may include software licensed to Wind River by third parties. Relevant
notices (if any) are provided in your product installation at one of the following locations:
installDir/product_name/3rd_party_licensor_notice.pdf
installDir/legal-notices/
Wind River may refer to third-party documentation by listing publications or providing
links to third-party Web sites for informational purposes. Wind River accepts no
responsibility for the information provided in such third-party documentation.
Corporate Headquarters
Wind River
500 Wind River Way
Alameda, CA 94501-1153
U.S.A.
Toll free (
U.S.A.): 800-545-WIND
Telephone: 510-748-4100
Facsimile: 510-749-2010
For additional contact information, see the Wind River Web site:
www.windriver.com
For information on how to contact Customer Support, see:
www.windriver.com/support
VxWorks
Application Programmer's Guide
6.9
Edition 8
25 Nov 14
iii
Contents
1 Overview ...................................................................................................... 1
1.1 Introduction ...................................................................................................................... 1
1.2 Kernel Architecture .........................................................................................................1
1.3 Related Documentation Resources .............................................................................. 2
1.4 VxWorks Configuration and Build .............................................................................. 3
2 Real-Time Processes: RTPs ...................................................................... 5
2.1 Introduction ...................................................................................................................... 6
2.2 About Real-time Processes ............................................................................................ 6
2.2.1 RTPs and Scheduling ........................................................................................ 7
2.2.2 RTP Creation ...................................................................................................... 7
2.2.3 RTP Termination ................................................................................................ 8
2.2.4 RTPs and Memory ............................................................................................. 9
2.2.5 RTPs and Tasks .................................................................................................. 10
Numbers of Tasks and RTPs ............................................................................ 10
Initial Task in an RTP ........................................................................................ 10
RTP Tasks and Memory .................................................................................... 10
2.2.6 RTPs and Inter-Process Communication ....................................................... 11
2.2.7 RTPs, Inheritance, Zombies, and Resource Reclamation ............................ 11
Inheritance .......................................................................................................... 11
Zombie Processes .............................................................................................. 11
Resource Reclamation ....................................................................................... 12
2.2.8 RTPs and Environment Variables ................................................................... 12
Setting Environment Variables From Outside a Process ............................. 12
Setting Environment Variables From Within a Process ............................... 13
2.2.9 RTPs and POSIX ................................................................................................ 13
POSIX PSE52 Support ....................................................................................... 13
VxWorks
Application Programmer's Guide, 6.9
iv
2.3 Configuring VxWorks For Real-time Processes ....................................................... 14
2.3.1 Basic RTP Support ............................................................................................. 14
2.3.2 RTP Virtual Memory Management ................................................................ 15
2.3.3 MMU Support for RTPs ................................................................................... 15
2.3.4 Additional Component Options ..................................................................... 15
2.3.5 Configuration and Build Facilities .................................................................. 16
2.4 About RTP Overlapped Virtual Memory ................................................................... 16
2.5 RTP Overlapped Virtual Memory for 32-Bit VxWorks ............................................ 19
2.5.1 About Overlapped RTP VM for Absolutely-Linked Executables .............. 19
2.5.2 Using Overlapped RTP VM for Absolutely-Linked Executables with 32-Bit
VxWorks ............................................................................................................. 19
About User Regions and the RTP Code Region .......................................... 20
Defining the RTP Code Region ...................................................................... 22
2.6 RTP Overlapped Virtual Memory for 64-Bit VxWorks ............................................ 27
2.7 Other RTP Virtual Memory Options for 32-Bit VxWorks ....................................... 28
2.7.1 About Default RTP Overlapped Virtual Memory for 32-Bit VxWorks ..... 28
Using Default Overlapped RTP VM ............................................................... 29
2.7.2 Flat RTP Virtual Memory for 32-Bit VxWorks .............................................. 30
System Memory Map with RTPs Running .................................................... 30
Using Flat RTP Virtual Memory ...................................................................... 33
Using RTPs Without MMU Support .............................................................. 33
3 RTP Applications ........................................................................................ 35
3.1 Introduction ...................................................................................................................... 35
3.2 Comparing Kernel Applications with RTP Applications ....................................... 36
3.3 Configuring VxWorks For RTP Applications ........................................................... 37
3.4 Developing RTP Applications ...................................................................................... 37
RTP Applications With Shared Libraries and Plug-Ins ............................... 38
RTP Applications for UP and SMP Configurations of VxWorks ............... 38
Migrating Kernel Applications to RTP Applications ................................... 38
3.4.1 RTP Application Structure ............................................................................... 38
3.4.2 VxWorks Header Files ...................................................................................... 39
POSIX Header Files ........................................................................................... 39
VxWorks Header File: vxWorks.h ................................................................... 39
Other VxWorks Header Files ........................................................................... 40
ANSI Header Files ............................................................................................ 40
ANSI C++ Header Files .................................................................................... 40
Compiler -I Flag ................................................................................................. 40
VxWorks Nested Header Files ........................................................................ 40
Contents
v
VxWorks Private Header Files ........................................................................ 41
3.4.3 Custom Header Files ........................................................................................ 41
3.4.4 RTP Application APIs: System Calls and Library Routines ....................... 42
VxWorks System Calls ...................................................................................... 42
VxWorks Libraries ............................................................................................. 43
Dinkum C and C++ Libraries .......................................................................... 43
Custom Libraries ............................................................................................... 43
API Documentation .......................................................................................... 43
3.4.5 RTP Applications and Multitasking ............................................................... 43
3.4.6 Checking for Required Kernel Support ......................................................... 44
3.4.7 Using Hook Routines ........................................................................................ 44
3.4.8 Developing C++ Applications ......................................................................... 44
3.4.9 Using POSIX Facilities ...................................................................................... 44
3.4.10 Tools for Building RTP Applications .............................................................. 44
3.4.11 Using Absolutely-Linked RTP Applications ................................................ 45
Absolutely-Linked RTP Executables for 64-Bit VxWorks ........................... 45
Absolutely-Linked RTP Executables for 32-Bit VxWorks ........................... 45
3.4.12 Reducing Executable File Size With the strip Facility .................................. 46
3.5 Developing Static Libraries, Shared Libraries and Plug-Ins .................................. 47
3.6 Creating and Using Shared Data Regions .................................................................. 47
3.6.1 Configuring VxWorks for Shared Data Regions ........................................... 48
3.6.2 Creating Shared Data Regions ........................................................................ 48
3.6.3 Accessing Shared Data Regions ...................................................................... 49
3.6.4 Deleting Shared Data Regions ......................................................................... 50
3.7 Executing RTP Applications ......................................................................................... 50
Caveat for Using Stripped Executables With 32-bit VxWorks .................... 51
Starting an RTP Application ............................................................................ 52
Stopping an RTP Application .......................................................................... 52
Storing Application Executables ..................................................................... 53
3.7.1 Running Applications Interactively ............................................................... 53
Starting Applications ........................................................................................ 53
Terminating Applications ................................................................................ 54
3.7.2 Running Applications Automatically ............................................................ 54
Startup Facility Options ................................................................................... 55
Application Startup String Syntax .................................................................. 56
Specifying Applications with a Startup Configuration Parameter ............ 57
Specifying Applications with a Boot Loader Parameter ............................. 57
Specifying Applications with a VxWorks Shell Script ................................. 58
Specifying Applications with usrRtpAppInit( ) .......................................... 59
3.7.3 Spawning Tasks and Executing Routines in an RTP Application .............. 59
3.7.4 Applications and Symbol Registration .......................................................... 60
剩余387页未读,继续阅读
ppcust
- 粉丝: 38
- 资源: 725
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0