diff --git a/armsrc/appmain.c b/armsrc/appmain.c index afa822c7f..80eb673f2 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -361,9 +361,10 @@ static void SendStatus(void) { #endif printConnSpeed(); DbpString(_CYAN_("Various")); + // pointer arithmetic is times 4. (two shifts to the left) for (uint32_t *p = &_stack_start; ; ++p) { if (*p != 0xdeadbeef) { - Dbprintf(" Max stack usage so far..%d", (&_stack_end - p)*4); + Dbprintf(" Max stack usage.........%d / %d bytes", (&_stack_end - p) << 2, (&_stack_end - &_stack_start) << 2); break; } } diff --git a/common_arm/ldscript.common b/common_arm/ldscript.common index 9e53d8436..c1fb5e848 100644 --- a/common_arm/ldscript.common +++ b/common_arm/ldscript.common @@ -9,7 +9,7 @@ ms of the GNU GPL, version 2 or, ----------------------------------------------------------------------------- */ -stacksize = DEFINED(stacksize) ? stacksize : 5K; +stacksize = DEFINED(stacksize) ? stacksize : 6K; commonareasize = 0x20; /* AT91SAM7S256 has 256k Flash and 64k RAM */