[b0562e74] | 1 | # |
---|
| 2 | # Config file for the PowerPC 60x simulator - psim |
---|
| 3 | # |
---|
| 4 | # $Id$ |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | include $(RTEMS_ROOT)/make/custom/default.cfg |
---|
| 8 | |
---|
| 9 | RTEMS_CPU=powerpc |
---|
| 10 | RTEMS_CPU_MODEL=ppc603e |
---|
| 11 | |
---|
| 12 | # This is the actual bsp directory used during the build process. |
---|
| 13 | RTEMS_BSP_FAMILY=psim |
---|
| 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 (psim_bsp) |
---|
| 28 | # CONSOLE_USE_INTERRUPTS (psim_bsp) |
---|
| 29 | # The psim 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 | # PSIM_FAST_IDLE (psim_bsp) |
---|
| 34 | # If defined, speed up the clock ticks while the idle task is running so |
---|
| 35 | # time spent in the idle task is minimized. This significantly reduces |
---|
| 36 | # the wall time required to execute the RTEMS test suites. |
---|
| 37 | # |
---|
[b938d3d4] | 38 | # PPC_VECTOR_FILE_BASE (PowerPC) |
---|
[b0562e74] | 39 | # This defines the base address of the exception table. |
---|
| 40 | # NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 |
---|
| 41 | # |
---|
[b938d3d4] | 42 | # PPC_ABI (PowerPC) |
---|
[b0562e74] | 43 | # This defines the calling convention (Application Binary Interface) |
---|
| 44 | # used in this configuration. EABI is the only one supported. |
---|
| 45 | # |
---|
[b938d3d4] | 46 | # PPC_ASM (PowerPC) |
---|
[b0562e74] | 47 | # This defines the assembly language format used in this configuration. |
---|
| 48 | # ELF is the only one supported. |
---|
| 49 | # |
---|
| 50 | # PPC_USE_SPRG (RTEMS PowerPC port) |
---|
| 51 | # If defined, then the PowerPC specific code in RTEMS will use some |
---|
| 52 | # of the special purpose registers to slightly optimize interrupt |
---|
| 53 | # response time. The use of these registers can conflict with |
---|
| 54 | # other tools like debuggers. |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | define make-target-options |
---|
| 59 | @echo "/* #define NDEBUG 1 */ " >>$@ |
---|
| 60 | @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ |
---|
| 61 | @echo "/* #define RTEMS_DEBUG 1 */" >>$@ |
---|
| 62 | @echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@ |
---|
| 63 | @echo "#define CONSOLE_USE_POLLED ~CONSOLE_USE_INTERRUPTS" >>$@ |
---|
| 64 | @echo "#define PSIM_FAST_IDLE 1" >>$@ |
---|
| 65 | @echo "#define PPC_VECTOR_FILE_BASE 0xFFF00100" >>$@ |
---|
| 66 | @echo "#define PPC_ABI PPC_ABI_EABI" >>$@ |
---|
| 67 | @echo "#define PPC_ASM PPC_ASM_ELF" >>$@ |
---|
| 68 | @echo "#define PPC_USE_SPRG 1" >>$@ |
---|
| 69 | endef |
---|
| 70 | |
---|
| 71 | # This contains the compiler options necessary to select the CPU model |
---|
| 72 | # and (hopefully) optimize for it. |
---|
| 73 | # |
---|
| 74 | CPU_CFLAGS = -mcpu=603 |
---|
| 75 | |
---|
| 76 | # optimize flag: typically -0, could use -O4 or -fast |
---|
| 77 | # -O4 is ok for RTEMS |
---|
| 78 | # NOTE: some level of -O may be actually required by inline assembler |
---|
| 79 | CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions |
---|
| 80 | |
---|
| 81 | # Define this to yes if this target supports multiprocessor environments. |
---|
| 82 | HAS_MP=no |
---|
| 83 | |
---|
[28e7d7fa] | 84 | # This target does not support the TCP/IP stack so ignore requests |
---|
[b0562e74] | 85 | # to enable it. |
---|
[28e7d7fa] | 86 | HAS_NETWORKING=no |
---|
[b0562e74] | 87 | |
---|
| 88 | # The following is a linkcmds file which will work without using the |
---|
| 89 | # -specs system in gcc 2.8. |
---|
| 90 | # $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ |
---|
| 91 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
| 92 | # $(LD) $(XLDFLAGS) -Ttext 0x20000 \ |
---|
| 93 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
| 94 | |
---|
| 95 | # $(CC) -mmvme -mrtems -nostartfiles -mcpu=603 \ |
---|
| 96 | # -o $(basename $@).exe -L $(PROJECT_RELEASE)/lib \ |
---|
| 97 | # $(START_FILE) $(LINK_OBJS) \ |
---|
| 98 | # $(LD_LIBS) \ |
---|
| 99 | # -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\) |
---|
[98100d2] | 100 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
[b0562e74] | 101 | define make-exe |
---|
[98100d2] | 102 | $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) |
---|
[b0562e74] | 103 | $(NM) -g -n $@ > $(basename $@).num |
---|
| 104 | $(SIZE) $@ |
---|
| 105 | endef |
---|
[98100d2] | 106 | else |
---|
| 107 | define make-exe |
---|
| 108 | $(CC) $(CFLAGS) -o $(basename $@).exe \ |
---|
| 109 | $(LINK_OBJS) $(LINK_LIBS) |
---|
| 110 | $(NM) -g -n $@ > $(basename $@).num |
---|
| 111 | $(SIZE) $@ |
---|
| 112 | endef |
---|
| 113 | endif |
---|
[b0562e74] | 114 | |
---|
| 115 | # Miscellaneous additions go here |
---|
| 116 | |
---|
| 117 | # No start file |
---|
| 118 | START_BASE= |
---|