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

von Tameezuddin (Guest)

Rate this post
0 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

   $(CC) $(CCOPTIONS) -xc -o $*.o $*.c

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

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

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

..\..\1.h \
..\..\2.h \
..\..\3.h \

..\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 
$(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.



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.