logo资料库

vxworks移植指南5.5到6.8.pdf

第1页 / 共73页
第2页 / 共73页
第3页 / 共73页
第4页 / 共73页
第5页 / 共73页
第6页 / 共73页
第7页 / 共73页
第8页 / 共73页
资料共73页,剩余部分请下载后查看
VxWorks 5.5 Migration Guide, 6.8
Contents
1 Overview
1.1 Introduction
1.2 Terminology
1.3 Related Documentation
2 Development Environment Changes
2.1 Introduction
2.2 Environment Variables and Development Shell
2.3 Directory Structure
2.4 Build Infrastructure
2.4.1 Makefile and make Changes
2.4.2 Recompiling VxWorks Source Code
2.4.3 Compiling Source Code for Both VxWorks 6.x and VxWorks 5.5
2.5 Compilers
2.5.1 Macros to Assist Migration
2.5.2 Default Compiler Change
2.5.3 Stricter Syntax Checking
2.5.4 Extra Compiler Command-line Flags
2.5.5 Additional Build Flags
2.5.6 GNU Compiler Options
2.5.7 objcopy Replaces Wind River Utilities
2.5.8 Optimization at -O3 Level Unsupported
2.6 C and C++ Libraries
2.6.1 Dinkum C and C++ Libraries
2.6.2 ASCII Routines
2.6.3 Standard Template Library
2.7 IDE and CLI Configuration and Build Tools
2.7.1 Configuration and Build Using config.h
2.7.2 vxWorks.st Image Type
3 VxWorks Changes
3.1 Introduction
3.2 Boot Loaders
3.3 BSPs and Drivers
3.4 VxWorks 5.5-Compatible Configuration
3.5 VxWorks Initialization Routines
3.6 Power Management
3.7 C and C++ Libraries
3.8 Private VxWorks Routines
3.9 Multitasking
3.9.1 Task Creation
3.9.2 Task Priority Changes
3.9.3 Task Switch Hooks and Scheduling
3.9.4 Task Information
TCB Access
Task-Specific Variables: taskVarLib and tlsLib
activeQhead
3.9.5 Task Self-destruction
3.9.6 Semaphores
Semaphore Initialization
semOLib Library Removed
Stricter Error Checking on Semaphores
3.9.7 Lazy Initialization
3.9.8 Signals
3.9.9 Exception Handling
3.9.10 Private HASH_TBL Structure
3.9.11 ISRs and C++
3.10 POSIX Facilities
3.10.1 POSIX Header Files
3.10.2 POSIX Thread Routines
3.10.3 POSIX Semaphores
3.10.4 POSIX Message Queues
3.10.5 POSIX I/O System Device Control
3.10.6 POSIX Signals
3.10.7 POSIX Clock and Timer
3.10.8 Macro to Reverse POSIX String and Timer Routine Changes
3.11 Memory Management
3.11.1 Modified Routines
3.11.2 Memory Partition Options
3.11.3 VxVMI and Changed Virtual Memory Routines
3.12 Cache Management
3.13 I/O System
3.13.1 I/O Error Code Value Changes
3.13.2 New Device Driver Infrastructure: VxBus
3.14 Local File Systems
3.14.1 CBIO Interface Replaced by XBD Interface
3.14.2 File System Monitor
3.14.3 Disk Formatting
3.14.4 ioctl( ) Commands Removed
3.14.5 usrFsLib
3.14.6 dosFS
3.14.7 tapeFs
3.14.8 rt11Fs
3.14.9 RAM Disk
3.14.10 pathLib
3.15 VxVMI
3.15.1 vmBaseStateSet( ) and vmStateSet( ) Behavior Changes
3.15.2 VxVMI Routines and VxWorks 6.x Replacements
3.15.3 VxVMI and RTP Applications
3.16 VxFusion
3.17 Target Tools: Symbol Table, Loader, Shell, and WDB
3.17.1 Symbol Table and Module Changes
3.17.2 symLib Routines
3.17.3 Kernel Object Module Loader
3.17.4 Target Shell/Kernel Shell
3.18 WindView and System Viewer: wvLib
3.19 Architecture-Specific Issues
4 Migrating BSPs and Drivers
4.1 Introduction
4.2 Migrating BSPs
4.2.1 Planning for BSP Migration
4.2.2 BSP Migration Steps
4.2.3 PowerPC and MIPS BSPs and SDA
4.2.4 Replacing VM_STATE_xxx Macros
4.2.5 Addressing Compiler Errors and Warnings
4.2.6 Implementing the Boot Loader M Command
4.2.7 Converting BSP Documentation
4.3 Testing BSPs
4.4 Migrating Drivers
Index
VxWorks 5.5 Migration Guide, 6.8 VxWorks ® 5.5 MIGRATION GUIDE 6.8
Copyright © 2009 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 the following location: installDir/product_name/3rd_party_licensor_notice.pdf. 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: Facsimile: 510-748-4100 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 5.5 Migration Guide 6.8 28 Oct 09
Contents 1 Overview ...................................................................................................... 1.1 1.2 1.3 Introduction ...................................................................................................................... Terminology ..................................................................................................................... Related Documentation ................................................................................................. 2 Development Environment Changes ....................................................... 2.1 2.2 2.3 2.4 Introduction ...................................................................................................................... Environment Variables and Development Shell ...................................................... Directory Structure .......................................................................................................... Build Infrastructure ........................................................................................................ 2.4.1 Makefile and make Changes ........................................................................... 2.4.2 2.4.3 Recompiling VxWorks Source Code .............................................................. Compiling Source Code for Both VxWorks 6.x and VxWorks 5.5 ............. 2.5 Compilers .......................................................................................................................... 2.5.1 Macros to Assist Migration .............................................................................. 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 Default Compiler Change ................................................................................ Stricter Syntax Checking .................................................................................. Extra Compiler Command-line Flags ............................................................ Additional Build Flags ..................................................................................... GNU Compiler Options ................................................................................... objcopy Replaces Wind River Utilities ........................................................... Optimization at -O3 Level Unsupported ....................................................... 2.6 C and C++ Libraries ........................................................................................................ 2.6.1 Dinkum C and C++ Libraries .......................................................................... 1 1 2 3 5 5 5 6 6 7 7 7 8 8 8 9 10 10 11 11 11 11 12 iii
VxWorks 5.5 Migration Guide, 6.8 2.6.2 2.6.3 ASCII Routines .................................................................................................. Standard Template Library .............................................................................. 2.7 IDE and CLI Configuration and Build Tools ............................................................ 2.7.1 2.7.2 Configuration and Build Using config.h ....................................................... vxWorks.st Image Type .................................................................................... 12 12 13 13 13 3 VxWorks Changes ..................................................................................... 15 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 Introduction ...................................................................................................................... Boot Loaders ..................................................................................................................... BSPs and Drivers ............................................................................................................. VxWorks 5.5-Compatible Configuration .................................................................... VxWorks Initialization Routines ................................................................................. Power Management ........................................................................................................ C and C++ Libraries ........................................................................................................ Private VxWorks Routines ............................................................................................ 3.9 Multitasking ..................................................................................................................... 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 Task Creation ..................................................................................................... Task Priority Changes ...................................................................................... Task Switch Hooks and Scheduling ............................................................... Task Information ............................................................................................... TCB Access ......................................................................................................... Task-Specific Variables: taskVarLib and tlsLib ............................................ activeQhead ....................................................................................................... Task Self-destruction ........................................................................................ Semaphores ........................................................................................................ Semaphore Initialization .................................................................................. semOLib Library Removed ............................................................................. Stricter Error Checking on Semaphores ......................................................... Lazy Initialization ............................................................................................. Signals ................................................................................................................. Exception Handling .......................................................................................... 3.9.10 Private HASH_TBL Structure ......................................................................... 3.9.11 ISRs and C++ ..................................................................................................... 3.10 POSIX Facilities ............................................................................................................... 3.10.1 POSIX Header Files ........................................................................................... 16 16 17 18 18 18 18 19 19 19 19 19 20 20 20 21 21 22 22 22 22 23 23 23 24 24 25 25 iv
Contents 3.10.2 POSIX Thread Routines .................................................................................... 3.10.3 POSIX Semaphores ........................................................................................... 3.10.4 POSIX Message Queues ................................................................................... 3.10.5 POSIX I/O System Device Control ................................................................. 3.10.6 POSIX Signals .................................................................................................... 3.10.7 POSIX Clock and Timer ................................................................................... 3.10.8 Macro to Reverse POSIX String and Timer Routine Changes .................... 3.11 Memory Management .................................................................................................... 3.11.1 Modified Routines ............................................................................................. 3.11.2 Memory Partition Options ............................................................................... 3.11.3 VxVMI and Changed Virtual Memory Routines ......................................... 3.12 Cache Management ......................................................................................................... 3.13 I/O System ........................................................................................................................ 3.13.1 I/O Error Code Value Changes ...................................................................... 3.13.2 New Device Driver Infrastructure: VxBus .................................................... 3.14 Local File Systems ........................................................................................................... 3.14.1 CBIO Interface Replaced by XBD Interface ................................................... 3.14.2 File System Monitor .......................................................................................... 3.14.3 Disk Formatting ................................................................................................. 3.14.4 ioctl( ) Commands Removed ........................................................................... 3.14.5 usrFsLib .............................................................................................................. 3.14.6 dosFS ................................................................................................................... 3.14.7 tapeFs .................................................................................................................. 3.14.8 rt11Fs ................................................................................................................... 3.14.9 RAM Disk ........................................................................................................... 3.14.10 pathLib ................................................................................................................ 3.15 VxVMI ............................................................................................................................... 3.15.1 vmBaseStateSet( ) and vmStateSet( ) Behavior Changes ............................. 3.15.2 VxVMI Routines and VxWorks 6.x Replacements ....................................... 3.15.3 VxVMI and RTP Applications ......................................................................... 3.16 VxFusion ........................................................................................................................... 3.17 Target Tools: Symbol Table, Loader, Shell, and WDB ............................................ 3.17.1 Symbol Table and Module Changes .............................................................. 3.17.2 symLib Routines ................................................................................................ 3.17.3 Kernel Object Module Loader ......................................................................... 26 28 28 29 29 30 30 30 30 31 32 32 33 33 34 34 34 36 36 37 37 37 38 39 39 39 39 40 40 41 42 42 42 42 43 v
VxWorks 5.5 Migration Guide, 6.8 3.17.4 Target Shell/Kernel Shell ................................................................................. 3.18 WindView and System Viewer: wvLib ...................................................................... 3.19 Architecture-Specific Issues .......................................................................................... 45 46 47 4 Migrating BSPs and Drivers ...................................................................... 49 4.1 Introduction ...................................................................................................................... 4.2 Migrating BSPs ................................................................................................................ 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 Planning for BSP Migration ............................................................................. BSP Migration Steps .......................................................................................... PowerPC and MIPS BSPs and SDA ................................................................ Replacing VM_STATE_xxx Macros ................................................................ Addressing Compiler Errors and Warnings ................................................. Implementing the Boot Loader M Command ............................................... Converting BSP Documentation ..................................................................... 4.3 Testing BSPs ..................................................................................................................... 4.4 Migrating Drivers ............................................................................................................ 49 50 50 51 54 55 57 57 58 60 60 Index ..................................................................................................................... 61 vi
1 Overview 1.1 Introduction 1 1.2 Terminology 2 1.3 Related Documentation 3 1.1 Introduction This guide provides information about migrating VxWorks 5.5 code to the current VxWorks 6.x release (uniprocessor configuration). In particular it deals with the following: ■ ■ Changes in the development environment. Changes to core operating system features that are relevant to kernel-based (supervisor mode) applications and other custom kernel code. ■ Guidelines for migrating BSPs. ■ General information about migrating drivers. For information about migrating code between VxWorks 6.previous and 6.current releases, see the migration guide for your Wind River platform. For information about migrating kernel applications to real-time process (RTP) user-mode applications, see the VxWorks Application Programmer’s Guide. For general information about VxWorks development, see 1.3 Related Documentation, p.3. NOTE: This guide does not provide information about migrating VxWorks 5.5 middleware or networking applications to the current VxWorks 6.x release. 1
VxWorks 5.5 Migration Guide, 6.8 1.2 Terminology The following terms describe features of VxWorks, Wind River Workbench, and related development tools. VxWorks Terms real-time process (RTP) The user-mode application execution environment provided by VxWorks 6.x. Each real-time process has its own address space, containing the executable program, the program data, execution and exception stacks for each task, the heap, and resources associated with the management of the process itself. component A VxWorks facility that can be included or excluded, making VxWorks scalable. error detection and reporting The runtime facility for detecting errors, logging error information, and making that information available across a warm reboot. Project-related Terms project A collection of source code, binary files, and build specifications within the development environment (using Workbench or vxprj). VxWorks image project The project type used to configure and build VxWorks images. downloadable kernel module project The project type used to manage and build dynamically linked application modules that run in kernel mode. real-time process project The project type used to manage and build statically or dynamically linked application modules into an executable that can be dynamically downloaded and run as a real-time process. shared-library project The project type used to manage and build dynamically linked shared libraries. Tool-related Terms toolchain A collection of development tools for a specific target CPU; includes the compiler, linker, assembler, and so on. build specification User-specified settings and rules that are used to build a project. graphical user interface The interactive, graphical face (GUI) of Workbench. Workbench also offers a command-line interface. For more information on Workbench, see the Wind River Workbench User’s Guide. For more information on the command line, see the VxWorks Command-Line Tools User’s Guide. 2
分享到:
收藏