diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-11-21 15:24:55 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-11-21 15:24:55 +0000 |
commit | b7d01278b7092581ec774b7cf6185e04720a4c08 (patch) | |
tree | 8c45a59b2f43d15bba6871a2172b35fe38a6b389 /os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s | |
parent | 2ee0bc4dfa152b71adb4ecef25f45a6e8780e617 (diff) | |
download | ChibiOS-b7d01278b7092581ec774b7cf6185e04720a4c08.tar.gz ChibiOS-b7d01278b7092581ec774b7cf6185e04720a4c08.tar.bz2 ChibiOS-b7d01278b7092581ec774b7cf6185e04720a4c08.zip |
Improved startup files for ARMCMx GCC, introduced support for RAM areas initialization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8518 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s')
-rw-r--r-- | os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s b/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s index 4812a29fe..c7792f954 100644 --- a/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s +++ b/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s @@ -111,6 +111,13 @@ #endif
/**
+ * @brief RAM areas initialization switch.
+ */
+#if !defined(CRT0_INIT_RAM_AREAS) || defined(__DOXYGEN__)
+#define CRT0_INIT_RAM_AREAS TRUE
+#endif
+
+/**
* @brief Constructors invocation switch.
*/
#if !defined(CRT0_CALL_CONSTRUCTORS) || defined(__DOXYGEN__)
@@ -246,9 +253,9 @@ psloop: #if CRT0_INIT_DATA == TRUE
/* Data initialization. Note, it assumes that the DATA size
is a multiple of 4 so the linker file must ensure this.*/
- ldr r1, =_textdata
- ldr r2, =_data
- ldr r3, =_edata
+ ldr r1, =_textdata_start
+ ldr r2, =_data_start
+ ldr r3, =_data_end
dloop:
cmp r2, r3
ittt lo
@@ -270,6 +277,11 @@ bloop: blo bloop
#endif
+#if CRT0_INIT_RAM_AREAS == TRUE
+ /* RAM areas initialization.*/
+ bl __init_ram_areas
+#endif
+
/* Late initialization..*/
bl __late_init
|