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