Keil Logo

Technical Support

On-Line Manuals

Assembler User Guide

Preface Overview of the Assembler Overview of the ARM Architecture Structure of Assembly Language Modules Writing ARM Assembly Language Condition Codes Using the Assembler Symbols, Literals, Expressions, and Operators VFP Programming Assembler Command-line Options --16 --32 --apcs=qualifier…qualifier --arm --arm_only --bi --bigend --brief_diagnostics, --no_brief_diagnostics --checkreglist --comment_section, --no_comment_section --compatible=name --cpreproc --cpreproc_opts=option[,option,…] --cpu=list --cpu=name --debug --depend=dependfile --depend_format=string --diag_error=tag[,tag,…] --diag_remark=tag[,tag,…] --diag_style={arm|ide|gnu} --diag_suppress=tag[,tag,…] --diag_warning=tag[,tag,…] --dllexport_all --dwarf2 --dwarf3 --errors=errorfile --execstack, --no_execstack --execute_only --exceptions, --no_exceptions --exceptions_unwind, --no_exceptions_unwind --fpmode=model --fpu=list --fpu=name -g --help -idir[,dir, …] --keep --length=n --li --library_type=lib --liclinger=seconds --list=file --list= --littleend -m --maxcache=n --md --no_code_gen --no_esc --no_hide_all --no_regs --no_terse --no_warn -o filename --pd --predefine "directive" --reduce_paths, --no_reduce_paths --regnames --report-if-not-wysiwyg --show_cmdline --split_ldm --thumb --thumbx --unaligned_access, --no_unaligned_access --unsafe --untyped_local_labels --version_number --via=filename --vsn --width=n --xref ARM and Thumb Instructions VFP Instructions Directives Reference Via File Syntax

--compatible=name

9.11 --compatible=name

Generates code that is compatible with multiple target processors.

Syntax

--compatible=name
Where:
name
is the name of a target processor or None.
Processor names are not case-sensitive.
Specifying None generates code only for the processor specified by --cpu.
If multiple instances of this option are present on the command line, the last one specified overrides the previous instances. Specify --compatible=None at the end of the command line to turn off all other instances of the option.

Default

The default is None.

Usage

Using this option avoids having to reassemble the same source code for different targets.
See the following table. The valid combinations are:
  • --cpu=CPU_from_group1 --compatible=CPU_from_group2.
  • --cpu=CPU_from_group2 --compatible=CPU_from_group1.

Table 9-1 Compatible processor or architecture combinations

Group 1 ARM7TDMI
Group 2 Cortex-M0, Cortex-M1, Cortex-M3, Cortex-M4, 7-M, 6-M, 6S-M, SC300, SC000
No other combinations are permitted.
The effect is to generate code that is compatible with both --cpu and --compatible. This means that only 16-bit Thumb instructions are used. (This is the intersection of the capabilities of group 1 and group 2.)

Note

Although the generated code is compatible with multiple targets, this code might be less efficient than compiling for a single target processor or architecture.

Example

To generate code that is compatible with both the ARM7TDMI processor and the Cortex-M4 processor, specify:
armasm --cpu=arm7tdmi --compatible=cortex-m4 inputfile.s
Related reference
Non-ConfidentialPDF file icon PDF versionARM DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.