Module: xenomai-head
Branch: master
Commit: d99ec36af751b8e8933ad49d9bffd379691c80a7
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=d99ec36af751b8e8933ad49d9bffd379691c80a7

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Thu Jun 11 00:12:52 2009 +0200

Add omap3 support.

Add support for omap3 in include/asm-arm/hal.h
Add support for the armv7 architecture
Rework the ARM compilation flags to handle the FPU flags if possible

---

 aclocal.m4            |   98 ++++++++++++++++++-------------------
 configure             |  130 +++++++++++++++++++++++++++++-------------------
 configure.in          |   30 +++++++++++-
 include/asm-arm/hal.h |    3 +
 4 files changed, 157 insertions(+), 104 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 5392276..9799b3a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -332,61 +332,59 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 5
+#serial 4
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 
2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+[# Autoconf 2.62 quotes --file arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 
2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
   done
-}
+done
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
diff --git a/configure b/configure
index a2220d2..66b12a9 100755
--- a/configure
+++ b/configure
@@ -12578,6 +12578,7 @@ if test $XENO_TARGET_ARCH = arm ; then
   unset CONFIG_XENO_ARM_SA1100
   unset CONFIG_XENO_CPU_XSC3
   unset tsc_type
+  unset vfp
   unset XNARCH_ARM_TSC_TYPE
 
   { $as_echo "$as_me:$LINENO: checking for ARM machine" >&5
@@ -12589,6 +12590,7 @@ if test "${enable_arm_mach+set}" = set; then
                        tsc_type=__XN_TSC_TYPE_FREERUNNING_FAST_WRAP;;
 
        at91sam926x)    arch=5
+                       vfp=vfp
                        tsc_type=__XN_TSC_TYPE_FREERUNNING_FAST_WRAP;;
 
        generic)        arch=4
@@ -12611,6 +12613,11 @@ if test "${enable_arm_mach+set}" = set; then
                        tsc_type=__XN_TSC_TYPE_FREERUNNING;;
 
        mx3)            arch=6
+                       vfp=vfp
+                       tsc_type=__XN_TSC_TYPE_FREERUNNING;;
+
+       omap3)          arch=7
+                       vfp=vfp3
                        tsc_type=__XN_TSC_TYPE_FREERUNNING;;
 
        pxa)            arch=5
@@ -12661,8 +12668,18 @@ fi
        CONFIG_XENO_ARM_ARCH=5
        CONFIG_XENO_CPU_XSC3=y
   else
-       CONFIG_XENO_ARM_ARCH=$arch
+       CONFIG_XENO_ARM_ARCH="$arch"
   fi
+# Set the -march flag, FPU flags are set later.
+  case "$arch" in
+  4)   XENO_ARM_ARCH_FLAGS="-march=armv4t";;
+  5)   XENO_ARM_ARCH_FLAGS="-march=armv5";;
+  6)   XENO_ARM_ARCH_FLAGS="-march=armv6";;
+  7)   XENO_ARM_ARCH_FLAGS="-march=armv7-a";;
+  *)   { { $as_echo "$as_me:$LINENO: error: Invalid architecture $arch, only 
4, 5, xscale3, 6 and 7 are supported" >&5
+$as_echo "$as_me: error: Invalid architecture $arch, only 4, 5, xscale3, 6 and 
7 are supported" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
   { $as_echo "$as_me:$LINENO: result: $CONFIG_XENO_ARM_ARCH" >&5
 $as_echo "$CONFIG_XENO_ARM_ARCH" >&6; }
 
@@ -12714,6 +12731,17 @@ fi
   { $as_echo "$as_me:$LINENO: result: ${CONFIG_XENO_ARM_EABI:-no}" >&5
 $as_echo "${CONFIG_XENO_ARM_EABI:-no}" >&6; }
 
+  # Set FPU flags, if EABI is not enabled, all libraries in the system
+  # must be compiled with the same FPU flags, as we do not know how
+  # other components are compiled, we can not set the flags.
+  if test x$CONFIG_XENO_ARM_EABI = xy; then
+     if test x"$vfp" != x; then
+       XENO_ARM_ARCH_FLAGS="$XENO_ARM_ARCH_FLAGS -mfpu=$vfp -mfloat-abi=softfp"
+     else
+       XENO_ARM_ARCH_FLAGS="$XENO_ARM_ARCH_FLAGS -msoft-float"
+     fi
+  fi
+
   if test $CONFIG_XENO_ARM_ARCH -ge 6 || test x$CONFIG_SMP != xy; then
        CONFIG_XENO_FASTSYNCH=y
   fi
@@ -13798,7 +13826,7 @@ case $XENO_TARGET_ARCH in
        XENO_USER_APP_LDFLAGS="$XENO_USER_APP_LDFLAGS"
         ;;
  arm)
-       XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe 
-march=armv$CONFIG_XENO_ARM_ARCH"
+       XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe $XENO_ARM_ARCH_FLAGS"
         ;;
 esac
 
@@ -15938,28 +15966,27 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
 
   case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 
2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file 
arguments for eval, but not when files
+# are listed without --file.  Let's play safe and only enable the eval
+# if we detect the quoting.
+case $CONFIG_FILES in
+*\'*) eval set x "$CONFIG_FILES" ;;
+*)   set x $CONFIG_FILES ;;
+esac
+shift
+for mf
+do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 
2>&1; then
+    dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
@@ -15982,28 +16009,28 @@ $as_echo X"$mf" |
            q
          }
          s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
@@ -16026,7 +16053,7 @@ $as_echo X"$file" |
            q
          }
          s/.*/./; q'`
-      { as_dir=$dirpart/$fdir
+    { as_dir=$dirpart/$fdir
   case $as_dir in #(
   -*) as_dir=./$as_dir;;
   esac
@@ -16067,11 +16094,10 @@ $as_echo X"$as_dir" |
   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create 
directory $as_dir" >&5
 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
    { (exit 1); exit 1; }; }; }
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
   done
-}
+done
  ;;
     "libtool":C)
 
diff --git a/configure.in b/configure.in
index 25cd307..fe85e4e 100644
--- a/configure.in
+++ b/configure.in
@@ -182,6 +182,7 @@ if test $XENO_TARGET_ARCH = arm ; then
   unset CONFIG_XENO_ARM_SA1100
   unset CONFIG_XENO_CPU_XSC3
   unset tsc_type
+  unset vfp
   unset XNARCH_ARM_TSC_TYPE
 
   AC_MSG_CHECKING(for ARM machine)
@@ -194,6 +195,7 @@ integrator, ixp4xx, mx2, mx3, pxa, pxa3xx, s3c2410, 
sa1100.]),
                        tsc_type=__XN_TSC_TYPE_FREERUNNING_FAST_WRAP;;
 
        at91sam926x)    arch=5
+                       vfp=vfp
                        tsc_type=__XN_TSC_TYPE_FREERUNNING_FAST_WRAP;;
 
        generic)        arch=4
@@ -216,6 +218,11 @@ integrator, ixp4xx, mx2, mx3, pxa, pxa3xx, s3c2410, 
sa1100.]),
                        tsc_type=__XN_TSC_TYPE_FREERUNNING;;
 
        mx3)            arch=6
+                       vfp=vfp
+                       tsc_type=__XN_TSC_TYPE_FREERUNNING;;
+
+       omap3)          arch=7
+                       vfp=vfp3
                        tsc_type=__XN_TSC_TYPE_FREERUNNING;;
 
        pxa)            arch=5
@@ -253,8 +260,16 @@ integrator, ixp4xx, mx2, mx3, pxa, pxa3xx, s3c2410, 
sa1100.]),
        CONFIG_XENO_ARM_ARCH=5
        CONFIG_XENO_CPU_XSC3=y
   else
-       CONFIG_XENO_ARM_ARCH=$arch
+       CONFIG_XENO_ARM_ARCH="$arch"
   fi
+# Set the -march flag, FPU flags are set later.
+  case "$arch" in
+  4)   XENO_ARM_ARCH_FLAGS="-march=armv4t";;
+  5)   XENO_ARM_ARCH_FLAGS="-march=armv5";;
+  6)   XENO_ARM_ARCH_FLAGS="-march=armv6";;
+  7)   XENO_ARM_ARCH_FLAGS="-march=armv7-a";;
+  *)   AC_MSG_ERROR([Invalid architecture $arch, only 4, 5, xscale3, 6 and 7 
are supported]);;
+  esac
   AC_MSG_RESULT($CONFIG_XENO_ARM_ARCH)
 
   AC_MSG_CHECKING(for ARM SA1100 architecture)
@@ -290,6 +305,17 @@ user-space]),
        esac])
   AC_MSG_RESULT(${CONFIG_XENO_ARM_EABI:-no})
 
+  # Set FPU flags, if EABI is not enabled, all libraries in the system
+  # must be compiled with the same FPU flags, as we do not know how
+  # other components are compiled, we can not set the flags.
+  if test x$CONFIG_XENO_ARM_EABI = xy; then
+     if test x"$vfp" != x; then
+       XENO_ARM_ARCH_FLAGS="$XENO_ARM_ARCH_FLAGS -mfpu=$vfp -mfloat-abi=softfp"
+     else
+       XENO_ARM_ARCH_FLAGS="$XENO_ARM_ARCH_FLAGS -msoft-float"
+     fi
+  fi
+
   if test $CONFIG_XENO_ARM_ARCH -ge 6 || test x$CONFIG_SMP != xy; then
        CONFIG_XENO_FASTSYNCH=y
   fi
@@ -676,7 +702,7 @@ case $XENO_TARGET_ARCH in
        XENO_USER_APP_LDFLAGS="$XENO_USER_APP_LDFLAGS"
         ;;
  arm)
-       XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe 
-march=armv$CONFIG_XENO_ARM_ARCH"
+       XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe $XENO_ARM_ARCH_FLAGS"
         ;;
 esac
 
diff --git a/include/asm-arm/hal.h b/include/asm-arm/hal.h
index 59e1834..ad56a96 100644
--- a/include/asm-arm/hal.h
+++ b/include/asm-arm/hal.h
@@ -58,6 +58,9 @@
 #elif defined(CONFIG_ARCH_MXC)
 #define RTHAL_TIMER_DEVICE     "mxc_timer1"
 #define RTHAL_CLOCK_DEVICE     "mxc_timer1"
+#elif defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
+#define RTHAL_TIMER_DEVICE     "gp timer"
+#define RTHAL_CLOCK_DEVICE     "gp timer"
 #elif defined(CONFIG_ARCH_PXA)
 #define RTHAL_TIMER_DEVICE     "osmr0"
 #define RTHAL_CLOCK_DEVICE     "oscr0"


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to