I have been trying to run the xddp-label.c
example as given in the xenomai documentation on my raspberry pi with xenomai patched kernel. I can compile the program just fine, but when I try to run it I get the error: socket: Address family not supported by protocol
. I noticed I get the same error when trying to compile other xddp examples from the documentation. I suspect it has something to do with the AF_RTIPC
macro and the sockets, but I do not know anything about socket programming, so I am not sure. I hope someone can help me with this.
I am using a prebuilt xenomai kernel on my raspberry pi from this tutorial. I have tried running the program with a custom patched xenomai kernel as well, but without success.
For reference, the output of uname -a
:
Linux raspberrypi 4.9.80-v7-xeno3+ #2 SMP PREEMPT Fri Aug 10 15:04:48 KST 2018 armv7l GNU/Linux
The makefile I am using to compile the program:
SKIN=posix
MAIN_SRC=xddp_label
TARGET=xddp_label
CC=g++
LM=-lm
CFLAGS := -g $(shell xeno-config --posix --skin=$(SKIN) --cflags)
LDFLAGS := -g $(LM) $(shell xeno-config --posix --skin=$(SKIN) --ldflags)
#CC := $(shell xeno-config --cc)
$(TARGET): $(MAIN_SRC).c
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
I run the program with sudo ./xddp_label.c
.