From d9c604f623afe5c602ab7fafa4925ac78f0fb5a8 Mon Sep 17 00:00:00 2001 From: kevin Date: Sat, 18 Sep 2021 00:02:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=95=B0=E7=A0=81?= =?UTF-8?q?=E7=AE=A1=E7=9A=84=E5=AD=97=E6=A8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Debug/Motor_Controller.bin | Bin 6704 -> 6716 bytes Debug/Motor_Controller.list | 189 ++++++++++++++++++------------------ Debug/Motor_Controller.map | 164 ++++++++++++++++--------------- Debug/My_Soul/my_main.su | 4 +- My_Soul/my_main.c | 27 +++++- 5 files changed, 209 insertions(+), 175 deletions(-) diff --git a/Debug/Motor_Controller.bin b/Debug/Motor_Controller.bin index a678d7530f7e86875ec096be5fe49280b562fc19..0721bcf5e846d63518ae0e0e06c78f85a9c8fee2 100755 GIT binary patch delta 176 zcmdmBvd3h?6UGM5(VgMhLW1A`*thnA683Y&<7#J87c!1bIih%<}mu!B>+Ahc_F*#FwKidyU z1`ZCX$$Aq1ctyM!lo%By82*13`z<)xQqoi^Uy(uK|M$fI%-)PjQU(8>A8=z3VerTS VnlZUX(t=k5Xdn#hOg<=?4*+lvHevt( delta 164 zcmdmEvcY7+6UHkOpUN{{+04r5$;iL!w>5(VgMhLW1A`*ths~2?nIA683Y&<7#J87cz{?%ih%<}=WKq++Ahe*GdWXyKieBg z297_Hll3J2@d|k}C^0HZF#P{6_M3mQrKBkzgCc{%|L=+af#!%Xcuek)wBVHi8Un)# Jlg~=#0|4wHGsyq| diff --git a/Debug/Motor_Controller.list b/Debug/Motor_Controller.list index b516be3..e778fc8 100644 --- a/Debug/Motor_Controller.list +++ b/Debug/Motor_Controller.list @@ -5,45 +5,45 @@ Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 000000c0 08000000 08000000 00010000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA - 1 .text 0000192c 080000c0 080000c0 000100c0 2**2 + 1 .text 00001938 080000c0 080000c0 000100c0 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE - 2 .rodata 00000030 080019ec 080019ec 000119ec 2**2 + 2 .rodata 00000030 080019f8 080019f8 000119f8 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA - 3 .ARM.extab 00000000 08001a1c 08001a1c 0002000c 2**0 + 3 .ARM.extab 00000000 08001a28 08001a28 0002000c 2**0 CONTENTS - 4 .ARM 00000000 08001a1c 08001a1c 0002000c 2**0 + 4 .ARM 00000000 08001a28 08001a28 0002000c 2**0 CONTENTS - 5 .preinit_array 00000000 08001a1c 08001a1c 0002000c 2**0 + 5 .preinit_array 00000000 08001a28 08001a28 0002000c 2**0 CONTENTS, ALLOC, LOAD, DATA - 6 .init_array 00000004 08001a1c 08001a1c 00011a1c 2**2 + 6 .init_array 00000004 08001a28 08001a28 00011a28 2**2 CONTENTS, ALLOC, LOAD, DATA - 7 .fini_array 00000004 08001a20 08001a20 00011a20 2**2 + 7 .fini_array 00000004 08001a2c 08001a2c 00011a2c 2**2 CONTENTS, ALLOC, LOAD, DATA - 8 .data 0000000c 20000000 08001a24 00020000 2**2 + 8 .data 0000000c 20000000 08001a30 00020000 2**2 CONTENTS, ALLOC, LOAD, DATA - 9 .bss 00000060 2000000c 08001a30 0002000c 2**2 + 9 .bss 00000068 2000000c 08001a3c 0002000c 2**2 ALLOC - 10 ._user_heap_stack 00000604 2000006c 08001a30 0002006c 2**0 + 10 ._user_heap_stack 00000604 20000074 08001a3c 00020074 2**0 ALLOC 11 .ARM.attributes 00000028 00000000 00000000 0002000c 2**0 CONTENTS, READONLY - 12 .debug_info 00004534 00000000 00000000 00020034 2**0 + 12 .debug_info 0000461b 00000000 00000000 00020034 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS - 13 .debug_abbrev 000011f1 00000000 00000000 00024568 2**0 + 13 .debug_abbrev 00001219 00000000 00000000 0002464f 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS - 14 .debug_aranges 00000488 00000000 00000000 00025760 2**3 + 14 .debug_aranges 00000488 00000000 00000000 00025868 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS - 15 .debug_ranges 000003e0 00000000 00000000 00025be8 2**3 + 15 .debug_ranges 000003e0 00000000 00000000 00025cf0 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS - 16 .debug_macro 0000e747 00000000 00000000 00025fc8 2**0 + 16 .debug_macro 0000e747 00000000 00000000 000260d0 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS - 17 .debug_line 000062da 00000000 00000000 0003470f 2**0 + 17 .debug_line 000062de 00000000 00000000 00034817 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS - 18 .debug_str 000564d2 00000000 00000000 0003a9e9 2**0 + 18 .debug_str 0005651c 00000000 00000000 0003aaf5 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS - 19 .comment 00000053 00000000 00000000 00090ebb 2**0 + 19 .comment 00000053 00000000 00000000 00091011 2**0 CONTENTS, READONLY - 20 .debug_frame 00000e44 00000000 00000000 00090f10 2**2 + 20 .debug_frame 00000e44 00000000 00000000 00091064 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS Disassembly of section .text: @@ -65,7 +65,7 @@ Disassembly of section .text: 80000da: bd10 pop {r4, pc} 80000dc: 2000000c .word 0x2000000c 80000e0: 00000000 .word 0x00000000 - 80000e4: 080019d4 .word 0x080019d4 + 80000e4: 080019e0 .word 0x080019e0 080000e8 : 80000e8: 4b04 ldr r3, [pc, #16] ; (80000fc ) @@ -80,7 +80,7 @@ Disassembly of section .text: 80000fa: 46c0 nop ; (mov r8, r8) 80000fc: 00000000 .word 0x00000000 8000100: 20000010 .word 0x20000010 - 8000104: 080019d4 .word 0x080019d4 + 8000104: 080019e0 .word 0x080019e0 08000108 <__udivsi3>: 8000108: 2200 movs r2, #0 @@ -286,14 +286,14 @@ void SystemClock_Config(void) 8000246: 2330 movs r3, #48 ; 0x30 8000248: 001a movs r2, r3 800024a: 2100 movs r1, #0 - 800024c: f001 fbba bl 80019c4 + 800024c: f001 fbc0 bl 80019d0 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 8000250: 003b movs r3, r7 8000252: 0018 movs r0, r3 8000254: 2310 movs r3, #16 8000256: 001a movs r2, r3 8000258: 2100 movs r1, #0 - 800025a: f001 fbb3 bl 80019c4 + 800025a: f001 fbb9 bl 80019d0 /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. @@ -405,7 +405,7 @@ static void MX_ADC_Init(void) 80002e6: 230c movs r3, #12 80002e8: 001a movs r2, r3 80002ea: 2100 movs r1, #0 - 80002ec: f001 fb6a bl 80019c4 + 80002ec: f001 fb70 bl 80019d0 /* USER CODE BEGIN ADC_Init 1 */ /* USER CODE END ADC_Init 1 */ @@ -537,7 +537,7 @@ static void MX_GPIO_Init(void) 80003a0: 2314 movs r3, #20 80003a2: 001a movs r2, r3 80003a4: 2100 movs r1, #0 - 80003a6: f001 fb0d bl 80019c4 + 80003a6: f001 fb13 bl 80019d0 /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOF_CLK_ENABLE(); @@ -767,7 +767,7 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc) 80004de: 2314 movs r3, #20 80004e0: 001a movs r2, r3 80004e2: 2100 movs r1, #0 - 80004e4: f001 fa6e bl 80019c4 + 80004e4: f001 fa74 bl 80019d0 if(hadc->Instance==ADC1) 80004e8: 687b ldr r3, [r7, #4] 80004ea: 681b ldr r3, [r3, #0] @@ -1030,7 +1030,7 @@ LoopFillZerobss: 80005be: f7ff ffe4 bl 800058a /* Call static constructors */ bl __libc_init_array - 80005c2: f001 f9db bl 800197c <__libc_init_array> + 80005c2: f001 f9e1 bl 8001988 <__libc_init_array> /* Call the application's entry point.*/ bl main 80005c6: f7ff fe2b bl 8000220
@@ -1047,11 +1047,11 @@ LoopForever: ldr r1, =_edata 80005d4: 2000000c .word 0x2000000c ldr r2, =_sidata - 80005d8: 08001a24 .word 0x08001a24 + 80005d8: 08001a30 .word 0x08001a30 ldr r2, =_sbss 80005dc: 2000000c .word 0x2000000c ldr r4, =_ebss - 80005e0: 2000006c .word 0x2000006c + 80005e0: 20000074 .word 0x20000074 080005e4 : * @retval : None @@ -4312,7 +4312,7 @@ HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, ui 800175c: 40021000 .word 0x40021000 8001760: 00001388 .word 0x00001388 8001764: fffff8ff .word 0xfffff8ff - 8001768: 08001a0c .word 0x08001a0c + 8001768: 08001a18 .word 0x08001a18 800176c: 20000000 .word 0x20000000 08001770 : @@ -4460,15 +4460,15 @@ uint32_t HAL_RCC_GetSysClockFreq(void) 8001822: b00f add sp, #60 ; 0x3c 8001824: bd90 pop {r4, r7, pc} 8001826: 46c0 nop ; (mov r8, r8) - 8001828: 080019ec .word 0x080019ec - 800182c: 080019fc .word 0x080019fc + 8001828: 080019f8 .word 0x080019f8 + 800182c: 08001a08 .word 0x08001a08 8001830: 40021000 .word 0x40021000 8001834: 007a1200 .word 0x007a1200 08001838 : - -#define MOTA(x) HAL_GPIO_WritePin(MOTA_GPIO_Port, MOTA_Pin, x); -#define MOTB(x) HAL_GPIO_WritePin(MOTB_GPIO_Port, MOTB_Pin, x); + char led_n:1; + char led_err:1; +}dis_buff; void Send_to_595(char h,char l) { @@ -4623,13 +4623,13 @@ void mymain() 8001928: b580 push {r7, lr} 800192a: af00 add r7, sp, #0 MOTA(0); - 800192c: 4b12 ldr r3, [pc, #72] ; (8001978 ) + 800192c: 4b14 ldr r3, [pc, #80] ; (8001980 ) 800192e: 2200 movs r2, #0 8001930: 2101 movs r1, #1 8001932: 0018 movs r0, r3 8001934: f7ff fb16 bl 8000f64 MOTB(0); - 8001938: 4b0f ldr r3, [pc, #60] ; (8001978 ) + 8001938: 4b11 ldr r3, [pc, #68] ; (8001980 ) 800193a: 2200 movs r2, #0 800193c: 2102 movs r1, #2 800193e: 0018 movs r0, r3 @@ -4656,70 +4656,75 @@ void mymain() 8001968: 0018 movs r0, r3 800196a: f7ff fafb bl 8000f64 - Send_to_595(0x00,0x00); - 800196e: 2100 movs r1, #0 + Send_to_595(0x00,0x6f); + 800196e: 216f movs r1, #111 ; 0x6f 8001970: 2000 movs r0, #0 8001972: f7ff ff61 bl 8001838 - + dis_buff.d_num[0]=1; + 8001976: 4b03 ldr r3, [pc, #12] ; (8001984 ) + 8001978: 2201 movs r2, #1 + 800197a: 701a strb r2, [r3, #0] while(1) - 8001976: e7fe b.n 8001976 - 8001978: 48001400 .word 0x48001400 + 800197c: e7fe b.n 800197c + 800197e: 46c0 nop ; (mov r8, r8) + 8001980: 48001400 .word 0x48001400 + 8001984: 2000006c .word 0x2000006c -0800197c <__libc_init_array>: - 800197c: b570 push {r4, r5, r6, lr} - 800197e: 2600 movs r6, #0 - 8001980: 4d0c ldr r5, [pc, #48] ; (80019b4 <__libc_init_array+0x38>) - 8001982: 4c0d ldr r4, [pc, #52] ; (80019b8 <__libc_init_array+0x3c>) - 8001984: 1b64 subs r4, r4, r5 - 8001986: 10a4 asrs r4, r4, #2 - 8001988: 42a6 cmp r6, r4 - 800198a: d109 bne.n 80019a0 <__libc_init_array+0x24> - 800198c: 2600 movs r6, #0 - 800198e: f000 f821 bl 80019d4 <_init> - 8001992: 4d0a ldr r5, [pc, #40] ; (80019bc <__libc_init_array+0x40>) - 8001994: 4c0a ldr r4, [pc, #40] ; (80019c0 <__libc_init_array+0x44>) - 8001996: 1b64 subs r4, r4, r5 - 8001998: 10a4 asrs r4, r4, #2 - 800199a: 42a6 cmp r6, r4 - 800199c: d105 bne.n 80019aa <__libc_init_array+0x2e> - 800199e: bd70 pop {r4, r5, r6, pc} - 80019a0: 00b3 lsls r3, r6, #2 - 80019a2: 58eb ldr r3, [r5, r3] - 80019a4: 4798 blx r3 - 80019a6: 3601 adds r6, #1 - 80019a8: e7ee b.n 8001988 <__libc_init_array+0xc> - 80019aa: 00b3 lsls r3, r6, #2 - 80019ac: 58eb ldr r3, [r5, r3] - 80019ae: 4798 blx r3 - 80019b0: 3601 adds r6, #1 - 80019b2: e7f2 b.n 800199a <__libc_init_array+0x1e> - 80019b4: 08001a1c .word 0x08001a1c - 80019b8: 08001a1c .word 0x08001a1c - 80019bc: 08001a1c .word 0x08001a1c - 80019c0: 08001a20 .word 0x08001a20 +08001988 <__libc_init_array>: + 8001988: b570 push {r4, r5, r6, lr} + 800198a: 2600 movs r6, #0 + 800198c: 4d0c ldr r5, [pc, #48] ; (80019c0 <__libc_init_array+0x38>) + 800198e: 4c0d ldr r4, [pc, #52] ; (80019c4 <__libc_init_array+0x3c>) + 8001990: 1b64 subs r4, r4, r5 + 8001992: 10a4 asrs r4, r4, #2 + 8001994: 42a6 cmp r6, r4 + 8001996: d109 bne.n 80019ac <__libc_init_array+0x24> + 8001998: 2600 movs r6, #0 + 800199a: f000 f821 bl 80019e0 <_init> + 800199e: 4d0a ldr r5, [pc, #40] ; (80019c8 <__libc_init_array+0x40>) + 80019a0: 4c0a ldr r4, [pc, #40] ; (80019cc <__libc_init_array+0x44>) + 80019a2: 1b64 subs r4, r4, r5 + 80019a4: 10a4 asrs r4, r4, #2 + 80019a6: 42a6 cmp r6, r4 + 80019a8: d105 bne.n 80019b6 <__libc_init_array+0x2e> + 80019aa: bd70 pop {r4, r5, r6, pc} + 80019ac: 00b3 lsls r3, r6, #2 + 80019ae: 58eb ldr r3, [r5, r3] + 80019b0: 4798 blx r3 + 80019b2: 3601 adds r6, #1 + 80019b4: e7ee b.n 8001994 <__libc_init_array+0xc> + 80019b6: 00b3 lsls r3, r6, #2 + 80019b8: 58eb ldr r3, [r5, r3] + 80019ba: 4798 blx r3 + 80019bc: 3601 adds r6, #1 + 80019be: e7f2 b.n 80019a6 <__libc_init_array+0x1e> + 80019c0: 08001a28 .word 0x08001a28 + 80019c4: 08001a28 .word 0x08001a28 + 80019c8: 08001a28 .word 0x08001a28 + 80019cc: 08001a2c .word 0x08001a2c -080019c4 : - 80019c4: 0003 movs r3, r0 - 80019c6: 1882 adds r2, r0, r2 - 80019c8: 4293 cmp r3, r2 - 80019ca: d100 bne.n 80019ce - 80019cc: 4770 bx lr - 80019ce: 7019 strb r1, [r3, #0] - 80019d0: 3301 adds r3, #1 - 80019d2: e7f9 b.n 80019c8 +080019d0 : + 80019d0: 0003 movs r3, r0 + 80019d2: 1882 adds r2, r0, r2 + 80019d4: 4293 cmp r3, r2 + 80019d6: d100 bne.n 80019da + 80019d8: 4770 bx lr + 80019da: 7019 strb r1, [r3, #0] + 80019dc: 3301 adds r3, #1 + 80019de: e7f9 b.n 80019d4 -080019d4 <_init>: - 80019d4: b5f8 push {r3, r4, r5, r6, r7, lr} - 80019d6: 46c0 nop ; (mov r8, r8) - 80019d8: bcf8 pop {r3, r4, r5, r6, r7} - 80019da: bc08 pop {r3} - 80019dc: 469e mov lr, r3 - 80019de: 4770 bx lr - -080019e0 <_fini>: +080019e0 <_init>: 80019e0: b5f8 push {r3, r4, r5, r6, r7, lr} 80019e2: 46c0 nop ; (mov r8, r8) 80019e4: bcf8 pop {r3, r4, r5, r6, r7} 80019e6: bc08 pop {r3} 80019e8: 469e mov lr, r3 80019ea: 4770 bx lr + +080019ec <_fini>: + 80019ec: b5f8 push {r3, r4, r5, r6, r7, lr} + 80019ee: 46c0 nop ; (mov r8, r8) + 80019f0: bcf8 pop {r3, r4, r5, r6, r7} + 80019f2: bc08 pop {r3} + 80019f4: 469e mov lr, r3 + 80019f6: 4770 bx lr diff --git a/Debug/Motor_Controller.map b/Debug/Motor_Controller.map index 7d8126c..2bac2ae 100644 --- a/Debug/Motor_Controller.map +++ b/Debug/Motor_Controller.map @@ -20,6 +20,7 @@ Common symbol size file uwTick 0x4 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.o pFlash 0x20 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.o +dis_buff 0x5 ./My_Soul/my_main.o hadc 0x40 ./Core/Src/main.o Discarded input sections @@ -2505,6 +2506,8 @@ Discarded input sections .text 0x0000000000000000 0x0 ./My_Soul/my_main.o .data 0x0000000000000000 0x0 ./My_Soul/my_main.o .bss 0x0000000000000000 0x0 ./My_Soul/my_main.o + .rodata.d_num_data + 0x0000000000000000 0x14 ./My_Soul/my_main.o .debug_macro 0x0000000000000000 0xa7e ./My_Soul/my_main.o .debug_macro 0x0000000000000000 0x12d ./My_Soul/my_main.o .debug_macro 0x0000000000000000 0x2e ./My_Soul/my_main.o @@ -2657,7 +2660,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id 0x0000000008000000 g_pfnVectors 0x00000000080000c0 . = ALIGN (0x4) -.text 0x00000000080000c0 0x192c +.text 0x00000000080000c0 0x1938 0x00000000080000c0 . = ALIGN (0x4) *(.text) .text 0x00000000080000c0 0x48 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o @@ -2782,91 +2785,91 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id 0x0000000008001838 0xee ./My_Soul/my_main.o 0x0000000008001838 Send_to_595 *fill* 0x0000000008001926 0x2 - .text.mymain 0x0000000008001928 0x54 ./My_Soul/my_main.o + .text.mymain 0x0000000008001928 0x60 ./My_Soul/my_main.o 0x0000000008001928 mymain .text.__libc_init_array - 0x000000000800197c 0x48 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-init.o) - 0x000000000800197c __libc_init_array - .text.memset 0x00000000080019c4 0x10 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-memset.o) - 0x00000000080019c4 memset + 0x0000000008001988 0x48 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-init.o) + 0x0000000008001988 __libc_init_array + .text.memset 0x00000000080019d0 0x10 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-memset.o) + 0x00000000080019d0 memset *(.glue_7) - .glue_7 0x00000000080019d4 0x0 linker stubs + .glue_7 0x00000000080019e0 0x0 linker stubs *(.glue_7t) - .glue_7t 0x00000000080019d4 0x0 linker stubs + .glue_7t 0x00000000080019e0 0x0 linker stubs *(.eh_frame) - .eh_frame 0x00000000080019d4 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o + .eh_frame 0x00000000080019e0 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o *(.init) - .init 0x00000000080019d4 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o - 0x00000000080019d4 _init - .init 0x00000000080019d8 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o + .init 0x00000000080019e0 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o + 0x00000000080019e0 _init + .init 0x00000000080019e4 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o *(.fini) - .fini 0x00000000080019e0 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o - 0x00000000080019e0 _fini - .fini 0x00000000080019e4 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o - 0x00000000080019ec . = ALIGN (0x4) - 0x00000000080019ec _etext = . + .fini 0x00000000080019ec 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o + 0x00000000080019ec _fini + .fini 0x00000000080019f0 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o + 0x00000000080019f8 . = ALIGN (0x4) + 0x00000000080019f8 _etext = . -.vfp11_veneer 0x00000000080019ec 0x0 - .vfp11_veneer 0x00000000080019ec 0x0 linker stubs +.vfp11_veneer 0x00000000080019f8 0x0 + .vfp11_veneer 0x00000000080019f8 0x0 linker stubs -.v4_bx 0x00000000080019ec 0x0 - .v4_bx 0x00000000080019ec 0x0 linker stubs +.v4_bx 0x00000000080019f8 0x0 + .v4_bx 0x00000000080019f8 0x0 linker stubs -.iplt 0x00000000080019ec 0x0 - .iplt 0x00000000080019ec 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o +.iplt 0x00000000080019f8 0x0 + .iplt 0x00000000080019f8 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o -.rodata 0x00000000080019ec 0x30 - 0x00000000080019ec . = ALIGN (0x4) +.rodata 0x00000000080019f8 0x30 + 0x00000000080019f8 . = ALIGN (0x4) *(.rodata) - .rodata 0x00000000080019ec 0x20 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o + .rodata 0x00000000080019f8 0x20 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o *(.rodata*) .rodata.AHBPrescTable - 0x0000000008001a0c 0x10 ./Core/Src/system_stm32f0xx.o - 0x0000000008001a0c AHBPrescTable - 0x0000000008001a1c . = ALIGN (0x4) + 0x0000000008001a18 0x10 ./Core/Src/system_stm32f0xx.o + 0x0000000008001a18 AHBPrescTable + 0x0000000008001a28 . = ALIGN (0x4) -.rel.dyn 0x0000000008001a1c 0x0 - .rel.iplt 0x0000000008001a1c 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o +.rel.dyn 0x0000000008001a28 0x0 + .rel.iplt 0x0000000008001a28 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o -.ARM.extab 0x0000000008001a1c 0x0 - 0x0000000008001a1c . = ALIGN (0x4) +.ARM.extab 0x0000000008001a28 0x0 + 0x0000000008001a28 . = ALIGN (0x4) *(.ARM.extab* .gnu.linkonce.armextab.*) - 0x0000000008001a1c . = ALIGN (0x4) + 0x0000000008001a28 . = ALIGN (0x4) -.ARM 0x0000000008001a1c 0x0 - 0x0000000008001a1c . = ALIGN (0x4) - 0x0000000008001a1c __exidx_start = . +.ARM 0x0000000008001a28 0x0 + 0x0000000008001a28 . = ALIGN (0x4) + 0x0000000008001a28 __exidx_start = . *(.ARM.exidx*) - 0x0000000008001a1c __exidx_end = . - 0x0000000008001a1c . = ALIGN (0x4) + 0x0000000008001a28 __exidx_end = . + 0x0000000008001a28 . = ALIGN (0x4) -.preinit_array 0x0000000008001a1c 0x0 - 0x0000000008001a1c . = ALIGN (0x4) - 0x0000000008001a1c PROVIDE (__preinit_array_start = .) +.preinit_array 0x0000000008001a28 0x0 + 0x0000000008001a28 . = ALIGN (0x4) + 0x0000000008001a28 PROVIDE (__preinit_array_start = .) *(.preinit_array*) - 0x0000000008001a1c PROVIDE (__preinit_array_end = .) - 0x0000000008001a1c . = ALIGN (0x4) + 0x0000000008001a28 PROVIDE (__preinit_array_end = .) + 0x0000000008001a28 . = ALIGN (0x4) -.init_array 0x0000000008001a1c 0x4 - 0x0000000008001a1c . = ALIGN (0x4) - 0x0000000008001a1c PROVIDE (__init_array_start = .) +.init_array 0x0000000008001a28 0x4 + 0x0000000008001a28 . = ALIGN (0x4) + 0x0000000008001a28 PROVIDE (__init_array_start = .) *(SORT_BY_NAME(.init_array.*)) *(.init_array*) - .init_array 0x0000000008001a1c 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o - 0x0000000008001a20 PROVIDE (__init_array_end = .) - 0x0000000008001a20 . = ALIGN (0x4) + .init_array 0x0000000008001a28 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o + 0x0000000008001a2c PROVIDE (__init_array_end = .) + 0x0000000008001a2c . = ALIGN (0x4) -.fini_array 0x0000000008001a20 0x4 - 0x0000000008001a20 . = ALIGN (0x4) +.fini_array 0x0000000008001a2c 0x4 + 0x0000000008001a2c . = ALIGN (0x4) [!provide] PROVIDE (__fini_array_start = .) *(SORT_BY_NAME(.fini_array.*)) *(.fini_array*) - .fini_array 0x0000000008001a20 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o + .fini_array 0x0000000008001a2c 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o [!provide] PROVIDE (__fini_array_end = .) - 0x0000000008001a24 . = ALIGN (0x4) - 0x0000000008001a24 _sidata = LOADADDR (.data) + 0x0000000008001a30 . = ALIGN (0x4) + 0x0000000008001a30 _sidata = LOADADDR (.data) -.data 0x0000000020000000 0xc load address 0x0000000008001a24 +.data 0x0000000020000000 0xc load address 0x0000000008001a30 0x0000000020000000 . = ALIGN (0x4) 0x0000000020000000 _sdata = . *(.data) @@ -2886,11 +2889,11 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id *fill* 0x0000000020000009 0x3 0x000000002000000c _edata = . -.igot.plt 0x000000002000000c 0x0 load address 0x0000000008001a30 +.igot.plt 0x000000002000000c 0x0 load address 0x0000000008001a3c .igot.plt 0x000000002000000c 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o 0x000000002000000c . = ALIGN (0x4) -.bss 0x000000002000000c 0x60 load address 0x0000000008001a30 +.bss 0x000000002000000c 0x68 load address 0x0000000008001a3c 0x000000002000000c _sbss = . 0x000000002000000c __bss_start__ = _sbss *(.bss) @@ -2901,21 +2904,24 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id 0x0000000020000028 hadc COMMON 0x0000000020000068 0x4 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.o 0x0000000020000068 uwTick - 0x000000002000006c . = ALIGN (0x4) - 0x000000002000006c _ebss = . - 0x000000002000006c __bss_end__ = _ebss + COMMON 0x000000002000006c 0x5 ./My_Soul/my_main.o + 0x000000002000006c dis_buff + 0x0000000020000074 . = ALIGN (0x4) + *fill* 0x0000000020000071 0x3 + 0x0000000020000074 _ebss = . + 0x0000000020000074 __bss_end__ = _ebss ._user_heap_stack - 0x000000002000006c 0x604 load address 0x0000000008001a30 - 0x0000000020000070 . = ALIGN (0x8) - *fill* 0x000000002000006c 0x4 + 0x0000000020000074 0x604 load address 0x0000000008001a3c + 0x0000000020000078 . = ALIGN (0x8) + *fill* 0x0000000020000074 0x4 [!provide] PROVIDE (end = .) - 0x0000000020000070 PROVIDE (_end = .) - 0x0000000020000270 . = (. + _Min_Heap_Size) - *fill* 0x0000000020000070 0x200 - 0x0000000020000670 . = (. + _Min_Stack_Size) - *fill* 0x0000000020000270 0x400 - 0x0000000020000670 . = ALIGN (0x8) + 0x0000000020000078 PROVIDE (_end = .) + 0x0000000020000278 . = (. + _Min_Heap_Size) + *fill* 0x0000000020000078 0x200 + 0x0000000020000678 . = (. + _Min_Stack_Size) + *fill* 0x0000000020000278 0x400 + 0x0000000020000678 . = ALIGN (0x8) /DISCARD/ libc.a(*) @@ -2967,7 +2973,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libm.a LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/libgcc.a -.debug_info 0x0000000000000000 0x4534 +.debug_info 0x0000000000000000 0x461b .debug_info 0x0000000000000000 0xa5a ./Core/Src/main.o .debug_info 0x0000000000000a5a 0x888 ./Core/Src/stm32f0xx_hal_msp.o .debug_info 0x00000000000012e2 0x1b3 ./Core/Src/stm32f0xx_it.o @@ -2978,9 +2984,9 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id .debug_info 0x0000000000002b9a 0x7a0 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.o .debug_info 0x000000000000333a 0x6d3 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.o .debug_info 0x0000000000003a0d 0x88d ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o - .debug_info 0x000000000000429a 0x29a ./My_Soul/my_main.o + .debug_info 0x000000000000429a 0x381 ./My_Soul/my_main.o -.debug_abbrev 0x0000000000000000 0x11f1 +.debug_abbrev 0x0000000000000000 0x1219 .debug_abbrev 0x0000000000000000 0x208 ./Core/Src/main.o .debug_abbrev 0x0000000000000208 0x1ac ./Core/Src/stm32f0xx_hal_msp.o .debug_abbrev 0x00000000000003b4 0xd2 ./Core/Src/stm32f0xx_it.o @@ -2991,7 +2997,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id .debug_abbrev 0x00000000000009ec 0x2a9 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.o .debug_abbrev 0x0000000000000c95 0x1e8 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.o .debug_abbrev 0x0000000000000e7d 0x23b ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o - .debug_abbrev 0x00000000000010b8 0x139 ./My_Soul/my_main.o + .debug_abbrev 0x00000000000010b8 0x161 ./My_Soul/my_main.o .debug_aranges 0x0000000000000000 0x488 .debug_aranges @@ -3081,7 +3087,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id .debug_macro 0x000000000000e3a4 0x1bf ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o .debug_macro 0x000000000000e563 0x1e4 ./My_Soul/my_main.o -.debug_line 0x0000000000000000 0x62da +.debug_line 0x0000000000000000 0x62de .debug_line 0x0000000000000000 0x844 ./Core/Src/main.o .debug_line 0x0000000000000844 0x727 ./Core/Src/stm32f0xx_hal_msp.o .debug_line 0x0000000000000f6b 0x744 ./Core/Src/stm32f0xx_it.o @@ -3092,9 +3098,9 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id .debug_line 0x0000000000003956 0xa06 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.o .debug_line 0x000000000000435c 0xad7 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.o .debug_line 0x0000000000004e33 0xd46 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o - .debug_line 0x0000000000005b79 0x761 ./My_Soul/my_main.o + .debug_line 0x0000000000005b79 0x765 ./My_Soul/my_main.o -.debug_str 0x0000000000000000 0x564d2 +.debug_str 0x0000000000000000 0x5651c .debug_str 0x0000000000000000 0x554fa ./Core/Src/main.o 0x557e3 (size before relaxing) .debug_str 0x00000000000554fa 0x4e ./Core/Src/stm32f0xx_hal_msp.o @@ -3115,8 +3121,8 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id 0x5529d (size before relaxing) .debug_str 0x0000000000056125 0x240 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o 0x554c8 (size before relaxing) - .debug_str 0x0000000000056365 0x16d ./My_Soul/my_main.o - 0x55365 (size before relaxing) + .debug_str 0x0000000000056365 0x1b7 ./My_Soul/my_main.o + 0x553af (size before relaxing) .comment 0x0000000000000000 0x53 .comment 0x0000000000000000 0x53 ./Core/Src/main.o diff --git a/Debug/My_Soul/my_main.su b/Debug/My_Soul/my_main.su index 4b02c33..d693ebf 100644 --- a/Debug/My_Soul/my_main.su +++ b/Debug/My_Soul/my_main.su @@ -1,2 +1,2 @@ -my_main.c:16:6:Send_to_595 24 static -my_main.c:50:6:mymain 8 static +my_main.c:39:6:Send_to_595 24 static +my_main.c:73:6:mymain 8 static diff --git a/My_Soul/my_main.c b/My_Soul/my_main.c index 4e6306d..91039ba 100644 --- a/My_Soul/my_main.c +++ b/My_Soul/my_main.c @@ -13,6 +13,29 @@ #define MOTA(x) HAL_GPIO_WritePin(MOTA_GPIO_Port, MOTA_Pin, x); #define MOTB(x) HAL_GPIO_WritePin(MOTB_GPIO_Port, MOTB_Pin, x); +const char d_num_data[2][10]= +{ + { + 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f + }, + { + 0xed,0x48,0xe6,0x6e,0x4b,0x2f,0xaf,0x68,0xef,0x6f + } +}; + +struct +{ + char d_num[4]; + char dot1:1; + char dot2:1; + char dot3:1; + char dot4:1; + char led_run:1; + char led_p:1; + char led_n:1; + char led_err:1; +}dis_buff; + void Send_to_595(char h,char l) { @@ -55,8 +78,8 @@ void mymain() HC595_RCK(0); HC595_SCK(0); - Send_to_595(0x00,0x00); - + Send_to_595(0x00,0x6f); + dis_buff.d_num[0]=1; while(1) {