1 .cpu cortex-a9 2 .eabi_attribute 28, 1 3 .eabi_attribute 20, 1 4 .eabi_attribute 21, 1 5 .eabi_attribute 23, 3 6 .eabi_attribute 24, 1 7 .eabi_attribute 25, 1 8 .eabi_attribute 26, 1 9 .eabi_attribute 30, 6 10 .eabi_attribute 34, 1 11 .eabi_attribute 18, 4 12 .file "a.c" 13 .text 14 .Ltext0: 15 .cfi_sections .debug_frame 16 .section .rodata 17 .align 2 18 .LC0: 19 0000 0A507269 .ascii "\012Print some symbols to test uart connection...\012" 19 6E742073 19 6F6D6520 19 73796D62 19 6F6C7320 20 002f 00 .ascii "\000" 21 .text 22 .align 2 23 .global main 24 .syntax unified 25 .arm 26 .fpu vfp 28 main: 29 .LFB0: 30 .file 1 "../a.c" 1:../a.c **** /* 2:../a.c **** * uart_sample 3:../a.c **** * Пример работы с UART. 4:../a.c **** * Эхо - данные, принятые по UART0, отправляются обратно. 5:../a.c **** */ 6:../a.c **** 7:../a.c **** #include "mcom_runtime/mcom02.h" 8:../a.c **** #include "mcom_runtime/uart.h" 9:../a.c **** 10:../a.c **** #define UART_num 0 11:../a.c **** 12:../a.c **** int main() 13:../a.c **** { 31 .loc 1 13 0 32 .cfi_startproc 33 @ args = 0, pretend = 0, frame = 8 34 @ frame_needed = 1, uses_anonymous_args = 0 35 0000 00482DE9 push {fp, lr} 36 .LCFI0: 37 .cfi_def_cfa_offset 8 38 .cfi_offset 11, -8 39 .cfi_offset 14, -4 40 0004 04B08DE2 add fp, sp, #4 41 .LCFI1: 42 .cfi_def_cfa 11, 4 43 0008 10D04DE2 sub sp, sp, #16 14:../a.c **** short sc = 0; 44 .loc 1 14 0 45 000c 0030A0E3 mov r3, #0 46 0010 B6304BE1 strh r3, [fp, #-6] @ movhi 15:../a.c **** 16:../a.c **** uart_config(UART_num, BAUD115200, UART_8BIT, UART_STOPBIT1, UART_NOPARITY); 47 .loc 1 16 0 48 0014 0030A0E3 mov r3, #0 49 0018 00308DE5 str r3, [sp] 50 001c 0030A0E3 mov r3, #0 51 0020 0320A0E3 mov r2, #3 52 0024 0D10A0E3 mov r1, #13 53 0028 0000A0E3 mov r0, #0 54 002c FEFFFFEB bl uart_config 17:../a.c **** 18:../a.c **** uart_putstr(UART_num, "\nPrint some symbols to test uart connection...\n"); 55 .loc 1 18 0 56 0030 001000E3 movw r1, #:lower16:.LC0 57 0034 001040E3 movt r1, #:upper16:.LC0 58 0038 0000A0E3 mov r0, #0 59 003c FEFFFFEB bl uart_putstr 19:../a.c **** uart_putchar(0, '>'); 60 .loc 1 19 0 61 0040 3E10A0E3 mov r1, #62 62 0044 0000A0E3 mov r0, #0 63 0048 FEFFFFEB bl uart_putchar 64 .L2: 20:../a.c **** 21:../a.c **** for (;;) { 22:../a.c **** /// read data received uart_num 23:../a.c **** sc = uart_getchar(UART_num); 65 .loc 1 23 0 discriminator 1 66 004c 0000A0E3 mov r0, #0 67 0050 FEFFFFEB bl uart_getchar 68 0054 0030A0E1 mov r3, r0 69 0058 B6304BE1 strh r3, [fp, #-6] @ movhi 24:../a.c **** 25:../a.c **** /// send back received character to uart_num 26:../a.c **** uart_putchar(UART_num, sc); 70 .loc 1 26 0 discriminator 1 71 005c F6305BE1 ldrsh r3, [fp, #-6] 72 0060 0310A0E1 mov r1, r3 73 0064 0000A0E3 mov r0, #0 74 0068 FEFFFFEB bl uart_putchar 23:../a.c **** 75 .loc 1 23 0 discriminator 1 76 006c F6FFFFEA b .L2 77 .cfi_endproc 78 .LFE0: 80 .Letext0: 81 .file 2 "../mcom_runtime/uart.h" DEFINED SYMBOLS *ABS*:00000000 a.c C:\Users\SMURYG~1\AppData\Local\Temp\ccWM7yub.s:17 .rodata:00000000 $d C:\Users\SMURYG~1\AppData\Local\Temp\ccWM7yub.s:18 .rodata:00000000 .LC0 C:\Users\SMURYG~1\AppData\Local\Temp\ccWM7yub.s:22 .text:00000000 $a C:\Users\SMURYG~1\AppData\Local\Temp\ccWM7yub.s:28 .text:00000000 main .debug_frame:00000010 $d UNDEFINED SYMBOLS uart_config uart_putstr uart_putchar uart_getchar