1 |
158 |
chris |
#
|
2 |
|
|
# Config file for a PowerPC 603e based Vista VMEbus Single Board Computer.
|
3 |
|
|
# This BSP should work with the following models:
|
4 |
|
|
#
|
5 |
|
|
# + Vista SCORE 603e
|
6 |
|
|
#
|
7 |
|
|
# $Id: score603e.cfg,v 1.1.1.1 2001-07-10 10:05:38 chris Exp $
|
8 |
|
|
#
|
9 |
|
|
|
10 |
|
|
RTEMS_CPU=powerpc
|
11 |
|
|
RTEMS_CPU_MODEL=ppc603e
|
12 |
|
|
|
13 |
|
|
# Set the default generation if it has not been overridden
|
14 |
|
|
ifeq ($(SCORE603E_GENERATION),)
|
15 |
|
|
SCORE603E_GENERATION=2
|
16 |
|
|
endif
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
# This is the actual bsp directory used during the build process.
|
20 |
|
|
|
21 |
|
|
RTEMS_BSP_FAMILY=score603e
|
22 |
|
|
|
23 |
|
|
ifeq ($(SCORE603E_GENERATION),1)
|
24 |
|
|
RTEMS_BSP=score603e_g1
|
25 |
|
|
|
26 |
|
|
else
|
27 |
|
|
ifeq ($(SCORE603E_GENERATION),2)
|
28 |
|
|
RTEMS_BSP=score603e
|
29 |
|
|
|
30 |
|
|
endif # generation 2
|
31 |
|
|
endif # generation 1
|
32 |
|
|
|
33 |
|
|
include $(RTEMS_ROOT)/make/custom/default.cfg
|
34 |
|
|
|
35 |
|
|
# This section makes the target dependent options file.
|
36 |
|
|
|
37 |
|
|
# NDEBUG (C library)
|
38 |
|
|
# if defined asserts do not generate code. This is commonly used
|
39 |
|
|
# as a command line option.
|
40 |
|
|
#
|
41 |
|
|
# RTEMS_TEST_NO_PAUSE (RTEMS tests)
|
42 |
|
|
# do not pause between screens of output in the rtems tests
|
43 |
|
|
#
|
44 |
|
|
# RTEMS_DEBUG (RTEMS)
|
45 |
|
|
# If defined, debug checks in RTEMS and support library code are enabled.
|
46 |
|
|
#
|
47 |
|
|
# CONSOLE_USE_POLLED (score603e_bsp)
|
48 |
|
|
# CONSOLE_USE_INTERRUPTS (score603e_bsp)
|
49 |
|
|
# The score603e console driver has the structure to operate in either
|
50 |
|
|
# polled or interrupt mode. However both modes only trap to the
|
51 |
|
|
# monitor currently.
|
52 |
|
|
#
|
53 |
|
|
# SCORE603E_USE_SDS (score603e_bsp)
|
54 |
|
|
# SCORE603E_USE_OPEN_FIRMWARE (score603e_bsp)
|
55 |
|
|
# SCORE603E_USE_NONE (score603e_bsp)
|
56 |
|
|
# The Score603e board can be configured with 3 ROM monitors. Only two
|
57 |
|
|
# are appropriate for use with RTEMS. Set exactly one of these to "1"
|
58 |
|
|
# to indicate which ROM monitor is on the board you are using.
|
59 |
|
|
#
|
60 |
|
|
# PPC_VECTOR_FILE_BASE (ppc)
|
61 |
|
|
# This defines the base address of the exception table.
|
62 |
|
|
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
|
63 |
|
|
#
|
64 |
|
|
# PPC_USE_SPRG (RTEMS PowerPC port)
|
65 |
|
|
# If defined, then the PowerPC specific code in RTEMS will use some
|
66 |
|
|
# of the special purpose registers to slightly optimize interrupt
|
67 |
|
|
# response time. The use of these registers can conflict with
|
68 |
|
|
# other tools like debuggers.
|
69 |
|
|
#
|
70 |
|
|
# PPC_USE_DATA_CACHE (RTEMS PowerPC port)
|
71 |
|
|
# If defined, then the PowerPC specific code in RTEMS will use
|
72 |
|
|
# data cache instructions to optimize the context switch code.
|
73 |
|
|
# This code can conflict with debuggers or emulators.
|
74 |
|
|
#
|
75 |
|
|
|
76 |
|
|
define make-target-options
|
77 |
|
|
@echo "/* #define NDEBUG 1 */ " >>$@
|
78 |
|
|
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
|
79 |
|
|
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
|
80 |
|
|
@echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@
|
81 |
|
|
@echo "#define INITIALIZE_COM_PORTS 1" >>$@
|
82 |
|
|
@echo "#define SCORE603E_GENERATION $(SCORE603E_GENERATION)" >>$@
|
83 |
|
|
@echo "#define SCORE603E_USE_SDS 0" >>$@
|
84 |
|
|
@echo "#define SCORE603E_USE_NONE 0" >>$@
|
85 |
|
|
@echo "#define SCORE603E_USE_DINK 1" >>$@
|
86 |
|
|
@echo "#define SCORE603E_USE_OPEN_FIRMWARE 0" >>$@
|
87 |
|
|
@echo "#define PPC_USE_DATA_CACHE 0" >>$@
|
88 |
|
|
@echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
|
89 |
|
|
@echo "#define PPC_USE_SPRG 0" >>$@
|
90 |
|
|
@echo "#define HAS_PMC_PSC8 0" >>$@
|
91 |
|
|
endef
|
92 |
|
|
|
93 |
|
|
# This contains the compiler options necessary to select the CPU model
|
94 |
|
|
# and (hopefully) optimize for it.
|
95 |
|
|
#
|
96 |
|
|
CPU_CFLAGS = -mcpu=603
|
97 |
|
|
|
98 |
|
|
# optimize flag: typically -0, could use -O4 or -fast
|
99 |
|
|
# -O4 is ok for RTEMS
|
100 |
|
|
# NOTE: some level of -O may be actually required by inline assembler
|
101 |
|
|
CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
|
102 |
|
|
# CFLAGS_OPTIMIZE_V=-O0
|
103 |
|
|
|
104 |
|
|
# The following is a linkcmds file which will work without using the
|
105 |
|
|
# -specs system in gcc 2.8.
|
106 |
|
|
# $(LD) $(XLDFLAGS) -T $(LINKCMDS) \
|
107 |
|
|
# -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES)
|
108 |
|
|
# $(LD) $(XLDFLAGS) -Ttext 0x20000 \
|
109 |
|
|
# -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES)
|
110 |
|
|
|
111 |
|
|
ifeq ($(RTEMS_USE_GCC272),yes)
|
112 |
|
|
define make-exe
|
113 |
|
|
@echo gcc 2.7.2 style linking not supported by score603e
|
114 |
|
|
@exit 1
|
115 |
|
|
endef
|
116 |
|
|
else
|
117 |
|
|
define make-exe
|
118 |
|
|
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
|
119 |
|
|
-o $(basename $@).elf $(LINK_OBJS) $(LINK_LIBS)
|
120 |
|
|
$(NM) -g -n $(basename $@).elf > $(basename $@).num
|
121 |
|
|
$(SIZE) $(basename $@).elf
|
122 |
|
|
$(OBJCOPY) -O srec $(basename $@).elf $(basename $@).s1
|
123 |
|
|
sed -e 's/.$$//' $(basename $@).s1 | \
|
124 |
|
|
$(PACKHEX) >$(basename $@).exe
|
125 |
|
|
rm -f $(basename $@).s1
|
126 |
|
|
endef
|
127 |
|
|
endif
|
128 |
|
|
|
129 |
|
|
# Miscellaneous additions go here
|
130 |
|
|
|
131 |
|
|
DRIVER_ARCHITECTURE=vmebus
|