]> git.gag.com Git - fw/sdcc/blobdiff - doc/sdccman.lyx
Applied patch #2762516
[fw/sdcc] / doc / sdccman.lyx
index a949aecabd82e4ea46571492c5287d99bde66efc..4d528bf077c291ab369e58f1985b815f5ae0562f 100644 (file)
@@ -1,4 +1,4 @@
-#LyX 1.5.6 created this file. For more info see http://www.lyx.org/
+#LyX 1.5.7 created this file. For more info see http://www.lyx.org/
 \lyxformat 276
 \begin_document
 \begin_header
 \lyxformat 276
 \begin_document
 \begin_header
@@ -114,13 +114,13 @@ SDCC Compiler User Guide
 \begin_layout Date
 
 \size normal
 \begin_layout Date
 
 \size normal
-SDCC 2.8.9
+SDCC 2.9.1
 \size footnotesize
 
 \newline
 \size footnotesize
 
 \newline
-$Date: 2008-11-16#
+$Date::             
 \newline
 \newline
-$Revision: 5272$
+$Revision$
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
@@ -203,7 +203,7 @@ name "aslink"
 
 \end_inset
 
 
 \end_inset
 
-, an open source retargetable assembler & linker.
+, an free open source retargetable assembler & linker.
  SDCC has extensive language extensions suitable for utilizing various microcont
 rollers and underlying hardware effectively.
  
  SDCC has extensive language extensions suitable for utilizing various microcont
 rollers and underlying hardware effectively.
  
@@ -735,11 +735,7 @@ Open Source
 \begin_layout Standard
 All packages used in this compiler system are 
 \emph on
 \begin_layout Standard
 All packages used in this compiler system are 
 \emph on
-open source
-\emph default
- and 
-\emph on
-freeware
+free open source
 \emph default
 ; source code for all the sub-packages (pre-processor, assemblers, linkers
  etc.) is distributed with the package.
 \emph default
 ; source code for all the sub-packages (pre-processor, assemblers, linkers
  etc.) is distributed with the package.
@@ -4245,7 +4241,7 @@ Unpack the file using a command like:
  
 \family sans
 \series bold
  
 \family sans
 \series bold
-"tar -xvzf sdcc-src-yyyymmdd-rrrr.tar.bz2
+"tar -xvjf sdcc-src-yyyymmdd-rrrr.tar.bz2
 \begin_inset Quotes srd
 \end_inset
 
 \begin_inset Quotes srd
 \end_inset
 
@@ -4984,13 +4980,28 @@ cd ~\InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
 # cd $HOME
 \end_layout
 
 \begin_layout Standard
 
 \family typewriter
 # cd $HOME
 \end_layout
 
 \begin_layout Standard
 
 \family typewriter
-tar -xzf sdcc.src.tar.gz\InsetSpace ~
+tar -xjf sdcc-src-yyyymmdd-rrrr.tar.bz2\InsetSpace ~
 # extract source to directory sdcc
 \end_layout
 
 # extract source to directory sdcc
 \end_layout
 
@@ -5006,6 +5017,21 @@ mkdir sdcc.build\InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
 # put output in sdcc.build
 \end_layout
 
 # put output in sdcc.build
 \end_layout
 
@@ -5026,6 +5052,21 @@ cd sdcc.build
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
 \InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
 # configure is doing all the magic!
 \end_layout
 
 # configure is doing all the magic!
 \end_layout
 
@@ -7082,6 +7123,84 @@ name "-\\/-debug"
  is embedded in the library file itself.
  Library files created using sdcclib are used as described in the preceding
  sections.
  is embedded in the library file itself.
  Library files created using sdcclib are used as described in the preceding
  sections.
+\end_layout
+
+\begin_layout Subsection
+Using ar to Create and Manage Libraries
+\begin_inset LatexCommand index
+name "ar"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Support for ar format libraries was introduced in sdcc 2.9.0.
+ Ar is a standard archive managing utility on unices (Linux, Mac OS X, several
+ unix flavors) so it is not included in the sdcc package.
+\series bold
+
+\newline
+
+\newline
+
+\series default
+For Windows platform you can find ar utility in GNU binutils package included
+ in several projects: Cygwin at 
+\begin_inset LatexCommand url
+target "http://www.cygwin.com/"
+
+\end_inset
+
+, MinGW at 
+\begin_inset LatexCommand url
+target "http://www.mingw.org/"
+
+\end_inset
+
+.
+\series bold
+
+\newline
+
+\newline
+
+\series default
+Both the GNU and BSD ar format variants are suppurated by asxxxx linkers.
+ Ar doesn't understand the asxxxx object file format, so there is a special
+ version of ranlib distributed with sdcc, called asranlib, which produces
+ the ar symbol lookup table.
+\series bold
+
+\newline
+
+\newline
+
+\series default
+To create a library containing asxxxx object files, you should use the following
+ sequence:
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+ar -Sq <library name>.lib <list of .rel files>
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+asranlib <library name>.lib
+\end_layout
+
+\begin_layout Standard
 \begin_inset VSpace bigskip
 \end_inset
 
 \begin_inset VSpace bigskip
 \end_inset
 
@@ -7689,16 +7808,16 @@ name "sdcpp (preprocessor)"
 \end_inset
 
 .
 \end_inset
 
 .
- SDCC uses an adapted version of the preprocessor 
-\emph on
-cpp
-\emph default
- of the GNU Compiler Collection
+ SDCC uses an adapted version of the GNU Compiler Collection
 \begin_inset LatexCommand index
 name "gcc (GNU Compiler Collection)"
 
 \end_inset
 
 \begin_inset LatexCommand index
 name "gcc (GNU Compiler Collection)"
 
 \end_inset
 
+ preprocessor 
+\emph on
+cpp
+\emph default
  (
 \emph on
 gcc
  (
 \emph on
 gcc
@@ -7709,11 +7828,11 @@ target "http://gcc.gnu.org/"
 
 \end_inset
 
 
 \end_inset
 
-), if you need more dedicated options please refer to the GCC\InsetSpace ~
-4.1.1\InsetSpace ~
+).
+ If you need more dedicated options please refer to the GCC\InsetSpace ~
 CPP\InsetSpace ~
 CPP\InsetSpace ~
-Manual
- at 
+Manual at
 \begin_inset LatexCommand htmlurl
 target "http://www.gnu.org/software/gcc/onlinedocs/"
 
 \begin_inset LatexCommand htmlurl
 target "http://www.gnu.org/software/gcc/onlinedocs/"
 
@@ -7775,7 +7894,7 @@ name "-\\/-lib-path <path>"
 
 
 \begin_inset LatexCommand index
 
 
 \begin_inset LatexCommand index
-name "-L -\\/-lib-path"
+name "-L <path>"
 
 \end_inset
 
 
 \end_inset
 
@@ -10059,6 +10178,41 @@ name "Options other"
 \begin_layout List
 \labelwidthstring 00.00.0000
 
 \begin_layout List
 \labelwidthstring 00.00.0000
 
+\series bold
+-v\InsetSpace ~
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-version
+\begin_inset LatexCommand index
+name "-\\/-version"
+
+\end_inset
+
+
+\begin_inset LatexCommand index
+name "-v"
+
+\end_inset
+
+
+\series default
+ displays the sdcc version.
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
 \series bold
 -c\InsetSpace ~
 -
 \series bold
 -c\InsetSpace ~
 -
@@ -10082,7 +10236,7 @@ name "-\\/-compile-only"
 
 
 \begin_inset LatexCommand index
 
 
 \begin_inset LatexCommand index
-name "-c -\\/-compile-only"
+name "-c"
 
 \end_inset
 
 
 \end_inset
 
@@ -21000,8 +21154,26 @@ name "printf()"
 \family typewriter
 printf_large.c
 \family default
 \family typewriter
 printf_large.c
 \family default
- does not support float (except on ds390).
- To enable this, recompile it with the option 
+ does not support float
+\begin_inset LatexCommand index
+name "Floating point support"
+
+\end_inset
+
+ (except on ds390), only <NO FLOAT>
+\begin_inset LatexCommand index
+name "<NO FLOAT>"
+
+\end_inset
+
+
+\begin_inset LatexCommand index
+name "printf floating point support"
+
+\end_inset
+
+ will be printed instead of the value.
+ To enable floating point output, recompile it with the option 
 \emph on
 -
 \begin_inset ERT
 \emph on
 -
 \begin_inset ERT
@@ -21029,7 +21201,7 @@ name "USE\\_FLOATS"
 \emph on
 -
 \begin_inset ERT
 \emph on
 -
 \begin_inset ERT
-status collapsed
+status open
 
 \begin_layout Standard
 
 
 \begin_layout Standard
 
@@ -21158,7 +21330,7 @@ mcs51
 \begin_layout Standard
 printf
 \begin_inset LatexCommand index
 \begin_layout Standard
 printf
 \begin_inset LatexCommand index
-name "printf"
+name "printf()"
 
 \end_inset
 
 
 \end_inset
 
@@ -22304,7 +22476,7 @@ name "heap (malloc)"
 \begin_layout Verse
 
 \family typewriter
 \begin_layout Verse
 
 \family typewriter
-sdcc -c _heap.c -D HEAD_SIZE=2048
+sdcc -c _heap.c -D HEAP_SIZE=2048
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
@@ -24124,6 +24296,49 @@ status collapsed
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
+\begin_layout Standard
+SDCC_CHAR_UNSIGNED
+\begin_inset LatexCommand index
+name "SDCC\\_CHAR\\_UNSIGNED"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+when 
+\emph on
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-funsigned-char
+\emph default
+ option is used
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
 \begin_layout Standard
 SDCC_STACK_TENBIT
 \begin_inset LatexCommand index
 \begin_layout Standard
 SDCC_STACK_TENBIT
 \begin_inset LatexCommand index
@@ -25569,31 +25784,45 @@ name "PIC"
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
-18F: 2220, 2221, 2320, 2321, 2331, 2410, 2420, 2423, 2431, 2450, 2455, 2480,
- 24j10
+18F: 2220, 2221, 2320, 2321, 2331, 23k20
+\end_layout
+
+\begin_layout Standard
+18F: 2410, 2420, 2423, 2431, 2450, 2455, 2480, 24j10, 24k20
+\end_layout
+
+\begin_layout Standard
+18F: 2510, 2515, 2520, 2523, 2525, 2550, 2580, 2585, 25j10, 25k20
+\end_layout
+
+\begin_layout Standard
+18F: 2610, 2620, 2680, 2682, 2685
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
-18F: (2510,) 2515, 2520, 2523, 2525, 2550, 2580, 2585, 25j10, 2610, 2620,
- 2680, 2682, 2685
+18F: 4220, 4221, 4320, 4321, 4331, 43k20
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
-18F: 4220, 4221, 4320, 4321, 4331, 4410, 4420, 4423, 4431, 4450, 4455, 4480,
- 44j10
+18F: 4410, 4420, 4423, 4431, 4450, 4455, 4480, 44j10, 44k20
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
-18F: 4510, 4515, 4520, 4523, 4525, 4550, 4580, 4585, 45j10, 4610, 4620,
- 4680, 4682, 4685
+18F: 4510, 4515, 4520, 4523, 4525, 4550, 4580, 4585, 45j10, 45k20
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
-18F: 6520, 6585, 6620, 6680, 66j60, 66j65, 6720, 67j60
+18F: 4610, 4620, 4680, 4682, 4685, 46k20
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
-18F: 8520, 8585, 8620, 8680, 86j60, 86j65, 8720, 87j60
+18F: 6520, 6585, 65j50, 6620, 6680, 66j50, 66j55, 66j60, 66j65, 6720, 67j50,
+ 67j60
+\end_layout
+
+\begin_layout Standard
+18F: 8520, 8585, 85j50, 8620, 8680, 86j50, 86j55, 86j60, 86j65, 8720, 87j50,
+ 87j60
 \end_layout
 
 \begin_layout Standard
 \end_layout
 
 \begin_layout Standard
@@ -27318,7 +27547,19 @@ Output of float values via printf()
 
 \begin_layout Standard
 The library is normally built without support for displaying float values,
 
 \begin_layout Standard
 The library is normally built without support for displaying float values,
- only <NO FLOAT> will appear instead of the value.
+ only <NO FLOAT>
+\begin_inset LatexCommand index
+name "<NO FLOAT>"
+
+\end_inset
+
+
+\begin_inset LatexCommand index
+name "printf floating point support"
+
+\end_inset
+
+ will appear instead of the value.
  To change this, rebuild the library as stated above, but call 
 \family typewriter
 ./configure.gnu --enable-floats 
  To change this, rebuild the library as stated above, but call 
 \family typewriter
 ./configure.gnu --enable-floats 
@@ -30097,7 +30338,7 @@ reference "cha:Debugging-with-SDCDB"
 \end_layout
 
 \begin_layout Itemize
 \end_layout
 
 \begin_layout Itemize
-or (8051 specific) use a freeware/commercial simulator which interfaces
+or (8051 specific) use a free open source/commercial simulator which interfaces
  to the AOMF
 \begin_inset LatexCommand index
 name "AOMF, AOMF51"
  to the AOMF
 \begin_inset LatexCommand index
 name "AOMF, AOMF51"