diff --git a/build/final.elf b/build/final.elf index f408989..5f5d064 100755 Binary files a/build/final.elf and b/build/final.elf differ diff --git a/build/final.elf.map b/build/final.elf.map index 4610e2f..464f9bd 100644 --- a/build/final.elf.map +++ b/build/final.elf.map @@ -18,8 +18,7 @@ Discarded input sections .text 0x00000000 0x0 build/gpio.o .data 0x00000000 0x0 build/gpio.o .bss 0x00000000 0x0 build/gpio.o - .text.gpio_set_af - 0x00000000 0x98 build/gpio.o + .group 0x00000000 0xc build/main.o .group 0x00000000 0xc build/main.o .group 0x00000000 0xc build/main.o .group 0x00000000 0xc build/main.o @@ -117,21 +116,6 @@ Discarded input sections .text 0x00000000 0x0 build/usart.o .data 0x00000000 0x0 build/usart.o .bss 0x00000000 0x0 build/usart.o - .text.usart2_init - 0x00000000 0xb8 build/usart.o - .text.usart2_start - 0x00000000 0x20 build/usart.o - .text.usart2_write_byte - 0x00000000 0x30 build/usart.o - .text.usart2_write - 0x00000000 0x2a build/usart.o - .debug_info 0x00000000 0x381 build/usart.o - .debug_abbrev 0x00000000 0x16a build/usart.o - .debug_aranges - 0x00000000 0x38 build/usart.o - .debug_rnglists - 0x00000000 0x26 build/usart.o - .debug_macro 0x00000000 0xb74 build/usart.o .debug_macro 0x00000000 0x22 build/usart.o .debug_macro 0x00000000 0x75 build/usart.o .debug_macro 0x00000000 0x2a build/usart.o @@ -146,16 +130,7 @@ Discarded input sections .debug_macro 0x00000000 0x4cc build/usart.o .debug_macro 0x00000000 0x130 build/usart.o .debug_macro 0x00000000 0x22 build/usart.o - .debug_macro 0x00000000 0x3a build/usart.o .debug_macro 0x00000000 0x5e build/usart.o - .debug_line 0x00000000 0x179 build/usart.o - .debug_str 0x00000000 0x5ec2 build/usart.o - .comment 0x00000000 0x46 build/usart.o - .debug_line_str - 0x00000000 0x26c build/usart.o - .debug_frame 0x00000000 0xa0 build/usart.o - .ARM.attributes - 0x00000000 0x34 build/usart.o Memory Configuration @@ -182,126 +157,144 @@ LOAD build/usart.o 0x08000000 interrupt_vector_table 0x08000198 . = ALIGN (0x4) -.text 0x08000198 0x34c +.text 0x08000198 0x53c 0x08000198 . = ALIGN (0x4) *(.text) *(.text.*) .text.gpio_set_mode 0x08000198 0x62 build/gpio.o 0x08000198 gpio_set_mode + .text.gpio_set_af + 0x080001fa 0x98 build/gpio.o + 0x080001fa gpio_set_af .text.gpio_write - 0x080001fa 0x4c build/gpio.o - 0x080001fa gpio_write - *fill* 0x08000246 0x2 + 0x08000292 0x4c build/gpio.o + 0x08000292 gpio_write + *fill* 0x080002de 0x2 .text.system_clock_init - 0x08000248 0x138 build/main.o - .text.main 0x08000380 0x88 build/main.o - 0x08000380 main + 0x080002e0 0x138 build/main.o + .text.main 0x08000418 0x9c build/main.o + 0x08000418 main .text.init_memory - 0x08000408 0x64 build/startup.o - 0x08000408 init_memory - .text.reset 0x0800046c 0x10 build/startup.o - 0x0800046c reset + 0x080004b4 0x64 build/startup.o + 0x080004b4 init_memory + .text.reset 0x08000518 0x10 build/startup.o + 0x08000518 reset .text.default_handler - 0x0800047c 0x8 build/startup.o - 0x0800047c exti0 - 0x0800047c debug_monitor - 0x0800047c rcc - 0x0800047c x - 0x0800047c sdio - 0x0800047c usage_fault - 0x0800047c tim1_up_tim10 - 0x0800047c usart1 - 0x0800047c i2c3_er - 0x0800047c spi2 - 0x0800047c dma1_stream1 - 0x0800047c bus_fault - 0x0800047c spi5 - 0x0800047c exti3 - 0x0800047c dma2_stream5 - 0x0800047c tim2 - 0x0800047c dma1_stream6 - 0x0800047c default_handler - 0x0800047c i2c1_er - 0x0800047c hard_fault - 0x0800047c usart6 - 0x0800047c exti15_10 - 0x0800047c usart2 - 0x0800047c pend_sv - 0x0800047c i2c1_ev - 0x0800047c wwdg - 0x0800047c adc - 0x0800047c rtc_alarm - 0x0800047c spi3 - 0x0800047c exti1 - 0x0800047c mem_manage - 0x0800047c dma2_stream1 - 0x0800047c dma1_stream2 - 0x0800047c dma2_stream3 - 0x0800047c sv_call - 0x0800047c tim3 - 0x0800047c otg_fs - 0x0800047c dma1_stream5 - 0x0800047c dma2_stream6 - 0x0800047c flash - 0x0800047c tamp_stamp - 0x0800047c i2c3_ev - 0x0800047c rtc_wkup - 0x0800047c dma2_stream0 - 0x0800047c pvd - 0x0800047c fpu - 0x0800047c exti4 - 0x0800047c exti2 - 0x0800047c spi1 - 0x0800047c dma1_stream0 - 0x0800047c tim1_brk_tim9 - 0x0800047c i2c2_ev - 0x0800047c otg_fs_wkup - 0x0800047c spi4 - 0x0800047c dma2_stream2 - 0x0800047c tim1_cc - 0x0800047c tim1_trg_com_tim11 - 0x0800047c exti9_5 - 0x0800047c dma1_stream3 - 0x0800047c dma2_stream4 - 0x0800047c i2c2_er - 0x0800047c dma2_stream7 - 0x0800047c dma1_stream7 - 0x0800047c nmi - 0x0800047c systick - 0x0800047c tim4 - 0x0800047c tim5 - 0x0800047c dma1_stream4 + 0x08000528 0x8 build/startup.o + 0x08000528 exti0 + 0x08000528 debug_monitor + 0x08000528 rcc + 0x08000528 x + 0x08000528 sdio + 0x08000528 usage_fault + 0x08000528 tim1_up_tim10 + 0x08000528 usart1 + 0x08000528 i2c3_er + 0x08000528 spi2 + 0x08000528 dma1_stream1 + 0x08000528 bus_fault + 0x08000528 spi5 + 0x08000528 exti3 + 0x08000528 dma2_stream5 + 0x08000528 tim2 + 0x08000528 dma1_stream6 + 0x08000528 default_handler + 0x08000528 i2c1_er + 0x08000528 hard_fault + 0x08000528 usart6 + 0x08000528 exti15_10 + 0x08000528 usart2 + 0x08000528 pend_sv + 0x08000528 i2c1_ev + 0x08000528 wwdg + 0x08000528 adc + 0x08000528 rtc_alarm + 0x08000528 spi3 + 0x08000528 exti1 + 0x08000528 mem_manage + 0x08000528 dma2_stream1 + 0x08000528 dma1_stream2 + 0x08000528 dma2_stream3 + 0x08000528 sv_call + 0x08000528 tim3 + 0x08000528 otg_fs + 0x08000528 dma1_stream5 + 0x08000528 dma2_stream6 + 0x08000528 flash + 0x08000528 tamp_stamp + 0x08000528 i2c3_ev + 0x08000528 rtc_wkup + 0x08000528 dma2_stream0 + 0x08000528 pvd + 0x08000528 fpu + 0x08000528 exti4 + 0x08000528 exti2 + 0x08000528 spi1 + 0x08000528 dma1_stream0 + 0x08000528 tim1_brk_tim9 + 0x08000528 i2c2_ev + 0x08000528 otg_fs_wkup + 0x08000528 spi4 + 0x08000528 dma2_stream2 + 0x08000528 tim1_cc + 0x08000528 tim1_trg_com_tim11 + 0x08000528 exti9_5 + 0x08000528 dma1_stream3 + 0x08000528 dma2_stream4 + 0x08000528 i2c2_er + 0x08000528 dma2_stream7 + 0x08000528 dma1_stream7 + 0x08000528 nmi + 0x08000528 systick + 0x08000528 tim4 + 0x08000528 tim5 + 0x08000528 dma1_stream4 .text.tim4_init - 0x08000484 0x40 build/timer.o - 0x08000484 tim4_init + 0x08000530 0x40 build/timer.o + 0x08000530 tim4_init .text.tim4_start - 0x080004c4 0x20 build/timer.o - 0x080004c4 tim4_start + 0x08000570 0x20 build/timer.o + 0x08000570 tim4_start + .text.usart2_init + 0x08000590 0xb8 build/usart.o + 0x08000590 usart2_init + .text.usart2_start + 0x08000648 0x20 build/usart.o + 0x08000648 usart2_start + .text.usart2_write_byte + 0x08000668 0x30 build/usart.o + 0x08000668 usart2_write_byte + .text.usart2_write + 0x08000698 0x2a build/usart.o + 0x08000698 usart2_write *(.rodata) + *fill* 0x080006c2 0x2 + .rodata 0x080006c4 0xf build/main.o *(.rodata.*) - 0x080004e4 . = ALIGN (0x4) - 0x080004e4 _data_addr = LOADADDR (.data) + 0x080006d4 . = ALIGN (0x4) + *fill* 0x080006d3 0x1 + 0x080006d4 _data_addr = LOADADDR (.data) -.glue_7 0x080004e4 0x0 - .glue_7 0x080004e4 0x0 linker stubs +.glue_7 0x080006d4 0x0 + .glue_7 0x080006d4 0x0 linker stubs -.glue_7t 0x080004e4 0x0 - .glue_7t 0x080004e4 0x0 linker stubs +.glue_7t 0x080006d4 0x0 + .glue_7t 0x080006d4 0x0 linker stubs -.vfp11_veneer 0x080004e4 0x0 - .vfp11_veneer 0x080004e4 0x0 linker stubs +.vfp11_veneer 0x080006d4 0x0 + .vfp11_veneer 0x080006d4 0x0 linker stubs -.v4_bx 0x080004e4 0x0 - .v4_bx 0x080004e4 0x0 linker stubs +.v4_bx 0x080006d4 0x0 + .v4_bx 0x080006d4 0x0 linker stubs -.iplt 0x080004e4 0x0 - .iplt 0x080004e4 0x0 build/main.o +.iplt 0x080006d4 0x0 + .iplt 0x080006d4 0x0 build/main.o -.rel.dyn 0x080004e4 0x0 - .rel.iplt 0x080004e4 0x0 build/main.o +.rel.dyn 0x080006d4 0x0 + .rel.iplt 0x080006d4 0x0 build/main.o -.data 0x20000000 0x0 load address 0x080004e4 +.data 0x20000000 0x0 load address 0x080006d4 0x20000000 . = ALIGN (0x4) 0x20000000 _data_start = . *(.data) @@ -309,10 +302,10 @@ LOAD build/usart.o 0x20000000 . = ALIGN (0x4) 0x20000000 _data_end = . -.igot.plt 0x20000000 0x0 load address 0x080004e4 +.igot.plt 0x20000000 0x0 load address 0x080006d4 .igot.plt 0x20000000 0x0 build/main.o -.bss 0x20000000 0x0 load address 0x080004e4 +.bss 0x20000000 0x0 load address 0x080006d4 0x20000000 . = ALIGN (0x4) 0x20000000 _bss_start = . *(.bss) @@ -322,19 +315,21 @@ LOAD build/usart.o OUTPUT(build/final.elf elf32-littlearm) LOAD linker stubs -.debug_info 0x00000000 0xb6d +.debug_info 0x00000000 0xf1e .debug_info 0x00000000 0x262 build/gpio.o - .debug_info 0x00000262 0x44e build/main.o - .debug_info 0x000006b0 0x188 build/startup.o - .debug_info 0x00000838 0x335 build/timer.o + .debug_info 0x00000262 0x47e build/main.o + .debug_info 0x000006e0 0x188 build/startup.o + .debug_info 0x00000868 0x335 build/timer.o + .debug_info 0x00000b9d 0x381 build/usart.o -.debug_abbrev 0x00000000 0x43d +.debug_abbrev 0x00000000 0x5ae .debug_abbrev 0x00000000 0x11d build/gpio.o - .debug_abbrev 0x0000011d 0x144 build/main.o - .debug_abbrev 0x00000261 0x127 build/startup.o - .debug_abbrev 0x00000388 0xb5 build/timer.o + .debug_abbrev 0x0000011d 0x14b build/main.o + .debug_abbrev 0x00000268 0x127 build/startup.o + .debug_abbrev 0x0000038f 0xb5 build/timer.o + .debug_abbrev 0x00000444 0x16a build/usart.o -.debug_aranges 0x00000000 0xb0 +.debug_aranges 0x00000000 0xe8 .debug_aranges 0x00000000 0x30 build/gpio.o .debug_aranges @@ -343,9 +338,11 @@ LOAD linker stubs 0x00000058 0x30 build/startup.o .debug_aranges 0x00000088 0x28 build/timer.o + .debug_aranges + 0x000000b0 0x38 build/usart.o .debug_rnglists - 0x00000000 0x73 + 0x00000000 0x99 .debug_rnglists 0x00000000 0x20 build/gpio.o .debug_rnglists @@ -354,8 +351,10 @@ LOAD linker stubs 0x0000003b 0x1f build/startup.o .debug_rnglists 0x0000005a 0x19 build/timer.o + .debug_rnglists + 0x00000073 0x26 build/usart.o -.debug_macro 0x00000000 0x3bc4 +.debug_macro 0x00000000 0x47d9 .debug_macro 0x00000000 0xb56 build/gpio.o .debug_macro 0x00000b56 0x22 build/gpio.o .debug_macro 0x00000b78 0x75 build/gpio.o @@ -371,32 +370,38 @@ LOAD linker stubs .debug_macro 0x00001115 0x4cc build/gpio.o .debug_macro 0x000015e1 0x22 build/gpio.o .debug_macro 0x00001603 0x40 build/gpio.o - .debug_macro 0x00001643 0xb80 build/main.o - .debug_macro 0x000021c3 0x136 build/main.o - .debug_macro 0x000022f9 0x46 build/main.o - .debug_macro 0x0000233f 0x2e build/main.o - .debug_macro 0x0000236d 0x22 build/main.o - .debug_macro 0x0000238f 0xb02 build/startup.o - .debug_macro 0x00002e91 0x56 build/startup.o - .debug_macro 0x00002ee7 0x51 build/startup.o - .debug_macro 0x00002f38 0xb5c build/timer.o - .debug_macro 0x00003a94 0x130 build/timer.o + .debug_macro 0x00001643 0xb89 build/main.o + .debug_macro 0x000021cc 0x136 build/main.o + .debug_macro 0x00002302 0x46 build/main.o + .debug_macro 0x00002348 0x2e build/main.o + .debug_macro 0x00002376 0x22 build/main.o + .debug_macro 0x00002398 0x5e build/main.o + .debug_macro 0x000023f6 0xb02 build/startup.o + .debug_macro 0x00002ef8 0x56 build/startup.o + .debug_macro 0x00002f4e 0x51 build/startup.o + .debug_macro 0x00002f9f 0xb5c build/timer.o + .debug_macro 0x00003afb 0x130 build/timer.o + .debug_macro 0x00003c2b 0xb74 build/usart.o + .debug_macro 0x0000479f 0x3a build/usart.o -.debug_line 0x00000000 0x516 +.debug_line 0x00000000 0x699 .debug_line 0x00000000 0x179 build/gpio.o - .debug_line 0x00000179 0x1d4 build/main.o - .debug_line 0x0000034d 0xea build/startup.o - .debug_line 0x00000437 0xdf build/timer.o + .debug_line 0x00000179 0x1de build/main.o + .debug_line 0x00000357 0xea build/startup.o + .debug_line 0x00000441 0xdf build/timer.o + .debug_line 0x00000520 0x179 build/usart.o -.debug_str 0x00000000 0x5f5e +.debug_str 0x00000000 0x6185 .debug_str 0x00000000 0x53c1 build/gpio.o 0x5571 (size before relaxing) - .debug_str 0x000053c1 0xb09 build/main.o - 0x600c (size before relaxing) - .debug_str 0x00005eca 0x88 build/startup.o + .debug_str 0x000053c1 0xcfb build/main.o + 0x61fe (size before relaxing) + .debug_str 0x000060bc 0x88 build/startup.o 0x3cdc (size before relaxing) - .debug_str 0x00005f52 0xc build/timer.o + .debug_str 0x00006144 0xc build/timer.o 0x5b6e (size before relaxing) + .debug_str 0x00006150 0x35 build/usart.o + 0x5ec2 (size before relaxing) .comment 0x00000000 0x45 .comment 0x00000000 0x45 build/gpio.o @@ -404,6 +409,7 @@ LOAD linker stubs .comment 0x00000045 0x46 build/main.o .comment 0x00000045 0x46 build/startup.o .comment 0x00000045 0x46 build/timer.o + .comment 0x00000045 0x46 build/usart.o .ARM.attributes 0x00000000 0x34 @@ -415,24 +421,30 @@ LOAD linker stubs 0x00000068 0x34 build/startup.o .ARM.attributes 0x0000009c 0x34 build/timer.o + .ARM.attributes + 0x000000d0 0x34 build/usart.o .debug_line_str - 0x00000000 0x280 + 0x00000000 0x290 .debug_line_str 0x00000000 0x24b build/gpio.o 0x25d (size before relaxing) .debug_line_str - 0x0000024b 0x23 build/main.o - 0x279 (size before relaxing) + 0x0000024b 0x2b build/main.o + 0x281 (size before relaxing) .debug_line_str - 0x0000026e 0xa build/startup.o + 0x00000276 0xa build/startup.o 0x218 (size before relaxing) .debug_line_str - 0x00000278 0x8 build/timer.o + 0x00000280 0x8 build/timer.o 0x25b (size before relaxing) + .debug_line_str + 0x00000288 0x8 build/usart.o + 0x26c (size before relaxing) -.debug_frame 0x00000000 0x194 +.debug_frame 0x00000000 0x234 .debug_frame 0x00000000 0x88 build/gpio.o .debug_frame 0x00000088 0x50 build/main.o .debug_frame 0x000000d8 0x6c build/startup.o .debug_frame 0x00000144 0x50 build/timer.o + .debug_frame 0x00000194 0xa0 build/usart.o diff --git a/build/main.S b/build/main.S index f83b1b4..8b25fb2 100644 --- a/build/main.S +++ b/build/main.S @@ -25,7 +25,7 @@ .type system_clock_init, %function system_clock_init: .LFB0: - .loc 1 12 37 + .loc 1 13 37 .cfi_startproc @ args = 0, pretend = 0, frame = 0 @ frame_needed = 1, uses_anonymous_args = 0 @@ -35,182 +35,182 @@ system_clock_init: .cfi_offset 7, -4 add r7, sp, #0 .cfi_def_cfa_register 7 - .loc 1 14 33 + .loc 1 15 33 ldr r3, .L5 ldr r3, [r3, #64] ldr r2, .L5 - .loc 1 14 43 + .loc 1 15 43 orr r3, r3, #268435456 str r3, [r2, #64] - .loc 1 17 33 - ldr r3, .L5+4 - ldr r3, [r3] - ldr r2, .L5+4 - .loc 1 17 38 - bic r3, r3, #49152 - str r3, [r2] .loc 1 18 33 ldr r3, .L5+4 ldr r3, [r3] ldr r2, .L5+4 .loc 1 18 38 + bic r3, r3, #49152 + str r3, [r2] + .loc 1 19 33 + ldr r3, .L5+4 + ldr r3, [r3] + ldr r2, .L5+4 + .loc 1 19 38 orr r3, r3, #49152 str r3, [r2] - .loc 1 21 33 + .loc 1 22 33 ldr r3, .L5 ldr r3, [r3] ldr r2, .L5 - .loc 1 21 38 + .loc 1 22 38 bic r3, r3, #1 str r3, [r2] - .loc 1 24 33 + .loc 1 25 33 ldr r3, .L5 ldr r3, [r3] ldr r2, .L5 - .loc 1 24 38 + .loc 1 25 38 orr r3, r3, #65536 str r3, [r2] - .loc 1 28 9 + .loc 1 29 9 nop .L2: - .loc 1 28 42 discriminator 1 + .loc 1 29 42 discriminator 1 ldr r3, .L5 ldr r3, [r3] - .loc 1 28 47 discriminator 1 + .loc 1 29 47 discriminator 1 and r3, r3, #131072 - .loc 1 28 10 discriminator 1 + .loc 1 29 10 discriminator 1 cmp r3, #0 beq .L2 - .loc 1 32 33 + .loc 1 33 33 ldr r3, .L5 ldr r3, [r3] ldr r2, .L5 - .loc 1 32 38 + .loc 1 33 38 bic r3, r3, #16777216 str r3, [r2] - .loc 1 35 33 + .loc 1 36 33 ldr r3, .L5 ldr r3, [r3, #4] ldr r2, .L5 - .loc 1 35 43 + .loc 1 36 43 orr r3, r3, #4194304 str r3, [r2, #4] - .loc 1 38 33 + .loc 1 39 33 ldr r3, .L5 ldr r2, [r3, #4] ldr r1, .L5 - .loc 1 38 43 + .loc 1 39 43 ldr r3, .L5+8 orrs r3, r3, r2 str r3, [r1, #4] - .loc 1 41 33 - ldr r3, .L5 - ldr r3, [r3, #8] - ldr r2, .L5 - .loc 1 41 40 - bic r3, r3, #240 - str r3, [r2, #8] .loc 1 42 33 ldr r3, .L5 - ldr r2, .L5 ldr r3, [r3, #8] + ldr r2, .L5 .loc 1 42 40 + bic r3, r3, #240 str r3, [r2, #8] - .loc 1 45 33 + .loc 1 43 33 ldr r3, .L5 - ldr r3, [r3, #8] ldr r2, .L5 - .loc 1 45 40 - bic r3, r3, #7168 + ldr r3, [r3, #8] + .loc 1 43 40 str r3, [r2, #8] .loc 1 46 33 ldr r3, .L5 ldr r3, [r3, #8] ldr r2, .L5 .loc 1 46 40 - orr r3, r3, #4096 + bic r3, r3, #7168 str r3, [r2, #8] - .loc 1 49 33 + .loc 1 47 33 ldr r3, .L5 ldr r3, [r3, #8] ldr r2, .L5 - .loc 1 49 40 - bic r3, r3, #57344 + .loc 1 47 40 + orr r3, r3, #4096 str r3, [r2, #8] .loc 1 50 33 ldr r3, .L5 + ldr r3, [r3, #8] + ldr r2, .L5 + .loc 1 50 40 + bic r3, r3, #57344 + str r3, [r2, #8] + .loc 1 51 33 + ldr r3, .L5 ldr r2, .L5 ldr r3, [r3, #8] - .loc 1 50 40 + .loc 1 51 40 str r3, [r2, #8] - .loc 1 53 33 + .loc 1 54 33 ldr r3, .L5 ldr r3, [r3] ldr r2, .L5 - .loc 1 53 38 + .loc 1 54 38 orr r3, r3, #16777216 str r3, [r2] - .loc 1 57 9 + .loc 1 58 9 nop .L3: - .loc 1 57 42 discriminator 1 + .loc 1 58 42 discriminator 1 ldr r3, .L5 ldr r3, [r3] - .loc 1 57 47 discriminator 1 + .loc 1 58 47 discriminator 1 and r3, r3, #33554432 - .loc 1 57 10 discriminator 1 + .loc 1 58 10 discriminator 1 cmp r3, #0 beq .L3 - .loc 1 60 35 - ldr r3, .L5+12 - ldr r3, [r3] - ldr r2, .L5+12 - .loc 1 60 41 - orr r3, r3, #1024 - str r3, [r2] .loc 1 61 35 ldr r3, .L5+12 ldr r3, [r3] ldr r2, .L5+12 .loc 1 61 41 - orr r3, r3, #512 + orr r3, r3, #1024 str r3, [r2] - .loc 1 64 35 + .loc 1 62 35 ldr r3, .L5+12 ldr r3, [r3] ldr r2, .L5+12 - .loc 1 64 41 + .loc 1 62 41 + orr r3, r3, #512 + str r3, [r2] + .loc 1 65 35 + ldr r3, .L5+12 + ldr r3, [r3] + ldr r2, .L5+12 + .loc 1 65 41 bic r3, r3, #15 str r3, [r2] - .loc 1 65 33 + .loc 1 66 33 ldr r3, .L5 ldr r3, [r3, #8] ldr r2, .L5 - .loc 1 65 40 + .loc 1 66 40 orr r3, r3, #272 orr r3, r3, #1 str r3, [r2, #8] - .loc 1 68 33 + .loc 1 69 33 ldr r3, .L5 ldr r3, [r3, #8] ldr r2, .L5 - .loc 1 68 40 + .loc 1 69 40 orr r3, r3, #2 str r3, [r2, #8] - .loc 1 72 9 + .loc 1 73 9 nop .L4: - .loc 1 72 42 discriminator 1 + .loc 1 73 42 discriminator 1 ldr r3, .L5 ldr r3, [r3, #8] - .loc 1 72 49 discriminator 1 + .loc 1 73 49 discriminator 1 lsrs r3, r3, #2 - .loc 1 72 55 discriminator 1 + .loc 1 73 55 discriminator 1 and r3, r3, #3 - .loc 1 72 65 discriminator 1 + .loc 1 73 65 discriminator 1 cmp r3, #2 bne .L4 - .loc 1 73 1 + .loc 1 74 1 nop nop mov sp, r7 @@ -230,6 +230,10 @@ system_clock_init: .cfi_endproc .LFE0: .size system_clock_init, .-system_clock_init + .section .rodata + .align 2 +.LC0: + .ascii "hello, world!\012\000" .section .text.main,"ax",%progbits .align 1 .global main @@ -239,7 +243,7 @@ system_clock_init: .type main, %function main: .LFB1: - .loc 1 75 16 + .loc 1 76 16 .cfi_startproc @ args = 0, pretend = 0, frame = 8 @ frame_needed = 1, uses_anonymous_args = 0 @@ -251,56 +255,60 @@ main: .cfi_def_cfa_offset 16 add r7, sp, #0 .cfi_def_cfa_register 7 - .loc 1 76 3 - bl system_clock_init .loc 1 77 3 + bl system_clock_init + .loc 1 78 3 bl tim4_init .loc 1 79 3 + bl usart2_init + .loc 1 81 3 bl tim4_start - .loc 1 81 12 + .loc 1 82 3 + bl usart2_start + .loc 1 84 12 movw r3, #525 strh r3, [r7, #2] @ movhi - .loc 1 82 33 + .loc 1 85 33 ldr r3, .L10 ldr r3, [r3, #48] - .loc 1 82 57 + .loc 1 85 57 ldrh r2, [r7, #2] lsrs r2, r2, #8 uxth r2, r2 mov r1, r2 - .loc 1 82 49 + .loc 1 85 49 movs r2, #1 lsls r2, r2, r1 mov r1, r2 - .loc 1 82 33 + .loc 1 85 33 ldr r2, .L10 - .loc 1 82 43 + .loc 1 85 43 orrs r3, r3, r1 str r3, [r2, #48] - .loc 1 83 3 + .loc 1 86 3 ldrh r3, [r7, #2] movs r1, #1 mov r0, r3 bl gpio_set_mode - .loc 1 85 54 + .loc 1 88 54 ldr r3, .L10+4 ldr r3, [r3, #36] - .loc 1 85 12 + .loc 1 88 12 strh r3, [r7, #6] @ movhi - .loc 1 86 7 + .loc 1 89 7 movs r3, #0 strb r3, [r7, #5] .L9: - .loc 1 88 39 + .loc 1 91 39 ldr r3, .L10+4 ldr r2, [r3, #36] - .loc 1 88 45 + .loc 1 91 45 ldrh r3, [r7, #6] subs r3, r2, r3 - .loc 1 88 5 + .loc 1 91 5 cmp r3, #249 bls .L9 - .loc 1 89 3 + .loc 1 92 3 ldrb r3, [r7, #5] @ zero_extendqisi2 cmp r3, #0 ite ne @@ -309,29 +317,33 @@ main: uxtb r3, r3 eor r3, r3, #1 uxtb r3, r3 - .loc 1 89 10 + .loc 1 92 10 strb r3, [r7, #5] ldrb r3, [r7, #5] and r3, r3, #1 strb r3, [r7, #5] - .loc 1 90 3 + .loc 1 93 3 ldrb r2, [r7, #5] @ zero_extendqisi2 ldrh r3, [r7, #2] mov r1, r2 mov r0, r3 bl gpio_write - .loc 1 92 45 + .loc 1 95 3 + ldr r0, .L10+8 + bl usart2_write + .loc 1 97 45 ldr r3, .L10+4 ldr r3, [r3, #36] - .loc 1 92 11 + .loc 1 97 11 strh r3, [r7, #6] @ movhi - .loc 1 88 5 + .loc 1 91 5 b .L9 .L11: .align 2 .L10: .word 1073887232 .word 1073743872 + .word .LC0 .cfi_endproc .LFE1: .size main, .-main @@ -344,18 +356,19 @@ main: .file 6 "src/flash.h" .file 7 "src/pwr.h" .file 8 "src/timer.h" + .file 9 "src/usart.h" .section .debug_info,"",%progbits .Ldebug_info0: - .4byte 0x44a + .4byte 0x47a .2byte 0x5 .byte 0x1 .byte 0x4 .4byte .Ldebug_abbrev0 .uleb128 0xd - .4byte .LASF1006 + .4byte .LASF1024 .byte 0x1d - .4byte .LASF1007 - .4byte .LASF1008 + .4byte .LASF1025 + .4byte .LASF1026 .4byte .LLRL0 .4byte 0 .4byte .Ldebug_line0 @@ -363,17 +376,17 @@ main: .uleb128 0x3 .byte 0x1 .byte 0x6 - .4byte .LASF940 + .4byte .LASF955 .uleb128 0x3 .byte 0x1 .byte 0x8 - .4byte .LASF941 + .4byte .LASF956 .uleb128 0x3 .byte 0x2 .byte 0x5 - .4byte .LASF942 + .4byte .LASF957 .uleb128 0x4 - .4byte .LASF945 + .4byte .LASF960 .byte 0x2 .byte 0x39 .byte 0x1c @@ -381,13 +394,13 @@ main: .uleb128 0x3 .byte 0x2 .byte 0x7 - .4byte .LASF943 + .4byte .LASF958 .uleb128 0x3 .byte 0x4 .byte 0x5 - .4byte .LASF944 + .4byte .LASF959 .uleb128 0x4 - .4byte .LASF946 + .4byte .LASF961 .byte 0x2 .byte 0x4f .byte 0x1b @@ -395,15 +408,15 @@ main: .uleb128 0x3 .byte 0x4 .byte 0x7 - .4byte .LASF947 + .4byte .LASF962 .uleb128 0x3 .byte 0x8 .byte 0x5 - .4byte .LASF948 + .4byte .LASF963 .uleb128 0x3 .byte 0x8 .byte 0x7 - .4byte .LASF949 + .4byte .LASF964 .uleb128 0xe .byte 0x4 .byte 0x5 @@ -411,22 +424,22 @@ main: .uleb128 0x3 .byte 0x4 .byte 0x7 - .4byte .LASF950 + .4byte .LASF965 .uleb128 0x4 - .4byte .LASF951 + .4byte .LASF966 .byte 0x3 .byte 0x24 .byte 0x14 .4byte 0x3f .uleb128 0x4 - .4byte .LASF952 + .4byte .LASF967 .byte 0x3 .byte 0x30 .byte 0x14 .4byte 0x59 - .uleb128 0x7 + .uleb128 0x9 .4byte 0x94 - .uleb128 0x8 + .uleb128 0xa .ascii "rcc\000" .byte 0x8c .byte 0x4 @@ -438,13 +451,13 @@ main: .4byte 0xa0 .byte 0 .uleb128 0x1 - .4byte .LASF953 + .4byte .LASF968 .byte 0x4 .byte 0x8 .4byte 0xa0 .byte 0x4 .uleb128 0x1 - .4byte .LASF954 + .4byte .LASF969 .byte 0x4 .byte 0x9 .4byte 0xa0 @@ -456,115 +469,115 @@ main: .4byte 0xa0 .byte 0xc .uleb128 0x1 - .4byte .LASF955 + .4byte .LASF970 .byte 0x4 .byte 0xb .4byte 0xa0 .byte 0x10 .uleb128 0x1 - .4byte .LASF956 + .4byte .LASF971 .byte 0x4 .byte 0xc .4byte 0xa0 .byte 0x14 .uleb128 0x1 - .4byte .LASF957 + .4byte .LASF972 .byte 0x4 .byte 0xd .4byte 0x210 .byte 0x18 .uleb128 0x1 - .4byte .LASF958 + .4byte .LASF973 .byte 0x4 .byte 0xe .4byte 0xa0 .byte 0x20 .uleb128 0x1 - .4byte .LASF959 + .4byte .LASF974 .byte 0x4 .byte 0xf .4byte 0xa0 .byte 0x24 .uleb128 0x1 - .4byte .LASF960 + .4byte .LASF975 .byte 0x4 .byte 0x10 .4byte 0x210 .byte 0x28 .uleb128 0x1 - .4byte .LASF961 + .4byte .LASF976 .byte 0x4 .byte 0x11 .4byte 0xa0 .byte 0x30 .uleb128 0x1 - .4byte .LASF962 + .4byte .LASF977 .byte 0x4 .byte 0x12 .4byte 0xa0 .byte 0x34 .uleb128 0x1 - .4byte .LASF963 + .4byte .LASF978 .byte 0x4 .byte 0x13 .4byte 0x210 .byte 0x38 .uleb128 0x1 - .4byte .LASF964 + .4byte .LASF979 .byte 0x4 .byte 0x14 .4byte 0xa0 .byte 0x40 .uleb128 0x1 - .4byte .LASF965 + .4byte .LASF980 .byte 0x4 .byte 0x15 .4byte 0xa0 .byte 0x44 .uleb128 0x1 - .4byte .LASF966 + .4byte .LASF981 .byte 0x4 .byte 0x16 .4byte 0x210 .byte 0x48 .uleb128 0x1 - .4byte .LASF967 + .4byte .LASF982 .byte 0x4 .byte 0x17 .4byte 0xa0 .byte 0x50 .uleb128 0x1 - .4byte .LASF968 + .4byte .LASF983 .byte 0x4 .byte 0x18 .4byte 0xa0 .byte 0x54 .uleb128 0x1 - .4byte .LASF969 + .4byte .LASF984 .byte 0x4 .byte 0x19 .4byte 0x210 .byte 0x58 .uleb128 0x1 - .4byte .LASF970 + .4byte .LASF985 .byte 0x4 .byte 0x1a .4byte 0xa0 .byte 0x60 .uleb128 0x1 - .4byte .LASF971 + .4byte .LASF986 .byte 0x4 .byte 0x1b .4byte 0xa0 .byte 0x64 .uleb128 0x1 - .4byte .LASF972 + .4byte .LASF987 .byte 0x4 .byte 0x1c .4byte 0x210 .byte 0x68 .uleb128 0x1 - .4byte .LASF973 + .4byte .LASF988 .byte 0x4 .byte 0x1d .4byte 0xa0 @@ -576,25 +589,25 @@ main: .4byte 0xa0 .byte 0x74 .uleb128 0x1 - .4byte .LASF974 + .4byte .LASF989 .byte 0x4 .byte 0x1f .4byte 0x210 .byte 0x78 .uleb128 0x1 - .4byte .LASF975 + .4byte .LASF990 .byte 0x4 .byte 0x20 .4byte 0xa0 .byte 0x80 .uleb128 0x1 - .4byte .LASF976 + .4byte .LASF991 .byte 0x4 .byte 0x21 .4byte 0xa0 .byte 0x84 .uleb128 0x1 - .4byte .LASF977 + .4byte .LASF992 .byte 0x4 .byte 0x22 .4byte 0xa0 @@ -607,7 +620,7 @@ main: .4byte 0x81 .byte 0x1 .byte 0 - .uleb128 0x7 + .uleb128 0x9 .4byte 0x200 .uleb128 0x11 .byte 0x7 @@ -617,27 +630,27 @@ main: .byte 0x25 .byte 0xe .4byte 0x23c - .uleb128 0x5 - .4byte .LASF978 + .uleb128 0x6 + .4byte .LASF993 .byte 0 - .uleb128 0x5 - .4byte .LASF979 + .uleb128 0x6 + .4byte .LASF994 .byte 0x1 - .uleb128 0x5 - .4byte .LASF980 + .uleb128 0x6 + .4byte .LASF995 .byte 0x2 - .uleb128 0x5 - .4byte .LASF981 + .uleb128 0x6 + .4byte .LASF996 .byte 0x3 .byte 0 .uleb128 0x4 - .4byte .LASF982 + .4byte .LASF997 .byte 0x5 .byte 0x2a .byte 0x3 .4byte 0x215 - .uleb128 0x9 - .4byte .LASF983 + .uleb128 0xb + .4byte .LASF998 .byte 0x18 .byte 0x6 .4byte 0x29a @@ -648,13 +661,13 @@ main: .4byte 0xa0 .byte 0 .uleb128 0x1 - .4byte .LASF984 + .4byte .LASF999 .byte 0x6 .byte 0x8 .4byte 0xa0 .byte 0x4 .uleb128 0x1 - .4byte .LASF985 + .4byte .LASF1000 .byte 0x6 .byte 0x9 .4byte 0xa0 @@ -672,13 +685,13 @@ main: .4byte 0xa0 .byte 0x10 .uleb128 0x1 - .4byte .LASF986 + .4byte .LASF1001 .byte 0x6 .byte 0xc .4byte 0xa0 .byte 0x14 .byte 0 - .uleb128 0x8 + .uleb128 0xa .ascii "pwr\000" .byte 0x8 .byte 0x7 @@ -696,8 +709,8 @@ main: .4byte 0xa0 .byte 0x4 .byte 0 - .uleb128 0x9 - .4byte .LASF987 + .uleb128 0xb + .4byte .LASF1002 .byte 0x50 .byte 0x8 .4byte 0x3b8 @@ -714,13 +727,13 @@ main: .4byte 0xa0 .byte 0x4 .uleb128 0x1 - .4byte .LASF988 + .4byte .LASF1003 .byte 0x8 .byte 0x9 .4byte 0xa0 .byte 0x8 .uleb128 0x1 - .4byte .LASF989 + .4byte .LASF1004 .byte 0x8 .byte 0xa .4byte 0xa0 @@ -738,19 +751,19 @@ main: .4byte 0xa0 .byte 0x14 .uleb128 0x1 - .4byte .LASF990 + .4byte .LASF1005 .byte 0x8 .byte 0xd .4byte 0xa0 .byte 0x18 .uleb128 0x1 - .4byte .LASF991 + .4byte .LASF1006 .byte 0x8 .byte 0xe .4byte 0xa0 .byte 0x1c .uleb128 0x1 - .4byte .LASF992 + .4byte .LASF1007 .byte 0x8 .byte 0xf .4byte 0xa0 @@ -780,31 +793,31 @@ main: .4byte 0xa0 .byte 0x30 .uleb128 0x1 - .4byte .LASF993 + .4byte .LASF1008 .byte 0x8 .byte 0x14 .4byte 0xa0 .byte 0x34 .uleb128 0x1 - .4byte .LASF994 + .4byte .LASF1009 .byte 0x8 .byte 0x15 .4byte 0xa0 .byte 0x38 .uleb128 0x1 - .4byte .LASF995 + .4byte .LASF1010 .byte 0x8 .byte 0x16 .4byte 0xa0 .byte 0x3c .uleb128 0x1 - .4byte .LASF996 + .4byte .LASF1011 .byte 0x8 .byte 0x17 .4byte 0xa0 .byte 0x40 .uleb128 0x1 - .4byte .LASF997 + .4byte .LASF1012 .byte 0x8 .byte 0x18 .4byte 0xa0 @@ -816,81 +829,108 @@ main: .4byte 0xa0 .byte 0x48 .uleb128 0x1 - .4byte .LASF998 + .4byte .LASF1013 .byte 0x8 .byte 0x1a .4byte 0xa0 .byte 0x4c .byte 0 - .uleb128 0xa - .4byte .LASF1000 + .uleb128 0x8 + .4byte .LASF1014 + .byte 0x9 + .byte 0x30 + .4byte 0x3c9 + .uleb128 0x5 + .4byte 0x3c9 + .byte 0 + .uleb128 0x12 + .byte 0x4 + .4byte 0x3cf + .uleb128 0x3 + .byte 0x1 + .byte 0x8 + .4byte .LASF510 + .uleb128 0x8 + .4byte .LASF1015 + .byte 0x5 .byte 0x2e - .4byte 0x3cd - .uleb128 0x6 + .4byte 0x3ec + .uleb128 0x5 .4byte 0x88 - .uleb128 0x6 - .4byte 0x3cd + .uleb128 0x5 + .4byte 0x3ec .byte 0 .uleb128 0x3 .byte 0x1 .byte 0x2 - .4byte .LASF999 - .uleb128 0xa - .4byte .LASF1001 + .4byte .LASF1016 + .uleb128 0x8 + .4byte .LASF1017 + .byte 0x5 .byte 0x2c - .4byte 0x3e9 - .uleb128 0x6 + .4byte 0x409 + .uleb128 0x5 .4byte 0x88 - .uleb128 0x6 + .uleb128 0x5 .4byte 0x23c .byte 0 - .uleb128 0xb - .4byte .LASF1002 + .uleb128 0x7 + .4byte .LASF1018 + .byte 0x9 + .byte 0x2d + .uleb128 0x7 + .4byte .LASF1019 + .byte 0x8 .byte 0x24 - .uleb128 0xb - .4byte .LASF1003 + .uleb128 0x7 + .4byte .LASF1020 + .byte 0x9 + .byte 0x2c + .uleb128 0x7 + .4byte .LASF1021 + .byte 0x8 .byte 0x23 - .uleb128 0x12 - .4byte .LASF1009 + .uleb128 0x13 + .4byte .LASF1027 .byte 0x1 - .byte 0x4b + .byte 0x4c .byte 0x5 .4byte 0x7a .4byte .LFB1 .4byte .LFE1-.LFB1 .uleb128 0x1 .byte 0x9c - .4byte 0x43b - .uleb128 0x13 + .4byte 0x46b + .uleb128 0x14 .ascii "led\000" .byte 0x1 - .byte 0x51 + .byte 0x54 .byte 0xc .4byte 0x88 .uleb128 0x2 .byte 0x91 .sleb128 -14 .uleb128 0xc - .4byte .LASF1004 - .byte 0x55 + .4byte .LASF1022 + .byte 0x58 .byte 0xc .4byte 0x88 .uleb128 0x2 .byte 0x91 .sleb128 -10 .uleb128 0xc - .4byte .LASF1005 - .byte 0x56 + .4byte .LASF1023 + .byte 0x59 .byte 0x7 - .4byte 0x3cd + .4byte 0x3ec .uleb128 0x2 .byte 0x91 .sleb128 -11 .byte 0 - .uleb128 0x14 - .4byte .LASF1010 + .uleb128 0x15 + .4byte .LASF1028 .byte 0x1 - .byte 0xc + .byte 0xd .byte 0xd .4byte .LFB0 .4byte .LFE0-.LFB0 @@ -962,6 +1002,13 @@ main: .byte 0 .byte 0 .uleb128 0x5 + .uleb128 0x5 + .byte 0 + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x6 .uleb128 0x28 .byte 0 .uleb128 0x3 @@ -970,100 +1017,91 @@ main: .uleb128 0xb .byte 0 .byte 0 - .uleb128 0x6 - .uleb128 0x5 + .uleb128 0x7 + .uleb128 0x2e .byte 0 - .uleb128 0x49 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x39 + .uleb128 0x21 + .sleb128 6 + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .byte 0 + .byte 0 + .uleb128 0x8 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0x19 + .uleb128 0x3 + .uleb128 0xe + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x39 + .uleb128 0x21 + .sleb128 6 + .uleb128 0x27 + .uleb128 0x19 + .uleb128 0x3c + .uleb128 0x19 + .uleb128 0x1 .uleb128 0x13 .byte 0 .byte 0 - .uleb128 0x7 + .uleb128 0x9 .uleb128 0x35 .byte 0 .uleb128 0x49 .uleb128 0x13 .byte 0 .byte 0 - .uleb128 0x8 - .uleb128 0x13 - .byte 0x1 - .uleb128 0x3 - .uleb128 0x8 - .uleb128 0xb - .uleb128 0xb - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0x21 - .sleb128 6 - .uleb128 0x39 - .uleb128 0x21 - .sleb128 8 - .uleb128 0x1 - .uleb128 0x13 - .byte 0 - .byte 0 - .uleb128 0x9 - .uleb128 0x13 - .byte 0x1 - .uleb128 0x3 - .uleb128 0xe - .uleb128 0xb - .uleb128 0xb - .uleb128 0x3a - .uleb128 0xb - .uleb128 0x3b - .uleb128 0x21 - .sleb128 6 - .uleb128 0x39 - .uleb128 0x21 - .sleb128 8 - .uleb128 0x1 - .uleb128 0x13 - .byte 0 - .byte 0 .uleb128 0xa - .uleb128 0x2e + .uleb128 0x13 .byte 0x1 - .uleb128 0x3f - .uleb128 0x19 .uleb128 0x3 - .uleb128 0xe - .uleb128 0x3a - .uleb128 0x21 - .sleb128 5 - .uleb128 0x3b + .uleb128 0x8 .uleb128 0xb - .uleb128 0x39 + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b .uleb128 0x21 .sleb128 6 - .uleb128 0x27 - .uleb128 0x19 - .uleb128 0x3c - .uleb128 0x19 + .uleb128 0x39 + .uleb128 0x21 + .sleb128 8 .uleb128 0x1 .uleb128 0x13 .byte 0 .byte 0 .uleb128 0xb - .uleb128 0x2e - .byte 0 - .uleb128 0x3f - .uleb128 0x19 + .uleb128 0x13 + .byte 0x1 .uleb128 0x3 .uleb128 0xe - .uleb128 0x3a - .uleb128 0x21 - .sleb128 8 - .uleb128 0x3b .uleb128 0xb - .uleb128 0x39 + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b .uleb128 0x21 .sleb128 6 - .uleb128 0x27 - .uleb128 0x19 - .uleb128 0x3c - .uleb128 0x19 + .uleb128 0x39 + .uleb128 0x21 + .sleb128 8 + .uleb128 0x1 + .uleb128 0x13 .byte 0 .byte 0 .uleb128 0xc @@ -1154,6 +1192,15 @@ main: .byte 0 .byte 0 .uleb128 0x12 + .uleb128 0xf + .byte 0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0 + .byte 0 + .uleb128 0x13 .uleb128 0x2e .byte 0x1 .uleb128 0x3f @@ -1182,7 +1229,7 @@ main: .uleb128 0x13 .byte 0 .byte 0 - .uleb128 0x13 + .uleb128 0x14 .uleb128 0x34 .byte 0 .uleb128 0x3 @@ -1199,7 +1246,7 @@ main: .uleb128 0x18 .byte 0 .byte 0 - .uleb128 0x14 + .uleb128 0x15 .uleb128 0x2e .byte 0 .uleb128 0x3 @@ -2624,76 +2671,76 @@ main: .byte 0x5 .uleb128 0 .4byte .LASF453 - .file 9 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/inttypes.h" + .file 10 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/inttypes.h" .byte 0x3 .uleb128 0x1 - .uleb128 0x9 + .uleb128 0xa .byte 0x5 .uleb128 0xe .4byte .LASF454 - .file 10 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/newlib.h" + .file 11 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/newlib.h" .byte 0x3 .uleb128 0x10 - .uleb128 0xa + .uleb128 0xb .byte 0x5 .uleb128 0x7 .4byte .LASF455 - .file 11 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/_newlib_version.h" + .file 12 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/_newlib_version.h" .byte 0x3 .uleb128 0xa - .uleb128 0xb + .uleb128 0xc .byte 0x7 .4byte .Ldebug_macro2 .byte 0x4 .byte 0x7 .4byte .Ldebug_macro3 .byte 0x4 - .file 12 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/sys/config.h" + .file 13 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/sys/config.h" .byte 0x3 .uleb128 0x11 - .uleb128 0xc + .uleb128 0xd .byte 0x5 .uleb128 0x2 .4byte .LASF478 - .file 13 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/machine/ieeefp.h" + .file 14 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/machine/ieeefp.h" .byte 0x3 .uleb128 0x4 - .uleb128 0xd + .uleb128 0xe .byte 0x7 .4byte .Ldebug_macro4 .byte 0x4 - .file 14 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/sys/features.h" + .file 15 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/sys/features.h" .byte 0x3 .uleb128 0x5 - .uleb128 0xe + .uleb128 0xf .byte 0x7 .4byte .Ldebug_macro5 .byte 0x4 .byte 0x7 .4byte .Ldebug_macro6 .byte 0x4 - .file 15 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/sys/_intsup.h" + .file 16 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/sys/_intsup.h" .byte 0x3 .uleb128 0x12 - .uleb128 0xf + .uleb128 0x10 .byte 0x7 .4byte .Ldebug_macro7 .byte 0x4 - .file 16 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/_ansi.h" + .file 17 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/_ansi.h" .byte 0x3 .uleb128 0x13 - .uleb128 0x10 + .uleb128 0x11 .byte 0x7 .4byte .Ldebug_macro8 .byte 0x4 - .file 17 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/lib/gcc/arm-none-eabi/12.3.1/include/stdint.h" + .file 18 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/lib/gcc/arm-none-eabi/12.3.1/include/stdint.h" .byte 0x3 .uleb128 0x14 - .uleb128 0x11 - .file 18 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/stdint.h" + .uleb128 0x12 + .file 19 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/arm-none-eabi/include/stdint.h" .byte 0x3 .uleb128 0x9 - .uleb128 0x12 + .uleb128 0x13 .byte 0x5 .uleb128 0xa .4byte .LASF546 @@ -2719,20 +2766,20 @@ main: .byte 0x5 .uleb128 0x15 .4byte .LASF647 - .file 19 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/lib/gcc/arm-none-eabi/12.3.1/include/stddef.h" + .file 20 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/lib/gcc/arm-none-eabi/12.3.1/include/stddef.h" .byte 0x3 .uleb128 0x16 - .uleb128 0x13 + .uleb128 0x14 .byte 0x7 .4byte .Ldebug_macro12 .byte 0x4 .byte 0x7 .4byte .Ldebug_macro13 .byte 0x4 - .file 20 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/lib/gcc/arm-none-eabi/12.3.1/include/stdbool.h" + .file 21 "/nix/store/yr89i11mszv2az19r26l372zgaiivj1c-gcc-arm-embedded-12.3.rel1/lib/gcc/arm-none-eabi/12.3.1/include/stdbool.h" .byte 0x3 .uleb128 0x2 - .uleb128 0x14 + .uleb128 0x15 .byte 0x7 .4byte .Ldebug_macro14 .byte 0x4 @@ -2766,9 +2813,15 @@ main: .byte 0x7 .4byte .Ldebug_macro19 .byte 0x4 + .byte 0x3 + .uleb128 0x9 + .uleb128 0x9 + .byte 0x7 + .4byte .Ldebug_macro20 + .byte 0x4 .byte 0x5 - .uleb128 0xa - .4byte .LASF939 + .uleb128 0xb + .4byte .LASF954 .byte 0x4 .byte 0 .section .debug_macro,"G",%progbits,wm4._newlib_version.h.4.6d111ab2e95434b664b53815e5c8ccba,comdat @@ -4325,6 +4378,56 @@ main: .uleb128 0x21 .4byte .LASF938 .byte 0 + .section .debug_macro,"G",%progbits,wm4.usart.h.2.41f911260774cb69712a09f3470bfff3,comdat +.Ldebug_macro20: + .2byte 0x5 + .byte 0 + .byte 0x5 + .uleb128 0x2 + .4byte .LASF939 + .byte 0x5 + .uleb128 0x10 + .4byte .LASF940 + .byte 0x5 + .uleb128 0x11 + .4byte .LASF941 + .byte 0x5 + .uleb128 0x15 + .4byte .LASF942 + .byte 0x5 + .uleb128 0x16 + .4byte .LASF943 + .byte 0x5 + .uleb128 0x1a + .4byte .LASF944 + .byte 0x5 + .uleb128 0x1b + .4byte .LASF945 + .byte 0x5 + .uleb128 0x1e + .4byte .LASF946 + .byte 0x5 + .uleb128 0x1f + .4byte .LASF947 + .byte 0x5 + .uleb128 0x22 + .4byte .LASF948 + .byte 0x5 + .uleb128 0x23 + .4byte .LASF949 + .byte 0x5 + .uleb128 0x26 + .4byte .LASF950 + .byte 0x5 + .uleb128 0x27 + .4byte .LASF951 + .byte 0x5 + .uleb128 0x29 + .4byte .LASF952 + .byte 0x5 + .uleb128 0x2a + .4byte .LASF953 + .byte 0 .section .debug_line,"",%progbits .Ldebug_line0: .section .debug_str,"MS",%progbits,1 @@ -4340,7 +4443,7 @@ main: .ascii "__UHA_FBIT__ 8\000" .LASF814: .ascii "PRIiFAST64 __PRI64FAST(i)\000" -.LASF941: +.LASF956: .ascii "unsigned char\000" .LASF225: .ascii "__FLT64_DENORM_MIN__ 4.9406564584124654e-324F64\000" @@ -4370,7 +4473,7 @@ main: .ascii "__WINT_MIN__ 0U\000" .LASF90: .ascii "__INTMAX_MAX__ 0x7fffffffffffffffLL\000" -.LASF980: +.LASF995: .ascii "GPIO_MODE_AF\000" .LASF335: .ascii "__TQ_IBIT__ 0\000" @@ -4386,6 +4489,8 @@ main: .ascii "__int20__\000" .LASF904: .ascii "RCC_APB1ENR_TIM4_BIT 2\000" +.LASF953: + .ascii "USART_BRR_FRACTION_MASK (0b111)\000" .LASF18: .ascii "__SIZEOF_LONG_LONG__ 8\000" .LASF169: @@ -4396,7 +4501,7 @@ main: .ascii "__FRACT_MIN__ (-0.5R-0.5R)\000" .LASF324: .ascii "__ULLACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-32ULLK\000" -.LASF983: +.LASF998: .ascii "flash\000" .LASF294: .ascii "__USACCUM_MAX__ 0XFFFFP-8UHK\000" @@ -4404,6 +4509,8 @@ main: .ascii "__SFRACT_FBIT__ 7\000" .LASF94: .ascii "__INTMAX_WIDTH__ 64\000" +.LASF939: + .ascii "USART_H_ \000" .LASF448: .ascii "__ARM_FEATURE_BF16_SCALAR_ARITHMETIC\000" .LASF331: @@ -4507,7 +4614,7 @@ main: .ascii "__need_wchar_t\000" .LASF199: .ascii "__FLT32_MIN_EXP__ (-125)\000" -.LASF1006: +.LASF1024: .ascii "GNU C2X 12.3.1 20230626 -mcpu=cortex-m4 -mthumb -mf" .ascii "loat-abi=hard -mfpu=fpv4-sp-d16 -march=armv7e-m+fp " .ascii "-g3 -ggdb -O0 -std=c2x -ffunction-sections -fdata-s" @@ -4526,7 +4633,7 @@ main: .ascii "__int_fast32_t_defined 1\000" .LASF133: .ascii "__INT_FAST64_WIDTH__ 64\000" -.LASF998: +.LASF1013: .ascii "DMAR\000" .LASF659: .ascii "___int_wchar_t_h \000" @@ -4579,13 +4686,13 @@ main: .ascii "SCNo32 __SCN32(o)\000" .LASF540: .ascii "_NOTHROW \000" -.LASF993: +.LASF1008: .ascii "CCR1\000" .LASF633: .ascii "WCHAR_MAX (__WCHAR_MAX__)\000" -.LASF995: +.LASF1010: .ascii "CCR3\000" -.LASF996: +.LASF1011: .ascii "CCR4\000" .LASF307: .ascii "__LACCUM_IBIT__ 32\000" @@ -4609,7 +4716,7 @@ main: .ascii "__INT64 \"ll\"\000" .LASF138: .ascii "__INTPTR_MAX__ 0x7fffffff\000" -.LASF968: +.LASF983: .ascii "AHB2LPENR\000" .LASF499: .ascii "__RAND_MAX\000" @@ -4652,7 +4759,7 @@ main: .ascii " RCC_PLLCFGR_PLLP_BIT)\000" .LASF302: .ascii "__UACCUM_IBIT__ 16\000" -.LASF944: +.LASF959: .ascii "long int\000" .LASF719: .ascii "SCNd16 __SCN16(d)\000" @@ -4703,7 +4810,7 @@ main: .ascii "__FLT32_MAX_EXP__ 128\000" .LASF824: .ascii "__PRIMAX(x) __STRINGIFY(ll ##x)\000" -.LASF1009: +.LASF1027: .ascii "main\000" .LASF435: .ascii "__THUMB_INTERWORK__ 1\000" @@ -4731,7 +4838,7 @@ main: .ascii "__SIZEOF_LONG__ 4\000" .LASF753: .ascii "PRIi32 __PRI32(i)\000" -.LASF965: +.LASF980: .ascii "APB2ENR\000" .LASF855: .ascii "RCC_H_ \000" @@ -4747,7 +4854,7 @@ main: .ascii "FLASH_ACR_ICEN_BIT 9\000" .LASF815: .ascii "PRIoFAST64 __PRI64FAST(o)\000" -.LASF967: +.LASF982: .ascii "AHB1LPENR\000" .LASF406: .ascii "__ARM_FEATURE_SIMD32 1\000" @@ -4759,7 +4866,7 @@ main: .ascii "PRIoLEAST16 __PRI16LEAST(o)\000" .LASF458: .ascii "__NEWLIB__ 4\000" -.LASF977: +.LASF992: .ascii "DCKCFGR\000" .LASF720: .ascii "SCNi16 __SCN16(i)\000" @@ -4769,7 +4876,7 @@ main: .ascii "__FLT_DECIMAL_DIG__ 9\000" .LASF562: .ascii "_UINT8_T_DECLARED \000" -.LASF940: +.LASF955: .ascii "signed char\000" .LASF805: .ascii "PRIuLEAST64 __PRI64LEAST(u)\000" @@ -4779,7 +4886,7 @@ main: .ascii "INTMAX_MIN (-INTMAX_MAX - 1)\000" .LASF364: .ascii "__GNUC_STDC_INLINE__ 1\000" -.LASF982: +.LASF997: .ascii "GPIO_MODE\000" .LASF256: .ascii "__FRACT_FBIT__ 15\000" @@ -4805,19 +4912,19 @@ main: .ascii "__FLT64_MAX_10_EXP__ 308\000" .LASF879: .ascii "RCC_PLLCFGR_PLLN_MASK (0b111111111)\000" -.LASF957: +.LASF972: .ascii "RESERVED0\000" -.LASF960: +.LASF975: .ascii "RESERVED1\000" -.LASF963: +.LASF978: .ascii "RESERVED2\000" .LASF3: .ascii "__STDC_UTF_32__ 1\000" -.LASF969: +.LASF984: .ascii "RESERVED4\000" .LASF241: .ascii "__FLT32X_DENORM_MIN__ 4.9406564584124654e-324F32x\000" -.LASF974: +.LASF989: .ascii "RESERVED6\000" .LASF152: .ascii "__FLT_MAX_10_EXP__ 38\000" @@ -4864,13 +4971,13 @@ main: .ascii "__int_fast64_t_defined 1\000" .LASF837: .ascii "__PRIPTR(x) __STRINGIFY(x)\000" -.LASF951: +.LASF966: .ascii "uint16_t\000" .LASF417: .ascii "__thumb2__ 1\000" .LASF321: .ascii "__ULLACCUM_FBIT__ 32\000" -.LASF999: +.LASF1016: .ascii "_Bool\000" .LASF900: .ascii "RCC_APB1ENR_PWREN_BIT 28\000" @@ -4885,15 +4992,15 @@ main: .ascii "SCNxLEAST64 __SCN64LEAST(x)\000" .LASF769: .ascii "SCNdLEAST32 __SCN32LEAST(d)\000" -.LASF966: +.LASF981: .ascii "RESERVED3\000" .LASF22: .ascii "__SIZEOF_LONG_DOUBLE__ 8\000" -.LASF972: +.LASF987: .ascii "RESERVED5\000" -.LASF990: +.LASF1005: .ascii "CCMR1\000" -.LASF991: +.LASF1006: .ascii "CCMR2\000" .LASF36: .ascii "__WCHAR_TYPE__ unsigned int\000" @@ -4901,7 +5008,7 @@ main: .ascii "TIMER_H_ \000" .LASF469: .ascii "_MB_LEN_MAX 8\000" -.LASF979: +.LASF994: .ascii "GPIO_MODE_OUTPUT\000" .LASF357: .ascii "__USA_IBIT__ 16\000" @@ -4915,6 +5022,8 @@ main: .ascii "__need_wchar_t \000" .LASF66: .ascii "__UINT_FAST64_TYPE__ long long unsigned int\000" +.LASF940: + .ascii "USART2_BASE_ADDR (0x40004400U)\000" .LASF894: .ascii "RCC_CFGR_SWS_BIT 2\000" .LASF156: @@ -4933,6 +5042,8 @@ main: .ascii "__FLT32_IS_IEC_60559__ 2\000" .LASF629: .ascii "SIG_ATOMIC_MAX (__STDINT_EXP(INT_MAX))\000" +.LASF949: + .ascii "USART_CR1_RE_ENABLE (1 << USART_CR1_RE_BIT)\000" .LASF724: .ascii "PRIdLEAST16 __PRI16LEAST(d)\000" .LASF755: @@ -4941,9 +5052,9 @@ main: .ascii "__SCN64(x) __INT64 __STRINGIFY(x)\000" .LASF646: .ascii "_GCC_WRAP_STDINT_H \000" -.LASF945: +.LASF960: .ascii "__uint16_t\000" -.LASF962: +.LASF977: .ascii "AHB2ENR\000" .LASF804: .ascii "PRIoLEAST64 __PRI64LEAST(o)\000" @@ -4957,7 +5068,7 @@ main: .ascii "__UINT8_MAX__ 0xff\000" .LASF552: .ascii "___int16_t_defined 1\000" -.LASF987: +.LASF1002: .ascii "timer\000" .LASF184: .ascii "__LDBL_MAX_EXP__ 1024\000" @@ -4977,7 +5088,7 @@ main: .ascii "INT32_MAX (__INT32_MAX__)\000" .LASF426: .ascii "__ARM_FP16_FORMAT_ALTERNATIVE\000" -.LASF1010: +.LASF1028: .ascii "system_clock_init\000" .LASF918: .ascii "FLASH ((struct flash *) FLASH_BASE_ADDR)\000" @@ -5049,7 +5160,7 @@ main: .ascii "__ELF__ 1\000" .LASF688: .ascii "PRIuLEAST8 __PRI8LEAST(u)\000" -.LASF973: +.LASF988: .ascii "BDCR\000" .LASF853: .ascii "false ((_Bool)+0u)\000" @@ -5111,7 +5222,7 @@ main: .ascii "RCC_CR_HSERDY_READY (1 << RCC_CR_HSERDY_BIT)\000" .LASF762: .ascii "SCNx32 __SCN32(x)\000" -.LASF954: +.LASF969: .ascii "CFGR\000" .LASF557: .ascii "___int_least32_t_defined 1\000" @@ -5159,7 +5270,7 @@ main: .ascii "__PRI8LEAST(x) __LEAST8 __STRINGIFY(x)\000" .LASF174: .ascii "__DBL_EPSILON__ ((double)2.2204460492503131e-16L)\000" -.LASF985: +.LASF1000: .ascii "OPTKEYR\000" .LASF268: .ascii "__LFRACT_MIN__ (-0.5LR-0.5LR)\000" @@ -5183,7 +5294,7 @@ main: .ascii "___int8_t_defined 1\000" .LASF248: .ascii "__SFRACT_MIN__ (-0.5HR-0.5HR)\000" -.LASF947: +.LASF962: .ascii "long unsigned int\000" .LASF349: .ascii "__SA_IBIT__ 16\000" @@ -5203,9 +5314,9 @@ main: .ascii "RCC_PLLCFGR_PLLSRC_BIT 22\000" .LASF907: .ascii "GPIO_AF_USART2_RX (0b0111)\000" -.LASF1000: +.LASF1015: .ascii "gpio_write\000" -.LASF989: +.LASF1004: .ascii "DIER\000" .LASF656: .ascii "_WCHAR_T_DEFINED_ \000" @@ -5215,7 +5326,7 @@ main: .ascii "int +2\000" .LASF636: .ascii "INT8_C(x) __INT8_C(x)\000" -.LASF939: +.LASF954: .ascii "exit 42\000" .LASF63: .ascii "__UINT_FAST8_TYPE__ unsigned int\000" @@ -5247,7 +5358,7 @@ main: .ascii "SCNx8 __SCN8(x)\000" .LASF208: .ascii "__FLT32_DENORM_MIN__ 1.4012984643248171e-45F32\000" -.LASF1001: +.LASF1017: .ascii "gpio_set_mode\000" .LASF125: .ascii "__UINT64_C(c) c ## ULL\000" @@ -5263,6 +5374,8 @@ main: .ascii "PRIXLEAST16 __PRI16LEAST(X)\000" .LASF622: .ascii "INT_FAST64_MAX (__INT_FAST64_MAX__)\000" +.LASF948: + .ascii "USART_CR1_RE_BIT 2\000" .LASF373: .ascii "__GCC_ATOMIC_CHAR16_T_LOCK_FREE 2\000" .LASF789: @@ -5313,7 +5426,7 @@ main: .ascii "PRIX32 __PRI32(X)\000" .LASF773: .ascii "SCNxLEAST32 __SCN32LEAST(x)\000" -.LASF1002: +.LASF1019: .ascii "tim4_start\000" .LASF711: .ascii "__SCN16LEAST(x) __LEAST16 __STRINGIFY(x)\000" @@ -5345,7 +5458,7 @@ main: .ascii "__ULACCUM_MIN__ 0.0ULK\000" .LASF461: .ascii "_ATEXIT_DYNAMIC_ALLOC 1\000" -.LASF946: +.LASF961: .ascii "__uint32_t\000" .LASF188: .ascii "__LDBL_MAX__ 1.7976931348623157e+308L\000" @@ -5355,7 +5468,7 @@ main: .ascii "__FLT_RADIX__ 2\000" .LASF454: .ascii "_INTTYPES_H \000" -.LASF948: +.LASF963: .ascii "long long int\000" .LASF784: .ascii "SCNxFAST32 __SCN32FAST(x)\000" @@ -5365,7 +5478,7 @@ main: .ascii "__LONG_WIDTH__ 32\000" .LASF602: .ascii "UINT32_MAX (__UINT32_MAX__)\000" -.LASF1004: +.LASF1022: .ascii "counter\000" .LASF648: .ascii "__wchar_t__ \000" @@ -5381,7 +5494,7 @@ main: .ascii "WINT_MAX (__WINT_MAX__)\000" .LASF822: .ascii "SCNuFAST64 __SCN64FAST(u)\000" -.LASF975: +.LASF990: .ascii "SSCGR\000" .LASF137: .ascii "__UINT_FAST64_MAX__ 0xffffffffffffffffULL\000" @@ -5395,7 +5508,7 @@ main: .ascii "__INTPTR_WIDTH__ 32\000" .LASF379: .ascii "__GCC_ATOMIC_LLONG_LOCK_FREE 1\000" -.LASF953: +.LASF968: .ascii "PLLCFGR\000" .LASF239: .ascii "__FLT32X_MIN__ 2.2250738585072014e-308F32x\000" @@ -5411,7 +5524,7 @@ main: .ascii "___int32_t_defined 1\000" .LASF83: .ascii "__INT_WIDTH__ 32\000" -.LASF959: +.LASF974: .ascii "APB2RSTR\000" .LASF409: .ascii "__ARM_ARCH_PROFILE\000" @@ -5461,7 +5574,7 @@ main: .ascii "__ARM_NEON_FP\000" .LASF280: .ascii "__LLFRACT_EPSILON__ 0x1P-63LLR\000" -.LASF971: +.LASF986: .ascii "APB2LPENR\000" .LASF938: .ascii "TIM_ENABLE (1 << TIM_CR1_CEN_BIT)\000" @@ -5494,7 +5607,7 @@ main: .ascii "L)\000" .LASF607: .ascii "INT64_MAX (__INT64_MAX__)\000" -.LASF950: +.LASF965: .ascii "unsigned int\000" .LASF862: .ascii "RCC_CR_HSERDY_BIT 17\000" @@ -5540,6 +5653,8 @@ main: .ascii "__INT16 \"h\"\000" .LASF402: .ascii "__ARM_FEATURE_LDREX\000" +.LASF1018: + .ascii "usart2_start\000" .LASF336: .ascii "__UQQ_FBIT__ 8\000" .LASF427: @@ -5586,7 +5701,7 @@ main: .ascii "PWR_H_ \000" .LASF356: .ascii "__USA_FBIT__ 16\000" -.LASF970: +.LASF985: .ascii "APB1LPENR\000" .LASF479: .ascii "__IEEE_LITTLE_ENDIAN \000" @@ -5632,7 +5747,7 @@ main: .ascii "WCHAR_MIN (__WCHAR_MIN__)\000" .LASF594: .ascii "INT16_MIN (-__INT16_MAX__ - 1)\000" -.LASF994: +.LASF1009: .ascii "CCR2\000" .LASF189: .ascii "__LDBL_NORM_MAX__ 1.7976931348623157e+308L\000" @@ -5686,6 +5801,8 @@ main: .ascii "__LFRACT_IBIT__ 0\000" .LASF16: .ascii "__SIZEOF_INT__ 4\000" +.LASF947: + .ascii "USART_CR1_TE_ENABLE (1 << USART_CR1_TE_BIT)\000" .LASF166: .ascii "__DBL_MIN_EXP__ (-1021)\000" .LASF705: @@ -5718,13 +5835,13 @@ main: .ascii "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1\000" .LASF733: .ascii "SCNuLEAST16 __SCN16LEAST(u)\000" -.LASF958: +.LASF973: .ascii "APB1RSTR\000" .LASF298: .ascii "__ACCUM_MIN__ (-0X1P15K-0X1P15K)\000" .LASF393: .ascii "__ARM_FEATURE_CRYPTO\000" -.LASF964: +.LASF979: .ascii "APB1ENR\000" .LASF741: .ascii "SCNdFAST16 __SCN16FAST(d)\000" @@ -5754,7 +5871,7 @@ main: .ascii ")\000" .LASF155: .ascii "__FLT_NORM_MAX__ 3.4028234663852886e+38F\000" -.LASF949: +.LASF964: .ascii "long long unsigned int\000" .LASF611: .ascii "UINT_LEAST64_MAX (__UINT_LEAST64_MAX__)\000" @@ -5805,10 +5922,12 @@ main: .ascii "PWR_SCALE3 (0b11)\000" .LASF573: .ascii "_INTMAX_T_DECLARED \000" -.LASF992: +.LASF1007: .ascii "CCER\000" .LASF40: .ascii "__CHAR16_TYPE__ short unsigned int\000" +.LASF943: + .ascii "USART_SR_TC_COMPLETED (1 << USART_SR_TC_BIT)\000" .LASF231: .ascii "__FLT32X_DIG__ 15\000" .LASF740: @@ -5863,7 +5982,7 @@ main: .ascii "__int20__ +2\000" .LASF654: .ascii "_WCHAR_T_ \000" -.LASF988: +.LASF1003: .ascii "SMCR\000" .LASF828: .ascii "PRIoMAX __PRIMAX(o)\000" @@ -5871,12 +5990,14 @@ main: .ascii "__SCN32(x) __INT32 __STRINGIFY(x)\000" .LASF925: .ascii "FLASH_ACR_LATENCY_MASK (0b1111)\000" -.LASF978: +.LASF993: .ascii "GPIO_MODE_INPUT\000" .LASF743: .ascii "SCNoFAST16 __SCN16FAST(o)\000" .LASF913: .ascii "PIN(port,num) (PORT(port) | num)\000" +.LASF1020: + .ascii "usart2_init\000" .LASF345: .ascii "__UTQ_IBIT__ 0\000" .LASF348: @@ -5901,6 +6022,8 @@ main: .ascii "PRIi16 __PRI16(i)\000" .LASF390: .ascii "__ARM_FEATURE_DSP 1\000" +.LASF945: + .ascii "USART_CR1_UE_ENABLE (1 << USART_CR1_UE_BIT)\000" .LASF825: .ascii "__SCNMAX(x) __STRINGIFY(ll ##x)\000" .LASF327: @@ -5933,13 +6056,15 @@ main: .ascii "__INTMAX_TYPE__ long long int\000" .LASF377: .ascii "__GCC_ATOMIC_INT_LOCK_FREE 2\000" +.LASF951: + .ascii "USART_BRR_MANTISSA_MASK (0b111111111111)\000" .LASF561: .ascii "_INT8_T_DECLARED \000" .LASF436: .ascii "__ARM_ARCH_7EM__ 1\000" .LASF428: .ascii "__ARM_FEATURE_FP16_SCALAR_ARITHMETIC\000" -.LASF961: +.LASF976: .ascii "AHB1ENR\000" .LASF295: .ascii "__USACCUM_EPSILON__ 0x1P-8UHK\000" @@ -5979,7 +6104,7 @@ main: .ascii "__DBL_DIG__ 15\000" .LASF275: .ascii "__ULFRACT_EPSILON__ 0x1P-32ULR\000" -.LASF956: +.LASF971: .ascii "AHB2RSTR\000" .LASF671: .ascii "__SCN8(x) __INT8 __STRINGIFY(x)\000" @@ -6003,18 +6128,22 @@ main: .ascii "__LDBL_MIN__ 2.2250738585072014e-308L\000" .LASF445: .ascii "__ARM_FEATURE_CDE\000" -.LASF984: +.LASF999: .ascii "KEYR\000" .LASF509: .ascii "unsigned\000" .LASF381: .ascii "__GCC_DESTRUCTIVE_SIZE 64\000" -.LASF942: +.LASF957: .ascii "short int\000" .LASF835: .ascii "SCNuMAX __SCNMAX(u)\000" +.LASF941: + .ascii "USART2 ((struct usart *) USART2_BASE_ADDR)\000" .LASF121: .ascii "__UINT16_C(c) c\000" +.LASF952: + .ascii "USART_BRR_FRACTION_BIT 0\000" .LASF359: .ascii "__UDA_IBIT__ 32\000" .LASF534: @@ -6023,6 +6152,8 @@ main: .ascii "RCC_PLLCFGR_PLLM_MASK (0b111111)\000" .LASF365: .ascii "__NO_INLINE__ 1\000" +.LASF942: + .ascii "USART_SR_TC_BIT 6\000" .LASF710: .ascii "__SCN16(x) __INT16 __STRINGIFY(x)\000" .LASF606: @@ -6033,7 +6164,7 @@ main: .ascii "_ATTRIBUTE(attrs) __attribute__ (attrs)\000" .LASF443: .ascii "__ARM_FEATURE_COPROC\000" -.LASF981: +.LASF996: .ascii "GPIO_MODE_ANALOG\000" .LASF177: .ascii "__DBL_HAS_INFINITY__ 1\000" @@ -6117,11 +6248,11 @@ main: .ascii "__LDBL_DECIMAL_DIG__ 17\000" .LASF701: .ascii "PRIXFAST8 __PRI8FAST(X)\000" -.LASF1005: +.LASF1023: .ascii "led_on\000" .LASF308: .ascii "__LACCUM_MIN__ (-0X1P31LK-0X1P31LK)\000" -.LASF1007: +.LASF1025: .ascii "src/main.c\000" .LASF126: .ascii "__INT_FAST8_MAX__ 0x7fffffff\000" @@ -6159,13 +6290,13 @@ main: .ascii "__ULLFRACT_MIN__ 0.0ULLR\000" .LASF651: .ascii "_T_WCHAR_ \000" -.LASF997: +.LASF1012: .ascii "BDTR\000" .LASF382: .ascii "__GCC_CONSTRUCTIVE_SIZE 64\000" .LASF664: .ascii "_BSD_WCHAR_T_\000" -.LASF976: +.LASF991: .ascii "PLLI2SCFGR\000" .LASF277: .ascii "__LLFRACT_IBIT__ 0\000" @@ -6173,9 +6304,9 @@ main: .ascii "UINT16_C(x) __UINT16_C(x)\000" .LASF756: .ascii "PRIx32 __PRI32(x)\000" -.LASF1003: +.LASF1021: .ascii "tim4_init\000" -.LASF952: +.LASF967: .ascii "uint32_t\000" .LASF878: .ascii "RCC_PLLCFGR_PLLN_BIT 6\000" @@ -6183,7 +6314,7 @@ main: .ascii "PRIxLEAST8 __PRI8LEAST(x)\000" .LASF506: .ascii "_SYS__INTSUP_H \000" -.LASF986: +.LASF1001: .ascii "OPTCR\000" .LASF290: .ascii "__SACCUM_EPSILON__ 0x1P-7HK\000" @@ -6241,7 +6372,7 @@ main: .ascii "PRIXLEAST32 __PRI32LEAST(X)\000" .LASF171: .ascii "__DBL_MAX__ ((double)1.7976931348623157e+308L)\000" -.LASF943: +.LASF958: .ascii "short unsigned int\000" .LASF276: .ascii "__LLFRACT_FBIT__ 63\000" @@ -6249,6 +6380,8 @@ main: .ascii "__FLT32_HAS_INFINITY__ 1\000" .LASF416: .ascii "__thumb__ 1\000" +.LASF950: + .ascii "USART_BRR_MANTISSA_BIT 4\000" .LASF421: .ascii "__ARMEL__ 1\000" .LASF690: @@ -6257,6 +6390,8 @@ main: .ascii "__HQ_FBIT__ 15\000" .LASF854: .ascii "__bool_true_false_are_defined 1\000" +.LASF944: + .ascii "USART_CR1_UE_BIT 13\000" .LASF911: .ascii "GPIO(port) ((struct gpio*)(uintptr_t)(GPIO_BASE_ADD" .ascii "R + (GPIO_PORT_OFFSET * port)))\000" @@ -6266,6 +6401,8 @@ main: .ascii "RCC_CR_HSIRDY_BIT 1\000" .LASF80: .ascii "__SIZE_MAX__ 0xffffffffU\000" +.LASF1014: + .ascii "usart2_write\000" .LASF818: .ascii "PRIXFAST64 __PRI64FAST(X)\000" .LASF916: @@ -6286,7 +6423,7 @@ main: .ascii "SCNuFAST32 __SCN32FAST(u)\000" .LASF522: .ascii "long +4\000" -.LASF955: +.LASF970: .ascii "AHB1RSTR\000" .LASF723: .ascii "SCNx16 __SCN16(x)\000" @@ -6296,7 +6433,7 @@ main: .ascii "__SCN64LEAST(x) __LEAST64 __STRINGIFY(x)\000" .LASF340: .ascii "__USQ_FBIT__ 32\000" -.LASF1008: +.LASF1026: .ascii "/home/alex/code/own/stm32-falling-sand\000" .LASF796: .ascii "PRIX64 __PRI64(X)\000" @@ -6334,6 +6471,8 @@ main: .ascii "__DBL_MIN_10_EXP__ (-307)\000" .LASF795: .ascii "PRIx64 __PRI64(x)\000" +.LASF946: + .ascii "USART_CR1_TE_BIT 3\000" .LASF512: .ascii "__int20\000" .LASF619: diff --git a/build/main.i b/build/main.i index 69baaab..52527ad 100644 --- a/build/main.i +++ b/build/main.i @@ -2252,6 +2252,56 @@ struct timer { void tim4_init(void); void tim4_start(void); # 9 "src/main.c" 2 +# 1 "src/usart.h" 1 + +#define USART_H_ + + + +struct usart { + volatile uint32_t SR; + volatile uint32_t DR; + volatile uint32_t BRR; + volatile uint32_t CR1; + volatile uint32_t CR2; + volatile uint32_t CR3; + volatile uint32_t GTPR; +}; + +#define USART2_BASE_ADDR (0x40004400U) +#define USART2 ((struct usart *) USART2_BASE_ADDR) + + + +#define USART_SR_TC_BIT 6 +#define USART_SR_TC_COMPLETED (1 << USART_SR_TC_BIT) + + + +#define USART_CR1_UE_BIT 13 +#define USART_CR1_UE_ENABLE (1 << USART_CR1_UE_BIT) + + +#define USART_CR1_TE_BIT 3 +#define USART_CR1_TE_ENABLE (1 << USART_CR1_TE_BIT) + + +#define USART_CR1_RE_BIT 2 +#define USART_CR1_RE_ENABLE (1 << USART_CR1_RE_BIT) + + +#define USART_BRR_MANTISSA_BIT 4 +#define USART_BRR_MANTISSA_MASK (0b111111111111) + +#define USART_BRR_FRACTION_BIT 0 +#define USART_BRR_FRACTION_MASK (0b111) + +void usart2_init(void); +void usart2_start(void); + +void usart2_write_byte(uint8_t byte); +void usart2_write(char *buf); +# 10 "src/main.c" 2 #define exit 42 @@ -2321,8 +2371,10 @@ static void system_clock_init(void) { int main(void) { (void) system_clock_init(); (void) tim4_init(); + (void) usart2_init(); (void) tim4_start(); + (void) usart2_start(); uint16_t led = (((('C') - 'A') << 8) | 13); ((struct rcc *) (0x40023800U))->AHB1ENR |= (1 << (led >> 8)); @@ -2330,19 +2382,21 @@ int main(void) { uint16_t counter = ((struct timer *) (0x40000800U))->CNT; -# 86 "src/main.c" 3 4 +# 89 "src/main.c" 3 4 _Bool -# 86 "src/main.c" +# 89 "src/main.c" led_on = -# 86 "src/main.c" 3 4 +# 89 "src/main.c" 3 4 ((_Bool)+0u) -# 86 "src/main.c" +# 89 "src/main.c" ; while(1) { if ((((struct timer *) (0x40000800U))->CNT - counter) >= 250) { led_on = !led_on; gpio_write(led, led_on); + usart2_write("hello, world!\n"); + counter = ((struct timer *) (0x40000800U))->CNT; } }; diff --git a/build/main.o b/build/main.o index 2ea000b..06cdb22 100644 Binary files a/build/main.o and b/build/main.o differ diff --git a/src/main.c b/src/main.c index 8c0edc1..634d4d0 100644 --- a/src/main.c +++ b/src/main.c @@ -6,6 +6,7 @@ #include "flash.h" #include "pwr.h" #include "timer.h" +#include "usart.h" #define exit 42 @@ -75,8 +76,10 @@ static void system_clock_init(void) { int main(void) { (void) system_clock_init(); (void) tim4_init(); + (void) usart2_init(); (void) tim4_start(); + (void) usart2_start(); uint16_t led = PIN('C', 13); // Blue LED RCC->AHB1ENR |= (1 << PINPORT(led)); // Enable GPIO clock for LED @@ -89,6 +92,8 @@ int main(void) { led_on = !led_on; gpio_write(led, led_on); + usart2_write("hello, world!\n"); + counter = TIM4->CNT; } };