aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/startup/ARMCAx-TZ/compilers/GCC
diff options
context:
space:
mode:
authoredolomb <none@example.com>2019-01-17 15:19:20 +0000
committeredolomb <none@example.com>2019-01-17 15:19:20 +0000
commit29309f101a4828842c377ff11a3a59908aab05f2 (patch)
treef75aef8484bc3522621b128eb6bfeacd55ad0e47 /os/common/startup/ARMCAx-TZ/compilers/GCC
parent696701cd6fe254a4cb2e3f748cacabe853d42a9e (diff)
downloadChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.tar.gz
ChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.tar.bz2
ChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.zip
Updated SAMA drivers (still incomplete)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12543 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/common/startup/ARMCAx-TZ/compilers/GCC')
-rw-r--r--os/common/startup/ARMCAx-TZ/compilers/GCC/crt0.S42
-rw-r--r--os/common/startup/ARMCAx-TZ/compilers/GCC/ld/SAMA5D2ddr.ld37
2 files changed, 76 insertions, 3 deletions
diff --git a/os/common/startup/ARMCAx-TZ/compilers/GCC/crt0.S b/os/common/startup/ARMCAx-TZ/compilers/GCC/crt0.S
index 4810ea0f6..016e23c58 100644
--- a/os/common/startup/ARMCAx-TZ/compilers/GCC/crt0.S
+++ b/os/common/startup/ARMCAx-TZ/compilers/GCC/crt0.S
@@ -22,6 +22,20 @@
* @{
*/
+/**
+ * @brief Constructors invocation switch.
+ */
+#if !defined(CRT0_CALL_CONSTRUCTORS) || defined(__DOXYGEN__)
+#define CRT0_CALL_CONSTRUCTORS TRUE
+#endif
+
+/**
+ * @brief Destructors invocation switch.
+ */
+#if !defined(CRT0_CALL_DESTRUCTORS) || defined(__DOXYGEN__)
+#define CRT0_CALL_DESTRUCTORS TRUE
+#endif
+
#if !defined(__DOXYGEN__)
.set MODE_USR, 0x10
@@ -117,10 +131,38 @@ bssloop:
*/
bl __core_init
bl __late_init
+#if 0 /* Constructors initialized after halInit() */
+#if CRT0_CALL_CONSTRUCTORS == TRUE
+ /* Constructors invocation.*/
+ ldr r4, =__init_array_start
+ ldr r5, =__init_array_end
+initloop:
+ cmp r4, r5
+ bge endinitloop
+ ldr r1, [r4], #4
+ blx r1
+ b initloop
+endinitloop:
+#endif /* CRT0_CALL_CONSTRUCTORS */
+#endif /* if 0 */
/*
* Main program invocation.
*/
bl main
+
+#if CRT0_CALL_DESTRUCTORS == TRUE
+ /* Destructors invocation.*/
+ ldr r4, =__fini_array_start
+ ldr r5, =__fini_array_end
+finiloop:
+ cmp r4, r5
+ bge endfiniloop
+ ldr r1, [r4], #4
+ blx r1
+ b finiloop
+endfiniloop:
+#endif
+
b __default_exit
#endif /* !defined(__DOXYGEN__) */
diff --git a/os/common/startup/ARMCAx-TZ/compilers/GCC/ld/SAMA5D2ddr.ld b/os/common/startup/ARMCAx-TZ/compilers/GCC/ld/SAMA5D2ddr.ld
index 225f64d74..cb016edc0 100644
--- a/os/common/startup/ARMCAx-TZ/compilers/GCC/ld/SAMA5D2ddr.ld
+++ b/os/common/startup/ARMCAx-TZ/compilers/GCC/ld/SAMA5D2ddr.ld
@@ -20,9 +20,9 @@
MEMORY
{
flash : org = 0x27000000, len = 1M
- ram0 : org = 0x27100000, len = 15M
- ram1 : org = 0x00000000, len = 0
- ram2 : org = 0x00000000, len = 0
+ ram0 : org = 0x27100000, len = 13M
+ ram1 : org = 0x27E00000, len = 1M
+ ram2 : org = 0x27F00000, len = 1M
ram3 : org = 0x00000000, len = 0
ram4 : org = 0x00000000, len = 0
ram5 : org = 0x00000000, len = 0
@@ -40,6 +40,37 @@ REGION_ALIAS("DATA_RAM", ram0);
/* RAM region to be used for BSS segment.*/
REGION_ALIAS("BSS_RAM", ram0);
+/* RAM region to be used for lcd frame buffer. */
+REGION_ALIAS("FB_RAM", ram1);
+
+/* RAM region to be used for no cache area. */
+REGION_ALIAS("NO_CACHE", ram2);
+
+SECTIONS
+{
+ /* Special section for frame buffer area.*/
+ .fbram (NOLOAD) : ALIGN(4)
+ {
+ __fbram_base__ = .;
+ *(.fbram)
+ *(.fbram.*)
+ *(.bss.__fbram_*)
+ . = ALIGN(4);
+ __fbram_end__ = .;
+ } > FB_RAM
+
+ /* Special section for no cache area.*/
+ .nocache (NOLOAD) : ALIGN(4)
+ {
+ __nocache_base__ = .;
+ *(.nocache)
+ *(.nocache.*)
+ *(.bss.__nocache_*)
+ . = ALIGN(4);
+ __nocache_end__ = .;
+ } > NO_CACHE
+}
+
INCLUDE rules.ld
ENTRY(Boot_Handler);