1 | # |
---|
2 | # Config file for a "ODS 68302" BSP |
---|
3 | # |
---|
4 | # Differs from the gen68302 by providing most of the boot code as C |
---|
5 | # code. This allows separate board definitions to be based on C |
---|
6 | # header files. The file is based on the VARIANT defined. |
---|
7 | # |
---|
8 | # $Id$ |
---|
9 | # |
---|
10 | |
---|
11 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
12 | |
---|
13 | RTEMS_CPU=m68k |
---|
14 | RTEMS_CPU_MODEL=m68302 |
---|
15 | |
---|
16 | # This is the actual bsp directory used during the build process. |
---|
17 | RTEMS_BSP_FAMILY=ods68302 |
---|
18 | |
---|
19 | # |
---|
20 | # This contains the compiler options necessary to select the CPU model |
---|
21 | # and (hopefully) optimize for it. |
---|
22 | # |
---|
23 | # 68000+softfloat results in gcc 2.95.2 giving default libraries. |
---|
24 | # CPU_CFLAGS = -m68302 -msoft-float |
---|
25 | CPU_CFLAGS = -m68302 |
---|
26 | CPU_DEFINES = \ |
---|
27 | -DVARIANT=$(BSP_VARIANT) -DMC68302_BASE=$(MC68302_BASE) \ |
---|
28 | -DRAM_BASE=$(RAM_BASE) -DRAM_SIZE=$(RAM_SIZE) \ |
---|
29 | -DROM_BASE=$(ROM_BASE) -DROM_SIZE=$(ROM_SIZE) |
---|
30 | |
---|
31 | # optimize flag: typically -0, could use -O4 or -fast |
---|
32 | # -O4 is ok for RTEMS |
---|
33 | CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer |
---|
34 | |
---|
35 | # debugging please |
---|
36 | CFLAGS_DEBUG_V = |
---|
37 | |
---|
38 | # This section makes the target dependent options file. |
---|
39 | |
---|
40 | # NDEBUG (C library) |
---|
41 | # if defined asserts do not generate code. This is commonly used |
---|
42 | # as a command line option. |
---|
43 | # |
---|
44 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
45 | # do not pause between screens of output in the rtems tests |
---|
46 | # |
---|
47 | # RTEMS_DEBUG (RTEMS) |
---|
48 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
49 | |
---|
50 | define make-target-options |
---|
51 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
52 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
53 | @echo "#define RTEMS_DEBUG 1" >>$@ |
---|
54 | endef |
---|
55 | |
---|
56 | # The following are definitions of make-exe which will work using ld as |
---|
57 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
58 | # will be able to override parts of the compilers specs and link using gcc. |
---|
59 | |
---|
60 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
61 | |
---|
62 | # override default location of Standard C Library |
---|
63 | LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/libc.a |
---|
64 | LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/libm.a |
---|
65 | |
---|
66 | define make-exe |
---|
67 | $(LD) $(LDFLAGS) -N -Ttext $(ROM_BASE) \ |
---|
68 | -defsym MC68302_BASE=$(MC68302_BASE) \ |
---|
69 | -T $(LINKCMDS) -o $(basename $@).exe \ |
---|
70 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
71 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
72 | $(SIZE) $(basename $@).exe |
---|
73 | endef |
---|
74 | else |
---|
75 | define make-exe |
---|
76 | $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \ |
---|
77 | -Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \ |
---|
78 | -o $@ \ |
---|
79 | $(LINK_OBJS) $(LINK_LIBS) |
---|
80 | $(NM) -g -n $@ > $(basename $@).num |
---|
81 | $(SIZE) $@ |
---|
82 | endef |
---|
83 | define make-cxx-exe |
---|
84 | $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \ |
---|
85 | -Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \ |
---|
86 | -o $@ \ |
---|
87 | $(LINK_OBJS) $(LINK_LIBS) |
---|
88 | $(NM) -g -n $@ > $(basename $@).num |
---|
89 | $(SIZE) $@ |
---|
90 | endef |
---|
91 | endif |
---|
92 | # Miscellaneous additions go here |
---|
93 | |
---|
94 | ifeq "$(strip $(BSP_VARIANT))" "" |
---|
95 | BSP_VARIANT=bare |
---|
96 | MC68302_BASE=0x00700000 |
---|
97 | RAM_BASE=0x00000000 |
---|
98 | RAM_SIZE=0x00100000 |
---|
99 | |
---|
100 | ifeq ($(RTEMS_DEBUGGER),yes) |
---|
101 | ROM_BASE=0x00010000 |
---|
102 | LINKCMDS=$(PROJECT_RELEASE)/lib/debugrom |
---|
103 | else |
---|
104 | ROM_BASE=0x00C00000 |
---|
105 | LINKCMDS=$(PROJECT_RELEASE)/lib/rom |
---|
106 | endif |
---|
107 | |
---|
108 | ROM_SIZE=0x00100000 |
---|
109 | |
---|
110 | else |
---|
111 | |
---|
112 | # pattern match the variant to set the memory map |
---|
113 | |
---|
114 | endif |
---|