VxWorks 7 SDK Quick Start Guide


The VxWorks 7 SDK is a development environment dedicated to VxWorks application developers which include the following features:


Host dependencies

The SDK is meant to run on Linux hosts. On Debian derivatives, the following packages need to be installed:

sudo apt install build-essential libc6:i386

Having an FTP server installed on your development host will make application deployment easier and allow you to access the host file system from a vxWorks target.

sudo apt install vsftpd

Application development

Source the SDK environment file to update your PATH and environmental variables, gaining direct access to the tools included within the SDK.

$ source <SDK_DIR>/toolkit/wind_sdk_env.linux 

Building applications

A "hello world" RTPs example RTP can be built as:

$ $CC hello.c -static -o hello

Make a note of the location of your application.

Running applications

Prebuilt VxWorks binaries can be located in <SDK_DIR>/bsps/<BOARD>. Refer to the board-specific documentation for booting VxWorks on your target.

Running applications on a VxWorks target

Switching to the "cmd" shell will allow you to navigate to the location of your application with greater ease.


-> cmd
[vxWorks *]# 

Placing the application in a location accessible over FTP will make it visible with minimal configuration to the VxWorks instance.

Assuming the application is located in $HOME/opt and the FTP server uses a minimal configuration which provides FTP access to $HOME:

[vxWorks *]# cd opt
[vxWorks *]# ls
[vxWorks *]# more hello.c
#include <stdio.h>

int main(int argc, char **argv) {
    printf("Hello World\n");
    return 0;
[vxWorks *]# hello
Launching process 'hello' ...
Process 'hello' (process Id = 0xffff8000004bb6e0) launched.
Hello World

Creating Rust applications

The Rust development environment is set up in a similar manner to the standard application development environment, i.e. by sourcing the SDK environment file.


$ source <SDK_DIR>/toolkit/wind_sdk_env.linux 

Building a simple hello world Rust program

$ cargo new hello

$ cd hello

$ cargo build

This will create an RTP called hello.vxe in the directory target/vxworks-target/build-mode where vxworks-target is one of the targets listed below and build-mode is either debug or release.

For example you might see an RTP in the directory: target/armv7-wrs-vxworks-eabihf/debug/hello.vxe

VxWorks Rust targets: * ARM 32-bit: armv7-wrs-vxworks-eabihf * ARM 64-bit: aarch64-wrs-vxworks * Intel 32-bit: i686-wrs-vxworks * Intel 64-bit: x86_64-wrs-vxworks

Run the hello.vxe on the VxWorks shell. You will see the following output:

Hello, world!

Note: For more information on using cargo, including how to customize the build output location or change the build mode from debug to release, see the cargo documentation here https://doc.rust-lang.org/cargo/guide/.