public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Aneesh V <aneesh@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 1/2] armv7: enable Thumb build for armv7
Date: Mon, 14 Mar 2011 18:57:37 +0530	[thread overview]
Message-ID: <1300109258-12496-1-git-send-email-aneesh@ti.com> (raw)

Signed-off-by: Aneesh V <aneesh@ti.com>
---
 README                       |    9 +++++++++
 arch/arm/cpu/armv7/config.mk |    5 +++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/README b/README
index f1547a4..ff3a345 100644
--- a/README
+++ b/README
@@ -370,6 +370,15 @@ The following options need to be configured:
 		2. The core frequency as calculated above is multiplied
 		by this value.
 
+- ARM Options:
+		CONFIG_SYS_THUMB_BUILD
+
+		Use this flag to build U-Boot using the Thumb instruction
+		set for ARM architectures. Thumb instruction set provides
+		better code density. For ARM architectures that support
+		Thumb2 this flag will result in Thumb2 code generated by
+		GCC.
+
 - Linux Kernel Interface:
 		CONFIG_CLOCKS_IN_MHZ
 
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index 49ac9c7..b7bebad 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -31,3 +31,8 @@ PLATFORM_CPPFLAGS += -march=armv5
 # =========================================================================
 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\
 		    $(call cc-option,-malignment-traps,))
+
+ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+# Enable Thumb mode build if compiler supports it
+PLATFORM_CPPFLAGS += $(call cc-option,-mthumb -mthumb-interwork)
+endif
-- 
1.7.0.4

             reply	other threads:[~2011-03-14 13:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 13:27 Aneesh V [this message]
2011-03-14 13:27 ` [U-Boot] [RFC PATCH 2/2] OMAP4: enable Thumb2 support for OMAP4 Aneesh V
2011-03-14 16:11 ` [U-Boot] [RFC PATCH 1/2] armv7: enable Thumb build for armv7 Loïc Minier
2011-03-15  4:01   ` Aneesh V
2011-03-15 11:54     ` Loïc Minier
2011-03-16  8:39       ` Aneesh V
2011-03-16 17:25         ` Albert ARIBAUD
2011-03-17  7:30           ` Aneesh V
2011-03-24 14:45             ` Albert ARIBAUD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300109258-12496-1-git-send-email-aneesh@ti.com \
    --to=aneesh@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox