From cd59e729ebb516f1ea37335258db5388932934f6 Mon Sep 17 00:00:00 2001 From: vrokas Date: Mon, 15 May 2006 01:00:07 +0000 Subject: [PATCH] * device/lib/pic16/libsdcc/stack/{stack.S, Makefile.in}: add workaround 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 | 5 ++++ device/lib/pic16/configure | 3 ++- device/lib/pic16/configure.in | 1 + device/lib/pic16/libsdcc/Makefile.in | 2 +- device/lib/pic16/libsdcc/stack/Makefile | 8 ++++++ device/lib/pic16/libsdcc/stack/Makefile.in | 8 ++++++ device/lib/pic16/libsdcc/stack/stack.S | 31 ++++++++++++++++++++++ 7 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 device/lib/pic16/libsdcc/stack/Makefile create mode 100644 device/lib/pic16/libsdcc/stack/Makefile.in create mode 100644 device/lib/pic16/libsdcc/stack/stack.S diff --git a/ChangeLog b/ChangeLog index 7a4fb459..38eb4489 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-14 Vangelis Rokas + + * 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 * support/packihx/configure.in, diff --git a/device/lib/pic16/configure b/device/lib/pic16/configure index 4e955839..966f6cba 100755 --- a/device/lib/pic16/configure +++ b/device/lib/pic16/configure @@ -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;} diff --git a/device/lib/pic16/configure.in b/device/lib/pic16/configure.in index d08d9e37..94cc2cc2 100644 --- a/device/lib/pic16/configure.in +++ b/device/lib/pic16/configure.in @@ -69,6 +69,7 @@ AC_CONFIG_FILES([Makefile libsdcc/int/Makefile libsdcc/long/Makefile libsdcc/lregs/Makefile + libsdcc/stack/Makefile startup/Makefile ]) AC_OUTPUT diff --git a/device/lib/pic16/libsdcc/Makefile.in b/device/lib/pic16/libsdcc/Makefile.in index 2bf35ebf..494b1a5b 100644 --- a/device/lib/pic16/libsdcc/Makefile.in +++ b/device/lib/pic16/libsdcc/Makefile.in @@ -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 index 00000000..531a6496 --- /dev/null +++ b/device/lib/pic16/libsdcc/stack/Makefile @@ -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 index 00000000..6bb1352e --- /dev/null +++ b/device/lib/pic16/libsdcc/stack/Makefile.in @@ -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 index 00000000..fd639c6d --- /dev/null +++ b/device/lib/pic16/libsdcc/stack/stack.S @@ -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 +; +; +; $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 -- 2.47.2