Install Xenomai on Dragonboard 410c

config file is uploaded to:
config.log

Glad you were able to install the libraries.

Are you executing the latency tests with the right privileges?
Please send the output of:

$ ldd /usr/xenomai/bin/latency
$ sudo /usr/xenomai/bin/latency -t 0

1 Like

linaro@linaro-alip:~$ ldd /usr/xenomai/bin/latency
linux-vdso.so.1 (0x0000007f9bd1d000)
libcobalt.so.2 => /usr/xenomai/lib/libcobalt.so.2 (0x0000007f9bcec000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f9bcaf000)
librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007f9bc97000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f9bbf7000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f9baaa000)
/lib/ld-linux-aarch64.so.1 (0x0000007f9bd1e000)

linaro@linaro-alip:~$ sudo /usr/xenomai/bin/latency -t 0
0"000.000| BUG in low_init(): [main] Cobalt core not enabled in kernel

Can you confirm that you used the same Xenomai version that you patched the kernel with and not a different library?

Also provide
$ dmesg | grep ipipe
$ cat /proc/xenomai/version
$ cat /proc/ipipe/version
$ uname -a

also check
$ cat /proc/ipipe/Linux

We tried to install ipipe and xenomai agian to confirm that this is the same version.

So it seems now latency check works
Thanks a lot.:smile:

We want to compare the operation of traditional Linux vs. Linux RT(xenomai) for some loads types such as network, archiving, etc.
Do we need to create 2 threads - one RT and one not ?
How do we do it ? (how do we make a RT xenomai thread).

No, you can’t compare just like that, it makes no sense. You should start by reading the docs to understand what Xenomai is and how to use it before you even attempt to benchmark any subsystems. BTW for networking you’ll need RTnet.

Anyway, the subject is complex enough for you to spend a few weeks reading the literature on the subject. There is plenty. Maybe start with chapters 12, 13 and 14 of “Building Embedded Linux Systems” by Karim Yaghmour, Philippe Gerum and others.

Pdf on the link below:
http://htchttp.s3.amazonaws.com/books/building_embedded_linux_systems_second_edition.pdf

Maybe I misunderstood your note (I thought you wanted to evaluate realtime networking just by having installed Xenomai).

But sure if you just want to check pure CPU processing and process scheduling with CPU load just go ahead and create a realtime process and a linux process and load the system. The Xenomai kernel guarantees that the realtime task will always meet its deadlines (basically you will be shielded against everything else).

However if your realtime task uses non-realtime linux services (some custom driver, some non-realtime driver) it will transition out of realtime mode into secondary mode and be scheduled just as a linux task.

One very trivial example that is in my repo is the generation of a PWM signal with GPIOS and xenomai timers: a standard linux kernel can’t do that.

Regardless, plenty for you to read and study.

1 Like

We want to make a thread that do
Gpio up to 1
Sleep some seconds
Gpio down to 0

We already made threads and RT threads and worked with them(xenomai + linux)

But,
We see some different methods to use gpio.
The methods we saw are:

  1. Write the value (1 or 0) to file (I saw specific path dedicated for dragonboard - not xenomai related).
    Is it works with xenomai?

  2. Using RTDM
    (Related to xenomai, not DB410c)

  3. Using gpio.h.

Do you know if all of them works?
Which one is the simplest way?

Thanks again.

Also after a lot of reading and googling we found this:

it seeme like the right way to toggle the gpio with xenomai rt task, but of course it doesn’t compatible with the dragonboard.
We executed these commands:


and created a regular linux thread (within a c program we wrote) which executes a function that basiclly runs in a while loop and just writes to /sys/class/gpio/gpio$GPIONUM/value one and zero. We’ve checked that with an oscilloscope and that works perfectly, and also it really writes to the value file (we’ve done this with a system function in the c program, but we also tried with a fd opening and it worked as well).

We tried the same with a rt thread we created using xenomai api and it doesn’t even write to the file. Also from your examples and the example I attached we understand there is a special way to toggle those GPIOs through a driver interfaceor something like that.
We got lost a little bit in those drivers, and all we need to do is just toggeling some specific GPIO with a rt task, that’s all.
Can you guide us throgh the right way to do this please?

BTW, also looked up for include/rtdm/gpio.h, and it doesn’t exist. Any idea why?

Thanks a lot!!

Another suggestion that I saw is this one:
http://www.armadeus.org/wiki/index.php?title=Xenomai:Blinking_LEDs

It’s pretty much the same what I did with the regular thread (as described in the previous comment). I just changed:
#define LED “/dev/gpio/PD31”
to
#define GPIO_13 “/sys/class/gpio/gpio13/value”
and of course updated LED to GPIO_13 where needed in the program.
Unfortunately still nothing was writen to value. I just can’t understand why it’s not working the same on db410c :frowning: