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_stringrefers to thevxbus_legacypackage version, e.g.,1.0.0.0for initial release, higher for updates (e.g.,1.0.0.3).
✅ Pre-Porting Checklist #
- Ensure BSP builds and boots in VxWorks 6.9.3.3.
- Backup all BSP source, header, and driver files.
- Familiarize with Workbench 4 and WrTool for migration.
- Identify all legacy VxBus drivers to be ported.
🔄 Porting Workflow Overview #
Perform all actions within VxWorks Development Shell or Workbench 4:
- Verify legacy BSP builds.
- Copy BSP to VxWorks 7 workspace:
cp -r legacyBSPPath yourVx7Workspace
- Modify
Makefileand20bsp.cdf. - Update source include paths.
- Copy legacy drivers to appropriate
vxbus_legacydirectories. - 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
.cshrcor.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
CPUtoPPCE500MCor 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:
- Copy them into the migrated BSP folder:
installDir/vxworks-7/pkgs/os/board/bsp_legacy-6.9.0.0/your_bsp/
- Update
#includeto force local resolution:
// Old
#include <mem/flashMem.c>
#include <mem/nvRamToFlash.c>
// New
#include "flashMem.c"
#include "nvRamToFlash.c"
🏁 Best Practices #
- Port iteratively; resolve compilation errors progressively.
- Always use the latest
vxbus_legacyversion. - Backup original BSPs.
- Validate VSB and VIP builds after each change.
- 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.