Joel Sherrill aecfa2bf09 BSP submitted by Thomas Doerfler <td@imd.m.isar.de>:
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:    td@imd.m.isar.de
1998-09-30 21:55:53 +00:00
1998-09-30 21:18:46 +00:00
1998-02-04 15:54:31 +00:00
1997-04-22 13:07:36 +00:00
1997-04-22 16:50:29 +00:00
1997-04-22 16:50:29 +00:00
1998-09-23 13:43:44 +00:00

#
#  $Id$
#

Building RTEMS
==============
See the file README.configure.

Directory Overview
==================

This is the top level of the RTEMS directory structure.  The following 
is a description of the files and directories in this directory:

  INSTALL
    Rudimentary installation instructions.  For more detailed
    information please see the Release Notes.  The Postscript 
    version of this manual can be found in the file
    c_or_ada/doc/relnotes.tgz.

  LICENSE
    Required legalese.

  README
    This file.

  c
    This directory contains the source code for the C 
    implementation of RTEMS as well as the test suites, sample 
    applications, Board Support Packages, Device Drivers, and 
    support libraries.

  doc
    This directory contains the PDL for the RTEMS executive.

Ada versus C
============

There are two implementations of RTEMS in this source tree -- 
in Ada and in C.  These two implementations are functionally
and structurally equivalent.  The C implementation follows
the packaging conventions and hiearchical nature of the Ada 
implementation.  In addition, a style has been followed which 
allows one to easily find the corresponding Ada and C 
implementations.  

File names in C and code placement was carefully designed to insure
a close mapping to the Ada implementation.  The following file name 
extensions are used:

   .adb - Ada body
   .ads - Ada specification
   .adp - Ada body requiring preprocessing
   .inc - include file for .adp files

   .c   - C body (non-inlined routines)
   .inl - C body (inlined routines)
   .h   - C specification

In the executive source, XYZ.c and XYZ.inl correspond directly to a 
single XYZ.adb or XYZ.adp file.  A .h file corresponds directly to
the .ads file.  There are only a handful of .inc files in the 
Ada source and these are used to insure that the desired simple 
inline textual expansion is performed.  This avoids scoping and
calling convention side-effects in carefully constructed tests 
which usually test context switch behavior.

In addition, in Ada code and data name references are always fully
qualified as PACKAGE.NAME.  In C, this convention is followed 
by having the package name as part of the name itself and using a
capital letter to indicate the presence of a "." level.  So we have
PACKAGE.NAME in Ada and _Package_Name in C.  The leading "_" in C
is used to avoid naming conflicts between RTEMS and user variables.
By using these conventions, one can easily compare the C and Ada
implementations.

The most noticeable difference between the C and Ada83 code is 
the inability to easily obtain a "typed pointer" in Ada83.  
Using the "&" operator in C yields a pointer with a specific type.
The 'Address attribute is the closest feature in Ada83.  This
returns a System.Address and this must be coerced via Unchecked_Conversion
into an access type of the desired type.  It is easy to view 
System.Address as similar to a "void *" in C, but this is not the case.
A "void *" can be assigned to any other pointer type without an
explicit conversion.  

The solution adopted to this problem was to provide two routines for
each access type in the Ada implementation -- one to convert from
System.Address to the access type and another to go the opposite
direction.  This results in code which accomplishes the same thing
as the corresponding C but it is easier to get lost in the clutter
of the apparent subprogram invocations than the "less bulky"
C equivalent.

A related difference is the types which are only in Ada which are used 
for pointers to arrays.  These types do not exist and are not needed 
in the C implementation.
Description
RTEMS is a ​real-time executive in use by embedded systems applications around the world and beyond
Readme 126 MiB
Languages
C 93.9%
Assembly 3.4%
Ada 1.4%
Python 0.3%
HTML 0.3%
Other 0.4%