summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-25 13:59:02 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-25 13:59:02 -0600
commit93b40bab695acb0ee99e3845c95cf961e158e102 (patch)
tree1be795883514546b4de9c1c1c22d7615741c186f
parent83bf4a347c5765e1ce7bd50cc8440dabe2bd3af9 (diff)
downloadpx4-nuttx-93b40bab695acb0ee99e3845c95cf961e158e102.tar.gz
px4-nuttx-93b40bab695acb0ee99e3845c95cf961e158e102.tar.bz2
px4-nuttx-93b40bab695acb0ee99e3845c95cf961e158e102.zip
SAMA5 ELF configuration with address environments finally builds without errors
-rw-r--r--nuttx/arch/arm/src/sama5/Kconfig6
-rw-r--r--nuttx/arch/arm/src/sama5/sam_pgalloc.c6
-rw-r--r--nuttx/configs/sama5d4-ek/README.txt4
-rw-r--r--nuttx/configs/sama5d4-ek/elf/defconfig5
4 files changed, 14 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/sama5/Kconfig b/nuttx/arch/arm/src/sama5/Kconfig
index 220ec7402..caf30bac2 100644
--- a/nuttx/arch/arm/src/sama5/Kconfig
+++ b/nuttx/arch/arm/src/sama5/Kconfig
@@ -4553,15 +4553,15 @@ endif # SAMA5_DDRCS_RESERVE
config SAMA5_DDRCS_PGHEAP
bool "Include DDR-SDRAM in page cache"
default y
- depends on SAMA5_DDRCS && ARCH_ADDRENV
+ depends on (SAMA5_DDRCS || SAMA5_BOOT_SDRAM) && ARCH_ADDRENV
---help---
Include a portion of DDR-SDRAM memory in the page cache.
if SAMA5_DDRCS_PGHEAP
config SAMA5_DDRCS_PGHEAP_OFFSET
- int "DDR-SDRAM heap offset"
- default 0
+ hex "DDR-SDRAM heap offset"
+ default 0x0
---help---
Preserve this number of bytes at the beginning of SDRAM. The
portion of DRAM beginning at this offset from the DDRCS base will
diff --git a/nuttx/arch/arm/src/sama5/sam_pgalloc.c b/nuttx/arch/arm/src/sama5/sam_pgalloc.c
index 6531aed8b..ba344c645 100644
--- a/nuttx/arch/arm/src/sama5/sam_pgalloc.c
+++ b/nuttx/arch/arm/src/sama5/sam_pgalloc.c
@@ -57,11 +57,11 @@
* handle any other possibility.
*/
-#ifdef CONFIG_SAMA5_DDRCS_PGHEAP
+#ifndef CONFIG_SAMA5_DDRCS_PGHEAP
# error CONFIG_SAMA5_DDRCS_PGHEAP must be selected
#endif
-#ifdef CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET
+#ifndef CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET
# error CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET must be specified
#endif
@@ -69,7 +69,7 @@
# warning CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET is not aligned to a page boundary
#endif
-#ifdef CONFIG_SAMA5_DDRCS_PGHEAP_SIZE
+#ifndef CONFIG_SAMA5_DDRCS_PGHEAP_SIZE
# error CONFIG_SAMA5_DDRCS_PGHEAP_SIZE must be specified
#endif
diff --git a/nuttx/configs/sama5d4-ek/README.txt b/nuttx/configs/sama5d4-ek/README.txt
index a6f6d8d87..a00ca46c5 100644
--- a/nuttx/configs/sama5d4-ek/README.txt
+++ b/nuttx/configs/sama5d4-ek/README.txt
@@ -3689,6 +3689,10 @@ Configurations
System Type -> Architecture Options
CONFIG_ARCH_ADDRENV=n : Disable address environment support
+ System Type -> Heap Configuration
+ CONFIG_SAMA5_DDRCS_RESERVE=n : Don't reserve any page cache memory
+ CONFIG_SAMA5_DDRCS_PGHEAP=n : Don't try to set up the page allocator
+
Memory Management
CONFIG_GRAN=n : Disable the granule allocator
CONFIG_MM_PGALLOC=n : Disable the page allocator
diff --git a/nuttx/configs/sama5d4-ek/elf/defconfig b/nuttx/configs/sama5d4-ek/elf/defconfig
index a940d98b2..6affa1a3b 100644
--- a/nuttx/configs/sama5d4-ek/elf/defconfig
+++ b/nuttx/configs/sama5d4-ek/elf/defconfig
@@ -240,7 +240,10 @@ CONFIG_SAMA5_BOOT_SDRAM=y
#
CONFIG_SAMA5_ISRAM_HEAP=y
CONFIG_SAMA5_DDRCS_RESERVE=y
-CONFIG_SAMA5_DDRCS_HEAP_END=0x2fa00000
+CONFIG_SAMA5_DDRCS_HEAP_END=0x28000000
+CONFIG_SAMA5_DDRCS_PGHEAP=y
+CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET=0x28000000
+CONFIG_SAMA5_DDRCS_PGHEAP_SIZE=134217728
#
# Architecture Options