Add USART support #1

Merged
alex merged 17 commits from uart into main 2025-01-01 12:52:15 +01:00
16 changed files with 77 additions and 77 deletions
Showing only changes of commit 8f3285072b - Show all commits
BIN
View File
Binary file not shown.
+18 -18
View File
@@ -327,15 +327,15 @@ LOAD linker stubs
.debug_line 0x000002f0 0xea build/startup.o .debug_line 0x000002f0 0xea build/startup.o
.debug_line 0x000003da 0xdf build/timer.o .debug_line 0x000003da 0xdf build/timer.o
.debug_str 0x00000000 0x5eb8 .debug_str 0x00000000 0x5eb4
.debug_str 0x00000000 0x5372 build/gpio.o .debug_str 0x00000000 0x536f build/gpio.o
0x551a (size before relaxing) 0x5517 (size before relaxing)
.debug_str 0x00005372 0xab2 build/main.o .debug_str 0x0000536f 0xab1 build/main.o
0x5f7c (size before relaxing) 0x5f78 (size before relaxing)
.debug_str 0x00005e24 0x88 build/startup.o .debug_str 0x00005e20 0x88 build/startup.o
0x3cdf (size before relaxing) 0x3cdc (size before relaxing)
.debug_str 0x00005eac 0xc build/timer.o .debug_str 0x00005ea8 0xc build/timer.o
0x5b1a (size before relaxing) 0x5b16 (size before relaxing)
.comment 0x00000000 0x45 .comment 0x00000000 0x45
.comment 0x00000000 0x45 build/gpio.o .comment 0x00000000 0x45 build/gpio.o
@@ -356,19 +356,19 @@ LOAD linker stubs
0x0000009c 0x34 build/timer.o 0x0000009c 0x34 build/timer.o
.debug_line_str .debug_line_str
0x00000000 0x283 0x00000000 0x280
.debug_line_str .debug_line_str
0x00000000 0x24e build/gpio.o 0x00000000 0x24b build/gpio.o
0x260 (size before relaxing) 0x25d (size before relaxing)
.debug_line_str .debug_line_str
0x0000024e 0x23 build/main.o 0x0000024b 0x23 build/main.o
0x27c (size before relaxing) 0x279 (size before relaxing)
.debug_line_str .debug_line_str
0x00000271 0xa build/startup.o 0x0000026e 0xa build/startup.o
0x21b (size before relaxing) 0x218 (size before relaxing)
.debug_line_str .debug_line_str
0x0000027b 0x8 build/timer.o 0x00000278 0x8 build/timer.o
0x25e (size before relaxing) 0x25b (size before relaxing)
.debug_frame 0x00000000 0x16c .debug_frame 0x00000000 0x16c
.debug_frame 0x00000000 0x60 build/gpio.o .debug_frame 0x00000000 0x60 build/gpio.o
+2 -2
View File
@@ -4361,8 +4361,6 @@ gpio_write:
.ascii "__FLT_EVAL_METHOD_TS_18661_3__ 0\000" .ascii "__FLT_EVAL_METHOD_TS_18661_3__ 0\000"
.LASF521: .LASF521:
.ascii "int +2\000" .ascii "int +2\000"
.LASF896:
.ascii "/home/alex/code/own/c-compile-experiments\000"
.LASF636: .LASF636:
.ascii "INT8_C(x) __INT8_C(x)\000" .ascii "INT8_C(x) __INT8_C(x)\000"
.LASF63: .LASF63:
@@ -5327,6 +5325,8 @@ gpio_write:
.ascii "__SCN64LEAST(x) __LEAST64 __STRINGIFY(x)\000" .ascii "__SCN64LEAST(x) __LEAST64 __STRINGIFY(x)\000"
.LASF280: .LASF280:
.ascii "__LLFRACT_EPSILON__ 0x1P-63LLR\000" .ascii "__LLFRACT_EPSILON__ 0x1P-63LLR\000"
.LASF896:
.ascii "/home/alex/code/own/stm32-falling-sand\000"
.LASF249: .LASF249:
.ascii "__SFRACT_MAX__ 0X7FP-7HR\000" .ascii "__SFRACT_MAX__ 0X7FP-7HR\000"
.LASF230: .LASF230:
+1 -1
View File
@@ -1,5 +1,5 @@
# 0 "src/gpio.c" # 0 "src/gpio.c"
# 1 "/home/alex/code/own/c-compile-experiments//" # 1 "/home/alex/code/own/stm32-falling-sand//"
# 0 "<built-in>" # 0 "<built-in>"
#define __STDC__ 1 #define __STDC__ 1
# 0 "<built-in>" # 0 "<built-in>"
BIN
View File
Binary file not shown.
+19 -19
View File
@@ -4299,7 +4299,7 @@ main:
.uleb128 0x14 .uleb128 0x14
.4byte .LASF929 .4byte .LASF929
.byte 0 .byte 0
.section .debug_macro,"G",%progbits,wm4.timer.h.2.a5bec0ee8e2998a7b121820fb4e4e9a6,comdat .section .debug_macro,"G",%progbits,wm4.timer.h.2.2e929ede818fb0960868f1b0a08a1cbf,comdat
.Ldebug_macro19: .Ldebug_macro19:
.2byte 0x5 .2byte 0x5
.byte 0 .byte 0
@@ -4322,8 +4322,6 @@ main:
.section .debug_line,"",%progbits .section .debug_line,"",%progbits
.Ldebug_line0: .Ldebug_line0:
.section .debug_str,"MS",%progbits,1 .section .debug_str,"MS",%progbits,1
.LASF933:
.ascii "TIM4_CR_CEN_BIT 0\000"
.LASF734: .LASF734:
.ascii "SCNxLEAST16 __SCN16LEAST(x)\000" .ascii "SCNxLEAST16 __SCN16LEAST(x)\000"
.LASF635: .LASF635:
@@ -4479,8 +4477,6 @@ main:
.ascii "PRIx8 __PRI8(x)\000" .ascii "PRIx8 __PRI8(x)\000"
.LASF589: .LASF589:
.ascii "INT8_MAX (__INT8_MAX__)\000" .ascii "INT8_MAX (__INT8_MAX__)\000"
.LASF515:
.ascii "signed +0\000"
.LASF630: .LASF630:
.ascii "PTRDIFF_MAX (__PTRDIFF_MAX__)\000" .ascii "PTRDIFF_MAX (__PTRDIFF_MAX__)\000"
.LASF838: .LASF838:
@@ -4840,6 +4836,8 @@ main:
.ascii "RCC_CFGR_SW_PLL (0b10)\000" .ascii "RCC_CFGR_SW_PLL (0b10)\000"
.LASF844: .LASF844:
.ascii "PRIXPTR __PRIPTR(X)\000" .ascii "PRIXPTR __PRIPTR(X)\000"
.LASF933:
.ascii "TIM_CR1_CEN_BIT 0\000"
.LASF797: .LASF797:
.ascii "SCNd64 __SCN64(d)\000" .ascii "SCNd64 __SCN64(d)\000"
.LASF827: .LASF827:
@@ -4918,8 +4916,8 @@ main:
.ascii "__FDPIC__\000" .ascii "__FDPIC__\000"
.LASF263: .LASF263:
.ascii "__UFRACT_MIN__ 0.0UR\000" .ascii "__UFRACT_MIN__ 0.0UR\000"
.LASF688: .LASF515:
.ascii "PRIuLEAST8 __PRI8LEAST(u)\000" .ascii "signed +0\000"
.LASF213: .LASF213:
.ascii "__FLT32_IS_IEC_60559__ 2\000" .ascii "__FLT32_IS_IEC_60559__ 2\000"
.LASF629: .LASF629:
@@ -4946,8 +4944,8 @@ main:
.ascii "SCNuLEAST8 __SCN8LEAST(u)\000" .ascii "SCNuLEAST8 __SCN8LEAST(u)\000"
.LASF102: .LASF102:
.ascii "__UINT8_MAX__ 0xff\000" .ascii "__UINT8_MAX__ 0xff\000"
.LASF574: .LASF552:
.ascii "_UINTMAX_T_DECLARED \000" .ascii "___int16_t_defined 1\000"
.LASF983: .LASF983:
.ascii "timer\000" .ascii "timer\000"
.LASF184: .LASF184:
@@ -5040,6 +5038,8 @@ main:
.ascii "__MISC_VISIBLE 0\000" .ascii "__MISC_VISIBLE 0\000"
.LASF452: .LASF452:
.ascii "__ELF__ 1\000" .ascii "__ELF__ 1\000"
.LASF688:
.ascii "PRIuLEAST8 __PRI8LEAST(u)\000"
.LASF969: .LASF969:
.ascii "BDCR\000" .ascii "BDCR\000"
.LASF853: .LASF853:
@@ -5136,8 +5136,8 @@ main:
.ascii "__ARM_FEATURE_COMPLEX\000" .ascii "__ARM_FEATURE_COMPLEX\000"
.LASF831: .LASF831:
.ascii "PRIXMAX __PRIMAX(X)\000" .ascii "PRIXMAX __PRIMAX(X)\000"
.LASF857: .LASF679:
.ascii "RCC ((struct rcc *) RCC_BASE_ADDR)\000" .ascii "PRIX8 __PRI8(X)\000"
.LASF523: .LASF523:
.ascii "_INTPTR_EQ_INT \000" .ascii "_INTPTR_EQ_INT \000"
.LASF408: .LASF408:
@@ -5202,8 +5202,6 @@ main:
.ascii "__FLT_EVAL_METHOD_TS_18661_3__ 0\000" .ascii "__FLT_EVAL_METHOD_TS_18661_3__ 0\000"
.LASF521: .LASF521:
.ascii "int +2\000" .ascii "int +2\000"
.LASF1004:
.ascii "/home/alex/code/own/c-compile-experiments\000"
.LASF636: .LASF636:
.ascii "INT8_C(x) __INT8_C(x)\000" .ascii "INT8_C(x) __INT8_C(x)\000"
.LASF935: .LASF935:
@@ -5454,6 +5452,8 @@ main:
.ascii "__LLFRACT_EPSILON__ 0x1P-63LLR\000" .ascii "__LLFRACT_EPSILON__ 0x1P-63LLR\000"
.LASF967: .LASF967:
.ascii "APB2LPENR\000" .ascii "APB2LPENR\000"
.LASF934:
.ascii "TIM_ENABLE (1 << TIM_CR1_CEN_BIT)\000"
.LASF820: .LASF820:
.ascii "SCNiFAST64 __SCN64FAST(i)\000" .ascii "SCNiFAST64 __SCN64FAST(i)\000"
.LASF537: .LASF537:
@@ -5775,8 +5775,8 @@ main:
.ascii "__UHQ_IBIT__ 0\000" .ascii "__UHQ_IBIT__ 0\000"
.LASF60: .LASF60:
.ascii "__INT_FAST16_TYPE__ int\000" .ascii "__INT_FAST16_TYPE__ int\000"
.LASF679: .LASF574:
.ascii "PRIX8 __PRI8(X)\000" .ascii "_UINTMAX_T_DECLARED \000"
.LASF61: .LASF61:
.ascii "__INT_FAST32_TYPE__ int\000" .ascii "__INT_FAST32_TYPE__ int\000"
.LASF288: .LASF288:
@@ -5870,8 +5870,6 @@ main:
.ascii "__INT_WCHAR_T_H \000" .ascii "__INT_WCHAR_T_H \000"
.LASF237: .LASF237:
.ascii "__FLT32X_MAX__ 1.7976931348623157e+308F32x\000" .ascii "__FLT32X_MAX__ 1.7976931348623157e+308F32x\000"
.LASF552:
.ascii "___int16_t_defined 1\000"
.LASF438: .LASF438:
.ascii "__ARM_EABI__ 1\000" .ascii "__ARM_EABI__ 1\000"
.LASF465: .LASF465:
@@ -6002,8 +6000,6 @@ main:
.ascii "SCNuMAX __SCNMAX(u)\000" .ascii "SCNuMAX __SCNMAX(u)\000"
.LASF121: .LASF121:
.ascii "__UINT16_C(c) c\000" .ascii "__UINT16_C(c) c\000"
.LASF934:
.ascii "TIM4_ENABLE (1 << TIM4_CR_CEN_BIT)\000"
.LASF359: .LASF359:
.ascii "__UDA_IBIT__ 32\000" .ascii "__UDA_IBIT__ 32\000"
.LASF534: .LASF534:
@@ -6285,6 +6281,8 @@ main:
.ascii "__SCN64LEAST(x) __LEAST64 __STRINGIFY(x)\000" .ascii "__SCN64LEAST(x) __LEAST64 __STRINGIFY(x)\000"
.LASF340: .LASF340:
.ascii "__USQ_FBIT__ 32\000" .ascii "__USQ_FBIT__ 32\000"
.LASF1004:
.ascii "/home/alex/code/own/stm32-falling-sand\000"
.LASF796: .LASF796:
.ascii "PRIX64 __PRI64(X)\000" .ascii "PRIX64 __PRI64(X)\000"
.LASF249: .LASF249:
@@ -6337,6 +6335,8 @@ main:
.ascii "__DBL_MANT_DIG__ 53\000" .ascii "__DBL_MANT_DIG__ 53\000"
.LASF272: .LASF272:
.ascii "__ULFRACT_IBIT__ 0\000" .ascii "__ULFRACT_IBIT__ 0\000"
.LASF857:
.ascii "RCC ((struct rcc *) RCC_BASE_ADDR)\000"
.LASF892: .LASF892:
.ascii "RCC_CFGR_HPRE_MASK (0b1111)\000" .ascii "RCC_CFGR_HPRE_MASK (0b1111)\000"
.LASF72: .LASF72:
+3 -3
View File
@@ -1,5 +1,5 @@
# 0 "src/main.c" # 0 "src/main.c"
# 1 "/home/alex/code/own/c-compile-experiments//" # 1 "/home/alex/code/own/stm32-falling-sand//"
# 0 "<built-in>" # 0 "<built-in>"
#define __STDC__ 1 #define __STDC__ 1
# 0 "<built-in>" # 0 "<built-in>"
@@ -2237,8 +2237,8 @@ struct timer {
#define TIM4_BASE_ADDR (0x40000800U) #define TIM4_BASE_ADDR (0x40000800U)
#define TIM4 ((struct timer *) TIM4_BASE_ADDR) #define TIM4 ((struct timer *) TIM4_BASE_ADDR)
#define TIM4_CR_CEN_BIT 0 #define TIM_CR1_CEN_BIT 0
#define TIM4_ENABLE (1 << TIM4_CR_CEN_BIT) #define TIM_ENABLE (1 << TIM_CR1_CEN_BIT)
void tim4_init(void); void tim4_init(void);
void tim4_start(void); void tim4_start(void);
BIN
View File
Binary file not shown.
+16 -16
View File
@@ -2923,6 +2923,8 @@ interrupt_vector_table:
.ascii "INOR__ >= ((maj) << 16) + (min))\000" .ascii "INOR__ >= ((maj) << 16) + (min))\000"
.LASF171: .LASF171:
.ascii "__DBL_MAX__ ((double)1.7976931348623157e+308L)\000" .ascii "__DBL_MAX__ ((double)1.7976931348623157e+308L)\000"
.LASF602:
.ascii "UINTMAX_C(x) __UINTMAX_C(x)\000"
.LASF253: .LASF253:
.ascii "__USFRACT_MIN__ 0.0UHR\000" .ascii "__USFRACT_MIN__ 0.0UHR\000"
.LASF578: .LASF578:
@@ -3020,8 +3022,8 @@ interrupt_vector_table:
.ascii "__BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__\000" .ascii "__BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__\000"
.LASF200: .LASF200:
.ascii "__FLT32_MIN_10_EXP__ (-37)\000" .ascii "__FLT32_MIN_10_EXP__ (-37)\000"
.LASF176: .LASF492:
.ascii "__DBL_HAS_DENORM__ 1\000" .ascii "__int20\000"
.LASF267: .LASF267:
.ascii "__LFRACT_IBIT__ 0\000" .ascii "__LFRACT_IBIT__ 0\000"
.LASF497: .LASF497:
@@ -3106,8 +3108,8 @@ interrupt_vector_table:
.ascii "__ARM_NEON\000" .ascii "__ARM_NEON\000"
.LASF401: .LASF401:
.ascii "__ARM_FEATURE_CMSE\000" .ascii "__ARM_FEATURE_CMSE\000"
.LASF625: .LASF68:
.ascii "/home/alex/code/own/c-compile-experiments\000" .ascii "__UINTPTR_TYPE__ unsigned int\000"
.LASF229: .LASF229:
.ascii "__FLT64_IS_IEC_60559__ 2\000" .ascii "__FLT64_IS_IEC_60559__ 2\000"
.LASF209: .LASF209:
@@ -3473,8 +3475,6 @@ interrupt_vector_table:
.ascii "UINT16_C(x) __UINT16_C(x)\000" .ascii "UINT16_C(x) __UINT16_C(x)\000"
.LASF344: .LASF344:
.ascii "__UTQ_FBIT__ 128\000" .ascii "__UTQ_FBIT__ 128\000"
.LASF499:
.ascii "__int20 +2\000"
.LASF610: .LASF610:
.ascii "long long int\000" .ascii "long long int\000"
.LASF24: .LASF24:
@@ -3539,8 +3539,8 @@ interrupt_vector_table:
.ascii "__STDC__ 1\000" .ascii "__STDC__ 1\000"
.LASF17: .LASF17:
.ascii "__SIZEOF_LONG__ 4\000" .ascii "__SIZEOF_LONG__ 4\000"
.LASF492: .LASF499:
.ascii "__int20\000" .ascii "__int20 +2\000"
.LASF168: .LASF168:
.ascii "__DBL_MAX_EXP__ 1024\000" .ascii "__DBL_MAX_EXP__ 1024\000"
.LASF585: .LASF585:
@@ -3567,6 +3567,8 @@ interrupt_vector_table:
.ascii "__SCHAR_WIDTH__ 8\000" .ascii "__SCHAR_WIDTH__ 8\000"
.LASF298: .LASF298:
.ascii "__ACCUM_MIN__ (-0X1P15K-0X1P15K)\000" .ascii "__ACCUM_MIN__ (-0X1P15K-0X1P15K)\000"
.LASF40:
.ascii "__CHAR16_TYPE__ short unsigned int\000"
.LASF21: .LASF21:
.ascii "__SIZEOF_DOUBLE__ 8\000" .ascii "__SIZEOF_DOUBLE__ 8\000"
.LASF7: .LASF7:
@@ -3801,8 +3803,8 @@ interrupt_vector_table:
.ascii "SIZE_MAX (__SIZE_MAX__)\000" .ascii "SIZE_MAX (__SIZE_MAX__)\000"
.LASF54: .LASF54:
.ascii "__INT_LEAST64_TYPE__ long long int\000" .ascii "__INT_LEAST64_TYPE__ long long int\000"
.LASF602: .LASF128:
.ascii "UINTMAX_C(x) __UINTMAX_C(x)\000" .ascii "__INT_FAST16_MAX__ 0x7fffffff\000"
.LASF49: .LASF49:
.ascii "__UINT32_TYPE__ long unsigned int\000" .ascii "__UINT32_TYPE__ long unsigned int\000"
.LASF183: .LASF183:
@@ -3879,8 +3881,8 @@ interrupt_vector_table:
.ascii "INT64_MAX (__INT64_MAX__)\000" .ascii "INT64_MAX (__INT64_MAX__)\000"
.LASF518: .LASF518:
.ascii "_INT8_T_DECLARED \000" .ascii "_INT8_T_DECLARED \000"
.LASF40: .LASF625:
.ascii "__CHAR16_TYPE__ short unsigned int\000" .ascii "/home/alex/code/own/stm32-falling-sand\000"
.LASF370: .LASF370:
.ascii "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1\000" .ascii "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1\000"
.LASF151: .LASF151:
@@ -4044,8 +4046,8 @@ interrupt_vector_table:
.ascii "__FLT32X_MAX_10_EXP__ 308\000" .ascii "__FLT32X_MAX_10_EXP__ 308\000"
.LASF140: .LASF140:
.ascii "__UINTPTR_MAX__ 0xffffffffU\000" .ascii "__UINTPTR_MAX__ 0xffffffffU\000"
.LASF128: .LASF176:
.ascii "__INT_FAST16_MAX__ 0x7fffffff\000" .ascii "__DBL_HAS_DENORM__ 1\000"
.LASF32: .LASF32:
.ascii "__GNUC_EXECUTION_CHARSET_NAME \"UTF-8\"\000" .ascii "__GNUC_EXECUTION_CHARSET_NAME \"UTF-8\"\000"
.LASF475: .LASF475:
@@ -4072,8 +4074,6 @@ interrupt_vector_table:
.ascii "long +4\000" .ascii "long +4\000"
.LASF534: .LASF534:
.ascii "__int_least8_t_defined 1\000" .ascii "__int_least8_t_defined 1\000"
.LASF68:
.ascii "__UINTPTR_TYPE__ unsigned int\000"
.LASF92: .LASF92:
.ascii "__UINTMAX_MAX__ 0xffffffffffffffffULL\000" .ascii "__UINTMAX_MAX__ 0xffffffffffffffffULL\000"
.LASF42: .LASF42:
+1 -1
View File
@@ -1,5 +1,5 @@
# 0 "src/startup.c" # 0 "src/startup.c"
# 1 "/home/alex/code/own/c-compile-experiments//" # 1 "/home/alex/code/own/stm32-falling-sand//"
# 0 "<built-in>" # 0 "<built-in>"
#define __STDC__ 1 #define __STDC__ 1
# 0 "<built-in>" # 0 "<built-in>"
BIN
View File
Binary file not shown.
+11 -11
View File
@@ -3650,7 +3650,7 @@ tim4_start:
.uleb128 0x7a .uleb128 0x7a
.4byte .LASF898 .4byte .LASF898
.byte 0 .byte 0
.section .debug_macro,"G",%progbits,wm4.timer.h.2.a5bec0ee8e2998a7b121820fb4e4e9a6,comdat .section .debug_macro,"G",%progbits,wm4.timer.h.2.2e929ede818fb0960868f1b0a08a1cbf,comdat
.Ldebug_macro15: .Ldebug_macro15:
.2byte 0x5 .2byte 0x5
.byte 0 .byte 0
@@ -3673,8 +3673,6 @@ tim4_start:
.section .debug_line,"",%progbits .section .debug_line,"",%progbits
.Ldebug_line0: .Ldebug_line0:
.section .debug_str,"MS",%progbits,1 .section .debug_str,"MS",%progbits,1
.LASF902:
.ascii "TIM4_CR_CEN_BIT 0\000"
.LASF735: .LASF735:
.ascii "SCNxLEAST16 __SCN16LEAST(x)\000" .ascii "SCNxLEAST16 __SCN16LEAST(x)\000"
.LASF636: .LASF636:
@@ -3822,8 +3820,6 @@ tim4_start:
.ascii "PRIx8 __PRI8(x)\000" .ascii "PRIx8 __PRI8(x)\000"
.LASF590: .LASF590:
.ascii "INT8_MAX (__INT8_MAX__)\000" .ascii "INT8_MAX (__INT8_MAX__)\000"
.LASF516:
.ascii "signed +0\000"
.LASF631: .LASF631:
.ascii "PTRDIFF_MAX (__PTRDIFF_MAX__)\000" .ascii "PTRDIFF_MAX (__PTRDIFF_MAX__)\000"
.LASF839: .LASF839:
@@ -4168,6 +4164,8 @@ tim4_start:
.ascii "SCNoLEAST32 __SCN32LEAST(o)\000" .ascii "SCNoLEAST32 __SCN32LEAST(o)\000"
.LASF891: .LASF891:
.ascii "RCC_CFGR_SW_PLL (0b10)\000" .ascii "RCC_CFGR_SW_PLL (0b10)\000"
.LASF902:
.ascii "TIM_CR1_CEN_BIT 0\000"
.LASF798: .LASF798:
.ascii "SCNd64 __SCN64(d)\000" .ascii "SCNd64 __SCN64(d)\000"
.LASF828: .LASF828:
@@ -4242,8 +4240,8 @@ tim4_start:
.ascii "__FDPIC__\000" .ascii "__FDPIC__\000"
.LASF263: .LASF263:
.ascii "__UFRACT_MIN__ 0.0UR\000" .ascii "__UFRACT_MIN__ 0.0UR\000"
.LASF689: .LASF516:
.ascii "PRIuLEAST8 __PRI8LEAST(u)\000" .ascii "signed +0\000"
.LASF213: .LASF213:
.ascii "__FLT32_IS_IEC_60559__ 2\000" .ascii "__FLT32_IS_IEC_60559__ 2\000"
.LASF630: .LASF630:
@@ -4352,6 +4350,8 @@ tim4_start:
.ascii "__MISC_VISIBLE 0\000" .ascii "__MISC_VISIBLE 0\000"
.LASF306: .LASF306:
.ascii "__LACCUM_FBIT__ 31\000" .ascii "__LACCUM_FBIT__ 31\000"
.LASF689:
.ascii "PRIuLEAST8 __PRI8LEAST(u)\000"
.LASF937: .LASF937:
.ascii "BDCR\000" .ascii "BDCR\000"
.LASF211: .LASF211:
@@ -4510,8 +4510,6 @@ tim4_start:
.ascii "__FLT_EVAL_METHOD_TS_18661_3__ 0\000" .ascii "__FLT_EVAL_METHOD_TS_18661_3__ 0\000"
.LASF522: .LASF522:
.ascii "int +2\000" .ascii "int +2\000"
.LASF958:
.ascii "/home/alex/code/own/c-compile-experiments\000"
.LASF637: .LASF637:
.ascii "INT8_C(x) __INT8_C(x)\000" .ascii "INT8_C(x) __INT8_C(x)\000"
.LASF63: .LASF63:
@@ -4752,6 +4750,8 @@ tim4_start:
.ascii "__LLFRACT_EPSILON__ 0x1P-63LLR\000" .ascii "__LLFRACT_EPSILON__ 0x1P-63LLR\000"
.LASF935: .LASF935:
.ascii "APB2LPENR\000" .ascii "APB2LPENR\000"
.LASF903:
.ascii "TIM_ENABLE (1 << TIM_CR1_CEN_BIT)\000"
.LASF821: .LASF821:
.ascii "SCNiFAST64 __SCN64FAST(i)\000" .ascii "SCNiFAST64 __SCN64FAST(i)\000"
.LASF538: .LASF538:
@@ -5275,8 +5275,6 @@ tim4_start:
.ascii "SCNuMAX __SCNMAX(u)\000" .ascii "SCNuMAX __SCNMAX(u)\000"
.LASF121: .LASF121:
.ascii "__UINT16_C(c) c\000" .ascii "__UINT16_C(c) c\000"
.LASF903:
.ascii "TIM4_ENABLE (1 << TIM4_CR_CEN_BIT)\000"
.LASF359: .LASF359:
.ascii "__UDA_IBIT__ 32\000" .ascii "__UDA_IBIT__ 32\000"
.LASF535: .LASF535:
@@ -5541,6 +5539,8 @@ tim4_start:
.ascii "__SCN64LEAST(x) __LEAST64 __STRINGIFY(x)\000" .ascii "__SCN64LEAST(x) __LEAST64 __STRINGIFY(x)\000"
.LASF340: .LASF340:
.ascii "__USQ_FBIT__ 32\000" .ascii "__USQ_FBIT__ 32\000"
.LASF958:
.ascii "/home/alex/code/own/stm32-falling-sand\000"
.LASF797: .LASF797:
.ascii "PRIX64 __PRI64(X)\000" .ascii "PRIX64 __PRI64(X)\000"
.LASF249: .LASF249:
+3 -3
View File
@@ -1,5 +1,5 @@
# 0 "src/timer.c" # 0 "src/timer.c"
# 1 "/home/alex/code/own/c-compile-experiments//" # 1 "/home/alex/code/own/stm32-falling-sand//"
# 0 "<built-in>" # 0 "<built-in>"
#define __STDC__ 1 #define __STDC__ 1
# 0 "<built-in>" # 0 "<built-in>"
@@ -2120,8 +2120,8 @@ struct timer {
#define TIM4_BASE_ADDR (0x40000800U) #define TIM4_BASE_ADDR (0x40000800U)
#define TIM4 ((struct timer *) TIM4_BASE_ADDR) #define TIM4 ((struct timer *) TIM4_BASE_ADDR)
#define TIM4_CR_CEN_BIT 0 #define TIM_CR1_CEN_BIT 0
#define TIM4_ENABLE (1 << TIM4_CR_CEN_BIT) #define TIM_ENABLE (1 << TIM_CR1_CEN_BIT)
void tim4_init(void); void tim4_init(void);
void tim4_start(void); void tim4_start(void);
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -18,5 +18,5 @@ void tim4_init(void) {
} }
void tim4_start(void) { void tim4_start(void) {
TIM4->CR1 |= TIM4_ENABLE; TIM4->CR1 |= TIM_ENABLE;
} }
+2 -2
View File
@@ -29,8 +29,8 @@ struct timer {
#define TIM4_BASE_ADDR (0x40000800U) #define TIM4_BASE_ADDR (0x40000800U)
#define TIM4 ((struct timer *) TIM4_BASE_ADDR) #define TIM4 ((struct timer *) TIM4_BASE_ADDR)
#define TIM4_CR_CEN_BIT 0 #define TIM_CR1_CEN_BIT 0
#define TIM4_ENABLE (1 << TIM4_CR_CEN_BIT) #define TIM_ENABLE (1 << TIM_CR1_CEN_BIT)
void tim4_init(void); void tim4_init(void);
void tim4_start(void); void tim4_start(void);