Next: 3.2.9 Intermediate Dump Options
Up: 3.2 Command Line Options
Previous: 3.2.7 Optimization Options
Contents
Index
3.2.8 Other Options
- [-c --compile-only]will
compile and assemble the source, but will not call the linkage editor.
- [--c1mode]reads the preprocessed
source from standard input and compiles it. The file name for the
assembler output must be specified using the -o option.
- [-E]Run only the C preprocessor. Preprocess all
the C source files specified and output the results to standard output.
- [-o <path/file>]The output path
resp. file where everything will be placed. If the parameter is a
path, it must have a trailing slash (or backslash for the Windows
binaries) to be recognized as a path.
- [--stack-auto]All functions in
the source file will be compiled as reentrant,
i.e. the parameters and local variables will be allocated on the stack.
See section 3.6 Parameters and
Local Variables for more details. If this option is used all source
files in the project should be compiled with this option. It automatically
implies -int-long-reent and -float-reent.
- [--callee-saves]function1[,function2][,function3]....
The compiler by default uses a caller saves convention for register
saving across function calls, however this can cause unnecessary register
pushing & popping when calling small functions from larger functions.
This option can be used to switch the register saving convention for
the function names specified. The compiler will not save registers
when calling these functions, no extra code will be generated at the
entry & exit (function prologue
& epilogue) for these functions
to save & restore the registers used by these functions, this can
SUBSTANTIALLY reduce code & improve run time performance of the generated
code. In the future the compiler (with inter procedural analysis)
will be able to determine the appropriate scheme to use for each function
call. DO NOT use this option for built-in functions such as _mulint...,
if this option is used for a library function the appropriate library
function needs to be recompiled with the same option. If the project
consists of multiple source files then all the source file should
be compiled with the same --callee-saves option string. Also see
#pragma callee_saves.
- [--debug]When this option is used the
compiler will generate debug information. The debug information collected
in a file with .cdb extension can be used with the SDCDB. For more
information see documentation for SDCDB. Another file with no extension
contains debug information in AOMF or AOMF51
format which is commonly used by third party tools.
- [-S]Stop after the stage of compilation proper;
do not assemble. The output is an assembler code file for the input
file specified.
- [--int-long-reent]Integer
(16 bit) and long (32 bit) libraries have been compiled as reentrant.
Note by default these libraries are compiled as non-reentrant. See
section Installation for more details.
- [--cyclomatic]This option will
cause the compiler to generate an information message for each function
in the source file. The message contains some important information
about the function. The number of edges and nodes the compiler detected
in the control flow graph of the function, and most importantly the
cyclomatic complexity see section
on Cyclomatic Complexity for more details.
- [--float-reent]Floating point
library is compiled as reentrant. See section Installation
for more details.
- [--main-return]This option can
be used if the code generated is called by a monitor program or if
the main routine includes an endless loop. This option might result
in slightly smaller code and save two bytes of stack space. The return
from the 'main' function will return to the function
calling main. The default setting is to lock up i.e. generate a 'sjmp
.'.
- [--nostdinc]This will prevent the
compiler from passing on the default include path to the preprocessor.
- [--nostdlib]This will prevent the
compiler from passing on the default library path
to the linker.
- [--verbose]Shows the various actions
the compiler is performing.
- [-V]Shows the actual commands the compiler is
executing.
- [--no-c-code-in-asm]Hides
your ugly and inefficient c-code from the asm file, so you can always
blame the compiler :)
- [--no-peep-comments]Will
not include peep-hole comments in the generated files.
- [--i-code-in-asm]Include i-codes
in the asm file. Sounds like noise but is most helpful for debugging
the compiler itself.
- [--less-pedantic]Disable some
of the more pedantic warnings (jwk burps: please
be more specific here, please!).
- [--disable-warning <nnnn>]Disable
specific warning with number <nnnn>.
- [--print-search-dirs]Display
the directories in the compiler's search path
- [--vc]Display errors and warnings using
MSVC style, so you can use SDCC with visual studio.
- [--use-stdout]Send errors and
warnings to stdout instead of stderr.
- [-Wa asmOption[,asmOption]...]Pass
the asmOption to the assembler.
See file sdcc/as/doc/asxhtm.html for assembler options.cd
- [--std-sdcc89]Generally follow
the C89 standard, but allow SDCC features that conflict with the standard
(default).
- [--std-c89]Follow the C89 standard
and disable SDCC features that conflict with the standard.
- [--std-sdcc99]Generally follow
the C99 standard, but allow SDCC features that conflict with the standard
(incomplete support).
- [--std-c99]Follow the C99 standard
and disable SDCC features that conflict with the standard (incomplete
support).
- [--codeseg <Name>]The name
to be used for the code segment, default CSEG. This is
useful if you need to tell the compiler to put the code in a special
segment so you can later on tell the linker to put this segment in
a special place in memory. Can be used for instance when using bank
switching to put the code in a bank.
- [--constseg <Name>]The
name to be used for the const segment, default CONST.
This is useful if you need to tell the compiler to put the const data
in a special segment so you can later on tell the linker to put this
segment in a special place in memory. Can be used for instance when
using bank switching to put the const data in a bank.
- [more-pedantic]Actually this is not a SDCC
compiler option but if you want more warnings you can use a
separate tool dedicated to syntax checking like splint
http://www.splint.org. To make your source files parseable
by splint you will have to include lint.h
in your source file and add brackets around extended keywords (like
''__at (0xab)''
and ''__interrupt (2)'').
Splint has an excellent on line manual at http://www.splint.org/manual/
and it's capabilities go beyond pure syntax checking. You'll need
to tell splint the location of SDCC's include files so a typical command
line could look like this:
splint -I /usr/local/share/sdcc/include/mcs51/ myprogram.c
Next: 3.2.9 Intermediate Dump Options
Up: 3.2 Command Line Options
Previous: 3.2.7 Optimization Options
Contents
Index
Erik Petrich
2006-07-28