1 | # |
---|
2 | # Config file for a "generic 68340" BSP |
---|
3 | # |
---|
4 | # $Id$ |
---|
5 | # |
---|
6 | |
---|
7 | RTEMS_CPU=m68k |
---|
8 | |
---|
9 | RTEMS_CPU_MODEL=mcpu32 |
---|
10 | |
---|
11 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
12 | |
---|
13 | # This is the actual bsp directory used during the build process. |
---|
14 | RTEMS_BSP_FAMILY=gen68340 |
---|
15 | |
---|
16 | CPU_CFLAGS = -mcpu32 |
---|
17 | |
---|
18 | # optimize flag: typically -0, could use -O4 or -fast |
---|
19 | # -O4 is ok for RTEMS |
---|
20 | CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer |
---|
21 | |
---|
22 | # Override default start file |
---|
23 | START_BASE=start340 |
---|
24 | |
---|
25 | # This section makes the target dependent options file. |
---|
26 | # NDEBUG (C library) |
---|
27 | # if defined asserts do not generate code. This is commonly used |
---|
28 | # as a command line option. |
---|
29 | # |
---|
30 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
31 | # do not pause between screens of output in the rtems tests |
---|
32 | # |
---|
33 | # STACK_CHECKER_ON (RTEMS support code) |
---|
34 | # If defined, stack bounds checking is enabled. |
---|
35 | # |
---|
36 | # STACK_CHECKER_REPORT_USAGE (RTEMS support code) |
---|
37 | # If this and STACK_CHECKER_ON are defined, then a report on stack usage |
---|
38 | # per task is printed when the program exits. |
---|
39 | # |
---|
40 | # RTEMS_DEBUG (RTEMS) |
---|
41 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
42 | # |
---|
43 | |
---|
44 | define make-target-options |
---|
45 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
46 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
47 | @echo "/* #define STACK_CHECKER_ON 1 */" >>$@ |
---|
48 | @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@ |
---|
49 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
50 | endef |
---|
51 | |
---|
52 | # The following are definitions of make-exe which will work using ld as |
---|
53 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
54 | # will be able to override parts of the compilers specs and link using gcc. |
---|
55 | |
---|
56 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
57 | |
---|
58 | # override default location of Standard C Library |
---|
59 | LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libc.a |
---|
60 | LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libm.a |
---|
61 | |
---|
62 | define make-exe |
---|
63 | @ echo |
---|
64 | @ echo "WARNING: newlib may use bit test instructions!!" |
---|
65 | @ echo |
---|
66 | $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \ |
---|
67 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
68 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
69 | $(SIZE) $(basename $@).exe |
---|
70 | endef |
---|
71 | else |
---|
72 | |
---|
73 | define make-exe |
---|
74 | $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \ |
---|
75 | -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) |
---|
76 | $(NM) -g -n $(basename $@).exe > $(basename $@).num |
---|
77 | $(SIZE) $(basename $@).exe |
---|
78 | # if you want to make a prom image |
---|
79 | # m68k-rtems-objcopy --adjust-section-vma \ |
---|
80 | # .data=`m68k-rtems-objdump --section-headers $(basename $@).exe | \ |
---|
81 | # awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \ |
---|
82 | # for (p=digits; p>0; p--) \ |
---|
83 | # s += (16^(p-1)) * ( index("0123456789ABCDEF",\ |
---|
84 | # substr(x,1+digits-p,1)) -1 );\ |
---|
85 | # return s } ;\ |
---|
86 | # /\.text/ { base = $$4 ; size = $$3 };\ |
---|
87 | # END { printf("0x%x", h2d(base) + h2d(size)) }'\ |
---|
88 | # ` $(basename $@).exe |
---|
89 | # if you want to convert it to ieee |
---|
90 | # m68k-rtems-objcopy --output-target=ieee --debugging \ |
---|
91 | # $(basename $@).exe $(basename $@).ieee |
---|
92 | endef |
---|
93 | endif |
---|
94 | |
---|
95 | |
---|
96 | # Miscellaneous additions go here |
---|