Using this option avoids the need to recompile the same source
code for different targets. You could apply this use to a possible
target upgrade where a different architecture or processor is to be
used in the future, without having to separately recompile for that
target.
See Table 2. The
valid combinations are:
Table 2. Compatible processor or architecture combinations
| Group 1 | ARM7TDMI, 4T |
| 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 compile 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.