From 23ceb054fcf9a6d7e29359b197e268ba03f1ce3c Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 6 Apr 2017 17:11:28 +1000 Subject: Fixed an issue on FreeRTOS where thread stacks were being created too large --- src/gos/gos_freertos.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gos') diff --git a/src/gos/gos_freertos.c b/src/gos/gos_freertos.c index 414b0bab..7c47aa40 100644 --- a/src/gos/gos_freertos.c +++ b/src/gos/gos_freertos.c @@ -147,6 +147,9 @@ gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_ gfxThreadHandle task; (void) stackarea; + // uGFX expresses stack size in bytes - FreeRTOS in "Stack Words" + stacksz /= sizeof(StackType_t); + if (stacksz < configMINIMAL_STACK_SIZE) stacksz = configMINIMAL_STACK_SIZE; -- cgit v1.2.3