* Re: [Xenomai] Problem with bringing up Xenomai User Space
2012-11-30 14:11 ` Gilles Chanteperdrix
@ 2012-12-03 16:16 ` Dharma R Bhushan
2012-12-03 19:53 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Dharma R Bhushan @ 2012-12-03 16:16 UTC (permalink / raw)
To: 'Gilles Chanteperdrix'; +Cc: xenomai@xenomai.org
Hello Gilles,
Thanks for the reply.
I followed your suggestions and tried out few things. I was able to progress with the 2.6.1 approach. But got stuck as explained below. Kindly help me out in this.
I am using code-sourcery tool chain. Tool chain information is as follows.
***************************************************************************************
$arm-none-linux-gnueabi-gcc -v
Target: arm-none-linux-gnueabi
Configured with: /scratch/janisjo/arm-linux-lite/src/gcc-4.5-2011.03/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} -D__CS_SOURCERYGXX_MAJ__=2011 -D__CS_SOURCERYGXX_MIN__=3 -D__CS_SOURCERYGXX_REV__=41 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2011.03-41' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpc=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-libelf=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41)
****************************************************************************************
I have tried with CONFIG_ARM_ERRATA_430973 enabled. No success.
Further, I have tried to migrate to Xenomai-2.6.1. Kernel boots up without any issues.
I have built the user space as follows
$./configure CFLAGS="-march=armv7-a" LDFLAGS="-march=armv7-a" --build=i686-pc-linux-gnu --host=arm-none-linux-gnueabi
$make DESTDIR=../nfsroot/ install
I am getting the following output when the latency test case is executed.
root@armv7a-target:~# /usr/xenomai/bin/latency -t0
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
Xenomai: registered exported object dispsem-1147 (semaphores)
Xenomai: Switching sampling-1147 to secondary mode after exception #0 from user-space at 0x400ab878 (pid 1149)
Xenomai: native: cleaning up sem "dispsem-1147" (ret=0).
Xenomai: unregistered exported object dispsem-1147 (semaphores)
Segmentation fault
root@armv7a-target:~# /usr/xenomai/bin/latency -t1
== Sampling period: 1000 us
== Test mode: in-kernel periodic task
== All results in microseconds
warming up...
RTT| 00:00:01 (in-kernel periodic task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD| 3.960| 4.188| 9.076| 0| 0| 3.960| 9.076
RTD| 3.998| 4.222| 11.806| 0| 0| 3.960| 11.806
RTD| 3.997| 4.230| 21.074| 0| 0| 3.960| 21.074
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS| 3.960| 4.213| 21.074| 0| 0| 00:00:04/00:00:04
root@armv7a-target:~# /usr/xenomai/bin/latency -t2
== Sampling period: 1000 us
== Test mode: in-kernel timer handler
== All results in microseconds
warming up...
RTT| 00:00:01 (in-kernel timer handler, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD| -2.770| -2.665| -0.616| 0| 0| -2.770| -0.616
RTD| -2.732| -2.647| -0.193| 0| 0| -2.770| -0.193
RTD| -2.733| -2.652| -0.309| 0| 0| -2.770| -0.193
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS| -2.770| -2.654| -0.193| 0| 0| 00:00:03/00:00:03
In src/testsuite/latency/latency.c
Latency_task is created with priority value as 99(default).
err = rt_task_create(&latency_task, task_name, 0, priority, T_FPU | cpu | T_WARNSW);
Now if I make priority=0; forcefully, then segmentation fault is not occurring though the latency values are not the ones to consider.
I have no idea why the seg fault is happening for any priority value except 0 for latency_task creation.
Regards,
Dharma.
> -----Original Message-----
> From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
> Sent: Friday, November 30, 2012 7:42 PM
> To: Dharma R Bhushan
> Cc: xenomai@xenomai.org
> Subject: Re: [Xenomai] Problem with bringing up Xenomai User Space
>
> On 11/30/2012 03:04 PM, Dharma R Bhushan wrote:
> > Hello Community Members,
> >
> > I am trying to run test cases present in xenomai-2.5.6 test suite. We
> are getting the "Segmentation fault".
> >
> > Environment is as follows
> >
> > Board: Bagle-board XM rev C
> > Kernel: 2.6.35.14(2.6.35 from kernel.org+patch-
> 2.6.35.10+linaro-2.6.35.10 patch+ patch-2.6.35.11+ patch-
> 2.6.35.12+patch-2.6.35.13+ patch-2.6.35.14)
> > I-Pipe patch: adeos-ipipe-2.6.35.9-arm-1.18-
> 03.patch(slightly modified to apply the above kernel)
> > Tool chain: arm-none-linux-gnueabi-
>
> If the toolchain is a linaro toolchain (all toolchains have been called
> arm-none-linux-gnueabi- for a few years now, so the information you give
> us is essentially a non-information) with a thumb glibc, you absolutely
> need CONFIG_ARM_ERRATA_430973 enabled in the kernel configuration, even
> and especially if xenomai is configured in arm mode (which is required
> with xenomai 2.5.6 anyway).
>
> Other than that, I urge you to update to xenomai 2.6.1.
>
> --
> Gilles.
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual(s) or entity addressed above. If you are not the intended recipient of this e-mail, then (i) please notify us at cipl.administrator@canon.co.in (ii) do not use the information contained & (iii) delete it from your system. E-mail communications are not secure. Though efforts have been taken to ensure that this communication has not been tampered with; however, Canon India Pvt. Ltd. is not responsible for any changes made to the contents of or any attachments to this message without its consent.
All information contained in this message which are not of an official nature shall not be deemed as given or endorsed by Canon India Pvt. Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread