conversion from .lyx
[fw/sdcc] / doc / SDCCWebPage.html
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5    <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; I; Linux 2.2.12-20 i686) [Netscape]">
6    <title>SDCC - Freeware, Optimizing C_Compiler (8051)</title>
7 </head>
8 <body>
9
10 <center>
11 <hr WIDTH="10%">
12 <br><b><font color="#666666"><font size=+3>SDCC</font></font></b>
13 <hr WIDTH="100%">
14 <p><b><font color="#009900"><font size=+2>Official Home of SDCC</font></font></b></center>
15
16 <p><b><font size=+1>What is SDCC ?</font></b>
17 <dl><blckquote>
18 <dl>
19 <dt>
20 <font size=+1><b>SDCC</b> is a<u> </u><b><i><font color="#660000">Free
21 ware , retargettable, optimizing ANSI - C compiler. The</font></i></b>
22 current version targets <b><i><font color="#660000">Intel 8051 </font></i></b>based
23 MCUs, it can be retargeted for other 8 bit MCUs or PICs. The&nbsp; entire
24 source code for the compiler is distributed under GPL. SDCC uses ASXXXX
25 &amp; ASLINK a Free ware, retargettable assembler &amp; linker. SDCC has
26 <b><i><font color="#660000">extensive
27 MCU (8051) specific language extensions, which</font></i></b> lets it utilize
28 the underlying hardware effectively. The front end (parser) will be enhanced
29 to handle language extensions for other MCUs as and when they are targeted.
30 In addition to the MCU Specific optimizations SDCC also does a host of
31 standard optimizations like <b><i><font color="#660000">global sub expression
32 elimination, loop optimizations (loop invariant , strength reduction of
33 induction variables and loop reversing ), constant folding &amp; propagation,
34 copy propagation, dead code elimination and jump tables for 'switch' statements.
35 For</font></i></b> the Back end SDCC uses a <b><i><font color="#660000">global
36 register allocation </font></i></b>scheme which should be well suited for
37 other 8 bit MCUs , the peep hole optimizer uses a rule based substitution
38 mechanism which is MCU independent. Supported data types are <b><i><font color="#660000">short
39 (8</font></i></b> bits, 1 byte), <b><i><font color="#660000">char (8</font></i></b>
40 bits, 1 byte) , int (16 bits, 2 bytes ), <b><i><font color="#660000">long
41 (32</font></i></b> bit, 4 bytes) &amp; <b><i><font color="#660000">float
42 (4</font></i></b> byte IEEE).&nbsp; SDCC also comes with a <b><i>source
43 level debugger</i> SDCDB</b>, the current version of the debugger uses
44 Daniel's s51 simulator. The compiler also allows <b><i><font color="#660000">inline
45 assembler code</font></i></b> to be embedded anywhere in a function. In
46 addition routines developed in assembly can also be called. SDCC also provides
47 an option to report the relative complexity of a function, these functions
48 can then be further optimized , or hand coded in assembly if need be.</font></dt>
49 </dl>
50
51 <dt>
52
53 <hr WIDTH="100%"></dt>
54
55 <br><b><font size=+1>Download [Sun Jan 16 12:08:15 CST 2000]</font></b>
56 <br>&nbsp;
57 <dl><font size=+1>To compile SDCC, <b><i><font color="#993300">Linux (
58 and other Unix )</font> </i></b>users will need to install <i>gcc</i> or
59 any other <i>C</i> compiler. Windows 95/NT users will need to download
60 the <i>full</i> development version of CYGWIN32 from <b><a href="http://sourceware.cygnus.com/cygwin/">http://sourceware.cygnus.com/cygwin/
61 </a></b>.
62 Note that <b>cygnus</b> distributes CYGWIN32 in two packages you will need
63 the <i>full development</i> package, this contains the compiler and other
64 utilities that you will need to compile SDCC, I have not tried compiling
65 the system with any other compiler under MS/Windows.</font>
66 <p><font size=+1>Version 2.1.8 onwards will be distributed in *.tar.gz
67 format, the installation procedure will also change. Installation section
68 of the&nbsp; documentation has been updated to include the new procedure.
69 Click here to download&nbsp; </font><b><font size=+2><a href="ftp://sdcc.sourceforge.net/pub/sdcc/sdcc-2.1.9Ga.tar.gz">sdcc-2.1.9Ga.tar.gz
70 </a></font></b><font size=+1> in
71 the new distribution format. This distribution also contains Daniel's simulator
72 .</font>
73 <p><font size=+1><a href="http://www.kd0yu.com">Vote for the next target
74 of SDCC</a></font>
75 <p><font size=+1>Having trouble downloading ? Here are some alternate site.</font>
76 <dl>
77 <dl>
78 <ul>
79 <li>
80 <b><font size=+1><a href="http://web.kd0yu.com/sdcc/">http://web.kd0yu.com/sdcc/
81 </a></font></b><font size=-1>provided
82 by dave@kd0yu.com</font></li>
83
84 <li>
85 <b><font size=+1><a href="http://www.ozemail.com.au/~bkk/sdcc">http://www.ozemail.com.au/~bkk/sdcc
86 </a></font></b><font size=-1>provided
87 by ben knight bkk@ozemail.com.au></font></li>
88
89 <li>
90 <font size=+1>Two sites </font><font size=-1>provided by irk Verwiebe dirk@verwiebe.de></font></li>
91
92 <br><font size=+1>Binaries on: <b><a href="http://members.aol.com/sdccwin/pub">http://members.aol.com/sdccwin/pub</a></b></font>
93 <br><font size=+1>Sources on: <b><a href="http://members.aol.com/sdccsrc/pub">http://members.aol.com/sdccsrc/pub</a></b></font></ul>
94 </dl>
95 </dl>
96 Looking for Sample code ? Have some code developed for SDCC you want to
97 share ?
98 <b><font size=+1><a href="http://42.fht-esslingen.de/SDCC_OKR/">Click
99 here for the SDCC "Open Knowledge" website</a></font></b>
100 <br>&nbsp;
101 <p><b><font size=+2><a href="ftp://sdcc.sourceforge.net/pub/sdcc/sdcc-2.1.9Gawinbin.tar.gz">Binary distribution
102 of Version 2.1.9Ga </a></font></b><font size=+1>for Windows is available
103 . The distribution is compiled to run from the directory /usr/local. Gunzip
104 &amp; untar the binary distribution at the root (/) directory of the partition/drive
105 you want to install the software on. The source distribution of this version
106 compiles with CYGWIN. <b><a href="cygwininst.txt">Click here to view more
107 detailed installation</a></b> instructions for Win95/NT (provided by Michael
108 Jamet mjamet@computer.org).</font>
109 <p><font size=+1>A binary distribution of the package for DOS can be <b><a href="http://www.geocities.com/SiliconValley/Vista/6552/sdcc.html">downloaded
110 from SET's&nbsp; page.</a></b></font>
111 <p><font size=+2>Michael Hope &lt;michaelh@earthling.net> is working on
112 a Z80 target ,a snapshot of which can be downloaded by <b><a href="http://earthling.net.nz/~michaelh/snapshots/">clicking
113 here.</a></b></font>
114 <p>The debugger works the DDD (Data Display debugger), Terry Porter &lt;tp@gronk.apana.org.au>
115 has a screenshot and a brief HOWTO at <a href=http://www.odyssey.apana.org.au/~tjporter/ddd_sdcc.gif> http://www.odyssey.apana.org.au/~tjporter/ddd_sdcc.gif </a>
116 <p>An alternate simulator &amp; source level debugger can be downloaded
117 from Jens Altmann's JSIM page <b><a href="http://home.t-online.de/home/Jens.Altmann/jsim-e.htm">http://home.t-online.de/home/Jens.Altmann/jsim-e.htm</a></b>
118 <br>&nbsp;
119 <p><font size=+1>Older versions can be <b><a href="http://nipkow.cs.abo.fi">downloaded
120 from Marcus Alanen's Page.</a></b></font>
121 <p><!-- Begin ListBot Code --><form method="post" action="http://www.listbot.com/cgi-bin/subscriber">
122 <table BORDER=0 >
123 <tr>
124 <td COLSPAN="2"><font size=+2>Join our mailing list! Enter your email address
125 below, then click the 'Join List' button:</font></td>
126 </tr>
127
128 <tr>
129 <td><input type=text name="e_mail"><input type=hidden name="list_id" value="sdcc"><input type=hidden name="Act" value="subscribe_list"></td>
130
131 <td><input type=image src="http://www.listbot.com/subscribe_button.gif" border=0 width=88 height=31 alt="Click here to join our mailing list!"></td>
132 </tr>
133
134 <tr>
135 <td COLSPAN="2"><font face="arial"><font size=-2><a href="http://www.listbot.com/" target="_top">Powered
136 by ListBot</a></font></font></td>
137 </tr>
138 </table>
139 </form><!-- End ListBot Code -->
140 <p><font size=+1>You can </font><b><font size=+2><a href="http://sdcc.listbot.com">view
141 the archive</a> </font></b><font size=+1>of messages posted to the mailing
142 list (poor man's FAQ).</font>
143 <p><font size=+1><b><a href="http://www.insidetheweb.com/mbs.cgi/mb576992">Click
144 here for SDCC Message Board </a></b>, maintained by <a href="mailto:ratzefumm@gmx.net">Alex
145 Ratzefumm &lt;ratzefumm@gmx.net> .</a></font>
146 <p>
147 <hr WIDTH="100%"></dl>
148 <b><font size=+1>Documentation</font></b>
149 <br>&nbsp;
150 <dl>
151 <dt>
152 <b><i><font size=+2>SDCC User Guide :</font></i></b></dt>
153
154 <ul>
155 <li>
156 <b><i><font size=+2>&nbsp;<a href="SDCCUdoc.html">HTML Format (included
157 with Source bundle)</a></font></i></b></li>
158
159 <li>
160 <b><i><font size=+2><a href="SDCCUdoc.ps">PostScript Format (Not included
161 with Source Bundle)</a></font></i></b></li>
162
163 <li>
164 <b><i><font size=+2><a href="SDCCUdoc.txt">Plain Text Format. (Not included
165 with source bundle)</a></font></i></b></li>
166 </ul>
167 </dl>
168 </dl>
169
170 <dl>
171 <dl>
172 <dt>
173
174 <hr WIDTH="100%"></dt>
175
176 <dt>
177 </dt>
178 </dl>
179 <b><font size=+1>Known Problems</font></b>
180 <dl>
181 <dl>
182 <li>
183 <font color="#CC0000"><font size=+1>MS/Windows Users note that due to some
184 bugs in the CYGWIN runtime library the compiler generated temporary files
185 are NOT cleared from the </font><b><font size=+2>/tmp </font></b><font size=+1>directory,
186 these have to be manually deleted.</font></font></li>
187
188 <li>
189 <font color="#CC0000"><font size=+1>--xstack options not yet fully implemented.</font></font></li>
190
191 <li>
192 <font color="#CC0000"><font size=+1>first storage class specified overrides
193 in declarations . e.g.,</font></font></li>
194
195 <dl><font color="#CC0000"><font size=+1>short xdata x, idata y.</font></font></dl>
196 <font color="#CC0000"><font size=+1>will declare both x &amp; y in xdata
197 space. The work around for this is to declare variables with different
198 storage classes separately e.g..</font></font>
199 <dl><font color="#CC0000"><font size=+1>xdata short x;</font></font>
200 <br><font color="#CC0000"><font size=+1>idata&nbsp; short y;</font></font></dl>
201 </dl>
202 </dl>
203
204 <dl>
205 <dt>
206
207 <hr WIDTH="100%"></dt>
208
209 <dt>
210 </dt>
211 </dl>
212
213 <dt>
214 <b><font size=+1>Enhancements &amp; Bugs Fixes.</font></b></dt>
215
216 <dl>
217 <dl><font color="#330000"><font size=+1>Click</font><b><font size=+2><a href="SDCCBugsFixed.html">
218 here </a></font></b><font size=+1>to see the enhancements and bug fixes
219 done till date.</font></font></dl>
220
221 <hr WIDTH="100%"></dl>
222 <b><font size=+1>What IDE to use ?</font></b>
223 <br>&nbsp;
224 <dl><font size=+1>I recommend using <b><i><a href="http://www.xemacs.org">XEmacs</a></i></b>,
225 it is free and is also a really GREAT editor. Linux / Unix users can download
226 binaries for their specific platforms from <b><i><a href="ftp://ftp.xemacs.org">ftp://ftp.xemacs.org</a></i></b>
227 .&nbsp; Windows 95/98/NT Users , can download binaries from <b><i><a href="ftp://ftp.xemacs.org/pub/xemacs/binary-kits/win32/">ftp://ftp.xemacs.org/pub/xemacs/binary-kits/win32/</a></i></b></font>
228 <p><font size=+1>The interface files required for the debugger to interact
229 with XEmacs is distributed with the source code.</font></dl>
230
231 <dl>
232 <dl>&nbsp;</dl>
233
234 <hr WIDTH="100%"></dl>
235 <b><font size=+1>Reporting Bugs.</font></b></dl>
236
237 <dl>
238 <dl>
239 <dt>
240 <font size=+1>Click on this </font><b><font size=+2><a href="mailto:sandeep.dutta@usa.net">sandeep.dutta@usa.net</a></font></b><font size=+1>to
241 send me an email, also send an </font><b><font size=+2><a href="mailto:sdcc@listbot.com">email
242 to the mailing list</a></font></b><font size=+1> for the benefit of other
243 users .Bugs will be fixed according to their severity. I will update the
244 Known Problems section. The compiler alone without the assembler , linker,
245 Preprocessor &amp; garbage collector is about 40,000 lines of blank skipped
246 code, as with any project of this size there are bound to be bugs, I will
247 try me level best to fix them as quickly as I can . If you can trace the
248 bug and fix it, please do so, do&nbsp; send me a copy of the fixed source
249 code so I can update my copy.</font></dt>
250
251 <dt>
252
253 <hr WIDTH="100%"></dt>
254
255 <dt>
256 </dt>
257 </dl>
258
259 <dt>
260 <b><font size=+1>Things we are working on .</font></b></dt>
261
262 <dl>
263 <li>
264 <font size=+1>More optimizations.</font></li>
265
266 <li>
267 <font size=+1>Retargeting to for ATMEL AVR (8 bit RISC MCUs).</font></li>
268 </dl>
269 </dl>
270
271 <dl>
272 <dl>
273 <dt>
274
275 <hr WIDTH="100%"></dt>
276
277 <dt>
278 </dt>
279 </dl>
280
281 <dt>
282 <b><font size=+1>Notes for Users of Version 1.xx</font></b></dt>
283
284 <dl>
285 <dt>
286 <font size=+1>For the benefit of&nbsp; users of the previous Version, I
287 have kept the parser almost identical, I have added a few features, but
288 the programs developed using the first version should compile without change
289 with the new version. The command line options however have changed, the
290 compiler will generate a warning when it encounters an older option and
291 prompt you with the new option.</font></dt>
292
293 <dt>
294 <font size=+1>Version 2.xx is a almost a complete rewrite, it is much more
295 stable and ANSI Compliant than the previous version.</font></dt>
296
297 <dt>
298
299 <hr WIDTH="100%"></dt>
300
301 <dt>
302 </dt>
303 </dl>
304
305 <dt>
306 <b><font size=+1>Links</font></b></dt>
307
308 <dl>
309 <dt>
310 <font size=+1>Here are some links I found useful.</font></dt>
311
312 <ul>
313 <li>
314 <font size=+1>Daniel Drotos has a <a href="http://mazsola.iit.uni-miskolc.hu/~drdani/embedded/s51/">Freeware
315 simulator for MCS51.</a>&nbsp; This simulator is distributed with the compiler
316 . I found this simulator very very useful (MUST HAVE).</font></li>
317
318 <li>
319 <font size=+1>J<a href="http://www.caseconsole.com/mcb152">oachim Elen&nbsp;
320 has a 8051 Micro controller board </a>with Packet Radio interface .</font></li>
321
322 <li>
323 <font size=+1><a href="http://www.goofee.com/goofee.htm">Goofee </a>is
324 a very interesting visual programming environment. The software used to
325 be free now you have to buy his book, but worth taking a look.</font></li>
326
327 <li>
328 <font size=+1><a href="http://www.8052.com">www.8052.com</a> is a great
329 site for 8051 programmers.</font></li>
330
331 <li>
332 <font size=+1><a href="http://welcome.to/obukhov">Dimitry Obukhov</a> has
333 some useful routines in C, for&nbsp; I</font><sup>2</sup><font size=+1>C&nbsp;
334 and other stuff. His malloc &amp; serial I/O routines are included with
335 the compiler.</font></li>
336
337 <li>
338 <font size=+1><a href="http://ourworld.compuserve.com/homepages/jhartman">John
339 Hartman </a>sells NoICE, an emulator. He also created ASXXXX &amp; ASLINK
340 for 8051. SDCC will eventually support NoICE.</font></li>
341
342 <li>
343 <font size=+1><a href="http://www.pagesz.net/~thyphoon">Tayfun</a> sells
344 a Single Board Computer based on Phillips 80C552.</font></li>
345 </ul>
346 </dl>
347 </dl>
348
349 <dl>
350 <dl>
351 <hr WIDTH="100%"></dl>
352
353 <dt>
354 <b><font size=+1>Acknowledgments.</font></b></dt>
355
356 <ul>
357 <ul>
358 <li>
359 <font size=+1><a href="mailto:baldwin@shop-pdp.kent.edu">Alan Baldwin (baldwin@shop-pdp.kent.edu)
360 </a>-
361 Initial version of ASXXXX&nbsp; and&nbsp; ASLINK.</font></li>
362
363 <li>
364 <font size=+1>J<a href="jhartman@compuserve.com">ohn Hartman (jhartman@compuserve.com)
365 </a>-
366 Porting ASXXX&nbsp;&nbsp; and ASLINK for 8051.</font></li>
367
368 <li>
369 <font size=+1><a href="mailto:dso@usa.net">Dmitry S. Obukhov (dso@usa.net)</a>
370 - malloc and serial I/O routines.</font></li>
371
372 <li>
373 <font size=+1><a href="boehm@sgi.com">Jans J Boehm(boehm@sgi.com)</a> and
374 Alan J Demers - Conservative garbage collector for C &amp; C++.</font></li>
375
376 <li>
377 <font size=+1><a href="mailto:jlvern@writeme.com">Jean Loius-VERN (jlvern@writeme.com></a>
378 - substantial improvement in the back-end code generation.</font></li>
379
380 <li>
381 <font size=+1><a href="mailto:drdani@mazsola.iit.uni-miskolc.hu">Daniel
382 Drotos &lt;drdani@mazsola.iit.uni-miskolc.hu> </a>- Free ware simulator
383 for 8051.</font></li>
384
385 <li>
386 <font size=+1><a href="mailto:malini_dutta@hotmail.com">Malini Dutta(malini@mediaone.net)</a>
387 - my wife for her patience and support.</font></li>
388
389 <li>
390 <font size=+1>Unknown - for the GNU C - preprocessor.</font></li>
391 </ul>
392 </ul>
393 </dl>
394
395 <center>This page has been accessed&nbsp;<img SRC="/cgi-bin/counter" > times since
396 March 6th 1999</center>
397
398 </body>
399 </html>