|author||Joel Sherrill <joel.sherrill@OARcorp.com>||1998-09-30 21:50:42 +0000|
|committer||Joel Sherrill <joel.sherrill@OARcorp.com>||1998-09-30 21:50:42 +0000|
BSP submitted by Thomas Doerfler <firstname.lastname@example.org>:
Finally I am through: I have found the last bugs that made RTEMS- 4.0-beta3 start on my ppc403 board from ROM. So now the '403 support is up to date again. Roughly I have added the following features: - support for the on-chip interrupt controller (in a separate module) - interrupt support for the console device - termios support for the console device ============================================== Since the BSP behaivour changed in some details (console no longer is polling, other memory layout etc) I have created a new BSP "helas403" rather than changing the "papyrus" BSP. The old "polled" console driver still sticks around in "console.c.polled" To get the BSP up and running, I had to create the new BSP files (derived from papyrus). Besides that, the following source areas have been changed: - c/src/lib/libcpu/powerpc/ppc403: changes to console driver, small changes to clock driver, new "ictrl" interrupt controller driver - c/src/exec/score/cpu/powerpc/ppc.h: some small changes (added ppc403 characteristics like a exception vector prefix register, some special register definitions). I am quite sure, they are compatible with the existing sources, although I did not check - c/src/exec/score/cpu/powerpc/cpu.c: There is one severe limitation in the exception entries: Due to the current code arrangement, the "branch absolute" to the ISR handler may only jump to the first 128MByte or the last 128MByte of the 4GByte address range. When the ppc403 is running out of ROM, the ROM functions are located in the last 128MByte (0xFFF00000 and up). These addresses were not handled correctly (sign reduced) in "install_raw_handler". The change I added should work on existing ppc BSPs aswell... - c/src/lib/libc/termios.c: During my tests, I added one change you sent me, so this patch will already be incorporated in the current source tree. There are some smaller changes, see the attached diff file. ========================================= Concerning the GNU toolchain: I tried several tool chains. Finally I almost succeeded with egcs-1.0.3a with patch egcs-1.0.3-rtems-diff-19980527 I had to add the following lines to the egcs files. Without them configure complaint that the cross compiler could not generate executable output. - additional lines needed in egcs distribution in file gcc/config/rs6000/rtems.h: +++ lines start #undef STARTFILE_DEFAULT_SPEC #define STARTFILE_DEFAULT_SPEC "ecrti.o%s" #undef ENDFILE_DEFAULT_SPEC #define ENDFILE_DEFAULT_SPEC "ecrtn.o%s" ++++ lines end As far as I have seen in the Changelog of egcs, you have recently sent two patches affecting the powerpc support, but they were added in the wrong order.... :-( egcs-19980628 with patch egcs-19980628-rtems-diff-19980707 does not work! I used binutils 2.9.1 with patch binutils-2.9.1-rtems-diff-19980515 (binutils 2.8.1 does not work, internal error in gas) and newlib-1.8.0 with patch newlib-1.8.0-rtems-diff-19980707 Finally I had to poke a line in the "bit" script, since, on my LINUX machine, the GNU make is only available as "make", not as "gmake"... For all the tools and newlib I selected configuration "powerpc- rtems". -------------------------------------------- IMD Ingenieurbuero fuer Microcomputertechnik Thomas Doerfler Herbststrasse 8 D-82178 Puchheim Germany email: email@example.com
Diffstat (limited to 'make')
1 files changed, 110 insertions, 0 deletions
diff --git a/make/custom/helas403.cfg b/make/custom/helas403.cfg
new file mode 100644
@@ -0,0 +1,110 @@
+# Config file for a PowerPC 403 based helas403 card
+# this is derived from:
+# Config file for a PowerPC 403 based papyrus card
+# Id: papyrus.cfg,v 1.7 1998/06/27 17:09:47 joel Exp
+# This is the actual bsp directory used during the build process.
+# These should be defined in targopt.h now.
+# -DPPC_ASM=PPC_ASM_ELF -DPPC_VECTOR_FILE_BASE=0x0100
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+# This section makes the target dependent options file.
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+# PPC_VECTOR_FILE_BASE (PowerPC)
+# This defines the base address of the exception table.
+# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
+# PPC_ABI (PowerPC)
+# This defines the calling convention (Application Binary Interface)
+# used in this configuration. EABI is the only one supported.
+# This BSP was initially developed using the PowerOpen ABI.
+# PPC_ASM (PowerPC)
+# This defines the assembly language format used in this configuration.
+# ELF is the only one supported.
+# PPC_USE_SPRG (RTEMS PowerPC port)
+# If defined, then the PowerPC specific code in RTEMS will use some
+# of the special purpose registers to slightly optimize interrupt
+# response time. The use of these registers can conflict with
+# other tools like debuggers.
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
+ @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
+ @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
+ @echo "#define PPC_USE_SPRG 1" >>$@
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+CPU_CFLAGS = -mcpu=403
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+# NOTE: some level of -O may be actually required by inline assembler
+# No start file
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+# The --defsym arguments define arguments which are required by the linkcmds
+# file which is designed for gcc 2.8
+ $(LD) $(XLDFLAGS) -T $(LINKCMDS) \
+ --defsym __fini=0 --defsym __init=0 \
+ -o $@ -u atexit -u __vectors -u download_entry \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+ $(CC) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK_OBJS) $(LINK_LIBS)
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+# Miscellaneous additions go here