summaryrefslogtreecommitdiffstats
path: root/make/custom/mrm332.cfg
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-06 21:51:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-06 21:51:01 +0000
commit6087a6925701db0d0da461fc38ec39bd73d02390 (patch)
tree8c6b313b671f943f5c661ea16c6b0c645c0c6473 /make/custom/mrm332.cfg
parentSwitch back to old GCC_RPMREL versioning scheme. (diff)
downloadrtems-6087a6925701db0d0da461fc38ec39bd73d02390.tar.bz2
Make all BSPs use the same rules for invoking gcc and g++ to link an application. Share as much logic as possible for .num file and size information. Let BSPs provide custom rules to tranform executable from linked .exe to downloadable RTEMS Application Loadable File (RALF) .ralf file.
Diffstat (limited to 'make/custom/mrm332.cfg')
-rw-r--r--make/custom/mrm332.cfg46
1 files changed, 6 insertions, 40 deletions
diff --git a/make/custom/mrm332.cfg b/make/custom/mrm332.cfg
index cddf6aea5c..ef880bd4a4 100644
--- a/make/custom/mrm332.cfg
+++ b/make/custom/mrm332.cfg
@@ -19,33 +19,12 @@ CPU_CFLAGS = -mcpu32
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
-# The following are definitions of make-exe which will work using ld as
-# is currently required.
-
ifeq ($(MRM_IN_ROM),yes)
# Build a rommable image - move the .data section after the .text section
# in the image.
CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mrm332/lib/linkcmds_ROM
endif
-# This is a good way to get debug information. The output file is large
-# though and greatly slows the build process so only do this if needed.
-# $(OBJDUMP) -dxC $(basename $@).nxe > $(basename $@).dump
-#
-# chrisj: This is questionable. Why not keep unstipped ELF files
-# about the use objdump and nm to get at the debug
-# information rather than subject everyone to this.
-#
-
-define bsp-link-c
- $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@)$(EXEEXT) \
- $(LINK_OBJS) $(LINK_LIBS)
-endef
-define bsp-link-cxx
- $(LINK.cc) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@)$(EXEEXT) \
- $(LINK_OBJS) $(LINK_LIBS)
-endef
-
ifeq ($(MRM_IN_ROM),yes)
define bsp-post-link
$(OBJCOPY) --adjust-section-vma \
@@ -60,30 +39,17 @@ define bsp-post-link
` $(basename $@).pxe $(basename $@)$(EXEEXT)
$(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
- $(PACKHEX) > $(basename $@).nxe
+ $(PACKHEX) > $(basename $@)$(DOWNEXT)
$(NM) -g -n $(basename $@).pxe > $(basename $@).pnum
- $(NM) -g -n $(basename $@).nxe > $(basename $@).num
- $(SIZE) $(basename $@)$(EXEEXT)
+ rm -f $(basename $@).srec $(basename $@).srec
+ $(default-bsp-post-link)
endef
else
define bsp-post-link
$(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
-# m68k-rtems-objdump -dxC $(basename $@).nxe > $(basename $@).dump
sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
- $(PACKHEX) > $(basename $@).nxe
- $(NM) -g -n $(basename $@)$(EXEEXT) > $(basename $@).num
- $(SIZE) $(basename $@)$(EXEEXT)
+ $(PACKHEX) > $(basename $@)$(DOWNEXT)
+ rm -f $(basename $@).srec
+ $(default-bsp-post-link)
endef
endif
-
-define make-exe
- $(bsp-link-c)
- $(bsp-post-link)
-endef
-
-define make-cxx-exe
- $(bsp-link-cxx)
- $(bsp-post-link)
-endef
-
-# Miscellaneous additions go here