* [Xenomai] How to use Xenomai in Eclipse
@ 2014-07-24 6:49 Frede Florian
2014-07-24 13:56 ` Lennart Sorensen
0 siblings, 1 reply; 4+ messages in thread
From: Frede Florian @ 2014-07-24 6:49 UTC (permalink / raw)
To: xenomai
Hello,
We plan to use Xenomai in our new project. So now I tried to prepare a
Eclipse-Project with Xenomai. First I compiled the Debian packages from
Xenomai 2.6.3
<http://www.xenomai.org/index.php/Building_Debian_packages> for my
System. After that I install the libxenomai1 and libxenomai-dev
After that I have create a new empty project. There I can include the
Xenomailib (#include <xenomai/native/task.h>).
First issue: While compiling the code with Eclipse I get an*fatal error:
nucleus/sched.h: file or directory not found*...
I try to find a answer in the endless world wide web :-) but I didn't
found a solution.
Second issue: When I change to the compiler for my target platform
(arm-cortexa8-linux-gnueabihf-gcc) I can not include the Xenomai library?
I use following Software on my System: Eclipse Version: Luna Release
(4.4.0), Debian GNU/Linux 7.6 (wheezy), Xenomai 2.6.3,
OSELAS.Toolchain-2013.12.2
<http://www.pengutronix.de/oselas/toolchain/download/OSELAS.Toolchain-2013.12.2.tar.bz2>
Regards Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai] How to use Xenomai in Eclipse
2014-07-24 6:49 [Xenomai] How to use Xenomai in Eclipse Frede Florian
@ 2014-07-24 13:56 ` Lennart Sorensen
2014-07-25 9:10 ` Frede Florian
2014-07-27 16:49 ` Gilles Chanteperdrix
0 siblings, 2 replies; 4+ messages in thread
From: Lennart Sorensen @ 2014-07-24 13:56 UTC (permalink / raw)
To: Frede Florian; +Cc: xenomai
On Thu, Jul 24, 2014 at 08:49:27AM +0200, Frede Florian wrote:
> Hello,
>
> We plan to use Xenomai in our new project. So now I tried to prepare
> a Eclipse-Project with Xenomai. First I compiled the Debian packages
> from Xenomai 2.6.3
> <http://www.xenomai.org/index.php/Building_Debian_packages> for my
> System. After that I install the libxenomai1 and libxenomai-dev
>
> After that I have create a new empty project. There I can include
> the Xenomailib (#include <xenomai/native/task.h>).
>
> First issue: While compiling the code with Eclipse I get an*fatal
> error: nucleus/sched.h: file or directory not found*...
>
> I try to find a answer in the endless world wide web :-) but I
> didn't found a solution.
>
> Second issue: When I change to the compiler for my target platform
> (arm-cortexa8-linux-gnueabihf-gcc) I can not include the Xenomai
> library?
>
> I use following Software on my System: Eclipse Version: Luna Release
> (4.4.0), Debian GNU/Linux 7.6 (wheezy), Xenomai 2.6.3,
> OSELAS.Toolchain-2013.12.2 <http://www.pengutronix.de/oselas/toolchain/download/OSELAS.Toolchain-2013.12.2.tar.bz2>
You usually have to explicitly specify /usr/include/xenomai as an include
directory when working with xenomai, given the xenomai files don't put
the xenomai part of the path in the #include statements.
Of course if cross compiling you would have to have the header files
for your target in the correct place and add that to the include path.
Using pkg-config would pretty much just take care of it for you of course.
For example:
root@omap5:~# pkg-config --cflags libxenomai_native
-D_GNU_SOURCE -D_REENTRANT -D__XENO__ -I/usr/include/xenomai
So you would make sure your makefile had:
CFLAGS += $(shell pkg-config --cflags libxenomai_native)
LIBS += $(shell pkg-config --libs libxenomai_native)
I can't remember the syntax for using pkg-config for cross compiling at
the moment, but I remember there is one. I almost never cross compile
so I don't remember it.
--
Len Sorensen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai] How to use Xenomai in Eclipse
2014-07-24 13:56 ` Lennart Sorensen
@ 2014-07-25 9:10 ` Frede Florian
2014-07-27 16:49 ` Gilles Chanteperdrix
1 sibling, 0 replies; 4+ messages in thread
From: Frede Florian @ 2014-07-25 9:10 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: xenomai
Thanks for the fast help,
seems to work for me I used the wrong directory in the includes... also
the arm cross compiler seems to work.
Regards Florian
> You usually have to explicitly specify /usr/include/xenomai as an include
> directory when working with xenomai, given the xenomai files don't put
> the xenomai part of the path in the #include statements.
>
> Of course if cross compiling you would have to have the header files
> for your target in the correct place and add that to the include path.
>
> Using pkg-config would pretty much just take care of it for you of course.
>
> For example:
> root@omap5:~# pkg-config --cflags libxenomai_native
> -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -I/usr/include/xenomai
>
> So you would make sure your makefile had:
>
> CFLAGS += $(shell pkg-config --cflags libxenomai_native)
> LIBS += $(shell pkg-config --libs libxenomai_native)
>
> I can't remember the syntax for using pkg-config for cross compiling at
> the moment, but I remember there is one. I almost never cross compile
> so I don't remember it.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai] How to use Xenomai in Eclipse
2014-07-24 13:56 ` Lennart Sorensen
2014-07-25 9:10 ` Frede Florian
@ 2014-07-27 16:49 ` Gilles Chanteperdrix
1 sibling, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2014-07-27 16:49 UTC (permalink / raw)
To: Lennart Sorensen, Frede Florian; +Cc: xenomai
On 07/24/2014 03:56 PM, Lennart Sorensen wrote:
> CFLAGS += $(shell pkg-config --cflags libxenomai_native)
> LIBS += $(shell pkg-config --libs libxenomai_native)
>
> I can't remember the syntax for using pkg-config for cross compiling at
> the moment, but I remember there is one. I almost never cross compile
> so I don't remember it.
>
In order to use pkg-config for cross-compiling, you have to use some
environment variables.
I use:
PKG_CONFIG_LIBDIR=$(staging)/usr/lib/pkgconfig:$(staging)/usr/share/pkgconfig \
PKG_CONFIG_SYSROOT_DIR=$(staging) \
PKG_CONFIG_ALLOW_SYSTEM_LIBS=y \
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=y
Where $(staging) is the directory passed to the DESTDIR variable when
installing xenomai.
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-27 16:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-24 6:49 [Xenomai] How to use Xenomai in Eclipse Frede Florian
2014-07-24 13:56 ` Lennart Sorensen
2014-07-25 9:10 ` Frede Florian
2014-07-27 16:49 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.