This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linking eCos to a class


 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]