mbed.h library with any bug fixes AV finds.
Dependents: micromouse4_encoder_testing PID_Test Lab1_Test WorkingPID ... more
targets/cmsis/TOOLCHAIN_IAR/cmain.S@0:ba7650f404af, 2015-11-02 (annotated)
- Committer:
- aravindsv
- Date:
- Mon Nov 02 02:26:59 2015 +0000
- Revision:
- 0:ba7650f404af
Reduced HSE_STARTUP_TIMEOUT to 500 ms, fixed some compiler warnings
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aravindsv | 0:ba7650f404af | 1 | /************************************************** |
aravindsv | 0:ba7650f404af | 2 | * |
aravindsv | 0:ba7650f404af | 3 | * Part two of the system initialization code, contains C-level |
aravindsv | 0:ba7650f404af | 4 | * initialization, thumb-2 only variant. |
aravindsv | 0:ba7650f404af | 5 | * |
aravindsv | 0:ba7650f404af | 6 | * Copyright 2006 IAR Systems. All rights reserved. |
aravindsv | 0:ba7650f404af | 7 | * |
aravindsv | 0:ba7650f404af | 8 | * $Revision: 59783 $ |
aravindsv | 0:ba7650f404af | 9 | * |
aravindsv | 0:ba7650f404af | 10 | **************************************************/ |
aravindsv | 0:ba7650f404af | 11 | |
aravindsv | 0:ba7650f404af | 12 | |
aravindsv | 0:ba7650f404af | 13 | ; -------------------------------------------------- |
aravindsv | 0:ba7650f404af | 14 | ; Module ?cmain, C-level initialization. |
aravindsv | 0:ba7650f404af | 15 | ; |
aravindsv | 0:ba7650f404af | 16 | |
aravindsv | 0:ba7650f404af | 17 | |
aravindsv | 0:ba7650f404af | 18 | SECTION SHT$$PREINIT_ARRAY:CONST:NOROOT(2) |
aravindsv | 0:ba7650f404af | 19 | SECTION SHT$$INIT_ARRAY:CONST:NOROOT(2) |
aravindsv | 0:ba7650f404af | 20 | |
aravindsv | 0:ba7650f404af | 21 | SECTION .text:CODE:NOROOT(2) |
aravindsv | 0:ba7650f404af | 22 | |
aravindsv | 0:ba7650f404af | 23 | PUBLIC __cmain |
aravindsv | 0:ba7650f404af | 24 | ;; Keep ?main for legacy reasons, it is accessed in countless instances of cstartup.s around the world... |
aravindsv | 0:ba7650f404af | 25 | PUBLIC ?main |
aravindsv | 0:ba7650f404af | 26 | EXTWEAK __iar_data_init3 |
aravindsv | 0:ba7650f404af | 27 | EXTWEAK __iar_argc_argv |
aravindsv | 0:ba7650f404af | 28 | EXTERN __low_level_init |
aravindsv | 0:ba7650f404af | 29 | EXTERN __call_ctors |
aravindsv | 0:ba7650f404af | 30 | EXTERN main |
aravindsv | 0:ba7650f404af | 31 | EXTERN exit |
aravindsv | 0:ba7650f404af | 32 | EXTERN __iar_dynamic_initialization |
aravindsv | 0:ba7650f404af | 33 | EXTERN mbed_sdk_init |
aravindsv | 0:ba7650f404af | 34 | EXTERN SystemInit |
aravindsv | 0:ba7650f404af | 35 | |
aravindsv | 0:ba7650f404af | 36 | THUMB |
aravindsv | 0:ba7650f404af | 37 | __cmain: |
aravindsv | 0:ba7650f404af | 38 | ?main: |
aravindsv | 0:ba7650f404af | 39 | |
aravindsv | 0:ba7650f404af | 40 | ; Initialize segments. |
aravindsv | 0:ba7650f404af | 41 | ; __segment_init and __low_level_init are assumed to use the same |
aravindsv | 0:ba7650f404af | 42 | ; instruction set and to be reachable by BL from the ICODE segment |
aravindsv | 0:ba7650f404af | 43 | ; (it is safest to link them in segment ICODE). |
aravindsv | 0:ba7650f404af | 44 | |
aravindsv | 0:ba7650f404af | 45 | FUNCALL __cmain, __low_level_init |
aravindsv | 0:ba7650f404af | 46 | bl __low_level_init |
aravindsv | 0:ba7650f404af | 47 | cmp r0,#0 |
aravindsv | 0:ba7650f404af | 48 | beq ?l1 |
aravindsv | 0:ba7650f404af | 49 | FUNCALL __cmain, __iar_data_init3 |
aravindsv | 0:ba7650f404af | 50 | bl __iar_data_init3 |
aravindsv | 0:ba7650f404af | 51 | MOVS r0,#0 ; No parameters |
aravindsv | 0:ba7650f404af | 52 | FUNCALL __cmain, mbed_sdk_init |
aravindsv | 0:ba7650f404af | 53 | BL mbed_sdk_init |
aravindsv | 0:ba7650f404af | 54 | MOVS r0,#0 ; No parameters |
aravindsv | 0:ba7650f404af | 55 | FUNCALL __cmain, __iar_dynamic_initialization |
aravindsv | 0:ba7650f404af | 56 | BL __iar_dynamic_initialization ; C++ dynamic initialization |
aravindsv | 0:ba7650f404af | 57 | |
aravindsv | 0:ba7650f404af | 58 | ?l1: |
aravindsv | 0:ba7650f404af | 59 | REQUIRE ?l3 |
aravindsv | 0:ba7650f404af | 60 | |
aravindsv | 0:ba7650f404af | 61 | SECTION .text:CODE:NOROOT(2) |
aravindsv | 0:ba7650f404af | 62 | |
aravindsv | 0:ba7650f404af | 63 | PUBLIC _main |
aravindsv | 0:ba7650f404af | 64 | PUBLIC _call_main |
aravindsv | 0:ba7650f404af | 65 | THUMB |
aravindsv | 0:ba7650f404af | 66 | |
aravindsv | 0:ba7650f404af | 67 | __iar_init$$done: ; Copy initialization is done |
aravindsv | 0:ba7650f404af | 68 | |
aravindsv | 0:ba7650f404af | 69 | ?l3: |
aravindsv | 0:ba7650f404af | 70 | _call_main: |
aravindsv | 0:ba7650f404af | 71 | MOVS r0,#0 ; No parameters |
aravindsv | 0:ba7650f404af | 72 | FUNCALL __cmain, __iar_argc_argv |
aravindsv | 0:ba7650f404af | 73 | BL __iar_argc_argv ; Maybe setup command line |
aravindsv | 0:ba7650f404af | 74 | |
aravindsv | 0:ba7650f404af | 75 | FUNCALL __cmain, main |
aravindsv | 0:ba7650f404af | 76 | BL main |
aravindsv | 0:ba7650f404af | 77 | _main: |
aravindsv | 0:ba7650f404af | 78 | FUNCALL __cmain, exit |
aravindsv | 0:ba7650f404af | 79 | BL exit |
aravindsv | 0:ba7650f404af | 80 | |
aravindsv | 0:ba7650f404af | 81 | END |