* [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
@ 2008-05-06 20:01 Hugo Braga
2008-05-07 9:00 ` Gilles Chanteperdrix
2008-05-07 17:46 ` Breno Carneiro Pinheiro
0 siblings, 2 replies; 10+ messages in thread
From: Hugo Braga @ 2008-05-06 20:01 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
Hello,
I am trying to install xenomm but there are some problems when I do it.
I would like to know if xenomai 2.4.x supports xenomm.
Thanks,
Hugo Braga
[-- Attachment #2: Type: text/html, Size: 182 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-06 20:01 [Xenomai-help] Does Xenomai 2.4.x support Xenomm ? Hugo Braga
@ 2008-05-07 9:00 ` Gilles Chanteperdrix
2008-05-07 17:46 ` Breno Carneiro Pinheiro
1 sibling, 0 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-05-07 9:00 UTC (permalink / raw)
To: Hugo Braga; +Cc: xenomai
On Tue, May 6, 2008 at 10:01 PM, Hugo Braga <hugovaz@domain.hid> wrote:
> Hello,
> I am trying to install xenomm but there are some problems when I do it.
> I would like to know if xenomai 2.4.x supports xenomm.
Maybe you would have more chances to get an answer if you posted your
question on xenomm mailing list:
https://mail.gna.org/listinfo/xenomm-feedback/
--
Gilles
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-06 20:01 [Xenomai-help] Does Xenomai 2.4.x support Xenomm ? Hugo Braga
2008-05-07 9:00 ` Gilles Chanteperdrix
@ 2008-05-07 17:46 ` Breno Carneiro Pinheiro
2008-05-07 17:52 ` Gilles Chanteperdrix
1 sibling, 1 reply; 10+ messages in thread
From: Breno Carneiro Pinheiro @ 2008-05-07 17:46 UTC (permalink / raw)
To: xenomai@xenomai.org
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
Hi all, I'm trying to compile a simple Xenomai application.
I did a makefile as showed below:
target = task_teste
CC := ppc_6xx-gcc
XENO_CONFIG := /home/breno/ELDK/ppc_6xx/usr/local/xenomai/bin/xeno-config
CFLAGS := $(shell $(XENO_CONFIG) --xeno-cflags)
LDFLAGS := -lnative $(shell $(XENO_CONFIG) --xeno-ldflags)
$(target): $(target).c
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
I running on powerpc processor where I embedded a linux kernel-tree form
DENX.
The errror returned is:
ppc_6xx-gcc -o task_teste task_teste.c -I/usr/local/xenomai/include
-D_GNU_SOURCE -D_REENTRANT -lnative -L/usr/local/xenomai/lib -lpthread
/home/breno/ELDK/usr/bin/../lib/gcc/powerpc-linux/4.0.0/../../../../powerpc-linux/bin/ld:
cannot find -lnative
collect2: ld returned 1 exit status
make: *** [task_teste] Error 1
So, why don't it find the -lnative. I already configured my kernel option
with Xenomai and native,posix options.
Thanks,
Breno
[-- Attachment #2: Type: text/html, Size: 1045 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-07 17:46 ` Breno Carneiro Pinheiro
@ 2008-05-07 17:52 ` Gilles Chanteperdrix
2008-05-07 21:06 ` Breno Carneiro Pinheiro
0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-05-07 17:52 UTC (permalink / raw)
To: Breno Carneiro Pinheiro; +Cc: xenomai@xenomai.org
On Wed, May 7, 2008 at 7:46 PM, Breno Carneiro Pinheiro
> LDFLAGS := -lnative $(shell $(XENO_CONFIG) --xeno-ldflags)
This should be:
LDFLAGS := $(shell $(XENO_CONFIG) --xeno-ldflags) -lnative
Order matters.
--
Gilles
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-07 17:52 ` Gilles Chanteperdrix
@ 2008-05-07 21:06 ` Breno Carneiro Pinheiro
2008-05-07 21:19 ` Gilles Chanteperdrix
0 siblings, 1 reply; 10+ messages in thread
From: Breno Carneiro Pinheiro @ 2008-05-07 21:06 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org
[-- Attachment #1: Type: text/plain, Size: 527 bytes --]
Thanks Gilles, it seems compiled. But I tried to run it but I the command
./test_task is not enough, isn't it? I also tried xeno-load but it's a
coomand not found on my system.
Have any tips?
Thanks again,
Breno
2008/5/7 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
> On Wed, May 7, 2008 at 7:46 PM, Breno Carneiro Pinheiro
> > LDFLAGS := -lnative $(shell $(XENO_CONFIG) --xeno-ldflags)
>
> This should be:
>
> LDFLAGS := $(shell $(XENO_CONFIG) --xeno-ldflags) -lnative
>
> Order matters.
>
> --
> Gilles
>
[-- Attachment #2: Type: text/html, Size: 898 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-07 21:06 ` Breno Carneiro Pinheiro
@ 2008-05-07 21:19 ` Gilles Chanteperdrix
2008-05-07 21:27 ` Breno Carneiro Pinheiro
0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-05-07 21:19 UTC (permalink / raw)
To: Breno Carneiro Pinheiro; +Cc: xenomai@xenomai.org
Breno Carneiro Pinheiro wrote:
> Thanks Gilles, it seems compiled. But I tried to run it but I the command
> ./test_task is not enough, isn't it? I also tried xeno-load but it's a
> coomand not found on my system.
What happens, is not there any error message ?
--
Gilles.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-07 21:19 ` Gilles Chanteperdrix
@ 2008-05-07 21:27 ` Breno Carneiro Pinheiro
2008-05-07 21:35 ` Gilles Chanteperdrix
0 siblings, 1 reply; 10+ messages in thread
From: Breno Carneiro Pinheiro @ 2008-05-07 21:27 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org
[-- Attachment #1: Type: text/plain, Size: 623 bytes --]
Well, trying ./task_test I got an error message:
./task_test : error while loading shared libraries : libnative.so.0 : cannot
open shared object file : Not such file or directory
That's it!!!
Cheers,
Breno
2008/5/7 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
> Breno Carneiro Pinheiro wrote:
> > Thanks Gilles, it seems compiled. But I tried to run it but I the
> command
> > ./test_task is not enough, isn't it? I also tried xeno-load but it's a
> > coomand not found on my system.
>
> What happens, is not there any error message ?
>
> --
>
>
> Gilles.
>
[-- Attachment #2: Type: text/html, Size: 1122 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-07 21:27 ` Breno Carneiro Pinheiro
@ 2008-05-07 21:35 ` Gilles Chanteperdrix
2008-05-11 20:02 ` Breno Carneiro Pinheiro
0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-05-07 21:35 UTC (permalink / raw)
To: Breno Carneiro Pinheiro; +Cc: xenomai@xenomai.org
Breno Carneiro Pinheiro wrote:
> Well, trying ./task_test I got an error message:
>
>
> ./task_test : error while loading shared libraries : libnative.so.0 : cannot
> open shared object file : Not such file or directory
There are several solutions to these issue which has nothing to do with
Xenomai. You should follow the example in examples/native
--
Gilles.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-07 21:35 ` Gilles Chanteperdrix
@ 2008-05-11 20:02 ` Breno Carneiro Pinheiro
2008-05-11 21:38 ` Alex
0 siblings, 1 reply; 10+ messages in thread
From: Breno Carneiro Pinheiro @ 2008-05-11 20:02 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org
[-- Attachment #1.1: Type: text/plain, Size: 1146 bytes --]
Hi, I think I got solved the last error (* ./task_test : error while loading
shared libraries : libnative.so.0 : cannot
> open shared object file : Not such file or directory*) when I tried to
execute my application below:
#include <sys/mman.h>
#include <native/task.h>
#include <stdio.h>
#define TASK_PRIO 99 /* Highest RT priority */
#define TASK_MODE 0 /* No flags */
#define TASK_STKSZ 0 /* Stack size (use default one) */
RT_TASK task_desc;
void task_body (void *cookie)
{
for (;;) {
printf("%s\n",'a');
}
}
int main (int argc, char *argv[])
{
int err;
mlockall(MCL_CURRENT|MCL_FUTURE);
err = rt_task_create(&task_desc,
"MyTaskName",
TASK_STKSZ,
TASK_PRIO,
TASK_MODE);
if (!err)
rt_task_start(&task_desc,&task_body,NULL);
/* ... */
}
void cleanup (void)
{
rt_task_delete(&task_desc);
}
I used the Makefile attached!!!
But now, when I execute ./task_test on my environment I got:
*segmentation fault
*Does it any relation with my application?*
*
Thanks,
Breno
[-- Attachment #1.2: Type: text/html, Size: 2250 bytes --]
[-- Attachment #2: Makefile --]
[-- Type: application/octet-stream, Size: 2446 bytes --]
###### CONFIGURATION ######
### List of applications to be build
#APPLICATIONS = trivial-periodic sigxcpu rtprint
APPLICATIONS = task_test
### Note: to override the search path for the xeno-config script, use "make XENO=..."
### List of modules to be build
MODULES =
### Note: to override the kernel source path, use "make KSRC=..."
###### USER SPACE BUILD (no change required normally) ######
ifeq ($(KERNELRELEASE),)
ifneq ($(APPLICATIONS),)
### Default Xenomai installation path
#XENO ?= /usr/xenomai
XENO ?= /home/breno/ELDK/ppc_6xx/usr/local/xenomai/
XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)
### Sanity check
ifeq ($(XENOCONFIG),)
all::
@echo ">>> Invoke make like this: \"make XENO=/path/to/xeno-config\" <<<"
@echo
endif
CC=$(shell $(XENOCONFIG) --cc)
CFLAGS=$(shell $(XENOCONFIG) --xeno-cflags) $(MY_CFLAGS)
LDFLAGS=$(shell $(XENOCONFIG) --xeno-ldflags) $(MY_LDFLAGS) -lnative
# This includes the library path of given Xenomai into the binary to make live
# easier for beginners if Xenomai's libs are not in any default search path.
LDFLAGS+=-Xlinker -rpath -Xlinker $(shell $(XENOCONFIG) --libdir)
all:: $(APPLICATIONS)
clean::
$(RM) $(APPLICATIONS) *.o
endif
endif
###### SPECIAL TARGET RULES ######
task_test: task_test.c
#$(CC) $(CFLAGS) $? $(LDFLAGS) -lrtdk -o $@
$(CC) $(CFLAGS) $? $(LDFLAGS) -lnative -o $@
###### KERNEL MODULE BUILD (no change required normally) ######
ifneq ($(MODULES),)
### Default to sources of currently running kernel
#KSRC ?= /lib/modules/$(shell uname -r)/build
KSRC ?= /home/breno/ELDK/ppc_6xx/lib/modules/$(shell uname -r)/build
OBJS := ${patsubst %, %.o, $(MODULES)}
CLEANMOD := ${patsubst %, .%*, $(MODULES)}
PWD := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
### Kernel 2.6
ifeq ($(findstring 2.6,$(KSRC)),2.6)
obj-m := $(OBJS)
EXTRA_CFLAGS := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/posix $(ADD_CFLAGS)
all::
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules
### Kernel 2.4
else
ARCH ?= $(shell uname -i)
INCLUDE := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/compat -I$(KSRC)/include/xenomai/posix
CFLAGS += $(shell $(MAKE) -s -C $(KSRC) CC=$(CC) ARCH=$(ARCH) SUBDIRS=$(PWD) modules) $(INCLUDE)
all:: $(OBJS)
endif
## Target for capturing 2.4 module CFLAGS
modules:
@echo "$(CFLAGS)"
clean::
$(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers
$(RM) -R .tmp*
endif
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-help] Does Xenomai 2.4.x support Xenomm ?
2008-05-11 20:02 ` Breno Carneiro Pinheiro
@ 2008-05-11 21:38 ` Alex
0 siblings, 0 replies; 10+ messages in thread
From: Alex @ 2008-05-11 21:38 UTC (permalink / raw)
To: 'Breno Carneiro Pinheiro'; +Cc: xenomai
>Hi, I think I got solved the last error ( ./task_test : error while loading
shared libraries : libnative.so.0 : cannot
> open shared object file : Not such file or directory) when I tried to
execute my application below:
>void task_body (void *cookie)
{
for (;;) {
printf("%s\n",'a');
}
}
>I used the Makefile attached!!!
>But now, when I execute ./task_test on my environment I got:
>segmentation fault
>
>Does it any relation with my application?
Check printf() in your task_body: 'a' is not a null-terminated string.
Instead of
printf("%s\n",'a') it should be
printf("%s\n","a") or
printf("%c\n",'a')
Alexander
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-05-11 21:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-06 20:01 [Xenomai-help] Does Xenomai 2.4.x support Xenomm ? Hugo Braga
2008-05-07 9:00 ` Gilles Chanteperdrix
2008-05-07 17:46 ` Breno Carneiro Pinheiro
2008-05-07 17:52 ` Gilles Chanteperdrix
2008-05-07 21:06 ` Breno Carneiro Pinheiro
2008-05-07 21:19 ` Gilles Chanteperdrix
2008-05-07 21:27 ` Breno Carneiro Pinheiro
2008-05-07 21:35 ` Gilles Chanteperdrix
2008-05-11 20:02 ` Breno Carneiro Pinheiro
2008-05-11 21:38 ` Alex
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.