Configure and compile gcc2.95.2 for ARM (Thumb + ARM instr)

Richard Earnshaw rearnsha@arm.com
Thu Jan 25 04:38:00 GMT 2001


> Hi, I've downloaded, configured, compiled and installed the GNU
> toolchain (2.95.2 ) for arm-elf target.
> I't works fine with ARM-code (32 bit), but I don't now how to generate
> THUMB-code and link it with ARM-code (Interworking). My questions are:
> - the arm-elf configuration of gcc2.95.2 does can generate THUMB objects
> ? if yes, how ?
Not directly -- with 2.95.2 you have to build a separate compiler for 
thumb (configure thumb-elf).  This will change when gcc-3.0 comes out when 
a single compiler will be able to produce both arm and thumb code.

 If no wath version supports interworking?

To compile your file to support interworking add the option 
-mthumb-interwork (this applies when generating both arm and thumb code).

> - how I can swithc between ARM state and Thumb state?

Use the appropriate compiler.  (Note even with gcc-3.0 each compilation 
unit (object file generated) must be either thumb code or arm code.

> - I'm using NewLib 1.9.0. how can I compile it to generate Thumb -code
> and Arm -code libs?

Again, same answer as above (this will be easier with gcc-3 since they 
will then be multi-lib variants).

Richard.




More information about the Gcc mailing list