1 | # |
---|
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$ |
---|
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 | # STACK_CHECKER_ON (RTEMS support code) |
---|
45 | # If defined, stack bounds checking is enabled. |
---|
46 | # |
---|
47 | # STACK_CHECKER_REPORT_USAGE (RTEMS support code) |
---|
48 | # If this and STACK_CHECKER_ON are defined, then a report on stack usage |
---|
49 | # per task is printed when the program exits. |
---|
50 | # |
---|
51 | # RTEMS_DEBUG (RTEMS) |
---|
52 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
53 | # |
---|
54 | # CONSOLE_USE_POLLED (score603e_bsp) |
---|
55 | # CONSOLE_USE_INTERRUPTS (score603e_bsp) |
---|
56 | # The score603e console driver has the structure to operate in either |
---|
57 | # polled or interrupt mode. However both modes only trap to the |
---|
58 | # monitor currently. |
---|
59 | # |
---|
60 | # SCORE603E_USE_SDS (score603e_bsp) |
---|
61 | # SCORE603E_USE_OPEN_FIRMWARE (score603e_bsp) |
---|
62 | # SCORE603E_USE_NONE (score603e_bsp) |
---|
63 | # The Score603e board can be configured with 3 ROM monitors. Only two |
---|
64 | # are appropriate for use with RTEMS. Set exactly one of these to "1" |
---|
65 | # to indicate which ROM monitor is on the board you are using. |
---|
66 | # |
---|
67 | # PPC_VECTOR_FILE_BASE (ppc) |
---|
68 | # This defines the base address of the exception table. |
---|
69 | # NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 |
---|
70 | # |
---|
71 | # PPC_ABI (ppc) |
---|
72 | # This defines the calling convention (Application Binary Interface) |
---|
73 | # used in this configuration. EABI is the only one supported. |
---|
74 | # |
---|
75 | # PPC_ASM (ppc) |
---|
76 | # This defines the assembly language format used in this configuration. |
---|
77 | # ELF is the only one supported. |
---|
78 | # |
---|
79 | # PPC_USE_SPRG (RTEMS PowerPC port) |
---|
80 | # If defined, then the PowerPC specific code in RTEMS will use some |
---|
81 | # of the special purpose registers to slightly optimize interrupt |
---|
82 | # response time. The use of these registers can conflict with |
---|
83 | # other tools like debuggers. |
---|
84 | # |
---|
85 | # PPC_USE_DATA_CACHE (RTEMS PowerPC port) |
---|
86 | # If defined, then the PowerPC specific code in RTEMS will use |
---|
87 | # data cache instructions to optimize the context switch code. |
---|
88 | # This code can conflict with debuggers or emulators. |
---|
89 | # |
---|
90 | |
---|
91 | define make-target-options |
---|
92 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
93 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
94 | @echo "#define STACK_CHECKER_ON 1" >>$@ |
---|
95 | @echo "#define STACK_CHECKER_REPORT_USAGE 1" >>$@ |
---|
96 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
97 | @echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@ |
---|
98 | @echo "#define INITIALIZE_COM_PORTS 1" >>$@ |
---|
99 | @echo "#define SCORE603E_GENERATION $(SCORE603E_GENERATION)" >>$@ |
---|
100 | @echo "#define SCORE603E_USE_SDS 0" >>$@ |
---|
101 | @echo "#define SCORE603E_USE_NONE 0" >>$@ |
---|
102 | @echo "#define SCORE603E_USE_DINK 1" >>$@ |
---|
103 | @echo "#define SCORE603E_USE_OPEN_FIRMWARE 0" >>$@ |
---|
104 | @echo "#define PPC_USE_DATA_CACHE 0" >>$@ |
---|
105 | @echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@ |
---|
106 | @echo "#define PPC_ABI PPC_ABI_EABI" >>$@ |
---|
107 | @echo "#define PPC_ASM PPC_ASM_ELF" >>$@ |
---|
108 | @echo "#define PPC_USE_SPRG 0" >>$@ |
---|
109 | @echo "#define HAS_PMC_PSC8 0" >>$@ |
---|
110 | endef |
---|
111 | |
---|
112 | # This contains the compiler options necessary to select the CPU model |
---|
113 | # and (hopefully) optimize for it. |
---|
114 | # |
---|
115 | CPU_CFLAGS = -mcpu=603 |
---|
116 | |
---|
117 | # optimize flag: typically -0, could use -O4 or -fast |
---|
118 | # -O4 is ok for RTEMS |
---|
119 | # NOTE: some level of -O may be actually required by inline assembler |
---|
120 | CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions |
---|
121 | # CFLAGS_OPTIMIZE_V=-O0 |
---|
122 | |
---|
123 | # This target does not support the ka9q tcp/ip stack so ignore requests |
---|
124 | # to enable it. |
---|
125 | HAS_NETWORKING=no |
---|
126 | |
---|
127 | # The following is a linkcmds file which will work without using the |
---|
128 | # -specs system in gcc 2.8. |
---|
129 | # $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ |
---|
130 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
131 | # $(LD) $(XLDFLAGS) -Ttext 0x20000 \ |
---|
132 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
133 | |
---|
134 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
135 | define make-exe |
---|
136 | @echo gcc 2.7.2 style linking not supported by score603e |
---|
137 | @exit 1 |
---|
138 | endef |
---|
139 | else |
---|
140 | define make-exe |
---|
141 | $(CC) $(CPPFLAGS) $(CFLAGS) \ |
---|
142 | -o $(basename $@).elf $(LINK_OBJS) $(LINK_LIBS) |
---|
143 | $(NM) -g -n $(basename $@).elf > $(basename $@).num |
---|
144 | $(SIZE) $(basename $@).elf |
---|
145 | $(OBJCOPY) -O srec $(basename $@).elf $(basename $@).s1 |
---|
146 | sed -e 's/.$$//' $(basename $@).s1 | \ |
---|
147 | $(PACKHEX) >$(basename $@).exe |
---|
148 | rm -f $(basename $@).s1 |
---|
149 | endef |
---|
150 | endif |
---|
151 | |
---|
152 | # Miscellaneous additions go here |
---|
153 | |
---|
154 | # No start file |
---|
155 | START_BASE= |
---|
156 | |
---|
157 | DRIVER_ARCHITECTURE=vmebus |
---|