source: rtems/c/src/lib/libbsp/m68k/efi332/start/Makefile.am @ 50bb7627

4.104.114.84.95
Last change on this file since 50bb7627 was 50bb7627, checked in by Joel Sherrill <joel.sherrill@…>, on 10/12/00 at 12:56:07

2000-10-12 John S Gwynne <jgwynne@…>

  • start/start.c: Modified to support generation of ram_init.
  • start/ram_init.ld, BSP/start/ram_init.sed: New files. These changes enable RTEMS to automatically generate the ram_init file used by gdb with the BDM patches. The 332 has on-board chip select lines (for RAM and FLASH) that must be configured before use of these peripherals. These patches parse data from start.c where the chip select lines are configured in the runtime executable and automatically generates the gdb initialization file using the same settings. A great time saver. A similar file, ram_init_FW (flash writable), is also generated that the flash programming tool uses.
  • start/Makefile.am: Modified to support above.
  • CPU/sim.h: Modified to support above.
  • startup/except_vect_332_ROM.S: Moved to start so it would not be included in libbsp.a. Moving it to start ensures it is available as a single object file.
  • start/except_vect_332_ROM.S: Moved from startup.
  • startup/linkcmds, startup/linkcmds_ROM: Fixes to the memory map shown in the comments.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1##
2## $Id$
3##
4
5AUTOMAKE_OPTIONS = foreign 1.4
6
7PGM = $(ARCH)/start.o
8
9C_FILES = start.c
10C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
11
12OBJS = $(C_O_FILES)
13
14include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
15include $(top_srcdir)/../../../../../../automake/compile.am
16include $(top_srcdir)/../../../../../../automake/lib.am
17
18#
19# (OPTIONAL) Add local stuff here using +=
20#
21
22$(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o: $(PGM)
23        $(INSTALL_DATA) $< $@
24
25$(PROJECT_RELEASE)/lib/except_vect_332_ROM$(LIB_VARIANT).o: \
26    $(ARCH)/except_vect_332_ROM.o
27        $(INSTALL_DATA) $< $@
28
29$(PROJECT_RELEASE)/lib/ram_init$(LIB_VARIANT): \
30    $(ARCH)/ram_init
31        $(INSTALL_DATA) $< $@
32
33$(PROJECT_RELEASE)/lib/ram_init_FW$(LIB_VARIANT): \
34    $(ARCH)/ram_init_FW
35        $(INSTALL_DATA) $< $@
36
37$(ARCH)/ram_init: $(srcdir)/start.c $(srcdir)/ram_init.ld \
38    $(srcdir)/ram_init.sed
39        sed -f $(srcdir)/ram_init.sed $(srcdir)/start.c >$(ARCH)/ram_init.S
40        $(CC) -D SIM_CRB=0x0000 -E $(ARCH)/ram_init.S >$(ARCH)/ram_init1.S
41        sed "/.org/ {N; s/\n/%/; P;}; /\.text/P; D;" $(ARCH)/ram_init1.S | \
42           sort | sed "h;1{s/.*/.data/;P;g;};s/%.*//;P;g;s/.*%//;" \
43           >$(ARCH)/ram_init2.S
44        $(CC) -nostdlib -Wl,-T$(srcdir)/ram_init.ld $(ARCH)/ram_init2.S \
45           -o $(ARCH)/ram_init
46
47$(ARCH)/ram_init_FW: $(srcdir)/ram_init.ld $(ARCH)/ram_init.S
48        $(CC) -D FLASHWRITE -D SIM_CRB=0x0000 -E $(ARCH)/ram_init.S \
49           >$(ARCH)/ram_init_FW1.S
50        sed "/.org/ {N; s/\n/%/; P;}; /\.text/P; D;" $(ARCH)/ram_init_FW1.S | \
51           sort | sed "h;1{s/.*/.data/;P;g;};s/%.*//;P;g;s/.*%//;" \
52           >$(ARCH)/ram_init_FW2.S
53        $(CC) -nostdlib -Wl,-T$(srcdir)/ram_init.ld $(ARCH)/ram_init_FW2.S \
54           -o $(ARCH)/ram_init_FW
55
56TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o \
57    $(PROJECT_RELEASE)/lib/ram_init$(LIB_VARIANT) \
58    $(PROJECT_RELEASE)/lib/ram_init_FW$(LIB_VARIANT) \
59    $(PROJECT_RELEASE)/lib/except_vect_332_ROM$(LIB_VARIANT).o
60
61all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
62
63.PRECIOUS: $(PGM)
64
65EXTRA_DIST = start.c except_vect_332_ROM.S ram_init.ld ram_init.sed
66
67include $(top_srcdir)/../../../../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.