2008-12-03 18:02:53     xenomai user application

Document created by Aaronwu Employee on Aug 11, 2013
Version 1Show Document
  • View in full screen mode

2008-12-03 18:02:53     xenomai user application

Jan Kowalski (POLAND)

Message: 66261   

 

Hi,

 

I just start with 2008R1.5-RC3, and I need advise how to add xenomai user application to this release (makefile etc.), with older version (from 2007) it was  straight forward.

 

Thanks

 

Marek

QuoteReplyEditDelete

 

 

2008-12-03 18:08:10     Re: xenomai user application

Mike Frysinger (UNITED STATES)

Message: 66262   

 

there's documentation ... please read it:

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:adeos

QuoteReplyEditDelete

 

 

2008-12-04 03:29:07     Re: xenomai user application

Jan Kowalski (POLAND)

Message: 66274   

 

Thanks for reply.

 

I read it before but after advise I did it again. Unfortunately  it  didn't help.

 

I can build and boot BF537 with linux + adeos+ xenomai; I can run all testsuits, this is fine. But I can't compile ../xenomai-2.4.0/examples and I can't compile my own project.

 

I could do it with 2007 revision.

 

Regards

 

Marek

QuoteReplyEditDelete

 

 

2008-12-04 03:32:30     Re: xenomai user application

Mike Frysinger (UNITED STATES)

Message: 66275   

 

what exactly is the error you are getting ?

QuoteReplyEditDelete

 

 

2008-12-04 05:02:27     Re: xenomai user application

Jan Kowalski (POLAND)

Message: 66340   

 

Hi,

 

Please find in result from ../xenomai-2.4.0/examples/posix/

 

I got same results regardless make or maxe Xeno=/proper path to xeno-config

 

 

 

Regard

 

Marek

 

xenomai_examples_posix

QuoteReplyEditDelete

 

 

2008-12-04 09:15:46     Re: xenomai user application

Jan Kowalski (POLAND)

Message: 66357   

 

Hi,

 

Do you have any hint how to solved it? or should I downgrade to 2007 revision?

 

 

 

Regards

 

Marek

 

PS I like kernel image size in 2008, it looks 2 times smaler then from 2007 (xenomai version)

 

 

QuoteReplyEditDelete

 

 

2008-12-05 03:19:25     Re: xenomai user application

Yi Li (CHINA)

Message: 66378   

 

Marek,

 

The Makefile you used is not supposed to be used for an embeded system.  You have to hack the include patch and library path a little. After building xenomai, the headers and libraries are installed to uclinux-dist/staging/usr/.

 

-Yi

 

 

QuoteReplyEditDelete

 

 

2008-12-06 03:13:33     Re: xenomai user application

Jan Kowalski (POLAND)

Message: 66437   

 

Yi Li,

 

Thanks for confirmation.

 

Did anybody make it before for .../xenomai-x.x.x/examples ? I just don't want to open door, again.

 

Regards

 

Marek

QuoteReplyEditDelete

 

 

2009-02-05 12:57:15     Re: xenomai user application

Michael McTernan (UNITED KINGDOM)

Message: 68926   

 

I can build apps against Xenomai using the 2008 release, no hacking of the staging area needed.  You just need to build and include the Xenomai stuff for the local PC first, something like this:

 

$ cd uClinux-dist-2008R1.5-RC3/user/xenomai

$ ./configure --host=bfin-uclinux

....

$ make && make install

 

You then get xeno-config, libs and stuff installed to /usr/xenomai/.  You may need to add /usr/xenomai/bin to your path, noting that if you do, it may interfere with kernel builds afterwards.  If you run xeno-config without options, the output should be something like this:

 

xeno-config --verbose

    --version="2.4.0"

    --cc="bfin-uclinux-gcc"

    --arch="blackfin"

    --prefix="/usr/xenomai"

    --xeno-cflags="-I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__"

    --xeno-ldflags="-L/usr/xenomai/lib -lpthread "

    --posix-cflags="-I/usr/xenomai/include -I/usr/xenomai/include/posix -D_GNU_SOURCE -D_REENTRANT -D__XENO__"

    --posix-ldflags="-L/usr/xenomai/lib -lpthread_rt -lpthread -lrt "

    --library-dir="/usr/xenomai/lib"

Usage xeno-config OPTIONS

Options :

        --help

        --v,--verbose

        --version

        --cc

        --arch

        --prefix

        --xeno-cflags

        --xeno-ldflags

        --posix-cflags

        --posix-ldflags

        --lib*-dir,--libdir,--user-libdir

 

Now you can start building stuff with a simple makefile like this:

 

CC=bfin-uclinux-gcc

CFLAGS=$(shell xeno-config --xeno-cflags)

LDFLAGS=-Wl,-elf2flt $(shell xeno-config --xeno-ldflags)

 

hello: hello.o

        $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

 

You can use --posix-cflags if that's your prefered skin, but there seems to be a minor link issue with the library order for --posix-ldflags.  I've posted that to the xenomai-help list: https://mail.gna.org/public/xenomai-help/2009-02/msg00024.html

 

HTH,

 

Mike

Attachments

    Outcomes