From: frief Date: Tue, 4 Sep 2007 20:44:04 +0000 (+0000) Subject: * doc/sdccman.lyx: mentioned d52 and cmake, customizing startup code X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=1ab21e6549fb98a343cfbc2b9ac26a91279621b2;p=fw%2Fsdcc * doc/sdccman.lyx: mentioned d52 and cmake, customizing startup code * device/include/mcs51/lint.h added keyword __naked git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4910 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 83c5d08f..4ffdad05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-04 Frieder Ferlemann + + * doc/sdccman.lyx: mentioned d52 and cmake, customizing startup code + * device/include/mcs51/lint.h added keyword __naked + 2007-09-04 Maarten Brock * src/pic16/glue.c, diff --git a/device/include/mcs51/lint.h b/device/include/mcs51/lint.h index 3b6dd71b..c2aa59cc 100644 --- a/device/include/mcs51/lint.h +++ b/device/include/mcs51/lint.h @@ -39,6 +39,7 @@ #define __at(x) /* use "__at (0xab)" instead of "__at 0xab" */ #define __using(x) #define __interrupt(x) + #define __naked #define data #define near @@ -54,6 +55,7 @@ #define at(x) #define using(x) #define interrupt(x) + #define naked /* The tool Splint is available at http://www.splint.org Other tools might also be used for statically checking c-sources. diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 101e378d..b58c53fb 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 @@ -15898,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 ~ @@ -15908,8 +15919,7 @@ jz 00006$ \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -mov - r1,#s_PSEG +mov r1,#s_PSEG \newline \InsetSpace ~ \InsetSpace ~ @@ -15932,7 +15942,8 @@ mov __XPAGE,#(s_PSEG >> 8) clr a \newline 00005$:\InsetSpace ~ -movx @r1,a +movx + @r1,a \newline \InsetSpace ~ \InsetSpace ~ @@ -15954,8 +15965,7 @@ inc r1 \InsetSpace ~ djnz r0,00005$ \newline -0 -0006$: +00006$: \newline \InsetSpace ~ \InsetSpace ~ @@ -15985,7 +15995,8 @@ mov a,r0 \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -orl a,#(l_XSEG >> 8) +orl a,#(l_XSEG >> + 8) \newline \InsetSpace ~ \InsetSpace ~ @@ -16005,8 +16016,7 @@ jz 00008$ \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -mov r1,#((l_XSEG - + 255) >> 8) +mov r1,#((l_XSEG + 255) >> 8) \newline \InsetSpace ~ \InsetSpace ~ @@ -16029,7 +16039,8 @@ mov dptr,#s_XSEG clr a \newline 00007$:\InsetSpace ~ -movx @dptr,a +movx + @dptr,a \newline \InsetSpace ~ \InsetSpace ~ @@ -16059,8 +16070,7 @@ djnz r0,00007$ \InsetSpace ~ \InsetSpace ~ \InsetSpace ~ -djnz - r1,00007$ +djnz r1,00007$ \newline 00008$: \end_layout @@ -16353,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 @@ -30993,7 +31072,7 @@ Related open source tools \begin_layout Standard \align left \begin_inset Tabular - + @@ -31504,6 +31583,102 @@ 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 + + \end_layout \end_inset