This is the mail archive of the ecos-patches@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]
Other format: [Raw text]

thumb support


As part of the 2.0 release process I have been looking at the current
state of thumb support. It seems that the architectural vectors.S
cannot have built for thumb in over a year, suggesting that there are
not actually many thumb users. Also various CDL scripts were still
referencing thumb-elf tools rather than arm-elf-gcc -mthumb.

I have not been able to test these on thumb-capable hardware yet, so
I would be grateful if Gary and/or Mark could take a good look at the
patches. If I don't hear anything I'll commit the changes to the trunk
in a couple of days.

Note that these changes are not sufficient to get thumb support
working in the 2.0 release. "make tests" for a thumb target fails with
an ICE compiling dhrystone, using gcc 3.2.1.

Bart

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/arch/current/ChangeLog,v
retrieving revision 1.86
diff -u -u -r1.86 ChangeLog
--- ChangeLog	11 Mar 2003 15:41:11 -0000	1.86
+++ ChangeLog	13 Apr 2003 12:56:05 -0000
@@ -1,3 +1,7 @@
+2003-04-13  Bart Veer  <bartv at ecoscentric dot com>
+
+	* src/vectors.S (start): fix build problem with -mthumb
+
 2003-03-11  Mark Salter  <msalter at redhat dot com>
 
 	* src/redboot_linux_exec.c (do_exec): Call eth_drv_stop as necessary.
Index: vectors.S
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/arch/current/src/vectors.S,v
retrieving revision 1.47
diff -u -u -r1.47 vectors.S
--- vectors.S	29 Aug 2002 11:49:49 -0000	1.47
+++ vectors.S	13 Apr 2003 12:56:23 -0000
@@ -463,7 +463,8 @@
         
         // This starts up the eCos kernel
 #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
-        ldr     sp,.__startup_stack
+        ldr     r1,=__startup_stack
+        mov     sp,r1
 #endif        
         bl      cyg_start
 _start_hang:
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/cma230/current/ChangeLog,v
retrieving revision 1.23
diff -u -u -r1.23 ChangeLog
--- ChangeLog	6 Aug 2002 16:00:08 -0000	1.23
+++ ChangeLog	13 Apr 2003 12:56:50 -0000
@@ -1,3 +1,8 @@
+2003-04-11  Bart Veer  <bartv at ecoscentric dot com>
+
+	* cdl/hal_arm_cma230.cdl: building for thumb now involves
+	arm-elf-gcc -mthumb, not thumb-elf-gcc
+
 2002-08-06  Gary Thomas  <gary at chez-thomas dot org>
 2002-08-06  Motoya Kurotsu <kurotsu at allied-telesis dot co dot jp>	
 
Index: hal_arm_cma230.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/cma230/current/cdl/hal_arm_cma230.cdl,v
retrieving revision 1.10
diff -u -u -r1.10 hal_arm_cma230.cdl
--- hal_arm_cma230.cdl	23 May 2002 23:01:48 -0000	1.10
+++ hal_arm_cma230.cdl	13 Apr 2003 12:57:05 -0000
@@ -184,7 +184,7 @@
             display "Global command prefix"
             flavor  data
             no_define
-            default_value { CYGHWR_THUMB ? "thumb-elf" : "arm-elf" }
+            default_value { "arm-elf" }
             description "
                 This option specifies the command prefix used when
                 invoking the build tools."
@@ -194,8 +194,9 @@
             display "Global compiler flags"
             flavor  data
             no_define
-            default_value { CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" :
-            "-mcpu=arm7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
+            default_value { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
+		            (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
+		            "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
             description   "
                 This option controls the global compiler flags which are used to
                 compile all packages by default. Individual packages may define
@@ -228,8 +229,9 @@
             display "Global linker flags"
             flavor  data
             no_define
-            default_value { CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-g -nostdlib -Wl,--gc-sections -Wl,-static -mthumb-interwork" :
-            "-mcpu=arm7tdmi -g -nostdlib -Wl,--gc-sections -Wl,-static" }
+            default_value { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
+		            (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
+                            "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
             description   "
                 This option controls the global linker flags. Individual
                 packages may define options which override these global flags."
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/integrator/current/ChangeLog,v
retrieving revision 1.4
diff -u -u -r1.4 ChangeLog
--- ChangeLog	29 May 2002 18:28:08 -0000	1.4
+++ ChangeLog	13 Apr 2003 12:57:21 -0000
@@ -1,3 +1,8 @@
+2003-04-11  Bart Veer  <bartv at ecoscentric dot com>
+
+	* cdl/hal_arm_integrator.cdl: thumb is not supported so the
+	reference to thumb-elf was spurious.
+
 2002-05-27  Jesper Skov  <jskov at redhat dot com>
 
 	* cdl/hal_arm_integrator.cdl: Don't run cache tests.
Index: hal_arm_integrator.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/integrator/current/cdl/hal_arm_integrator.cdl,v
retrieving revision 1.4
diff -u -u -r1.4 hal_arm_integrator.cdl
--- hal_arm_integrator.cdl	29 May 2002 18:28:09 -0000	1.4
+++ hal_arm_integrator.cdl	13 Apr 2003 12:57:33 -0000
@@ -219,7 +219,7 @@
             display "Global command prefix"
             flavor  data
             no_define
-            default_value { CYGHWR_THUMB ? "thumb-elf" : "arm-elf" }
+            default_value { "arm-elf" }
             description "
                 This option specifies the command prefix used when
                 invoking the build tools."
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/pid/current/ChangeLog,v
retrieving revision 1.32
diff -u -u -r1.32 ChangeLog
--- ChangeLog	5 Feb 2003 18:26:41 -0000	1.32
+++ ChangeLog	13 Apr 2003 12:57:51 -0000
@@ -1,3 +1,8 @@
+2003-04-11  Bart Veer  <bartv at ecoscentric dot com>
+
+	* cdl/hal_arm_pid.cdl: building for thumb now involves arm-elf-gcc
+	-mthumb, not thumb-elf-gcc
+
 2003-02-05  Nick Garnett  <nickg at calivar dot com>
 
 	* include/plf_io.h (CYGARC_PHYSICAL_ADDRESS): Added this
Index: hal_arm_pid.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/pid/current/cdl/hal_arm_pid.cdl,v
retrieving revision 1.12
diff -u -u -r1.12 hal_arm_pid.cdl
--- hal_arm_pid.cdl	23 May 2002 23:02:10 -0000	1.12
+++ hal_arm_pid.cdl	13 Apr 2003 12:58:09 -0000
@@ -218,7 +218,7 @@
             display "Global command prefix"
             flavor  data
             no_define
-            default_value { CYGHWR_THUMB ? "thumb-elf" : "arm-elf" }
+            default_value { "arm-elf" }
             description "
                 This option specifies the command prefix used when
                 invoking the build tools."
@@ -228,12 +228,10 @@
             display "Global compiler flags"
             flavor  data
             no_define
-            default_value { (CYGBLD_ARM_ENABLE_THUMB_INTERWORK && CYGHWR_HAL_ARM_BIGENDIAN) ? "-mthumb-interwork -mbig-endian -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" :
-            CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" :
-            (CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9") && CYGHWR_HAL_ARM_BIGENDIAN ? "-mcpu=arm9 -mbig-endian -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" :
-            (CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9") && ! CYGHWR_HAL_ARM_BIGENDIAN ? "-mcpu=arm9 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" :
-            (CYGHWR_HAL_ARM_CPU_FAMILY != "ARM9") && CYGHWR_HAL_ARM_BIGENDIAN ? "-mcpu=arm7tdmi -mbig-endian -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" :
-            "-mcpu=arm7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
+	    default_value { (CYGHWR_THUMB ? "-mthumb " : ((CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9") ? "-mcpu=arm9 " : "-mcpu=arm7tdmi ")) .
+		            (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
+		            (CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian " : "") .
+		            "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
             description   "
                 This option controls the global compiler flags which
                 are used to compile all packages by default.
@@ -245,12 +243,10 @@
             display "Global linker flags"
             flavor  data
             no_define
-            default_value { ((CYGHWR_THUMB || CYGSEM_HAL_ROM_MONITOR) && CYGHWR_HAL_ARM_BIGENDIAN) ? "-mthumb-interwork -mbig-endian -g -nostdlib -Wl,--gc-sections -Wl,-static" :
-            (CYGHWR_THUMB || CYGSEM_HAL_ROM_MONITOR) ? "-mthumb-interwork -g -nostdlib -Wl,--gc-sections -Wl,-static" :
-            (CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9") && CYGHWR_HAL_ARM_BIGENDIAN ? "-mcpu=arm9 -mbig-endian -g -nostdlib -Wl,--gc-sections -Wl,-static" :
-            (CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9") && ! CYGHWR_HAL_ARM_BIGENDIAN ? "-mcpu=arm9 -g -nostdlib -Wl,--gc-sections -Wl,-static" :
-            (CYGHWR_HAL_ARM_CPU_FAMILY != "ARM9") && CYGHWR_HAL_ARM_BIGENDIAN ? "-mcpu=arm7tdmi -mbig-endian -g -nostdlib -Wl,--gc-sections -Wl,-static" :
-            "-mcpu=arm7tdmi -g -nostdlib -Wl,--gc-sections -Wl,-static" }
+	    default_value { (CYGHWR_THUMB ? "-mthumb " : ((CYGHWR_HAL_ARM_CPU_FAMILY == "ARM9") ? "-mcpu=arm9 " : "-mcpu=arm7tdmi ")) .
+		            ((CYGBLD_ARM_ENABLE_THUMB_INTERWORK || CYGSEM_HAL_ROM_MONITOR) ? "-mthumb-interwork " : "") .
+		            (CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian " : "") .
+		            "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
             description   "
                 This option controls the global linker flags. Individual
                 packages may define options which override these global flags."


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