[rtems commit] bsp/mpc55xx: Add .dsram section
Sebastian Huber
sebh at rtems.org
Mon Dec 3 12:14:54 UTC 2012
Module: rtems
Branch: master
Commit: 65ab304bd8acf6f42b1b57632db007c83aa23b41
Changeset: http://git.rtems.org/rtems/commit/?id=65ab304bd8acf6f42b1b57632db007c83aa23b41
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Nov 23 14:47:47 2012 +0100
bsp/mpc55xx: Add .dsram section
---
c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h | 10 ++++++++++
.../mpc55xxevb/startup/linkcmds.mpc5674f_ecu508 | 17 +++++++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
index 017e105..54e4b54 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
@@ -37,6 +37,8 @@
#include <rtems/console.h>
#include <rtems/clockdrv.h>
+#include <libcpu/powerpc-utility.h>
+
#include <bsp/tictac.h>
#include <bsp/default-initial-extension.h>
@@ -77,6 +79,14 @@ void *bsp_idle_thread(uintptr_t arg);
#define BSP_IDLE_TASK_BODY bsp_idle_thread
+LINKER_SYMBOL(bsp_section_dsram_begin)
+LINKER_SYMBOL(bsp_section_dsram_end)
+LINKER_SYMBOL(bsp_section_dsram_size)
+LINKER_SYMBOL(bsp_section_dsram_load_begin)
+LINKER_SYMBOL(bsp_section_dsram_load_end)
+
+#define BSP_DSRAM_SECTION __attribute__((section(".bsp_dsram")))
+
typedef enum {
MPC55XX_FATAL_FMPLL_LOCK
} mpc55xx_fatal_code;
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508 b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508
index f38ca47..4693804 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.mpc5674f_ecu508
@@ -1,7 +1,9 @@
MEMORY {
- RAM : ORIGIN = 0x40000000, LENGTH = 256K - 16k
- RAM_EXT : ORIGIN = 0x20000000, LENGTH = 512K
+ DSROM : ORIGIN = 0x00020000, LENGTH = 64k
+ RAM : ORIGIN = 0x40000000, LENGTH = 240k
NOCACHE : ORIGIN = 0x4003c000, LENGTH = 16k
+ DSRAM : ORIGIN = 0x20000000, LENGTH = 64k
+ RAM_EXT : ORIGIN = 0x20010000, LENGTH = 448k
NVRAM : ORIGIN = 0x3ffa0000, LENGTH = 128k
}
@@ -24,4 +26,15 @@ REGION_ALIAS ("REGION_NOCACHE", NOCACHE);
REGION_ALIAS ("REGION_NOCACHE_LOAD", ROM);
REGION_ALIAS ("REGION_NVRAM", NVRAM);
+SECTIONS {
+ .dsram (NOLOAD) : {
+ bsp_section_dsram_begin = .;
+ *(SORT(.bsp_dsram*))
+ bsp_section_dsram_end = .;
+ } > DSRAM AT > DSROM
+ bsp_section_dsram_size = bsp_section_dsram_end - bsp_section_dsram_begin;
+ bsp_section_dsram_load_begin = LOADADDR (.dsram);
+ bsp_section_dsram_load_end = bsp_section_dsram_load_begin + bsp_section_dsram_size;
+}
+
INCLUDE linkcmds.mpc55xx
More information about the vc
mailing list