This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem building ecos for arm with thumb instruction set


"Trenton D. Adams" wrote:
> 
> I believe you have to compile a thumb version of your tools.  eg.
> thumb-elf-gcc and not arm-elf-gcc.  Also, you have to be using GCC
> greater than 2.95.2.

That's not what he's doing - he's using arm-elf-gcc -mthumb which is
correct for a recent gcc.

The real answer is to use this patch for GCC, and rebuild.

Index: arm.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.98.4.2
diff -u -5 -p -r1.98.4.2 arm.h
--- arm.h	2001/05/24 21:03:58	1.98.4.2
+++ arm.h	2001/09/06 20:59:41
@@ -1077,11 +1077,11 @@ enum reg_class
    or could index an array.  */
 #define REGNO_REG_CLASS(REGNO)  arm_regno_class (REGNO)
 
 /* The class value for index registers, and the one for base regs.  */
 #define INDEX_REG_CLASS  (TARGET_THUMB ? LO_REGS : GENERAL_REGS)
-#define BASE_REG_CLASS   (TARGET_THUMB ? BASE_REGS : GENERAL_REGS)
+#define BASE_REG_CLASS   (TARGET_THUMB ? LO_REGS : GENERAL_REGS)
 
 /* When SMALL_REGISTER_CLASSES is nonzero, the compiler allows
    registers explicitly used in the rtl to be used as spill registers
    but prevents the compiler from extending the lifetime of these
    registers. */


Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]