source: rtems/make/custom/ods68302.cfg @ 99eb585

Last change on this file since 99eb585 was 99eb585, checked in by Joel Sherrill <joel.sherrill@…>, on 02/25/00 at 15:03:10

Patches rtems-rc-4.5.0-1.diff from Ralf Corsepius <corsepiu@…>
that fixes numerous miscellaneous issues most related to the debug and
profile build stanzas:

Fix for the "make debug" (1) issue and an analogous issue with "make
profile" (untested).

  • Fixes to mcp750.cfg (make debug, directories) (2)
  • Updates/minor fixes for shgen (3)
  • Updates some custom/*.cfgs to use $(LINK.c) instead of $(CC)
  • Leftovers from rtems-rc-4.5.0-[0|1].diff which somehow did not make it into cvs.
  • Cleanups to the perlscripts below tools/update/
  • Some unsorted minor fixes.

Footnotes/Remarks?:

(1) Tested for all m68k, sh, sparc, unix and selected i386, ppc BSPs.

Known problems: I can't build the debug variant for the m68k/mvme162 and
m68k/mvme162lx (segmentation fault - signal 11 :)

(2) Tested by building the BSP, but I doubt the debug-variant is
functional. The flags used for the debug variant should be checked by
knowledgeable persons and probably at runtime #:o)

(3) I have updated shgen to use getopt_long (it should fall back to
getopt if not available), enhanced the options, cleaned up some minor
tweaks and added help2man support (rough automatic man-page generation).

Technical notes:

  • make debug and make profile now work similar in target Makefile.ams as they did in old autoconf-Makefile.ins using leaf.cfg. Unlike the rules in leaf.cfg these Makefile.am also recurse once on themselves in directory Makefiles before or after recursing into subdirectories, not only in leaf-directories. To implement this behavior, I renamed the former automake/local.am into automake/host.am and extended local.am to provide this recursion. I.e. host.am implements the non-self-recursive variant, while local.am now implements the self-recursive behavior. => all Makefile.ams exploiting build-variants are supposed to include local.am => all Makefile.ams not exploiting build-variants should include host.am

=> Rules of thumb:

  • Only include one of both, either local.am or host.am into a Makefile.am. -Target-Makefile.ams should include local.am -Host-Makefile.ams should include host.am (Probably, you now understand the naming)
  • There are exceptions from these rules :)
  • Now, make debug|profile|all are independent of each other. However, each of them however triggers preinstall.
  • "make install" still decends into the subdirectories but does not trigger "all|profile|debug|preinstall" in target Makefile.am anymore. Besides triggering "install"-rules in some selected Makefile.ams, it only packs $(PROJECT_ROOT) into a tarballs and unpacks it to $(prefix). => "make install" alone is not enough to install RTEMS, now use make RTEMS_BSP=<bsps> [all] [debug] [profile] make RTEMS_BSP=<bsp> install

I consider this to be a step back wrt. exploiting automake mechanisms,
and expect this to be reverted if we abandon building target variants in
favour of the standard convention of optionally overriding flags from
the command line (i.e. instead of "make debug", GNU standards favor
"make CFLAGS=<options> --prefix=<location>")

  • Property mode set to 100644
File size: 2.7 KB
Line 
1#
2#  Config file for a "ODS 68302" BSP
3#
4#  Differs from the gen68302 by providing most of the boot code as C
5#  code. This allows separate board definitions to be based on C
6#  header files. The file is based on the VARIANT defined.
7#
8#  $Id$
9#
10
11include $(RTEMS_ROOT)/make/custom/default.cfg
12
13RTEMS_CPU=m68k
14RTEMS_CPU_MODEL=m68302
15
16# This is the actual bsp directory used during the build process.
17RTEMS_BSP_FAMILY=ods68302
18
19#
20#  This contains the compiler options necessary to select the CPU model
21#  and (hopefully) optimize for it.
22#
23CPU_CFLAGS =-m68302 -msoft-float
24CPU_DEFINES = \
25-DVARIANT=$(BSP_VARIANT) -DMC68302_BASE=$(MC68302_BASE) \
26-DRAM_BASE=$(RAM_BASE) -DRAM_SIZE=$(RAM_SIZE) \
27-DROM_BASE=$(ROM_BASE) -DROM_SIZE=$(ROM_SIZE)
28
29# optimize flag: typically -0, could use -O4 or -fast
30# -O4 is ok for RTEMS
31CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
32
33# debugging please
34CFLAGS_DEBUG_V =
35
36#  This section makes the target dependent options file.
37
38#  NDEBUG (C library)
39#     if defined asserts do not generate code.  This is commonly used
40#     as a command line option.
41#
42#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
43#     do not pause between screens of output in the rtems tests
44#
45#  RTEMS_DEBUG (RTEMS)
46#     If defined, debug checks in RTEMS and support library code are enabled.
47
48define make-target-options
49        @echo "/* #define NDEBUG 1 */ "                     >>$@
50        @echo "#define RTEMS_TEST_NO_PAUSE 1"               >>$@
51        @echo "#define RTEMS_DEBUG  1"                      >>$@
52endef
53
54# The following are definitions of make-exe which will work using ld as
55# is currently required.  It is expected that as of gcc 2.8, the end user
56# will be able to override parts of the compilers specs and link using gcc.
57
58ifeq ($(RTEMS_USE_GCC272),yes)
59
60# override default location of Standard C Library
61LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/libc.a
62LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/libm.a
63
64define make-exe
65        $(LD) $(LDFLAGS) -N -Ttext $(ROM_BASE) \
66            -defsym MC68302_BASE=$(MC68302_BASE) \
67            -T $(LINKCMDS) -o $(basename $@).exe \
68            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
69        $(NM) -g -n $(basename $@).exe > $(basename $@).num
70        $(SIZE) $(basename $@).exe
71endef
72else
73define make-exe
74        $(LINK.c) $(LDLIBS) \
75            -Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \
76            -o $@ \
77            $(LINK_OBJS) $(LINK_LIBS)
78        $(NM) -g -n $@ > $(basename $@).num
79        $(SIZE) $@
80endef
81endif
82# Miscellaneous additions go here
83
84ifeq "$(strip $(BSP_VARIANT))" ""
85BSP_VARIANT=bare
86MC68302_BASE=0x00700000
87RAM_BASE=0x00000000
88RAM_SIZE=0x00100000
89
90ifeq ($(RTEMS_DEBUGGER),yes)
91ROM_BASE=0x00010000
92LINKCMDS=$(PROJECT_RELEASE)/lib/debugrom
93else
94ROM_BASE=0x00C00000
95LINKCMDS=$(PROJECT_RELEASE)/lib/rom
96endif
97
98ROM_SIZE=0x00100000
99
100else
101
102# pattern match the variant to set the memory map
103
104endif
Note: See TracBrowser for help on using the repository browser.