How to cross-compile application for Xenomai with Beaglebone

Goodmorning,
I’ve got a Beaglebone black and following
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black
I made an sdcard with xenomai kernel version:
Linux arm 4.4.113-ti-xenomai-r149.1 #1 SMP Mon Oct 21 11:55:55 CEST 2019 armv7l GNU/Linux

Now I would like to develop a user-space application using xenomai on my Host PC and cross compile it for Beaglebone Black. The problem is that I don’t know how to build xenomai user-space libraries that can be used during the development on Host PC.
Can you please advise me?
Thank you.

@VIBEMAC, you’ll need to build the Xenomai userspace on the BeagleBone Black.

sudo apt update
sudo apt install devscripts debhelper findutils autotools-dev autoconf \
automake libtool pkg-config libltdl-dev git
git clone -b stable/v3.0.x https://gitlab.denx.de/Xenomai/xenomai.git
cd ./xenomai/
debuild -us -uc

Then install all *.deb files built that you need…

Regards,

Hello @RobertCNelson,
thank you very much for your answer. Actually yesterday I found and followed the steps that you described here:

git clone -b stable/v3.0.x http://git.xenomai.org/xenomai-3.git --depth=1
cd xenomai-3/
./scripts/bootstrap
./configure CFLAGS="-march=armv7-a -mfpu=vfp3" LDFLAGS="-march=armv7-a -mfpu=vfp3" --with-core=cobalt --enable-smp
make
sudo make install

I suppose that they are similar as the ones that you’ve suggested me.
Now I wonder, should I copy the xenomai libraries (.a and .so) contained in /usr/xenomai/lib and paste them in my host PC? Then in theory I can refer to them, when I write the code… Is it correct?
Thank you for your valuable assistance.

Regards,
Davide

Hello to All,
after some efforts I can compile natively a program on Beaglebone black with Xenomai support.
Now I’d like to be able to cross compile Xenomai applications from my Host PC. How can I create an environment to do that?
It’s very important please…