1 | # |
---|
2 | # Config file for the mvme162 BSP |
---|
3 | # |
---|
4 | # $Id$ |
---|
5 | # |
---|
6 | |
---|
7 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
8 | |
---|
9 | RTEMS_CPU=m68k |
---|
10 | |
---|
11 | ifeq ($(RTEMS_MVME162_MODEL),mvme162lx) |
---|
12 | |
---|
13 | TARGET_ARCH=o-mvme162lx |
---|
14 | RTEMS_CPU_MODEL=m68lc040 |
---|
15 | |
---|
16 | else |
---|
17 | ifeq ($(RTEMS_MVME162_MODEL),) |
---|
18 | |
---|
19 | RTEMS_MVME162_MODEL=mvme162 |
---|
20 | TARGET_ARCH=o-mvme162 |
---|
21 | RTEMS_CPU_MODEL=m68040 |
---|
22 | |
---|
23 | endif # mvme162 - mc68040 |
---|
24 | endif # mvme162lx - mc68lc040 |
---|
25 | |
---|
26 | # This is the actual bsp directory used during the build process. |
---|
27 | RTEMS_BSP_FAMILY=mvme162 |
---|
28 | |
---|
29 | # We may install in a CPU model based directory but this is still |
---|
30 | # a mvme162 based bsp. |
---|
31 | RTEMS_BSP=mvme162 |
---|
32 | |
---|
33 | # This contains the compiler options necessary to select the CPU model |
---|
34 | # and (hopefully) optimize for it. |
---|
35 | # |
---|
36 | |
---|
37 | ifeq ($(RTEMS_CPU_MODEL),m68040) |
---|
38 | CPU_CFLAGS = -m68040 |
---|
39 | else |
---|
40 | ifeq ($(RTEMS_CPU_MODEL),m68lc040) |
---|
41 | CPU_CFLAGS = -m68040 -msoft-float |
---|
42 | endif # mc68040 |
---|
43 | endif # mc68lc040 |
---|
44 | |
---|
45 | # optimize flag: typically -0, could use -O4 or -fast |
---|
46 | # -O4 is ok for RTEMS |
---|
47 | CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer |
---|
48 | |
---|
49 | # This target does NOT support the TCP/IP stack so ignore requests |
---|
50 | # to enable it. |
---|
51 | HAS_NETWORKING=no |
---|
52 | |
---|
53 | # This section makes the target dependent options file. |
---|
54 | |
---|
55 | # NDEBUG (C library) |
---|
56 | # if defined asserts do not generate code. This is commonly used |
---|
57 | # as a command line option. |
---|
58 | # |
---|
59 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
60 | # do not pause between screens of output in the rtems tests |
---|
61 | # |
---|
62 | # NO_TABLE_MOVE (SPARC PORT) |
---|
63 | # do not have a second trap table -- use the BSP's |
---|
64 | # |
---|
65 | # RTEMS_DEBUG (RTEMS) |
---|
66 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
67 | |
---|
68 | define make-target-options |
---|
69 | @echo "#undef $(RTEMS_MVME162_MODEL)" >>$@ |
---|
70 | @echo "#define $(RTEMS_MVME162_MODEL)" >>$@ |
---|
71 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
72 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
73 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
74 | endef |
---|
75 | |
---|
76 | # The following are definitions of make-exe which will work using ld as |
---|
77 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
78 | # will be able to override parts of the compilers specs and link using gcc. |
---|
79 | |
---|
80 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
81 | |
---|
82 | ifeq ($(RTEMS_CPU_MODEL),m68lc040) |
---|
83 | # override default location of Standard C Library |
---|
84 | LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/msoft-float/libc.a |
---|
85 | LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/msoft-float/libm.a |
---|
86 | endif # mc68lc040 |
---|
87 | |
---|
88 | define make-exe |
---|
89 | $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \ |
---|
90 | $(START_FILE) $(LINK_OBJS) \ |
---|
91 | --start-group $(LINK_LIBS) --end-group |
---|
92 | $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i |
---|
93 | $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \ |
---|
94 | $(PACKHEX) > $(basename $@).exe |
---|
95 | $(NM) -g -n $(basename $@).nxe > $(basename $@).num |
---|
96 | $(SIZE) $(basename $@).nxe |
---|
97 | endef |
---|
98 | else |
---|
99 | define make-exe |
---|
100 | $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS) \ |
---|
101 | $(LINK_LIBS) |
---|
102 | $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i |
---|
103 | $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \ |
---|
104 | $(PACKHEX) > $(basename $@).exe |
---|
105 | $(NM) -g -n $(basename $@).nxe > $(basename $@).num |
---|
106 | $(SIZE) $(basename $@).nxe |
---|
107 | endef |
---|
108 | endif |
---|
109 | |
---|
110 | # Miscellaneous additions go here |
---|
111 | |
---|
112 | # BSP-specific tools |
---|
113 | SLOAD=$(PROJECT_TOOLS)/sload |
---|