[rtems commit] bsp/tms570: separate Flash variants to one which boots directly and one for boot loader.
Gedare Bloom
gedare at rtems.org
Wed Nov 18 15:19:24 UTC 2015
Module: rtems
Branch: 4.11
Commit: 85750d169ec4c03e402d5dca4737f66c714ecfc7
Changeset: http://git.rtems.org/rtems/commit/?id=85750d169ec4c03e402d5dca4737f66c714ecfc7
Author: Premysl Houdek <kom541000 at gmail.com>
Date: Thu Nov 12 23:11:32 2015 +0100
bsp/tms570: separate Flash variants to one which boots directly and one for boot loader.
The default tms570ls3137_hdk variant is for building RTEMS
application image starting directly from start of Flash.
Variant tms570ls3137_hdk_with_loader skips 256kB at start
of Flash to allow use with application loader.
Signed-off-by: Pavel Pisa <pisa at cmp.felk.cvut.cz>
---
c/src/lib/libbsp/arm/tms570/Makefile.am | 1 +
c/src/lib/libbsp/arm/tms570/README | 3 ++
.../make/custom/tms570ls3137_hdk_with_loader.cfg | 20 +++++++++++++
.../startup/linkcmds.tms570ls3137_hdk_with_loader | 33 ++++++++++++++++++++++
4 files changed, 57 insertions(+)
diff --git a/c/src/lib/libbsp/arm/tms570/Makefile.am b/c/src/lib/libbsp/arm/tms570/Makefile.am
index 7936b07..ae67983 100644
--- a/c/src/lib/libbsp/arm/tms570/Makefile.am
+++ b/c/src/lib/libbsp/arm/tms570/Makefile.am
@@ -95,6 +95,7 @@ project_lib_DATA += startup/linkcmds
EXTRA_DIST =
EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk
+EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk_with_loader
EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk_sdram
EXTRA_DIST += startup/linkcmds.tms570ls3137_hdk_intram
diff --git a/c/src/lib/libbsp/arm/tms570/README b/c/src/lib/libbsp/arm/tms570/README
index e1be925..f48744f 100644
--- a/c/src/lib/libbsp/arm/tms570/README
+++ b/c/src/lib/libbsp/arm/tms570/README
@@ -11,6 +11,9 @@ Drivers:
BSP variants:
tms570ls3137_hdk_intram - place code and data into internal SRAM
tms570ls3137_hdk_sdram - place code into external SDRAM and data to SRAM
+ tms570ls3137_hdk_with_loader - reserve 256kB at Flash start for loader
+ and place RTEMS application from address
+ 0x00040000
tms570ls3137_hdk - variant prepared for stand-alone RTEMS application
stored and running directly from flash. Not working yet.
diff --git a/c/src/lib/libbsp/arm/tms570/make/custom/tms570ls3137_hdk_with_loader.cfg b/c/src/lib/libbsp/arm/tms570/make/custom/tms570ls3137_hdk_with_loader.cfg
new file mode 100644
index 0000000..869cf71
--- /dev/null
+++ b/c/src/lib/libbsp/arm/tms570/make/custom/tms570ls3137_hdk_with_loader.cfg
@@ -0,0 +1,20 @@
+#
+# Config file for TMS570LS3137 board.
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU = arm
+
+CPU_CFLAGS = -march=armv7-r -mthumb -mbig-endian -mfpu=vfpv3-d16 -mfloat-abi=hard
+
+CFLAGS_OPTIMIZE_V = -O2 -ggdb
+BINEXT?=.bin
+
+# This defines the operations performed on the linked executable.
+# is currently required.
+define bsp-post-link
+ $(OBJCOPY) -O binary --strip-all \
+ $(basename $@)$(EXEEXT) $(basename $@)$(BINEXT)
+ $(SIZE) $(basename $@)$(EXEEXT)
+endef
diff --git a/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_with_loader b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_with_loader
new file mode 100644
index 0000000..940f303
--- /dev/null
+++ b/c/src/lib/libbsp/arm/tms570/startup/linkcmds.tms570ls3137_hdk_with_loader
@@ -0,0 +1,33 @@
+
+MEMORY {
+ ROM_BOOT(RX) : ORIGIN = 0x00000000, LENGTH = 256k
+ ROM_INT (RX) : ORIGIN = 0x00040000, LENGTH = 3M-256k
+ RAM_INT_VEC : ORIGIN = 0x08000000, LENGTH = 256
+ RAM_INT (AIWX) : ORIGIN = 0x08000100, LENGTH = 256k - 256
+ RAM_EXT (AIWX) : ORIGIN = 0x80000000, LENGTH = 8M
+}
+
+REGION_ALIAS ("REGION_START", ROM_INT);
+REGION_ALIAS ("REGION_VECTOR", RAM_INT);
+REGION_ALIAS ("REGION_TEXT", ROM_INT);
+REGION_ALIAS ("REGION_TEXT_LOAD", ROM_INT);
+REGION_ALIAS ("REGION_RODATA", ROM_INT);
+REGION_ALIAS ("REGION_RODATA_LOAD", ROM_INT);
+REGION_ALIAS ("REGION_DATA", RAM_INT);
+REGION_ALIAS ("REGION_DATA_LOAD", ROM_INT);
+REGION_ALIAS ("REGION_FAST_TEXT", RAM_INT);
+REGION_ALIAS ("REGION_FAST_TEXT_LOAD", ROM_INT);
+REGION_ALIAS ("REGION_FAST_DATA", RAM_INT);
+REGION_ALIAS ("REGION_FAST_DATA_LOAD", ROM_INT);
+REGION_ALIAS ("REGION_BSS", RAM_INT);
+REGION_ALIAS ("REGION_WORK", RAM_INT);
+REGION_ALIAS ("REGION_STACK", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE", RAM_INT);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", RAM_INT);
+
+bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 1024;
+bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
+
+bsp_int_vec_overlay_start = ORIGIN(RAM_INT_VEC);
+
+INCLUDE linkcmds.armv4
More information about the vc
mailing list