From: "j_north2002" <johnny_north@...>
> I've now rearranged it to this:
> LDFLAGS = -L $(LIBDIR) -L $(LIBDIR2) -T lnkscript -lstdc++ -lgcc -lc
>
> same errors
So another theory goes up in smoke :(
> do you mean - add -mthumb to the CPPFLAGS options?
> CPPFLAGS = -I $(INCDIR2) -I $(INCDIR) -I $(PRJDIR) -mthumb-
> interwork -mthumb -c -g -O2 -Wall -fverbose-asm
Well, almost. What you have listed there as CPPFLAGS should actually
be CFLAGS. CPPFLAGS, although seemlingly for C++ processing,
actually stands for CPreProcessorFLAGS. With that change, yes,
-mthumb tells the compiler to generate Thumb code and -mthumb-interwork
tells it to make it able to call, and be called by, ARM code. You also need
-mthumb-interwork (by itself) when compiling ARM code if you expect to
link with Thumb code.
- John