Disabling dosfs for coldfire build

Joel Sherrill joel.sherrill at OARcorp.com
Fri Apr 26 17:45:34 UTC 2002


"Rude, Randy [Cont]" wrote:
> 
> This message mentions a problem encountered while building the coldfire bsp:
> 
> http://www.oarcorp.com/rtems/maillistArchives/rtems-users/2002/march/msg0020
> 9.html
> 
> I have run into the same problem but I can't see how to disable the libfs
> stuff.  Is there a document somewhere that I missed?

The attached patch to c/src/exec/score/cpu/m68k.h should fix this.
The swap u32 and u16 routines were invalid for the Coldfire.


>         Randy

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985
-------------- next part --------------
Index: m68k.h
===================================================================
RCS file: /usr1/CVS/rtems/c/src/exec/score/cpu/m68k/rtems/score/m68k.h,v
retrieving revision 1.5
retrieving revision 1.7
diff -u -r1.5 -r1.7
--- m68k.h	13 Jun 2000 21:53:38 -0000	1.5
+++ m68k.h	15 Mar 2002 13:56:21 -0000	1.7
@@ -10,7 +10,7 @@
  *  found in the file LICENSE in this distribution or at
  *  http://www.OARcorp.com/rtems/license.html.
  *
- *  $Id: m68k.h,v 1.5 2000/06/13 21:53:38 joel Exp $
+ *  $Id: m68k.h,v 1.7 2002/03/15 13:56:21 joel Exp $
  */
 
 #ifndef __M68k_h
@@ -229,6 +229,10 @@
 
 #endif
 
+#ifndef ASM
+#include <rtems/score/m68ktypes.h>
+#endif
+
 /*
  *  If the above did not specify a ColdFire architecture, then set
  *  this flag to indicate that it is not a ColdFire CPU.
@@ -326,6 +330,34 @@
  *  The following routine swaps the endian format of an unsigned int.
  *  It must be static because it is referenced indirectly.
  */
+#if ( M68K_COLDFIRE_ARCH == 1 )
+
+/* There are no rotate commands in Coldfire architecture. We will use
+ * generic implementation of endian swapping for Coldfire.
+ */
+static inline unsigned int m68k_swap_u32(
+  unsigned int value
+  )
+{
+  unsigned32 byte1, byte2, byte3, byte4, swapped;
+    
+  byte4 = (value >> 24) & 0xff;
+  byte3 = (value >> 16) & 0xff;
+  byte2 = (value >> 8)  & 0xff;
+  byte1 =  value        & 0xff;
+           
+  swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
+  return( swapped );
+}
+ 
+static inline unsigned int m68k_swap_u16(
+  unsigned int value
+)
+{
+  return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
+}
+                  
+#else
 
 static inline unsigned int m68k_swap_u32(
   unsigned int value
@@ -350,6 +382,7 @@
 
   return( swapped );
 }
+#endif
 
 #define CPU_swap_u32( value )  m68k_swap_u32( value )
 #define CPU_swap_u16( value )  m68k_swap_u16( value )


More information about the users mailing list