#8010 - johnny_north - Mon Jun 30, 2003 6:35 pm
I?ve been having difficulties compiling my code thumb mode. I?ve developed a sizable project and it compiles and runs fine in arm using DevKit R4 and C++. When I began to compile in thumb, I was getting errors that I suspected were related to C++, but now I not so sure. After ripping up my make file and separating the rules to compile each C++ file separately, I began to notice several distinct errors.
First, code in .cpp files compiles fine except when a member function calls another member function of the same class. In these cases I can force the compiler to accept the code and compile in thumb only if I add ?inline? to the function definition. Of course, I don?t always want this to happen, and most of the time I would rather the code branch to, rather that inline the called function. Anyone have an idea about this?
Second, some inline assembly code calling the swi lz77 decompression is causing an error: ?invalid swi instruction?. The swi compiles fine in arm though.
Third, it appears that files that have mixed C/C++ (i.e. files with mixed class scoped and file scoped functions) also produce errors, although I haven?t thoroughly explored this problem yet.
I?m using the following cpp flags:
CFLAGS = -I $(INCDIR2) -I $(INCDIR) -I $(PRJDIR) -mthumb-interwork ?mthumb -mlong-calls -c -g -Wall -fverbose-asm
Any suggestions would be appreciated.
First, code in .cpp files compiles fine except when a member function calls another member function of the same class. In these cases I can force the compiler to accept the code and compile in thumb only if I add ?inline? to the function definition. Of course, I don?t always want this to happen, and most of the time I would rather the code branch to, rather that inline the called function. Anyone have an idea about this?
Second, some inline assembly code calling the swi lz77 decompression is causing an error: ?invalid swi instruction?. The swi compiles fine in arm though.
Third, it appears that files that have mixed C/C++ (i.e. files with mixed class scoped and file scoped functions) also produce errors, although I haven?t thoroughly explored this problem yet.
I?m using the following cpp flags:
CFLAGS = -I $(INCDIR2) -I $(INCDIR) -I $(PRJDIR) -mthumb-interwork ?mthumb -mlong-calls -c -g -Wall -fverbose-asm
Any suggestions would be appreciated.