* device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
authorvrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 15 May 2006 01:00:07 +0000 (01:00 +0000)
committervrokas <vrokas@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 15 May 2006 01:00:07 +0000 (01:00 +0000)
to fix missing stack pragma in compiled binary object file,

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4173 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
device/lib/pic16/configure
device/lib/pic16/configure.in
device/lib/pic16/libsdcc/Makefile.in
device/lib/pic16/libsdcc/stack/Makefile [new file with mode: 0644]
device/lib/pic16/libsdcc/stack/Makefile.in [new file with mode: 0644]
device/lib/pic16/libsdcc/stack/stack.S [new file with mode: 0644]

index 7a4fb459ced2510b02f7fb91c4f5fc5d20459a08..38eb44890b52a6722e2f91b354a7d999a3f0e9c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
+
+       * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround
+       to fix missing stack pragma in compiled binary object file,
+
 2006-05-14 Bernhard Held <bernhard AT bernhardheld.de>
 
        * support/packihx/configure.in,
index 4e955839bcc8cf06ba4516b163a028e5245695fd..966f6cbac5c104e4e183669e30dc24788438518d 100755 (executable)
@@ -1636,7 +1636,7 @@ fi
 
 $CP "$srcdir"/pics.all pics.build
 
-                                                                                                                                                                                                                                                                    ac_config_files="$ac_config_files Makefile Makefile.common debug/Makefile debug/gstack/Makefile libc/Makefile libc/ctype/Makefile libc/delay/Makefile libc/stdio/Makefile libc/stdlib/Makefile libc/string/Makefile libc/utils/Makefile libdev/Makefile libio/Makefile libio/adc/Makefile libio/i2c/Makefile libio/usart/Makefile libm/Makefile libsdcc/Makefile libsdcc/char/Makefile libsdcc/fixed16x16/Makefile libsdcc/float/Makefile libsdcc/gptr/Makefile libsdcc/int/Makefile libsdcc/long/Makefile libsdcc/lregs/Makefile startup/Makefile"
+                                                                                                                                                                                                                                                                              ac_config_files="$ac_config_files Makefile Makefile.common debug/Makefile debug/gstack/Makefile libc/Makefile libc/ctype/Makefile libc/delay/Makefile libc/stdio/Makefile libc/stdlib/Makefile libc/string/Makefile libc/utils/Makefile libdev/Makefile libio/Makefile libio/adc/Makefile libio/i2c/Makefile libio/usart/Makefile libm/Makefile libsdcc/Makefile libsdcc/char/Makefile libsdcc/fixed16x16/Makefile libsdcc/float/Makefile libsdcc/gptr/Makefile libsdcc/int/Makefile libsdcc/long/Makefile libsdcc/lregs/Makefile libsdcc/stack/Makefile startup/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -2213,6 +2213,7 @@ do
   "libsdcc/int/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/int/Makefile" ;;
   "libsdcc/long/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/long/Makefile" ;;
   "libsdcc/lregs/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/lregs/Makefile" ;;
+  "libsdcc/stack/Makefile" ) CONFIG_FILES="$CONFIG_FILES libsdcc/stack/Makefile" ;;
   "startup/Makefile" ) CONFIG_FILES="$CONFIG_FILES startup/Makefile" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
index d08d9e37b403b67112c4e1c8206862500b1d9be6..94cc2cc247d9a36c78f1f6d86268def195b3ad72 100644 (file)
@@ -69,6 +69,7 @@ AC_CONFIG_FILES([Makefile
                  libsdcc/int/Makefile
                  libsdcc/long/Makefile
                  libsdcc/lregs/Makefile
+                 libsdcc/stack/Makefile
                  startup/Makefile
                  ])
 AC_OUTPUT
index 2bf35ebfba5a2cb81e449dc62846a9c28ba43e52..494b1a5b58dbf76cb1a6f6d924b166c07952e27a 100644 (file)
@@ -3,7 +3,7 @@ top_srcdir   = @top_srcdir@
 srcdir       = @srcdir@
 VPATH        = @srcdir@
 
-SUBDIRS = char fixed16x16 float gptr int long 
+SUBDIRS = char fixed16x16 float gptr int long stack
        # lregs
 MKLIB = libsdcc.lib
 
diff --git a/device/lib/pic16/libsdcc/stack/Makefile b/device/lib/pic16/libsdcc/stack/Makefile
new file mode 100644 (file)
index 0000000..531a649
--- /dev/null
@@ -0,0 +1,8 @@
+top_builddir = ../../
+top_srcdir   = ../..
+srcdir       = .
+
+
+SUBDIRS = 
+
+include $(top_srcdir)/Makefile.subdir
diff --git a/device/lib/pic16/libsdcc/stack/Makefile.in b/device/lib/pic16/libsdcc/stack/Makefile.in
new file mode 100644 (file)
index 0000000..6bb1352
--- /dev/null
@@ -0,0 +1,8 @@
+top_builddir = @top_builddir@
+top_srcdir   = @top_srcdir@
+srcdir       = @srcdir@
+VPATH        = @srcdir@
+
+SUBDIRS = 
+
+include $(top_srcdir)/Makefile.subdir
diff --git a/device/lib/pic16/libsdcc/stack/stack.S b/device/lib/pic16/libsdcc/stack/stack.S
new file mode 100644 (file)
index 0000000..fd639c6
--- /dev/null
@@ -0,0 +1,31 @@
+
+
+;
+; stack.S - automatically allocate stack for PIC16 targets
+;           with out the need for using the #pragma stack
+;           directive
+;
+; written by Vangelis Rokas, 2006 <vrokas AT users.sourceforge.net>
+;
+;
+; $Id$
+;
+
+; object will only be used if and only if #pragma stack is not
+; defined in one of the projet's sources
+
+       radix dec
+
+;--------------------------------------------------------
+; public variables in this module
+;--------------------------------------------------------
+       global _stack
+       global _stack_end
+
+
+; allocate space for stack
+stack_section  udata   0x0200
+_stack         res     63
+_stack_end     res     1
+
+       end