ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 1 1 .cpu cortex-m4 2 .arch armv7e-m 3 .fpu fpv4-sp-d16 4 .eabi_attribute 27, 1 5 .eabi_attribute 28, 1 6 .eabi_attribute 20, 1 7 .eabi_attribute 21, 1 8 .eabi_attribute 23, 3 9 .eabi_attribute 24, 1 10 .eabi_attribute 25, 1 11 .eabi_attribute 26, 1 12 .eabi_attribute 30, 2 13 .eabi_attribute 34, 1 14 .eabi_attribute 18, 4 15 .file "soft_flash.c" 16 .text 17 .Ltext0: 18 .cfi_sections .debug_frame 19 .section .text.flash_erase,"ax",%progbits 20 .align 1 21 .p2align 2,,3 22 .global flash_erase 23 .syntax unified 24 .thumb 25 .thumb_func 27 flash_erase: 28 .LVL0: 29 .LFB130: 30 .file 1 "user_src/soft_flash.c" 1:user_src/soft_flash.c **** #include "main.h" 2:user_src/soft_flash.c **** #include "soft_flash.h" 3:user_src/soft_flash.c **** #include 4:user_src/soft_flash.c **** #include "soft_crc.h" 5:user_src/soft_flash.c **** #include "stm32f3xx_hal.h" 6:user_src/soft_flash.c **** 7:user_src/soft_flash.c **** extern UART_HandleTypeDef huart2; 8:user_src/soft_flash.c **** 9:user_src/soft_flash.c **** //FLASH 擦除 10:user_src/soft_flash.c **** void flash_erase(uint32_t addr) 11:user_src/soft_flash.c **** { 31 .loc 1 11 1 view -0 32 .cfi_startproc 33 @ args = 0, pretend = 0, frame = 16 34 @ frame_needed = 0, uses_anonymous_args = 0 12:user_src/soft_flash.c **** HAL_StatusTypeDef erase_status; 35 .loc 1 12 5 view .LVU1 13:user_src/soft_flash.c **** FLASH_EraseInitTypeDef f; 36 .loc 1 13 5 view .LVU2 14:user_src/soft_flash.c **** f.TypeErase = FLASH_TYPEERASE_PAGES; 37 .loc 1 14 5 view .LVU3 11:user_src/soft_flash.c **** HAL_StatusTypeDef erase_status; 38 .loc 1 11 1 is_stmt 0 view .LVU4 39 0000 10B5 push {r4, lr} 40 .LCFI0: 41 .cfi_def_cfa_offset 8 42 .cfi_offset 4, -8 43 .cfi_offset 14, -4 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 2 44 0002 84B0 sub sp, sp, #16 45 .LCFI1: 46 .cfi_def_cfa_offset 24 47 .loc 1 14 17 view .LVU5 48 0004 0023 movs r3, #0 11:user_src/soft_flash.c **** HAL_StatusTypeDef erase_status; 49 .loc 1 11 1 view .LVU6 50 0006 0446 mov r4, r0 15:user_src/soft_flash.c **** f.PageAddress = addr; 16:user_src/soft_flash.c **** f.NbPages = 1; 51 .loc 1 16 15 view .LVU7 52 0008 0122 movs r2, #1 17:user_src/soft_flash.c **** 18:user_src/soft_flash.c **** uint32_t PageError = 0; 19:user_src/soft_flash.c **** 20:user_src/soft_flash.c **** erase_status = HAL_FLASHEx_Erase(&f, &PageError); 53 .loc 1 20 20 view .LVU8 54 000a 6946 mov r1, sp 55 000c 01A8 add r0, sp, #4 56 .LVL1: 15:user_src/soft_flash.c **** f.PageAddress = addr; 57 .loc 1 15 19 view .LVU9 58 000e CDE90134 strd r3, r4, [sp, #4] 16:user_src/soft_flash.c **** 59 .loc 1 16 5 is_stmt 1 view .LVU10 16:user_src/soft_flash.c **** 60 .loc 1 16 15 is_stmt 0 view .LVU11 61 0012 0392 str r2, [sp, #12] 18:user_src/soft_flash.c **** 62 .loc 1 18 5 is_stmt 1 view .LVU12 18:user_src/soft_flash.c **** 63 .loc 1 18 14 is_stmt 0 view .LVU13 64 0014 0093 str r3, [sp] 65 .loc 1 20 5 is_stmt 1 view .LVU14 66 .loc 1 20 20 is_stmt 0 view .LVU15 67 0016 FFF7FEFF bl HAL_FLASHEx_Erase 68 .LVL2: 21:user_src/soft_flash.c **** 22:user_src/soft_flash.c **** if (erase_status != HAL_OK) 69 .loc 1 22 5 is_stmt 1 view .LVU16 23:user_src/soft_flash.c **** { 24:user_src/soft_flash.c **** } 70 .loc 1 24 5 view .LVU17 25:user_src/soft_flash.c **** } 71 .loc 1 25 1 is_stmt 0 view .LVU18 72 001a 04B0 add sp, sp, #16 73 .LCFI2: 74 .cfi_def_cfa_offset 8 75 @ sp needed 76 001c 10BD pop {r4, pc} 77 .loc 1 25 1 view .LVU19 78 .cfi_endproc 79 .LFE130: 81 001e 00BF .section .text.Flash_WriteData,"ax",%progbits 82 .align 1 83 .p2align 2,,3 84 .global Flash_WriteData ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 3 85 .syntax unified 86 .thumb 87 .thumb_func 89 Flash_WriteData: 90 .LVL3: 91 .LFB131: 26:user_src/soft_flash.c **** //FLASH写 27:user_src/soft_flash.c **** uint32_t Flash_WriteData(uint32_t addr, uint16_t *data, uint16_t Size) 28:user_src/soft_flash.c **** { 92 .loc 1 28 1 is_stmt 1 view -0 93 .cfi_startproc 94 @ args = 0, pretend = 0, frame = 16 95 @ frame_needed = 0, uses_anonymous_args = 0 96 .loc 1 28 1 is_stmt 0 view .LVU21 97 0000 2DE9F041 push {r4, r5, r6, r7, r8, lr} 98 .LCFI3: 99 .cfi_def_cfa_offset 24 100 .cfi_offset 4, -24 101 .cfi_offset 5, -20 102 .cfi_offset 6, -16 103 .cfi_offset 7, -12 104 .cfi_offset 8, -8 105 .cfi_offset 14, -4 106 0004 8046 mov r8, r0 29:user_src/soft_flash.c **** static uint32_t flash_count = 0; 107 .loc 1 29 5 is_stmt 1 view .LVU22 30:user_src/soft_flash.c **** 31:user_src/soft_flash.c **** __disable_irq(); 108 .loc 1 31 5 view .LVU23 109 .LBB34: 110 .LBI34: 111 .file 2 "Drivers/CMSIS/Include/cmsis_gcc.h" 1:Drivers/CMSIS/Include/cmsis_gcc.h **** /**************************************************************************//** 2:Drivers/CMSIS/Include/cmsis_gcc.h **** * @file cmsis_gcc.h 3:Drivers/CMSIS/Include/cmsis_gcc.h **** * @brief CMSIS compiler GCC header file 4:Drivers/CMSIS/Include/cmsis_gcc.h **** * @version V5.0.4 5:Drivers/CMSIS/Include/cmsis_gcc.h **** * @date 09. April 2018 6:Drivers/CMSIS/Include/cmsis_gcc.h **** ******************************************************************************/ 7:Drivers/CMSIS/Include/cmsis_gcc.h **** /* 8:Drivers/CMSIS/Include/cmsis_gcc.h **** * Copyright (c) 2009-2018 Arm Limited. All rights reserved. 9:Drivers/CMSIS/Include/cmsis_gcc.h **** * 10:Drivers/CMSIS/Include/cmsis_gcc.h **** * SPDX-License-Identifier: Apache-2.0 11:Drivers/CMSIS/Include/cmsis_gcc.h **** * 12:Drivers/CMSIS/Include/cmsis_gcc.h **** * Licensed under the Apache License, Version 2.0 (the License); you may 13:Drivers/CMSIS/Include/cmsis_gcc.h **** * not use this file except in compliance with the License. 14:Drivers/CMSIS/Include/cmsis_gcc.h **** * You may obtain a copy of the License at 15:Drivers/CMSIS/Include/cmsis_gcc.h **** * 16:Drivers/CMSIS/Include/cmsis_gcc.h **** * www.apache.org/licenses/LICENSE-2.0 17:Drivers/CMSIS/Include/cmsis_gcc.h **** * 18:Drivers/CMSIS/Include/cmsis_gcc.h **** * Unless required by applicable law or agreed to in writing, software 19:Drivers/CMSIS/Include/cmsis_gcc.h **** * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20:Drivers/CMSIS/Include/cmsis_gcc.h **** * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21:Drivers/CMSIS/Include/cmsis_gcc.h **** * See the License for the specific language governing permissions and 22:Drivers/CMSIS/Include/cmsis_gcc.h **** * limitations under the License. 23:Drivers/CMSIS/Include/cmsis_gcc.h **** */ 24:Drivers/CMSIS/Include/cmsis_gcc.h **** 25:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __CMSIS_GCC_H ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 4 26:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __CMSIS_GCC_H 27:Drivers/CMSIS/Include/cmsis_gcc.h **** 28:Drivers/CMSIS/Include/cmsis_gcc.h **** /* ignore some GCC warnings */ 29:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push 30:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wsign-conversion" 31:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wconversion" 32:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wunused-parameter" 33:Drivers/CMSIS/Include/cmsis_gcc.h **** 34:Drivers/CMSIS/Include/cmsis_gcc.h **** /* Fallback for __has_builtin */ 35:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __has_builtin 36:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __has_builtin(x) (0) 37:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 38:Drivers/CMSIS/Include/cmsis_gcc.h **** 39:Drivers/CMSIS/Include/cmsis_gcc.h **** /* CMSIS compiler specific defines */ 40:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __ASM 41:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __ASM __asm 42:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 43:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __INLINE 44:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __INLINE inline 45:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 46:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __STATIC_INLINE 47:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __STATIC_INLINE static inline 48:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 49:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __STATIC_FORCEINLINE 50:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline 51:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 52:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __NO_RETURN 53:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __NO_RETURN __attribute__((__noreturn__)) 54:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 55:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __USED 56:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __USED __attribute__((used)) 57:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 58:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __WEAK 59:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __WEAK __attribute__((weak)) 60:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 61:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __PACKED 62:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __PACKED __attribute__((packed, aligned(1))) 63:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 64:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __PACKED_STRUCT 65:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __PACKED_STRUCT struct __attribute__((packed, aligned(1))) 66:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 67:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __PACKED_UNION 68:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __PACKED_UNION union __attribute__((packed, aligned(1))) 69:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 70:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT32 /* deprecated */ 71:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push 72:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked" 73:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes" 74:Drivers/CMSIS/Include/cmsis_gcc.h **** struct __attribute__((packed)) T_UINT32 { uint32_t v; }; 75:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop 76:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v) 77:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 78:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT16_WRITE 79:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push 80:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked" 81:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes" 82:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; }; ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 5 83:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop 84:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))- 85:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 86:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT16_READ 87:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push 88:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked" 89:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes" 90:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT16_READ { uint16_t v; }; 91:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop 92:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(add 93:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 94:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT32_WRITE 95:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push 96:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked" 97:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes" 98:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; }; 99:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop 100:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))- 101:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 102:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __UNALIGNED_UINT32_READ 103:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic push 104:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wpacked" 105:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic ignored "-Wattributes" 106:Drivers/CMSIS/Include/cmsis_gcc.h **** __PACKED_STRUCT T_UINT32_READ { uint32_t v; }; 107:Drivers/CMSIS/Include/cmsis_gcc.h **** #pragma GCC diagnostic pop 108:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(add 109:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 110:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __ALIGNED 111:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __ALIGNED(x) __attribute__((aligned(x))) 112:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 113:Drivers/CMSIS/Include/cmsis_gcc.h **** #ifndef __RESTRICT 114:Drivers/CMSIS/Include/cmsis_gcc.h **** #define __RESTRICT __restrict 115:Drivers/CMSIS/Include/cmsis_gcc.h **** #endif 116:Drivers/CMSIS/Include/cmsis_gcc.h **** 117:Drivers/CMSIS/Include/cmsis_gcc.h **** 118:Drivers/CMSIS/Include/cmsis_gcc.h **** /* ########################### Core Function Access ########################### */ 119:Drivers/CMSIS/Include/cmsis_gcc.h **** /** \ingroup CMSIS_Core_FunctionInterface 120:Drivers/CMSIS/Include/cmsis_gcc.h **** \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions 121:Drivers/CMSIS/Include/cmsis_gcc.h **** @{ 122:Drivers/CMSIS/Include/cmsis_gcc.h **** */ 123:Drivers/CMSIS/Include/cmsis_gcc.h **** 124:Drivers/CMSIS/Include/cmsis_gcc.h **** /** 125:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Enable IRQ Interrupts 126:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Enables IRQ interrupts by clearing the I-bit in the CPSR. 127:Drivers/CMSIS/Include/cmsis_gcc.h **** Can only be executed in Privileged modes. 128:Drivers/CMSIS/Include/cmsis_gcc.h **** */ 129:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __enable_irq(void) 130:Drivers/CMSIS/Include/cmsis_gcc.h **** { 131:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("cpsie i" : : : "memory"); 132:Drivers/CMSIS/Include/cmsis_gcc.h **** } 133:Drivers/CMSIS/Include/cmsis_gcc.h **** 134:Drivers/CMSIS/Include/cmsis_gcc.h **** 135:Drivers/CMSIS/Include/cmsis_gcc.h **** /** 136:Drivers/CMSIS/Include/cmsis_gcc.h **** \brief Disable IRQ Interrupts 137:Drivers/CMSIS/Include/cmsis_gcc.h **** \details Disables IRQ interrupts by setting the I-bit in the CPSR. 138:Drivers/CMSIS/Include/cmsis_gcc.h **** Can only be executed in Privileged modes. 139:Drivers/CMSIS/Include/cmsis_gcc.h **** */ ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 6 140:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __disable_irq(void) 112 .loc 2 140 27 view .LVU24 113 .LBB35: 141:Drivers/CMSIS/Include/cmsis_gcc.h **** { 142:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("cpsid i" : : : "memory"); 114 .loc 2 142 3 view .LVU25 115 .LBE35: 116 .LBE34: 28:user_src/soft_flash.c **** static uint32_t flash_count = 0; 117 .loc 1 28 1 is_stmt 0 view .LVU26 118 0006 84B0 sub sp, sp, #16 119 .LCFI4: 120 .cfi_def_cfa_offset 40 28:user_src/soft_flash.c **** static uint32_t flash_count = 0; 121 .loc 1 28 1 view .LVU27 122 0008 0F46 mov r7, r1 123 000a 1546 mov r5, r2 124 .LBB37: 125 .LBB36: 126 .loc 2 142 3 view .LVU28 127 .syntax unified 128 @ 142 "Drivers/CMSIS/Include/cmsis_gcc.h" 1 129 000c 72B6 cpsid i 130 @ 0 "" 2 131 .thumb 132 .syntax unified 133 .LBE36: 134 .LBE37: 32:user_src/soft_flash.c **** HAL_FLASH_Unlock(); 135 .loc 1 32 5 is_stmt 1 view .LVU29 136 000e FFF7FEFF bl HAL_FLASH_Unlock 137 .LVL4: 33:user_src/soft_flash.c **** 34:user_src/soft_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGERR);//清除一些错 138 .loc 1 34 5 view .LVU30 139 0012 1D4B ldr r3, .L19 35:user_src/soft_flash.c **** 36:user_src/soft_flash.c **** 37:user_src/soft_flash.c **** //一页2kb 38:user_src/soft_flash.c **** if(flash_count == 0 || flash_count == 17) 140 .loc 1 38 20 is_stmt 0 view .LVU31 141 0014 1D4E ldr r6, .L19+4 34:user_src/soft_flash.c **** 142 .loc 1 34 5 view .LVU32 143 0016 3422 movs r2, #52 144 0018 DA60 str r2, [r3, #12] 145 .loc 1 38 5 is_stmt 1 view .LVU33 146 .loc 1 38 20 is_stmt 0 view .LVU34 147 001a 3368 ldr r3, [r6] 148 .loc 1 38 7 view .LVU35 149 001c E3B1 cbz r3, .L5 150 .loc 1 38 25 discriminator 1 view .LVU36 151 001e 112B cmp r3, #17 152 0020 1AD0 beq .L5 153 .L6: 154 .LVL5: 155 .LBB38: ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 7 39:user_src/soft_flash.c **** { 40:user_src/soft_flash.c **** flash_erase(addr);//擦除指定的闪存扇区(0~11) 41:user_src/soft_flash.c **** flash_count = 1; 42:user_src/soft_flash.c **** } 43:user_src/soft_flash.c **** 44:user_src/soft_flash.c **** uint16_t TempBuf = 0; 45:user_src/soft_flash.c **** for (uint16_t i = 0; i < Size; i++) 156 .loc 1 45 26 is_stmt 1 discriminator 1 view .LVU37 157 .loc 1 45 5 is_stmt 0 discriminator 1 view .LVU38 158 0022 35B3 cbz r5, .L7 159 0024 013D subs r5, r5, #1 160 0026 ADB2 uxth r5, r5 161 0028 BC1E subs r4, r7, #2 162 002a 07EB4505 add r5, r7, r5, lsl #1 163 002e A8EB0707 sub r7, r8, r7 164 .LVL6: 165 .loc 1 45 5 discriminator 1 view .LVU39 166 0032 01E0 b .L10 167 .LVL7: 168 .L8: 169 .loc 1 45 5 discriminator 2 view .LVU40 170 0034 AC42 cmp r4, r5 171 0036 1CD0 beq .L7 172 .LVL8: 173 .L10: 174 .LBB39: 46:user_src/soft_flash.c **** { 47:user_src/soft_flash.c **** TempBuf = *(data + i); 175 .loc 1 47 9 is_stmt 1 view .LVU41 48:user_src/soft_flash.c **** HAL_StatusTypeDef a = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, addr + i * 2, TempBuf); 176 .loc 1 48 9 view .LVU42 177 .loc 1 48 31 is_stmt 0 view .LVU43 178 0038 34F8022F ldrh r2, [r4, #2]! 179 .LVL9: 180 .loc 1 48 31 view .LVU44 181 003c 0023 movs r3, #0 182 003e 3919 adds r1, r7, r4 183 0040 0120 movs r0, #1 184 0042 FFF7FEFF bl HAL_FLASH_Program 185 .LVL10: 186 .loc 1 48 31 view .LVU45 187 .LBE39: 45:user_src/soft_flash.c **** { 188 .loc 1 45 36 is_stmt 1 view .LVU46 45:user_src/soft_flash.c **** { 189 .loc 1 45 26 view .LVU47 190 .LBB42: 49:user_src/soft_flash.c **** if (a != HAL_OK) 191 .loc 1 49 9 view .LVU48 192 .loc 1 49 12 is_stmt 0 view .LVU49 193 0046 0028 cmp r0, #0 194 0048 F4D0 beq .L8 50:user_src/soft_flash.c **** { 51:user_src/soft_flash.c **** HAL_FLASH_Lock(); 195 .loc 1 51 13 is_stmt 1 view .LVU50 196 004a FFF7FEFF bl HAL_FLASH_Lock 197 .LVL11: ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 8 52:user_src/soft_flash.c **** __enable_irq(); 198 .loc 1 52 13 view .LVU51 199 .LBB40: 200 .LBI40: 129:Drivers/CMSIS/Include/cmsis_gcc.h **** { 201 .loc 2 129 27 view .LVU52 202 .LBB41: 131:Drivers/CMSIS/Include/cmsis_gcc.h **** } 203 .loc 2 131 3 view .LVU53 204 .syntax unified 205 @ 131 "Drivers/CMSIS/Include/cmsis_gcc.h" 1 206 004e 62B6 cpsie i 207 @ 0 "" 2 208 .thumb 209 .syntax unified 210 .LBE41: 211 .LBE40: 53:user_src/soft_flash.c **** return WRITE_FAIL; 212 .loc 1 53 13 view .LVU54 213 .loc 1 53 20 is_stmt 0 view .LVU55 214 0050 0220 movs r0, #2 215 .LBE42: 216 .LBE38: 54:user_src/soft_flash.c **** } 55:user_src/soft_flash.c **** } 56:user_src/soft_flash.c **** HAL_FLASH_Lock(); 57:user_src/soft_flash.c **** __enable_irq(); 58:user_src/soft_flash.c **** flash_count++; 59:user_src/soft_flash.c **** 60:user_src/soft_flash.c **** return WRITE_SUCCESS; 61:user_src/soft_flash.c **** } 217 .loc 1 61 1 view .LVU56 218 0052 04B0 add sp, sp, #16 219 .LCFI5: 220 .cfi_remember_state 221 .cfi_def_cfa_offset 24 222 @ sp needed 223 0054 BDE8F081 pop {r4, r5, r6, r7, r8, pc} 224 .LVL12: 225 .L5: 226 .LCFI6: 227 .cfi_restore_state 40:user_src/soft_flash.c **** flash_count = 1; 228 .loc 1 40 9 is_stmt 1 view .LVU57 229 .LBB43: 230 .LBI43: 10:user_src/soft_flash.c **** { 231 .loc 1 10 6 view .LVU58 232 .LBB44: 12:user_src/soft_flash.c **** FLASH_EraseInitTypeDef f; 233 .loc 1 12 5 view .LVU59 13:user_src/soft_flash.c **** f.TypeErase = FLASH_TYPEERASE_PAGES; 234 .loc 1 13 5 view .LVU60 14:user_src/soft_flash.c **** f.PageAddress = addr; 235 .loc 1 14 5 view .LVU61 14:user_src/soft_flash.c **** f.PageAddress = addr; 236 .loc 1 14 17 is_stmt 0 view .LVU62 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 9 237 0058 0023 movs r3, #0 16:user_src/soft_flash.c **** 238 .loc 1 16 15 view .LVU63 239 005a 0124 movs r4, #1 20:user_src/soft_flash.c **** 240 .loc 1 20 20 view .LVU64 241 005c 6946 mov r1, sp 242 005e 01A8 add r0, sp, #4 18:user_src/soft_flash.c **** 243 .loc 1 18 14 view .LVU65 244 0060 CDE90033 strd r3, r3, [sp] 15:user_src/soft_flash.c **** f.NbPages = 1; 245 .loc 1 15 19 view .LVU66 246 0064 CDF80880 str r8, [sp, #8] 16:user_src/soft_flash.c **** 247 .loc 1 16 5 is_stmt 1 view .LVU67 16:user_src/soft_flash.c **** 248 .loc 1 16 15 is_stmt 0 view .LVU68 249 0068 0394 str r4, [sp, #12] 18:user_src/soft_flash.c **** 250 .loc 1 18 5 is_stmt 1 view .LVU69 20:user_src/soft_flash.c **** 251 .loc 1 20 5 view .LVU70 20:user_src/soft_flash.c **** 252 .loc 1 20 20 is_stmt 0 view .LVU71 253 006a FFF7FEFF bl HAL_FLASHEx_Erase 254 .LVL13: 22:user_src/soft_flash.c **** { 255 .loc 1 22 5 is_stmt 1 view .LVU72 24:user_src/soft_flash.c **** } 256 .loc 1 24 5 view .LVU73 24:user_src/soft_flash.c **** } 257 .loc 1 24 5 is_stmt 0 view .LVU74 258 .LBE44: 259 .LBE43: 41:user_src/soft_flash.c **** } 260 .loc 1 41 9 is_stmt 1 view .LVU75 41:user_src/soft_flash.c **** } 261 .loc 1 41 21 is_stmt 0 view .LVU76 262 006e 3460 str r4, [r6] 263 0070 D7E7 b .L6 264 .LVL14: 265 .L7: 56:user_src/soft_flash.c **** __enable_irq(); 266 .loc 1 56 5 is_stmt 1 view .LVU77 267 0072 FFF7FEFF bl HAL_FLASH_Lock 268 .LVL15: 57:user_src/soft_flash.c **** flash_count++; 269 .loc 1 57 5 view .LVU78 270 .LBB45: 271 .LBI45: 129:Drivers/CMSIS/Include/cmsis_gcc.h **** { 272 .loc 2 129 27 view .LVU79 273 .LBB46: 131:Drivers/CMSIS/Include/cmsis_gcc.h **** } 274 .loc 2 131 3 view .LVU80 275 .syntax unified ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 10 276 @ 131 "Drivers/CMSIS/Include/cmsis_gcc.h" 1 277 0076 62B6 cpsie i 278 @ 0 "" 2 279 .thumb 280 .syntax unified 281 .LBE46: 282 .LBE45: 58:user_src/soft_flash.c **** 283 .loc 1 58 5 view .LVU81 58:user_src/soft_flash.c **** 284 .loc 1 58 16 is_stmt 0 view .LVU82 285 0078 3368 ldr r3, [r6] 60:user_src/soft_flash.c **** } 286 .loc 1 60 12 view .LVU83 287 007a 0320 movs r0, #3 58:user_src/soft_flash.c **** 288 .loc 1 58 16 view .LVU84 289 007c 0133 adds r3, r3, #1 290 007e 3360 str r3, [r6] 60:user_src/soft_flash.c **** } 291 .loc 1 60 5 is_stmt 1 view .LVU85 292 .loc 1 61 1 is_stmt 0 view .LVU86 293 0080 04B0 add sp, sp, #16 294 .LCFI7: 295 .cfi_def_cfa_offset 24 296 @ sp needed 297 0082 BDE8F081 pop {r4, r5, r6, r7, r8, pc} 298 .LVL16: 299 .L20: 300 .loc 1 61 1 view .LVU87 301 0086 00BF .align 2 302 .L19: 303 0088 00200240 .word 1073881088 304 008c 00000000 .word .LANCHOR0 305 .cfi_endproc 306 .LFE131: 308 .section .text.wirte_update_flag,"ax",%progbits 309 .align 1 310 .p2align 2,,3 311 .global wirte_update_flag 312 .syntax unified 313 .thumb 314 .thumb_func 316 wirte_update_flag: 317 .LFB132: 62:user_src/soft_flash.c **** 63:user_src/soft_flash.c **** 64:user_src/soft_flash.c **** bool wirte_update_flag() 65:user_src/soft_flash.c **** { 318 .loc 1 65 1 is_stmt 1 view -0 319 .cfi_startproc 320 @ args = 0, pretend = 0, frame = 16 321 @ frame_needed = 0, uses_anonymous_args = 0 66:user_src/soft_flash.c **** HAL_StatusTypeDef status; 322 .loc 1 66 5 view .LVU89 67:user_src/soft_flash.c **** __disable_irq(); 323 .loc 1 67 5 view .LVU90 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 11 324 .LBB53: 325 .LBI53: 140:Drivers/CMSIS/Include/cmsis_gcc.h **** { 326 .loc 2 140 27 view .LVU91 327 .LBB54: 328 .loc 2 142 3 view .LVU92 329 .LBE54: 330 .LBE53: 65:user_src/soft_flash.c **** HAL_StatusTypeDef status; 331 .loc 1 65 1 is_stmt 0 view .LVU93 332 0000 30B5 push {r4, r5, lr} 333 .LCFI8: 334 .cfi_def_cfa_offset 12 335 .cfi_offset 4, -12 336 .cfi_offset 5, -8 337 .cfi_offset 14, -4 338 0002 85B0 sub sp, sp, #20 339 .LCFI9: 340 .cfi_def_cfa_offset 32 341 .LBB56: 342 .LBB55: 343 .loc 2 142 3 view .LVU94 344 .syntax unified 345 @ 142 "Drivers/CMSIS/Include/cmsis_gcc.h" 1 346 0004 72B6 cpsid i 347 @ 0 "" 2 348 .thumb 349 .syntax unified 350 .LBE55: 351 .LBE56: 68:user_src/soft_flash.c **** HAL_FLASH_Unlock(); 352 .loc 1 68 5 is_stmt 1 view .LVU95 353 0006 FFF7FEFF bl HAL_FLASH_Unlock 354 .LVL17: 69:user_src/soft_flash.c **** __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGERR); 355 .loc 1 69 5 view .LVU96 356 000a 0E4B ldr r3, .L23 357 .LBB57: 358 .LBB58: 15:user_src/soft_flash.c **** f.NbPages = 1; 359 .loc 1 15 19 is_stmt 0 view .LVU97 360 000c 0E4D ldr r5, .L23+4 361 .LBE58: 362 .LBE57: 363 .loc 1 69 5 view .LVU98 364 000e 3422 movs r2, #52 365 0010 DA60 str r2, [r3, #12] 70:user_src/soft_flash.c **** 71:user_src/soft_flash.c **** flash_erase(FLASH_UPDATE_ADDR); 366 .loc 1 71 5 is_stmt 1 view .LVU99 367 .LVL18: 368 .LBB60: 369 .LBI57: 10:user_src/soft_flash.c **** { 370 .loc 1 10 6 view .LVU100 371 .LBB59: 12:user_src/soft_flash.c **** FLASH_EraseInitTypeDef f; ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 12 372 .loc 1 12 5 view .LVU101 13:user_src/soft_flash.c **** f.TypeErase = FLASH_TYPEERASE_PAGES; 373 .loc 1 13 5 view .LVU102 14:user_src/soft_flash.c **** f.PageAddress = addr; 374 .loc 1 14 5 view .LVU103 16:user_src/soft_flash.c **** 375 .loc 1 16 15 is_stmt 0 view .LVU104 376 0012 0124 movs r4, #1 14:user_src/soft_flash.c **** f.PageAddress = addr; 377 .loc 1 14 17 view .LVU105 378 0014 0023 movs r3, #0 20:user_src/soft_flash.c **** 379 .loc 1 20 20 view .LVU106 380 0016 6946 mov r1, sp 381 0018 01A8 add r0, sp, #4 15:user_src/soft_flash.c **** f.NbPages = 1; 382 .loc 1 15 19 view .LVU107 383 001a CDE90135 strd r3, r5, [sp, #4] 16:user_src/soft_flash.c **** 384 .loc 1 16 5 is_stmt 1 view .LVU108 16:user_src/soft_flash.c **** 385 .loc 1 16 15 is_stmt 0 view .LVU109 386 001e 0394 str r4, [sp, #12] 18:user_src/soft_flash.c **** 387 .loc 1 18 5 is_stmt 1 view .LVU110 18:user_src/soft_flash.c **** 388 .loc 1 18 14 is_stmt 0 view .LVU111 389 0020 0093 str r3, [sp] 20:user_src/soft_flash.c **** 390 .loc 1 20 5 is_stmt 1 view .LVU112 20:user_src/soft_flash.c **** 391 .loc 1 20 20 is_stmt 0 view .LVU113 392 0022 FFF7FEFF bl HAL_FLASHEx_Erase 393 .LVL19: 22:user_src/soft_flash.c **** { 394 .loc 1 22 5 is_stmt 1 view .LVU114 24:user_src/soft_flash.c **** } 395 .loc 1 24 5 view .LVU115 24:user_src/soft_flash.c **** } 396 .loc 1 24 5 is_stmt 0 view .LVU116 397 .LBE59: 398 .LBE60: 72:user_src/soft_flash.c **** 73:user_src/soft_flash.c **** status = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, FLASH_UPDATE_ADDR, 0XF); 399 .loc 1 73 5 is_stmt 1 view .LVU117 400 .loc 1 73 14 is_stmt 0 view .LVU118 401 0026 0F22 movs r2, #15 402 0028 0023 movs r3, #0 403 002a 2946 mov r1, r5 404 002c 2046 mov r0, r4 405 002e FFF7FEFF bl HAL_FLASH_Program 406 .LVL20: 407 0032 0446 mov r4, r0 408 .LVL21: 74:user_src/soft_flash.c **** HAL_FLASH_Lock(); 409 .loc 1 74 5 is_stmt 1 view .LVU119 410 0034 FFF7FEFF bl HAL_FLASH_Lock ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 13 411 .LVL22: 75:user_src/soft_flash.c **** __enable_irq(); 412 .loc 1 75 5 view .LVU120 413 .LBB61: 414 .LBI61: 129:Drivers/CMSIS/Include/cmsis_gcc.h **** { 415 .loc 2 129 27 view .LVU121 416 .LBB62: 131:Drivers/CMSIS/Include/cmsis_gcc.h **** } 417 .loc 2 131 3 view .LVU122 418 .syntax unified 419 @ 131 "Drivers/CMSIS/Include/cmsis_gcc.h" 1 420 0038 62B6 cpsie i 421 @ 0 "" 2 422 .thumb 423 .syntax unified 424 .LBE62: 425 .LBE61: 76:user_src/soft_flash.c **** 77:user_src/soft_flash.c **** if(status == HAL_OK) 426 .loc 1 77 5 view .LVU123 78:user_src/soft_flash.c **** return true; 79:user_src/soft_flash.c **** else 80:user_src/soft_flash.c **** return false; 81:user_src/soft_flash.c **** } 427 .loc 1 81 1 is_stmt 0 view .LVU124 428 003a B4FA84F0 clz r0, r4 429 003e 4009 lsrs r0, r0, #5 430 0040 05B0 add sp, sp, #20 431 .LCFI10: 432 .cfi_def_cfa_offset 12 433 @ sp needed 434 0042 30BD pop {r4, r5, pc} 435 .LVL23: 436 .L24: 437 .loc 1 81 1 view .LVU125 438 .align 2 439 .L23: 440 0044 00200240 .word 1073881088 441 0048 00600008 .word 134242304 442 .cfi_endproc 443 .LFE132: 445 .section .text.ReadFlashNBtye,"ax",%progbits 446 .align 1 447 .p2align 2,,3 448 .global ReadFlashNBtye 449 .syntax unified 450 .thumb 451 .thumb_func 453 ReadFlashNBtye: 454 .LVL24: 455 .LFB133: 82:user_src/soft_flash.c **** 83:user_src/soft_flash.c **** 84:user_src/soft_flash.c **** //FLASH读地址 85:user_src/soft_flash.c **** uint16_t ReadFlashNBtye(uint32_t ReadAddress, uint16_t *ReadBuf, int32_t ReadNum) 86:user_src/soft_flash.c **** { ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 14 456 .loc 1 86 1 is_stmt 1 view -0 457 .cfi_startproc 458 @ args = 0, pretend = 0, frame = 0 459 @ frame_needed = 0, uses_anonymous_args = 0 460 @ link register save eliminated. 87:user_src/soft_flash.c **** int DataNum = 0; 461 .loc 1 87 5 view .LVU127 88:user_src/soft_flash.c **** uint16_t up_flag = 0; 462 .loc 1 88 5 view .LVU128 89:user_src/soft_flash.c **** 90:user_src/soft_flash.c **** *ReadBuf = *(__IO uint16_t *)ReadAddress; 463 .loc 1 90 5 view .LVU129 464 .loc 1 90 16 is_stmt 0 view .LVU130 465 0000 0088 ldrh r0, [r0] 466 .LVL25: 467 .loc 1 90 16 view .LVU131 468 0002 80B2 uxth r0, r0 469 .loc 1 90 14 view .LVU132 470 0004 0880 strh r0, [r1] @ movhi 91:user_src/soft_flash.c **** up_flag = *ReadBuf; 471 .loc 1 91 5 is_stmt 1 view .LVU133 472 .LVL26: 92:user_src/soft_flash.c **** DataNum++; 473 .loc 1 92 5 view .LVU134 93:user_src/soft_flash.c **** 94:user_src/soft_flash.c **** return up_flag; 474 .loc 1 94 5 view .LVU135 95:user_src/soft_flash.c **** } 475 .loc 1 95 1 is_stmt 0 view .LVU136 476 0006 7047 bx lr 477 .cfi_endproc 478 .LFE133: 480 .section .text.flash_read_updata_flag,"ax",%progbits 481 .align 1 482 .p2align 2,,3 483 .global flash_read_updata_flag 484 .syntax unified 485 .thumb 486 .thumb_func 488 flash_read_updata_flag: 489 .LFB134: 96:user_src/soft_flash.c **** //读取标志位 97:user_src/soft_flash.c **** uint32_t flash_read_updata_flag(void) 98:user_src/soft_flash.c **** { 490 .loc 1 98 1 is_stmt 1 view -0 491 .cfi_startproc 492 @ args = 0, pretend = 0, frame = 0 493 @ frame_needed = 0, uses_anonymous_args = 0 494 @ link register save eliminated. 99:user_src/soft_flash.c **** uint16_t temp_buff = 0; 495 .loc 1 99 5 view .LVU138 496 .LVL27: 100:user_src/soft_flash.c **** uint32_t Address = 0; 497 .loc 1 100 5 view .LVU139 101:user_src/soft_flash.c **** 102:user_src/soft_flash.c **** temp_buff = ReadFlashNBtye(FLASH_UPDATE_ADDR, (uint16_t *)&Address, 1); 498 .loc 1 102 5 view .LVU140 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 15 499 .LBB63: 500 .LBI63: 85:user_src/soft_flash.c **** { 501 .loc 1 85 10 view .LVU141 502 .LBB64: 87:user_src/soft_flash.c **** uint16_t up_flag = 0; 503 .loc 1 87 5 view .LVU142 88:user_src/soft_flash.c **** 504 .loc 1 88 5 view .LVU143 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 505 .loc 1 90 5 view .LVU144 91:user_src/soft_flash.c **** DataNum++; 506 .loc 1 91 5 view .LVU145 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 507 .loc 1 90 16 is_stmt 0 view .LVU146 508 0000 014B ldr r3, .L27 509 0002 1888 ldrh r0, [r3] 510 .LVL28: 92:user_src/soft_flash.c **** 511 .loc 1 92 5 is_stmt 1 view .LVU147 94:user_src/soft_flash.c **** } 512 .loc 1 94 5 view .LVU148 94:user_src/soft_flash.c **** } 513 .loc 1 94 5 is_stmt 0 view .LVU149 514 .LBE64: 515 .LBE63: 103:user_src/soft_flash.c **** 104:user_src/soft_flash.c **** return temp_buff; 516 .loc 1 104 5 is_stmt 1 view .LVU150 105:user_src/soft_flash.c **** } 517 .loc 1 105 1 is_stmt 0 view .LVU151 518 0004 80B2 uxth r0, r0 519 .loc 1 105 1 view .LVU152 520 0006 7047 bx lr 521 .L28: 522 .align 2 523 .L27: 524 0008 00600008 .word 134242304 525 .cfi_endproc 526 .LFE134: 528 .section .text.flash_ready_SN_and_VERSION,"ax",%progbits 529 .align 1 530 .p2align 2,,3 531 .global flash_ready_SN_and_VERSION 532 .syntax unified 533 .thumb 534 .thumb_func 536 flash_ready_SN_and_VERSION: 537 .LFB135: 106:user_src/soft_flash.c **** 107:user_src/soft_flash.c **** int pmu_sn = 0; 108:user_src/soft_flash.c **** int pmu_hardversion = 0; 109:user_src/soft_flash.c **** void flash_ready_SN_and_VERSION(void) 110:user_src/soft_flash.c **** { 538 .loc 1 110 1 is_stmt 1 view -0 539 .cfi_startproc 540 @ args = 0, pretend = 0, frame = 8 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 16 541 @ frame_needed = 0, uses_anonymous_args = 0 542 @ link register save eliminated. 111:user_src/soft_flash.c **** uint16_t temp_buff = 0,temp_buff2 = 0; 543 .loc 1 111 5 view .LVU154 544 .LVL29: 112:user_src/soft_flash.c **** uint32_t Address = 0; 545 .loc 1 112 5 view .LVU155 113:user_src/soft_flash.c **** 114:user_src/soft_flash.c **** temp_buff = ReadFlashNBtye(FLASH_APP_PAR_ADDR + 10, (uint16_t *)&Address, 1); 546 .loc 1 114 5 view .LVU156 547 .LBB65: 548 .LBB66: 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 549 .loc 1 90 16 is_stmt 0 view .LVU157 550 0000 0C4A ldr r2, .L31 551 .LBE66: 552 .LBE65: 115:user_src/soft_flash.c **** temp_buff2 = ReadFlashNBtye(FLASH_APP_PAR_ADDR + 12, (uint16_t *)&Address, 1); 116:user_src/soft_flash.c **** 117:user_src/soft_flash.c **** pmu_sn = temp_buff + (temp_buff2 << 16); 553 .loc 1 117 12 view .LVU158 554 0002 0D48 ldr r0, .L31+4 555 .LBB69: 556 .LBB67: 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 557 .loc 1 90 16 view .LVU159 558 0004 5389 ldrh r3, [r2, #10] 559 .LBE67: 560 .LBE69: 110:user_src/soft_flash.c **** uint16_t temp_buff = 0,temp_buff2 = 0; 561 .loc 1 110 1 view .LVU160 562 0006 82B0 sub sp, sp, #8 563 .LCFI11: 564 .cfi_def_cfa_offset 8 565 .LVL30: 566 .LBB70: 567 .LBI65: 85:user_src/soft_flash.c **** { 568 .loc 1 85 10 is_stmt 1 view .LVU161 569 .LBB68: 87:user_src/soft_flash.c **** uint16_t up_flag = 0; 570 .loc 1 87 5 view .LVU162 88:user_src/soft_flash.c **** 571 .loc 1 88 5 view .LVU163 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 572 .loc 1 90 5 view .LVU164 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 573 .loc 1 90 16 is_stmt 0 view .LVU165 574 0008 9BB2 uxth r3, r3 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 575 .loc 1 90 14 view .LVU166 576 000a ADF80430 strh r3, [sp, #4] @ movhi 91:user_src/soft_flash.c **** DataNum++; 577 .loc 1 91 5 is_stmt 1 view .LVU167 578 .LVL31: 92:user_src/soft_flash.c **** 579 .loc 1 92 5 view .LVU168 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 17 94:user_src/soft_flash.c **** } 580 .loc 1 94 5 view .LVU169 94:user_src/soft_flash.c **** } 581 .loc 1 94 5 is_stmt 0 view .LVU170 582 .LBE68: 583 .LBE70: 115:user_src/soft_flash.c **** 584 .loc 1 115 5 is_stmt 1 view .LVU171 585 .LBB71: 586 .LBI71: 85:user_src/soft_flash.c **** { 587 .loc 1 85 10 view .LVU172 588 .LBB72: 87:user_src/soft_flash.c **** uint16_t up_flag = 0; 589 .loc 1 87 5 view .LVU173 88:user_src/soft_flash.c **** 590 .loc 1 88 5 view .LVU174 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 591 .loc 1 90 5 view .LVU175 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 592 .loc 1 90 16 is_stmt 0 view .LVU176 593 000e 9189 ldrh r1, [r2, #12] 594 0010 89B2 uxth r1, r1 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 595 .loc 1 90 14 view .LVU177 596 0012 ADF80410 strh r1, [sp, #4] @ movhi 597 .LBE72: 598 .LBE71: 599 .loc 1 117 25 view .LVU178 600 0016 03EB0143 add r3, r3, r1, lsl #16 601 .LVL32: 602 .LBB74: 603 .LBB73: 91:user_src/soft_flash.c **** DataNum++; 604 .loc 1 91 5 is_stmt 1 view .LVU179 92:user_src/soft_flash.c **** 605 .loc 1 92 5 view .LVU180 94:user_src/soft_flash.c **** } 606 .loc 1 94 5 view .LVU181 94:user_src/soft_flash.c **** } 607 .loc 1 94 5 is_stmt 0 view .LVU182 608 .LBE73: 609 .LBE74: 610 .loc 1 117 5 is_stmt 1 view .LVU183 611 .loc 1 117 12 is_stmt 0 view .LVU184 612 001a 0360 str r3, [r0] 118:user_src/soft_flash.c **** 119:user_src/soft_flash.c **** temp_buff = ReadFlashNBtye(FLASH_APP_PAR_ADDR + 14, (uint16_t *)&Address, 1); 613 .loc 1 119 5 is_stmt 1 view .LVU185 614 .LVL33: 615 .LBB75: 616 .LBI75: 85:user_src/soft_flash.c **** { 617 .loc 1 85 10 view .LVU186 618 .LBB76: 87:user_src/soft_flash.c **** uint16_t up_flag = 0; 619 .loc 1 87 5 view .LVU187 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 18 88:user_src/soft_flash.c **** 620 .loc 1 88 5 view .LVU188 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 621 .loc 1 90 5 view .LVU189 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 622 .loc 1 90 16 is_stmt 0 view .LVU190 623 001c D389 ldrh r3, [r2, #14] 624 .LBE76: 625 .LBE75: 120:user_src/soft_flash.c **** temp_buff2 = ReadFlashNBtye(FLASH_APP_PAR_ADDR + 16, (uint16_t *)&Address, 1); 121:user_src/soft_flash.c **** 122:user_src/soft_flash.c **** pmu_hardversion = temp_buff + (temp_buff2 << 16); 626 .loc 1 122 21 view .LVU191 627 001e 0749 ldr r1, .L31+8 628 .LVL34: 629 .LBB78: 630 .LBB77: 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 631 .loc 1 90 16 view .LVU192 632 0020 9BB2 uxth r3, r3 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 633 .loc 1 90 14 view .LVU193 634 0022 ADF80430 strh r3, [sp, #4] @ movhi 91:user_src/soft_flash.c **** DataNum++; 635 .loc 1 91 5 is_stmt 1 view .LVU194 636 .LVL35: 92:user_src/soft_flash.c **** 637 .loc 1 92 5 view .LVU195 94:user_src/soft_flash.c **** } 638 .loc 1 94 5 view .LVU196 94:user_src/soft_flash.c **** } 639 .loc 1 94 5 is_stmt 0 view .LVU197 640 .LBE77: 641 .LBE78: 120:user_src/soft_flash.c **** 642 .loc 1 120 5 is_stmt 1 view .LVU198 643 .LBB79: 644 .LBI79: 85:user_src/soft_flash.c **** { 645 .loc 1 85 10 view .LVU199 646 .LBB80: 87:user_src/soft_flash.c **** uint16_t up_flag = 0; 647 .loc 1 87 5 view .LVU200 88:user_src/soft_flash.c **** 648 .loc 1 88 5 view .LVU201 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 649 .loc 1 90 5 view .LVU202 91:user_src/soft_flash.c **** DataNum++; 650 .loc 1 91 5 view .LVU203 90:user_src/soft_flash.c **** up_flag = *ReadBuf; 651 .loc 1 90 16 is_stmt 0 view .LVU204 652 0026 128A ldrh r2, [r2, #16] 653 .LVL36: 92:user_src/soft_flash.c **** 654 .loc 1 92 5 is_stmt 1 view .LVU205 94:user_src/soft_flash.c **** } 655 .loc 1 94 5 view .LVU206 ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 19 94:user_src/soft_flash.c **** } 656 .loc 1 94 5 is_stmt 0 view .LVU207 657 .LBE80: 658 .LBE79: 659 .loc 1 122 5 is_stmt 1 view .LVU208 660 .loc 1 122 34 is_stmt 0 view .LVU209 661 0028 03EB0243 add r3, r3, r2, lsl #16 662 .LVL37: 663 .loc 1 122 21 view .LVU210 664 002c 0B60 str r3, [r1] 123:user_src/soft_flash.c **** } 665 .loc 1 123 1 view .LVU211 666 002e 02B0 add sp, sp, #8 667 .LCFI12: 668 .cfi_def_cfa_offset 0 669 .LVL38: 670 .loc 1 123 1 view .LVU212 671 @ sp needed 672 0030 7047 bx lr 673 .L32: 674 0032 00BF .align 2 675 .L31: 676 0034 00680008 .word 134244352 677 0038 00000000 .word .LANCHOR1 678 003c 00000000 .word .LANCHOR2 679 .cfi_endproc 680 .LFE135: 682 .global pmu_hardversion 683 .global pmu_sn 684 .section .bss.flash_count.0,"aw",%nobits 685 .align 2 686 .set .LANCHOR0,. + 0 689 flash_count.0: 690 0000 00000000 .space 4 691 .section .bss.pmu_hardversion,"aw",%nobits 692 .align 2 693 .set .LANCHOR2,. + 0 696 pmu_hardversion: 697 0000 00000000 .space 4 698 .section .bss.pmu_sn,"aw",%nobits 699 .align 2 700 .set .LANCHOR1,. + 0 703 pmu_sn: 704 0000 00000000 .space 4 705 .text 706 .Letext0: 707 .file 3 "d:\\arm-gcc\\arm-none-eabi\\include\\machine\\_default_types.h" 708 .file 4 "d:\\arm-gcc\\arm-none-eabi\\include\\sys\\_stdint.h" 709 .file 5 "Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.h" 710 .file 6 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h" 711 .file 7 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash_ex.h" 712 .file 8 "user_inc/soft_flash.h" 713 .file 9 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_flash.h" ARM GAS C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s page 20 DEFINED SYMBOLS *ABS*:00000000 soft_flash.c C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:20 .text.flash_erase:00000000 $t C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:27 .text.flash_erase:00000000 flash_erase C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:82 .text.Flash_WriteData:00000000 $t C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:89 .text.Flash_WriteData:00000000 Flash_WriteData C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:303 .text.Flash_WriteData:00000088 $d C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:309 .text.wirte_update_flag:00000000 $t C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:316 .text.wirte_update_flag:00000000 wirte_update_flag C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:440 .text.wirte_update_flag:00000044 $d C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:446 .text.ReadFlashNBtye:00000000 $t C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:453 .text.ReadFlashNBtye:00000000 ReadFlashNBtye C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:481 .text.flash_read_updata_flag:00000000 $t C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:488 .text.flash_read_updata_flag:00000000 flash_read_updata_flag C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:524 .text.flash_read_updata_flag:00000008 $d C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:529 .text.flash_ready_SN_and_VERSION:00000000 $t C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:536 .text.flash_ready_SN_and_VERSION:00000000 flash_ready_SN_and_VERSION C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:676 .text.flash_ready_SN_and_VERSION:00000034 $d C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:696 .bss.pmu_hardversion:00000000 pmu_hardversion C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:703 .bss.pmu_sn:00000000 pmu_sn C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:685 .bss.flash_count.0:00000000 $d C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:689 .bss.flash_count.0:00000000 flash_count.0 C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:692 .bss.pmu_hardversion:00000000 $d C:\Users\zl835\AppData\Local\Temp\ccwGyLEb.s:699 .bss.pmu_sn:00000000 $d UNDEFINED SYMBOLS HAL_FLASHEx_Erase HAL_FLASH_Unlock HAL_FLASH_Program HAL_FLASH_Lock