I have been trying to run the xddp-label.c
example as given in the xenomai documentation on my raspberry pi model 3b+ 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
. The OS is raspbian buster.
-
Hi Yousousen, great question! Could you please provide some additional information: what Raspberry Pi model are you using?David– David2020年04月26日 21:38:28 +00:00Commented Apr 26, 2020 at 21:38
-
Sure, I edited my question and added the model.Yousousen– Yousousen2020年04月27日 11:44:47 +00:00Commented Apr 27, 2020 at 11:44
1 Answer 1
I have found the solution myself.
While building the kernel, in the kernel configuration the CONFIG_XENO_DRIVERS_RTIPC_XDDP
option needs to be enabled.
-
Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.Ingo– Ingo2020年05月01日 08:25:08 +00:00Commented May 1, 2020 at 8:25
Explore related questions
See similar questions with these tags.