[5d02459] | 1 | # |
---|
| 2 | # Config file for the mvme167 BSP |
---|
| 3 | # |
---|
| 4 | # $Id$ |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | RTEMS_CPU=m68k |
---|
| 8 | RTEMS_CPU_MODEL=m68040 |
---|
| 9 | |
---|
[7d7b2a3] | 10 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
| 11 | |
---|
[5d02459] | 12 | # This is the actual bsp directory used during the build process. |
---|
| 13 | RTEMS_BSP_FAMILY=mvme167 |
---|
| 14 | |
---|
| 15 | # |
---|
| 16 | # This contains the compiler options necessary to select the CPU model |
---|
| 17 | # and (hopefully) optimize for it. |
---|
| 18 | # |
---|
| 19 | |
---|
| 20 | CPU_CFLAGS = -m68040 |
---|
| 21 | |
---|
| 22 | # optimize flag: typically -O, could use -O4 or -fast |
---|
| 23 | # -O4 is ok for RTEMS |
---|
| 24 | CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer |
---|
| 25 | |
---|
[7d7b2a3] | 26 | # This target does NOT support the TCP/IP stack (yet) so ignore requests |
---|
[5d02459] | 27 | # to enable it. |
---|
| 28 | HAS_NETWORKING=no |
---|
| 29 | |
---|
| 30 | # This section makes the target dependent options file. |
---|
| 31 | # NDEBUG (C library) |
---|
| 32 | # if defined asserts do not generate code. This is commonly used |
---|
| 33 | # as a command line option. |
---|
| 34 | # |
---|
| 35 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
| 36 | # do not pause between screens of output in the rtems tests |
---|
| 37 | # |
---|
| 38 | # RTEMS_DEBUG (RTEMS) |
---|
| 39 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
| 40 | |
---|
| 41 | define make-target-options |
---|
| 42 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
| 43 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
| 44 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
| 45 | endef |
---|
| 46 | |
---|
| 47 | # Here is the rule to actually build a $(ARCH)/foo.exe |
---|
| 48 | # It also builds $(ARCH)/foo.nm |
---|
| 49 | # Usage ref: src/tests/sptest/sp1/Makefile |
---|
| 50 | # |
---|
| 51 | # We use TFTP to transfer files to the MVME167. We generate binary files |
---|
| 52 | # rather than S-records. We skip the header during downloads. |
---|
| 53 | |
---|
| 54 | # The following are definitions of make-exe which will work using ld as |
---|
| 55 | # is currently required. It is expected that as of gcc 2.8, the end user |
---|
| 56 | # will be able to override parts of the compilers specs and link using gcc. |
---|
| 57 | |
---|
| 58 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
[7d7b2a3] | 59 | |
---|
| 60 | # The MC68040 does not implement all MC68881/MC68882 instructions, so use |
---|
| 61 | # either the gcc floating-point software support (msoft-float libraries), or |
---|
| 62 | # use the Motorola FPSP floating-point emulator in |
---|
| 63 | # rtems/c/src/lib/libcpu/m68k/m68040/fpsp |
---|
| 64 | # The default is to use the FPSP. |
---|
| 65 | # To use the msoft-float libraries, uncomment the three lines below. |
---|
| 66 | # You then should comment the M68KFPSPInstallExceptionHandlers() statement |
---|
| 67 | # in rtems/c/src/lib/libbsp/m68k/mvme167/startup/bststart.c in bsp_start(). |
---|
| 68 | # Floating-point support will then be limited. See the mvme167 README file |
---|
| 69 | # for more details. |
---|
| 70 | |
---|
| 71 | # LIBC_LIBC = $(RTEMS_LIBC_DIR)/lib/msoft-float/libc.a |
---|
| 72 | # LIBC_LIBM = $(RTEMS_LIBC_DIR)/lib/msoft-float/libm.a |
---|
| 73 | # LIBGCC = $(shell $(CC) -msoft-float -print-libgcc-file-name) |
---|
| 74 | |
---|
[5d02459] | 75 | define make-exe |
---|
| 76 | $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \ |
---|
| 77 | $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group |
---|
| 78 | $(NM) -g -n $(basename $@).exe > $(basename $@).nm |
---|
| 79 | $(SIZE) $(basename $@).exe |
---|
| 80 | endef |
---|
| 81 | else |
---|
| 82 | define make-exe |
---|
| 83 | $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \ |
---|
| 84 | $(LINK_OBJS) $(LINK_LIBS) |
---|
| 85 | $(NM) -g -n $(basename $@).exe > $(basename $@).nm |
---|
| 86 | $(SIZE) $(basename $@).exe |
---|
| 87 | endef |
---|
| 88 | endif |
---|
| 89 | |
---|
| 90 | # Miscellaneous additions go here |
---|