aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-18 09:24:23 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-18 09:24:23 +0000
commit1aad1a508faeeb61b23764e02daa8494c9c61b55 (patch)
tree79c53be81f416cc14bb828d9c1e2b19120d49fc8 /os
parent7aa43aee7029b232c558174bcbdf90e8fbebd57b (diff)
downloadChibiOS-1aad1a508faeeb61b23764e02daa8494c9c61b55.tar.gz
ChibiOS-1aad1a508faeeb61b23764e02daa8494c9c61b55.tar.bz2
ChibiOS-1aad1a508faeeb61b23764e02daa8494c9c61b55.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2491 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/ports/IAR/ARMCMx/cstartup.s21
1 files changed, 19 insertions, 2 deletions
diff --git a/os/ports/IAR/ARMCMx/cstartup.s b/os/ports/IAR/ARMCMx/cstartup.s
index 97757362a..2084ff929 100644
--- a/os/ports/IAR/ARMCMx/cstartup.s
+++ b/os/ports/IAR/ARMCMx/cstartup.s
@@ -39,10 +39,13 @@ CONTROL_USE_PSP SET 2
SECTION .intvec:CODE:NOROOT(3)
PUBLIC __iar_program_start
- EXTERN __cmain
+ EXTERN main
+ EXTERN _exit
EXTERN __vector_table
EXTWEAK __iar_init_core
EXTWEAK __iar_init_vfp
+ EXTWEAK __low_level_init
+ EXTWEAK __iar_data_init3
SECTION .text:CODE:REORDER(2)
THUMB
@@ -56,12 +59,26 @@ __iar_program_start:
bl hwinit0
bl __iar_init_core
bl __iar_init_vfp
- bl __cmain
+
+; Replicated cmain.s here in order to insert the call to hwinit1.
+ bl __low_level_init
+ cmp r0, #0
+ beq.n _call_main
+ bl __iar_data_init3
+_call_main:
+ bl hwinit1
+ bl main
+ bl _exit
PUBWEAK hwinit0
hwinit0
bx lr
+
+ PUBWEAK hwinit1
+hwinit1
+ bx lr
+
REQUIRE __vector_table
END