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