Skip to contentSkip to conversation

Problems linking a custom vxWorks application

Xenomai-help Niklaus Giger 2 participants 4 messages Nov 29, 2005

lore
Share & tools
lore
#0 lore raw

Hi

I update to the latest xenomai/trunk (revision 207) and compiled and installed without problems xenomai for my PPC405 board (using busybox).

The kernel starts (using a NFS root) and I can login without major problems. Tools like xeno-load and xeno-test do not work as there is no /bin/bash around. I usually work around this problem by calling insmod and alike manually.

In xeno-load I also remarked that prefix="/mnt/data.ng/hcu/rootfs/usr/xenomai"
points to the mount point while compiling/installing xenomai, but not to the mount point after starting the target (where /
equals /mnt/data.ng/hcu/rootfs).

My real problem is that I cannot link my custom UVM application, as I get the following error. Here are as the complete calls to compile (only the last file) and link the application:

ccache /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-405-linux-gnu-g++ -c -Wno-deprecated -g -DAB_DSP_5 -DVXWORKS -DBB_VERS -DIMC_VERS -DSYM_VERS -DCEL_VERS -DRTAI -I. -I/mnt/data.ng/hcu/rootfs/usr/xenomai/include -O2 -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -Wall -pipe -D__XENO_UVM__ -O -I/home/hcu/project/metaframe/1_3_5_1/BSys/mak/linux -I/home/hcu/project/metaframe/1_3_5_1/BSys/src -I/home/hcu/project/metaframe/1_3_5_1 -I/home/hcu/project/vx_skin -I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks -I/mnt/data.ng/hcu/rootfs/usr/xenomai/include -I/mnt/data.ng/hcu/kernel/build-xeno-hcu3/src/include -I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks
-O /home/hcu/project/metaframe/1_3_5_1/BSys/src/BSysTypeInfoVXWorksParser.cpp -o ../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o
ar ru ../../obj/xeno-ppc405/BSys_lib.a \
../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o
ranlib ../../obj/xeno-ppc405/BSys_lib.a /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-405-linux-gnu-g++ -g -o
TSysMain ../../obj/xeno-ppc405/TSysMain.o ../../obj/xeno-ppc405/BSys_test.a ../../obj/xeno-ppc405/BSys_lib.a
-u__xeno_skin_init -L/mnt/data.ng/hcu/rootfs/usr/xenomai/lib -luvm -lnucleus -lpthread -lvxworks -lvxworks

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x674): In function `xnpod_init':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x6b8): In function xnpod_init':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0xfe8): In function xnpod_set_thread_mode':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x26a8): In function xnpod_delete_thread':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x29a8): In function xnpod_restart_thread':
: undefined reference to `xnarch_atomic_set'
collect2: ld returned 1 exit status

What is wrong with this?

Thanks you in advance for your help.

Signature · 1 line
Niklaus Giger
#1 lore raw
Quoted 10 lines · Niklaus Giger

Hi

I update to the latest xenomai/trunk (revision 207) and compiled and installed without problems xenomai for my PPC405 board (using busybox).

The kernel starts (using a NFS root) and I can login without major problems. Tools like xeno-load and xeno-test do not work as there is no /bin/bash around. I usually work around this problem by calling insmod and alike manually.

In xeno-load I also remarked that prefix="/mnt/data.ng/hcu/rootfs/usr/xenomai" points to the mount point while compiling/installing xenomai, but not to the mount point after starting the target (where / equals /mnt/data.ng/hcu/rootfs).

My real problem is that I cannot link my custom UVM application, as I get the following error. Here are as the complete calls to compile (only the last file) and link the application:

A fix for this was pending in my tree. Please resync and try again.

Quoted 38 lines

ccache /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-405-linux-gnu-g++

(quoted diff) +0 -12
-c -Wno-deprecated -g -DAB_DSP_5 -DVXWORKS -DBB_VERS -DIMC_VERS -DSYM_VERS 
-DCEL_VERS -DRTAI -I. -I/mnt/data.ng/hcu/rootfs/usr/xenomai/include -O2 
-D_GNU_SOURCE -D_REENTRANT -D__XENO__ -Wall -pipe -D__XENO_UVM__ -O   
-I/home/hcu/project/metaframe/1_3_5_1/BSys/mak/linux 
-I/home/hcu/project/metaframe/1_3_5_1/BSys/src 
-I/home/hcu/project/metaframe/1_3_5_1 -I/home/hcu/project/vx_skin 
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks 
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include 
-I/mnt/data.ng/hcu/kernel/build-xeno-hcu3/src/include 
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks  
-O  /home/hcu/project/metaframe/1_3_5_1/BSys/src/BSysTypeInfoVXWorksParser.cpp  
-o ../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o

ar ru ../../obj/xeno-ppc405/BSys_lib.a \
../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o
ranlib ../../obj/xeno-ppc405/BSys_lib.a /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-405-linux-gnu-g++ -g -o
TSysMain ../../obj/xeno-ppc405/TSysMain.o ../../obj/xeno-ppc405/BSys_test.a ../../obj/xeno-ppc405/BSys_lib.a

(quoted diff) +0 -2
-u__xeno_skin_init -L/mnt/data.ng/hcu/rootfs/usr/xenomai/lib -luvm -lnucleus 
-lpthread -lvxworks -lvxworks

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x674): In function `xnpod_init':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x6b8): In function xnpod_init':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0xfe8): In function xnpod_set_thread_mode':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x26a8): In function xnpod_delete_thread':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x29a8): In function xnpod_restart_thread':
: undefined reference to `xnarch_atomic_set'
collect2: ld returned 1 exit status

What is wrong with this?

Thanks you in advance for your help.

Signature · 1 line
Philippe.
#2 lore raw
In reply to Niklaus Giger
Quoted 8 lines · Niklaus Giger

Hi

I update to the latest xenomai/trunk (revision 207) and compiled and installed without problems xenomai for my PPC405 board (using busybox).

The kernel starts (using a NFS root) and I can login without major problems. Tools like xeno-load and xeno-test do not work as there is no /bin/bash around. I usually work around this problem by calling insmod and alike manually.

In xeno-load I also remarked that prefix="/mnt/data.ng/hcu/rootfs/usr/xenomai" points to the mount point while compiling/installing xenomai, but not to the mount point after starting the target (where / equals /mnt/data.ng/hcu/rootfs).

The proper way to use a staging directory is:

blah/configure --prefix=/your/target/root
make DESTDIR=/mnt/host/dir

So that files are installed to /mnt/host/dir/your/target/root with the target prefix info still being /your/target/root.

Is this the way you compile/install Xeno?

Quoted 40 lines

My real problem is that I cannot link my custom UVM application, as I get the following error. Here are as the complete calls to compile (only the last file) and link the application:

ccache /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-405-linux-gnu-g++

(quoted diff) +0 -12
-c -Wno-deprecated -g -DAB_DSP_5 -DVXWORKS -DBB_VERS -DIMC_VERS -DSYM_VERS 
-DCEL_VERS -DRTAI -I. -I/mnt/data.ng/hcu/rootfs/usr/xenomai/include -O2 
-D_GNU_SOURCE -D_REENTRANT -D__XENO__ -Wall -pipe -D__XENO_UVM__ -O   
-I/home/hcu/project/metaframe/1_3_5_1/BSys/mak/linux 
-I/home/hcu/project/metaframe/1_3_5_1/BSys/src 
-I/home/hcu/project/metaframe/1_3_5_1 -I/home/hcu/project/vx_skin 
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks 
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include 
-I/mnt/data.ng/hcu/kernel/build-xeno-hcu3/src/include 
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks  
-O  /home/hcu/project/metaframe/1_3_5_1/BSys/src/BSysTypeInfoVXWorksParser.cpp  
-o ../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o

ar ru ../../obj/xeno-ppc405/BSys_lib.a \
../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o
ranlib ../../obj/xeno-ppc405/BSys_lib.a /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-405-linux-gnu-g++ -g -o
TSysMain ../../obj/xeno-ppc405/TSysMain.o ../../obj/xeno-ppc405/BSys_test.a ../../obj/xeno-ppc405/BSys_lib.a

(quoted diff) +0 -2
-u__xeno_skin_init -L/mnt/data.ng/hcu/rootfs/usr/xenomai/lib -luvm -lnucleus 
-lpthread -lvxworks -lvxworks

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x674): In function `xnpod_init':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x6b8): In function xnpod_init':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0xfe8): In function xnpod_set_thread_mode':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x26a8): In function xnpod_delete_thread':
: undefined reference to xnarch_atomic_set' /mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x29a8): In function xnpod_restart_thread':
: undefined reference to `xnarch_atomic_set'
collect2: ld returned 1 exit status

What is wrong with this?

Thanks you in advance for your help.

Signature · 1 line
Philippe.
#3 lore raw

Am Dienstag, 29. November 2005 21.32 schrieb Philippe Gerum:

Quoted 19 lines
Quoted 10 lines · Niklaus Giger

Hi

I update to the latest xenomai/trunk (revision 207) and compiled and installed without problems xenomai for my PPC405 board (using busybox).

The kernel starts (using a NFS root) and I can login without major problems. Tools like xeno-load and xeno-test do not work as there is no /bin/bash around. I usually work around this problem by calling insmod and alike manually.

Quoted 5 lines

In xeno-load I also remarked that prefix="/mnt/data.ng/hcu/rootfs/usr/xenomai"
points to the mount point while compiling/installing xenomai, but not to the mount point after starting the target (where /
equals /mnt/data.ng/hcu/rootfs).

The proper way to use a staging directory is:

Quoted 7 lines

blah/configure --prefix=/your/target/root
make DESTDIR=/mnt/host/dir

So that files are installed to /mnt/host/dir/your/target/root with the target prefix info still being /your/target/root.

Is this the way you compile/install Xeno?

No, I tried --prefix=/your/target/root. But I will fix this soon

Quoted 58 lines
Quoted 58 lines

My real problem is that I cannot link my custom UVM application, as I get the following error. Here are as the complete calls to compile (only the last file) and link the application:

ccache /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-4 05-linux-gnu-g++ -c -Wno-deprecated -g -DAB_DSP_5 -DVXWORKS -DBB_VERS

(quoted diff) +0 -11
-DIMC_VERS -DSYM_VERS -DCEL_VERS -DRTAI -I.
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include -O2 -D_GNU_SOURCE
-D_REENTRANT -D__XENO__ -Wall -pipe -D__XENO_UVM__ -O
-I/home/hcu/project/metaframe/1_3_5_1/BSys/mak/linux
-I/home/hcu/project/metaframe/1_3_5_1/BSys/src
-I/home/hcu/project/metaframe/1_3_5_1 -I/home/hcu/project/vx_skin
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include
-I/mnt/data.ng/hcu/kernel/build-xeno-hcu3/src/include
-I/mnt/data.ng/hcu/rootfs/usr/xenomai/include/vxworks
-O 

/home/hcu/project/metaframe/1_3_5_1/BSys/src/BSysTypeInfoVXWorksParser.cp p -o ../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o
ar ru ../../obj/xeno-ppc405/BSys_lib.a \
../../obj/xeno-ppc405/BSysTypeInfoVXWorksParser.o
ranlib ../../obj/xeno-ppc405/BSys_lib.a /home/hcu/tools/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/powerpc-4 05-linux-gnu-g++ -g -o
TSysMain ../../obj/xeno-ppc405/TSysMain.o
../../obj/xeno-ppc405/BSys_test.a ../../obj/xeno-ppc405/BSys_lib.a

(quoted diff) +0 -2
-u__xeno_skin_init -L/mnt/data.ng/hcu/rootfs/usr/xenomai/lib -luvm
-lnucleus -lpthread -lvxworks -lvxworks

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x674):
In

function `xnpod_init':
: undefined reference to `xnarch_atomic_set'

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x6b8):
In

function `xnpod_init':
: undefined reference to `xnarch_atomic_set'

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0xfe8):
In

function `xnpod_set_thread_mode':
: undefined reference to `xnarch_atomic_set'

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x26a8) : In

function `xnpod_delete_thread':
: undefined reference to `xnarch_atomic_set'

/mnt/data.ng/hcu/rootfs/usr/xenomai/lib/libnucleus.a(pod.o)(.text+0x29a8) : In

Quoted 6 lines
Quoted 6 lines

function `xnpod_restart_thread':
: undefined reference to `xnarch_atomic_set'

collect2: ld returned 1 exit status

What is wrong with this?

TSysMain does not exist, as ld removes it after the error. Do I have to specify -r as option to ld?

Best regards

Signature · 1 line
Niklaus Giger