summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-04-20 12:34:36 +0200
committerAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-04-20 12:34:36 +0200
commit0ea7d9758ff7b64e2bca1509f0ddcdf19a73a75f (patch)
tree1e8bab02ee7d96d6c95ad85a5fea958eac51c08a
parent2faa9c1f94a0500e6cfab14c81316e07b5e2ea6a (diff)
downloadfreertos-0ea7d9758ff7b64e2bca1509f0ddcdf19a73a75f.tar.gz
freertos-0ea7d9758ff7b64e2bca1509f0ddcdf19a73a75f.tar.bz2
freertos-0ea7d9758ff7b64e2bca1509f0ddcdf19a73a75f.tar.xz
PIC18_SDCC: define heap size upon selected device
This patch defines heap size upon selected device Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r--Demo/PIC18_SDCC/FreeRTOSConfig.h2
-rw-r--r--Source/portable/SDCC/PIC18/pic18memory.h105
-rw-r--r--Source/portable/SDCC/PIC18/portmacro.h2
3 files changed, 107 insertions, 2 deletions
diff --git a/Demo/PIC18_SDCC/FreeRTOSConfig.h b/Demo/PIC18_SDCC/FreeRTOSConfig.h
index ee7131eb..1215b437 100644
--- a/Demo/PIC18_SDCC/FreeRTOSConfig.h
+++ b/Demo/PIC18_SDCC/FreeRTOSConfig.h
@@ -35,7 +35,7 @@
#define configCPU_CLOCK_HZ ((unsigned portLONG)20000000)
#define configMAX_PRIORITIES ((unsigned portBASE_TYPE)5)
#define configMINIMAL_STACK_SIZE (120)
-#define configTOTAL_HEAP_SIZE ((size_t)1024)
+#define configTOTAL_HEAP_SIZE ((size_t)PIC18_SDCC_HEAP_SIZE)
#define configMAX_TASK_NAME_LEN (4)
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 1
diff --git a/Source/portable/SDCC/PIC18/pic18memory.h b/Source/portable/SDCC/PIC18/pic18memory.h
new file mode 100644
index 00000000..71281a3b
--- /dev/null
+++ b/Source/portable/SDCC/PIC18/pic18memory.h
@@ -0,0 +1,105 @@
+/**
+* #######################################################################################
+* GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+* Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved.
+*
+* This program is free software; you can distribute it and/or modify it
+* under the terms of the GNU General Public License
+* (Version 2 or later) published by the Free Software Foundation.
+*
+* This program is distributed in the hope it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+* for more details.
+*
+* You should have received a copy of the GNU General Public License along
+* with this program; if not, write to the Free Software Foundation, Inc.,
+* 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+* #######################################################################################
+*
+* \file ram.h
+* \brief Header file defining heap size for each supported device and include
+* \brief device registers
+* \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+* \date April 2009
+* #######################################################################################
+*/
+
+#ifndef PIC18MEMOY_H
+#define PIC18RAM_H
+
+#include <pic18fregs.h>
+
+#ifdef __18f452__
+#define PIC18_SDCC_HEAP_SIZE 1024
+#endif
+
+#ifdef __18f4520__
+#define PIC18_SDCC_HEAP_SIZE 1024
+#endif
+
+#ifdef __18f4580__
+#define PIC18_SDCC_HEAP_SIZE 1024
+#endif
+
+#ifdef __18f97j60__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f25k20__
+#define PIC18_SDCC_HEAP_SIZE 1024
+#endif
+
+#ifdef __18f26k20__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f45k20__
+#define PIC18_SDCC_HEAP_SIZE 1024
+#endif
+
+#ifdef __18f46k20__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f65j50__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f66j50__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f66j55__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f66j60__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f66j65__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f67j50__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f67j60__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f85j50__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f86j50__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#ifdef __18f86j50__
+#define PIC18_SDCC_HEAP_SIZE 2560
+#endif
+
+#endif /*PIC18RAM_H*/
diff --git a/Source/portable/SDCC/PIC18/portmacro.h b/Source/portable/SDCC/PIC18/portmacro.h
index c3280d44..bfb43b47 100644
--- a/Source/portable/SDCC/PIC18/portmacro.h
+++ b/Source/portable/SDCC/PIC18/portmacro.h
@@ -28,7 +28,7 @@
#ifndef PORTMACRO_H
#define PORTMACRO_H
-#include <pic18fregs.h>
+#include "pic18memory.h"
/*-----------------------------------------------------------
* Port specific definitions.