summaryrefslogtreecommitdiffstats
path: root/make/custom/mbx8xx.cfg
blob: 2e676f862642b8fbc5b9e075349b624007d64e04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#
#  Config file for a PowerPC MPC821- or MPC860-based MBX card
#
#  This file is derived from:
#
#  Config file for a PowerPC 403 based helas403 card
#  Config file for MPC860 based Ethernet Comm Board
#

include $(RTEMS_ROOT)/make/custom/default.cfg

RTEMS_CPU=powerpc
RTEMS_CPU_MODEL=mpc$(8XX_CPU_TYPE)

# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=mbx8xx

#  This section makes the target dependent options file.
#
#  Note that RTEMS_BSP matches the RTEMS_MBX_MODEL. Its value must be
#  defined in targopts.h, so the few places that require different code
#  for different MBX models can be distinguished. The value of
#  RTEMS_BSP is already defined in targopts.h and is one of:
#     mbx860_001    mbx821_001
#     mbx860_002    mbx821_002
#     mbx860_003    mbx821_003
#     mbx860_004    mbx821_004
#     mbx860_005    mbx821_005
#     mbx860_001b   mbx821_001b
#     mbx860_002b   mbx821_002b
#     mbx860_003b   mbx821_003b
#     mbx860_004b   mbx821_004b
#     mbx860_005b   mbx821_005b
#     mbx860_006b   mbx821_006b

#  The specific CPU model is defined, so the few places that require
#  different code for the MPC860 and MPC821 can be distinguished.
#  Either mpc860 or mpc821 is defined.
#
#  MBX8xx-specific options:
#

#  This contains the compiler options necessary to select the CPU model
#  and (hopefully) optimize for it.
#
CPU_CFLAGS = -mcpu=$(8XX_CPU_TYPE) -Dmpc$(8XX_CPU_TYPE) -D$(RTEMS_MBX_MODEL)


# optimize flag: typically -O, could use -O4 or -fast
# NOTE: some level of -O may be actually required by inline assembler
# CFLAGS_OPTIMIZE_V = -O4 -fno-keep-inline-functions
CFLAGS_OPTIMIZE_V = -O4 -fno-keep-inline-functions
CXXFLAGS_OPTIMIZE_V = -O4

define make-exe
	$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) $(MBX8xx_LDFLAGS) \
	    -o $(basename $@)_sym.exe $(LINK_OBJS) $(LINK_LIBS)
	$(NM) -g -n $(basename $@)_sym.exe > $(basename $@).nm
	cp $(basename $@)_sym.exe $(basename $@).exe 
	$(STRIP) $(basename $@).exe
	$(SIZE) $(basename $@)_sym.exe
endef

# Miscellaneous additions go here

# Override default start file
START_BASE=