source: rtems/c/src/lib/libbsp/i386/pc386/make/custom/pc386.cfg @ a99d541

4.104.115
Last change on this file since a99d541 was c01dba12, checked in by Joel Sherrill <joel.sherrill@…>, on 04/10/10 at 17:50:44

2010-04-10 Joel Sherrill <joel.sherrilL@…>

  • make/custom/pc386.cfg: EXEEXT is not defined in application Makefile support. All other BSPs just use .exe directly on objcopy commands. This makes it consistent and allows external examples (network demos, examples-v2, etc to link.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1#
2#  Config file for the PC 386 BSP
3#
4#  $Id$
5#
6
7include $(RTEMS_ROOT)/make/custom/default.cfg
8
9RTEMS_CPU=i386
10ifeq ($(RTEMS_CPU_MODEL),)
11RTEMS_CPU_MODEL=i386_fp
12endif
13
14#  This contains the compiler options necessary to select the CPU model
15#  and (hopefully) optimize for it.
16#
17# NOTE: CPU_CFLAGS is set by pc386 variants.
18ifeq ($(CPU_CFLAGS),)
19  CPU_CFLAGS = -mtune=i386
20endif
21
22# optimize flag: typically -O2
23CFLAGS_OPTIMIZE_V = -O2 -g
24
25# Here is the rule to actually build a $(ARCH)/foo$(EXEEXT)
26# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
27# Usage ref: src/tests/sptest/sp1/Makefile
28
29#+--------------------------------------------------------------------------+
30#| Set the value of RELOCADDR to the address where you want your image to
31#| load. If you'll be using GRUB to load the images it will have to be >=
32#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
33#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
34#| top is of course another limit. Make sure there is enough space before the
35#| upper memory limits for the image and the memory allocated by it to fit.
36#| Make sure the value you choose is aligned to 4 bytes.
37#+--------------------------------------------------------------------------+
38  RELOCADDR=0x00100000
39
40START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin
41START16ADDR=0x00097C00
42HEADERADDR=0x00097E00
43
44LDFLAGS += -Wl,-Ttext,$(RELOCADDR)
45
46define bsp-post-link
47        $(default-bsp-post-link)
48        $(OBJCOPY) -O elf32-i386 \
49            --remove-section=.comment \
50            --remove-section=.note \
51            --strip-unneeded $(basename $@).exe $(basename $@).nxe
52        $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
53        $(PROJECT_TOOLS)/bin2boot -v $(basename $@)$(DOWNEXT) $(HEADERADDR)\
54          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
55        rm -f $(basename $@).nxe
56endef
57
58# BSP-specific tools
59BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.