6.2.3. Targeting the ARM or Thumb instruction set

You can compile or assemble your sources for the ARM or Thumb instruction set. Table 6.5 shows the settings that enable you to do this.

Table 6.5. Settings for targeting ARM and Thumb

Target instruction setCOMPILE and ASSEMBLE SettingsValue
ARM CCompilation.Compiler Compilation.Checking.Source_languageARM_C C90 [1]
ARM C++Compilation.Compiler Compilation.Checking.Source_languageARM_Cpp CPlusPlus
ARM assemblyAssembly.Assemble_modeARM
Thumb CCompilation.Compiler Compilation.Checking.Source_languageThumb_C C90
Thumb C++Compilation.Compiler Compilation.Checking.Source_languageThumb_Cpp CPlusPlus
Thumb assemblyAssembly.Assemble_modeThumb

[1] This is the default value.

If any of your sources are Thumb C, Thumb C++, or Thumb assembler, RealView Debugger places these in the corresponding arm group. If these sources require the --thumb option when compiling or assembling, you must move them to the corresponding thumb group. For example, if you have a source file thumb.c, this is placed in the COMPILE=arm group, You must remove the file from this group, and add it to the COMPILE=thumb group.

However, if your sources use the per-function instruction (#pragma thumb) and directive (CODE16), you do not have to move them, because these override the settings during the build.

If you include the pragmas or directives in your source code, you generate mixed instruction set code. For this to work properly, you must also use the interworking compiler option. See Targeting specific procedure call standard variants for details.

To see how the assembler directives are used, examine the RVDS example assembler file:


Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0181G