This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Linking eCos to a class
- From: "Sergio Forever" <cirudinezidane at gmail dot com>
- To: java at gcc dot gnu dot org
- Date: Mon, 24 Apr 2006 11:49:39 +0200
- Subject: Re: Linking eCos to a class
- References: <66c5cc790604240246m7b16b9ebm17d1ead49499d19d@mail.gmail.com>
Hi!!
I am trying to link eCos to a class. I have made the next steps:
1º To obtain a native code object
2º Create a executable from native code linking eCos.
I have had problems with .plt memory regions
NOTE: eCos is written in C.
It is possible this theory?
My Makefile is this:
#----------------------START_OF_FILE-----------------------------------------
# Makefile for HelloWorld.java
export CLASSPATH=/usr/share/java/libgcj-4.0.2.jar
ECOS=/opt/ecos
#CC=$(ECOS)/gnutools/i386-elf/bin/i386-elf-gcc
CC=/usr/bin/gcj-4.0
TFTP_DIR=/tftpboot
ECOSDIR=/home/userecos/Datos/usr/Comun/opt/Apps/redboot/Floppy/redboot_Floppy_install
CFLAGS= --classpath=$(CLASSPATH) -g -Wall -I$(ECOSDIR)/include
-ffunction-sections -fdata-sections
LDFLAGS= -nostartfiles
-L$(ECOS)/gnutools/i386-elf/lib/gcc-lib/i386-elf/3.2.1
-L$(ECOS)/gnutools/i386-elf/i386-elf/lib -L$(ECOSDIR)/lib
-L$(ECOSDIR)/src
#LIBS=-T/home/userecos/Datos/usr/Comun/opt/Apps/redboot/Floppy/redboot_Floppy_install/lib/target.ld
LIBS=-Ttarget.ld
LD=$(ECOS)/gnutools/i386-elf/bin/i386-elf-ld
all: HelloWorld
HelloWorld.o: HelloWorld.java
$(CC) -c -o HolaMundo.o $(CFLAGS) $<
HelloWorld: HelloWorld.o
$(CC) -g $(LDFLAGS) -o $@ $@.o $(LIBS)
cp $@ $(TFTP_DIR)/
clean:
rm -f HelloWorld.asm
rm -f HelloWorld.o *.ihx *.lnk *.map *.rel *.rst *.sym
#-------------END_OF_FILE--------------------------------------------
Thanks for all