SDCC argumentos » History » Version 1

Txinto Vaz, 09/08/2013 03:53 PM

1 1 Txinto Vaz
h1. SDCC argumentos
2 1 Txinto Vaz
3 1 Txinto Vaz
<pre>
4 1 Txinto Vaz
SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.2.0 #8008 (Jul 27 2012) (Linux)
5 1 Txinto Vaz
Usage : sdcc [options] filename
6 1 Txinto Vaz
Options :-
7 1 Txinto Vaz
8 1 Txinto Vaz
General options:
9 1 Txinto Vaz
      --help                Display this help
10 1 Txinto Vaz
  -v  --version             Display sdcc's version
11 1 Txinto Vaz
      --verbose             Trace calls to the preprocessor, assembler, and linker
12 1 Txinto Vaz
  -V                        Execute verbosely. Show sub commands as they are run
13 1 Txinto Vaz
  -d                        
14 1 Txinto Vaz
  -D                        Define macro as in -Dmacro
15 1 Txinto Vaz
  -I                        Add to the include (*.h) path, as in -Ipath
16 1 Txinto Vaz
  -A                        
17 1 Txinto Vaz
  -U                        
18 1 Txinto Vaz
  -M                        Preprocessor option
19 1 Txinto Vaz
  -W                        Pass through options to the pre-processor (p), assembler (a) or linker (l)
20 1 Txinto Vaz
  -S                        Compile only; do not assemble or link
21 1 Txinto Vaz
  -c  --compile-only        Compile and assemble, but do not link
22 1 Txinto Vaz
  -E  --preprocessonly      Preprocess only, do not compile
23 1 Txinto Vaz
      --c1mode              Act in c1 mode.  The standard input is preprocessed code, the output is assembly code.
24 1 Txinto Vaz
  -o                        Place the output into the given path resp. file
25 1 Txinto Vaz
      --print-search-dirs   display the directories in the compiler's search path
26 1 Txinto Vaz
      --vc                  messages are compatible with Micro$oft visual studio
27 1 Txinto Vaz
      --use-stdout          send errors to stdout instead of stderr
28 1 Txinto Vaz
      --nostdlib            Do not include the standard library directory in the search path
29 1 Txinto Vaz
      --nostdinc            Do not include the standard include directory in the search path
30 1 Txinto Vaz
      --less-pedantic       Disable some of the more pedantic warnings
31 1 Txinto Vaz
      --disable-warning     <nnnn> Disable specific warning
32 1 Txinto Vaz
      --Werror              Treat the warnings as errors
33 1 Txinto Vaz
      --debug               Enable debugging symbol output
34 1 Txinto Vaz
      --cyclomatic          Display complexity of compiled functions
35 1 Txinto Vaz
      --std-c89             Use C89 standard (sligthly incomplete)
36 1 Txinto Vaz
      --std-sdcc89          Use C89 standard with SDCC extensions (default)
37 1 Txinto Vaz
      --std-c99             Use C99 standard (incomplete)
38 1 Txinto Vaz
      --std-sdcc99          Use C99 standard with SDCC extensions
39 1 Txinto Vaz
      --std-c11             Use C11 standard (very incomplete)
40 1 Txinto Vaz
      --fdollars-in-identifiers  Permit '$' as an identifier character
41 1 Txinto Vaz
      --funsigned-char      Make "char" unsigned by default
42 1 Txinto Vaz
      --use-non-free        Search / include non-free licensed libraries and header files
43 1 Txinto Vaz
44 1 Txinto Vaz
Code generation options:
45 1 Txinto Vaz
  -m                        Set the port to use e.g. -mz80.
46 1 Txinto Vaz
  -p                        Select port specific processor e.g. -mpic14 -p16f84
47 1 Txinto Vaz
      --model-small         internal data space is used (default)
48 1 Txinto Vaz
      --model-medium        external paged data space is used
49 1 Txinto Vaz
      --model-large         external data space is used
50 1 Txinto Vaz
      --model-huge          functions are banked, data in external space
51 1 Txinto Vaz
      --stack-auto          Stack automatic variables
52 1 Txinto Vaz
      --xstack              Use external stack
53 1 Txinto Vaz
      --int-long-reent      Use reentrant calls on the int and long support functions
54 1 Txinto Vaz
      --float-reent         Use reentrant calls on the float support functions
55 1 Txinto Vaz
      --main-return         Issue a return after main()
56 1 Txinto Vaz
      --xram-movc           Use movc instead of movx to read xram (xdata)
57 1 Txinto Vaz
      --callee-saves        <func[,func,...]> Cause the called function to save registers instead of the caller
58 1 Txinto Vaz
      --profile             On supported ports, generate extra profiling information
59 1 Txinto Vaz
      --fomit-frame-pointer  Leave out the frame pointer.
60 1 Txinto Vaz
      --all-callee-saves    callee will always save registers used
61 1 Txinto Vaz
      --stack-probe         insert call to function __stack_probe at each function prologue
62 1 Txinto Vaz
      --no-xinit-opt        don't memcpy initialized xram from code
63 1 Txinto Vaz
      --no-c-code-in-asm    don't include c-code as comments in the asm file
64 1 Txinto Vaz
      --no-peep-comments    don't include peephole optimizer comments
65 1 Txinto Vaz
      --fverbose-asm        include code generator comments
66 1 Txinto Vaz
      --short-is-8bits      Make short 8 bits (for old times sake)
67 1 Txinto Vaz
      --codeseg             <name> use this name for the code segment
68 1 Txinto Vaz
      --constseg            <name> use this name for the const segment
69 1 Txinto Vaz
70 1 Txinto Vaz
Optimization options:
71 1 Txinto Vaz
      --nooverlay           Disable overlaying leaf function auto variables
72 1 Txinto Vaz
      --nogcse              Disable the GCSE optimisation
73 1 Txinto Vaz
      --nolabelopt          Disable label optimisation
74 1 Txinto Vaz
      --noinvariant         Disable optimisation of invariants
75 1 Txinto Vaz
      --noinduction         Disable loop variable induction
76 1 Txinto Vaz
      --nojtbound           Don't generate boundary check for jump tables
77 1 Txinto Vaz
      --noloopreverse       Disable the loop reverse optimisation
78 1 Txinto Vaz
      --no-peep             Disable the peephole assembly file optimisation
79 1 Txinto Vaz
      --no-reg-params       On some ports, disable passing some parameters in registers
80 1 Txinto Vaz
      --peep-asm            Enable peephole optimization on inline assembly
81 1 Txinto Vaz
      --peep-return         Enable peephole optimization for return instructions
82 1 Txinto Vaz
      --no-peep-return      Disable peephole optimization for return instructions
83 1 Txinto Vaz
      --peep-file           <file> use this extra peephole file
84 1 Txinto Vaz
      --opt-code-speed      Optimize for code speed rather than size
85 1 Txinto Vaz
      --opt-code-size       Optimize for code size rather than speed
86 1 Txinto Vaz
      --max-allocs-per-node  Maximum number of register assignments considered at each node of the tree decomposition
87 1 Txinto Vaz
88 1 Txinto Vaz
Internal debugging options:
89 1 Txinto Vaz
      --dumpraw             Dump the internal structure after the initial parse
90 1 Txinto Vaz
      --dumpgcse            
91 1 Txinto Vaz
      --dumploop            
92 1 Txinto Vaz
      --dumpdeadcode        
93 1 Txinto Vaz
      --dumpliverange       
94 1 Txinto Vaz
      --dumpregpack         
95 1 Txinto Vaz
      --dumpregassign       
96 1 Txinto Vaz
      --dumptree            dump front-end AST before generating iCode
97 1 Txinto Vaz
      --dumpall             Dump the internal structure at all stages
98 1 Txinto Vaz
      --i-code-in-asm       include i-code as comments in the asm file
99 1 Txinto Vaz
      --dump-graphs         Dump graphs (control-flow, conflict, etc)
100 1 Txinto Vaz
101 1 Txinto Vaz
Linker options:
102 1 Txinto Vaz
  -l                        Include the given library in the link
103 1 Txinto Vaz
  -L                        Add the next field to the library search path
104 1 Txinto Vaz
      --lib-path            <path> use this path to search for libraries
105 1 Txinto Vaz
      --out-fmt-ihx         Output in Intel hex format
106 1 Txinto Vaz
      --out-fmt-s19         Output in S19 hex format
107 1 Txinto Vaz
      --xram-loc            <nnnn> External Ram start location
108 1 Txinto Vaz
      --xram-size           <nnnn> External Ram size
109 1 Txinto Vaz
      --iram-size           <nnnn> Internal Ram size
110 1 Txinto Vaz
      --xstack-loc          <nnnn> External Stack start location
111 1 Txinto Vaz
      --code-loc            <nnnn> Code Segment Location
112 1 Txinto Vaz
      --code-size           <nnnn> Code Segment size
113 1 Txinto Vaz
      --stack-loc           <nnnn> Stack pointer initial value
114 1 Txinto Vaz
      --data-loc            <nnnn> Direct data start location
115 1 Txinto Vaz
      --idata-loc           
116 1 Txinto Vaz
      --no-optsdcc-in-asm   Do not emit .optsdcc in asm
117 1 Txinto Vaz
118 1 Txinto Vaz
Special options for the mcs51 port:
119 1 Txinto Vaz
      --stack-size          Tells the linker to allocate this space for stack
120 1 Txinto Vaz
      --parms-in-bank1      use Bank1 for parameter passing
121 1 Txinto Vaz
      --pack-iram           Tells the linker to pack variables in internal ram (default)
122 1 Txinto Vaz
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
123 1 Txinto Vaz
      --acall-ajmp          Use acall/ajmp instead of lcall/ljmp
124 1 Txinto Vaz
125 1 Txinto Vaz
Special options for the gbz80 port:
126 1 Txinto Vaz
      -bo                   <num> use code bank <num>
127 1 Txinto Vaz
      -ba                   <num> use data bank <num>
128 1 Txinto Vaz
      --callee-saves-bc     Force a called function to always save BC
129 1 Txinto Vaz
      --codeseg             <name> use this name for the code segment
130 1 Txinto Vaz
      --constseg            <name> use this name for the const segment
131 1 Txinto Vaz
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
132 1 Txinto Vaz
133 1 Txinto Vaz
Special options for the z80 port:
134 1 Txinto Vaz
      --callee-saves-bc     Force a called function to always save BC
135 1 Txinto Vaz
      --portmode=           Determine PORT I/O mode (z80/z180)
136 1 Txinto Vaz
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
137 1 Txinto Vaz
      --codeseg             <name> use this name for the code segment
138 1 Txinto Vaz
      --constseg            <name> use this name for the const segment
139 1 Txinto Vaz
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
140 1 Txinto Vaz
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
141 1 Txinto Vaz
      --oldralloc           Use old register allocator
142 1 Txinto Vaz
143 1 Txinto Vaz
Special options for the z180 port:
144 1 Txinto Vaz
      --callee-saves-bc     Force a called function to always save BC
145 1 Txinto Vaz
      --portmode=           Determine PORT I/O mode (z80/z180)
146 1 Txinto Vaz
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
147 1 Txinto Vaz
      --codeseg             <name> use this name for the code segment
148 1 Txinto Vaz
      --constseg            <name> use this name for the const segment
149 1 Txinto Vaz
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
150 1 Txinto Vaz
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
151 1 Txinto Vaz
      --oldralloc           Use old register allocator
152 1 Txinto Vaz
153 1 Txinto Vaz
Special options for the r2k port:
154 1 Txinto Vaz
      --callee-saves-bc     Force a called function to always save BC
155 1 Txinto Vaz
      --portmode=           Determine PORT I/O mode (z80/z180)
156 1 Txinto Vaz
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
157 1 Txinto Vaz
      --codeseg             <name> use this name for the code segment
158 1 Txinto Vaz
      --constseg            <name> use this name for the const segment
159 1 Txinto Vaz
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
160 1 Txinto Vaz
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
161 1 Txinto Vaz
      --oldralloc           Use old register allocator
162 1 Txinto Vaz
163 1 Txinto Vaz
Special options for the r3ka port:
164 1 Txinto Vaz
      --callee-saves-bc     Force a called function to always save BC
165 1 Txinto Vaz
      --portmode=           Determine PORT I/O mode (z80/z180)
166 1 Txinto Vaz
      --asm=                Define assembler name (rgbds/asxxxx/isas/z80asm)
167 1 Txinto Vaz
      --codeseg             <name> use this name for the code segment
168 1 Txinto Vaz
      --constseg            <name> use this name for the const segment
169 1 Txinto Vaz
      --no-std-crt0         For the z80/gbz80 do not link default crt0.rel
170 1 Txinto Vaz
      --reserve-regs-iy     Do not use IY (incompatible with --fomit-frame-pointer)
171 1 Txinto Vaz
      --oldralloc           Use old register allocator
172 1 Txinto Vaz
173 1 Txinto Vaz
Special options for the ds390 port:
174 1 Txinto Vaz
      --model-flat24        use the flat24 model for the ds390 (default)
175 1 Txinto Vaz
      --stack-8bit          use the 8bit stack for the ds390 (not supported yet)
176 1 Txinto Vaz
      --stack-size          Tells the linker to allocate this space for stack
177 1 Txinto Vaz
      --pack-iram           Tells the linker to pack variables in internal ram (default)
178 1 Txinto Vaz
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
179 1 Txinto Vaz
      --stack-10bit         use the 10bit stack for ds390 (default)
180 1 Txinto Vaz
      --use-accelerator     generate code for ds390 arithmetic accelerator
181 1 Txinto Vaz
      --protect-sp-update   will disable interrupts during ESP:SP updates
182 1 Txinto Vaz
      --parms-in-bank1      use Bank1 for parameter passing
183 1 Txinto Vaz
184 1 Txinto Vaz
Special options for the pic16 port:
185 1 Txinto Vaz
      --pstack-model=       use stack model 'small' (default) or 'large'
186 1 Txinto Vaz
  -y  --extended            enable Extended Instruction Set/Literal Offset Addressing mode
187 1 Txinto Vaz
      --pno-banksel         do not generate BANKSEL assembler directives
188 1 Txinto Vaz
      --obanksel=           set banksel optimization level (default=0 no)
189 1 Txinto Vaz
      --denable-peeps       explicit enable of peepholes
190 1 Txinto Vaz
      --no-optimize-goto    do NOT use (conditional) BRA instead of GOTO
191 1 Txinto Vaz
      --optimize-cmp        try to optimize some compares
192 1 Txinto Vaz
      --optimize-df         thoroughly analyze data flow (memory and time intensive!)
193 1 Txinto Vaz
      --asm=                Use alternative assembler
194 1 Txinto Vaz
      --mplab-comp          enable compatibility mode for MPLAB utilities (MPASM/MPLINK)
195 1 Txinto Vaz
      --link=               Use alternative linker
196 1 Txinto Vaz
      --preplace-udata-with=  Place udata variables at another section: udata_acs, udata_ovr, udata_shr
197 1 Txinto Vaz
      --ivt-loc=            Set address of interrupt vector table.
198 1 Txinto Vaz
      --nodefaultlibs       do not link default libraries when linking
199 1 Txinto Vaz
      --use-crt=            use <crt-o> run-time initialization module
200 1 Txinto Vaz
      --no-crt              do not link any default run-time initialization module
201 1 Txinto Vaz
      --debug-xtra          show more debug info in assembly output
202 1 Txinto Vaz
      --debug-ralloc        dump register allocator debug file *.d
203 1 Txinto Vaz
      --pcode-verbose       dump pcode related info
204 1 Txinto Vaz
      --calltree            dump call tree in .calltree file
205 1 Txinto Vaz
      --gstack              trace stack pointer push/pop to overflow
206 1 Txinto Vaz
207 1 Txinto Vaz
Special options for the pic14 port:
208 1 Txinto Vaz
      --debug-xtra          show more debug info in assembly output
209 1 Txinto Vaz
      --no-pcode-opt        disable (slightly faulty) optimization on pCode
210 1 Txinto Vaz
      --stack-size          sets the size if the argument passing stack (default: 16, minimum: 4)
211 1 Txinto Vaz
212 1 Txinto Vaz
Special options for the TININative port:
213 1 Txinto Vaz
      --model-flat24        use the flat24 model for the ds390 (default)
214 1 Txinto Vaz
      --stack-8bit          use the 8bit stack for the ds390 (not supported yet)
215 1 Txinto Vaz
      --stack-size          Tells the linker to allocate this space for stack
216 1 Txinto Vaz
      --pack-iram           Tells the linker to pack variables in internal ram (default)
217 1 Txinto Vaz
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
218 1 Txinto Vaz
      --stack-10bit         use the 10bit stack for ds390 (default)
219 1 Txinto Vaz
      --use-accelerator     generate code for ds390 arithmetic accelerator
220 1 Txinto Vaz
      --protect-sp-update   will disable interrupts during ESP:SP updates
221 1 Txinto Vaz
      --parms-in-bank1      use Bank1 for parameter passing
222 1 Txinto Vaz
      --tini-libid          <nnnn> LibraryID used in -mTININative
223 1 Txinto Vaz
224 1 Txinto Vaz
Special options for the ds400 port:
225 1 Txinto Vaz
      --model-flat24        use the flat24 model for the ds400 (default)
226 1 Txinto Vaz
      --stack-8bit          use the 8bit stack for the ds400 (not supported yet)
227 1 Txinto Vaz
      --stack-size          Tells the linker to allocate this space for stack
228 1 Txinto Vaz
      --pack-iram           Tells the linker to pack variables in internal ram (default)
229 1 Txinto Vaz
      --no-pack-iram        Deprecated: Tells the linker not to pack variables in internal ram
230 1 Txinto Vaz
      --stack-10bit         use the 10bit stack for ds400 (default)
231 1 Txinto Vaz
      --use-accelerator     generate code for ds400 arithmetic accelerator
232 1 Txinto Vaz
      --protect-sp-update   will disable interrupts during ESP:SP updates
233 1 Txinto Vaz
      --parms-in-bank1      use Bank1 for parameter passing
234 1 Txinto Vaz
235 1 Txinto Vaz
Special options for the hc08 port:
236 1 Txinto Vaz
      --out-fmt-elf         Output executable in ELF format
237 1 Txinto Vaz
      --oldralloc           Use old register allocator
238 1 Txinto Vaz
239 1 Txinto Vaz
Special options for the s08 port:
240 1 Txinto Vaz
      --out-fmt-elf         Output executable in ELF format
241 1 Txinto Vaz
      --oldralloc           Use old register allocator
242 1 Txinto Vaz
243 1 Txinto Vaz
</pre>