* doc/sdccman.lyx: corrected cpp info
[fw/sdcc] / doc / sdccman.lyx
index 3ad7cf77057e6c88a56bdef3fe74a47f8a55f0e5..fabc8d8dd1cdcc6a04ea8989aaa4c5a4694579b6 100644 (file)
@@ -55,6 +55,7 @@
 \tracking_changes false
 \output_changes false
 \author "" 
+\author "" 
 \end_header
 
 \begin_body
@@ -113,11 +114,11 @@ SDCC Compiler User Guide
 \begin_layout Date
 
 \size normal
-SDCC 2.8.5
+SDCC 2.8.9
 \size footnotesize
 
 \newline
-$Date: 2008-11-16#
+$Date::            
 \newline
 $Revision: 5272$
 \end_layout
@@ -7081,6 +7082,84 @@ name "-\\/-debug"
  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
 
@@ -7688,16 +7767,16 @@ name "sdcpp (preprocessor)"
 \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
 
+ preprocessor 
+\emph on
+cpp
+\emph default
  (
 \emph on
 gcc
@@ -7708,11 +7787,11 @@ target "http://gcc.gnu.org/"
 
 \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 ~
-Manual
- at 
+Manual at
 \begin_inset LatexCommand htmlurl
 target "http://www.gnu.org/software/gcc/onlinedocs/"
 
@@ -21000,7 +21079,7 @@ name "printf()"
 printf_large.c
 \family default
  does not support float (except on ds390).
- To enable this recompile it with the option 
+ To enable this, recompile it with the option 
 \emph on
 -
 \begin_inset ERT
@@ -21048,6 +21127,13 @@ name "-\\/-model-large"
 
 \emph default
  for the mcs51 port, since this uses a lot of memory.
+ To enable float support for the pic16 targets, see 
+\begin_inset LatexCommand ref
+reference "sub:pic16Libraries"
+
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Standard
@@ -25040,8 +25126,8 @@ Make local functions static, as non static functions require code page selection
 \newline
 Due to the way sdcc handles functions, place called functions prior
  to calling functions in the file wherever possible: Otherwise sdcc will
- insert unnecessary pagesel directives around the call, believing that
the called function is externally defined.
+ insert unnecessary pagesel directives around the call, believing that the
+ called function is externally defined.
 \end_layout
 
 \begin_layout Enumerate
@@ -27253,9 +27339,19 @@ Building the libraries
 Before using SDCC/pic16 there are some libraries that need to be compiled.
  This process is done automatically if gputils are found at SDCC's compile
  time.
- Should you require to rebuild the pic16 libraries manually, these are the
- steps required to do so under Linux or Mac OS X (cygwin might work as well,
- but is untested):
+ Should you require to rebuild the pic16 libraries manually (e.g.
+ in order to enable output of float values
+\begin_inset LatexCommand index
+name "Floating point support"
+
+\end_inset
+
+ via 
+\family typewriter
+printf()
+\family default
+, see below), these are the steps required to do so under Linux or Mac OS
+ X (cygwin might work as well, but is untested):
 \end_layout
 
 \begin_layout LyX-Code
@@ -27294,6 +27390,54 @@ cd device/include
 su -c 'make install'     # install the headers, you need the root password
 \end_layout
 
+\begin_layout Subsubsection*
+Output of float values via printf()
+\end_layout
+
+\begin_layout Standard
+The library is normally built without support for displaying float values,
+ only <NO FLOAT> will appear instead of the value.
+ To change this, rebuild the library as stated above, but call 
+\family typewriter
+./configure.gnu --enable-floats 
+\family default
+instead of just 
+\family typewriter
+./configure.gnu
+\family default
+.
+ Also make sure that at least 
+\family typewriter
+libc/stdio/vfprintf.c
+\family default
+ is actually recompiled, e.g.
+ by 
+\family typewriter
+touch
+\family default
+ing it after the 
+\family typewriter
+configure
+\family default
+ run or deleting its 
+\family typewriter
+.o
+\family default
+ file.
+\end_layout
+
+\begin_layout Standard
+The more common appraoch of compiling 
+\family typewriter
+vfprintf.c
+\family default
+ manually with 
+\family typewriter
+-DUSE_FLOATS=1
+\family default
+ should also work, but is untested.
+\end_layout
+
 \begin_layout Subsection
 Adding New Devices to the Port
 \end_layout
@@ -35152,8 +35296,8 @@ give back to the public as you are probably at least partially publicly
 \end_layout
 
 \begin_layout Enumerate
-give students a chance to publicly prove their skills and to possibly
see a world wide impact
+give students a chance to publicly prove their skills and to possibly see
+ a world wide impact
 \end_layout
 
 \begin_layout Standard