* doc/sdccman.lyx: added more pic16 port documentation
authorvrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 16 Feb 2004 23:11:45 +0000 (23:11 +0000)
committervrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 16 Feb 2004 23:11:45 +0000 (23:11 +0000)
* 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
device/include/pic16/pic18fregs.h [new file with mode: 0644]
doc/sdccman.lyx

index 06a5424541965f4f5e0511bd3b700c517eee7827..9d7afe7af91259cea866384747baff774ff874fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2004-02-17 Vangelis Rokas <vrokas AT otenet.gr>
 
        * doc/sdccman.lyx: added more pic16 port documentation
+       * device/include/pic16/: added header pic18fregs.h
 
 2004-02-16 Bernhard Held <bernhard AT bernhardheld.de>
 
diff --git a/device/include/pic16/pic18fregs.h b/device/include/pic16/pic18fregs.h
new file mode 100644 (file)
index 0000000..2fc9c5e
--- /dev/null
@@ -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 <vrokas@otenet.gr>
+ *
+ * $Id$
+ *
+ */
+
+#ifndef __PIC18FREGS_H__
+#define __PIC18FREGS_H__
+
+
+#if defined(pic18f242)
+#  include <pic18f248.h>
+
+#elif defined(pic18f252)
+#  include <pic18f252.h>
+
+#elif defined(pic18f258)
+#  include <pic18f258.h>
+
+#elif defined(pic18f442)
+#  include <pic18f442.h>
+
+#elif defined(pic18f448)
+#  include <pic18f448.h>
+
+#elif defined(pic18f452)
+#  include <pic18f452.h>
+
+#elif defined(pic18f458)
+# include <pic18f458.h>
+
+#else
+#  error Unsupported processor
+
+#endif
+
+#endif /* __PIC18FREGS_H__ */
index 07a06934924ac25e0af5930a2cc8b2e6c87e7559..978fa2f50700f733d26a53198227153dc7bdd455 100644 (file)
@@ -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