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 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
41 | # do not pause between screens of output in the rtems tests |
---|
42 | # |
---|
43 | |
---|
44 | define make-target-options |
---|
45 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
46 | endef |
---|
47 | |
---|
48 | # The following are definitions of make-exe which will work using ld as |
---|
49 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
50 | # will be able to override parts of the compilers specs and link using gcc. |
---|
51 | |
---|
52 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
53 | |
---|
54 | # override default location of Standard C Library |
---|
55 | LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/libc.a |
---|
56 | LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/libm.a |
---|
57 | |
---|
58 | define make-exe |
---|
59 | $(LD) $(LDFLAGS) -N -Ttext $(ROM_BASE) \ |
---|
60 | -defsym MC68302_BASE=$(MC68302_BASE) \ |
---|
61 | -T $(LINKCMDS) -o $(basename $@).exe \ |
---|
62 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
63 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
64 | $(SIZE) $(basename $@).exe |
---|
65 | endef |
---|
66 | else |
---|
67 | define make-exe |
---|
68 | $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \ |
---|
69 | -Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \ |
---|
70 | -o $@ \ |
---|
71 | $(LINK_OBJS) $(LINK_LIBS) |
---|
72 | $(NM) -g -n $@ > $(basename $@).num |
---|
73 | $(SIZE) $@ |
---|
74 | endef |
---|
75 | endif |
---|
76 | # Miscellaneous additions go here |
---|
77 | |
---|
78 | ifeq "$(strip $(BSP_VARIANT))" "" |
---|
79 | BSP_VARIANT=bare |
---|
80 | MC68302_BASE=0x00700000 |
---|
81 | RAM_BASE=0x00000000 |
---|
82 | RAM_SIZE=0x00100000 |
---|
83 | |
---|
84 | ifeq ($(RTEMS_DEBUGGER),yes) |
---|
85 | ROM_BASE=0x00010000 |
---|
86 | LINKCMDS=$(PROJECT_RELEASE)/lib/debugrom |
---|
87 | else |
---|
88 | ROM_BASE=0x00C00000 |
---|
89 | LINKCMDS=$(PROJECT_RELEASE)/lib/rom |
---|
90 | endif |
---|
91 | |
---|
92 | ROM_SIZE=0x00100000 |
---|
93 | |
---|
94 | else |
---|
95 | |
---|
96 | # pattern match the variant to set the memory map |
---|
97 | |
---|
98 | endif |
---|