Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Thumb x Arm
PostPosted: Sun Apr 03, 2005 5:40 pm 
Offline

Joined: Mon Aug 16, 2004 7:05 pm
Posts: 17
Hi all,

Can anyone tell me whitch compiler should i use to generate Thumb code ?
I am using ARM-ELF-GCC for windows ( cygwin ) but it seems to genarate only ARM code !

Thanks in advanced

_________________
Let us hold our heads high


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 03, 2005 8:15 pm 
Offline

Joined: Thu Mar 25, 2004 12:10 am
Posts: 126
Location: Germany
Hi Overcast,
the arm-elf-gcc compiler can also generate thumb code. :)
There are several possibilities how to make this.

For C Files you can use the following compiler options:
-mthumb assemble Thumb code
-mthumb-interwork support ARM/Thumb interworking

Use "arm-elf-gcc --target-help" to get a list for the special arm command line options.

For Assembler files you can use the following (insode the file):
.arm - for ARM 32 code (or .code 16)
.thumb - forthumb code (.code 32)

For C-files it is also possible to use the following preprocessor macros (use the attribute key word for this):
__thumb
__arm

But i do not know how to make this in detail. If you can't get i running, please mail again. :?:

Hint: Interrupts use alwys ARM (32 bit) code)

Best regards,
Edi


Top
 Profile  
 
 Post subject: Arm x Thumb
PostPosted: Mon Apr 04, 2005 12:49 am 
Offline

Joined: Mon Aug 16, 2004 7:05 pm
Posts: 17
Hi edi ...

Are you shure that the arm-elf-gcc for windows ( cygwin ) works fine generating thumb code ? As you wrote , I tried:

-mthumb assemble Thumb code
-mthumb-interwork support ARM/Thumb interworking

but neigther were recognized ... i tried the --help options but got no response

also I tried "arm-elf-gcc --target-help" but the response was :
arm-elf-gcc: No input files

$ arm-elf-gcc --version
2.95.3


Thanks for the quiqly answer !

_________________
Let us hold our heads high


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 06, 2005 10:37 am 
Offline

Joined: Thu Mar 25, 2004 12:10 am
Posts: 126
Location: Germany
Hi,
yes i am sure that the gcc windows version supports arm thumb. I am not sure if it possible to disable this during the build of the compiler.
Quote:
arm-elf-gcc: No input files

This means to me, that something goes wrong with the option. Be sure that you have done:
arm-elf-gcc --target-help

I have check this on a cygwin based gcc version 3.3. This version i have compiled at my own.

Best regards,
Edi


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 06, 2005 5:48 pm 
Offline

Joined: Mon Aug 16, 2004 7:05 pm
Posts: 17
Ok edi ...

I will try harder !

Thank you verry much

_________________
Let us hold our heads high


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron