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.

This commit is contained in:
Gregory Nutt 2014-04-17 08:56:20 -06:00
parent edc022ff1a
commit ebf221945c
3 changed files with 11 additions and 7 deletions

View File

@ -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__ */

View File

@ -75,11 +75,6 @@
# error "CONFIG_ARCH_RAMFUNCS must be defined for this logic"
#endif
#ifndef CONFIG_ARCH_RAMFUNCS
# undef __ramfunc__
# define __ramfunc__
#endif
/****************************************************************************
* Private Function Prototypes
****************************************************************************/

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/sama5/sam_clockconfig.h
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -41,6 +41,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions