samples: cmsis_rtos_v1: Grow stack size to the maximum allowed

Some architectures require more space on the stack when running samples
and tests while the philosopher test (cmsis_rtos_v1) is still using a
fixed-size stack size.

Since the test is going to use CMSIS v1 we cannot directly use
CONFIG_TEST_EXTRA_STACKSIZE to grow the stack size because the extra
space allocated can excess the maximum size allowed by CMSIS and defined
by CONFIG_CMSIS_THREAD_MAX_STACK_SIZE, causing the sample to halt on the
assertion (thread_def->stacksize <= CONFIG_CMSIS_THREAD_MAX_STACK_SIZE).

To avoid this problem (and align the test to what has been already done
on the philosopher test using CMSISv2) we set the stack size to the
maximum allowed size of CONFIG_CMSIS_THREAD_MAX_STACK_SIZE.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
Carlo Caione 2020-01-20 14:14:06 +01:00 committed by Anas Nashif
commit 25769e3fff

View file

@ -72,7 +72,7 @@ osSemaphoreId forks[NUM_PHIL];
#define fork(x) (forks[x])
#define STACK_SIZE 512
#define STACK_SIZE CONFIG_CMSIS_THREAD_MAX_STACK_SIZE
#if DEBUG_PRINTF
#define PR_DEBUG printk