adasockets/rtems
Joel Sherrill c902363cf7 Add RTEMS support 2007-11-03 15:18:23 +01:00
..
ChangeLog Add RTEMS support 2007-11-03 15:18:23 +01:00
Makefile.RTEMS Add RTEMS support 2007-11-03 15:18:23 +01:00
README Add RTEMS support 2007-11-03 15:18:23 +01:00
create_constants_c.sh Add RTEMS support 2007-11-03 15:18:23 +01:00
rtems_main.c Add RTEMS support 2007-11-03 15:18:23 +01:00
sockets-constants-rtems.ads Add RTEMS support 2007-11-03 15:18:23 +01:00

README

#
#  $Id: README,v 1.2 2007/09/11 15:12:57 joel Exp $
#

This directory contains the support files for building
the sockets-constants.ads file for RTEMS.  See the
README.RTEMS in the top level directory for complete
build instructions.

Prerequisites
=============
Build and install a working GNAT/RTEMS toolset and a BSP. Make sure
networking and POSIX are enabled.  Detailed instructions are available
online in the RTEMS Wiki at:

    http://www.rtems.org/wiki/index.php/RTEMSAda

Run at least one sample from the RTEMS build (e.g. hello.exe
or sample.exe) to confirm that RTEMS itself was properly built.

Build and run the RTEMS hello_world_ada from the ada-examples
package using your GNAT/RTEMS development environment.

If everything is working at this point, then you are ready to
build Ada Sockets.

Generate sockets-constants-ads
==============================
We will use the RTEMS you installed to build and run a program
called "constants.exe".  The output of this program needs to be
saved as sockets-constants.ads.  To compile this program use
the Makefile.constants.

RTEMS_MAKEFILE_PATH=install_patch_of_BSP \
  make -f Makefile.constants

Then run the program o-optimize/constants.exe on the target hardware.
Your saved target board output may end up with DOS style 
CR/LF's.  Run "dos2unix" on the file to get it back to
Unix style.

There is a version of this file generated using psim using 
a pre-4.8 CVS snapshot of RTEMS which should work on any target.
You can use this but you would be safer to generate your own.
Consider it an example of how it should look when it works.


Building Ada Sockets
====================
Now that you have a sockets-constants.ads, we can build the
Ada Sockets library.  Makefile.adasockets is provided for this
step:

RTEMS_MAKEFILE_PATH=install_patch_of_BSP \
  make -f Makefile.lib

After the library is compiled, it may be installed using the following:

RTEMS_MAKEFILE_PATH=install_patch_of_BSP \
  make -f Makefile.lib install