usart.lst 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  1. ARM GAS /tmp/cc9BaXnO.s page 1
  2. 1 .cpu cortex-m4
  3. 2 .eabi_attribute 27, 1
  4. 3 .eabi_attribute 28, 1
  5. 4 .eabi_attribute 20, 1
  6. 5 .eabi_attribute 21, 1
  7. 6 .eabi_attribute 23, 3
  8. 7 .eabi_attribute 24, 1
  9. 8 .eabi_attribute 25, 1
  10. 9 .eabi_attribute 26, 1
  11. 10 .eabi_attribute 30, 1
  12. 11 .eabi_attribute 34, 1
  13. 12 .eabi_attribute 18, 4
  14. 13 .file "usart.c"
  15. 14 .text
  16. 15 .Ltext0:
  17. 16 .cfi_sections .debug_frame
  18. 17 .section .text.MX_UART4_Init,"ax",%progbits
  19. 18 .align 1
  20. 19 .global MX_UART4_Init
  21. 20 .syntax unified
  22. 21 .thumb
  23. 22 .thumb_func
  24. 23 .fpu fpv4-sp-d16
  25. 25 MX_UART4_Init:
  26. 26 .LFB130:
  27. 27 .file 1 "Src/usart.c"
  28. 1:Src/usart.c **** /**
  29. 2:Src/usart.c **** ******************************************************************************
  30. 3:Src/usart.c **** * File Name : USART.c
  31. 4:Src/usart.c **** * Description : This file provides code for the configuration
  32. 5:Src/usart.c **** * of the USART instances.
  33. 6:Src/usart.c **** ******************************************************************************
  34. 7:Src/usart.c **** * @attention
  35. 8:Src/usart.c **** *
  36. 9:Src/usart.c **** * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
  37. 10:Src/usart.c **** * All rights reserved.</center></h2>
  38. 11:Src/usart.c **** *
  39. 12:Src/usart.c **** * This software component is licensed by ST under BSD 3-Clause license,
  40. 13:Src/usart.c **** * the "License"; You may not use this file except in compliance with the
  41. 14:Src/usart.c **** * License. You may obtain a copy of the License at:
  42. 15:Src/usart.c **** * opensource.org/licenses/BSD-3-Clause
  43. 16:Src/usart.c **** *
  44. 17:Src/usart.c **** ******************************************************************************
  45. 18:Src/usart.c **** */
  46. 19:Src/usart.c ****
  47. 20:Src/usart.c **** /* Includes ------------------------------------------------------------------*/
  48. 21:Src/usart.c **** #include "usart.h"
  49. 22:Src/usart.c ****
  50. 23:Src/usart.c **** /* USER CODE BEGIN 0 */
  51. 24:Src/usart.c ****
  52. 25:Src/usart.c **** /* USER CODE END 0 */
  53. 26:Src/usart.c ****
  54. 27:Src/usart.c **** UART_HandleTypeDef huart4;
  55. 28:Src/usart.c **** UART_HandleTypeDef huart1;
  56. 29:Src/usart.c **** UART_HandleTypeDef huart2;
  57. 30:Src/usart.c ****
  58. 31:Src/usart.c **** /* UART4 init function */
  59. ARM GAS /tmp/cc9BaXnO.s page 2
  60. 32:Src/usart.c **** void MX_UART4_Init(void)
  61. 33:Src/usart.c **** {
  62. 28 .loc 1 33 0
  63. 29 .cfi_startproc
  64. 30 @ args = 0, pretend = 0, frame = 0
  65. 31 @ frame_needed = 0, uses_anonymous_args = 0
  66. 32 0000 08B5 push {r3, lr}
  67. 33 .LCFI0:
  68. 34 .cfi_def_cfa_offset 8
  69. 35 .cfi_offset 3, -8
  70. 36 .cfi_offset 14, -4
  71. 34:Src/usart.c ****
  72. 35:Src/usart.c **** huart4.Instance = UART4;
  73. 37 .loc 1 35 0
  74. 38 0002 0A48 ldr r0, .L5
  75. 39 0004 0A4B ldr r3, .L5+4
  76. 40 0006 0360 str r3, [r0]
  77. 36:Src/usart.c **** huart4.Init.BaudRate = 115200;
  78. 41 .loc 1 36 0
  79. 42 0008 4FF4E133 mov r3, #115200
  80. 43 000c 4360 str r3, [r0, #4]
  81. 37:Src/usart.c **** huart4.Init.WordLength = UART_WORDLENGTH_8B;
  82. 44 .loc 1 37 0
  83. 45 000e 0023 movs r3, #0
  84. 46 0010 8360 str r3, [r0, #8]
  85. 38:Src/usart.c **** huart4.Init.StopBits = UART_STOPBITS_1;
  86. 47 .loc 1 38 0
  87. 48 0012 C360 str r3, [r0, #12]
  88. 39:Src/usart.c **** huart4.Init.Parity = UART_PARITY_NONE;
  89. 49 .loc 1 39 0
  90. 50 0014 0361 str r3, [r0, #16]
  91. 40:Src/usart.c **** huart4.Init.Mode = UART_MODE_TX_RX;
  92. 51 .loc 1 40 0
  93. 52 0016 0C22 movs r2, #12
  94. 53 0018 4261 str r2, [r0, #20]
  95. 41:Src/usart.c **** huart4.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  96. 54 .loc 1 41 0
  97. 55 001a 8361 str r3, [r0, #24]
  98. 42:Src/usart.c **** huart4.Init.OverSampling = UART_OVERSAMPLING_16;
  99. 56 .loc 1 42 0
  100. 57 001c C361 str r3, [r0, #28]
  101. 43:Src/usart.c **** if (HAL_UART_Init(&huart4) != HAL_OK)
  102. 58 .loc 1 43 0
  103. 59 001e FFF7FEFF bl HAL_UART_Init
  104. 60 .LVL0:
  105. 61 0022 00B9 cbnz r0, .L4
  106. 62 .L1:
  107. 63 0024 08BD pop {r3, pc}
  108. 64 .L4:
  109. 44:Src/usart.c **** {
  110. 45:Src/usart.c **** Error_Handler();
  111. 65 .loc 1 45 0
  112. 66 0026 FFF7FEFF bl Error_Handler
  113. 67 .LVL1:
  114. 46:Src/usart.c **** }
  115. 47:Src/usart.c ****
  116. 48:Src/usart.c **** }
  117. ARM GAS /tmp/cc9BaXnO.s page 3
  118. 68 .loc 1 48 0
  119. 69 002a FBE7 b .L1
  120. 70 .L6:
  121. 71 .align 2
  122. 72 .L5:
  123. 73 002c 00000000 .word huart4
  124. 74 0030 004C0040 .word 1073761280
  125. 75 .cfi_endproc
  126. 76 .LFE130:
  127. 78 .section .text.MX_USART1_UART_Init,"ax",%progbits
  128. 79 .align 1
  129. 80 .global MX_USART1_UART_Init
  130. 81 .syntax unified
  131. 82 .thumb
  132. 83 .thumb_func
  133. 84 .fpu fpv4-sp-d16
  134. 86 MX_USART1_UART_Init:
  135. 87 .LFB131:
  136. 49:Src/usart.c **** /* USART1 init function */
  137. 50:Src/usart.c ****
  138. 51:Src/usart.c **** void MX_USART1_UART_Init(void)
  139. 52:Src/usart.c **** {
  140. 88 .loc 1 52 0
  141. 89 .cfi_startproc
  142. 90 @ args = 0, pretend = 0, frame = 0
  143. 91 @ frame_needed = 0, uses_anonymous_args = 0
  144. 92 0000 08B5 push {r3, lr}
  145. 93 .LCFI1:
  146. 94 .cfi_def_cfa_offset 8
  147. 95 .cfi_offset 3, -8
  148. 96 .cfi_offset 14, -4
  149. 53:Src/usart.c ****
  150. 54:Src/usart.c **** huart1.Instance = USART1;
  151. 97 .loc 1 54 0
  152. 98 0002 0A48 ldr r0, .L11
  153. 99 0004 0A4B ldr r3, .L11+4
  154. 100 0006 0360 str r3, [r0]
  155. 55:Src/usart.c **** huart1.Init.BaudRate = 115200;
  156. 101 .loc 1 55 0
  157. 102 0008 4FF4E133 mov r3, #115200
  158. 103 000c 4360 str r3, [r0, #4]
  159. 56:Src/usart.c **** huart1.Init.WordLength = UART_WORDLENGTH_8B;
  160. 104 .loc 1 56 0
  161. 105 000e 0023 movs r3, #0
  162. 106 0010 8360 str r3, [r0, #8]
  163. 57:Src/usart.c **** huart1.Init.StopBits = UART_STOPBITS_1;
  164. 107 .loc 1 57 0
  165. 108 0012 C360 str r3, [r0, #12]
  166. 58:Src/usart.c **** huart1.Init.Parity = UART_PARITY_NONE;
  167. 109 .loc 1 58 0
  168. 110 0014 0361 str r3, [r0, #16]
  169. 59:Src/usart.c **** huart1.Init.Mode = UART_MODE_TX_RX;
  170. 111 .loc 1 59 0
  171. 112 0016 0C22 movs r2, #12
  172. 113 0018 4261 str r2, [r0, #20]
  173. 60:Src/usart.c **** huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  174. 114 .loc 1 60 0
  175. ARM GAS /tmp/cc9BaXnO.s page 4
  176. 115 001a 8361 str r3, [r0, #24]
  177. 61:Src/usart.c **** huart1.Init.OverSampling = UART_OVERSAMPLING_16;
  178. 116 .loc 1 61 0
  179. 117 001c C361 str r3, [r0, #28]
  180. 62:Src/usart.c **** if (HAL_UART_Init(&huart1) != HAL_OK)
  181. 118 .loc 1 62 0
  182. 119 001e FFF7FEFF bl HAL_UART_Init
  183. 120 .LVL2:
  184. 121 0022 00B9 cbnz r0, .L10
  185. 122 .L7:
  186. 123 0024 08BD pop {r3, pc}
  187. 124 .L10:
  188. 63:Src/usart.c **** {
  189. 64:Src/usart.c **** Error_Handler();
  190. 125 .loc 1 64 0
  191. 126 0026 FFF7FEFF bl Error_Handler
  192. 127 .LVL3:
  193. 65:Src/usart.c **** }
  194. 66:Src/usart.c ****
  195. 67:Src/usart.c **** }
  196. 128 .loc 1 67 0
  197. 129 002a FBE7 b .L7
  198. 130 .L12:
  199. 131 .align 2
  200. 132 .L11:
  201. 133 002c 00000000 .word huart1
  202. 134 0030 00100140 .word 1073811456
  203. 135 .cfi_endproc
  204. 136 .LFE131:
  205. 138 .section .text.MX_USART2_UART_Init,"ax",%progbits
  206. 139 .align 1
  207. 140 .global MX_USART2_UART_Init
  208. 141 .syntax unified
  209. 142 .thumb
  210. 143 .thumb_func
  211. 144 .fpu fpv4-sp-d16
  212. 146 MX_USART2_UART_Init:
  213. 147 .LFB132:
  214. 68:Src/usart.c **** /* USART2 init function */
  215. 69:Src/usart.c ****
  216. 70:Src/usart.c **** void MX_USART2_UART_Init(void)
  217. 71:Src/usart.c **** {
  218. 148 .loc 1 71 0
  219. 149 .cfi_startproc
  220. 150 @ args = 0, pretend = 0, frame = 0
  221. 151 @ frame_needed = 0, uses_anonymous_args = 0
  222. 152 0000 08B5 push {r3, lr}
  223. 153 .LCFI2:
  224. 154 .cfi_def_cfa_offset 8
  225. 155 .cfi_offset 3, -8
  226. 156 .cfi_offset 14, -4
  227. 72:Src/usart.c ****
  228. 73:Src/usart.c **** huart2.Instance = USART2;
  229. 157 .loc 1 73 0
  230. 158 0002 0A48 ldr r0, .L17
  231. 159 0004 0A4B ldr r3, .L17+4
  232. 160 0006 0360 str r3, [r0]
  233. ARM GAS /tmp/cc9BaXnO.s page 5
  234. 74:Src/usart.c **** huart2.Init.BaudRate = 38400;
  235. 161 .loc 1 74 0
  236. 162 0008 4FF41643 mov r3, #38400
  237. 163 000c 4360 str r3, [r0, #4]
  238. 75:Src/usart.c **** huart2.Init.WordLength = UART_WORDLENGTH_8B;
  239. 164 .loc 1 75 0
  240. 165 000e 0023 movs r3, #0
  241. 166 0010 8360 str r3, [r0, #8]
  242. 76:Src/usart.c **** huart2.Init.StopBits = UART_STOPBITS_1;
  243. 167 .loc 1 76 0
  244. 168 0012 C360 str r3, [r0, #12]
  245. 77:Src/usart.c **** huart2.Init.Parity = UART_PARITY_NONE;
  246. 169 .loc 1 77 0
  247. 170 0014 0361 str r3, [r0, #16]
  248. 78:Src/usart.c **** huart2.Init.Mode = UART_MODE_TX_RX;
  249. 171 .loc 1 78 0
  250. 172 0016 0C22 movs r2, #12
  251. 173 0018 4261 str r2, [r0, #20]
  252. 79:Src/usart.c **** huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  253. 174 .loc 1 79 0
  254. 175 001a 8361 str r3, [r0, #24]
  255. 80:Src/usart.c **** huart2.Init.OverSampling = UART_OVERSAMPLING_16;
  256. 176 .loc 1 80 0
  257. 177 001c C361 str r3, [r0, #28]
  258. 81:Src/usart.c **** if (HAL_UART_Init(&huart2) != HAL_OK)
  259. 178 .loc 1 81 0
  260. 179 001e FFF7FEFF bl HAL_UART_Init
  261. 180 .LVL4:
  262. 181 0022 00B9 cbnz r0, .L16
  263. 182 .L13:
  264. 183 0024 08BD pop {r3, pc}
  265. 184 .L16:
  266. 82:Src/usart.c **** {
  267. 83:Src/usart.c **** Error_Handler();
  268. 185 .loc 1 83 0
  269. 186 0026 FFF7FEFF bl Error_Handler
  270. 187 .LVL5:
  271. 84:Src/usart.c **** }
  272. 85:Src/usart.c ****
  273. 86:Src/usart.c **** }
  274. 188 .loc 1 86 0
  275. 189 002a FBE7 b .L13
  276. 190 .L18:
  277. 191 .align 2
  278. 192 .L17:
  279. 193 002c 00000000 .word huart2
  280. 194 0030 00440040 .word 1073759232
  281. 195 .cfi_endproc
  282. 196 .LFE132:
  283. 198 .section .text.HAL_UART_MspInit,"ax",%progbits
  284. 199 .align 1
  285. 200 .global HAL_UART_MspInit
  286. 201 .syntax unified
  287. 202 .thumb
  288. 203 .thumb_func
  289. 204 .fpu fpv4-sp-d16
  290. 206 HAL_UART_MspInit:
  291. ARM GAS /tmp/cc9BaXnO.s page 6
  292. 207 .LFB133:
  293. 87:Src/usart.c ****
  294. 88:Src/usart.c **** void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
  295. 89:Src/usart.c **** {
  296. 208 .loc 1 89 0
  297. 209 .cfi_startproc
  298. 210 @ args = 0, pretend = 0, frame = 48
  299. 211 @ frame_needed = 0, uses_anonymous_args = 0
  300. 212 .LVL6:
  301. 213 0000 10B5 push {r4, lr}
  302. 214 .LCFI3:
  303. 215 .cfi_def_cfa_offset 8
  304. 216 .cfi_offset 4, -8
  305. 217 .cfi_offset 14, -4
  306. 218 0002 8CB0 sub sp, sp, #48
  307. 219 .LCFI4:
  308. 220 .cfi_def_cfa_offset 56
  309. 90:Src/usart.c ****
  310. 91:Src/usart.c **** GPIO_InitTypeDef GPIO_InitStruct = {0};
  311. 221 .loc 1 91 0
  312. 222 0004 0023 movs r3, #0
  313. 223 0006 0793 str r3, [sp, #28]
  314. 224 0008 0893 str r3, [sp, #32]
  315. 225 000a 0993 str r3, [sp, #36]
  316. 226 000c 0A93 str r3, [sp, #40]
  317. 227 000e 0B93 str r3, [sp, #44]
  318. 92:Src/usart.c **** if(uartHandle->Instance==UART4)
  319. 228 .loc 1 92 0
  320. 229 0010 0368 ldr r3, [r0]
  321. 230 0012 494A ldr r2, .L27
  322. 231 0014 9342 cmp r3, r2
  323. 232 0016 07D0 beq .L24
  324. 93:Src/usart.c **** {
  325. 94:Src/usart.c **** /* USER CODE BEGIN UART4_MspInit 0 */
  326. 95:Src/usart.c ****
  327. 96:Src/usart.c **** /* USER CODE END UART4_MspInit 0 */
  328. 97:Src/usart.c **** /* UART4 clock enable */
  329. 98:Src/usart.c **** __HAL_RCC_UART4_CLK_ENABLE();
  330. 99:Src/usart.c ****
  331. 100:Src/usart.c **** __HAL_RCC_GPIOC_CLK_ENABLE();
  332. 101:Src/usart.c **** /**UART4 GPIO Configuration
  333. 102:Src/usart.c **** PC10 ------> UART4_TX
  334. 103:Src/usart.c **** PC11 ------> UART4_RX
  335. 104:Src/usart.c **** */
  336. 105:Src/usart.c **** GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11;
  337. 106:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  338. 107:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_PULLUP;
  339. 108:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  340. 109:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF8_UART4;
  341. 110:Src/usart.c **** HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  342. 111:Src/usart.c ****
  343. 112:Src/usart.c **** /* UART4 interrupt Init */
  344. 113:Src/usart.c **** HAL_NVIC_SetPriority(UART4_IRQn, 0, 0);
  345. 114:Src/usart.c **** HAL_NVIC_EnableIRQ(UART4_IRQn);
  346. 115:Src/usart.c **** /* USER CODE BEGIN UART4_MspInit 1 */
  347. 116:Src/usart.c ****
  348. 117:Src/usart.c **** /* USER CODE END UART4_MspInit 1 */
  349. ARM GAS /tmp/cc9BaXnO.s page 7
  350. 118:Src/usart.c **** }
  351. 119:Src/usart.c **** else if(uartHandle->Instance==USART1)
  352. 233 .loc 1 119 0
  353. 234 0018 484A ldr r2, .L27+4
  354. 235 001a 9342 cmp r3, r2
  355. 236 001c 32D0 beq .L25
  356. 120:Src/usart.c **** {
  357. 121:Src/usart.c **** /* USER CODE BEGIN USART1_MspInit 0 */
  358. 122:Src/usart.c ****
  359. 123:Src/usart.c **** /* USER CODE END USART1_MspInit 0 */
  360. 124:Src/usart.c **** /* USART1 clock enable */
  361. 125:Src/usart.c **** __HAL_RCC_USART1_CLK_ENABLE();
  362. 126:Src/usart.c ****
  363. 127:Src/usart.c **** __HAL_RCC_GPIOB_CLK_ENABLE();
  364. 128:Src/usart.c **** /**USART1 GPIO Configuration
  365. 129:Src/usart.c **** PB6 ------> USART1_TX
  366. 130:Src/usart.c **** PB7 ------> USART1_RX
  367. 131:Src/usart.c **** */
  368. 132:Src/usart.c **** GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
  369. 133:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  370. 134:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_PULLUP;
  371. 135:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  372. 136:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
  373. 137:Src/usart.c **** HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  374. 138:Src/usart.c ****
  375. 139:Src/usart.c **** /* USART1 interrupt Init */
  376. 140:Src/usart.c **** HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
  377. 141:Src/usart.c **** HAL_NVIC_EnableIRQ(USART1_IRQn);
  378. 142:Src/usart.c **** /* USER CODE BEGIN USART1_MspInit 1 */
  379. 143:Src/usart.c ****
  380. 144:Src/usart.c **** /* USER CODE END USART1_MspInit 1 */
  381. 145:Src/usart.c **** }
  382. 146:Src/usart.c **** else if(uartHandle->Instance==USART2)
  383. 237 .loc 1 146 0
  384. 238 001e 484A ldr r2, .L27+8
  385. 239 0020 9342 cmp r3, r2
  386. 240 0022 5CD0 beq .L26
  387. 241 .LVL7:
  388. 242 .L19:
  389. 147:Src/usart.c **** {
  390. 148:Src/usart.c **** /* USER CODE BEGIN USART2_MspInit 0 */
  391. 149:Src/usart.c ****
  392. 150:Src/usart.c **** /* USER CODE END USART2_MspInit 0 */
  393. 151:Src/usart.c **** /* USART2 clock enable */
  394. 152:Src/usart.c **** __HAL_RCC_USART2_CLK_ENABLE();
  395. 153:Src/usart.c ****
  396. 154:Src/usart.c **** __HAL_RCC_GPIOD_CLK_ENABLE();
  397. 155:Src/usart.c **** /**USART2 GPIO Configuration
  398. 156:Src/usart.c **** PD5 ------> USART2_TX
  399. 157:Src/usart.c **** PD6 ------> USART2_RX
  400. 158:Src/usart.c **** */
  401. 159:Src/usart.c **** GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6;
  402. 160:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  403. 161:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_PULLUP;
  404. 162:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  405. 163:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
  406. 164:Src/usart.c **** HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  407. ARM GAS /tmp/cc9BaXnO.s page 8
  408. 165:Src/usart.c ****
  409. 166:Src/usart.c **** /* USART2 interrupt Init */
  410. 167:Src/usart.c **** HAL_NVIC_SetPriority(USART2_IRQn, 0, 0);
  411. 168:Src/usart.c **** HAL_NVIC_EnableIRQ(USART2_IRQn);
  412. 169:Src/usart.c **** /* USER CODE BEGIN USART2_MspInit 1 */
  413. 170:Src/usart.c ****
  414. 171:Src/usart.c **** /* USER CODE END USART2_MspInit 1 */
  415. 172:Src/usart.c **** }
  416. 173:Src/usart.c **** }
  417. 243 .loc 1 173 0
  418. 244 0024 0CB0 add sp, sp, #48
  419. 245 .LCFI5:
  420. 246 .cfi_remember_state
  421. 247 .cfi_def_cfa_offset 8
  422. 248 @ sp needed
  423. 249 0026 10BD pop {r4, pc}
  424. 250 .LVL8:
  425. 251 .L24:
  426. 252 .LCFI6:
  427. 253 .cfi_restore_state
  428. 254 .LBB2:
  429. 98:Src/usart.c ****
  430. 255 .loc 1 98 0
  431. 256 0028 0024 movs r4, #0
  432. 257 002a 0194 str r4, [sp, #4]
  433. 258 002c 454B ldr r3, .L27+12
  434. 259 002e 1A6C ldr r2, [r3, #64]
  435. 260 0030 42F40022 orr r2, r2, #524288
  436. 261 0034 1A64 str r2, [r3, #64]
  437. 262 0036 1A6C ldr r2, [r3, #64]
  438. 263 0038 02F40022 and r2, r2, #524288
  439. 264 003c 0192 str r2, [sp, #4]
  440. 265 003e 019A ldr r2, [sp, #4]
  441. 266 .LBE2:
  442. 267 .LBB3:
  443. 100:Src/usart.c **** /**UART4 GPIO Configuration
  444. 268 .loc 1 100 0
  445. 269 0040 0294 str r4, [sp, #8]
  446. 270 0042 1A6B ldr r2, [r3, #48]
  447. 271 0044 42F00402 orr r2, r2, #4
  448. 272 0048 1A63 str r2, [r3, #48]
  449. 273 004a 1B6B ldr r3, [r3, #48]
  450. 274 004c 03F00403 and r3, r3, #4
  451. 275 0050 0293 str r3, [sp, #8]
  452. 276 0052 029B ldr r3, [sp, #8]
  453. 277 .LBE3:
  454. 105:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  455. 278 .loc 1 105 0
  456. 279 0054 4FF44063 mov r3, #3072
  457. 280 0058 0793 str r3, [sp, #28]
  458. 106:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_PULLUP;
  459. 281 .loc 1 106 0
  460. 282 005a 0223 movs r3, #2
  461. 283 005c 0893 str r3, [sp, #32]
  462. 107:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  463. 284 .loc 1 107 0
  464. 285 005e 0123 movs r3, #1
  465. ARM GAS /tmp/cc9BaXnO.s page 9
  466. 286 0060 0993 str r3, [sp, #36]
  467. 108:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF8_UART4;
  468. 287 .loc 1 108 0
  469. 288 0062 0323 movs r3, #3
  470. 289 0064 0A93 str r3, [sp, #40]
  471. 109:Src/usart.c **** HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  472. 290 .loc 1 109 0
  473. 291 0066 0823 movs r3, #8
  474. 292 0068 0B93 str r3, [sp, #44]
  475. 110:Src/usart.c ****
  476. 293 .loc 1 110 0
  477. 294 006a 07A9 add r1, sp, #28
  478. 295 006c 3648 ldr r0, .L27+16
  479. 296 .LVL9:
  480. 297 006e FFF7FEFF bl HAL_GPIO_Init
  481. 298 .LVL10:
  482. 113:Src/usart.c **** HAL_NVIC_EnableIRQ(UART4_IRQn);
  483. 299 .loc 1 113 0
  484. 300 0072 2246 mov r2, r4
  485. 301 0074 2146 mov r1, r4
  486. 302 0076 3420 movs r0, #52
  487. 303 0078 FFF7FEFF bl HAL_NVIC_SetPriority
  488. 304 .LVL11:
  489. 114:Src/usart.c **** /* USER CODE BEGIN UART4_MspInit 1 */
  490. 305 .loc 1 114 0
  491. 306 007c 3420 movs r0, #52
  492. 307 007e FFF7FEFF bl HAL_NVIC_EnableIRQ
  493. 308 .LVL12:
  494. 309 0082 CFE7 b .L19
  495. 310 .LVL13:
  496. 311 .L25:
  497. 312 .LBB4:
  498. 125:Src/usart.c ****
  499. 313 .loc 1 125 0
  500. 314 0084 0024 movs r4, #0
  501. 315 0086 0394 str r4, [sp, #12]
  502. 316 0088 2E4B ldr r3, .L27+12
  503. 317 008a 5A6C ldr r2, [r3, #68]
  504. 318 008c 42F01002 orr r2, r2, #16
  505. 319 0090 5A64 str r2, [r3, #68]
  506. 320 0092 5A6C ldr r2, [r3, #68]
  507. 321 0094 02F01002 and r2, r2, #16
  508. 322 0098 0392 str r2, [sp, #12]
  509. 323 009a 039A ldr r2, [sp, #12]
  510. 324 .LBE4:
  511. 325 .LBB5:
  512. 127:Src/usart.c **** /**USART1 GPIO Configuration
  513. 326 .loc 1 127 0
  514. 327 009c 0494 str r4, [sp, #16]
  515. 328 009e 1A6B ldr r2, [r3, #48]
  516. 329 00a0 42F00202 orr r2, r2, #2
  517. 330 00a4 1A63 str r2, [r3, #48]
  518. 331 00a6 1B6B ldr r3, [r3, #48]
  519. 332 00a8 03F00203 and r3, r3, #2
  520. 333 00ac 0493 str r3, [sp, #16]
  521. 334 00ae 049B ldr r3, [sp, #16]
  522. 335 .LBE5:
  523. ARM GAS /tmp/cc9BaXnO.s page 10
  524. 132:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  525. 336 .loc 1 132 0
  526. 337 00b0 C023 movs r3, #192
  527. 338 00b2 0793 str r3, [sp, #28]
  528. 133:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_PULLUP;
  529. 339 .loc 1 133 0
  530. 340 00b4 0223 movs r3, #2
  531. 341 00b6 0893 str r3, [sp, #32]
  532. 134:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  533. 342 .loc 1 134 0
  534. 343 00b8 0123 movs r3, #1
  535. 344 00ba 0993 str r3, [sp, #36]
  536. 135:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
  537. 345 .loc 1 135 0
  538. 346 00bc 0323 movs r3, #3
  539. 347 00be 0A93 str r3, [sp, #40]
  540. 136:Src/usart.c **** HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  541. 348 .loc 1 136 0
  542. 349 00c0 0723 movs r3, #7
  543. 350 00c2 0B93 str r3, [sp, #44]
  544. 137:Src/usart.c ****
  545. 351 .loc 1 137 0
  546. 352 00c4 07A9 add r1, sp, #28
  547. 353 00c6 2148 ldr r0, .L27+20
  548. 354 .LVL14:
  549. 355 00c8 FFF7FEFF bl HAL_GPIO_Init
  550. 356 .LVL15:
  551. 140:Src/usart.c **** HAL_NVIC_EnableIRQ(USART1_IRQn);
  552. 357 .loc 1 140 0
  553. 358 00cc 2246 mov r2, r4
  554. 359 00ce 2146 mov r1, r4
  555. 360 00d0 2520 movs r0, #37
  556. 361 00d2 FFF7FEFF bl HAL_NVIC_SetPriority
  557. 362 .LVL16:
  558. 141:Src/usart.c **** /* USER CODE BEGIN USART1_MspInit 1 */
  559. 363 .loc 1 141 0
  560. 364 00d6 2520 movs r0, #37
  561. 365 00d8 FFF7FEFF bl HAL_NVIC_EnableIRQ
  562. 366 .LVL17:
  563. 367 00dc A2E7 b .L19
  564. 368 .LVL18:
  565. 369 .L26:
  566. 370 .LBB6:
  567. 152:Src/usart.c ****
  568. 371 .loc 1 152 0
  569. 372 00de 0024 movs r4, #0
  570. 373 00e0 0594 str r4, [sp, #20]
  571. 374 00e2 184B ldr r3, .L27+12
  572. 375 00e4 1A6C ldr r2, [r3, #64]
  573. 376 00e6 42F40032 orr r2, r2, #131072
  574. 377 00ea 1A64 str r2, [r3, #64]
  575. 378 00ec 1A6C ldr r2, [r3, #64]
  576. 379 00ee 02F40032 and r2, r2, #131072
  577. 380 00f2 0592 str r2, [sp, #20]
  578. 381 00f4 059A ldr r2, [sp, #20]
  579. 382 .LBE6:
  580. 383 .LBB7:
  581. ARM GAS /tmp/cc9BaXnO.s page 11
  582. 154:Src/usart.c **** /**USART2 GPIO Configuration
  583. 384 .loc 1 154 0
  584. 385 00f6 0694 str r4, [sp, #24]
  585. 386 00f8 1A6B ldr r2, [r3, #48]
  586. 387 00fa 42F00802 orr r2, r2, #8
  587. 388 00fe 1A63 str r2, [r3, #48]
  588. 389 0100 1B6B ldr r3, [r3, #48]
  589. 390 0102 03F00803 and r3, r3, #8
  590. 391 0106 0693 str r3, [sp, #24]
  591. 392 0108 069B ldr r3, [sp, #24]
  592. 393 .LBE7:
  593. 159:Src/usart.c **** GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  594. 394 .loc 1 159 0
  595. 395 010a 6023 movs r3, #96
  596. 396 010c 0793 str r3, [sp, #28]
  597. 160:Src/usart.c **** GPIO_InitStruct.Pull = GPIO_PULLUP;
  598. 397 .loc 1 160 0
  599. 398 010e 0223 movs r3, #2
  600. 399 0110 0893 str r3, [sp, #32]
  601. 161:Src/usart.c **** GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  602. 400 .loc 1 161 0
  603. 401 0112 0123 movs r3, #1
  604. 402 0114 0993 str r3, [sp, #36]
  605. 162:Src/usart.c **** GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
  606. 403 .loc 1 162 0
  607. 404 0116 0323 movs r3, #3
  608. 405 0118 0A93 str r3, [sp, #40]
  609. 163:Src/usart.c **** HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  610. 406 .loc 1 163 0
  611. 407 011a 0723 movs r3, #7
  612. 408 011c 0B93 str r3, [sp, #44]
  613. 164:Src/usart.c ****
  614. 409 .loc 1 164 0
  615. 410 011e 07A9 add r1, sp, #28
  616. 411 0120 0B48 ldr r0, .L27+24
  617. 412 .LVL19:
  618. 413 0122 FFF7FEFF bl HAL_GPIO_Init
  619. 414 .LVL20:
  620. 167:Src/usart.c **** HAL_NVIC_EnableIRQ(USART2_IRQn);
  621. 415 .loc 1 167 0
  622. 416 0126 2246 mov r2, r4
  623. 417 0128 2146 mov r1, r4
  624. 418 012a 2620 movs r0, #38
  625. 419 012c FFF7FEFF bl HAL_NVIC_SetPriority
  626. 420 .LVL21:
  627. 168:Src/usart.c **** /* USER CODE BEGIN USART2_MspInit 1 */
  628. 421 .loc 1 168 0
  629. 422 0130 2620 movs r0, #38
  630. 423 0132 FFF7FEFF bl HAL_NVIC_EnableIRQ
  631. 424 .LVL22:
  632. 425 .loc 1 173 0
  633. 426 0136 75E7 b .L19
  634. 427 .L28:
  635. 428 .align 2
  636. 429 .L27:
  637. 430 0138 004C0040 .word 1073761280
  638. 431 013c 00100140 .word 1073811456
  639. ARM GAS /tmp/cc9BaXnO.s page 12
  640. 432 0140 00440040 .word 1073759232
  641. 433 0144 00380240 .word 1073887232
  642. 434 0148 00080240 .word 1073874944
  643. 435 014c 00040240 .word 1073873920
  644. 436 0150 000C0240 .word 1073875968
  645. 437 .cfi_endproc
  646. 438 .LFE133:
  647. 440 .section .text.HAL_UART_MspDeInit,"ax",%progbits
  648. 441 .align 1
  649. 442 .global HAL_UART_MspDeInit
  650. 443 .syntax unified
  651. 444 .thumb
  652. 445 .thumb_func
  653. 446 .fpu fpv4-sp-d16
  654. 448 HAL_UART_MspDeInit:
  655. 449 .LFB134:
  656. 174:Src/usart.c ****
  657. 175:Src/usart.c **** void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
  658. 176:Src/usart.c **** {
  659. 450 .loc 1 176 0
  660. 451 .cfi_startproc
  661. 452 @ args = 0, pretend = 0, frame = 0
  662. 453 @ frame_needed = 0, uses_anonymous_args = 0
  663. 454 .LVL23:
  664. 455 0000 08B5 push {r3, lr}
  665. 456 .LCFI7:
  666. 457 .cfi_def_cfa_offset 8
  667. 458 .cfi_offset 3, -8
  668. 459 .cfi_offset 14, -4
  669. 177:Src/usart.c ****
  670. 178:Src/usart.c **** if(uartHandle->Instance==UART4)
  671. 460 .loc 1 178 0
  672. 461 0002 0368 ldr r3, [r0]
  673. 462 0004 1A4A ldr r2, .L37
  674. 463 0006 9342 cmp r3, r2
  675. 464 0008 06D0 beq .L34
  676. 179:Src/usart.c **** {
  677. 180:Src/usart.c **** /* USER CODE BEGIN UART4_MspDeInit 0 */
  678. 181:Src/usart.c ****
  679. 182:Src/usart.c **** /* USER CODE END UART4_MspDeInit 0 */
  680. 183:Src/usart.c **** /* Peripheral clock disable */
  681. 184:Src/usart.c **** __HAL_RCC_UART4_CLK_DISABLE();
  682. 185:Src/usart.c ****
  683. 186:Src/usart.c **** /**UART4 GPIO Configuration
  684. 187:Src/usart.c **** PC10 ------> UART4_TX
  685. 188:Src/usart.c **** PC11 ------> UART4_RX
  686. 189:Src/usart.c **** */
  687. 190:Src/usart.c **** HAL_GPIO_DeInit(GPIOC, GPIO_PIN_10|GPIO_PIN_11);
  688. 191:Src/usart.c ****
  689. 192:Src/usart.c **** /* UART4 interrupt Deinit */
  690. 193:Src/usart.c **** HAL_NVIC_DisableIRQ(UART4_IRQn);
  691. 194:Src/usart.c **** /* USER CODE BEGIN UART4_MspDeInit 1 */
  692. 195:Src/usart.c ****
  693. 196:Src/usart.c **** /* USER CODE END UART4_MspDeInit 1 */
  694. 197:Src/usart.c **** }
  695. 198:Src/usart.c **** else if(uartHandle->Instance==USART1)
  696. 465 .loc 1 198 0
  697. ARM GAS /tmp/cc9BaXnO.s page 13
  698. 466 000a 1A4A ldr r2, .L37+4
  699. 467 000c 9342 cmp r3, r2
  700. 468 000e 12D0 beq .L35
  701. 199:Src/usart.c **** {
  702. 200:Src/usart.c **** /* USER CODE BEGIN USART1_MspDeInit 0 */
  703. 201:Src/usart.c ****
  704. 202:Src/usart.c **** /* USER CODE END USART1_MspDeInit 0 */
  705. 203:Src/usart.c **** /* Peripheral clock disable */
  706. 204:Src/usart.c **** __HAL_RCC_USART1_CLK_DISABLE();
  707. 205:Src/usart.c ****
  708. 206:Src/usart.c **** /**USART1 GPIO Configuration
  709. 207:Src/usart.c **** PB6 ------> USART1_TX
  710. 208:Src/usart.c **** PB7 ------> USART1_RX
  711. 209:Src/usart.c **** */
  712. 210:Src/usart.c **** HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
  713. 211:Src/usart.c ****
  714. 212:Src/usart.c **** /* USART1 interrupt Deinit */
  715. 213:Src/usart.c **** HAL_NVIC_DisableIRQ(USART1_IRQn);
  716. 214:Src/usart.c **** /* USER CODE BEGIN USART1_MspDeInit 1 */
  717. 215:Src/usart.c ****
  718. 216:Src/usart.c **** /* USER CODE END USART1_MspDeInit 1 */
  719. 217:Src/usart.c **** }
  720. 218:Src/usart.c **** else if(uartHandle->Instance==USART2)
  721. 469 .loc 1 218 0
  722. 470 0010 194A ldr r2, .L37+8
  723. 471 0012 9342 cmp r3, r2
  724. 472 0014 1DD0 beq .L36
  725. 473 .LVL24:
  726. 474 .L29:
  727. 475 0016 08BD pop {r3, pc}
  728. 476 .LVL25:
  729. 477 .L34:
  730. 184:Src/usart.c ****
  731. 478 .loc 1 184 0
  732. 479 0018 02F5F632 add r2, r2, #125952
  733. 480 001c 136C ldr r3, [r2, #64]
  734. 481 001e 23F40023 bic r3, r3, #524288
  735. 482 0022 1364 str r3, [r2, #64]
  736. 190:Src/usart.c ****
  737. 483 .loc 1 190 0
  738. 484 0024 4FF44061 mov r1, #3072
  739. 485 0028 1448 ldr r0, .L37+12
  740. 486 .LVL26:
  741. 487 002a FFF7FEFF bl HAL_GPIO_DeInit
  742. 488 .LVL27:
  743. 193:Src/usart.c **** /* USER CODE BEGIN UART4_MspDeInit 1 */
  744. 489 .loc 1 193 0
  745. 490 002e 3420 movs r0, #52
  746. 491 0030 FFF7FEFF bl HAL_NVIC_DisableIRQ
  747. 492 .LVL28:
  748. 493 0034 08BD pop {r3, pc}
  749. 494 .LVL29:
  750. 495 .L35:
  751. 204:Src/usart.c ****
  752. 496 .loc 1 204 0
  753. 497 0036 02F59432 add r2, r2, #75776
  754. 498 003a 536C ldr r3, [r2, #68]
  755. ARM GAS /tmp/cc9BaXnO.s page 14
  756. 499 003c 23F01003 bic r3, r3, #16
  757. 500 0040 5364 str r3, [r2, #68]
  758. 210:Src/usart.c ****
  759. 501 .loc 1 210 0
  760. 502 0042 C021 movs r1, #192
  761. 503 0044 0E48 ldr r0, .L37+16
  762. 504 .LVL30:
  763. 505 0046 FFF7FEFF bl HAL_GPIO_DeInit
  764. 506 .LVL31:
  765. 213:Src/usart.c **** /* USER CODE BEGIN USART1_MspDeInit 1 */
  766. 507 .loc 1 213 0
  767. 508 004a 2520 movs r0, #37
  768. 509 004c FFF7FEFF bl HAL_NVIC_DisableIRQ
  769. 510 .LVL32:
  770. 511 0050 08BD pop {r3, pc}
  771. 512 .LVL33:
  772. 513 .L36:
  773. 219:Src/usart.c **** {
  774. 220:Src/usart.c **** /* USER CODE BEGIN USART2_MspDeInit 0 */
  775. 221:Src/usart.c ****
  776. 222:Src/usart.c **** /* USER CODE END USART2_MspDeInit 0 */
  777. 223:Src/usart.c **** /* Peripheral clock disable */
  778. 224:Src/usart.c **** __HAL_RCC_USART2_CLK_DISABLE();
  779. 514 .loc 1 224 0
  780. 515 0052 02F5FA32 add r2, r2, #128000
  781. 516 0056 136C ldr r3, [r2, #64]
  782. 517 0058 23F40033 bic r3, r3, #131072
  783. 518 005c 1364 str r3, [r2, #64]
  784. 225:Src/usart.c ****
  785. 226:Src/usart.c **** /**USART2 GPIO Configuration
  786. 227:Src/usart.c **** PD5 ------> USART2_TX
  787. 228:Src/usart.c **** PD6 ------> USART2_RX
  788. 229:Src/usart.c **** */
  789. 230:Src/usart.c **** HAL_GPIO_DeInit(GPIOD, GPIO_PIN_5|GPIO_PIN_6);
  790. 519 .loc 1 230 0
  791. 520 005e 6021 movs r1, #96
  792. 521 0060 0848 ldr r0, .L37+20
  793. 522 .LVL34:
  794. 523 0062 FFF7FEFF bl HAL_GPIO_DeInit
  795. 524 .LVL35:
  796. 231:Src/usart.c ****
  797. 232:Src/usart.c **** /* USART2 interrupt Deinit */
  798. 233:Src/usart.c **** HAL_NVIC_DisableIRQ(USART2_IRQn);
  799. 525 .loc 1 233 0
  800. 526 0066 2620 movs r0, #38
  801. 527 0068 FFF7FEFF bl HAL_NVIC_DisableIRQ
  802. 528 .LVL36:
  803. 234:Src/usart.c **** /* USER CODE BEGIN USART2_MspDeInit 1 */
  804. 235:Src/usart.c ****
  805. 236:Src/usart.c **** /* USER CODE END USART2_MspDeInit 1 */
  806. 237:Src/usart.c **** }
  807. 238:Src/usart.c **** }
  808. 529 .loc 1 238 0
  809. 530 006c D3E7 b .L29
  810. 531 .L38:
  811. 532 006e 00BF .align 2
  812. 533 .L37:
  813. ARM GAS /tmp/cc9BaXnO.s page 15
  814. 534 0070 004C0040 .word 1073761280
  815. 535 0074 00100140 .word 1073811456
  816. 536 0078 00440040 .word 1073759232
  817. 537 007c 00080240 .word 1073874944
  818. 538 0080 00040240 .word 1073873920
  819. 539 0084 000C0240 .word 1073875968
  820. 540 .cfi_endproc
  821. 541 .LFE134:
  822. 543 .section .text.__io_putchar,"ax",%progbits
  823. 544 .align 1
  824. 545 .global __io_putchar
  825. 546 .syntax unified
  826. 547 .thumb
  827. 548 .thumb_func
  828. 549 .fpu fpv4-sp-d16
  829. 551 __io_putchar:
  830. 552 .LFB135:
  831. 239:Src/usart.c ****
  832. 240:Src/usart.c **** /* USER CODE BEGIN 1 */
  833. 241:Src/usart.c **** #ifdef __GNUC__
  834. 242:Src/usart.c **** /* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf
  835. 243:Src/usart.c **** set to 'Yes') calls __io_putchar() */
  836. 244:Src/usart.c **** #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
  837. 245:Src/usart.c **** #else
  838. 246:Src/usart.c **** #define PUTCHAR_PROTOTYPE int fputc(int ch)
  839. 247:Src/usart.c **** #endif /* __GNUC__ */
  840. 248:Src/usart.c **** /**
  841. 249:Src/usart.c **** * @brief Retargets the C library printf function to the USART.
  842. 250:Src/usart.c **** * @param None
  843. 251:Src/usart.c **** * @retval None
  844. 252:Src/usart.c **** */
  845. 253:Src/usart.c **** PUTCHAR_PROTOTYPE
  846. 254:Src/usart.c **** {
  847. 553 .loc 1 254 0
  848. 554 .cfi_startproc
  849. 555 @ args = 0, pretend = 0, frame = 8
  850. 556 @ frame_needed = 0, uses_anonymous_args = 0
  851. 557 .LVL37:
  852. 558 0000 00B5 push {lr}
  853. 559 .LCFI8:
  854. 560 .cfi_def_cfa_offset 4
  855. 561 .cfi_offset 14, -4
  856. 562 0002 83B0 sub sp, sp, #12
  857. 563 .LCFI9:
  858. 564 .cfi_def_cfa_offset 16
  859. 565 0004 02A9 add r1, sp, #8
  860. 566 0006 41F8040D str r0, [r1, #-4]!
  861. 255:Src/usart.c **** /* Place your implementation of fputc here */
  862. 256:Src/usart.c **** /* e.g. write a character to the EVAL_COM1 and Loop until the end of transmission */
  863. 257:Src/usart.c **** HAL_UART_Transmit(&huart4, (uint8_t *)&ch, 1, 0xFFFF);
  864. 567 .loc 1 257 0
  865. 568 000a 4FF6FF73 movw r3, #65535
  866. 569 000e 0122 movs r2, #1
  867. 570 0010 0348 ldr r0, .L41
  868. 571 .LVL38:
  869. 572 0012 FFF7FEFF bl HAL_UART_Transmit
  870. 573 .LVL39:
  871. ARM GAS /tmp/cc9BaXnO.s page 16
  872. 258:Src/usart.c ****
  873. 259:Src/usart.c **** return ch;
  874. 260:Src/usart.c **** }
  875. 574 .loc 1 260 0
  876. 575 0016 0198 ldr r0, [sp, #4]
  877. 576 0018 03B0 add sp, sp, #12
  878. 577 .LCFI10:
  879. 578 .cfi_def_cfa_offset 4
  880. 579 @ sp needed
  881. 580 001a 5DF804FB ldr pc, [sp], #4
  882. 581 .L42:
  883. 582 001e 00BF .align 2
  884. 583 .L41:
  885. 584 0020 00000000 .word huart4
  886. 585 .cfi_endproc
  887. 586 .LFE135:
  888. 588 .comm huart2,64,4
  889. 589 .comm huart1,64,4
  890. 590 .comm huart4,64,4
  891. 591 .text
  892. 592 .Letext0:
  893. 593 .file 2 "/usr/include/newlib/machine/_default_types.h"
  894. 594 .file 3 "/usr/include/newlib/sys/_stdint.h"
  895. 595 .file 4 "Drivers/CMSIS/Include/core_cm4.h"
  896. 596 .file 5 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h"
  897. 597 .file 6 "Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h"
  898. 598 .file 7 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h"
  899. 599 .file 8 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h"
  900. 600 .file 9 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h"
  901. 601 .file 10 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h"
  902. 602 .file 11 "Inc/usart.h"
  903. 603 .file 12 "Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h"
  904. 604 .file 13 "Inc/main.h"
  905. ARM GAS /tmp/cc9BaXnO.s page 17
  906. DEFINED SYMBOLS
  907. *ABS*:0000000000000000 usart.c
  908. /tmp/cc9BaXnO.s:18 .text.MX_UART4_Init:0000000000000000 $t
  909. /tmp/cc9BaXnO.s:25 .text.MX_UART4_Init:0000000000000000 MX_UART4_Init
  910. /tmp/cc9BaXnO.s:73 .text.MX_UART4_Init:000000000000002c $d
  911. *COM*:0000000000000040 huart4
  912. /tmp/cc9BaXnO.s:79 .text.MX_USART1_UART_Init:0000000000000000 $t
  913. /tmp/cc9BaXnO.s:86 .text.MX_USART1_UART_Init:0000000000000000 MX_USART1_UART_Init
  914. /tmp/cc9BaXnO.s:133 .text.MX_USART1_UART_Init:000000000000002c $d
  915. *COM*:0000000000000040 huart1
  916. /tmp/cc9BaXnO.s:139 .text.MX_USART2_UART_Init:0000000000000000 $t
  917. /tmp/cc9BaXnO.s:146 .text.MX_USART2_UART_Init:0000000000000000 MX_USART2_UART_Init
  918. /tmp/cc9BaXnO.s:193 .text.MX_USART2_UART_Init:000000000000002c $d
  919. *COM*:0000000000000040 huart2
  920. /tmp/cc9BaXnO.s:199 .text.HAL_UART_MspInit:0000000000000000 $t
  921. /tmp/cc9BaXnO.s:206 .text.HAL_UART_MspInit:0000000000000000 HAL_UART_MspInit
  922. /tmp/cc9BaXnO.s:430 .text.HAL_UART_MspInit:0000000000000138 $d
  923. /tmp/cc9BaXnO.s:441 .text.HAL_UART_MspDeInit:0000000000000000 $t
  924. /tmp/cc9BaXnO.s:448 .text.HAL_UART_MspDeInit:0000000000000000 HAL_UART_MspDeInit
  925. /tmp/cc9BaXnO.s:534 .text.HAL_UART_MspDeInit:0000000000000070 $d
  926. /tmp/cc9BaXnO.s:544 .text.__io_putchar:0000000000000000 $t
  927. /tmp/cc9BaXnO.s:551 .text.__io_putchar:0000000000000000 __io_putchar
  928. /tmp/cc9BaXnO.s:584 .text.__io_putchar:0000000000000020 $d
  929. .debug_frame:0000000000000010 $d
  930. UNDEFINED SYMBOLS
  931. HAL_UART_Init
  932. Error_Handler
  933. HAL_GPIO_Init
  934. HAL_NVIC_SetPriority
  935. HAL_NVIC_EnableIRQ
  936. HAL_GPIO_DeInit
  937. HAL_NVIC_DisableIRQ
  938. HAL_UART_Transmit