[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hello world for ada compilation (again ...)
- Date: Wed, 13 Oct 1999 15:12:26 +0200 (MET DST)
- From: Kris.Hermans at cs.kuleuven.ac.be (Kris Hermans)
- Subject: hello world for ada compilation (again ...)
Hello,
I installed the crosscompiler for gnat/rtems and even succeeded in
compiling the kernel.
My system is debian linux, GNAT/RTEMS with target = pc386.
Sadly, in the sample app (hello_world_ada), there is no makefile included
for my set-up. While trying to figure out one for myself, I have a few
questions:
* in the file MakeFile.erc32 there is the line:
CARGS=-B${rtemsdir}/lib/ -specs bsp_specs -qrtems -mcypress I guess this
defines some flags to pass to the binder and the linker. However, I don't
get the actual meaning of it (what is bsp_specs, qrtems, mcypress and how
do I have to modify it for a pc386 ?)
* leaving the above line unaltered and modifying PATH's etc., I get the
following:
#
# Makefile for hello world example
#
MAIN=hello
# Tool paths
tooldir=/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems
rtemsdir=${tooldir}/rtems/pc386
# Tool names
GCC=${tooldir}/bin/i386-rtems-gcc
GNATMAKE=${tooldir}/bin/i386-rtems-gnatmake
SIZE=${tooldir}/bin/i386-rtems-size
CARGS=-B${rtemsdir}/lib/ -specs bsp_specs -qrtems -mcypress
all: init.o
$(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g \
-bargs -r \
-cargs $(CARGS) \
-largs $(CARGS) init.o
$(SIZE) $(MAIN)
init.o: init.c
$(GCC) -O4 -g -Wall -ansi -fasm $(CARGS) -c init.c
run:
@ echo Must run on the real target
gdb:
@ echo No real target
clean:
rm -f b_$(MAIN).c b_$(MAIN).o *.o *.ali $(MAIN)
However, make complains:
make -f Makefile.pc386.old
/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/bin/i386-rtems-gcc -O4 -g -Wall
-ansi -fasm -B/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/rtems/pc386/lib/
-specs bsp_specs -qrtems -mcypress -c init.c
cc1: Invalid option `cypress'
make: *** [init.o] Error 1
* So, I leave out the invalid option (without knowing what it means ...).
I get:
make -f Makefile.pc386.old
/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/bin/i386-rtems-gcc -O4 -g -Wall
-ansi -fasm -B/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/rtems/pc386/lib/
-specs bsp_specs -qrtems -c init.c
/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/bin/i386-rtems-gnatmake -v -O
-gnata -gnatE -gnato hello -g \
-bargs -r \
-cargs -B/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/rtems/pc386/lib/
-specs bsp_specs -qrtems \
-largs -B/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/rtems/pc386/lib/
-specs bsp_specs -qrtems init.o
GNATMAKE 3.11p (981118) Copyright 1995-1998 Free Software Foundation,
Inc.
"hello.ali" being checked ...
-> "hello.ali" missing.
i386-rtems-gcc -c -O -gnata -gnatE -gnato -g
-B/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/rtems/pc386/lib/ -specs
bsp_specs -qrtems hello.adb
hello.adb:7:11: warning: file name does not match unit name, should be
"main.adb"
i386-rtems-gnatbind -aO./ -r -I- -x hello.ali
i386-rtems-gnatlink -g
-B/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/rtems/pc386/lib/ -specs
bsp_specs -qrtems init.o hello.ali
i386-rtems-gcc: file path prefix
`/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/rtems/pc386/lib/' never used
/home/pcuser8/RTEMS/gnat-3.11p/i386-rtems/bin/i386-rtems-size hello
text data bss dec hex filename
154464 6076 42188 202728 317e8 hello
What is the meaning of this all ? Did I succeed ? Why isn 't there a file
with a .exe extension (I have just plain "hello", can I use this for
creating a bootable disk with grub ?).
Sorry for all the (perhaps silly) qustions, but I really want to be sure
that my compile set-up is ok, before proceeding with actually executing
the apps.
Thanks for the answers,
Kris (a RTEMS newbie, but I guess you figured this out already ;-))