ARM compiler cheatsheet

armcc [PCS-options] [source-language] [search-paths] [PCH-options]
[preprocessor-options] [syntax-checking] [C++-language] [output-format]
[target-options] [debug-options] [code-generation-options]
[default-object-extension] [diagnostic-options] [warning-options]
[additional-checks] [error-options] [source]

[PCS-options]
--apcs qualifiers
/adsabi /nointerwork /interwork/noropi /ropi /norwpi /rwpi
/noswstackcheck /swstackcheck

[source-language]
--cpp --c90 --gnu --no_strict --strict_warnings --strict
--anachronisms --no_anachronisms

[search-paths]
--preinclude filename
-Idirectory --kandr_include --sys_include -Jdirectory

[PCH-options]
--pch --create_pch filename --use_pch filename --pch_dir directory
--pch_messages --no_pch_messages --pch_verbose

[preprocessor-options]
-E -C -M -Dname [ (parm-list) ] [ =def ] -Dsymbol[=value] -Uname

[syntax-checking]
--no_code_gen

[C++-language]
--dll_vtbl --exceptions --no_exceptions --exceptions_unwind
--no_exceptions_unwind --force_new_nothrow --implicit_include
--no_implicit_include --pending_instantiations=n
--nonstd_qualifier_deduction --no_nonstd_qualifier_deduction
--rtti --no_rtti --using_std --no_using_std --old_specializations
--no_old_specializations --guiding_decls --no_guiding_decls
--parse_templates --no_parse_templates
--dep_name --no_dep_name --friend_injection --no_friend_injection

[output-format]
--asm -c --interleave --list -o file --depend filename --md -S

[target-options]
--arm --thumb --cpu list --cpu name --fpu list --fpu name

[debug-options]
-g --debug -g- --no_debug --no_debug_macros --debug_macros
--dwarf2

[code-generation-options]
--arm --thumb --littleend --bigend -O0 -O1 -O2 -O3 -Ospace -Otime
--feedback filename --fpmode ieee_full
--fpmode ieee_fixed --fpmode ieee_no_fenv --fpmode std fast
--multifile --vfe --no_vfe --autoinline --no_autoinline
--data_reorder --no_data_reorder --forceinline --no_inline --inline
--lower_ropi --no_lower_ropi --lower_rwpi --no_lower_rwpi
--split_ldm -Oldrd -Ono_ldrd --split_sections
--pointer_alignment=num --memaccess option --min_array_alignment=option
--enum_is_int --dollar --no_dollar --alternative_tokens
--no_alternative_tokens --multibyte_chars --no_multibyte_chars
--locale string --loose_implicit_cast --restrict --no_restrict
--signed_chars --unsigned_chars

[default-object-extension]
--default_extension ext

[diagnostic-options]
--brief_diagnostics --no_brief_diagnostics
--diag_style {arm|ide} --errors efile --remarks --wrap_diagnostics
--no_wrap_diagnostics --diag_error tag[, tag, ...]
--diag_remark tag[, tag, ...] --diag_warning tag[, tag, ...]
--diag_suppress tag[, tag, ...]

[warning-options]
-W

Severity of diagnostic messages

Internal error, Error, Warning, Remark

[The combined object file is named after the first source file]
armcc -c --multifile test1.c ... testn.c
armcc -c --multifile -o test.o test1.c ... testn.c

[The feedback file lists any unused functions.]
armcc -c --feedback unused.txt test.c -o test.o
armlink --feedback unused.txt test.o -o test.axf

[ARM file types]
filename.c [.c, .cpp, .cp, .c++, .ac, .acpp, .tc,.tcpp ]
filename.cc [Implicit include file].
filename.d [Dependency list file]
filename.h [Header file]
filename.o [ARM object file in ELF format]
filename.s [ARM or Thumb assembly language file]
filename.lst [Error and warning list file]
filename.txt [The default output with -S,-asm with --interleave option]

[Include file search paths]
Compiler option <include> search order "include" search order
Neither -I nor -J RVCT21INC CP, RVCT21INC
-J Jdirs CP, and Jdirs
-I RVCT21INC, Idirs CP, Idirs, RVCT21INC
Both -I and - J dirs, IdJirs CP, Idirs, Jdirs
--sys_include No effect Removes CP from the search path
--kandr_include No effect Uses Kernighan and Ritchie search rules