X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=doc%2Fsdccman.lyx;h=077a92400dc924cecf08829366008b07c38ac81f;hb=533c16035dc0cf53882c8694461d34e6e0038fbf;hp=a692ae155c8958483d263f954c6b3e394d062304;hpb=37425875dec591a8cc059ad700f840171469f9a6;p=fw%2Fsdcc diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index a692ae15..077a9240 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -1,4 +1,4 @@ -#LyX 1.4.4 created this file. For more info see http://www.lyx.org/ +#LyX 1.4.2 created this file. For more info see http://www.lyx.org/ \lyxformat 245 \begin_document \begin_header @@ -104,7 +104,7 @@ SDCC Compiler User Guide \begin_layout Date \size normal -SDCC 2.7.2 +SDCC 2.7.3 \size footnotesize \newline @@ -6279,6 +6279,28 @@ sdcclib libint.lib _moduint.rel \family sans \series bold sdcclib libint.lib _mulint.rel +\family default +\series default + +\newline + +\end_layout + +\begin_layout Standard +Or, if you preffer: +\family sans +\series bold + +\newline + +\end_layout + +\begin_layout Standard + +\family sans +\series bold +sdcclib libint.lib _divsint.rel _divuint.rel _modsint.rel _moduint.rel _mulint.rel +\family default \series default \newline @@ -6287,7 +6309,110 @@ sdcclib libint.lib _mulint.rel \begin_layout Standard If the file already exists in the library, it will be replaced. - To see what modules and symbols are included in the library, options -s + If a list of .rel files is available, you can tell sdcclib to add those + files to a library. + For example, if the file 'myliblist.txt' contains +\family sans +\series bold + +\newline + +\end_layout + +\begin_layout Standard + +\family sans +\series bold +_divsint.rel +\end_layout + +\begin_layout Standard + +\family sans +\series bold +_divuint.rel +\end_layout + +\begin_layout Standard + +\family sans +\series bold +_modsint.rel +\end_layout + +\begin_layout Standard + +\family sans +\series bold +_moduint.rel +\end_layout + +\begin_layout Standard + +\family sans +\series bold +_mulint.rel +\family default +\series default + +\newline + +\end_layout + +\begin_layout Standard +Use +\family sans +\series bold + +\newline + +\end_layout + +\begin_layout Standard + +\family sans +\series bold +sdcclib -l libint.lib myliblist.txt +\family default +\series default + +\newline + +\end_layout + +\begin_layout Standard +Additionally, you can instruct sdcclib to compiles the files before adding + them to the library. + This is achieved using the environment variables SDCCLIB_CC and/or SDCCLIB_AS. + For example: +\family sans +\series bold + +\newline + +\end_layout + +\begin_layout Standard + +\family sans +\series bold +set SDCCLIB_CC=sdcc -c +\end_layout + +\begin_layout Standard + +\family sans +\series bold +sdcclib -l libint.lib myliblist.txt +\family default +\series default + +\newline + +\end_layout + +\begin_layout Standard +To see what modules and symbols are included in the library, options -s and -m are available. For example: \newline @@ -8090,6 +8215,38 @@ status collapsed Causes the linker to use old style for allocating memory areas. \end_layout +\begin_layout List +\labelwidthstring 00.00.0000 + +\series bold +- +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +/ +\end_layout + +\end_inset + +-acall-ajmp +\series default +\InsetSpace ~ + +\begin_inset LatexCommand \index{-\/-acall-ajmp} + +\end_inset + + Replaces the three byte instructions lcall/ljmp with the two byte instructions + acall/ajmp. + Only use this option if your code is in the same 2k block of memory. + You may need to use this option for some 8051 derivatives which lack the + lcall/ljmp instructions.. +\end_layout + \begin_layout Standard \begin_inset VSpace bigskip \end_inset @@ -15741,6 +15898,17 @@ mov a,r0 \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ +orl a,#(l_PSEG + >> 8) +\newline +\InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ jz 00006$ \newline \InsetSpace ~ @@ -15751,8 +15919,7 @@ jz 00006$ \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -mov - r1,#s_PSEG +mov r1,#s_PSEG \newline \InsetSpace ~ \InsetSpace ~ @@ -15775,7 +15942,8 @@ mov __XPAGE,#(s_PSEG >> 8) clr a \newline 00005$:\InsetSpace ~ -movx @r1,a +movx + @r1,a \newline \InsetSpace ~ \InsetSpace ~ @@ -15797,8 +15965,7 @@ inc r1 \InsetSpace ~ djnz r0,00005$ \newline -0 -0006$: +00006$: \newline \InsetSpace ~ \InsetSpace ~ @@ -15828,7 +15995,8 @@ mov a,r0 \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -orl a,#(l_XSEG >> 8) +orl a,#(l_XSEG >> + 8) \newline \InsetSpace ~ \InsetSpace ~ @@ -15848,8 +16016,7 @@ jz 00008$ \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -mov r1,#((l_XSEG - + 255) >> 8) +mov r1,#((l_XSEG + 255) >> 8) \newline \InsetSpace ~ \InsetSpace ~ @@ -15872,7 +16039,8 @@ mov dptr,#s_XSEG clr a \newline 00007$:\InsetSpace ~ -movx @dptr,a +movx + @dptr,a \newline \InsetSpace ~ \InsetSpace ~ @@ -15902,8 +16070,7 @@ djnz r0,00007$ \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -djnz - r1,00007$ +djnz r1,00007$ \newline 00008$: \end_layout @@ -16196,6 +16363,75 @@ status collapsed \end_inset about MCS51-variants. +\newline + +\end_layout + +\begin_layout Standard +While these initialization modules are meant as generic startup code there + might be the need for customization. + Let's assume the return value of +\emph on +_sdcc_external_startup() +\emph default + in +\emph on +crtstart.asm +\emph default + should not be checked (or +\emph on +_sdcc_external_startup() +\emph default + should not be called at all). + The recommended way would be to copy +\emph on +crtstart.asm +\emph default + (f.e. + from +\begin_inset LatexCommand \url{http://sdcc.svn.sourceforge.net/viewvc/*checkout*/sdcc/trunk/sdcc/device/lib/mcs51/crtstart.asm} + +\end_inset + +) into the source directory, adapt it there, then assemble it with +\emph on +asx8051 -plosgff +\begin_inset Foot +status open + +\begin_layout Standard +\begin_inset Quotes sld +\end_inset + +-plosgff +\begin_inset Quotes srd +\end_inset + + are the assembler options used in +\begin_inset LatexCommand \url{http://sdcc.svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/lib/mcs51/Makefile.in?view=markup } + +\end_inset + + +\end_layout + +\end_inset + + crtstart.asm +\emph default + and when linking your project explicitely specify +\emph on +crtstart.rel +\emph default +. + As a bonus a listing of the relocated object file +\emph on +crtstart.rst +\emph default + is generated. +\end_layout + +\begin_layout Standard \begin_inset VSpace bigskip \end_inset @@ -30836,11 +31072,11 @@ Related open source tools \begin_layout Standard \align left \begin_inset Tabular - + - + \begin_inset Text @@ -31347,6 +31583,111 @@ Debugger, serves nicely as GUI to SDCDB \end_inset +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Standard +d52 +\begin_inset LatexCommand \index{d52} + +\end_inset + + +\begin_inset LatexCommand \index{d52 (disassembler)} + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +Disassembler, can count instruction cycles +\begin_inset LatexCommand \index{instruction cycles (count)} + +\end_inset + +, use with options -pnd +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +\begin_inset LatexCommand \url{http://www.8052.com/users/disasm/} + +\end_inset + + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Standard +cmake +\begin_inset LatexCommand \index{cmake} + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +Cross platform build system, generates Makefiles +\begin_inset LatexCommand \index{Makefile} + +\end_inset + + and project workspaces +\begin_inset LatexCommand \index{project workspace} + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +\begin_inset LatexCommand \url{http://www.cmake.org} + +\end_inset + + \InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ +\InsetSpace ~ +and a dedicated wiki entry: +\begin_inset LatexCommand \url{http://www.cmake.org/Wiki/CmakeSdcc} + +\end_inset + + \end_layout \end_inset @@ -32447,18 +32788,18 @@ Historically there often were long delays between official releases and \end_inset . - A release wiki + The SDCC Wiki \begin_inset LatexCommand \index{wiki} \end_inset -\begin_inset LatexCommand \index{Release wiki} +\begin_inset LatexCommand \index{SDCC Wiki} \end_inset at -\begin_inset LatexCommand \url{http://sdcc.sf.net/release_wiki/} +\begin_inset LatexCommand \url{http://sdcc.wiki.sourceforge.net/} \end_inset @@ -35618,6 +35959,34 @@ replace { lcall %1 } by { acall %1 } replace { ljmp %1 } by { ajmp %1 } \end_layout +\begin_layout Standard +(NOTE: from version 2.7.3 on, you can use option - +\emph on + +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +/ +\end_layout + +\end_inset + + +\emph default +-acall-ajmp +\begin_inset LatexCommand \index{-\/-acall-ajmp} + +\end_inset + +, which also takes care of aligning the interrupt vectors properly.) +\newline + +\end_layout + \begin_layout Standard The \emph on @@ -36372,13 +36741,13 @@ As mentioned in the optimization section the peep-hole optimizer is rule \end_layout \begin_layout Standard -More information is available in a wiki +More information is available on SDCC Wiki \begin_inset LatexCommand \index{wiki} \end_inset (preliminary link -\begin_inset LatexCommand \url{http://sdcc.sourceforge.net/release_wiki/index.php?page=SDCC+internals+and+porting} +\begin_inset LatexCommand \url{http://sdcc.wiki.sourceforge.net/SDCC+internals+and+porting} \end_inset