Forum : ARM
Post Information | Post |
---|---|
June 17, 2007 - 5:39pm
|
Hi All There is a post about this (http://www.raisonance.com/Forum/punbb/viewtopic.php?id=2167) but it doesn't seem to reach a conclusion, therefore I will ask here again. I am using RIDE Version 06.10.22, Build number BN745-ST7-ARM-80C51. When I set the target option "Use Thumb mode" I get Thumb code. In the log file the GCC option -mthumb is seen. Only when not using -mthumb-interwork is the -mthumb flag also being set. Is this a problem in the RIDE version which I am using? I see also that the project (set up for STR912F44) is using the flag -march=armv5te. The GCC has also a cpu flag (-mcpu=arm966e-s) - is there any advantage of setting this as well??? Best regards Mark Butcher |
Hi,
When the interwork option is active, it means that you plan to compile some files in ARM and some other files in thumb. Therefore, the global "thumb" option in the target options is not used anymore. Instead, the thumb option in the compiler options is used.
Activate the interwork option in the target options. Then, click "options"->"project"->"GCC-ARM"->"ARM-specific options", and you will see the "generate thumb code" option that was not there before you activated interwork. (and also an option in the assembler section) Now you can use this new option to select thumb or ARM specifically for each source file using the local options. (right-click on a source file in the project view, then select "options"->"local options")
I hope it answers your questions.
Best Regards,
Vincent
Hi Vincent
You are correct, it does operate this way (although it is not very obvious).
I solved it by doing the following:
I didn't select any of the options but added –mthumb and -mthumb-interwork to the GCC C options under ‘more’ and -mthumb-interwork to the asm options under 'more'.
I have just reworked it with your technique and obtained the same result. Thanks.
Regards
Mark