VxWorks 21.03 on a Raspberry Pi 4
How to install and setup VxWorks on a Pi
VxWorks from Wind River is one of the most used operating systems for embedded systems. For instance, NASA JPL is using VxWorks on its Perseverance mission on mars. It’s a Real Time Operating System (RTOS) and now, there is a way to run VxWorks on low cost single board computers.
Some time ago Wind River introduced the VxWorks SDK for the Raspberry Pi. It is available for the Raspberry Pi 3B/3B+ and 4B. Unfortunately, there are almost no articles about it so far, so I’ll briefly summarize here a tutorial about how to install and set up VxWorks. Let’s use the Google Colab to build all the files for our Pi. We just need to run the Colab and download the built zip file, unzip it and copy it to the sd card. Here are the commands summarized:
With a UART to USB adapter the communication between PC and Pi is performed. You have to connect the TX, RX and GND from the UART adapter to your Pi (Pi 4: TX Pin 8; RX Pin 10). Next connect with the Pi console e.g. with ZOC terminal:
- Baud Rate: 115200
- Data: 8 bit
- Stop: 1 bit
- Parity: None
- Flow Control: None
After reboot you can see the VxWorks logo and some additional infos. It is indicated that autoboot can be interrupted by pressing enter several times. This allows the bootloader to load another kernel image, via TFTP for instance. The start address from which the kernel image is started is also displayed. In addition, some information about the system is shown, such as information about the board and the size of the operating system memory.
[SERIAL/DIRECT] CONNECTED TO PORT /dev/cu.usbserial-1130 (115200-8N1)U-Boot 2021.10-rc3-00025-gecd6e0ce5a (Sep 04 2021 - 12:06:28 +0000)DRAM: 3.9 GiB
RPI 4 Model B (0xc03112)
MMC: emmc2@7e340000: 0, mmcnr@7e300000: 1
Loading Environment from FAT... OK
In: serial
Out: serial
Err: serial
Net:
Warning: genet@7d580000 MAC addresses don't match:
Address in DT is dc:a6:32:87:81:ee
Address in environment is dc:a6:32:07:b3:a4
eth0: genet@7d580000
Hit any key to stop autoboot: 0
9268992 bytes read in 416 ms (21.2 MiB/s)
## Booting kernel from Legacy Image at 00100000 ...
Image Name: vxworks
Image Type: AArch64 VxWorks Kernel Image (uncompressed)
Data Size: 9268928 Bytes = 8.8 MiB
Load Address: 00100000
Entry Point: 00100000
Verifying Checksum ... OK
Loading Kernel Image
!!! WARNING !!! Using legacy DTB
## Starting vxWorks at 0x00100000, device tree at 0x00000000 ...
Instantiatm0 as rawFs, devx1
Formatting /ram0 for HRFS v1.2
Instantiating /ram0 as rawFs, device = 0x1
Formatting...OK.
Targe vxTargetantiating /tmp as device = 0x10001
Formatting /tmp for HRFS v1.2
Instantiating /tmp as rawFs, device = 0x10001
Formatting...OK._________ _________
\........\ /......../
\........\ /......../
\........\ /......../
\........\ /......../
\........\ \......./
\........\ \...../ VxWorks SMP 64-bit
\........\ \.../
\........\ \./ Release version: 21.03
\........\ - Build date: Apr 20 2021 15:35:03
\........\
\......./ Copyright Wind River Systems, Inc.
\...../ - 1984-2021
\.../ /.\
\./ /...\
- -------Board: Raspberry Pi 4 Model B - ARMv8
CPU Count: OS Memory Size: ~3891MB
ED&R Policy Mode: Deployed
gent: Started (always)
Stop Mode Agent: Not started
BSP Status: *** UNSUPPORTED ***Thu Jan 1 00:00:00 1970: ipnet[3f3a90]: Error: ipcom_getsockaddrbyaddr failed gw: dhcpAdding 14541 symbols for standalone.Instantiating /sd0b as-> rawFs, device = 0x50001
Instantiating /sd0c as rawFs, device = 0x60001
Instantiating /sd0d as rawFs, device = 0x70001->
You can query the installed version with the version command:
-> version
VxWorksSMP 64-bit (for Raspberry Pi 4 Model B - ARMv8)
Release version: 21.03
Build date: Apr 20 2021 15:35:03
Boot line:
usb2End(0,0)host:vxWorks h=192.168.0.2 e=192.168.0.3:ffffff00 g=192.168.0.1 u=target pw=vxTarget o=genet0 f=0x40
value = 124 = 0x7c = '|' = buffer + 0x4c
Get a list of tasks with i:
-> iNAME TID PRI STATUS PC ERRNO CPU #
---------- ---------------- --- ---------- ---------------- ------- -----
tIsr0 ffff800000034f00 0 PEND ffffffff805cc8c8 0 -
tJobTask ffff8000000662b0 0 PEND ffffffff804e7cf4 0 -
tExcTask ffffffff80a23a88 0 PEND ffffffff805cc8c8 0 -
tLogTask ffff800000066940 0 PEND ffffffff805c9f4c 0 -
tShell0 ffff800000485bc0 1 READY ffffffff805dfd3c 0 1
tHrfsCommi> ffff80000035e2c0 2 PEND+T ffffffff805cc8c8 3d0004 -
tHrfsCommi> ffff8000003f2db0 2 PEND+T ffffffff805cc8c8 3d0004 -
tErfTask ffff800000032780 10 PEND ffffffff805ce1cc 0 -
/sd0XbdSvc ffff8000003f7010 10 PEND ffffffff805cc8c8 0 -
ipcom_tick> ffff80000049a010 20 PEND+T ffffffff805cc8c8 0 -
tVxdbgTask ffff80000047c750 25 PEND ffffffff805cc8c8 0 -
tDmaJobTas> ffff800000033d30 45 PEND ffffffff805cd584 0 -
tTcfEvents ffffffff80a313a0 49 PEND+T ffffffff805cf128 3d0004 -
tTcf ffff800000488890 49 DELAY ffffffff805dc26c 0 -
tTcf ffff800000430370 49 PEND ffffffff805cc8c8 0 -
tTcf ffff800000487de0 49 PEND ffffffff805cc8c8 0 -
tTcf ffff800000491a60 49 PEND ffffffff805cc8c8 0 -
tTcf ffff800000487250 49 PEND ffffffff805cc8c8 0 -
tTcf ffff800000484c50 49 PEND ffffffff805cc8c8 0 -
tNet0 ffff800000033020 50 PEND ffffffff805cd584 0 -
tAioIoTask> ffff8000002cc9b0 50 PEND ffffffff805ce1cc 0 -
tAioIoTask> ffff8000002cced0 50 PEND ffffffff805ce1cc 0 -
tNetConf ffff8000003f3a90 50 PEND ffffffff805cc8c8 0 -
ipcom_teln> ffff8000003f4090 50 PEND ffffffff805cc8c8 0 -
ipdhcpc ffff80000036a5c0 50 PEND+T ffffffff805cc8c8 3d0004 -
tAnalysisA> ffffffff809d71d0 50 PEND ffffffff805cf128 0 -
tAioWait ffff8000002cc2d0 51 PEND ffffffff805cc8c8 0 -
tPortmapd ffff8000003f5340 54 PEND ffffffff805cc8c8 0 -
xHCD_IH0 ffff80000005b530 90 PEND ffffffff805cc8c8 0 -
sdBusMonit> ffff800000035cc0 100 PEND ffffffff805cc8c8 5 -
BusM A ffff80000003a400 100 DELAY ffffffff805dc26c 0 -
BusM B ffff80000005b010 100 DELAY ffffffff805dc26c 0 -
tUsb2Video ffff80000047bbf0 100 PEND ffffffff805c9f4c 0 -
tUsb2Clr ffff800000364680 150 PEND ffffffff805c9f4c 0 -
miiBusMoni> ffff80000042f5a0 252 DELAY ffffffff805dc26c 0 -
tIdleTask0 ffffffff80d38000 287 READY ffffffff805cbc04 0 0
tIdleTask1 ffffffff80d43000 287 READY ffffffff805cbc04 0 -
tIdleTask2 ffffffff80d4e000 287 READY ffffffff805cbbf0 0 2
tIdleTask3 ffffffff80d59000 287 READY ffffffff805cbc04 0 3
value = 0 = 0x0
->
You are able to connect to your Raspberry Pi over Visual Studio Code using Wind River Plugin for VxWorks and add the VxWorks SDK.
Update: Newer versions such as 21.07 or 22.03 are available here:
https://forums.windriver.com/t/vxworks-software-development-kit-sdk/43
Thank you for reading.
More useful links to VxWorks: