diff --git a/ports/arm/atomport-tests.h b/ports/arm/atomport-tests.h index 5df864b..1c52be9 100644 --- a/ports/arm/atomport-tests.h +++ b/ports/arm/atomport-tests.h @@ -48,8 +48,8 @@ extern void dbg_format_msg (char *format, ...) ; */ #define _STR(x) x -/* Default thread stack size (in bytes) */ -#define TEST_THREAD_STACK_SIZE 1024 +/* Default thread stack size (in bytes). Allow plenty for printf(). */ +#define TEST_THREAD_STACK_SIZE 4096 /* Uncomment to enable logging of stack usage to UART */ /* #define TESTS_LOG_STACK_USAGE */ diff --git a/ports/arm/tests-main.c b/ports/arm/tests-main.c index f345321..a157d54 100644 --- a/ports/arm/tests-main.c +++ b/ports/arm/tests-main.c @@ -63,8 +63,13 @@ * stack saves and context switch saves, but the application main thread * will generally be carrying out more nested function calls and require * stack for application code local variables etc. + * + * 1KB might be adequate but if using printf() then at least 2KB would be + * prudent otherwise the stdio functions otherwise stack overruns are + * likely. Nearly 2KB was seen to be used on the toolchain used for + * development. */ -#define MAIN_STACK_SIZE_BYTES 1024 +#define MAIN_STACK_SIZE_BYTES 4096 /* Local data */