2

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.

asked Apr 26, 2020 at 17:11
2
  • Hi Yousousen, great question! Could you please provide some additional information: what Raspberry Pi model are you using? Commented Apr 26, 2020 at 21:38
  • Sure, I edited my question and added the model. Commented Apr 27, 2020 at 11:44

1 Answer 1

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.

answered Apr 28, 2020 at 17:34
1
  • 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. Commented May 1, 2020 at 8:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.