| 1 |
# |
| 2 |
# $Id: README,v 1.2 2007/09/11 15:12:57 joel Exp $ |
| 3 |
# |
| 4 |
|
| 5 |
This directory contains the support files for building |
| 6 |
the sockets-constants.ads file for RTEMS. See the |
| 7 |
README.RTEMS in the top level directory for complete |
| 8 |
build instructions. |
| 9 |
|
| 10 |
Prerequisites |
| 11 |
============= |
| 12 |
Build and install a working GNAT/RTEMS toolset and a BSP. Make sure |
| 13 |
networking and POSIX are enabled. Detailed instructions are available |
| 14 |
online in the RTEMS Wiki at: |
| 15 |
|
| 16 |
http://www.rtems.org/wiki/index.php/RTEMSAda |
| 17 |
|
| 18 |
Run at least one sample from the RTEMS build (e.g. hello.exe |
| 19 |
or sample.exe) to confirm that RTEMS itself was properly built. |
| 20 |
|
| 21 |
Build and run the RTEMS hello_world_ada from the ada-examples |
| 22 |
package using your GNAT/RTEMS development environment. |
| 23 |
|
| 24 |
If everything is working at this point, then you are ready to |
| 25 |
build Ada Sockets. |
| 26 |
|
| 27 |
Generate sockets-constants-ads |
| 28 |
============================== |
| 29 |
We will use the RTEMS you installed to build and run a program |
| 30 |
called "constants.exe". The output of this program needs to be |
| 31 |
saved as sockets-constants.ads. To compile this program use |
| 32 |
the Makefile.constants. |
| 33 |
|
| 34 |
RTEMS_MAKEFILE_PATH=install_patch_of_BSP \ |
| 35 |
make -f Makefile.constants |
| 36 |
|
| 37 |
Then run the program o-optimize/constants.exe on the target hardware. |
| 38 |
Your saved target board output may end up with DOS style |
| 39 |
CR/LF's. Run "dos2unix" on the file to get it back to |
| 40 |
Unix style. |
| 41 |
|
| 42 |
There is a version of this file generated using psim using |
| 43 |
a pre-4.8 CVS snapshot of RTEMS which should work on any target. |
| 44 |
You can use this but you would be safer to generate your own. |
| 45 |
Consider it an example of how it should look when it works. |
| 46 |
|
| 47 |
|
| 48 |
Building Ada Sockets |
| 49 |
==================== |
| 50 |
Now that you have a sockets-constants.ads, we can build the |
| 51 |
Ada Sockets library. Makefile.adasockets is provided for this |
| 52 |
step: |
| 53 |
|
| 54 |
RTEMS_MAKEFILE_PATH=install_patch_of_BSP \ |
| 55 |
make -f Makefile.lib |
| 56 |
|
| 57 |
After the library is compiled, it may be installed using the following: |
| 58 |
|
| 59 |
RTEMS_MAKEFILE_PATH=install_patch_of_BSP \ |
| 60 |
make -f Makefile.lib install |
| 61 |
|