ARM GAS /tmp/ccGGuUQz.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 "usart.c" 16 .text 17 .Ltext0: 18 .cfi_sections .debug_frame 19 .section .text.MX_USART1_UART_Init,"ax",%progbits 20 .align 1 21 .global MX_USART1_UART_Init 22 .syntax unified 23 .thumb 24 .thumb_func 26 MX_USART1_UART_Init: 27 .LFB134: 28 .file 1 "Src/usart.c" 1:Src/usart.c **** /* USER CODE BEGIN Header */ 2:Src/usart.c **** /** 3:Src/usart.c **** ****************************************************************************** 4:Src/usart.c **** * @file usart.c 5:Src/usart.c **** * @brief This file provides code for the configuration 6:Src/usart.c **** * of the USART instances. 7:Src/usart.c **** ****************************************************************************** 8:Src/usart.c **** * @attention 9:Src/usart.c **** * 10:Src/usart.c **** * Copyright (c) 2025 STMicroelectronics. 11:Src/usart.c **** * All rights reserved. 12:Src/usart.c **** * 13:Src/usart.c **** * This software is licensed under terms that can be found in the LICENSE file 14:Src/usart.c **** * in the root directory of this software component. 15:Src/usart.c **** * If no LICENSE file comes with this software, it is provided AS-IS. 16:Src/usart.c **** * 17:Src/usart.c **** ****************************************************************************** 18:Src/usart.c **** */ 19:Src/usart.c **** /* USER CODE END Header */ 20:Src/usart.c **** /* Includes ------------------------------------------------------------------*/ 21:Src/usart.c **** #include "usart.h" 22:Src/usart.c **** 23:Src/usart.c **** /* USER CODE BEGIN 0 */ 24:Src/usart.c **** 25:Src/usart.c **** /* USER CODE END 0 */ 26:Src/usart.c **** 27:Src/usart.c **** UART_HandleTypeDef huart1; 28:Src/usart.c **** 29:Src/usart.c **** /* USART1 init function */ 30:Src/usart.c **** ARM GAS /tmp/ccGGuUQz.s page 2 31:Src/usart.c **** void MX_USART1_UART_Init(void) 32:Src/usart.c **** { 29 .loc 1 32 1 view -0 30 .cfi_startproc 31 @ args = 0, pretend = 0, frame = 0 32 @ frame_needed = 0, uses_anonymous_args = 0 33 0000 08B5 push {r3, lr} 34 .LCFI0: 35 .cfi_def_cfa_offset 8 36 .cfi_offset 3, -8 37 .cfi_offset 14, -4 33:Src/usart.c **** 34:Src/usart.c **** /* USER CODE BEGIN USART1_Init 0 */ 35:Src/usart.c **** 36:Src/usart.c **** /* USER CODE END USART1_Init 0 */ 37:Src/usart.c **** 38:Src/usart.c **** /* USER CODE BEGIN USART1_Init 1 */ 39:Src/usart.c **** 40:Src/usart.c **** /* USER CODE END USART1_Init 1 */ 41:Src/usart.c **** huart1.Instance = USART1; 38 .loc 1 41 3 view .LVU1 39 .loc 1 41 19 is_stmt 0 view .LVU2 40 0002 0A48 ldr r0, .L5 41 0004 0A4B ldr r3, .L5+4 42 0006 0360 str r3, [r0] 42:Src/usart.c **** huart1.Init.BaudRate = 115200; 43 .loc 1 42 3 is_stmt 1 view .LVU3 44 .loc 1 42 24 is_stmt 0 view .LVU4 45 0008 4FF4E133 mov r3, #115200 46 000c 4360 str r3, [r0, #4] 43:Src/usart.c **** huart1.Init.WordLength = UART_WORDLENGTH_8B; 47 .loc 1 43 3 is_stmt 1 view .LVU5 48 .loc 1 43 26 is_stmt 0 view .LVU6 49 000e 0023 movs r3, #0 50 0010 8360 str r3, [r0, #8] 44:Src/usart.c **** huart1.Init.StopBits = UART_STOPBITS_1; 51 .loc 1 44 3 is_stmt 1 view .LVU7 52 .loc 1 44 24 is_stmt 0 view .LVU8 53 0012 C360 str r3, [r0, #12] 45:Src/usart.c **** huart1.Init.Parity = UART_PARITY_NONE; 54 .loc 1 45 3 is_stmt 1 view .LVU9 55 .loc 1 45 22 is_stmt 0 view .LVU10 56 0014 0361 str r3, [r0, #16] 46:Src/usart.c **** huart1.Init.Mode = UART_MODE_TX_RX; 57 .loc 1 46 3 is_stmt 1 view .LVU11 58 .loc 1 46 20 is_stmt 0 view .LVU12 59 0016 0C22 movs r2, #12 60 0018 4261 str r2, [r0, #20] 47:Src/usart.c **** huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; 61 .loc 1 47 3 is_stmt 1 view .LVU13 62 .loc 1 47 25 is_stmt 0 view .LVU14 63 001a 8361 str r3, [r0, #24] 48:Src/usart.c **** huart1.Init.OverSampling = UART_OVERSAMPLING_16; 64 .loc 1 48 3 is_stmt 1 view .LVU15 65 .loc 1 48 28 is_stmt 0 view .LVU16 66 001c C361 str r3, [r0, #28] 49:Src/usart.c **** if (HAL_UART_Init(&huart1) != HAL_OK) ARM GAS /tmp/ccGGuUQz.s page 3 67 .loc 1 49 3 is_stmt 1 view .LVU17 68 .loc 1 49 7 is_stmt 0 view .LVU18 69 001e FFF7FEFF bl HAL_UART_Init 70 .LVL0: 71 .loc 1 49 6 view .LVU19 72 0022 00B9 cbnz r0, .L4 73 .L1: 50:Src/usart.c **** { 51:Src/usart.c **** Error_Handler(); 52:Src/usart.c **** } 53:Src/usart.c **** /* USER CODE BEGIN USART1_Init 2 */ 54:Src/usart.c **** 55:Src/usart.c **** /* USER CODE END USART1_Init 2 */ 56:Src/usart.c **** 57:Src/usart.c **** } 74 .loc 1 57 1 view .LVU20 75 0024 08BD pop {r3, pc} 76 .L4: 51:Src/usart.c **** } 77 .loc 1 51 5 is_stmt 1 view .LVU21 78 0026 FFF7FEFF bl Error_Handler 79 .LVL1: 80 .loc 1 57 1 is_stmt 0 view .LVU22 81 002a FBE7 b .L1 82 .L6: 83 .align 2 84 .L5: 85 002c 00000000 .word .LANCHOR0 86 0030 00100140 .word 1073811456 87 .cfi_endproc 88 .LFE134: 90 .section .text.HAL_UART_MspInit,"ax",%progbits 91 .align 1 92 .global HAL_UART_MspInit 93 .syntax unified 94 .thumb 95 .thumb_func 97 HAL_UART_MspInit: 98 .LVL2: 99 .LFB135: 58:Src/usart.c **** 59:Src/usart.c **** void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) 60:Src/usart.c **** { 100 .loc 1 60 1 is_stmt 1 view -0 101 .cfi_startproc 102 @ args = 0, pretend = 0, frame = 32 103 @ frame_needed = 0, uses_anonymous_args = 0 104 .loc 1 60 1 is_stmt 0 view .LVU24 105 0000 00B5 push {lr} 106 .LCFI1: 107 .cfi_def_cfa_offset 4 108 .cfi_offset 14, -4 109 0002 89B0 sub sp, sp, #36 110 .LCFI2: 111 .cfi_def_cfa_offset 40 61:Src/usart.c **** 62:Src/usart.c **** GPIO_InitTypeDef GPIO_InitStruct = {0}; ARM GAS /tmp/ccGGuUQz.s page 4 112 .loc 1 62 3 is_stmt 1 view .LVU25 113 .loc 1 62 20 is_stmt 0 view .LVU26 114 0004 0023 movs r3, #0 115 0006 0393 str r3, [sp, #12] 116 0008 0493 str r3, [sp, #16] 117 000a 0593 str r3, [sp, #20] 118 000c 0693 str r3, [sp, #24] 119 000e 0793 str r3, [sp, #28] 63:Src/usart.c **** if(uartHandle->Instance==USART1) 120 .loc 1 63 3 is_stmt 1 view .LVU27 121 .loc 1 63 16 is_stmt 0 view .LVU28 122 0010 0268 ldr r2, [r0] 123 .loc 1 63 5 view .LVU29 124 0012 03F18043 add r3, r3, #1073741824 125 0016 03F58833 add r3, r3, #69632 126 001a 9A42 cmp r2, r3 127 001c 02D0 beq .L10 128 .LVL3: 129 .L7: 64:Src/usart.c **** { 65:Src/usart.c **** /* USER CODE BEGIN USART1_MspInit 0 */ 66:Src/usart.c **** 67:Src/usart.c **** /* USER CODE END USART1_MspInit 0 */ 68:Src/usart.c **** /* USART1 clock enable */ 69:Src/usart.c **** __HAL_RCC_USART1_CLK_ENABLE(); 70:Src/usart.c **** 71:Src/usart.c **** __HAL_RCC_GPIOA_CLK_ENABLE(); 72:Src/usart.c **** /**USART1 GPIO Configuration 73:Src/usart.c **** PA9 ------> USART1_TX 74:Src/usart.c **** PA10 ------> USART1_RX 75:Src/usart.c **** */ 76:Src/usart.c **** GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; 77:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 78:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_NOPULL; 79:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF7_USART1; 81:Src/usart.c **** HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 82:Src/usart.c **** 83:Src/usart.c **** /* USER CODE BEGIN USART1_MspInit 1 */ 84:Src/usart.c **** 85:Src/usart.c **** /* USER CODE END USART1_MspInit 1 */ 86:Src/usart.c **** } 87:Src/usart.c **** } 130 .loc 1 87 1 view .LVU30 131 001e 09B0 add sp, sp, #36 132 .LCFI3: 133 .cfi_remember_state 134 .cfi_def_cfa_offset 4 135 @ sp needed 136 0020 5DF804FB ldr pc, [sp], #4 137 .LVL4: 138 .L10: 139 .LCFI4: 140 .cfi_restore_state 69:Src/usart.c **** 141 .loc 1 69 5 is_stmt 1 view .LVU31 142 .LBB2: ARM GAS /tmp/ccGGuUQz.s page 5 69:Src/usart.c **** 143 .loc 1 69 5 view .LVU32 144 0024 0021 movs r1, #0 145 0026 0191 str r1, [sp, #4] 69:Src/usart.c **** 146 .loc 1 69 5 view .LVU33 147 0028 03F59433 add r3, r3, #75776 148 002c 5A6C ldr r2, [r3, #68] 149 002e 42F01002 orr r2, r2, #16 150 0032 5A64 str r2, [r3, #68] 69:Src/usart.c **** 151 .loc 1 69 5 view .LVU34 152 0034 5A6C ldr r2, [r3, #68] 153 0036 02F01002 and r2, r2, #16 154 003a 0192 str r2, [sp, #4] 69:Src/usart.c **** 155 .loc 1 69 5 view .LVU35 156 003c 019A ldr r2, [sp, #4] 157 .LBE2: 69:Src/usart.c **** 158 .loc 1 69 5 view .LVU36 71:Src/usart.c **** /**USART1 GPIO Configuration 159 .loc 1 71 5 view .LVU37 160 .LBB3: 71:Src/usart.c **** /**USART1 GPIO Configuration 161 .loc 1 71 5 view .LVU38 162 003e 0291 str r1, [sp, #8] 71:Src/usart.c **** /**USART1 GPIO Configuration 163 .loc 1 71 5 view .LVU39 164 0040 1A6B ldr r2, [r3, #48] 165 0042 42F00102 orr r2, r2, #1 166 0046 1A63 str r2, [r3, #48] 71:Src/usart.c **** /**USART1 GPIO Configuration 167 .loc 1 71 5 view .LVU40 168 0048 1B6B ldr r3, [r3, #48] 169 004a 03F00103 and r3, r3, #1 170 004e 0293 str r3, [sp, #8] 71:Src/usart.c **** /**USART1 GPIO Configuration 171 .loc 1 71 5 view .LVU41 172 0050 029B ldr r3, [sp, #8] 173 .LBE3: 71:Src/usart.c **** /**USART1 GPIO Configuration 174 .loc 1 71 5 view .LVU42 76:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 175 .loc 1 76 5 view .LVU43 76:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 176 .loc 1 76 25 is_stmt 0 view .LVU44 177 0052 4FF4C063 mov r3, #1536 178 0056 0393 str r3, [sp, #12] 77:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_NOPULL; 179 .loc 1 77 5 is_stmt 1 view .LVU45 77:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_NOPULL; 180 .loc 1 77 26 is_stmt 0 view .LVU46 181 0058 0223 movs r3, #2 182 005a 0493 str r3, [sp, #16] 78:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 183 .loc 1 78 5 is_stmt 1 view .LVU47 ARM GAS /tmp/ccGGuUQz.s page 6 79:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF7_USART1; 184 .loc 1 79 5 view .LVU48 79:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF7_USART1; 185 .loc 1 79 27 is_stmt 0 view .LVU49 186 005c 0323 movs r3, #3 187 005e 0693 str r3, [sp, #24] 80:Src/usart.c **** HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 188 .loc 1 80 5 is_stmt 1 view .LVU50 80:Src/usart.c **** HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 189 .loc 1 80 31 is_stmt 0 view .LVU51 190 0060 0723 movs r3, #7 191 0062 0793 str r3, [sp, #28] 81:Src/usart.c **** 192 .loc 1 81 5 is_stmt 1 view .LVU52 193 0064 03A9 add r1, sp, #12 194 0066 0248 ldr r0, .L11 195 .LVL5: 81:Src/usart.c **** 196 .loc 1 81 5 is_stmt 0 view .LVU53 197 0068 FFF7FEFF bl HAL_GPIO_Init 198 .LVL6: 199 .loc 1 87 1 view .LVU54 200 006c D7E7 b .L7 201 .L12: 202 006e 00BF .align 2 203 .L11: 204 0070 00000240 .word 1073872896 205 .cfi_endproc 206 .LFE135: 208 .section .text.HAL_UART_MspDeInit,"ax",%progbits 209 .align 1 210 .global HAL_UART_MspDeInit 211 .syntax unified 212 .thumb 213 .thumb_func 215 HAL_UART_MspDeInit: 216 .LVL7: 217 .LFB136: 88:Src/usart.c **** 89:Src/usart.c **** void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) 90:Src/usart.c **** { 218 .loc 1 90 1 is_stmt 1 view -0 219 .cfi_startproc 220 @ args = 0, pretend = 0, frame = 0 221 @ frame_needed = 0, uses_anonymous_args = 0 222 .loc 1 90 1 is_stmt 0 view .LVU56 223 0000 08B5 push {r3, lr} 224 .LCFI5: 225 .cfi_def_cfa_offset 8 226 .cfi_offset 3, -8 227 .cfi_offset 14, -4 91:Src/usart.c **** 92:Src/usart.c **** if(uartHandle->Instance==USART1) 228 .loc 1 92 3 is_stmt 1 view .LVU57 229 .loc 1 92 16 is_stmt 0 view .LVU58 230 0002 0268 ldr r2, [r0] 231 .loc 1 92 5 view .LVU59 ARM GAS /tmp/ccGGuUQz.s page 7 232 0004 074B ldr r3, .L17 233 0006 9A42 cmp r2, r3 234 0008 00D0 beq .L16 235 .LVL8: 236 .L13: 93:Src/usart.c **** { 94:Src/usart.c **** /* USER CODE BEGIN USART1_MspDeInit 0 */ 95:Src/usart.c **** 96:Src/usart.c **** /* USER CODE END USART1_MspDeInit 0 */ 97:Src/usart.c **** /* Peripheral clock disable */ 98:Src/usart.c **** __HAL_RCC_USART1_CLK_DISABLE(); 99:Src/usart.c **** 100:Src/usart.c **** /**USART1 GPIO Configuration 101:Src/usart.c **** PA9 ------> USART1_TX 102:Src/usart.c **** PA10 ------> USART1_RX 103:Src/usart.c **** */ 104:Src/usart.c **** HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10); 105:Src/usart.c **** 106:Src/usart.c **** /* USER CODE BEGIN USART1_MspDeInit 1 */ 107:Src/usart.c **** 108:Src/usart.c **** /* USER CODE END USART1_MspDeInit 1 */ 109:Src/usart.c **** } 110:Src/usart.c **** } 237 .loc 1 110 1 view .LVU60 238 000a 08BD pop {r3, pc} 239 .LVL9: 240 .L16: 98:Src/usart.c **** 241 .loc 1 98 5 is_stmt 1 view .LVU61 242 000c 064A ldr r2, .L17+4 243 000e 536C ldr r3, [r2, #68] 244 0010 23F01003 bic r3, r3, #16 245 0014 5364 str r3, [r2, #68] 104:Src/usart.c **** 246 .loc 1 104 5 view .LVU62 247 0016 4FF4C061 mov r1, #1536 248 001a 0448 ldr r0, .L17+8 249 .LVL10: 104:Src/usart.c **** 250 .loc 1 104 5 is_stmt 0 view .LVU63 251 001c FFF7FEFF bl HAL_GPIO_DeInit 252 .LVL11: 253 .loc 1 110 1 view .LVU64 254 0020 F3E7 b .L13 255 .L18: 256 0022 00BF .align 2 257 .L17: 258 0024 00100140 .word 1073811456 259 0028 00380240 .word 1073887232 260 002c 00000240 .word 1073872896 261 .cfi_endproc 262 .LFE136: 264 .global huart1 265 .section .bss.huart1,"aw",%nobits 266 .align 2 267 .set .LANCHOR0,. + 0 270 huart1: ARM GAS /tmp/ccGGuUQz.s page 8 271 0000 00000000 .space 72 271 00000000 271 00000000 271 00000000 271 00000000 272 .text 273 .Letext0: 274 .file 2 "/home/jfen/toolchain/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/include/machine/_defaul 275 .file 3 "/home/jfen/toolchain/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/include/sys/_stdint.h" 276 .file 4 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h" 277 .file 5 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h" 278 .file 6 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h" 279 .file 7 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h" 280 .file 8 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h" 281 .file 9 "Inc/main.h" 282 .file 10 "Inc/usart.h" ARM GAS /tmp/ccGGuUQz.s page 9 DEFINED SYMBOLS *ABS*:0000000000000000 usart.c /tmp/ccGGuUQz.s:20 .text.MX_USART1_UART_Init:0000000000000000 $t /tmp/ccGGuUQz.s:26 .text.MX_USART1_UART_Init:0000000000000000 MX_USART1_UART_Init /tmp/ccGGuUQz.s:85 .text.MX_USART1_UART_Init:000000000000002c $d /tmp/ccGGuUQz.s:91 .text.HAL_UART_MspInit:0000000000000000 $t /tmp/ccGGuUQz.s:97 .text.HAL_UART_MspInit:0000000000000000 HAL_UART_MspInit /tmp/ccGGuUQz.s:204 .text.HAL_UART_MspInit:0000000000000070 $d /tmp/ccGGuUQz.s:209 .text.HAL_UART_MspDeInit:0000000000000000 $t /tmp/ccGGuUQz.s:215 .text.HAL_UART_MspDeInit:0000000000000000 HAL_UART_MspDeInit /tmp/ccGGuUQz.s:258 .text.HAL_UART_MspDeInit:0000000000000024 $d /tmp/ccGGuUQz.s:270 .bss.huart1:0000000000000000 huart1 /tmp/ccGGuUQz.s:266 .bss.huart1:0000000000000000 $d UNDEFINED SYMBOLS HAL_UART_Init Error_Handler HAL_GPIO_Init HAL_GPIO_DeInit