EmbDev.net

Forum: ARM programming with GCC/GNU tools Help required to use arm-hitex-elf-ar


von Tameezuddin (Guest)


Rate this post
useful
not useful
Hello there,
Recently, I want to create static library using HITEX ARM GNU compiler. 
I am using arm-hitex-elf-g++.exe & arm-hitex-elf-ar.exe to compile set 
of .cpp files and from these resultant object files, I want to create 
static library to make a binary image to be deployed on ARM board. 
Following is the syntax, I am using

GG = arm-hitex-elf-g++.exe
CC = arm-hitex-elf-gcc.exe
AS = arm-hitex-elf-as.exe
LD = arm-hitex-elf-ld.exe
OC = arm-hitex-elf-objcopy.exe
AR = arm-hitex-elf-ar.exe

CCOPTIONS = -DJUP_1 -I..\ -I..\.. -mcpu=arm968e-s -c -gdwarf-2 -MD -Wall 
-O3 \
-mthumb-interwork -mapcs-frame -fsigned-char -mlittle-endian -marm \
-fomit-frame-pointer -fno-rtti -fno-exceptions -msoft-float

all: clean xyz.a

{..}.c.o:
   $(CC) $(CCOPTIONS) -xc -o $*.o $*.c

{..}.cpp.o:
   $(GG) $(CCOPTIONS) -xc++ -o $*.o $*.cpp

clean:
   -@echo Cleaning up files ...
   -@erase *.d
   -@erase *.o
   -@erase *.a


OBJS = \
1.o \
2.o \
3.o \


COMDEPS = \
..\..\1.h \
..\..\2.h \
..\..\3.h \

LCLDEPS = \
..\a.h \
..\b.h \
..\c.h \

$(OBJS) : $*.cpp $(COMDEPS) $(LCLDEPS)


xyz.a : $(OBJS)
  $(AR) -mac -v  xyz.a $(OBJS)

when I am using the above command, it's giving me following error:
"File format not recognized"

Also, I tried to give emulation option elf32-littlearm as following 
sytax
$(AR) elf32-littlearm -mac -v  xyz.a $(OBJS)

It's giveing me syntax error.

Help in this regard is highly appreciated

Note: the above code is from the makefile I have writtena and I am using 
nmake to execute this makefile.

Regards,
Tameez

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.