aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/ARMCMx
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 09:13:54 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 09:13:54 +0000
commit7d7d9727f9a280d63157ac9997fe271610f05b1e (patch)
treefe51a6af796f2d0976025db4b68d553875bf0994 /os/ports/GCC/ARMCMx
parent3b378d2b9b86bc4242873982a9222e3abcbfaead (diff)
downloadChibiOS-7d7d9727f9a280d63157ac9997fe271610f05b1e.tar.gz
ChibiOS-7d7d9727f9a280d63157ac9997fe271610f05b1e.tar.bz2
ChibiOS-7d7d9727f9a280d63157ac9997fe271610f05b1e.zip
STM32 board files and demos now use the new organization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2497 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/ARMCMx')
-rw-r--r--os/ports/GCC/ARMCMx/crt0_v6m.s57
-rw-r--r--os/ports/GCC/ARMCMx/crt0_v7m.s57
2 files changed, 44 insertions, 70 deletions
diff --git a/os/ports/GCC/ARMCMx/crt0_v6m.s b/os/ports/GCC/ARMCMx/crt0_v6m.s
index b597f6b34..8cfbb7977 100644
--- a/os/ports/GCC/ARMCMx/crt0_v6m.s
+++ b/os/ports/GCC/ARMCMx/crt0_v6m.s
@@ -27,22 +27,22 @@
#if !defined(__DOXYGEN__)
-.set CONTROL_MODE_PRIVILEGED, 0
-.set CONTROL_MODE_UNPRIVILEGED, 1
-.set CONTROL_USE_MSP, 0
-.set CONTROL_USE_PSP, 2
+ .set CONTROL_MODE_PRIVILEGED, 0
+ .set CONTROL_MODE_UNPRIVILEGED, 1
+ .set CONTROL_USE_MSP, 0
+ .set CONTROL_USE_PSP, 2
-.text
-.balign 2
-.syntax unified
-.thumb
+ .text
+ .balign 2
+ .syntax unified
+ .thumb
/*
* Reset handler.
*/
-.thumb_func
-.global ResetHandler
-.weak ResetHandler
+ .thumb_func
+ .global ResetHandler
+ .weak ResetHandler
ResetHandler:
/*
* Interrupts are globally masked initially.
@@ -62,7 +62,7 @@ ResetHandler:
/*
* Early initialization phase, it is empty by default.
*/
- bl hwinit0
+ bl __early_init
/*
* Data initialization.
* NOTE: It assumes that the DATA size is a multiple of 4.
@@ -100,9 +100,8 @@ endbloop:
msr CONTROL, r0
isb
/*
- * Late initialization phase, it is empty by default.
+ * Main program invokation.
*/
- bl hwinit1
movs r0, #0
mov r1, r0
bl main
@@ -112,34 +111,22 @@ endbloop:
* Default main exit code, just a loop.
* It is a weak symbol, the application code can redefine the behavior.
*/
-.thumb_func
-.global MainExitHandler
-.weak MainExitHandler
+ .thumb_func
+ .global MainExitHandler
+ .weak MainExitHandler
MainExitHandler:
.loop: b .loop
/*
* Default early initialization code. It is declared weak in order to be
* replaced by the real initialization code.
- * Early initialization is performed just after reset before BSS and DATA
- * segments initialization.
+ * The arly initialization is performed just after stacks setup and before BSS
+ * and DATA segments initialization.
*/
-.thumb_func
-.global hwinit0
-.weak hwinit0
-hwinit0:
- bx lr
-
-/*
- * Default late initialization code. It is declared weak in order to be
- * replaced by the real initialization code.
- * Late initialization is performed after BSS and DATA segments initialization
- * and before invoking the main() function.
- */
-.thumb_func
-.global hwinit1
-.weak hwinit1
-hwinit1:
+ .thumb_func
+ .global __early_init
+ .weak __early_init
+__early_init:
bx lr
#endif
diff --git a/os/ports/GCC/ARMCMx/crt0_v7m.s b/os/ports/GCC/ARMCMx/crt0_v7m.s
index 0750c619f..25aacecc2 100644
--- a/os/ports/GCC/ARMCMx/crt0_v7m.s
+++ b/os/ports/GCC/ARMCMx/crt0_v7m.s
@@ -27,22 +27,22 @@
#if !defined(__DOXYGEN__)
-.set CONTROL_MODE_PRIVILEGED, 0
-.set CONTROL_MODE_UNPRIVILEGED, 1
-.set CONTROL_USE_MSP, 0
-.set CONTROL_USE_PSP, 2
+ .set CONTROL_MODE_PRIVILEGED, 0
+ .set CONTROL_MODE_UNPRIVILEGED, 1
+ .set CONTROL_USE_MSP, 0
+ .set CONTROL_USE_PSP, 2
-.text
-.balign 2
-.syntax unified
-.thumb
+ .text
+ .balign 2
+ .syntax unified
+ .thumb
/*
* Reset handler.
*/
-.thumb_func
-.global ResetHandler
-.weak ResetHandler
+ .thumb_func
+ .global ResetHandler
+ .weak ResetHandler
ResetHandler:
/*
* Interrupts are globally masked initially.
@@ -62,7 +62,7 @@ ResetHandler:
/*
* Early initialization phase, it is empty by default.
*/
- bl hwinit0
+ bl __early_init
/*
* Data initialization.
* NOTE: It assumes that the DATA size is a multiple of 4.
@@ -95,9 +95,8 @@ bloop:
msr CONTROL, r0
isb
/*
- * Late initialization phase, it is empty by default.
+ * Main program invokation.
*/
- bl hwinit1
movs r0, #0
mov r1, r0
bl main
@@ -107,34 +106,22 @@ bloop:
* Default main exit code, just a loop.
* It is a weak symbol, the application code can redefine the behavior.
*/
-.thumb_func
-.global MainExitHandler
-.weak MainExitHandler
+ .thumb_func
+ .global MainExitHandler
+ .weak MainExitHandler
MainExitHandler:
.loop: b .loop
/*
* Default early initialization code. It is declared weak in order to be
* replaced by the real initialization code.
- * Early initialization is performed just after reset before BSS and DATA
- * segments initialization.
+ * The arly initialization is performed just after stacks setup and before BSS
+ * and DATA segments initialization.
*/
-.thumb_func
-.global hwinit0
-.weak hwinit0
-hwinit0:
- bx lr
-
-/*
- * Default late initialization code. It is declared weak in order to be
- * replaced by the real initialization code.
- * Late initialization is performed after BSS and DATA segments initialization
- * and before invoking the main() function.
- */
-.thumb_func
-.global hwinit1
-.weak hwinit1
-hwinit1:
+ .thumb_func
+ .global __early_init
+ .weak __early_init
+__early_init:
bx lr
#endif