summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-12-15 15:20:47 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2009-12-15 15:20:47 +0000
commitc468f18bb73a570bf2b3eb279a7dea60b91c3319 (patch)
treeb181297c2b4a0f8fa3edbb9987fd99a3ecc45a8b /c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c
parentadd support for ARM11, reimplement nested interrupts (diff)
downloadrtems-c468f18bb73a570bf2b3eb279a7dea60b91c3319.tar.bz2
add support for LPC32xx
Diffstat (limited to 'c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c')
-rw-r--r--c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c
index 1c899a00ad..732d30ddf5 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/bspstarthooks.c
@@ -26,8 +26,10 @@
#include <bsp/lpc24xx.h>
#include <bsp/linker-symbols.h>
+#define BSP_START_SECTION __attribute__((section(".bsp_start")))
+
#ifdef LPC24XX_EMC_MICRON
- static void __attribute__((section(".bsp_start"))) lpc24xx_ram_test_32(void)
+ static void BSP_START_SECTION lpc24xx_ram_test_32(void)
{
#ifdef LPC24XX_EMC_TEST
int *begin = (int *) 0xa0000000;
@@ -51,7 +53,7 @@
#endif
}
- static void __attribute__((section(".bsp_start"))) lpc24xx_cpu_delay(
+ static void BSP_START_SECTION lpc24xx_cpu_delay(
unsigned ticks
)
{
@@ -69,7 +71,7 @@
/**
* @brief EMC initialization hook 0.
*/
-static void __attribute__((section(".bsp_start"))) lpc24xx_init_emc_0(void)
+static void BSP_START_SECTION lpc24xx_init_emc_0(void)
{
#ifdef LPC24XX_EMC_NUMONYX
/*
@@ -131,7 +133,7 @@ static void __attribute__((section(".bsp_start"))) lpc24xx_init_emc_0(void)
/**
* @brief EMC initialization hook 1.
*/
-static void __attribute__((section(".bsp_start"))) lpc24xx_init_emc_1(void)
+static void BSP_START_SECTION lpc24xx_init_emc_1(void)
{
/* Use normal memory map */
EMC_CTRL = CLEAR_FLAG(EMC_CTRL, 0x2);
@@ -234,7 +236,7 @@ static void __attribute__((section(".bsp_start"))) lpc24xx_init_emc_1(void)
#endif
}
-static void __attribute__((section(".bsp_start"))) lpc24xx_pll_config(
+static void BSP_START_SECTION lpc24xx_pll_config(
uint32_t val
)
{
@@ -257,7 +259,7 @@ static void __attribute__((section(".bsp_start"))) lpc24xx_pll_config(
* @param cclksel Selects the divide value for creating the CPU clock (CCLK)
* from the PLL output.
*/
-static void __attribute__((section(".bsp_start"))) lpc24xx_set_pll(
+static void BSP_START_SECTION lpc24xx_set_pll(
unsigned clksrc,
unsigned nsel,
unsigned msel,
@@ -313,7 +315,7 @@ static void __attribute__((section(".bsp_start"))) lpc24xx_set_pll(
lpc24xx_pll_config(PLLCON_PLLE | PLLCON_PLLC);
}
-static void __attribute__((section(".bsp_start"))) lpc24xx_init_pll(void)
+static void BSP_START_SECTION lpc24xx_init_pll(void)
{
/* Enable main oscillator */
if (IS_FLAG_CLEARED(SCS, 0x40)) {
@@ -327,7 +329,7 @@ static void __attribute__((section(".bsp_start"))) lpc24xx_init_pll(void)
lpc24xx_set_pll(1, 0, 11, 3);
}
-static void __attribute__((section(".bsp_start"))) lpc24xx_clear_bss(void)
+static void BSP_START_SECTION lpc24xx_clear_bss(void)
{
const int *end = (const int *) bsp_section_bss_end;
int *out = (int *) bsp_section_bss_begin;
@@ -339,7 +341,7 @@ static void __attribute__((section(".bsp_start"))) lpc24xx_clear_bss(void)
}
}
-void __attribute__((section(".bsp_start"))) bsp_start_hook_0(void)
+void BSP_START_SECTION bsp_start_hook_0(void)
{
/* Initialize PLL */
lpc24xx_init_pll();
@@ -348,7 +350,7 @@ void __attribute__((section(".bsp_start"))) bsp_start_hook_0(void)
lpc24xx_init_emc_0();
}
-void __attribute__((section(".bsp_start"))) bsp_start_hook_1(void)
+void BSP_START_SECTION bsp_start_hook_1(void)
{
/* Re-map interrupt vectors to internal RAM */
MEMMAP = SET_MEMMAP_MAP(MEMMAP, 2);