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 | # CONSOLE_USE_POLLED (psim_bsp) |
---|
18 | # CONSOLE_USE_INTERRUPTS (psim_bsp) |
---|
19 | # The psim console driver has the structure to operate in either |
---|
20 | # polled or interrupt mode. However both modes only trap to the |
---|
21 | # monitor currently. |
---|
22 | # |
---|
23 | # PSIM_FAST_IDLE (psim_bsp) |
---|
24 | # If defined, speed up the clock ticks while the idle task is running so |
---|
25 | # time spent in the idle task is minimized. This significantly reduces |
---|
26 | # the wall time required to execute the RTEMS test suites. |
---|
27 | # |
---|
28 | # PPC_VECTOR_FILE_BASE (PowerPC) |
---|
29 | # This defines the base address of the exception table. |
---|
30 | # NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 |
---|
31 | # |
---|
32 | # PPC_USE_SPRG (RTEMS PowerPC port) |
---|
33 | # If defined, then the PowerPC specific code in RTEMS will use some |
---|
34 | # of the special purpose registers to slightly optimize interrupt |
---|
35 | # response time. The use of these registers can conflict with |
---|
36 | # other tools like debuggers. |
---|
37 | |
---|
38 | define make-target-options |
---|
39 | @echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@ |
---|
40 | @echo "#define CONSOLE_USE_POLLED !CONSOLE_USE_INTERRUPTS" >>$@ |
---|
41 | @echo "#define PSIM_FAST_IDLE 1" >>$@ |
---|
42 | @echo "#define PPC_VECTOR_FILE_BASE 0xFFF00100" >>$@ |
---|
43 | @echo "#define PPC_USE_SPRG 1" >>$@ |
---|
44 | endef |
---|
45 | |
---|
46 | # This contains the compiler options necessary to select the CPU model |
---|
47 | # and (hopefully) optimize for it. |
---|
48 | # |
---|
49 | CPU_CFLAGS = -mcpu=603 |
---|
50 | #-ffunction-sections |
---|
51 | |
---|
52 | # optimize flag: typically -0, could use -O4 or -fast |
---|
53 | # -O4 is ok for RTEMS |
---|
54 | # NOTE: some level of -O may be actually required by inline assembler |
---|
55 | CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions |
---|
56 | |
---|
57 | # The following is a linkcmds file which will work without using the |
---|
58 | # -specs system in gcc 2.8. |
---|
59 | # $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ |
---|
60 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
61 | # $(LD) $(XLDFLAGS) -Ttext 0x20000 \ |
---|
62 | # -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES) |
---|
63 | |
---|
64 | # $(CC) -mmvme -mrtems -nostartfiles -mcpu=603 \ |
---|
65 | # -o $(basename $@).exe -L $(PROJECT_RELEASE)/lib \ |
---|
66 | # $(START_FILE) $(LINK_OBJS) \ |
---|
67 | # $(LD_LIBS) \ |
---|
68 | # -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\) |
---|
69 | ifeq ($(RTEMS_USE_GCC272),yes) |
---|
70 | define make-exe |
---|
71 | $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) |
---|
72 | $(NM) -g -n $@ > $(basename $@).num |
---|
73 | $(SIZE) $@ |
---|
74 | endef |
---|
75 | else |
---|
76 | # -Wl,--gc-sections |
---|
77 | define make-exe |
---|
78 | $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \ |
---|
79 | $(LINK_OBJS) $(LINK_LIBS) |
---|
80 | $(NM) -g -n $@ > $(basename $@).num |
---|
81 | $(SIZE) $@ |
---|
82 | endef |
---|
83 | endif |
---|
84 | |
---|
85 | # Miscellaneous additions go here |
---|