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>
--- /dev/null
+
+/*
+ * 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__ */
\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