[19ca797] | 1 | # |
---|
| 2 | # Config file for the PowerPC 60x simulator - mvme2307 |
---|
| 3 | # |
---|
| 4 | # $Id$ |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
| 8 | |
---|
| 9 | RTEMS_CPU=powerpc |
---|
| 10 | RTEMS_CPU_MODEL=ppc604 |
---|
| 11 | |
---|
| 12 | # This is the actual bsp directory used during the build process. |
---|
| 13 | RTEMS_BSP_FAMILY=mvme2307 |
---|
| 14 | |
---|
| 15 | # This section makes the target dependent options file. |
---|
| 16 | |
---|
| 17 | # NDEBUG (C library) |
---|
| 18 | # if defined asserts do not generate code. This is commonly used |
---|
| 19 | # as a command line option. |
---|
| 20 | # |
---|
| 21 | # RTEMS_TEST_NO_PAUSE (RTEMS tests) |
---|
| 22 | # do not pause between screens of output in the rtems tests |
---|
| 23 | # |
---|
| 24 | # RTEMS_DEBUG (RTEMS) |
---|
| 25 | # If defined, debug checks in RTEMS and support library code are enabled. |
---|
| 26 | # |
---|
| 27 | # CONSOLE_USE_POLLED (mvme2307_bsp) |
---|
| 28 | # CONSOLE_USE_INTERRUPTS (mvme2307_bsp) |
---|
| 29 | # The mvme2307 console driver has the structure to operate in either |
---|
| 30 | # polled or interrupt mode. However both modes only trap to the |
---|
| 31 | # monitor currently. |
---|
| 32 | # |
---|
| 33 | # PPC_VECTOR_FILE_BASE (PowerPC) |
---|
| 34 | # This defines the base address of the exception table. |
---|
| 35 | # NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 |
---|
| 36 | # |
---|
| 37 | # PPC_ABI (PowerPC) |
---|
| 38 | # This defines the calling convention (Application Binary Interface) |
---|
| 39 | # used in this configuration. EABI is the only one supported. |
---|
| 40 | # |
---|
| 41 | # PPC_ASM (PowerPC) |
---|
| 42 | # This defines the assembly language format used in this configuration. |
---|
| 43 | # ELF is the only one supported. |
---|
| 44 | # |
---|
| 45 | # PPC_USE_SPRG (RTEMS PowerPC port) |
---|
| 46 | # If defined, then the PowerPC specific code in RTEMS will use some |
---|
| 47 | # of the special purpose registers to slightly optimize interrupt |
---|
| 48 | # response time. The use of these registers can conflict with |
---|
| 49 | # other tools like debuggers. |
---|
| 50 | # |
---|
| 51 | |
---|
| 52 | define make-target-options |
---|
| 53 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
| 54 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
| 55 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
| 56 | @echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@ |
---|
| 57 | @echo "#define CONSOLE_USE_POLLED !CONSOLE_USE_INTERRUPTS" >>$@ |
---|
| 58 | @echo "#define PPC_VECTOR_FILE_BASE 0x00000100" >>$@ |
---|
| 59 | @echo "#define PPC_ABI PPC_ABI_EABI" >>$@ |
---|
| 60 | @echo "#define PPC_ASM PPC_ASM_ELF" >>$@ |
---|
| 61 | @echo "#define PPC_USE_SPRG 0" >>$@ |
---|
| 62 | endef |
---|
| 63 | |
---|
| 64 | # This contains the compiler options necessary to select the CPU model |
---|
| 65 | # and (hopefully) optimize for it. |
---|
| 66 | # |
---|
| 67 | CPU_CFLAGS = -mcpu=604 |
---|
| 68 | |
---|
| 69 | # optimize flag: typically -0, could use -O4 or -fast |
---|
| 70 | # -O4 is ok for RTEMS |
---|
| 71 | # NOTE: some level of -O may be actually required by inline assembler |
---|
| 72 | CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions |
---|
| 73 | |
---|
| 74 | # The following is a linkcmds file which will work without using the |
---|
| 75 | # -specs system in gcc 2.8. |
---|
| 76 | # $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ |
---|
| 77 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
| 78 | # $(LD) $(XLDFLAGS) -Ttext 0x20000 \ |
---|
| 79 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
| 80 | |
---|
| 81 | # $(CC) -mmvme -mrtems -nostartfiles -mcpu=603 \ |
---|
| 82 | # -o $(basename $@).exe -L $(PROJECT_RELEASE)/lib \ |
---|
| 83 | # $(START_FILE) $(LINK_OBJS) \ |
---|
| 84 | # $(LD_LIBS) \ |
---|
| 85 | # -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\) |
---|
| 86 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
| 87 | define make-exe |
---|
| 88 | $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) |
---|
| 89 | $(NM) -g -n $@ > $(basename $@).num |
---|
| 90 | $(SIZE) $@ |
---|
| 91 | endef |
---|
| 92 | else |
---|
| 93 | define make-exe |
---|
| 94 | $(CC) $(CFLAGS) -o $(basename $@).exe \ |
---|
| 95 | $(LINK_OBJS) $(LINK_LIBS) |
---|
| 96 | $(NM) -g -n $@ > $(basename $@).num |
---|
| 97 | $(SIZE) $@ |
---|
| 98 | endef |
---|
| 99 | endif |
---|
| 100 | |
---|
| 101 | # Miscellaneous additions go here |
---|
| 102 | |
---|
| 103 | # No start file |
---|
| 104 | START_BASE= |
---|