Introduction

 
VxWorks is a real-time operating system (RTOS) designed for embedded systems, known for its reliability, performance, and scalability. This guide outlines the general procedure for developing applications with VxWorks 7 using the Wind River Workbench environment.

Prerequisites

  • Software:
    • VxWorks 7 SDK (Software Development Kit)
    • Wind River Workbench 4
    • Access to VxWorks documentation (available within Workbench or online)
  • Hardware:
    • A development host (Windows or Linux supported)
    • Target hardware or a simulator (like QEMU or VxWorks Simulator)
  • Knowledge:
    • Basic understanding of C/C++ programming
    • Familiarity with real-time systems concepts

Step-by-Step Development Procedure

1. Setup Development Environment

  • Install VxWorks 7 SDK: Follow the installation guide provided by Wind River to set up the SDK on your host system.
  • Configure Workbench:
    • Start Workbench.
    • Ensure all paths are correctly set in the environment variables (e.g., WIND_HOME, WIND_BASE).

2. Create a VxWorks Source Build (VSB) Project

  • Navigate to the VxWorks directory in Workbench.
  • Select 'File' > 'New' > 'VxWorks Source Build Project'.
  • Choose your BSP (Board Support Package). If developing for a custom board, you might need to create or modify an existing BSP.
  • Configure the layers and components you need for your project. For example, add layers like USER_MANAGEMENT for security features.

3. Build the VSB

  • Right-click on your VSB project > 'Build Project'. This step compiles all the components into a library that can be used by your application.

4. Create a VxWorks Image Project (VIP)

  • From Workbench, 'File' > 'New' > 'VxWorks Image Project'.
  • Link this project to your VSB by selecting it during creation.
  • Configure your boot parameters, network settings, etc., according to your application's needs.

5. Develop Your Application

  • Write Your Code: Use C or C++ for application development. You can write kernel mode applications (DKMs) or user mode applications (RTPs).
    • For DKMs:
      • Use kernel APIs for system calls.
      • Ensure your code interacts correctly with the kernel environment.
    • For RTPs:
      • Develop in a more isolated environment with memory protection.
  • Integrate with VxWorks:
    • Add your source files to your VIP.
    • Use the vxprj command line tools or Workbench UI to add components or modify configurations.

6. Build the Application

  • Build your VIP which includes your application. This will compile your code and link it with the VxWorks libraries.

7. Test and Debug

  • Simulator: Use the VxWorks simulator for initial testing without hardware.
    • Launch the simulator from Workbench or command line (vxsim).
    • Load and run your application.
  • Physical Hardware:
    • Deploy your image to the target hardware.
    • Use Workbench's debugging tools to step through your code, set breakpoints, etc.

8. Optimize and Refine

  • Use system analysis tools in Workbench to profile your application, check for memory leaks, or optimize task scheduling.

9. Documentation and Finalization

  • Document your application, including how to configure, build, and deploy it.
  • Ensure all necessary components and configurations are documented for future maintenance or team handover.

Additional Considerations

  • Security: If your application involves user authentication, ensure to configure USER_MANAGEMENT properly as described in VxWorks documentation.
  • Networking: If network functionality is required, configure network components in your VSB/VIP.
  • Updates: Regularly check for updates or patches from Wind River to keep your development environment robust and secure.

Conclusion

This guide provides a foundational approach to developing with VxWorks 7. For detailed procedures on specific modules or advanced features, refer to the official VxWorks documentation or consider the training courses offered by Wind River. Remember, each development project might have unique requirements, so adapt this guide to fit those needs.