Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

when I want to generate a MOD file required for the device, it happens a error. I use the GCC for arm.

error as follows:
In file included from ../../inc/AEEHeap.h:39
from ..\..\src\AEEModGen.c:33
../../inc/AEE.h: 138: parse error before `#'
../../inc/AEE.h: 138: stray '\' in program
../../inc/AEE.h: 139: stray '\' in program
../../inc/AEE.h: 140: stray '\' in program
../../inc/AEE.h: 141: stray '\' in program
:
:
:
:

AEE.h

:
:
:
Line 135 #define VTBL(iname) iname##Vtbl

Line 137 #define QINTERFACE(iname) \
Line 138 struct _##iname {\
Line 139 struct VTBL(iname) *pvt;\
Line 140 };\
Line 141 typedef struct VTBL(iname) VTBL(iname);\
Line 142 struct VTBL(iname)

Do you know the reason? Can you help me? Should I Thank you!

First, make sure that the source files are stored in unix format (LF to end lines instead of CRLF).
Next, I recommend using nmake instead of make; that way, you don't have to go around changing all the back-slashes to forward-slashes.
This looks like a problem with line endings to me.

First, make sure that the source files are stored in unix format (LF to end lines instead of CRLF).
Next, I recommend using nmake instead of make; that way, you don't have to go around changing all the back-slashes to forward-slashes.
This looks like a problem with line endings to me.

Thank you for your answer.
Really the source files are not stored in unix format (CRLF to end lines).
Except that I replace the CRLF to LF in lines, Can I solve the question by another method.
Because There are a lot of CRLF in files . Is there any setting in makefile or cygwin enviorn ment
I try it to use "nmake", but the same error happens. Another question, a path written in the makefile
by "make" is diffenrent from that in the makefile by "nmake".
For example , a path written in makefile by "make" is "AEESRCPATH = ../../src".
a path written in makefile by "nmake" is "AEESRCPATH = ..\..\src".
Can you help me ? thank you!

Thank you for your answer.
Really the source files are not stored in unix format (CRLF to end lines).
Except that I replace the CRLF to LF in lines, Can I solve the question by another method.
Because There are a lot of CRLF in files . Is there any setting in makefile or cygwin enviorn ment
I try it to use "nmake", but the same error happens. Another question, a path written in the makefile
by "make" is diffenrent from that in the makefile by "nmake".
For example , a path written in makefile by "make" is "AEESRCPATH = ../../src".
a path written in makefile by "nmake" is "AEESRCPATH = ..\..\src".
Can you help me ? thank you!

For the LF problem you can use dos2unix -U with the includes, and then use visual studio to edit your new files.
/kUfa

For the LF problem you can use dos2unix -U with the includes, and then use visual studio to edit your new files.
/kUfa

Sorry, I am a beginner in Brew. Could you tell me how I can use "dos2unix -U with the includes" in detail, Is it a setting or a tool.Thank you!

Sorry, I am a beginner in Brew. Could you tell me how I can use "dos2unix -U with the includes" in detail, Is it a setting or a tool.Thank you!

It's a cygwin tool: try "dos2unix --help" in a cygwin console
Just do a "dos2unix -U source.h destination.h" for all files.
/kUfa

It's a cygwin tool: try "dos2unix --help" in a cygwin console
Just do a "dos2unix -U source.h destination.h" for all files.
/kUfa

Thank you for your help ,I change my by "dos2unix" for all the files. Now AEEModGen.c and AEEAppGen.c could be made.
But new error happens, as it follows:
In file included from ./WhiteBoard.h:49
from .\WhiteBoard.c:45
../../inc/AEEFile.h: 131: parse error before `__packed'
.\WhiteBoard.c:In function `WB_DisplaySampleShape';
.\WhiteBoard.c:2046: Internal compiler error in `purge_addressof_1', at function.c:3183
AEEFile.h
:
:
:
LINE120 #define INHERIT_IFile(iname) \
LINE121 INHERIT_IAStream(iname); \
LINE122 uint32 (*Write)(iname * pIFile, PACKED const void * pBuffer, uint32 dwCount); \
LINE123 int (*GetInfo)(iname * pIFile, FileInfo * pInfo); \
LINE124 int32 (*Seek)(iname * pIFile, FileSeekType seek, int32 position); \
LINE125 int (*Truncate)(iname * pIFile, uint32 truncate_pos); \
LINE126 int (*GetInfoEx)(iname * po,AEEFileInfoEx * pi); \
LINE127 int32 (*SetCacheSize)(iname * po,int nSize) \
LINE128
LINE129 QINTERFACE(IFile)
LINE130 {
LINE131 INHERIT_IFile(IFile);
LINE132 };
:
:
:
How can I correct this make error about "__packed"? Thank you!

Thank you for your help ,I change my by "dos2unix" for all the files. Now AEEModGen.c and AEEAppGen.c could be made.
But new error happens, as it follows:
In file included from ./WhiteBoard.h:49
from .\WhiteBoard.c:45
../../inc/AEEFile.h: 131: parse error before `__packed'
.\WhiteBoard.c:In function `WB_DisplaySampleShape';
.\WhiteBoard.c:2046: Internal compiler error in `purge_addressof_1', at function.c:3183
AEEFile.h
:
:
:
LINE120 #define INHERIT_IFile(iname) \
LINE121 INHERIT_IAStream(iname); \
LINE122 uint32 (*Write)(iname * pIFile, PACKED const void * pBuffer, uint32 dwCount); \
LINE123 int (*GetInfo)(iname * pIFile, FileInfo * pInfo); \
LINE124 int32 (*Seek)(iname * pIFile, FileSeekType seek, int32 position); \
LINE125 int (*Truncate)(iname * pIFile, uint32 truncate_pos); \
LINE126 int (*GetInfoEx)(iname * po,AEEFileInfoEx * pi); \
LINE127 int32 (*SetCacheSize)(iname * po,int nSize) \
LINE128
LINE129 QINTERFACE(IFile)
LINE130 {
LINE131 INHERIT_IFile(IFile);
LINE132 };
:
:
:
How can I correct this make error about "__packed"? Thank you!

Arrgh... that __packed error is most annoying. I fixed it by modifying my AEEComDef.h, but Qualcomm doesn't like people messing around with their header files.
Here's the change I made:
At the beginning of the file, you should see a section of code that starts with the comment "GCC packed works a little differently." Move that section from the beginning of the file to the Compiler Keyword Macros section, just after the block that #defines PACKED. Then, #undef PACKED and #define PACKED as nothing in the #if portion of the GCC packed block. Here's what that section looks like in my file:
/* ---------------------------------------------------------------------
** Compiler Keyword Macros
** --------------------------------------------------------------------- */
#if defined(__arm)
#define PACKED __packed
#else
#define PACKED
#endif
/* GCC packed works a little differently */
#if !defined(GCCPACKED)
// For the GCC compiler
# if defined(__GNUC__)
# define GCCPACKED __attribute__ ((packed))
# undef PACKED
# define PACKED
# else //__GNUC__
# define GCCPACKED
# endif //__GNUC__
#endif // ifndef GCCPACKED
There's probably a better way to go about this, but that's the solution I came up with.

Arrgh... that __packed error is most annoying. I fixed it by modifying my AEEComDef.h, but Qualcomm doesn't like people messing around with their header files.
Here's the change I made:
At the beginning of the file, you should see a section of code that starts with the comment "GCC packed works a little differently." Move that section from the beginning of the file to the Compiler Keyword Macros section, just after the block that #defines PACKED. Then, #undef PACKED and #define PACKED as nothing in the #if portion of the GCC packed block. Here's what that section looks like in my file:
/* ---------------------------------------------------------------------
** Compiler Keyword Macros
** --------------------------------------------------------------------- */
#if defined(__arm)
#define PACKED __packed
#else
#define PACKED
#endif
/* GCC packed works a little differently */
#if !defined(GCCPACKED)
// For the GCC compiler
# if defined(__GNUC__)
# define GCCPACKED __attribute__ ((packed))
# undef PACKED
# define PACKED
# else //__GNUC__
# define GCCPACKED
# endif //__GNUC__
#endif // ifndef GCCPACKED
There's probably a better way to go about this, but that's the solution I came up with.

Thank you for your answer, I correct "__packed error" by your help.
But there is the compiler error. As it follows.
:
:
.\WhiteBoard.c:In function `WB_DisplaySampleShape';
.\WhiteBoard.c:2046: Internal compiler error in `purge_addressof_1', at function.c:3183
:
:
Another question, When I covert "HelloWorld" Sample by GCC, object file(*.o) and elf file(*.elf) are coverted,
but there is a error form elf file(*.elf) to module file(*.mod) by tool"BREWelf2mod.exe". Is there error in cygwin enviorment setting or not?
error information is as follows:
BREWelf2mod.exe HelloWorld.elf HelloWorld.mod
'arm-elf-objdump' is internal command or external command, the executed program or bat files is disable to be recognized .
Function "arm-elf-objdump -r HelloWorld.elf > __tmpbmodfile___.tmp" returned 1
make: *** [HelloWorld.mod] Error 1
Do you know the reason? Thank you!

Thank you for your answer, I correct "__packed error" by your help.
But there is the compiler error. As it follows.
:
:
.\WhiteBoard.c:In function `WB_DisplaySampleShape';
.\WhiteBoard.c:2046: Internal compiler error in `purge_addressof_1', at function.c:3183
:
:
Another question, When I covert "HelloWorld" Sample by GCC, object file(*.o) and elf file(*.elf) are coverted,
but there is a error form elf file(*.elf) to module file(*.mod) by tool"BREWelf2mod.exe". Is there error in cygwin enviorment setting or not?
error information is as follows:
BREWelf2mod.exe HelloWorld.elf HelloWorld.mod
'arm-elf-objdump' is internal command or external command, the executed program or bat files is disable to be recognized .
Function "arm-elf-objdump -r HelloWorld.elf > __tmpbmodfile___.tmp" returned 1
make: *** [HelloWorld.mod] Error 1
Do you know the reason? Thank you!

I'm not quite sure what's going on in either case; are you using the makefile generator plugin for VS .NET? It's not perfect, but with a few modifications it can save you a lot of trouble.
I suspect that the BREWelf2mod problem is indeed in the cygwin environment settings, but I can't tell offhand. The WhiteBoard.c problem might have something to do with the link order (AEEModGen.o must always come first).
Edit:
Ack! I'm now getting that same purge_addressof_1 error that you are, same line number in function.c and everything. Tell me: is line 2046 in whiteboard.c a curly brace ending a function? That's where it says the problem is in my app....

I'm not quite sure what's going on in either case; are you using the makefile generator plugin for VS .NET? It's not perfect, but with a few modifications it can save you a lot of trouble.
I suspect that the BREWelf2mod problem is indeed in the cygwin environment settings, but I can't tell offhand. The WhiteBoard.c problem might have something to do with the link order (AEEModGen.o must always come first).
Edit:
Ack! I'm now getting that same purge_addressof_1 error that you are, same line number in function.c and everything. Tell me: is line 2046 in whiteboard.c a curly brace ending a function? That's where it says the problem is in my app....

Thank you for your answer. I know it is a annoying question.I don't use the makefile generator plugin for VS .NET.
the make file about "WhiteBoard" is a sample. I only change GCCHOMEPATH, GCCBINPATH, ELF2MODTOOLPATH
and LIBDIRS in my machine.
I can compile AEEModGen.o , AEEAppGen.o , WB_RGBCtrl.o, GCCResolvor.o ,
but WhiteBoard.o happens compiler error.
I can convert a module file by ARM Developer Suite 1.0.1 successfully. Is it possible that convert a module file by GCC?

Thank you for your answer. I know it is a annoying question.I don't use the makefile generator plugin for VS .NET.
the make file about "WhiteBoard" is a sample. I only change GCCHOMEPATH, GCCBINPATH, ELF2MODTOOLPATH
and LIBDIRS in my machine.
I can compile AEEModGen.o , AEEAppGen.o , WB_RGBCtrl.o, GCCResolvor.o ,
but WhiteBoard.o happens compiler error.
I can convert a module file by ARM Developer Suite 1.0.1 successfully. Is it possible that convert a module file by GCC?

You're talking about going from a .elf file to a .mod file? Sure, that's what BREWelf2mod does.
Erm... could you answer the question I asked above about whiteboard.c? I want to see if we can find out what's causing the purge_addressof_1 error.

You're talking about going from a .elf file to a .mod file? Sure, that's what BREWelf2mod does.
Erm... could you answer the question I asked above about whiteboard.c? I want to see if we can find out what's causing the purge_addressof_1 error.

Oh, You met a same error, I think we will change something to make it successfully.
I do not change the WhiteBoard.c.
the link order is AEEModGen.o , AEEAppGen.o , WB_RGBCtrl.o, GCCResolvor.o , WhiteBoard.o
Now WhiteBoard.o can not be compiled , the link doesn't happen.
Would you solve it ?

Oh, You met a same error, I think we will change something to make it successfully.
I do not change the WhiteBoard.c.
the link order is AEEModGen.o , AEEAppGen.o , WB_RGBCtrl.o, GCCResolvor.o , WhiteBoard.o
Now WhiteBoard.o can not be compiled , the link doesn't happen.
Would you solve it ?

You're using the default makefile that comes in GCCSupportForBREW.zip? I just tested that, and it works fine for me; what version of GCC are you using? I'm using 2.95.3.

You're using the default makefile that comes in GCCSupportForBREW.zip? I just tested that, and it works fine for me; what version of GCC are you using? I'm using 2.95.3.

Thank you for your answer.
Yes I am using the default makefile that comes in GCCSupportForBREW.zip. how can I know the version of GCC. the cygwin I downloaded is 1.5.5-1( Latest Cygwin DLL release version ).But the log file in install directory displays version 2.249.2.2. Is it GCC's version? How can I update my GCC to Ver 2.95.3.

Thank you for your answer.
Yes I am using the default makefile that comes in GCCSupportForBREW.zip. how can I know the version of GCC. the cygwin I downloaded is 1.5.5-1( Latest Cygwin DLL release version ).But the log file in install directory displays version 2.249.2.2. Is it GCC's version? How can I update my GCC to Ver 2.95.3.

This is the number I'm looking for:
Go to your GCC directory, and look in the directory structure for the file libgcc.a. In my case, it's in $CYGHOME/devtools/lib/gcc-lib/arm-elf/2.95.3
The name of that last directory is the number you're looking for.

This is the number I'm looking for:
Go to your GCC directory, and look in the directory structure for the file libgcc.a. In my case, it's in $CYGHOME/devtools/lib/gcc-lib/arm-elf/2.95.3
The name of that last directory is the number you're looking for.

//---------------------------------------------------------------------------------------
Thank you for your answer.
I checked my version of the GCC. It is 2.95.3.
the include and lib in my makefile use Version 2.95.3.
I installed the binutils package(binutils-2.11.2.tar.gz),
a bootstrap cross compiler(gcc-2.95.3.tar.gz) and
the newlib C runtime library(newlib-1.9.0.tar.gz) into directory .
But I can't download the debugger(gdb-5.0.tar.gz), So I don't install it. Is it necessary?
this is my install dirctory structure.
home
|_____
| |_____
| |_____
| |_____
| |_____
| |_____
| |_____
| |_____
|_____
|_____
|_____
|_____
|_____
|_____
|_____
|_____
|_____newlib-1.9.0.tar.gz
|_____binutils-2.11.2.tar.gz
|_____gcc-2.95.3.tar.gz
//----------------------------------------------------
makefile: helloworld.mak
TARGET = HelloWorld
EXETYPE = elf
BINARY = bin
MODULE = mod
ADD_OBJS = GCCResolver.o
APP_OBJS = AEEModGen.o AEEAppGen.o $(ADD_OBJS) $(TARGET).o
DEFINES = -DDYNAMIC_APP
GCCHOMEPATH = c:/cygwin/home/sunli/install
GCCBINPATH = $(GCCHOMEPATH)/bin
ELF2MODTOOLPATH = $(GCCHOMEPATH)/bin
AEESRCPATH = ../../src
GCC = $(GCCBINPATH)/arm-elf-gcc.exe
LD = $(GCCBINPATH)/arm-elf-ld.exe
ELF2MODTOOL = $(ELF2MODTOOLPATH)/BREWelf2mod.exe
OPT = -O2
END = -mlittle-endian
TARG = -mthumb
CODE = $(END) -fshort-enums -fno-builtin
INC = -I$(AEEINCPATH) -I$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/2.95.3/include -I$(GCCHOMEPATH)/arm-elf/include
LIBDIRS = -L$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/2.95.3
CPU = -mcpu=arm7tdmi
ROPI =
INTRWK = -mthumb-interwork
APCS = -mapcs-frame $(ROPI) $(INTRWK)
OUT = -c
DBG =
CFLAGS0 = $(OUT) $(DEFINES) $(CPU) $(APCS) $(CODE) $(DBG)
CFLAGS = $(CFLAGS0) $(INC) $(OPT)
#-----------------------------------------------------------------------
# Linker flag definitions
#-----------------------------------------------------------------------
LDFLAGS = $(LIBDIRS)
#-----------------------------------------------------------------------
# Default target
#-----------------------------------------------------------------------
default: $(TARGET).$(MODULE)
#-----------------------------------------------------------------------
# All target
#-----------------------------------------------------------------------
all: $(TARGET).$(MODULE)
#-----------------------------------------------------------------------
# Targets for making the actual binary
#-----------------------------------------------------------------------
$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE)
$(ELF2MODTOOL) $(TARGET).$(EXETYPE) $(TARGET).$(MODULE)
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LDFLAGS) \
$(APP_OBJS) $(LIBS) $(LINK_ORDER)
#-----------------------------------------------------------------------
# Cleanup
#-----------------------------------------------------------------------
clean:
rm -f $(APP_OBJS) $(TARGET).$(EXETYPE) $(TARGET).$(MODULE)
#-----------------------------------------------------------------------
# Object File Dependencies
# You may well want to add more dependencies here.
#-----------------------------------------------------------------------
$(TARGET).o: $(TARGET).c
AEEAppGen.o:
$(GCC) $(CFLAGS) -o AEEAppGen.o $(AEESRCPATH)/AEEAppGen.c
AEEModGen.o:
$(GCC) $(CFLAGS) -o AEEModGen.o $(AEESRCPATH)/AEEModGen.c
GCCResolver.o:
$(GCC) $(CFLAGS) -o GCCResolver.o $(AEESRCPATH)/misc/GCCResolver.c
HelloWorld.o: ./HelloWorld.c
$(GCC) $(CFLAGS) -o HelloWorld.o ./HelloWorld.c
//----------------------------------------------------

//---------------------------------------------------------------------------------------
Thank you for your answer.
I checked my version of the GCC. It is 2.95.3.
the include and lib in my makefile use Version 2.95.3.
I installed the binutils package(binutils-2.11.2.tar.gz),
a bootstrap cross compiler(gcc-2.95.3.tar.gz) and
the newlib C runtime library(newlib-1.9.0.tar.gz) into directory .
But I can't download the debugger(gdb-5.0.tar.gz), So I don't install it. Is it necessary?
this is my install dirctory structure.
home
|_____
| |_____
| |_____
| |_____
| |_____
| |_____
| |_____
| |_____
|_____
|_____
|_____
|_____
|_____
|_____
|_____
|_____
|_____newlib-1.9.0.tar.gz
|_____binutils-2.11.2.tar.gz
|_____gcc-2.95.3.tar.gz
//----------------------------------------------------
makefile: helloworld.mak
TARGET = HelloWorld
EXETYPE = elf
BINARY = bin
MODULE = mod
ADD_OBJS = GCCResolver.o
APP_OBJS = AEEModGen.o AEEAppGen.o $(ADD_OBJS) $(TARGET).o
DEFINES = -DDYNAMIC_APP
GCCHOMEPATH = c:/cygwin/home/sunli/install
GCCBINPATH = $(GCCHOMEPATH)/bin
ELF2MODTOOLPATH = $(GCCHOMEPATH)/bin
AEESRCPATH = ../../src
GCC = $(GCCBINPATH)/arm-elf-gcc.exe
LD = $(GCCBINPATH)/arm-elf-ld.exe
ELF2MODTOOL = $(ELF2MODTOOLPATH)/BREWelf2mod.exe
OPT = -O2
END = -mlittle-endian
TARG = -mthumb
CODE = $(END) -fshort-enums -fno-builtin
INC = -I$(AEEINCPATH) -I$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/2.95.3/include -I$(GCCHOMEPATH)/arm-elf/include
LIBDIRS = -L$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/2.95.3
CPU = -mcpu=arm7tdmi
ROPI =
INTRWK = -mthumb-interwork
APCS = -mapcs-frame $(ROPI) $(INTRWK)
OUT = -c
DBG =
CFLAGS0 = $(OUT) $(DEFINES) $(CPU) $(APCS) $(CODE) $(DBG)
CFLAGS = $(CFLAGS0) $(INC) $(OPT)
#-----------------------------------------------------------------------
# Linker flag definitions
#-----------------------------------------------------------------------
LDFLAGS = $(LIBDIRS)
#-----------------------------------------------------------------------
# Default target
#-----------------------------------------------------------------------
default: $(TARGET).$(MODULE)
#-----------------------------------------------------------------------
# All target
#-----------------------------------------------------------------------
all: $(TARGET).$(MODULE)
#-----------------------------------------------------------------------
# Targets for making the actual binary
#-----------------------------------------------------------------------
$(TARGET).$(MODULE) : $(TARGET).$(EXETYPE)
$(ELF2MODTOOL) $(TARGET).$(EXETYPE) $(TARGET).$(MODULE)
$(TARGET).$(EXETYPE) : $(APP_OBJS)
$(LD) $(LINK_CMD) $(TARGET).$(EXETYPE) $(LDFLAGS) \
$(APP_OBJS) $(LIBS) $(LINK_ORDER)
#-----------------------------------------------------------------------
# Cleanup
#-----------------------------------------------------------------------
clean:
rm -f $(APP_OBJS) $(TARGET).$(EXETYPE) $(TARGET).$(MODULE)
#-----------------------------------------------------------------------
# Object File Dependencies
# You may well want to add more dependencies here.
#-----------------------------------------------------------------------
$(TARGET).o: $(TARGET).c
AEEAppGen.o:
$(GCC) $(CFLAGS) -o AEEAppGen.o $(AEESRCPATH)/AEEAppGen.c
AEEModGen.o:
$(GCC) $(CFLAGS) -o AEEModGen.o $(AEESRCPATH)/AEEModGen.c
GCCResolver.o:
$(GCC) $(CFLAGS) -o GCCResolver.o $(AEESRCPATH)/misc/GCCResolver.c
HelloWorld.o: ./HelloWorld.c
$(GCC) $(CFLAGS) -o HelloWorld.o ./HelloWorld.c
//----------------------------------------------------

Looks like we followed the exact same set of instructions, then, which leaves us at a dead end. I'm going to try finding newer versions of all this software and see if that helps.
GDB is not necessary.

Looks like we followed the exact same set of instructions, then, which leaves us at a dead end. I'm going to try finding newer versions of all this software and see if that helps.
GDB is not necessary.

Thank you for your try.
I use RM Developer Suite 1.0.1 durint these time.
I don't konw whether I can make the file by GCC.
I heard you met a same compiler error ,how can you solve the question at that time.
errror:
.\WhiteBoard.c:2046: Internal compiler error in `purge_addressof_1', at function.c:3183

Thank you for your try.
I use RM Developer Suite 1.0.1 durint these time.
I don't konw whether I can make the file by GCC.
I heard you met a same compiler error ,how can you solve the question at that time.
errror:
.\WhiteBoard.c:2046: Internal compiler error in `purge_addressof_1', at function.c:3183

I just got it working using gcc 3.3.2; I'd be willing to bet that that will solve your problems, too.
Get these files:
http://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.gz
ftp://gatekeeper.dec.com/pub/GNU/gcc/gcc-3.3.2.tar.gz
ftp://sources.redhat.com/pub/newlib/newlib-1.11.0.tar.gz
...and then follow the directions at http://billgatliff.com/articles/gnu/gnu-arm7t.html/x56.html substituting version numbers where appropriate.
Once that's done, edit your makefile such that it's using the proper directories and everything should work fine.

I just got it working using gcc 3.3.2; I'd be willing to bet that that will solve your problems, too.
Get these files:
http://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.gz
ftp://gatekeeper.dec.com/pub/GNU/gcc/gcc-3.3.2.tar.gz
ftp://sources.redhat.com/pub/newlib/newlib-1.11.0.tar.gz
...and then follow the directions at http://billgatliff.com/articles/gnu/gnu-arm7t.html/x56.html substituting version numbers where appropriate.
Once that's done, edit your makefile such that it's using the proper directories and everything should work fine.

Thank you for your suggestion, I will try it by GCC 3.3.2.

Thank you for your suggestion, I will try it by GCC 3.3.2.