Re: [Mspgcc-users] Stack checking

2011-08-25 Thread JMGross
- Ursprüngliche Nachricht - Von: Radu Rendec Gesendet am: 24 Aug 2011 22:27:32 > I'm trying to implement a simple stack checking mechanism in an MSP430 > multi-task environment (task scheduling/switching is subject to a custom > "OS"). > Each task has its own stack space, but since there'

Re: [Mspgcc-users] how to stop watchdog prior to C++ constructors calling

2011-08-25 Thread M. Andree
Am 21.08.2011 13:18, schrieb Peter Bigot: > As an example, without -mdisable-watchdog you'll still get versions of two > of those other routines that will store the contents of r5 into WDTCTL > periodically as they go about their work. If you didn't load r5 with WDTPW > + WDTHOLD in __low_level_i

Re: [Mspgcc-users] how to stop watchdog prior to C++ constructors calling

2011-08-25 Thread Peter Bigot
On Thu, Aug 25, 2011 at 2:26 PM, M. Andree wrote: > Am 21.08.2011 13:18, schrieb Peter Bigot: >> As an example, without -mdisable-watchdog you'll still get versions of two >> of those other routines that will store the contents of r5 into WDTCTL >> periodically as they go about their work.  If you

Re: [Mspgcc-users] how to stop watchdog prior to C++ constructors calling

2011-08-25 Thread M. Andree
Am 25.08.2011 21:51, schrieb Peter Bigot: > What you said isn't quite right: a WDT violation does do a PUC, but > not a POR. A PUC doesn't really clear everything that a POR does. Right, I got that backwards. Sorry, and thanks for putting it right. > Peripheral register configurations are left

Re: [Mspgcc-users] Stack checking

2011-08-25 Thread Radu Rendec
On Wed, 2011-08-24 at 16:05 -0500, Peter Bigot wrote: > Look at msp430-builtins.c in the implementation for delay cycles for > examples of generating local labels, comparison, and jump > instructions. You can probably use something like gen_rtx_MEM (Pmode, > gen_rtx_SYMBOL_REF (HImode, "__stack_ba

Re: [Mspgcc-users] Stack checking

2011-08-25 Thread Radu Rendec
On Thu, 2011-08-25 at 12:21 +0200, JMGross wrote: > I had a similar problem but came up with a completely different solution. > When my (preemptive) multitasker creates a new thread, it reserves some > organizational space as well as the stack for the new > thread. > The orignaizational data is a