QEMU
Download VxWorks SDK for IA - QEMU (x86-64) VxWorks Version 23.09 with the link
Installation Prerequisite(s)
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.
To accommodate for the varying runtime configurations of the VxWorks kernel images included in the SDKs, you may be interested in using an FTP server option based on pyftpdlib.
Install pyftpdlib:
Starting a local FTP server on port 21 with user "target" and password "vxtarget" and FTP root in the current user's home can be done as follows
Running the VxWorks kernel and the applications created with the SDK requires installing QEMU
Booting VxWorks on QEMU (IA)
QEMU can be used to run the VxWorks kernel included in the SDK and to deploy VxWorks applications.
Start by opening a Linux terminal window and going to the location of your unpacked VxWorks SDK. The following command can be used to start a VxWorks guest in QEMU.
Output
Customizing the values for the user (u) and password (pw) parameters to the ones matching a valid FTP user on your development host will allow you to access the host file system from the VxWorks instance running in QEMU. The VxWorks instance will have access to the root folder of your FTP server.
Application development
Start by opening a Linux terminal window and going to the location of your unpacked VxWorks SDK.
Source the SDK development environment before using the SDK.
Developing applications from the command line
The VxWorks compiler driver (wr-cc/wr-c++) utility lets you invoke VxWorks toolchains to compile your real time process (RTP) application from command line. The SDK development environment includes a set of environment variables (CC, CXX, CPP, etc) which match the various compiler driver utilities.
Procedure:
Create a C source file foo.c:
Compile the source file foo.c to create a Real Time Process application.
or
Alternatively, you can also create a Makefile and then call make to compile the source file.
Developing applications using CMake
By default, a generated VxWorks SDK includes CMake. When the application developer sources the SDK environment, they will automatically have access to CMake. There is no need to download, install and configure CMake separately. With VxWorks CMake, you can build existing CMake examples that are included in the generated SDK, or you can create your own projects.
CMake examples can be found in the directories <SDK_DIR>/examples/rtp/hello_cmake_rtp and <SDK_DIR>/examples/dkm/hello_cmake_dkm
Procedure:
Create a project directory, called my_project.
Create the CMakeLists.txt file in the project folder.
To build your project, run the following command:
Running applications
Start an FTP server on port 21 with user "target" and password "vxtarget" and FTP root in the current user's home.
After booting VxWorks on your target, switching to the "cmd" shell will allow you to navigate to the location of your application with greater ease.
E.g.
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:
Creating and deploying Python applications
The VxWorks image included with the SDK contains all the prerequisites for running python applications on VxWorks.
Launch Python from the cmd shell to print the Hello World! string:
Python scripts can be executed as
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.
E.g.
Building a simple hello world Rust program
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 in the VxWorks shell. You will see the following output:
Last updated