Public fork of mbed-src to add generic stm32f030k6 target
Fork of mbed-src by
targets/cmsis/TOOLCHAIN_IAR/cmain.S@577:15494b56c2f3, 2015-07-01 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Jul 01 08:15:11 2015 +0100
- Revision:
- 577:15494b56c2f3
- Parent:
- targets/cmsis/TOOLCHAIN_IAR/cmain.s@437:0b72c0f86db6
Synchronized with git revision 7766e75dd858812cd79aedb3080349715f55dd56
Full URL: https://github.com/mbedmicro/mbed/commit/7766e75dd858812cd79aedb3080349715f55dd56/
GCC asm updates
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 437:0b72c0f86db6 | 1 | /************************************************** |
mbed_official | 437:0b72c0f86db6 | 2 | * |
mbed_official | 437:0b72c0f86db6 | 3 | * Part two of the system initialization code, contains C-level |
mbed_official | 437:0b72c0f86db6 | 4 | * initialization, thumb-2 only variant. |
mbed_official | 437:0b72c0f86db6 | 5 | * |
mbed_official | 437:0b72c0f86db6 | 6 | * Copyright 2006 IAR Systems. All rights reserved. |
mbed_official | 437:0b72c0f86db6 | 7 | * |
mbed_official | 437:0b72c0f86db6 | 8 | * $Revision: 59783 $ |
mbed_official | 437:0b72c0f86db6 | 9 | * |
mbed_official | 437:0b72c0f86db6 | 10 | **************************************************/ |
mbed_official | 437:0b72c0f86db6 | 11 | |
mbed_official | 437:0b72c0f86db6 | 12 | |
mbed_official | 437:0b72c0f86db6 | 13 | ; -------------------------------------------------- |
mbed_official | 437:0b72c0f86db6 | 14 | ; Module ?cmain, C-level initialization. |
mbed_official | 437:0b72c0f86db6 | 15 | ; |
mbed_official | 437:0b72c0f86db6 | 16 | |
mbed_official | 437:0b72c0f86db6 | 17 | |
mbed_official | 437:0b72c0f86db6 | 18 | SECTION SHT$$PREINIT_ARRAY:CONST:NOROOT(2) |
mbed_official | 437:0b72c0f86db6 | 19 | SECTION SHT$$INIT_ARRAY:CONST:NOROOT(2) |
mbed_official | 437:0b72c0f86db6 | 20 | |
mbed_official | 437:0b72c0f86db6 | 21 | SECTION .text:CODE:NOROOT(2) |
mbed_official | 437:0b72c0f86db6 | 22 | |
mbed_official | 437:0b72c0f86db6 | 23 | PUBLIC __cmain |
mbed_official | 437:0b72c0f86db6 | 24 | ;; Keep ?main for legacy reasons, it is accessed in countless instances of cstartup.s around the world... |
mbed_official | 437:0b72c0f86db6 | 25 | PUBLIC ?main |
mbed_official | 437:0b72c0f86db6 | 26 | EXTWEAK __iar_data_init3 |
mbed_official | 437:0b72c0f86db6 | 27 | EXTWEAK __iar_argc_argv |
mbed_official | 437:0b72c0f86db6 | 28 | EXTERN __low_level_init |
mbed_official | 437:0b72c0f86db6 | 29 | EXTERN __call_ctors |
mbed_official | 437:0b72c0f86db6 | 30 | EXTERN main |
mbed_official | 437:0b72c0f86db6 | 31 | EXTERN exit |
mbed_official | 437:0b72c0f86db6 | 32 | EXTERN __iar_dynamic_initialization |
mbed_official | 437:0b72c0f86db6 | 33 | EXTERN mbed_sdk_init |
mbed_official | 437:0b72c0f86db6 | 34 | EXTERN SystemInit |
mbed_official | 437:0b72c0f86db6 | 35 | |
mbed_official | 437:0b72c0f86db6 | 36 | THUMB |
mbed_official | 437:0b72c0f86db6 | 37 | __cmain: |
mbed_official | 437:0b72c0f86db6 | 38 | ?main: |
mbed_official | 437:0b72c0f86db6 | 39 | |
mbed_official | 437:0b72c0f86db6 | 40 | ; Initialize segments. |
mbed_official | 437:0b72c0f86db6 | 41 | ; __segment_init and __low_level_init are assumed to use the same |
mbed_official | 437:0b72c0f86db6 | 42 | ; instruction set and to be reachable by BL from the ICODE segment |
mbed_official | 437:0b72c0f86db6 | 43 | ; (it is safest to link them in segment ICODE). |
mbed_official | 437:0b72c0f86db6 | 44 | |
mbed_official | 437:0b72c0f86db6 | 45 | FUNCALL __cmain, __low_level_init |
mbed_official | 437:0b72c0f86db6 | 46 | bl __low_level_init |
mbed_official | 437:0b72c0f86db6 | 47 | cmp r0,#0 |
mbed_official | 437:0b72c0f86db6 | 48 | beq ?l1 |
mbed_official | 437:0b72c0f86db6 | 49 | FUNCALL __cmain, __iar_data_init3 |
mbed_official | 437:0b72c0f86db6 | 50 | bl __iar_data_init3 |
mbed_official | 437:0b72c0f86db6 | 51 | MOVS r0,#0 ; No parameters |
mbed_official | 437:0b72c0f86db6 | 52 | FUNCALL __cmain, mbed_sdk_init |
mbed_official | 437:0b72c0f86db6 | 53 | BL mbed_sdk_init |
mbed_official | 437:0b72c0f86db6 | 54 | MOVS r0,#0 ; No parameters |
mbed_official | 437:0b72c0f86db6 | 55 | FUNCALL __cmain, __iar_dynamic_initialization |
mbed_official | 437:0b72c0f86db6 | 56 | BL __iar_dynamic_initialization ; C++ dynamic initialization |
mbed_official | 437:0b72c0f86db6 | 57 | |
mbed_official | 437:0b72c0f86db6 | 58 | ?l1: |
mbed_official | 437:0b72c0f86db6 | 59 | REQUIRE ?l3 |
mbed_official | 437:0b72c0f86db6 | 60 | |
mbed_official | 437:0b72c0f86db6 | 61 | SECTION .text:CODE:NOROOT(2) |
mbed_official | 437:0b72c0f86db6 | 62 | |
mbed_official | 437:0b72c0f86db6 | 63 | PUBLIC _main |
mbed_official | 437:0b72c0f86db6 | 64 | PUBLIC _call_main |
mbed_official | 437:0b72c0f86db6 | 65 | THUMB |
mbed_official | 437:0b72c0f86db6 | 66 | |
mbed_official | 437:0b72c0f86db6 | 67 | __iar_init$$done: ; Copy initialization is done |
mbed_official | 437:0b72c0f86db6 | 68 | |
mbed_official | 437:0b72c0f86db6 | 69 | ?l3: |
mbed_official | 437:0b72c0f86db6 | 70 | _call_main: |
mbed_official | 437:0b72c0f86db6 | 71 | MOVS r0,#0 ; No parameters |
mbed_official | 437:0b72c0f86db6 | 72 | FUNCALL __cmain, __iar_argc_argv |
mbed_official | 437:0b72c0f86db6 | 73 | BL __iar_argc_argv ; Maybe setup command line |
mbed_official | 437:0b72c0f86db6 | 74 | |
mbed_official | 437:0b72c0f86db6 | 75 | FUNCALL __cmain, main |
mbed_official | 437:0b72c0f86db6 | 76 | BL main |
mbed_official | 437:0b72c0f86db6 | 77 | _main: |
mbed_official | 437:0b72c0f86db6 | 78 | FUNCALL __cmain, exit |
mbed_official | 437:0b72c0f86db6 | 79 | BL exit |
mbed_official | 437:0b72c0f86db6 | 80 | |
mbed_official | 437:0b72c0f86db6 | 81 | END |