Adds general Freescale CodeWarrior debug support
PATCH 1/1 Adds general Freescale CodeWarrior debug support
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
--- config.mk | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
config.mk +8 -0
@@ -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)
Signature · 1 line
1.5.6.5
PATCH 1/1 Adds general Freescale CodeWarrior debug support
Dear Roy Zang,
Quoted 6 lines · In message <[email protected]> you…
This patch adds general CodeWarrior debug support.
Patch is tested on 85xx/QorIQ platforms in u-boot.CONFIG_DEBUG_CODEWARRIORshould 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 makeCONFIG_DEBUG_CODEWARRIOR=1
I don't like that approach, for a number of reasons.
First, I don't want to see the code sprinkled with a growing list of CONFIG_DEBUG_CODEWARRIOR, CONFIG_DEBUG_BDI, CONFIG_DEBUG_PEEDIE, CONFIG_DEBUG_TRACE32, CONFIG_DEBUG_OCD, CONFIG_DEBUG_CORELIS, ... defines.
What in your additions is actually specific to the CW debugger?
Quoted 1 line
config.mk | 8 ++++++++
Second, I understand that this has been tested with and is intended for (a certain class of) Power Architecture systems only. Then why do you add it to the top level Makefile?
config.mk else · line 194
Quoted 3 lines
config.mk +3
-0+ifdef CONFIG_DEBUG_CODEWARRIOR +CFLAGS += -ggdb +endif
Are you sure that CFLAGS is OK here? I would expect to see this with PLATFORM_CPPFLAGS instead.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Minds are like parachutes - they only function when open.