From b4ec8a5b409e8ec14fffd9152ea97ec93feee87d Mon Sep 17 00:00:00 2001 From: vrokas Date: Mon, 16 Feb 2004 23:11:45 +0000 Subject: [PATCH] * doc/sdccman.lyx: added more pic16 port documentation * device/include/pic16: added header pic18fregs.h git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3203 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 1 + device/include/pic16/pic18fregs.h | 45 +++++++++++++++++++++++++++++++ doc/sdccman.lyx | 43 +++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 device/include/pic16/pic18fregs.h diff --git a/ChangeLog b/ChangeLog index 06a54245..9d7afe7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2004-02-17 Vangelis Rokas * doc/sdccman.lyx: added more pic16 port documentation + * device/include/pic16/: added header pic18fregs.h 2004-02-16 Bernhard Held diff --git a/device/include/pic16/pic18fregs.h b/device/include/pic16/pic18fregs.h new file mode 100644 index 00000000..2fc9c5e7 --- /dev/null +++ b/device/include/pic16/pic18fregs.h @@ -0,0 +1,45 @@ + +/* + * pic18fregs.h - 18F Family Device Library Header + * + * This file is part of the GNU PIC Library. + * + * January, 2004 + * The GNU PIC Library is maintained by, + * Vangelis Rokas + * + * $Id$ + * + */ + +#ifndef __PIC18FREGS_H__ +#define __PIC18FREGS_H__ + + +#if defined(pic18f242) +# include + +#elif defined(pic18f252) +# include + +#elif defined(pic18f258) +# include + +#elif defined(pic18f442) +# include + +#elif defined(pic18f448) +# include + +#elif defined(pic18f452) +# include + +#elif defined(pic18f458) +# include + +#else +# error Unsupported processor + +#endif + +#endif /* __PIC18FREGS_H__ */ diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 07a06934..978fa2f5 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -14979,6 +14979,49 @@ Linker \end_inset +\layout Subsection + +Pragmas +\layout Standard + +PIC16 port currently supports the following pragmas: +\layout List +\labelwidthstring 00.00.0000 + +stack pragma stack forces the code generator to initialize the stack & frame + pointers at a specific address. + This is an adhoc solution since gplink does not support yet stack. + When the gplink issue is resolved the pragma will be deprecated +\begin_inset Foot +collapsed true + +\layout Standard + + +\emph on +It is important to initialize the stack, otherwise strange things can happen. + Stack is not initialized by default because there are some sources that + do not require it. + (like library sources) +\end_inset + +. +\newline +If you omit setting the pragma the port emits a warning message before linking. + If not initializing the stack is desired ignore the message. +\layout LyX-Code + +Example: +\layout LyX-Code + +\layout LyX-Code + +/* initializes stack at RAM address 0x5ff*/ +\layout LyX-Code + +#pragma stack 0x5ff +\layout LyX-Code + \layout Subsection Header Files -- 2.30.2