source: rtems/make/custom/mbx8xx.cfg @ 37b5d78

4.104.114.84.95
Last change on this file since 37b5d78 was 37b5d78, checked in by Joel Sherrill <joel.sherrill@…>, on 09/14/01 at 17:30:22

2001-09-14 Ralf Corsepius <corsepiu@…>

  • aclocal/canonical-target-name.m4: Use AC_CANONICAL_TARGET instead of AC_CANONICAL_SYSTEM.
  • aclocal/config-subdirs.m4: Use AS_MKDIR_P instead of mkinstalldirs and mkdir.
  • aclocal/target.m4: Obsolete RTEMS_OUTPUT_BUILD_SUBDIRS, hack RTEMS_CONFIG_BUILD_SUBDIRS, introduce _RTEMS_OUTPUT_BUILD_SUBDIRS.
  • Property mode set to 100644
File size: 8.6 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#  NVRAM_CONFIGURE
68#    Define to 1 if you want the console driver, network driver and caches
69#    configured at boot time from parameters stored in NVRAM. If set to 1,
70#    most parameters below are ignored during the build. If not set to 1,
71#    then the console driver is configured at build time, the network host
72#    information is obtained from application supplied data structures, and
73#    the caches are configured at boot time based on the information supplied
74#    in this file.
75#
76#  UARTS_USE_TERMIOS
77#    Define to 1 if you want termios support for every port.
78#    Termios support is independent of the choice of UART I/O mode.
79#
80#  CONSOLE_MINOR (BSP--console driver)
81#    Must be defined to be one of SMC1_MINOR, SMC2_MINOR, SCC2_MINOR,
82#    SCC3_MINOR, or SCC4_MINOR. Determines which device will be registered
83#    as /dev/console.
84#
85#  UARTS_IO_MODE (BSP--console driver)
86#    Define to 0 or 1 if you want polled I/O performed by RTEMS.
87#    Define to 1 if you want interrupt-driven performed by RTEMS.
88#    Define to 2 if you want polled I/O performed by EPPCBug.
89#    There is no provision to have a mix of interrupt-driven and polled I/O
90#    ports, except that the printk port may use a different mode from the
91#    other ports. If this is done, do not open the printk port from an RTEMS
92#    application. With EPPCBug 1.1, if mode 2 is selected, CONSOLE_MINOR must
93#    be set to SMC1_MINOR. This is a deficiency of the firmware: it does not
94#    perform serial I/O on any port other than its default debug port, which
95#    must be SMC1.
96#
97#  PRINTK_MINOR (BSP--console driver)
98#    Must be defined to be one of SMC1_MINOR, SMC2_MINOR, SCC2_MINOR,
99#    SCC3_MINOR, or SCC4_MINOR. Determines which device is used for output
100#    by printk(). If the port that printk() uses is also used for other I/O
101#    (e.g. if  PRINTK_MINOR == CONSOLE_MINOR), then both ports should use
102#    the same type of I/O, otherwise the drivers will likely conflict with
103#    each other.
104#
105#  PRINTK_IO_MODE (BSP--console driver)
106#    Define to 0 or 1 if you want polled I/O performed by RTEMS.
107#    Define to 2 if you want polled I/O performed by EPPCBug.
108#    The printk() port is not configured to use termios. With EPPCBug 1.1,
109#    if mode 2 is selected, PRINTK_MINOR must be set to SMC1_MINOR.
110#    This is a deficiency of the firmware: it does not perform serial I/O
111#    on any port other than its default debug port, which must be SMC1.
112#    Printk always uses polled output.
113#
114#  EPPCBUG_SMC1 (BSP--console driver)
115#    If defined, SMC1 is in use by EPPC-Bug. The console driver will not
116#    re-initialize that port.
117#
118#  INSTRUCTION_CACHE_ENABLE (BSP--RTEMS)
119#    If defined, the instruction cache will be enabled after address translation
120#    is turned on.
121#
122#  DATA_CACHE_ENABLE (BSP--RTEMS)
123#    If defined, the data cache will be enabled after address translation
124#    is turned on.
125#   
126#  EPPCBUG_VECTORS (BSP--RTEMS)
127#    If defined, vectors branch to EPPCBug, except the following:
128#    0x500 (external interrupt), 0x900 (decrementer).
129#
130#  PowerPC-specific options:
131#       
132#  PPC_USE_SPRG (RTEMS PowerPC port)
133#     If defined (=1), then the PowerPC specific code in RTEMS will use some
134#     of the special purpose registers to slightly optimize interrupt
135#     response time.  The use of these registers can conflict with
136#     other tools like debuggers.  This should be 0 when using EPPCBug
137#     because its uses most SPRGs (do not believe the documentation!).
138#
139#  PPC_USE_DATA_CACHE (RTEMS PowerPC port)
140#     If defined, then the PowerPC specific code in RTEMS will use
141#     data cache instructions to optimize the context switch code.
142#     This code can conflict with debuggers or emulators.
143
144define make-target-options
145        @echo "#ifdef mpc$(CPU_TYPE)"                       >>$@
146        @echo "#undef mpc$(CPU_TYPE)"                       >>$@
147        @echo "#endif"                                      >>$@
148        @echo "#define mpc$(CPU_TYPE) 1"                    >>$@
149        @echo                                               >>$@
150        @echo "#define NVRAM_CONFIGURE 1"                   >>$@
151        @echo "#define UARTS_USE_TERMIOS 0"                 >>$@
152        @echo "#define CONSOLE_MINOR SMC2_MINOR"            >>$@
153        @echo "#define UARTS_IO_MODE 0"                     >>$@
154        @echo "#define PRINTK_MINOR SMC2_MINOR"             >>$@
155        @echo "#define PRINTK_IO_MODE 0"                    >>$@
156        @echo "#define EPPCBUG_SMC1 1"                      >>$@
157        @echo "#define EPPCBUG_VECTORS 1"                   >>$@
158        @echo "#define INSTRUCTION_CACHE_ENABLE 1"          >>$@
159        @echo "#define DATA_CACHE_ENABLE 1"                 >>$@
160        @echo                                               >>$@
161        @echo "#define PPC_VECTOR_FILE_BASE 0x0000"         >>$@
162        @echo "#define PPC_USE_SPRG 0"                      >>$@
163        @echo "#define PPC_USE_DATA_CACHE 1"                >>$@
164        @echo                                               >>$@
165endef
166
167#  This contains the compiler options necessary to select the CPU model
168#  and (hopefully) optimize for it.
169#
170CPU_CFLAGS = -mcpu=$(CPU_TYPE)
171
172CFLAGS_DEBUG_V += -ggdb
173CXXFLAGS_DEBUG_V += -ggdb
174
175# optimize flag: typically -O, could use -O4 or -fast
176# -O4 is ok for RTEMS
177# NOTE: some level of -O may be actually required by inline assembler
178# CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
179CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
180CXXFLAGS_OPTIMIZE_V=-O4
181
182# The following are definitions of make-exe which will work using ld as
183# is currently required.  It is expected that as of gcc 2.8, the end user
184# will be able to override parts of the compilers specs and link using gcc.
185
186ifeq ($(RTEMS_USE_GCC272),yes)
187# The --defsym arguments define arguments which are required by the linkcmds
188# file which is designed for gcc 2.8
189define make-exe
190        $(LD) $(XLDFLAGS) -T $(LINKCMDS) -o $(basename $@)_sym.exe \
191            --defsym __fini=0 --defsym __init=0 \
192            -u atexit -u __vectors -u start \
193            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
194        $(NM) -g -n $(basename $@)_sym.exe> $(basename $@).nm
195        $(STRIP) -O $(basename $@).exe $(basename $@)_sym-exe
196        $(SIZE) $(basename $@)_sym.exe
197endef
198else
199define make-exe
200        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) $(MBX8xx_LDFLAGS) \
201            -o $(basename $@)_sym.exe $(LINK_OBJS) $(LINK_LIBS)
202        $(NM) -g -n $(basename $@)_sym.exe > $(basename $@).nm
203        $(STRIP) -o $(basename $@).exe $(basename $@)_sym.exe
204        $(SIZE) $(basename $@)_sym.exe
205endef
206endif
207
208# Miscellaneous additions go here
209
210# Override default start file
211START_BASE=
212
Note: See TracBrowser for help on using the repository browser.