summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/sam34/sam_allocateheap.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-06-11 17:33:43 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-06-11 17:33:43 -0600
commit8fa720361678a7409724c13a99fcb19826cc3e78 (patch)
tree8ed434aee449010eaa904c192f4a27d03bb04b90 /nuttx/arch/arm/src/sam34/sam_allocateheap.c
parent2e1dc146169bc98f8c72b2c3c2e783814968df35 (diff)
downloadpx4-nuttx-8fa720361678a7409724c13a99fcb19826cc3e78.tar.gz
px4-nuttx-8fa720361678a7409724c13a99fcb19826cc3e78.tar.bz2
px4-nuttx-8fa720361678a7409724c13a99fcb19826cc3e78.zip
Changes for a clean build of configs/sam4s-xplained
Diffstat (limited to 'nuttx/arch/arm/src/sam34/sam_allocateheap.c')
-rw-r--r--nuttx/arch/arm/src/sam34/sam_allocateheap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/nuttx/arch/arm/src/sam34/sam_allocateheap.c b/nuttx/arch/arm/src/sam34/sam_allocateheap.c
index 390234b71..2c350d860 100644
--- a/nuttx/arch/arm/src/sam34/sam_allocateheap.c
+++ b/nuttx/arch/arm/src/sam34/sam_allocateheap.c
@@ -57,7 +57,7 @@
* Private Definitions
****************************************************************************/
-#if CONFIG_MM_REGIONS < 2
+#if CONFIG_MM_REGIONS < 2 && SAM34_SRAM1_SIZE > 0
# warning "CONFIG_MM_REGIONS < 2: SRAM1 not included in HEAP"
#endif
@@ -71,11 +71,11 @@
# define CONFIG_MM_REGIONS 2
#endif
-#if CONFIG_DRAM_END > (SAM_INTSRAM0_BASE+CONFIG_SAM34_SRAM0_SIZE)
+#if CONFIG_DRAM_END > (SAM_INTSRAM0_BASE+SAM34_SRAM0_SIZE)
# error "CONFIG_DRAM_END is beyond the end of SRAM0"
# undef CONFIG_DRAM_END
-# define CONFIG_DRAM_END (SAM_INTSRAM0_BASE+CONFIG_SAM34_SRAM0_SIZE)
-#elif CONFIG_DRAM_END < (SAM_INTSRAM0_BASE+CONFIG_SAM34_SRAM0_SIZE)
+# define CONFIG_DRAM_END (SAM_INTSRAM0_BASE+SAM34_SRAM0_SIZE)
+#elif CONFIG_DRAM_END < (SAM_INTSRAM0_BASE+SAM34_SRAM0_SIZE)
# warning "CONFIG_DRAM_END is before end of SRAM0... not all of SRAM0 used"
#endif
@@ -224,25 +224,25 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
#if CONFIG_MM_REGIONS > 1
void up_addregion(void)
{
-#if CONFIG_SAM34_SRAM1_SIZE > 0
+#if SAM34_SRAM1_SIZE > 0
/* Allow user access to the heap memory */
- sam_mpu_uheap(SAM_INTSRAM1_BASE, CONFIG_SAM34_SRAM1_SIZE);
+ sam_mpu_uheap(SAM_INTSRAM1_BASE, SAM34_SRAM1_SIZE);
/* Add the region */
- kumm_addregion((FAR void*)SAM_INTSRAM1_BASE, CONFIG_SAM34_SRAM1_SIZE);
+ kumm_addregion((FAR void*)SAM_INTSRAM1_BASE, SAM34_SRAM1_SIZE);
-#if CONFIG_MM_REGIONS > 2 && CONFIG_SAM34_NFCSRAM_SIZE > 0
+#if CONFIG_MM_REGIONS > 2 && SAM34_NFCSRAM_SIZE > 0
/* Allow user access to the heap memory */
- sam_mpu_uheap(SAM_NFCSRAM_BASE, CONFIG_SAM34_NFCSRAM_SIZE);
+ sam_mpu_uheap(SAM_NFCSRAM_BASE, SAM34_NFCSRAM_SIZE);
/* Add the region */
- kumm_addregion((FAR void*)SAM_NFCSRAM_BASE, CONFIG_SAM34_NFCSRAM_SIZE);
+ kumm_addregion((FAR void*)SAM_NFCSRAM_BASE, SAM34_NFCSRAM_SIZE);
-#endif /* CONFIG_MM_REGIONS > 2 && CONFIG_SAM34_NFCSRAM_SIZE > 0 */
-#endif /* CONFIG_SAM34_SRAM1_SIZE > 0 */
+#endif /* CONFIG_MM_REGIONS > 2 && SAM34_NFCSRAM_SIZE > 0 */
+#endif /* SAM34_SRAM1_SIZE > 0 */
}
#endif /* CONFIG_MM_REGIONS > 1 */