ARM GAS /tmp/ccsyoZIu.s page 1
1 .cpu cortex-m4
2 .arch armv7e-m
3 .fpu fpv4-sp-d16
4 .eabi_attribute 27, 1
5 .eabi_attribute 28, 1
6 .eabi_attribute 20, 1
7 .eabi_attribute 21, 1
8 .eabi_attribute 23, 3
9 .eabi_attribute 24, 1
10 .eabi_attribute 25, 1
11 .eabi_attribute 26, 1
12 .eabi_attribute 30, 1
13 .eabi_attribute 34, 1
14 .eabi_attribute 18, 4
15 .file "adc.c"
16 .text
17 .Ltext0:
18 .cfi_sections .debug_frame
19 .section .text.MX_ADC1_Init,"ax",%progbits
20 .align 1
21 .global MX_ADC1_Init
22 .syntax unified
23 .thumb
24 .thumb_func
26 MX_ADC1_Init:
27 .LFB130:
28 .file 1 "Src/adc.c"
1:Src/adc.c **** /**
2:Src/adc.c **** ******************************************************************************
3:Src/adc.c **** * File Name : ADC.c
4:Src/adc.c **** * Description : This file provides code for the configuration
5:Src/adc.c **** * of the ADC instances.
6:Src/adc.c **** ******************************************************************************
7:Src/adc.c **** * @attention
8:Src/adc.c **** *
9:Src/adc.c **** *
© Copyright (c) 2022 STMicroelectronics.
10:Src/adc.c **** * All rights reserved.
11:Src/adc.c **** *
12:Src/adc.c **** * This software component is licensed by ST under BSD 3-Clause license,
13:Src/adc.c **** * the "License"; You may not use this file except in compliance with the
14:Src/adc.c **** * License. You may obtain a copy of the License at:
15:Src/adc.c **** * opensource.org/licenses/BSD-3-Clause
16:Src/adc.c **** *
17:Src/adc.c **** ******************************************************************************
18:Src/adc.c **** */
19:Src/adc.c ****
20:Src/adc.c **** /* Includes ------------------------------------------------------------------*/
21:Src/adc.c **** #include "adc.h"
22:Src/adc.c ****
23:Src/adc.c **** /* USER CODE BEGIN 0 */
24:Src/adc.c ****
25:Src/adc.c **** /* USER CODE END 0 */
26:Src/adc.c ****
27:Src/adc.c **** ADC_HandleTypeDef hadc1;
28:Src/adc.c ****
29:Src/adc.c **** /* ADC1 init function */
30:Src/adc.c **** void MX_ADC1_Init(void)
ARM GAS /tmp/ccsyoZIu.s page 2
31:Src/adc.c **** {
29 .loc 1 31 1 view -0
30 .cfi_startproc
31 @ args = 0, pretend = 0, frame = 16
32 @ frame_needed = 0, uses_anonymous_args = 0
33 0000 00B5 push {lr}
34 .LCFI0:
35 .cfi_def_cfa_offset 4
36 .cfi_offset 14, -4
37 0002 85B0 sub sp, sp, #20
38 .LCFI1:
39 .cfi_def_cfa_offset 24
32:Src/adc.c **** ADC_ChannelConfTypeDef sConfig = {0};
40 .loc 1 32 3 view .LVU1
41 .loc 1 32 26 is_stmt 0 view .LVU2
42 0004 0023 movs r3, #0
43 0006 0093 str r3, [sp]
44 0008 0193 str r3, [sp, #4]
45 000a 0293 str r3, [sp, #8]
46 000c 0393 str r3, [sp, #12]
33:Src/adc.c ****
34:Src/adc.c **** /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of con
35:Src/adc.c **** */
36:Src/adc.c **** hadc1.Instance = ADC1;
47 .loc 1 36 3 is_stmt 1 view .LVU3
48 .loc 1 36 18 is_stmt 0 view .LVU4
49 000e 1448 ldr r0, .L7
50 0010 144A ldr r2, .L7+4
51 0012 0260 str r2, [r0]
37:Src/adc.c **** hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2;
52 .loc 1 37 3 is_stmt 1 view .LVU5
53 .loc 1 37 29 is_stmt 0 view .LVU6
54 0014 4360 str r3, [r0, #4]
38:Src/adc.c **** hadc1.Init.Resolution = ADC_RESOLUTION_12B;
55 .loc 1 38 3 is_stmt 1 view .LVU7
56 .loc 1 38 25 is_stmt 0 view .LVU8
57 0016 8360 str r3, [r0, #8]
39:Src/adc.c **** hadc1.Init.ScanConvMode = DISABLE;
58 .loc 1 39 3 is_stmt 1 view .LVU9
59 .loc 1 39 27 is_stmt 0 view .LVU10
60 0018 0361 str r3, [r0, #16]
40:Src/adc.c **** hadc1.Init.ContinuousConvMode = DISABLE;
61 .loc 1 40 3 is_stmt 1 view .LVU11
62 .loc 1 40 33 is_stmt 0 view .LVU12
63 001a 0376 strb r3, [r0, #24]
41:Src/adc.c **** hadc1.Init.DiscontinuousConvMode = DISABLE;
64 .loc 1 41 3 is_stmt 1 view .LVU13
65 .loc 1 41 36 is_stmt 0 view .LVU14
66 001c 80F82030 strb r3, [r0, #32]
42:Src/adc.c **** hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
67 .loc 1 42 3 is_stmt 1 view .LVU15
68 .loc 1 42 35 is_stmt 0 view .LVU16
69 0020 C362 str r3, [r0, #44]
43:Src/adc.c **** hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
70 .loc 1 43 3 is_stmt 1 view .LVU17
71 .loc 1 43 31 is_stmt 0 view .LVU18
72 0022 114A ldr r2, .L7+8
ARM GAS /tmp/ccsyoZIu.s page 3
73 0024 8262 str r2, [r0, #40]
44:Src/adc.c **** hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
74 .loc 1 44 3 is_stmt 1 view .LVU19
75 .loc 1 44 24 is_stmt 0 view .LVU20
76 0026 C360 str r3, [r0, #12]
45:Src/adc.c **** hadc1.Init.NbrOfConversion = 1;
77 .loc 1 45 3 is_stmt 1 view .LVU21
78 .loc 1 45 30 is_stmt 0 view .LVU22
79 0028 0122 movs r2, #1
80 002a C261 str r2, [r0, #28]
46:Src/adc.c **** hadc1.Init.DMAContinuousRequests = DISABLE;
81 .loc 1 46 3 is_stmt 1 view .LVU23
82 .loc 1 46 36 is_stmt 0 view .LVU24
83 002c 80F83030 strb r3, [r0, #48]
47:Src/adc.c **** hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
84 .loc 1 47 3 is_stmt 1 view .LVU25
85 .loc 1 47 27 is_stmt 0 view .LVU26
86 0030 4261 str r2, [r0, #20]
48:Src/adc.c **** if (HAL_ADC_Init(&hadc1) != HAL_OK)
87 .loc 1 48 3 is_stmt 1 view .LVU27
88 .loc 1 48 7 is_stmt 0 view .LVU28
89 0032 FFF7FEFF bl HAL_ADC_Init
90 .LVL0:
91 .loc 1 48 6 view .LVU29
92 0036 68B9 cbnz r0, .L5
93 .L2:
49:Src/adc.c **** {
50:Src/adc.c **** Error_Handler();
51:Src/adc.c **** }
52:Src/adc.c **** /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and it
53:Src/adc.c **** */
54:Src/adc.c **** sConfig.Channel = ADC_CHANNEL_4;
94 .loc 1 54 3 is_stmt 1 view .LVU30
95 .loc 1 54 19 is_stmt 0 view .LVU31
96 0038 0423 movs r3, #4
97 003a 0093 str r3, [sp]
55:Src/adc.c **** sConfig.Rank = 1;
98 .loc 1 55 3 is_stmt 1 view .LVU32
99 .loc 1 55 16 is_stmt 0 view .LVU33
100 003c 0123 movs r3, #1
101 003e 0193 str r3, [sp, #4]
56:Src/adc.c **** sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
102 .loc 1 56 3 is_stmt 1 view .LVU34
103 .loc 1 56 24 is_stmt 0 view .LVU35
104 0040 0023 movs r3, #0
105 0042 0293 str r3, [sp, #8]
57:Src/adc.c **** if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
106 .loc 1 57 3 is_stmt 1 view .LVU36
107 .loc 1 57 7 is_stmt 0 view .LVU37
108 0044 6946 mov r1, sp
109 0046 0648 ldr r0, .L7
110 0048 FFF7FEFF bl HAL_ADC_ConfigChannel
111 .LVL1:
112 .loc 1 57 6 view .LVU38
113 004c 28B9 cbnz r0, .L6
114 .L1:
58:Src/adc.c **** {
ARM GAS /tmp/ccsyoZIu.s page 4
59:Src/adc.c **** Error_Handler();
60:Src/adc.c **** }
61:Src/adc.c ****
62:Src/adc.c **** }
115 .loc 1 62 1 view .LVU39
116 004e 05B0 add sp, sp, #20
117 .LCFI2:
118 .cfi_remember_state
119 .cfi_def_cfa_offset 4
120 @ sp needed
121 0050 5DF804FB ldr pc, [sp], #4
122 .L5:
123 .LCFI3:
124 .cfi_restore_state
50:Src/adc.c **** }
125 .loc 1 50 5 is_stmt 1 view .LVU40
126 0054 FFF7FEFF bl Error_Handler
127 .LVL2:
128 0058 EEE7 b .L2
129 .L6:
59:Src/adc.c **** }
130 .loc 1 59 5 view .LVU41
131 005a FFF7FEFF bl Error_Handler
132 .LVL3:
133 .loc 1 62 1 is_stmt 0 view .LVU42
134 005e F6E7 b .L1
135 .L8:
136 .align 2
137 .L7:
138 0060 00000000 .word .LANCHOR0
139 0064 00200140 .word 1073815552
140 0068 0100000F .word 251658241
141 .cfi_endproc
142 .LFE130:
144 .section .text.HAL_ADC_MspInit,"ax",%progbits
145 .align 1
146 .global HAL_ADC_MspInit
147 .syntax unified
148 .thumb
149 .thumb_func
151 HAL_ADC_MspInit:
152 .LVL4:
153 .LFB131:
63:Src/adc.c ****
64:Src/adc.c **** void HAL_ADC_MspInit(ADC_HandleTypeDef* adcHandle)
65:Src/adc.c **** {
154 .loc 1 65 1 is_stmt 1 view -0
155 .cfi_startproc
156 @ args = 0, pretend = 0, frame = 32
157 @ frame_needed = 0, uses_anonymous_args = 0
158 .loc 1 65 1 is_stmt 0 view .LVU44
159 0000 00B5 push {lr}
160 .LCFI4:
161 .cfi_def_cfa_offset 4
162 .cfi_offset 14, -4
163 0002 89B0 sub sp, sp, #36
164 .LCFI5:
ARM GAS /tmp/ccsyoZIu.s page 5
165 .cfi_def_cfa_offset 40
66:Src/adc.c ****
67:Src/adc.c **** GPIO_InitTypeDef GPIO_InitStruct = {0};
166 .loc 1 67 3 is_stmt 1 view .LVU45
167 .loc 1 67 20 is_stmt 0 view .LVU46
168 0004 0023 movs r3, #0
169 0006 0393 str r3, [sp, #12]
170 0008 0493 str r3, [sp, #16]
171 000a 0593 str r3, [sp, #20]
172 000c 0693 str r3, [sp, #24]
173 000e 0793 str r3, [sp, #28]
68:Src/adc.c **** if(adcHandle->Instance==ADC1)
174 .loc 1 68 3 is_stmt 1 view .LVU47
175 .loc 1 68 15 is_stmt 0 view .LVU48
176 0010 0268 ldr r2, [r0]
177 .loc 1 68 5 view .LVU49
178 0012 03F18043 add r3, r3, #1073741824
179 0016 03F59033 add r3, r3, #73728
180 001a 9A42 cmp r2, r3
181 001c 02D0 beq .L12
182 .LVL5:
183 .L9:
69:Src/adc.c **** {
70:Src/adc.c **** /* USER CODE BEGIN ADC1_MspInit 0 */
71:Src/adc.c ****
72:Src/adc.c **** /* USER CODE END ADC1_MspInit 0 */
73:Src/adc.c **** /* ADC1 clock enable */
74:Src/adc.c **** __HAL_RCC_ADC1_CLK_ENABLE();
75:Src/adc.c ****
76:Src/adc.c **** __HAL_RCC_GPIOA_CLK_ENABLE();
77:Src/adc.c **** /**ADC1 GPIO Configuration
78:Src/adc.c **** PA4 ------> ADC1_IN4
79:Src/adc.c **** */
80:Src/adc.c **** GPIO_InitStruct.Pin = GPIO_PIN_4;
81:Src/adc.c **** GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
82:Src/adc.c **** GPIO_InitStruct.Pull = GPIO_NOPULL;
83:Src/adc.c **** HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
84:Src/adc.c ****
85:Src/adc.c **** /* USER CODE BEGIN ADC1_MspInit 1 */
86:Src/adc.c ****
87:Src/adc.c **** /* USER CODE END ADC1_MspInit 1 */
88:Src/adc.c **** }
89:Src/adc.c **** }
184 .loc 1 89 1 view .LVU50
185 001e 09B0 add sp, sp, #36
186 .LCFI6:
187 .cfi_remember_state
188 .cfi_def_cfa_offset 4
189 @ sp needed
190 0020 5DF804FB ldr pc, [sp], #4
191 .LVL6:
192 .L12:
193 .LCFI7:
194 .cfi_restore_state
74:Src/adc.c ****
195 .loc 1 74 5 is_stmt 1 view .LVU51
196 .LBB2:
ARM GAS /tmp/ccsyoZIu.s page 6
74:Src/adc.c ****
197 .loc 1 74 5 view .LVU52
198 0024 0021 movs r1, #0
199 0026 0191 str r1, [sp, #4]
74:Src/adc.c ****
200 .loc 1 74 5 view .LVU53
201 0028 03F58C33 add r3, r3, #71680
202 002c 5A6C ldr r2, [r3, #68]
203 002e 42F48072 orr r2, r2, #256
204 0032 5A64 str r2, [r3, #68]
74:Src/adc.c ****
205 .loc 1 74 5 view .LVU54
206 0034 5A6C ldr r2, [r3, #68]
207 0036 02F48072 and r2, r2, #256
208 003a 0192 str r2, [sp, #4]
74:Src/adc.c ****
209 .loc 1 74 5 view .LVU55
210 003c 019A ldr r2, [sp, #4]
211 .LBE2:
74:Src/adc.c ****
212 .loc 1 74 5 view .LVU56
76:Src/adc.c **** /**ADC1 GPIO Configuration
213 .loc 1 76 5 view .LVU57
214 .LBB3:
76:Src/adc.c **** /**ADC1 GPIO Configuration
215 .loc 1 76 5 view .LVU58
216 003e 0291 str r1, [sp, #8]
76:Src/adc.c **** /**ADC1 GPIO Configuration
217 .loc 1 76 5 view .LVU59
218 0040 1A6B ldr r2, [r3, #48]
219 0042 42F00102 orr r2, r2, #1
220 0046 1A63 str r2, [r3, #48]
76:Src/adc.c **** /**ADC1 GPIO Configuration
221 .loc 1 76 5 view .LVU60
222 0048 1B6B ldr r3, [r3, #48]
223 004a 03F00103 and r3, r3, #1
224 004e 0293 str r3, [sp, #8]
76:Src/adc.c **** /**ADC1 GPIO Configuration
225 .loc 1 76 5 view .LVU61
226 0050 029B ldr r3, [sp, #8]
227 .LBE3:
76:Src/adc.c **** /**ADC1 GPIO Configuration
228 .loc 1 76 5 view .LVU62
80:Src/adc.c **** GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
229 .loc 1 80 5 view .LVU63
80:Src/adc.c **** GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
230 .loc 1 80 25 is_stmt 0 view .LVU64
231 0052 1023 movs r3, #16
232 0054 0393 str r3, [sp, #12]
81:Src/adc.c **** GPIO_InitStruct.Pull = GPIO_NOPULL;
233 .loc 1 81 5 is_stmt 1 view .LVU65
81:Src/adc.c **** GPIO_InitStruct.Pull = GPIO_NOPULL;
234 .loc 1 81 26 is_stmt 0 view .LVU66
235 0056 0323 movs r3, #3
236 0058 0493 str r3, [sp, #16]
82:Src/adc.c **** HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
237 .loc 1 82 5 is_stmt 1 view .LVU67
ARM GAS /tmp/ccsyoZIu.s page 7
83:Src/adc.c ****
238 .loc 1 83 5 view .LVU68
239 005a 03A9 add r1, sp, #12
240 005c 0148 ldr r0, .L13
241 .LVL7:
83:Src/adc.c ****
242 .loc 1 83 5 is_stmt 0 view .LVU69
243 005e FFF7FEFF bl HAL_GPIO_Init
244 .LVL8:
245 .loc 1 89 1 view .LVU70
246 0062 DCE7 b .L9
247 .L14:
248 .align 2
249 .L13:
250 0064 00000240 .word 1073872896
251 .cfi_endproc
252 .LFE131:
254 .section .text.HAL_ADC_MspDeInit,"ax",%progbits
255 .align 1
256 .global HAL_ADC_MspDeInit
257 .syntax unified
258 .thumb
259 .thumb_func
261 HAL_ADC_MspDeInit:
262 .LVL9:
263 .LFB132:
90:Src/adc.c ****
91:Src/adc.c **** void HAL_ADC_MspDeInit(ADC_HandleTypeDef* adcHandle)
92:Src/adc.c **** {
264 .loc 1 92 1 is_stmt 1 view -0
265 .cfi_startproc
266 @ args = 0, pretend = 0, frame = 0
267 @ frame_needed = 0, uses_anonymous_args = 0
268 .loc 1 92 1 is_stmt 0 view .LVU72
269 0000 08B5 push {r3, lr}
270 .LCFI8:
271 .cfi_def_cfa_offset 8
272 .cfi_offset 3, -8
273 .cfi_offset 14, -4
93:Src/adc.c ****
94:Src/adc.c **** if(adcHandle->Instance==ADC1)
274 .loc 1 94 3 is_stmt 1 view .LVU73
275 .loc 1 94 15 is_stmt 0 view .LVU74
276 0002 0268 ldr r2, [r0]
277 .loc 1 94 5 view .LVU75
278 0004 064B ldr r3, .L19
279 0006 9A42 cmp r2, r3
280 0008 00D0 beq .L18
281 .LVL10:
282 .L15:
95:Src/adc.c **** {
96:Src/adc.c **** /* USER CODE BEGIN ADC1_MspDeInit 0 */
97:Src/adc.c ****
98:Src/adc.c **** /* USER CODE END ADC1_MspDeInit 0 */
99:Src/adc.c **** /* Peripheral clock disable */
100:Src/adc.c **** __HAL_RCC_ADC1_CLK_DISABLE();
101:Src/adc.c ****
ARM GAS /tmp/ccsyoZIu.s page 8
102:Src/adc.c **** /**ADC1 GPIO Configuration
103:Src/adc.c **** PA4 ------> ADC1_IN4
104:Src/adc.c **** */
105:Src/adc.c **** HAL_GPIO_DeInit(GPIOA, GPIO_PIN_4);
106:Src/adc.c ****
107:Src/adc.c **** /* USER CODE BEGIN ADC1_MspDeInit 1 */
108:Src/adc.c ****
109:Src/adc.c **** /* USER CODE END ADC1_MspDeInit 1 */
110:Src/adc.c **** }
111:Src/adc.c **** }
283 .loc 1 111 1 view .LVU76
284 000a 08BD pop {r3, pc}
285 .LVL11:
286 .L18:
100:Src/adc.c ****
287 .loc 1 100 5 is_stmt 1 view .LVU77
288 000c 054A ldr r2, .L19+4
289 000e 536C ldr r3, [r2, #68]
290 0010 23F48073 bic r3, r3, #256
291 0014 5364 str r3, [r2, #68]
105:Src/adc.c ****
292 .loc 1 105 5 view .LVU78
293 0016 1021 movs r1, #16
294 0018 0348 ldr r0, .L19+8
295 .LVL12:
105:Src/adc.c ****
296 .loc 1 105 5 is_stmt 0 view .LVU79
297 001a FFF7FEFF bl HAL_GPIO_DeInit
298 .LVL13:
299 .loc 1 111 1 view .LVU80
300 001e F4E7 b .L15
301 .L20:
302 .align 2
303 .L19:
304 0020 00200140 .word 1073815552
305 0024 00380240 .word 1073887232
306 0028 00000240 .word 1073872896
307 .cfi_endproc
308 .LFE132:
310 .global hadc1
311 .section .bss.hadc1,"aw",%nobits
312 .align 2
313 .set .LANCHOR0,. + 0
316 hadc1:
317 0000 00000000 .space 72
317 00000000
317 00000000
317 00000000
317 00000000
318 .text
319 .Letext0:
320 .file 2 "/home/gitc/\346\241\214\351\235\242/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/include/
321 .file 3 "/home/gitc/\346\241\214\351\235\242/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/include/
322 .file 4 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h"
323 .file 5 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
324 .file 6 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h"
325 .file 7 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h"
ARM GAS /tmp/ccsyoZIu.s page 9
326 .file 8 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h"
327 .file 9 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h"
328 .file 10 "Inc/main.h"
329 .file 11 "Inc/adc.h"
ARM GAS /tmp/ccsyoZIu.s page 10
DEFINED SYMBOLS
*ABS*:0000000000000000 adc.c
/tmp/ccsyoZIu.s:20 .text.MX_ADC1_Init:0000000000000000 $t
/tmp/ccsyoZIu.s:26 .text.MX_ADC1_Init:0000000000000000 MX_ADC1_Init
/tmp/ccsyoZIu.s:138 .text.MX_ADC1_Init:0000000000000060 $d
/tmp/ccsyoZIu.s:145 .text.HAL_ADC_MspInit:0000000000000000 $t
/tmp/ccsyoZIu.s:151 .text.HAL_ADC_MspInit:0000000000000000 HAL_ADC_MspInit
/tmp/ccsyoZIu.s:250 .text.HAL_ADC_MspInit:0000000000000064 $d
/tmp/ccsyoZIu.s:255 .text.HAL_ADC_MspDeInit:0000000000000000 $t
/tmp/ccsyoZIu.s:261 .text.HAL_ADC_MspDeInit:0000000000000000 HAL_ADC_MspDeInit
/tmp/ccsyoZIu.s:304 .text.HAL_ADC_MspDeInit:0000000000000020 $d
/tmp/ccsyoZIu.s:316 .bss.hadc1:0000000000000000 hadc1
/tmp/ccsyoZIu.s:312 .bss.hadc1:0000000000000000 $d
UNDEFINED SYMBOLS
HAL_ADC_Init
HAL_ADC_ConfigChannel
Error_Handler
HAL_GPIO_Init
HAL_GPIO_DeInit