Reserve space for stack at runtime.
authorAdam Green <adamgr@foo.bar>
Wed, 13 Feb 2013 08:20:45 +0000 (00:20 -0800)
committerAdam Green <adamgr@foo.bar>
Wed, 13 Feb 2013 08:20:45 +0000 (00:20 -0800)
commitddf5038efa1d21544cb3280e6ca0ad5e5cf04189
treebf73e4007325043910acde6b9eec20a6734a68e3
parent584a15611a56021e5ecfc1db83db956489db723e
Reserve space for stack at runtime.

Adds support for STACK_SIZE make variable.  When this is set to a
non-zero value, the heap's growth will not extend into this reserved
area for the stack.  The MPU is also used to make sure that the stack
doesn't exceed this reservation.  If it does then a memory fault will
occur.  WARNING: These faults can be a bit difficult to debug since
they will encounter a stacking exception when they attempt to enter the
hardfault handler.  It is possible to glean information manually from
RAM to figure out roughly what was going one when the stack overflowed
though since most of the stack still remains in RAM.
gcc4mbed/build/gcc4mbed.mk
gcc4mbed/src/gcc4mbed.cpp
gcc4mbed/src/mpu.h
makefile