1 | # |
---|
2 | # Config file for a Radstone Technology Plc. PowerPC 60x based VME board |
---|
3 | # |
---|
4 | # $Id: ppcn_60x.cfg |
---|
5 | # |
---|
6 | |
---|
7 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
8 | |
---|
9 | RTEMS_CPU=powerpc |
---|
10 | RTEMS_CPU_MODEL=mpc750 |
---|
11 | |
---|
12 | # This is the actual bsp directory used during the build process. |
---|
13 | RTEMS_BSP_FAMILY=mcp750 |
---|
14 | |
---|
15 | # This section makes the target dependent options file. |
---|
16 | |
---|
17 | # NDEBUG (C library) |
---|
18 | # if defined asserts do not generate code. This is commonly used |
---|
19 | # as a command line option. |
---|
20 | # |
---|
21 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
22 | # do not pause between screens of output in the rtems tests |
---|
23 | # |
---|
24 | # RTEMS_DEBUG (RTEMS) |
---|
25 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
26 | # |
---|
27 | # PPCN_60X_USE_DINK (ppcn_60x_bsp) |
---|
28 | # PPCN_60X_USE_NONE (ppcn_60x_bsp) |
---|
29 | # The Score603e board can be configured with 3 ROM monitors. Only two |
---|
30 | # are appropriate for use with RTEMS. Set exactly one of these to "1" |
---|
31 | # to indicate which ROM monitor is on the board you are using. |
---|
32 | # |
---|
33 | # PPC_VECTOR_FILE_BASE (ppc) |
---|
34 | # This defines the base address of the exception table. |
---|
35 | # NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 |
---|
36 | # |
---|
37 | # PPC_ABI (ppc) |
---|
38 | # This defines the calling convention (Application Binary Interface) |
---|
39 | # used in this configuration. EABI is the only one supported. |
---|
40 | # |
---|
41 | # PPC_ASM (ppc) |
---|
42 | # This defines the assembly language format used in this configuration. |
---|
43 | # ELF is the only one supported. |
---|
44 | # |
---|
45 | # PPC_USE_SPRG (RTEMS PowerPC port) |
---|
46 | # If defined, then the PowerPC specific code in RTEMS will use some |
---|
47 | # of the special purpose registers to slightly optimize interrupt |
---|
48 | # response time. The use of these registers can conflict with |
---|
49 | # other tools like debuggers. |
---|
50 | # |
---|
51 | # PPC_USE_DATA_CACHE (RTEMS PowerPC port) |
---|
52 | # If defined, then the PowerPC specific code in RTEMS will use |
---|
53 | # data cache instructions to optimize the context switch code. |
---|
54 | # This code can conflict with debuggers or emulators. |
---|
55 | # |
---|
56 | |
---|
57 | define make-target-options |
---|
58 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
59 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
60 | @echo "#define STACK_CHECKER_ON 1" >>$@ |
---|
61 | @echo "#define STACK_CHECKER_REPORT_USAGE 1" >>$@ |
---|
62 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
63 | @echo "#define PPCN_60X_USE_DINK 0" >>$@ |
---|
64 | @echo "#define PPCN_60X_USE_NONE 1" >>$@ |
---|
65 | @echo "#define PPC_USE_DATA_CACHE 1" >>$@ |
---|
66 | @echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@ |
---|
67 | @echo "#define PPC_ABI PPC_ABI_EABI" >>$@ |
---|
68 | @echo "#define PPC_ASM PPC_ASM_ELF" >>$@ |
---|
69 | @echo "#define PPC_USE_SPRG 1" >>$@ |
---|
70 | endef |
---|
71 | |
---|
72 | # This contains the compiler options necessary to select the CPU model |
---|
73 | # and (hopefully) optimize for it. |
---|
74 | # |
---|
75 | # NOTE : cheking egcc 1.1.1 source code shows that the last know processor |
---|
76 | # is the 604 model and that this is the default generation option. |
---|
77 | # |
---|
78 | # CPU_CFLAGS = -mcpu=750 |
---|
79 | |
---|
80 | # optimize flag: typically -0, could use -O4 or -fast |
---|
81 | # -O4 is ok for RTEMS |
---|
82 | # NOTE2: some level of -O may be actually required by inline assembler (at least |
---|
83 | # -O2 so far. |
---|
84 | # NOTE2 Apparently nobody really knows the status or r2 and r13. |
---|
85 | # As far as I know, small data are pointer impose a very specific compliation |
---|
86 | # model => not used. |
---|
87 | # Currently the sdata2 and sbss2 sections are empty => r2 is not used... |
---|
88 | CFLAGS_OPTIMIZE_V=-O2 -fno-keep-inline-functions -fvolatile-global -fvolatile -mstrict-align -mcpu=750 |
---|
89 | #CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -fvolatile-global -fvolatile -mstrict-align -mcpu=750 |
---|
90 | |
---|
91 | # The following is a ld command file which works without using the |
---|
92 | # -specs system in gcc 2.8. IT HAS NEVER BEEN TESTED WITH THIS BSP!!! |
---|
93 | # $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ |
---|
94 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
95 | # $(LD) $(XLDFLAGS) -Ttext 0x20000 \ |
---|
96 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
97 | |
---|
98 | # $(CC) -mmvme -mrtems -nostartfiles -mcpu=603 \ |
---|
99 | # -o $(basename $@).exe -L $(PROJECT_RELEASE)/lib \ |
---|
100 | # $(START_FILE) $(LINK_OBJS) \ |
---|
101 | # $(LD_LIBS) \ |
---|
102 | # -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\) |
---|
103 | define make-exe |
---|
104 | $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS) |
---|
105 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
106 | $(SIZE) $(basename $@).exe |
---|
107 | $(CP) $(basename $@).exe $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/mcp750/bootloader/$(ARCH); \ |
---|
108 | cd $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/mcp750/bootloader; \ |
---|
109 | make bootloader BINARY_LOADED=$(basename $@).exe; \ |
---|
110 | COMPLETE_FILE_NAME=$(basename $@).exe ;\ |
---|
111 | echo $${COMPLETE_FILE_NAME} ;\ |
---|
112 | FILE_NAME=`basename $${COMPLETE_FILE_NAME}` ;\ |
---|
113 | echo $${FILE_NAME} ;\ |
---|
114 | mkdir -p $(PROJECT_ROOT)/$(RTEMS_BSP)/bin ;\ |
---|
115 | $(CP) bootloader $(PROJECT_ROOT)/$(RTEMS_BSP)/bin/$${FILE_NAME} |
---|
116 | endef |
---|
117 | |
---|
118 | # Miscellaneous additions go here |
---|
119 | |
---|
120 | # No start file |
---|
121 | START_BASE= |
---|
122 | |
---|
123 | # Let the HWAPI know which set of drivers to build |
---|
124 | DRIVER_ARCHITECTURE=vmebus |
---|