Skip to main content

Porting Legacy VxWorks 6.9 BSPs to VxWorks 7

·617 words·3 mins
VxWorks BSP Porting PPC VxBus Migration
Table of Contents

Porting legacy VxWorks 6.9 BSPs to VxWorks 7 involves handling substantial structural changes, updating directory hierarchies, and migrating VxBus drivers. This guide provides a detailed, expert-level roadmap to ensure full compatibility while leveraging VxWorks 7 features.


🛠 Why Porting is Necessary
#

VxWorks 7 introduces critical improvements over version 6.9.x:

  • Modern VxBus Infrastructure: Replaces hard-coded device info with dynamic device probing.
  • New Directory Structure: BSPs and drivers follow a reorganized hierarchy, requiring updates to include paths.
  • Component Separation: Processor-specific and board-specific elements are decoupled, improving modularity and maintainability.

Porting ensures BSPs remain compatible, maintainable, and ready for long-term development.


📁 Source Tree Changes
#

Category VxWorks 6.9.3.x VxWorks 7
BSP Location target/config pkgs/os/board/bsp_legacy-6.9.0.0/
Driver Source target/src/hwif pkgs/os/drv/vxbus_legacy-version_string/src
Driver Header target/h/hwif/ target/src/hwif/h/ or pkgs/os/drv/vxbus_legacy-version_string/h/
Driver Support Files target/config/comps/vxWorks pkgs/os/drv/vxbus_legacy-version_string/cdf/

version_string refers to the vxbus_legacy package version, e.g., 1.0.0.0 for initial release, higher for updates (e.g., 1.0.0.3).


✅ Pre-Porting Checklist
#

  1. Ensure BSP builds and boots in VxWorks 6.9.3.3.
  2. Backup all BSP source, header, and driver files.
  3. Familiarize with Workbench 4 and WrTool for migration.
  4. Identify all legacy VxBus drivers to be ported.

🔄 Porting Workflow Overview
#

Perform all actions within VxWorks Development Shell or Workbench 4:

  1. Verify legacy BSP builds.
  2. Copy BSP to VxWorks 7 workspace:
cp -r legacyBSPPath yourVx7Workspace
  1. Modify Makefile and 20bsp.cdf.
  2. Update source include paths.
  3. Copy legacy drivers to appropriate vxbus_legacy directories.
  4. Build VSB and create VIP using WrTool:
vxprj vsb create -force -bsp bsp6x_fsl_p4080_ds_6_9_0_0 -compat69 myP4080VSB -S
prj build myP4080VSB
vxprj vip create -force -vsb myP4080VSB bsp6x_fsl_p4080_ds_6_9_0_0 diab myP4080VIP
prj build myP4080VIP

Note: Any BSP changes during VIP creation require recreating the VIP with -force.


⚡ Example: Porting fsl_p4080_ds PPC BSP
#

Step 1: Verify Build Environment
#

Confirm BSP builds and boots in 6.9.3.3.

Step 2: Set WIND_BSP_PATHS
#

  • Linux: Update .cshrc or .login
  • Windows: Control Panel → Environment Variables → Add WIND_BSP_PATHS

Step 3: Launch Workbench 4
#

Open the Development Shell and WrTool terminal.

Step 4: Copy BSP
#

cp -r legacyBSPPath yourVx7Workspace

Step 5: Create bsp.vsbl
#

layer bsp6x_fsl_p4080_ds
{
    SYNOPSIS A legacy fsl_p4080_ds BSP to be used in VxWorks 7 
    VERSION 6.9.3.3.p
    LAYER_REQUIRES VXBUS_LEGACY
    LAYER_CONTENT compat69      
}

Step 6: Copy Required VxBus Drivers
#

Ensure all source, header, and support files are in the correct vxbus_legacy-version_string folders.

Step 7: Verify BSP in VSB
#

vxprj vsb listBsps -compat69

Step 8: Edit Makefile
#

  • Set CPU to PPCE500MC or target CPU
  • Comment out TGT_DIR
  • Update include paths:
include $(WIND_KRNL_MK)/defs.bsp.mk
include $(WIND_KRNL_MK)/rules.bsp.mk

Step 9: Update CDF Files
#

Move Bsp {} from 20bsp.cdf to a new bsp.cdf. Ensure the CPU matches Makefile.

Step 10: Build VSB and VIP
#

vxprj vsb create -force -bsp bsp6x_fsl_p4080_ds_6_9_0_0 -compat69 myP4080VSB -S
prj build myP4080VSB
vxprj vip create -force -vsb myP4080VSB bsp6x_fsl_p4080_ds_6_9_0_0 diab myP4080VIP
prj build myP4080VIP

The resulting image is located at vxworks/workspace/myP4080VIP/default.


📂 Driver Path Reference
#

Legacy Path (VxWorks 6.9.x) New Path (VxWorks 7) Purpose
../src/hwif/h/vxbus/vxbAccess.h vxbus/vxbAccess.h VxBus access macros
../src/hwif/h/vxbus/vxbRapidIO.h vxbus/vxbRapidIO.h RapidIO interface
../src/hwif/h/end/vxbDtsecEnd.h hwif/end/vxbDtsecEnd.h Ethernet controllers
../src/hwif/h/intCtlr/vxbIntDynaCtlrLib.h hwif/intCtlr/vxbIntDynaCtlrLib.h Interrupt controllers
target/h/vme.h Local BSP directory (copy required) VME bus support
target/src/drv/mem/flashMem.c Local BSP directory (copy required) Flash memory drivers

💡 Managing Local Source Files
#

Legacy internal files (e.g., flashMem.c, nvRamToFlash.c) are now locally scoped in VxWorks 7:

  1. Copy them into the migrated BSP folder:
installDir/vxworks-7/pkgs/os/board/bsp_legacy-6.9.0.0/your_bsp/
  1. Update #include to force local resolution:
// Old
#include <mem/flashMem.c>
#include <mem/nvRamToFlash.c>
// New
#include "flashMem.c"
#include "nvRamToFlash.c"

🏁 Best Practices
#

  1. Port iteratively; resolve compilation errors progressively.
  2. Always use the latest vxbus_legacy version.
  3. Backup original BSPs.
  4. Validate VSB and VIP builds after each change.
  5. Document all modified paths and files.

This guide ensures a complete, expert-level process for porting legacy VxWorks 6.9 BSPs to VxWorks 7 while maintaining reliability, compatibility, and VxBus support.

Related

VxWorks vs VxWorks.bin: Understanding the Key Differences
·683 words·4 mins
VxWorks RTOS Boot Image BSP Embedded Systems
VxBus Architecture and Driver Model for VxWorks SMP
·1040 words·5 mins
VxWorks VxBus SMP Device-Drivers Embedded Systems
Adapting VxWorks 7 to the T2080 PowerPC Processor
·823 words·4 mins
VxWorks RTOS Powerpc Embedded Systems BSP