source: rtems/make/custom/mrm332.cfg @ 41df507e

4.104.114.84.95
Last change on this file since 41df507e was 41df507e, checked in by Joel Sherrill <joel.sherrill@…>, on 01/20/04 at 15:27:56

2004-01-20 Joel Sherrill <joel@…>

PR 553/bsps

  • custom/mrm332.cfg: Use OBJDUMP variable and turn invocation into a comment.
  • Property mode set to 100644
File size: 2.4 KB
Line 
1#
2#  Config file for the mrm332 BSP
3#
4#  $Id$
5#
6
7include $(RTEMS_ROOT)/make/custom/default.cfg
8
9RTEMS_CPU=m68k
10RTEMS_CPU_MODEL=m68332
11
12# This is the actual bsp directory used during the build process.
13RTEMS_BSP_FAMILY=mrm332
14
15#  This contains the compiler options necessary to select the CPU model
16#  and (hopefully) optimize for it.
17CPU_CFLAGS = -mcpu32
18
19# optimize flag: typically -0, could use -O4 or -fast, -O4 is ok for RTEMS
20CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
21
22# The following are definitions of make-exe which will work using ld as
23# is currently required.  It is expected that as of gcc 2.8, the end user
24# will be able to override parts of the compilers specs and link using gcc.
25
26ifeq ($(MRM_IN_ROM),yes)
27# Build a rommable image - move the .data section after the .text section
28# in the image.
29CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mrm332/lib/linkcmds_ROM
30
31#  This is a good way to get debug information.  The output file is large
32#  though and greatly slows the build process so only do this if needed.
33#       $(OBJDUMP) -dxC $(basename $@).nxe > $(basename $@).dump
34
35define make-exe
36        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).pxe \
37            $(LINK_OBJS) $(LINK_LIBS)
38        $(OBJCOPY) --adjust-section-vma \
39          .data=`m68k-rtems-objdump --section-headers $(basename $@).pxe | \
40          awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
41               for (p=digits; p>0; p--) \
42               s += (16^(p-1)) * ( index("0123456789ABCDEF",\
43                substr(x,1+digits-p,1)) -1 );\
44                return s } ;\
45                /\.text/ { base = $$4 ; size = $$3 };\
46                END { printf("0x%x", h2d(base) + h2d(size)) }'\
47               ` $(basename $@).pxe $(basename $@).nxe
48        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
49        sed -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
50            $(PACKHEX) > $(basename $@).exe
51        $(NM) -g -n $(basename $@).pxe > $(basename $@).pnum
52        $(NM) -g -n $(basename $@).nxe > $(basename $@).num
53        $(SIZE) $(basename $@).nxe
54endef
55else
56define make-exe
57        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
58            $(LINK_OBJS) $(LINK_LIBS)
59        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
60        m68k-rtems-objdump -dxC $(basename $@).nxe > $(basename $@).dump
61        sed -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
62            $(PACKHEX) > $(basename $@).exe
63        $(NM) -g -n $(basename $@).nxe > $(basename $@).num
64        $(SIZE) $(basename $@).nxe
65endef
66endif
67
68# Miscellaneous additions go here
Note: See TracBrowser for help on using the repository browser.