1 | # |
---|
2 | # Config file for a "generic 68360" BSP |
---|
3 | # |
---|
4 | # $Id$ |
---|
5 | # |
---|
6 | |
---|
7 | RTEMS_CPU=m68k |
---|
8 | |
---|
9 | ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes) |
---|
10 | TARGET_ARCH=o-gen68360_040 |
---|
11 | RTEMS_CPU_MODEL=m68040 |
---|
12 | else |
---|
13 | TARGET_ARCH=o-gen68360 |
---|
14 | RTEMS_CPU_MODEL=m68360 |
---|
15 | endif |
---|
16 | |
---|
17 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
18 | |
---|
19 | # This is the actual bsp directory used during the build process. |
---|
20 | RTEMS_BSP_FAMILY=gen68360 |
---|
21 | |
---|
22 | ## Target compiler config file, if any |
---|
23 | CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg |
---|
24 | |
---|
25 | # We may install in a CPU model based directory but this is still |
---|
26 | # a gen68360 based bsp. |
---|
27 | RTEMS_BSP=gen68360 |
---|
28 | |
---|
29 | # |
---|
30 | # mc68360 notes: |
---|
31 | # If your version of gcc supports the -mcpu32 option use the top |
---|
32 | # version, otherwise use the bottom set of flags to accomplish the |
---|
33 | # same thing. |
---|
34 | # |
---|
35 | # NOTE: Before binutils 2.6, the -mcpu32 flag was not available |
---|
36 | # if your gas does understand this, then use the alternative. |
---|
37 | |
---|
38 | ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes) |
---|
39 | CPU_CFLAGS= -m68040 |
---|
40 | else |
---|
41 | #CPU_CFLAGS = -mcpu32 -msoft-float |
---|
42 | CPU_CFLAGS = -m68020 -mnobitfield -msoft-float |
---|
43 | # When using the -m68020 cpu flag, we need to explicitly define these |
---|
44 | CPU_DEFINES=-Dmcpu32 -D__mcpu32__ $(DEFINES) |
---|
45 | endif |
---|
46 | |
---|
47 | # optimize flag: typically -0, could use -O4 or -fast |
---|
48 | # -O4 is ok for RTEMS |
---|
49 | CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer |
---|
50 | |
---|
51 | # Override default start file |
---|
52 | START_BASE=start360 |
---|
53 | |
---|
54 | # This section makes the target dependent options file. |
---|
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 | # STACK_CHECKER_ON (RTEMS support code) |
---|
63 | # If defined, stack bounds checking is enabled. |
---|
64 | # |
---|
65 | # STACK_CHECKER_REPORT_USAGE (RTEMS support code) |
---|
66 | # If this and STACK_CHECKER_ON are defined, then a report on stack usage |
---|
67 | # per task is printed when the program exits. |
---|
68 | # |
---|
69 | # RTEMS_DEBUG (RTEMS) |
---|
70 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
71 | # |
---|
72 | |
---|
73 | define make-target-options |
---|
74 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
75 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
76 | @echo "/* #define STACK_CHECKER_ON 1 */" >>$@ |
---|
77 | @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@ |
---|
78 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
79 | endef |
---|
80 | |
---|
81 | # The following are definitions of make-exe which will work using ld as |
---|
82 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
83 | # will be able to override parts of the compilers specs and link using gcc. |
---|
84 | |
---|
85 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
86 | |
---|
87 | # override default location of Standard C Library |
---|
88 | LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libc.a |
---|
89 | LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libm.a |
---|
90 | |
---|
91 | ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes) |
---|
92 | RTEMS_GEN68360_EXTRA_LDFLAGS=--defsym RamSize=0x100000 |
---|
93 | else |
---|
94 | RTEMS_GEN68360_EXTRA_LDFLAGS= |
---|
95 | endif |
---|
96 | |
---|
97 | define make-exe |
---|
98 | $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \ |
---|
99 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
100 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
101 | $(SIZE) $(basename $@).exe |
---|
102 | endef |
---|
103 | else |
---|
104 | |
---|
105 | ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes) |
---|
106 | CFLAGS_LD=-Wl,--defsym -Wl,RamSize=0x100000 |
---|
107 | else |
---|
108 | CFLAGS_LD= |
---|
109 | endif |
---|
110 | |
---|
111 | define make-exe |
---|
112 | $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS) |
---|
113 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
114 | $(SIZE) $(basename $@).exe |
---|
115 | endef |
---|
116 | endif |
---|
117 | |
---|
118 | |
---|
119 | # Miscellaneous additions go here |
---|