ARM Ltd. ADS 1.2 Build Tools - Errors and Warnings Page 3
2. ARM C/C++ Compilers (armcc, tcc, armcpp, tccp)
Internal Errors and other unexpected failures
Internal errors in the compiler are typically errors that have occurred but have not yet been documented, orthey may point to a potential "bug" in the compiler itself. If such errors are not present in this document,you will be required to supply an example of the source code that causes the error(s), to your toolssupplier.To facilitate the investigation, please try to send only the single source file or function that is causing theerror, plus the compiler options used when compiling the code. It may be necessary to preprocess the file(i.e. to take account of #include'd header files, etc). To do this, pass the file through the preprocessor asfollows:
armcc <options> –E sourcefile.c > PPsourcefile.c
tcc <options> –E sourcefile.c > PPsourcefile.c
are your normal compile switches, (-O1, -g, -I, -D, etc), but
-c.Check that the error is still reproducible with the preprocessed file by compiling it with:
armcc <options> -c PPsourcefile.c
tcc <options> –c PPsourcefile.c
and then provide the "
file, plus the compile
, to your supplier.
Controlling the Errors and Warnings Messages
This is documented in
ADS 1.2 Compiler and Libraries Guide Sections 2.3.10 and 2.3.12
. Thecompiler will normally warn of potential portability problems and other hazards.When porting legacy code (e.g. in old-style C) to the ARM, many warnings may be reported. It may betempting to disable all such warnings with "
", however, our recommendation, for portability reasons, isto change the code to make it ANSI compatible, rather than suppressing the warnings.Some warnings are suppressed by default. To override this, the "
" switch can be used to enable allthose warnings that are suppressed by default (with the exception of the other -f checks - see section2.3.11, "Specifying additional checks").
List of Errors and Warnings Messages
SWI number 0x12345678 too large
SWI numbers are limited to the range 0 to 0xffffff for the ARM compilers, and 0 to 0xFF for theThumb compilers. For standard "semihosting" SWIs, 0x123456 is used for ARM, 0xAB is used forThumb.
tcc cannot handle __irq functions
interrupt handler C functions can only be compiled with the ARMcompilers, not the Thumb compilers, because it is architecturally defined that exception entry andexit must be executed in ARM state.
an __irq function cannot call functions that use stack checking