Installation on VxWorks

(G)VxWorks

VxWorks is a real-time OS for embedded systems developed by Wind River. It is the most popular OS in large-scale commercial real-time OS, and it is used in relatively large equipment. It can operate on various CPU such as x86, PowerPC, SH - 4, ARM, MIPS, SPARC etc. It conforms to DO - 178B standard and IEC 61508 standard, and it is used in a wide range of fields such as aerospace and space.

(G)Wind River Workbench

Wind River Workbench is an integrated development environment that executes VxWorks compilation, debugging, etc. by GUI.

This page explains the procedure for introducing OpenRTM-aist (C++ version) to VxWorks.

(G)Environment

The host PC is supposed to be Ubuntu 14.04 (or 16.04). We plan to deal with Windows in the future.

Install the following software on the host PC.

Please purchase from Wind River and install it.

Since Workbench operates in 32 bit environment, please install i386 version libc6 package for 64 bit Ubuntu.

 sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

  • tclsh
  • cmake
  • subversion

Please install with the following command.

 sudo apt-get install tclsh cmake subversion

It is necessary only when using ORBexpress.

(G)Build

Build is executed by command line operation. From Workbench, right click on Project Explore and launch the command line shell from Open Development Shell .


command-line.png


To build on normal Ubuntu terminal, please set environment variables by the following procedure. If you use the command line shell launched in Workbench, you have already set environment variables, so please proceed to the next step.

(G)Setting environment variables

Please set the following environment variables.

Variable name Example
WIND_HOME /home/openrtm/WindRiver
WIND_USR ${WIND_HOME}/vxworks-6.9/target/usr
WRVX_COMPBASE ${WIND_HOME}/components
WIND_BASE ${WIND_HOME}/vxworks-6.9
WIND_HOST_TYPE x86-linux2
WIND_GNU_BASE ${WIND_HOME}/gnu/4.3.3-vxworks-6.9/${WIND_HOST_TYPE}
WIND_FOUNDATION_PATH ${WIND_HOME}/workbench-3.3/foundation

Please change WIND_HOME appropriately according to the directory where Workbench is installed.

 export WIND_HOME=/home/openrtm/WindRiver
 export WIND_USR=${WIND_HOME}/vxworks-6.9/target/usr
 export WRVX_COMPBASE=${WIND_HOME}/components
 export WIND_BASE=${WIND_HOME}/vxworks-6.9
 export WIND_HOST_TYPE=x86-linux2
 export WIND_GNU_BASE=${WIND_HOME}/gnu/4.3.3-vxworks-6.9/${WIND_HOST_TYPE}
 export WIND_FOUNDATION_PATH=${WIND_HOME}/workbench-3.3/foundation

Please set the shared library path to execute the compiler.

 export LD_LIBRARY_PATH=${WIND_HOME}/lmapi-5.0/x86-linux2/lib:${WIND_FOUNDATION_PATH}/${WIND_HOST_TYPE}/lib:${LD_LIBRARY_PATH}

(G)Build omniORB

When omniORB is used, it is necessary to build omniORB source code. If omniORB is not used, proceed to the next step.

(G)Get source code

Please obtain omniORB source code with the following command.

 wget https://jaist.dl.sourceforge.net/project/omniorb/omniORB/omniORB-4.2.2/omniORB-4.2.2.tar.bz2
 tar xf omniORB-4.2.2.tar.bz2

(G)Correction patch application

Apply fix patch for VxWorks 6.6, 6.9.

 wget http://svn.openrtm.org/omniORB/trunk/vxworks/omniORB-4.2.2-vxworks.patch
 patch -p1 -d omniORB-4.2.2 < omniORB-4.2.2-vxworks.patch

(G)Build IDL compiler etc.

The IDL compiler etc must operate on Ubuntu. Please build omniORB for Ubuntu by the following procedure.

 cd omniORB-4.2.2
 mkdir build
 cd build
 ../configure
 make
 cd ..

(G)Cross compiling

Build omniORB for VxWorks.

 sed -i '1s/^/platform = ${VXWORKS_PLATFORM}\n/' config/config.mk
 cd src
 make export

However, please be sure to enter VXWORKS_PLATFORM according to your operating environment.

VXWORKS_PLATFORM CPU VxWorks version Implementation method
powerpc_vxWorks_kernel_6.6 PowerPC 6.6 Kernel module
powerpc_vxWorks_RTP_6.6 PowerPC 6.6 RTP
powerpc_vxWorks_kernel_6.9 PowerPC 6.9 kernel module
powerpc_vxWorks_RTP_6.9 PowerPC 6.9 RTP
simlinux_vxWorks_kernel_6.6 simulator on Linux 6.6 kernel module
simpentium_vxWorks_RTP_6.6 Simulator on Linux 6.6 RTP
simlinux_vxWorks_kernel_6.9 simulator on Linux 6.9 kernel module
simpentium_vxWorks_RTP_6.9 Simulator on Linux 6.9 RTP

In the case of building a kernel module, name servers etc. are not generated. When starting name servers with VxWorks, please also build RTP.

(G)Build OpenRTM-aist

(G)Obtain source code

Please obtain the source code with the following command.

 svn co http://svn.openrtm.org/OpenRTM-aist/trunk/OpenRTM-aist/

(G)Compilation

Start compiling with the following command.

 cd OpenRTM-aist/
 python convert_character_code.py ./ vxworks euc_jp
 mkdir src/lib/coil/common/coil
 cp src/lib/coil/common/*.* src/lib/coil/common/coil/
 cp build/yat.py utils/rtm-skelwrapper/
 mkdir build_vxworks
 cd build_vxworks/
 cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DVX_VERSION=${VX_VERSION} -DORB_ROOT=${ORB_ROOT} -DOMNI_VERSION=${OMNI_VERSION} -DCORBA=${CORBA} -DVX_CPU_FAMILY=${ARCH} ..
 make

Please specify the following for CMake options.

TOoolCHAIN_FILE '../Toolchain-vxworks6.6-Linux.cmake' 'for VxWorks 6.6 (kernel module, PowerPC),' '../ Toolchain-vxworks6.cmake' '
VX_VERSION vxworks - 6.6 or vxworks - 6.9
ORB_ROOT omniORB directory (eg /home/openrtm/omniORB-4.2.2)
VX_CPU_FAMILY ppc (PowerPC), simlinux (kernel module, simulator), simpentium (RTP, simulator)
OMNI_VERSION omniORB version (40, 41, 42), unnecessary if omniORB is not used
CORBA omniORB or ORBexpress

For RTP, you need to add -DRTP = ON to the cmake command.

(G)Operation check

When the build is completed, please confirm the operation by the following procedure.

OpenRTM-aist operation confirmation (VxWorks, kernel module, when using simulator)

This page explains the procedure to check the operation of the RTC kernel module built for VxWorks using the Workbench simulator.

(G)Setting up the simulator

Follow the procedure below to set up the simulator.

(G)Simulator connection

After selecting the simulator with Workbench Remote System, press connect 'xxxxx' button to connect with the simulator.


sim5.png


(G)Loading kernel modules

In the Workbench Remote System, right click on the simulator and select DownloadVxWorks Kernel Task.


load_module.png


From the Launch Context tab of the Download Configurations window, select the simulator for the system to be downloaded.


Launch_context.png


Set the module to download from the Downloads tab. Click the [Add] button.


downloads.png


After setting the path of rtcd.out in the Add window, click the [OK] button. rtcd.out is generated under utils/rtcd in the OpenRTM-aist build directory.

  • Example:/home/openrtm/OpenRTM-aist/build_vxworks/utils/rtcd/rtcd.out


downloads2.png


Click the [Download] button to start the download.


download.png


Please also download the RTC kernel module to be started in the same procedure.

  • Example(ConsoleIn):/home/openrtm/OpenRTM-aist/build_vxworks/examples/SimpleIO/ConsoleIn.out
  • Example(ConsoleOut):/home/openrtm/OpenRTM-aist/build_vxworks/examples/SimpleIO/ConsoleOut.out

(G)RTC execution

(G)Launch Name Server

Start the name server on the VxWorks simulator. Since the name server starts up as a real time process (RTP), right click on the simulator from Remote Systems and click RunVxWorks Real Time Process.


rtp.png


Please make various settings from the Launch Context tab of the Run Configurations window.

  • Set up the system to run as a simulator
  • Path setting for omniNames.out
  • Setting command line arguments

omniNames.out is generated in RTP build directory of omniORB. Because it is not generated in the build directory of the kernel module, omniORB should also build about RTP. If libc.so.1 does not exist in the path of the shared library, you will get an error, please copy it from the Workbench to the omniNames.out directory.

 cp $WIND_BASE/target/lib/usr/root/SIMPENTIUMgnu/bin/libc.so.1 /home/openrtm/omniORB-4.2.2/bin/simpentium_vxWorks_RTP_6.9/

If you can not build RTP, do not start the name server in VxWorks, but register RTC on the name server on Ubuntu.

  • Example:/home/openrtm/omniORB-4.2.2/bin/simpentium_vxWorks_RTP_6.9/omniNames.out

Arguments is the port number of the name server.

  • Example:-start 2809

After setting is completed, click the [Run] button to start the name server.


nameserver.png


(G)Manager start

In the Workbench Remote System, right click on the simulator and select RunVxWorks Kernel Task.


run_task.png


Perform various settings in the Run Configurations window. Please enter rtcd_main for Entry Point. Please set "-o manager.shutdown_on_nortcs:NO - o manager.shutdown_auto: NO" to Arguments. Press the [Run] button to start the manager.

To start Ubuntu side name server, add - o corba.nameservers:192.168.200.254 to Arguments. Please check the IP address of Ubuntu's tap 0 interface as appropriate.


run_task2.png


(G)Starting RTC

It starts up in the same procedure as starting manager. For Entry Point, specify a function to start RTC.

  • Example(ConsoleIn):consolein_main
  • Example(ConsoleOut):consoleout_main

You do not need to enter anything in Arguments.

Please check if RTC started in RT system editor started by Ubuntu. To the VxWorks name server, click the name service connection button, specify the IP address in the displayed window and click OK to connect.


ns1.png



ns2.png


Please check if the RTC started is registered.


ns3.png


Procedures such as RTC connection, activation, etc. are the same as when checking operation with Ubuntu.

(G)On command line operation

After connecting the simulator, you can enter commands from the Target Console window.


sim6.png


The operation of RTC can be confirmed with the following command. Please change the path of Workbench, omniORB, openRTM-aist accordingly.

 cd "/home/openrtm/openrtm-build/omniORB/omniORB_69_rtp_sim/omniORB-4.2.2/bin/simpentium_vxWorks_RTP_6.9"
 cp "/home/openrtm/WindRiver/vxworks-6.9/target/lib/usr/root/SIMPENTIUMgnu/bin/libc.so.1","./"
 rtpSp "./omniNames.out -start 2809"
 
 cd "/home/openrtm/openrtm-build/OpenRTM/OpenRTM_69_kernel_sim/OpenRTM-aist/build_vxworks/utils/rtcd"
 ld<rtcd.out
 cd "/home/openrtm/openrtm-build/OpenRTM/OpenRTM_69_kernel_sim/OpenRTM-aist/build_vxworks/examples/SimpleIO"
 ld<ConsoleIn.out
 
 taskSpawn "rtcd_main",100,67108864,1000000,rtcd_main,"-o","manager.shutdown_on_nortcs:NO","-o","manager.shutdown_auto:NO"
 taskSpawn "consolein_main",100,0,1000000,consolein_main

Setting up VxWorks simulator

This page explains the settings of the VxWorks simulator running on Wind River Workbench.

(G)Add simulator

Workbench The default simulator is the linux_diab simulator. Since OpenRTM-aist uses the gnu compiler, you need to use the linux_gnu simulator.

Please press the [Define a connection to remote system] button and add the simulator.


sim1.png


Select Wind River VxWorks 6.x Simulator Connection on the Select Remote System Type in the New Connection window and proceed to the next.


sim2.png


In VxWorks Boot parameters, specify linux_gnu simulator in Custom simulator.

  • Example:/home/openrtm/WindRiver/vxworks-6.9/target/proj/linux_gnu/default/vxWorks


sim3.png


After going to Network Options, set the network to Full Network and set the IP address. Click the [Finish] button to create a simulator.


sim4.png


(G)Starting network interface

Launch the network interface for the simulator. Execute the following command.

 sudo ${WIND_BASE}/host/${WIND_HOST_TYPE}/bin/vxsimnetd

A network interface called tap0 will be added.

To use the name server started on Ubuntu side, restart the name server with the following command.

 sudo rtm-naming

OpenRTM-aist operation confirmation (VxWorks, RTP, when using a simulator)

This page explains the procedure for checking the operation of RTC real-time process (RTP) built for VxWorks using the Workbench simulator.

(G)Setting up the simulator

Follow the procedure below to set up the simulator.

(G)Simulator connection

After selecting the simulator with Workbench Remote System, press connect 'xxxxx' button to connect with the simulator.


 /ja/node/6374


(G)RTC execution

(G)Launch Name Server

Start the name server on the VxWorks simulator. Since the name server starts up as a real time process (RTP), right click on the simulator from Remote Systems and click RunVxWorks Real Time Process.


 /ja/node/6374


Please make various settings from the Launch Context tab of the Run Configurations window.

  • Set up the system to run as a simulator
  • Path setting for omniNames.out
  • Setting command line arguments

omniNames.out is generated in the omniORB build directory. If libc.so. does not exist in the path of the shared library, you will get an error, please copy it from the Workbench to the omniNames.out directory.

 cp $WIND_BASE/target/lib/usr/root/SIMPENTIUMgnu/bin/libc.so.1 /home/openrtm/omniORB-4.2.2/bin/simpentium_vxWorks_RTP_6.9/

If you can not build RTP, do not start the name server in VxWorks, but register RTC on the name server on Ubuntu.

  • Example:/home/openrtm/omniORB-4.2.2/bin/simpentium_vxWorks_RTP_6.9/omniNames.out

Arguments is the port number of the name server.

  • Example:-start 2809

After setting is completed, click the [Run] button to start the name server.


 /ja/node/6374


(G)Starting RTC

Run rtcd.vxe in the same procedure as starting name server. rtcd.vxe is generated under utils / rtcd in the OpenRTM-aist build directory.

  • Example(ConsoleIn):/home/openrtm/OpenRTM-aist/build_vxworks/examples/SimpleIO/ConsoleIn.vxe
  • Example(ConsoleOut):/home/openrtm/OpenRTM-aist/build_vxworks/examples/SimpleIO/ConsoleOut.vxe

You do not need to enter anything in Arguments, but add - o corba.nameservers:192.168.200.254 to Arguments to start Ubuntu side name server. Please check the IP address of Ubuntu's tap 0 interface as appropriate.

Please check if RTC started in RT system editor started by Ubuntu. To the VxWorks name server, click the name service connection button, specify the IP address in the displayed window and click OK to connect.


 /ja/node/6374



 /ja/node/6374


Please check if the RTC started is registered.


 /ja/node/6374


Procedures such as RTC connection, activation, etc. are the same as when checking operation with Ubuntu.

(G)On command line operation

After connecting the simulator, you can enter commands from the Target Console window.


 /ja/node/6374


The operation of RTC can be confirmed with the following command. Please change the path of Workbench, omniORB, openRTM-aist accordingly.

 cd "/home/openrtm/openrtm-build/omniORB/omniORB_69_rtp_sim/omniORB-4.2.2/bin/simpentium_vxWorks_RTP_6.9"
 cp "/home/openrtm/WindRiver/vxworks-6.9/target/lib/usr/root/SIMPENTIUMgnu/bin/libc.so.1","./"
 rtpSp "./omniNames.out -start 2809"
 
 cd "/home/openrtm/openrtm-build/OpenRTM/OpenRTM_69_rtp_sim/OpenRTM-aist/build_vxworks/examples/SimpleIO"
 cp "/home/openrtm/WindRiver/vxworks-6.9/target/lib/usr/root/SIMPENTIUMgnu/bin/libc.so.1","./"
 rtpSp "./ConsoleOutComp.vxe"

OpenRTM-aist operation confirmation (in the case of using VxWorks, kernel module, PowerPC board)

This page explains the procedure to check the operation of the RTC kernel module built for VxWorks on the PowerPC board.

(G)Connection between Workbench and VxWorks

Please generate a connection between Workbench and VxWorks as follows.

After selecting the target server with Workbench Remote System, press connect 'xxxxx' button to connect to VxWorks.


target02.png


(G)Loading kernel modules

In the Workbench Remote System, right-click the target server and select DownloadVxWorks Kernel Task.


server1.png


From the Launch Context tab of the Download Configurations window, select the target server for the system to be downloaded.


server5.png


Set the module to download from the Downloads tab. Click the [Add] button.


server6.png


After setting the path of rtcd.out in the Add window, click the [OK] button. rtcd.out is generated under utils/rtcd in the OpenRTM-aist build directory.

  • Example:/home/openrtm/OpenRTM-aist/build_vxworks/utils/rtcd/rtcd.out


server3.png


Click the [Download] button to start the download.


 /ja/node/6374


Please also download the RTC kernel module to be started in the same procedure.

  • Example(ConsoleIn):/home/openrtm/OpenRTM-aist/build_vxworks/examples/SimpleIO/ConsoleIn.out
  • Example(ConsoleOut):/home/openrtm/OpenRTM-aist/build_vxworks/examples/SimpleIO/ConsoleOut.out

(G)RTC execution

(G)Manager start

In the Workbench Remote System, right-click the target server and select RunVxWorks Kernel Task.


server2.png


Perform various settings in the Run Configurations window. Please enter rtcd_main for Entry Point. - o manager.shutdown_on_nortcs:NO - o manager.shutdown_auto: NO - o corba.nameservers: 172.30.1.1 for Arguments. Since name servers do not start on VxWorks, register RTC on the name server on Ubuntu. When using ORBexpress please also add endpoint setting corba.endpoints: 172.30.1.20: 1234. Press the [Run] button to start the manager. Change the IP address as appropriate.


server4.png


(G)Starting RTC

It starts up in the same procedure as starting manager. For Entry Point, specify a function to start RTC.

  • Example(ConsoleIn):consolein_main
  • Example(ConsoleOut):consoleout_main

You do not need to enter anything in Arguments. Please check if RTC started in RT system editor started by Ubuntu.

Please check if the RTC started is registered.


 /ja/node/6374


Procedures such as RTC connection, activation, etc. are the same as when checking operation with Ubuntu.

However, when using ORBexpress, you need to set the endian to big when connecting data port connectors.

(G)On command line operation

You can enter commands from the WTX Console window after connecting to the target server.


target03.png


The operation of RTC can be confirmed with the following command. Change the path of Workbench, omniORB, openRTM-aist, IP address of Ubuntu accordingly.

 cd "/home/openrtm/openrtm-build/OpenRTM/OpenRTM_69_kernel_sim/OpenRTM-aist/build_vxworks/utils/rtcd"
 ld<rtcd.out
 cd "/home/openrtm/openrtm-build/OpenRTM/OpenRTM_69_kernel_sim/OpenRTM-aist/build_vxworks/examples/SimpleIO"
 ld<ConsoleIn.out
 
 taskSpawn "rtcd_main",100,67108864,1000000,rtcd_main,"-o","manager.shutdown_on_nortcs:NO","-o","manager.shutdown_auto:NO","-o","corba.nameservers:172.30.1.1"
 taskSpawn "consolein_main",100,0,1000000,consolein_main

OpenRTM-aist operation confirmation (when using VxWorks, RTP, PowerPC board)