1 | # |
---|
2 | # Config file for MPC860 based Ethernet Comm Board |
---|
3 | # |
---|
4 | # $Id$ |
---|
5 | # |
---|
6 | |
---|
7 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
8 | |
---|
9 | RTEMS_CPU=powerpc |
---|
10 | RTEMS_CPU_MODEL=mpc8xx |
---|
11 | CPU_TYPE=860 |
---|
12 | |
---|
13 | # This is the actual bsp directory used during the build process. |
---|
14 | RTEMS_BSP_FAMILY=eth_comm |
---|
15 | |
---|
16 | CPU_DEFINES= |
---|
17 | |
---|
18 | # This section makes the target dependent options file. |
---|
19 | |
---|
20 | # PPC_VECTOR_FILE_BASE (PowerPC) |
---|
21 | # This defines the base address of the exception table. |
---|
22 | # NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 |
---|
23 | # |
---|
24 | # PPC_ABI (PowerPC) |
---|
25 | # This defines the calling convention (Application Binary Interface) |
---|
26 | # used in this configuration. EABI is the only one supported. |
---|
27 | # This BSP was initially developed using the PowerOpen ABI. |
---|
28 | # |
---|
29 | # PPC_ASM (PowerPC) |
---|
30 | # This defines the assembly language format used in this configuration. |
---|
31 | # ELF is the only one supported. |
---|
32 | # |
---|
33 | # PPC_USE_SPRG (RTEMS PowerPC port) |
---|
34 | # If defined (=1), then the PowerPC specific code in RTEMS will use some |
---|
35 | # of the special purpose registers to slightly optimize interrupt |
---|
36 | # response time. The use of these registers can conflict with |
---|
37 | # other tools like debuggers. |
---|
38 | |
---|
39 | define make-target-options |
---|
40 | @echo "#ifdef mpc$(CPU_TYPE)" >>$@ |
---|
41 | @echo "#undef mpc$(CPU_TYPE)" >>$@ |
---|
42 | @echo "#endif" >>$@ |
---|
43 | @echo "#define mpc$(CPU_TYPE) 1" >>$@ |
---|
44 | @echo >>$@ |
---|
45 | @echo "#define PPC_VECTOR_FILE_BASE 0x0000" >>$@ |
---|
46 | @echo "#define PPC_ABI PPC_ABI_EABI" >>$@ |
---|
47 | @echo "#define PPC_ASM PPC_ASM_ELF" >>$@ |
---|
48 | @echo "#define PPC_USE_SPRG 1" >>$@ |
---|
49 | endef |
---|
50 | |
---|
51 | # This contains the compiler options necessary to select the CPU model |
---|
52 | # and (hopefully) optimize for it. |
---|
53 | # |
---|
54 | CPU_CFLAGS = -mcpu=$(CPU_TYPE) |
---|
55 | |
---|
56 | # optimize flag: typically -0, could use -O4 or -fast |
---|
57 | # -O4 is ok for RTEMS |
---|
58 | # NOTE: some level of -O may be actually required by inline assembler |
---|
59 | CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions |
---|
60 | |
---|
61 | # The following are definitions of make-exe which will work using ld as |
---|
62 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
63 | # will be able to override parts of the compilers specs and link using gcc. |
---|
64 | |
---|
65 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
66 | # The --defsym arguments define arguments which are required by the linkcmds |
---|
67 | # file which is designed for gcc 2.8 |
---|
68 | define make-exe |
---|
69 | $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ |
---|
70 | --defsym __fini=0 --defsym __init=0 \ |
---|
71 | -o $@ -u atexit -u __vectors -u download_entry \ |
---|
72 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
73 | $(NM) -g -n $@ > $(basename $@).num |
---|
74 | $(SIZE) $@ |
---|
75 | endef |
---|
76 | else |
---|
77 | define make-exe |
---|
78 | $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \ |
---|
79 | $(LINK_OBJS) $(LINK_LIBS) |
---|
80 | $(NM) -g -n $@ > $(basename $@).num |
---|
81 | $(SIZE) $@ |
---|
82 | endef |
---|
83 | endif |
---|
84 | |
---|
85 | # Miscellaneous additions go here |
---|
86 | |
---|