summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-30 16:49:39 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-30 16:49:39 -0600
commit2084e520b5a60e7f9e3b8494d358135e738909f9 (patch)
tree0ae83d23a2b7636b98a24afaed80af6b123922c6
parent61e164b9853560f78635463442bd9fcc8fe2fc04 (diff)
downloadnuttx-2084e520b5a60e7f9e3b8494d358135e738909f9.tar.gz
nuttx-2084e520b5a60e7f9e3b8494d358135e738909f9.tar.bz2
nuttx-2084e520b5a60e7f9e3b8494d358135e738909f9.zip
STM32 F401 has no CCM memory
-rw-r--r--nuttx/arch/arm/src/stm32/Kconfig8
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_allocateheap.c16
2 files changed, 15 insertions, 9 deletions
diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig
index 714a87ce0..de7d47b10 100644
--- a/nuttx/arch/arm/src/stm32/Kconfig
+++ b/nuttx/arch/arm/src/stm32/Kconfig
@@ -606,11 +606,13 @@ config STM32_STM32F20XX
default n
select STM32_HAVE_OTGFS
select STM32_HAVE_FSMC
+ select STM32_HAVE_CCM
config STM32_STM32F30XX
bool
default n
select STM32_HAVE_USBDEV
+ select STM32_HAVE_CCM
config STM32_STM32F40XX
bool
@@ -625,23 +627,27 @@ config STM32_STM32F405
bool
default n
select STM32_HAVE_FSMC
+ select STM32_HAVE_CCM
config STM32_STM32F407
bool
default n
select STM32_HAVE_FSMC
+ select STM32_HAVE_CCM
# This is really 427/437, but we treat the two the same.
config STM32_STM32F427
bool
default n
select STM32_HAVE_FSMC
+ select STM32_HAVE_CCM
# This is really 429/439, but we treat the two the same.
config STM32_STM32F429
bool
default n
select STM32_HAVE_FSMC
+ select STM32_HAVE_CCM
config STM32_DFU
bool "DFU bootloader"
@@ -1304,8 +1310,8 @@ config ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
config STM32_CCMEXCLUDE
bool "Exclude CCM SRAM from the heap"
- depends on STM32_STM32F20XX || STM32_STM32F40XX || STM32_STM32F30XX
default y if ARCH_DMA || ELF
+ depends on STM32_HAVE_CCM
---help---
Exclude CCM SRAM from the HEAP because (1) it cannot be used for DMA
and (2) it appears to be impossible to execute ELF modules from CCM
diff --git a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
index 98cecf1dc..a89f38c90 100644
--- a/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
+++ b/nuttx/arch/arm/src/stm32/stm32_allocateheap.c
@@ -63,7 +63,7 @@
* following definitions must be provided to specify the size and
* location of internal(system) SRAM:
*
- * CONFIG_RAM_END : End address (+1) of SRAM (F1 family only, the
+ * CONFIG_RAM_END : End address (+1) of SRAM (F1 family only, the
* : F4 family uses the a priori end of SRAM)
*
* The F4 family also contains internal CCM SRAM. This SRAM is different
@@ -148,12 +148,12 @@
# undef CONFIG_STM32_CCMEXCLUDE
# define CONFIG_STM32_CCMEXCLUDE 1
-/* Members of teh STM32F30xxx family has a variable amount of SRAM from 24
- * to 40Kb plus 8KB if CCM SRAM. No external RAM is supported (the F3 family has no
- * FSMC).
+/* Members of the STM32F30xxx family has a variable amount of SRAM from 24
+ * to 40Kb plus 8KB if CCM SRAM. No external RAM is supported (the F3 family
+ * has no FSMC).
*
- * As a complication, CCM SRAM cannot be used for DMA. So, if STM32 DMA is enabled, CCM SRAM
- * should probably be excluded from the heap.
+ * As a complication, CCM SRAM cannot be used for DMA. So, if STM32 DMA is
+ * enabled, CCM SRAM should probably be excluded from the heap.
*/
#elif defined(CONFIG_STM32_STM32F30XX)
@@ -252,9 +252,9 @@
#elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX)
- /* The STM32 F2 has no CCM SRAM */
+ /* The STM32 F2 and the STM32 F401 have no CCM SRAM */
-# ifdef CONFIG_STM32_STM32F20XX
+# if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F401)
# undef CONFIG_STM32_CCMEXCLUDE
# define CONFIG_STM32_CCMEXCLUDE 1
# endif