summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/common
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-17 08:56:20 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-17 08:56:20 -0600
commit935fad106477360189d20ac619d76d86109742d6 (patch)
treead8abde80f9303384cab7881a855edd6a6af6d3f /nuttx/arch/arm/src/common
parent688a7943504c5f4163df760024de40305c0b70ed (diff)
downloadnuttx-935fad106477360189d20ac619d76d86109742d6.tar.gz
nuttx-935fad106477360189d20ac619d76d86109742d6.tar.bz2
nuttx-935fad106477360189d20ac619d76d86109742d6.zip
Move the un-definitions of __ramfuncs__ from the sam_clockconfig.c to the common up_internal.h header file so that the attribute will be applied the same to function definitions and prototypes.
Diffstat (limited to 'nuttx/arch/arm/src/common')
-rw-r--r--nuttx/arch/arm/src/common/up_internal.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 2f0309b4f..1c172db50 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -253,7 +253,7 @@ extern uint32_t _ebss; /* End+1 of .bss */
# define __ramfunc__ __attribute__ ((section(".ramfunc"),long_call))
-/* Functions decleared in the .ramfunc section will be packaged together
+/* Functions declared in the .ramfunc section will be packaged together
* by the linker script and stored in FLASH. During boot-up, the start
* logic must include logic to copy the RAM functions from their storage
* location in FLASH to their correct destination in SRAM. The following
@@ -265,6 +265,14 @@ extern const uint32_t _framfuncs; /* Copy source address in FLASH */
extern uint32_t _sramfuncs; /* Copy destination start address in RAM */
extern uint32_t _eramfuncs; /* Copy destination end address in RAM */
+#else /* CONFIG_ARCH_RAMFUNCS */
+
+/* Otherwise, a null definition is provided so that condition compilation is
+ * not necessary in code that may operate with or without RAM functions.
+ */
+
+# define __ramfunc__
+
#endif /* CONFIG_ARCH_RAMFUNCS */
#endif /* __ASSEMBLY__ */