[U-Boot] [PATCH] Adds general Freescale CodeWarrior debug support

Roy Zang tie-fei.zang at freescale.com
Fri Oct 29 05:27:17 CEST 2010


This patch adds general CodeWarrior debug support.
Patch is tested on 85xx/QorIQ platforms in u-boot.
CONFIG_DEBUG_CODEWARRIOR should be defined if the u-boot needs to be
debugged by CodeWarrior.
To use the CodeWarrior debug funciton, the make command can be just as
make CONFIG_DEBUG_CODEWARRIOR=1

Signed-off-by: Roy Zang <tie-fei.zang at freescale.com>
Signed-off-by: adrian bogdan <adrian.bogdan at freescale.com>
Cc: Wood Scott-B07421 <B07421 at freescale.com>
Cc: Kumar Gala <galak at kernel.crashing.org>
---
 config.mk |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index ce8e5f2..4d4bb59 100644
--- a/config.mk
+++ b/config.mk
@@ -189,6 +189,10 @@ else
 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes
 endif
 
+ifdef CONFIG_DEBUG_CODEWARRIOR
+CFLAGS += -ggdb
+endif
+
 CFLAGS += $(call cc-option,-fno-stack-protector)
 
 # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
@@ -202,6 +206,10 @@ AFLAGS_DEBUG := -Wa,-gstabs,-S
 endif
 endif
 
+ifdef CONFIG_DEBUG_CODEWARRIOR
+AFLAGS_DEBUG := -Wa,-gdwarf2
+endif
+
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
 LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
-- 
1.5.6.5




More information about the U-Boot mailing list