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