source: rtems/make/custom/mbx8xx.cfg @ b812f84

4.104.114.84.95
Last change on this file since b812f84 was b8a30d07, checked in by Joel Sherrill <joel.sherrill@…>, on 07/13/00 at 15:05:38

Patch rtems-rc-20000713-1-cvs.diff from Ralf Corsepius <corsepiu@…>
that is yet another multilib-related structual cleanup patch:

Changes:

  • Make RTEMS_TEST_NO_PAUSE a tests/ subpackage specific option.
    • Remove RTEMS_TEST_NO_PAUSE from custom/*.cfg, targopts.h and cpuopts.h.
    • Add autoconf macros RTEMS_*_RTEMS_TEST_NO_PAUSE (aclocal/rtems-test-no-pause.m4).
    • Add RTEMS_*_RTEMS_TEST_NO_PAUSE support to sptests/configure.ins and tmtests/configure.in. These are the only subdirectories which currently apply RTEMS_TEST_NO_PAUSE.
    • Add autoconf-DEFS support to all test subpackages' configure.ins below tests/. I.e. AC_DEFINES now get explicitly propagated as preprocessor defines into Makefiles, cf. AM_CPPFLAGS in tests/*/*.am, instead of using a global config-files.
    • Remove NDEBUG from custom/*.cfg.
  • AC_DEFINE POSIX_API, ITRON_API and MULTIPROCESSING in exec/configure.in, only.
    • All other sources now should relay on the values from cpuopts.h and should not define them themselves.
    • Several related changes to many configure.ins
  • Bug-fixes to RTEMS_*_RTEMS_DEBUG macros (Actually workarounds to quoting bugs in autoconf).

Notes:

  • This patch is rather immature and only tested for a small subset of BSPs (requires the tests to be enabled and therefore takes an tremendous amount of disc space and time.)
  • The patches to *cfg were generated by a script. Expect file formating changes :)
  • Property mode set to 100644
File size: 6.3 KB
Line 
1#
2#  Config file for a PowerPC MPC821- or MPC860-based MBX card
3#
4#  This file is derived from:
5#
6#  Config file for a PowerPC 403 based helas403 card
7#  Config file for MPC860 based Ethernet Comm Board
8#
9
10include $(RTEMS_ROOT)/make/custom/default.cfg
11
12RTEMS_CPU=powerpc
13RTEMS_CPU_MODEL=mpc8xx
14
15# This is the actual bsp directory used during the build process.
16RTEMS_BSP_FAMILY=mbx8xx
17
18# The value assigned to RTEMS_CPU, RTEMS_CPU_MODEL and RTEMS_BSP get
19# #defined in targopts.h. Source code can switch on these values with #ifdef
20# to select what code to compile for a specific CPU family member and specific
21# board. The RTEMS_CPU_MODEL is also used as the name of the libcpu directory,
22# while the RTEMS_BSP_FAMILY is used as the name of the libbsp directory.
23# For the MBX860 and MBX821, the boards and processors are sufficiently
24# similar that the ports are unified and use RTEMS_CPU_MODEL=mpc8xx and
25# RTEMS_BSP_FAMILY=mbx8xx. Because there are minor differences in the CPUs
26# and the boards, it is necessary to specify them fully during the build.
27# Do a "make RTEMS_BSP=<your_board> <target>" See below for a list of valid
28# values for <your_board>.
29
30ifeq ($(findstring mbx821,$(RTEMS_MBX_MODEL)),mbx821)
31CPU_TYPE=821
32else
33ifeq ($(findstring mbx860,$(RTEMS_MBX_MODEL)),mbx860)
34CPU_TYPE=860
35else
36RTEMS_BSP = mbx860_002
37RTEMS_MBX_MODEL = mbx860_002
38TARGET_ARCH=o-mbx860_002
39CPU_TYPE=860
40endif # mbx860
41endif # mbx821
42
43#  This section makes the target dependent options file.
44#
45#  Note that RTEMS_BSP matches the RTEMS_MBX_MODEL. Its value must be
46#  defined in targopts.h, so the few places that require different code
47#  for different MBX models can be distinguished. The value of
48#  RTEMS_BSP is already defined in targopts.h and is one of:
49#     mbx860_001    mbx821_001
50#     mbx860_002    mbx821_002
51#     mbx860_003    mbx821_003
52#     mbx860_004    mbx821_004
53#     mbx860_005    mbx821_005
54#     mbx860_001b   mbx821_001b
55#     mbx860_002b   mbx821_002b
56#     mbx860_003b   mbx821_003b
57#     mbx860_004b   mbx821_004b
58#     mbx860_005b   mbx821_005b
59#     mbx860_006b   mbx821_006b
60
61#  The specific CPU model is defined, so the few places that require
62#  different code for the MPC860 and MPC821 can be distinguished.
63#  Either mpc860 or mpc821 is defined.
64#
65#  MBX8xx-specific options:
66#
67#  CONSOLE_MINOR (BSP--console driver)
68#    Must be defined to be one of SMC1_MINOR, SMC2_MINOR, SCC2_MINOR,
69#    SCC3_MINOR, or SCC4_MINOR. Determines which device will be registered
70#    as /dev/console.
71#
72#  UARTS_USE_INTERRUPTS (BSP--console driver)
73#    Define if you want interrupt-driven I/O instead of polling. Superceeded
74#    by EPPCBUG_SMC1 on SMC1.
75#
76#  EPPCBUG_SMC1 (BSP--console driver)
77#    If defined, the I/O through the SCM1 is done through the EPPCBug firmware.
78#    Because of limitations in revision 1.1 of the firmware, EPPCBug must be
79#    configured to use SMC1 as its console. If not defined, I/O through SMC1
80#    is done through a RTEMS device driver.
81#
82#  EPPCBUG_VECTORS (BSP--RTEMS)
83#    If defined, the most vectors branch to EPPCBug, except the following:
84#    0x500 (external interrupt), 0x900 (decrementer).
85#
86#  INSTRUCTION_CACHE_ENABLE (BSP--RTEMS)
87#    If defined, the instruction cache will be enabled after address translation
88#    is turned on.
89#
90#  DATA_CACHE_ENABLE (BSP--RTEMS)
91#    If defined, the data cache will be enabled after address translation
92#    is turned on.
93#   
94#  PowerPC-specific options:
95#       
96#  PPC_USE_SPRG (RTEMS PowerPC port)
97#     If defined (=1), then the PowerPC specific code in RTEMS will use some
98#     of the special purpose registers to slightly optimize interrupt
99#     response time.  The use of these registers can conflict with
100#     other tools like debuggers.  This should be 0 when using EPPCBug
101#     because its uses most SPRGs (don't believe the documentation!).
102#
103#  PPC_USE_DATA_CACHE (RTEMS PowerPC port)
104#     If defined, then the PowerPC specific code in RTEMS will use
105#     data cache instructions to optimize the context switch code.
106#     This code can conflict with debuggers or emulators.
107
108define make-target-options
109        @echo "#ifdef mpc$(CPU_TYPE)"                       >>$@
110        @echo "#undef mpc$(CPU_TYPE)"                       >>$@
111        @echo "#endif"                                      >>$@
112        @echo "#define mpc$(CPU_TYPE) 1"                    >>$@
113        @echo                                               >>$@
114        @echo "#define CONSOLE_MINOR SMC2_MINOR"            >>$@
115        @echo "#define UARTS_USE_INTERRUPTS 1"              >>$@
116        @echo "#define EPPCBUG_SMC1 1"                      >>$@
117        @echo "#define EPPCBUG_VECTORS 1"                   >>$@
118        @echo "#define INSTRUCTION_CACHE_ENABLE 1"          >>$@
119        @echo "#define DATA_CACHE_ENABLE 1"                 >>$@
120        @echo                                               >>$@
121        @echo "#define PPC_VECTOR_FILE_BASE 0x0000"         >>$@
122        @echo "#define PPC_USE_SPRG 0"                      >>$@
123        @echo "/* #define PPC_USE_DATA_CACHE 1" */          >>$@
124        @echo                                               >>$@
125endef
126
127#  This contains the compiler options necessary to select the CPU model
128#  and (hopefully) optimize for it.
129#
130CPU_CFLAGS = -mcpu=$(CPU_TYPE)
131
132CFLAGS_DEBUG_V += -ggdb
133CXXFLAGS_DEBUG_V += -ggdb
134
135# optimize flag: typically -O, could use -O4 or -fast
136# -O4 is ok for RTEMS
137# NOTE: some level of -O may be actually required by inline assembler
138# CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
139CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
140CXXFLAGS_OPTIMIZE_V=-O4
141
142# The following are definitions of make-exe which will work using ld as
143# is currently required.  It is expected that as of gcc 2.8, the end user
144# will be able to override parts of the compilers specs and link using gcc.
145
146ifeq ($(RTEMS_USE_GCC272),yes)
147# The --defsym arguments define arguments which are required by the linkcmds
148# file which is designed for gcc 2.8
149define make-exe
150        $(LD) $(XLDFLAGS) -T $(LINKCMDS) \
151            --defsym __fini=0 --defsym __init=0 \
152            -o $@ -u atexit -u __vectors -u start \
153            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
154        $(NM) -g -n $@ > $(basename $@).num
155        $(STRIP) -o $(basename $@).elf $@
156        $(SIZE) $@
157endef
158else
159define make-exe
160        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) $(MBX8xx_LDFLAGS) \
161            -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
162        $(NM) -g -n $@ > $(basename $@).nm
163        $(STRIP) -o $(basename $@) $@
164        $(SIZE) $@
165endef
166endif
167
168# Miscellaneous additions go here
169
170# Override default start file
171START_BASE=
172
Note: See TracBrowser for help on using the repository browser.