source: rtems/make/custom/mcp750.cfg @ ea562ee9

4.104.114.84.95
Last change on this file since ea562ee9 was ea562ee9, checked in by Joel Sherrill <joel.sherrill@…>, on 08/12/99 at 18:22:17

Patch from Ralf Corsepius <corsepiu@…>:

After upgrading my linux box to the brand new SuSE 6.2 release, which is
glibc-2.1 based, I came across a bug in RTEMS - IIRC, I even warned you
about it about 1/2 a year ago, but nothing has been done since then :-.

The *.m4 macros to check for SYSV/IPC are broken for linux/glibc2.1,
because they assume that linux always defines union semun, which isn't
true anymore for glibc2.1 (the manpage for semctl states _X_OPEN
specifies it this way). Therefore I have tried to implement a more
general approach for handling SYSV for unix/posix which checks for
presence of struct semun, instead of trying to evaluate OS specific
preprocessor symbols.

This approach is a bit adventureous, because I only tested it with
linux/glibc2.1 and linux/libc5, but not under other Unix variants RTEMS
supports. I am quite confident it will work on other hosts, too, but who
knows :-.

[FYI: I think this might also is the cause of some problems with RedHat?
6.X / Mandrake linux recently reported on the rtems list -- rtems-4.0.0
can not be build for posix on any glibc2.1 based host]

Furthermore the patch below contains a couple of minor fixes and
configuration cleanups, which IMO should be applied before releasing a
new snapshot.

To apply this patch:

cd <source-tree>
patch -p1 < rtems-rc-19990709-8.diff
./autogen

  • Property mode set to 100644
File size: 4.9 KB
Line 
1#
2#  Config file for a Radstone Technology Plc. PowerPC 60x based VME board
3#
4#  $Id: ppcn_60x.cfg
5#
6
7include $(RTEMS_ROOT)/make/custom/default.cfg
8
9RTEMS_CPU=powerpc
10RTEMS_CPU_MODEL=mpc750
11
12# This is the actual bsp directory used during the build process.
13RTEMS_BSP_FAMILY=mcp750
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#  PPCN_60X_USE_DINK           (ppcn_60x_bsp)
28#  PPCN_60X_USE_NONE          (ppcn_60x_bsp)
29#     The Score603e board can be configured with 3 ROM monitors.  Only two
30#     are appropriate for use with RTEMS.  Set exactly one of these to "1"
31#     to indicate which ROM monitor is on the board you are using.
32#
33#  PPC_VECTOR_FILE_BASE (ppc)
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 (ppc)
38#     This defines the calling convention (Application Binary Interface)
39#     used in this configuration.  EABI is the only one supported.
40#
41#  PPC_ASM (ppc)
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#  PPC_USE_DATA_CACHE (RTEMS PowerPC port)
52#     If defined, then the PowerPC specific code in RTEMS will use
53#     data cache instructions to optimize the context switch code.
54#     This code can conflict with debuggers or emulators.
55#
56
57define make-target-options
58        @echo "/* #define NDEBUG 1 */ "                        >>$@
59        @echo "#define RTEMS_TEST_NO_PAUSE 1"                  >>$@
60        @echo "#define STACK_CHECKER_ON  1"                    >>$@
61        @echo "#define STACK_CHECKER_REPORT_USAGE  1"          >>$@
62        @echo "/* #define RTEMS_DEBUG  1 */"                   >>$@
63        @echo "#define PPCN_60X_USE_DINK 0"                   >>$@
64        @echo "#define PPCN_60X_USE_NONE 1"                   >>$@
65        @echo "#define PPC_USE_DATA_CACHE 1"                   >>$@
66        @echo "#define PPC_VECTOR_FILE_BASE 0x0100"            >>$@
67        @echo "#define PPC_ABI PPC_ABI_EABI"                   >>$@
68        @echo "#define PPC_ASM PPC_ASM_ELF"                    >>$@
69        @echo "#define PPC_USE_SPRG  1"                        >>$@
70endef
71
72#  This contains the compiler options necessary to select the CPU model
73#  and (hopefully) optimize for it.
74#
75# NOTE : cheking egcc 1.1.1 source code shows that the last know processor
76# is the 604 model and that this is the default generation option.
77#
78# CPU_CFLAGS = -mcpu=750
79
80# optimize flag: typically -0, could use -O4 or -fast
81# -O4 is ok for RTEMS
82# NOTE2: some level of -O may be actually required by inline assembler (at least
83# -O2 so far.
84# NOTE2 Apparently nobody really knows the status or r2 and r13.
85# As far as I know, small data are pointer impose a very specific compliation
86# model => not used.
87# Currently the sdata2 and sbss2 sections are empty => r2 is not used...
88CFLAGS_OPTIMIZE_V=-O2 -fno-keep-inline-functions -fvolatile-global -fvolatile -mstrict-align  -mcpu=750
89#CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -fvolatile-global -fvolatile -mstrict-align -mcpu=750
90
91# The following is a ld command file which works without using the
92# -specs system in gcc 2.8.  IT HAS NEVER BEEN TESTED WITH THIS BSP!!!
93#       $(LD) $(XLDFLAGS) -T $(LINKCMDS) \
94#         -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES)
95#       $(LD) $(XLDFLAGS) -Ttext 0x20000 \
96#         -o $@ -u atexit -u __vectors -u download_entry $(LINK_FILES)
97
98#       $(CC) -mmvme -mrtems -nostartfiles -mcpu=603 \
99#           -o $(basename $@).exe -L $(PROJECT_RELEASE)/lib \
100#            $(START_FILE) $(LINK_OBJS) \
101#            $(LD_LIBS) \
102#           -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
103define make-exe
104        $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
105        $(NM) -g -n $(basename $@).exe > $(basename $@).num
106        $(SIZE) $(basename $@).exe
107        $(CP) $(basename $@).exe $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/mcp750/bootloader/$(ARCH); \
108        cd $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/mcp750/bootloader; \
109        $(MAKE) bootloader BINARY_LOADED=$(basename $@).exe; \
110        COMPLETE_FILE_NAME=$(basename $@).exe ;\
111        echo $${COMPLETE_FILE_NAME} ;\
112        FILE_NAME=`basename $${COMPLETE_FILE_NAME}` ;\
113        echo $${FILE_NAME} ;\
114        mkdir -p $(PROJECT_ROOT)/$(RTEMS_BSP)/bin ;\
115        $(CP) bootloader $(PROJECT_ROOT)/$(RTEMS_BSP)/bin/$${FILE_NAME}
116endef
117
118# Miscellaneous additions go here
119
120# No start file
121START_BASE=
122
123# Let the HWAPI know which set of drivers to build
124DRIVER_ARCHITECTURE=vmebus
Note: See TracBrowser for help on using the repository browser.