From 30eb33aa89a75d1b264d29e90dcb46f5182da496 Mon Sep 17 00:00:00 2001
From: Richard Barry <ribarry@amazon.com>
Date: Sun, 17 Feb 2008 21:00:56 +0000
Subject: [PATCH] Change stack size depending on memory model.

---
 .../FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h b/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h
index 00d5266536..9981427f53 100644
--- a/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h
+++ b/Demo/MB96340_Softune/FreeRTOS_96348hs_SK16FX100PMC/Src/FreeRTOSConfig.h
@@ -77,7 +77,6 @@ when running the application using the EUROScope debugger. */
 #define configCLKP1_CLOCK_HZ		( ( unsigned portLONG ) 56000000 )	/* Clock setup from start.asm in the demo application. */
 #define configTICK_RATE_HZ			( (portTickType) 1000 )
 #define configMAX_PRIORITIES		( ( unsigned portBASE_TYPE ) 6 )
-#define configMINIMAL_STACK_SIZE	( ( unsigned portSHORT ) 80 )
 #define configTOTAL_HEAP_SIZE		( (size_t) (20000) )
 #define configMAX_TASK_NAME_LEN		( 20 )
 #define configUSE_16_BIT_TICKS		1
@@ -85,6 +84,12 @@ when running the application using the EUROScope debugger. */
 #define configUSE_MUTEXES			1
 #define configUSE_TRACE_FACILITY	1
 
+#if( ( configMEMMODEL == portSMALL ) || ( configMEMMODEL == portMEDIUM ) )
+	#define configMINIMAL_STACK_SIZE	( ( unsigned portSHORT ) 80 )
+#else
+	#define configMINIMAL_STACK_SIZE	( ( unsigned portSHORT ) 120 )
+#endif
+
 /* Co-routine definitions. */
 #define configUSE_CO_ROUTINES			1
 #define configMAX_CO_ROUTINE_PRIORITIES ( 4 )