Introduction #
VxWorks, developed by Wind River, is a real-time operating system (RTOS) widely used in embedded systems.
Its USB stack supports a variety of USB serial adapters, allowing you to connect and access the VxWorks target console through them.
This guide walks you through building and deploying VxWorks with USB serial adapter support and configuring the console to use the adapter.
Prerequisites #
You will need:
- Wind River VxWorks 7 SR0660
- Intel target booting from UEFI BIOS
- USB flash drive (minimum 4 GB)
- USB serial adapter
Supported types:- FTDI 232
- Prolific 2303
- Any adapter supporting the USB CDC protocol
Step 1: Create and Build the VxWorks Source Build (VSB) #
- Open a DOS shell and configure the build environment.
- Create the VSB and add required USB support.
cd <WIND_HOME> # VxWorks installation directory
wrenv -p vxworks-7
cd <YOUR_WORKSPACE> # your workspace
vxprj vsb create adapter_vsb -bsp itl_generic -smp -force -S
cd adapter_vsb
vxprj vsb add USB_CLASS # USB class support
vxprj vsb add USB_HELPER # USB helper utilities
vxprj vsb add USB_SERIAL # USB serial device support
make -j 32 # build the VSB
Step 2: Create and Build the VxWorks Image Project (VIP) #
- Create a VIP using the VSB from Step 1.
- Add components for USB serial adapters.
cd ..
vxprj create -smp itl_generic adapter_vip \
-profile PROFILE_INTEL_GENERIC \
-vsb adapter_vsb
cd adapter_vip
vxprj vip component add INCLUDE_MULTI_STAGE_WARM_REBOOT
vxprj vip bundle add BUNDLE_STANDALONE_SHELL
# Add drivers for supported USB serial adapters
vxprj vip component add INCLUDE_USB_GEN2_SER_FTDI232
vxprj vip component add INCLUDE_USB_GEN2_SER_PL2303
vxprj vip component add INCLUDE_USB_GEN2_SER_WRS_CDC
vxprj vip component add INCLUDE_USB_GEN2_SERIAL_INIT
vxprj build
Step 3: Boot VxWorks and Test the USB Serial Adapter #
3.1 Deploy UEFI Bootloader and Kernel Image #
Follow the itl_generic
BSP README to deploy the bootloader and kernel image to your USB flash drive:
<WIND_HOME>\vxworks-7\pkgs_v2\os\board\intel\itl_generic-a.b.c.d\itl_generic_readme.md
After deployment, your USB flash drive should contain:
EFI BOOT bootapp.sys BOOTIA32.EFI BOOTX64.EFI
3.2 Prepare the Target #
- Set the BIOS to boot from the USB flash drive.
- Connect:
- USB flash drive to the target
- USB serial adapter to the target
3.3 Boot and Verify #
Power on the target.
You should see:
- Kernel shell prompt
- Messages confirming USB serial adapter detection and initialization
Example:
-> Find USB-to-Serial adapter device: FTDI USB-to-Serial Adapter
Added new USB-to-Serial adapter device as /usb2ttyS/0
-> devs
drv refs name
...
12 [ 3] /usb2ttyS/0
...
->
Step 4: Set VxWorks Console to Use USB Serial #
Adding INCLUDE_USB_GEN2_SERIAL_PCCONSOLE_INIT
creates /ttyUSB0
, which maps to /usb2ttyS/0
in the VxWorks I/O system.
vxprj vip component add INCLUDE_USB_GEN2_SERIAL_PCCONSOLE_INIT
vxprj vip component add INCLUDE_USB_GEN2_HELPER
vxprj vip parameter setstring CONSOLE_NAME "/ttyUSB0"
# Verify settings
vxprj vip parameter value CONSOLE_NAME
CONSOLE_NAME = "/ttyUSB0"
vxprj vip parameter value CONSOLE_BAUD_RATE
CONSOLE_BAUD_RATE = (9600)
Rebuild the VxWorks kernel and deploy the image file to the target USB flash drive.
Rebuild the kernel and redeploy the image.
Step 5: Reboot with Console Over USB Serial #
- Connect a serial cable from the USB adapter to your workstation.
- Boot the target again from the USB flash drive.
Example device list:
-> devs
drv refs name
...
3 [ 3] /ttyUSB0
...
2 [ 3] /tyCo/1 ==> /ttyUSB0
12 [ 3] /usb2ttyS/0
->
The console will now be available via both the PC console and the USB serial connection.