Xenomai for A13 - A10

Started by crubille, February 04, 2013, 10:55:17 PM

Previous topic - Next topic

uMinded

Quote from: crubille on March 03, 2013, 11:13:50 PM
the best way to be sure the timers use PLL/6 is to read their ctrl register!

I can dump a memory location but not a hardware register location. How do you go about dumping say 0x01C20000 to 0x01C20158(physical address range of the CCM reg)

crubille

#136
Do it in kernel code of course, somewhere it will not be done at hight rate, and late enough so you are sure everything is set.
Do not put it so it run in real time mode.



reg = readl( SW_TIMERx_CTL );
printk( KERN_NOTICE "UMINDED_MSG ... "0x%08.8X" \n, reg );


You can put it in the code you hack or in some convenient place, for example in the initialisation of some module so it is executed when you load it with modprobe (leds_gpio.c is very simple).

and get the result with dmesg:

dmesg | grep UMINDED_MSG


Tele

Quote from: ehj666 on March 03, 2013, 06:42:07 PM
Quote from: Tele on March 01, 2013, 08:03:41 AM

if your xenomai directory <xenomai_dir>  (for example /work/xenomai-2.6.2.1)
I am afraid I do not understand the appropriate substitutions. I am running in a cross compile environment from an Ubuntu 12.04 X86. I tried the following:


./configure CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld CFLAGS="-march=arm7-a" \
LDFLAGS="-march=arm7-a" --host=arm-linux-gnueabi- --prefix=<fully qualified path>/install


The error I get is:

configure: WARNING: if you wanted to set the --build type, don't use --host
    if a cross compiler is detected the cross compile mode will be used
Invalid configuration 'arm-linux-gnueabi-': machine 'arm-linux-gnueabi' not recognized.


if I remove --host then I get:
...
Thanks

Dont remove --host=... it is mandatory, but write  --host=armv7a-unknown-linux-gnueabi

This is not the same as <toolchain-prefix> just it looks similar. Sorry if I was ambiguous.

uMinded

Ok here is my conclusions of the weekend:

1 - So, I had to move all the kernels clocks around in order to get the two that have input from PLL6 to work. My kernel boots and runs normally and I have not seen any issues thus far.

2 - I got PLL6's control register set up so that it is either outputting 1800 MHz or 1200 MHz. How do I not know? Well if you check out the A10 Users Manual on page 43 you notice that PLL6_FACTOR_K and PLL6_FACTOR_M both say they add 1 to the register in hardware. Also see the snippit below:

Quote
Register Name: PLL6_CFG_REG
     For NC, the output =(24MHz*N*K)/M/6
     If the NC is on, the output should be equal to 100MHz
     For other module, the output = (24MHz*N*K)/2
     Note: the output 24MHz*N*K clock
     must be in the range of 240MHz~2GHz if the bypass is disabled.

<5>PLL6: 0xA1009922
N=25, K=2, M=2


So that means with my current setup with +1 added to K and M in hardware I have this range of speeds:
Quote
For NC, the output = (24MHz*25*3)/3/6 = 100 MHz
For other module, the output = (24MHz*25*3)/2 = 900 MHz
If the timers fed from "NC" that 100/6 = 16 MHz
If the timers fed from "other module" that 900/2/6 = 150 MHz
If the timers fed from "raw PLL6" that 1800/6 = 300 MHz

What if +1 is not added in hardware?
Quote
For NC, the output = (24MHz*25*2)/2/6 = 100 MHz
For other module, the output = (24MHz*25*3)/2 = 600 MHz
If the timers fed from "NC" that 100/6 = 16 MHz
If the timers fed from "other module" that 600/2/6 = 50 MHz
If the timers fed from "raw PLL6" that 1200/6 = 200 MHz

Now it is easy to modify the M, K & N values for PLL6 in code, you just need to get the balancing game right for whole numbers. The huge problem is WHAT ONE OF THOSE actually feeds the timer subsystem?!?! When I get Crubille's preempt program I can hopefully figure this out and then I can properly patch it together. Right now I have A LOT of file modifications as I have gone through some hundreds of interations...

Just some info:

<6>timer2: Periodic Mode
<6>I-pipe, 300.000 MHz clocksource
<6>sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
<6>Calibrating delay loop... <c>1001.88 BogoMIPS (lpj=5009408)


Proof of timer setup:

<5>Timer0: 0x00000089
ONE_SHOT, PLL6/6, sun5i_itimer

<5>Timer1: 0x00000009
CONTINUOUS, PLL6/6, tsc_info

<5>Timer2: 0x00000045
CONTINUOUS, HOSC(25Mhz), DIV/16, sched_clock


My Results:

stress -m 10 --vm-bytes 5000 -c 10

RTT|  00:01:04  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.999|      1.633|      6.986|       0|     0|      0.963|     13.556
RTD|      1.009|      1.649|     11.949|       0|     0|      0.963|     13.556
RTD|      0.986|      1.643|     11.903|       0|     0|      0.963|     13.556
RTD|      0.999|      1.643|      9.653|       0|     0|      0.963|     13.556
RTD|      1.023|      1.646|      8.616|       0|     0|      0.963|     13.556
RTD|      0.999|      1.639|      8.223|       0|     0|      0.963|     13.556
RTD|      1.033|      1.643|      7.949|       0|     0|      0.963|     13.556
RTD|      1.009|      1.643|      8.473|       0|     0|      0.963|     13.556
RTD|      0.999|      1.636|      9.806|       0|     0|      0.963|     13.556
RTD|      0.986|      1.639|      7.236|       0|     0|      0.963|     13.556
RTD|      1.023|      1.646|      9.093|       0|     0|      0.963|     13.556
RTD|      1.023|      1.639|     10.949|       0|     0|      0.963|     13.556
RTD|      1.023|      1.636|     10.333|       0|     0|      0.963|     13.556
RTD|      1.023|      1.643|      9.473|       0|     0|      0.963|     13.556
RTD|      0.973|      1.643|      9.569|       0|     0|      0.963|     13.556
RTD|      1.009|      1.636|      8.879|       0|     0|      0.963|     13.556
RTD|      1.009|      1.639|      7.523|       0|     0|      0.963|     13.556
RTD|      0.999|      1.653|     10.533|       0|     0|      0.963|     13.556
RTD|      1.009|      1.639|      7.926|       0|     0|      0.963|     13.556
RTD|      1.009|      1.649|      8.139|       0|     0|      0.963|     13.556
RTD|      1.009|      1.646|      8.699|       0|     0|      0.963|     13.556

== Tested clock: 0 (CLOCK_REALTIME)
CPU      ToD offset [us] ToD drift [us/s]      warps max delta [us]
--- -------------------- ---------------- ---------- --------------
  0                  2.3            0.021          0            0.0

ehj666

Quote from: Tele on March 04, 2013, 12:03:42 AM
Dont remove --host=... it is mandatory, but write  --host=armv7a-unknown-linux-gnueabi

This is not the same as <toolchain-prefix> just it looks similar. Sorry if I was ambiguous.

Ok, changed to


./configure CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld CFLAGS="-march=arm7-a" \
LDFLAGS="-march=arm7-a" --host=armv7a-unknown-linux-gnueabi --prefix=<fully qualified path>/install


Which seemed to be correct, excluding the initial warning, down to where it checks whether the compiler works.

configure: WARNING: if you wanted to set the --build type, don't use --host.
    if a cross compiler is detected the cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... armv7a-unknow-linux-gnueabi
checking for a BSD-compatible install... /usr/bin/install -c
checking for armv7a-unknown-linux-gnueabi-gcc... arm-linux-gnueabi-gcc
checking whether the C compiler works... no
configure: error: in... '<path>/xenomai-2.6.2.1':
configure: error: C compiler cannot create executables
See 'config.log' for more details


I did not see anything obvious in config.log as to why the compiler would not work.

ANy ideas?
Thanks

uMinded

#140
Quote from: ehj666 on March 04, 2013, 05:23:14 PM

checking for armv7a-unknown-linux-gnueabi-gcc... arm-linux-gnueabi-gcc
checking whether the C compiler works... no


Their is currently a bug in Autotools for cross compilers, I talked to a few maintainers about it on IRC yesterday. Their are two separate bugs:

1) Using the CC= macro with .config does not set the internal flag to tell the system its a cross compile so during the check it tries to run an a.out from armv7a-unknown-linux-gnueabi-gcc on your x86 system which obviously wont work. These bugs are known about but they are not high on anybodies priority list and we will run into issue #2 when building linuxcnc BTW.

2) Similarly their is a problem with --host= as it somehow breaks the AC_CHECK_HEADER macro into always returning a zero.

I was building stress yesterday and found the current version was able to build with the --host/--build features as well as the current xenomai-2.6.2.1 userspace programs.

From the xenomai-2.6.2.1 folder:

mkdir install
./configure --build=x86_64-linux-gnu --host=arm-linux-gnueabi CFLAGS=-march=armv7-a LDFLAGS=-march=armv7-a
--prefix=<FULL_PATH_TO_DIR>/install
make install


One thing to keep in mind if you build your own toolchain (such as arm-cortex_a8-linux-gnueabi) that different versions of the c libraries are not all equal. Xenomai requires a full version while the cortex_a8 chain above uses uClib so it will not work. If you use the command above it compiles (I verified it) alternatively download it from our wiki.

NOTE: The arm-linux-gnueabi toolchain is from http://www.linaro.org/downloads/ under BINARIES

Tele

Quote from: ehj666 on March 04, 2013, 05:23:14 PM
I did not see anything obvious in config.log as to why the compiler would not work.

ANy ideas?
Thanks
I would like to take a look on that config.log. Would you upload it onto pastebin, if you dont mind.
Is 'arm-linux-gnueabi-gcc' in the path? It tries to use that as compiler, but for some kind of reason it cant compile a testfile. The exact reason is in that config.log. You can see the exact commandline as it calls the compiler and it returns an error. What is that error ?

ehj666

Quote
I would like to take a look on that config.log. Would you upload it onto pastebin, if you dont mind.
Is 'arm-linux-gnueabi-gcc' in the path? It tries to use that as compiler, but for some kind of reason it cant compile a testfile. The exact reason is in that config.log. You can see the exact commandline as it calls the compiler and it returns an error. What is that error ?

Yes, arm-linux-gnueabi-gcc is in the path, it is what I used to compile the kernel and can be run manually from the local (Xenomai) folder. Config.log is not that big, so I have included it below:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Xenomai configure 2.6.2.1, which was
generated by GNU Autoconf 2.67.  Invocation command line was

  $ ./configure CC=arm-linux-gnueabi-gcc AR=arm-linux-gnueabi-ar LD=arm-linux-gnueabi-ld CFLAGS=-march=arm7-a LDFLAGS=-march=arm7-a --host=armv7a-unknown-linux-gnueabi --prefix=/home/eric/Projects/olinuxino/kernel/xenomai-2.6.2.1/install

## --------- ##
## Platform. ##
## --------- ##

hostname = eric-HP-Probook
uname -m = i686
uname -r = 3.2.0-38-generic-pae
uname -s = Linux
uname -v = #61-Ubuntu SMP Tue Feb 19 12:39:51 UTC 2013

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/lib/lightdm/lightdm
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2378: checking build system type
configure:2392: result: i686-pc-linux-gnu
configure:2412: checking host system type
configure:2425: result: armv7a-unknown-linux-gnueabi
configure:2459: checking for a BSD-compatible install
configure:2527: result: /usr/bin/install -c
configure:2560: checking for armv7a-unknown-linux-gnueabi-gcc
configure:2587: result: arm-linux-gnueabi-gcc
configure:2856: checking for C compiler version
configure:2865: arm-linux-gnueabi-gcc --version >&5
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2876: $? = 0
configure:2865: arm-linux-gnueabi-gcc -v >&5
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.3 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configure:2876: $? = 0
configure:2865: arm-linux-gnueabi-gcc -V >&5
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
configure:2876: $? = 4
configure:2865: arm-linux-gnueabi-gcc -qversion >&5
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
configure:2876: $? = 4
configure:2896: checking whether the C compiler works
configure:2918: arm-linux-gnueabi-gcc -march=arm7-a  -march=arm7-a conftest.c  >&5
cc1: error: bad value (arm7-a) for -march switch
cc1: error: bad value (arm7-a) for -march switch
configure:2922: $? = 1
configure:2960: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Xenomai"
| #define PACKAGE_TARNAME "xenomai"
| #define PACKAGE_VERSION "2.6.2.1"
| #define PACKAGE_STRING "Xenomai 2.6.2.1"
| #define PACKAGE_BUGREPORT "xenomai@xenomai.org"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2965: error: in `/home/eric/Projects/olinuxino/kernel/xenomai-2.6.2.1':
configure:2967: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=
ac_cv_env_CCAS_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=arm-linux-gnueabi-gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-march=arm7-a
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-march=arm7-a
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=armv7a-unknown-linux-gnueabi
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=armv7a-unknown-linux-gnueabi
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_CC=arm-linux-gnueabi-gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

A2X=''
ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AR='arm-linux-gnueabi-ar'
ASCIIDOC=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
BUILD_EXEEXT=''
BUILD_OBJEXT=''
CC='arm-linux-gnueabi-gcc'
CCAS=''
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CC_FOR_BUILD=''
CFLAGS='-march=arm7-a'
CFLAGS_FOR_BUILD=''
CONFIG_STATUS_DEPENDENCIES=''
CONFIG_XENO_ASCIIDOC_FALSE=''
CONFIG_XENO_ASCIIDOC_TRUE=''
CONFIG_XENO_DOC_DOX_FALSE=''
CONFIG_XENO_DOC_DOX_TRUE=''
CONFIG_XENO_FASTSYNCH_FALSE=''
CONFIG_XENO_FASTSYNCH_TRUE=''
CONFIG_XENO_FAST_WRAP_FALSE=''
CONFIG_XENO_FAST_WRAP_TRUE=''
CONFIG_XENO_SHARED_FALSE=''
CONFIG_XENO_SHARED_TRUE=''
CPP=''
CPPFLAGS=''
CPPFLAGS_FOR_BUILD=''
CPP_FOR_BUILD=''
CYGPATH_W=''
DBX_ABS_SRCDIR_FALSE=''
DBX_ABS_SRCDIR_TRUE=''
DBX_DOC_FALSE=''
DBX_DOC_ROOT=''
DBX_DOC_TRUE=''
DBX_FOP=''
DBX_GEN_DOC_ROOT=''
DBX_LINT=''
DBX_MAYBE_NONET=''
DBX_ROOT=''
DBX_XSLTPROC=''
DBX_XSL_ROOT=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DOXYGEN=''
DOXYGEN_HAVE_DOT=''
DOXYGEN_SHOW_INCLUDE_FILES=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM=''
LATEX_BATCHMODE=''
LATEX_MODE=''
LD='arm-linux-gnueabi-ld'
LDFLAGS='-march=arm7-a'
LD_FILE_OPTION=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO=''
MANIFEST_TOOL=''
MKDIR_P=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE=''
PACKAGE_BUGREPORT='xenomai@xenomai.org'
PACKAGE_NAME='Xenomai'
PACKAGE_STRING='Xenomai 2.6.2.1'
PACKAGE_TARNAME='xenomai'
PACKAGE_URL=''
PACKAGE_VERSION='2.6.2.1'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
VERSION=''
W3M=''
XENO_BUILD_STRING=''
XENO_DLOPEN_CONSTRAINT=''
XENO_HOST_STRING=''
XENO_LIB_CFLAGS=''
XENO_LIB_LDFLAGS=''
XENO_MAYBE_DOCDIR=''
XENO_POSIX_WRAPPERS=''
XENO_TARGET_ARCH=''
XENO_TARGET_ARCH_X86_FALSE=''
XENO_TARGET_ARCH_X86_TRUE=''
XENO_TEST_DIR=''
XENO_USER_APP_CFLAGS=''
XENO_USER_APP_LDFLAGS=''
XENO_USER_CFLAGS=''
XENO_USER_LDFLAGS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_CC_FOR_BUILD=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='armv7a-unknown-linux-gnueabi'
host_alias='armv7a-unknown-linux-gnueabi'
host_cpu='armv7a'
host_os='linux-gnueabi'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/eric/Projects/olinuxino/kernel/xenomai-2.6.2.1/install'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "Xenomai"
#define PACKAGE_TARNAME "xenomai"
#define PACKAGE_VERSION "2.6.2.1"
#define PACKAGE_STRING "Xenomai 2.6.2.1"
#define PACKAGE_BUGREPORT "xenomai@xenomai.org"
#define PACKAGE_URL ""

configure: exit 77

crubille

Here is my new version

http://www.crubille.lautre.net/xenomai_sun5i/ipipe-linuxsun5i-3.4.24.patch

it include priority based interrupt controller muting.

I adapt too the sun4i part, and it should work but i can't test it.

I have not tried to use the counters 0 and 1 because I fear it is more difficult to maintain the code.
Indeed, linuxsunxi3.4 version is not stable and we will port it to a future version integrated into the main branch of linux.

In fact, the use of PLL6 for the xenomai timer is of little interest, in contrast, PLL6 will be useful for the xenomai clock.

ehj666

Quote from: uMinded on March 04, 2013, 07:51:00 PM

From the xenomai-2.6.2.1 folder:

mkdir install
./configure --build=x86_64-linux-gnu --host=arm-linux-gnueabi CFLAGS=-march=armv7-a LDFLAGS=-march=armv7-a
--prefix=<FULL_PATH_TO_DIR>/install
make install



Cool, that's better. The configure and the make seem to have worked, I have not tested anything as yet.

Tele

Quote from: ehj666 on March 04, 2013, 10:38:59 PM
...
Config.log is not that big, so I have included it below:
...

That was the error:
...
cc1: error: bad value (arm7-a) for -march switch
...

Its 'armv7-a' , a tiny v was missing :)

ehj666

Quote from: Tele on March 01, 2013, 08:03:41 AM

on your rootfs SD make a dir:
/usr/xenomai

then copy <xenomai_dir>/install/bin and <xenomai_dir>/install/sbin into it
then copy <xenomai_dir>/install/lib  onto your rootfs SD /usr/lib

You are done.
After booting you can go there and run any xeno tests.

cd /usr/xenomai/bin
./latency -p 100


I must be missing something really simple. I copied everything as above and successfully boot the Olinuxino. If I try to run (from usr/xenomai/bin):
./latency -p 100

I get "no such file or directory".

The file attributes for "latency" are -rwxr-xr-x", the owner is root:root.
Running ./xeno latency gives "latency: not found/executable"

./xeno-config seems to run, but several others seem to have the path from the build computer.

Any ideas?

Thanks

Tele

Quote from: ehj666 on March 06, 2013, 05:26:49 PM
Any ideas?

Check if the xenomai libraries are in their place in <SD rootfs partition>:
cd /usr/lib
ls *.so


And you have to see these libs among many others:
libanalogy.so  libnative.so  libpsos.so  libpthread_rt.so  librtdm.so  libuitron.so  libvrtx.so  libvxworks.so  libxenomai.so


If you cant see them, you have to copy the lib files from
<xenomai_dir>/install/lib
directory to
<SD rootfs parttition>/usr/lib
directory

If they are in place, then maybe their attributes are wrong.(I donno, Im just guessing)
Try this on Olimex card:

cd /usr/lib
chmod 755 *.so


Tell me if still doesnt work, I have more ideas.

Tele

Quote from: uMinded on March 03, 2013, 11:17:41 PM
Quote from: crubille on March 03, 2013, 11:13:50 PM
the best way to be sure the timers use PLL/6 is to read their ctrl register!

I can dump a memory location but not a hardware register location. How do you go about dumping say 0x01C20000 to 0x01C20158(physical address range of the CCM reg)

It is possible to dump those registers from user space, with a regular user application, I have uploaded a little sample onto https://code.google.com/p/a13-olinuxino/ ,it can be handy if you wanna be sure what is their current contents.

ehj666

Quote from: Tele on March 06, 2013, 07:29:12 PM
And you have to see these libs among many others:
libanalogy.so  libnative.so  libpsos.so  libpthread_rt.so  librtdm.so  libuitron.so  libvrtx.so  libvxworks.so  libxenomai.so


They all exist as symlinks of the form
libanalogy.so -> libanalogy.so.1.0.0

The files to which the symlinks point all exist with file attributes -rwxr-xr-x, the symlinks have the file attributes lrwxrwxrwx.