ARM GAS /tmp/cc2CqpQ9.s page 1 1 .cpu cortex-m7 2 .eabi_attribute 28, 1 3 .eabi_attribute 20, 1 4 .eabi_attribute 21, 1 5 .eabi_attribute 23, 3 6 .eabi_attribute 24, 1 7 .eabi_attribute 25, 1 8 .eabi_attribute 26, 1 9 .eabi_attribute 30, 1 10 .eabi_attribute 34, 1 11 .eabi_attribute 18, 4 12 .file "bootloader_control.c" 13 .text 14 .Ltext0: 15 .cfi_sections .debug_frame 16 .section .text.BL_CheckValidImage,"ax",%progbits 17 .align 1 18 .global BL_CheckValidImage 19 .arch armv7e-m 20 .syntax unified 21 .thumb 22 .thumb_func 23 .fpu fpv5-d16 25 BL_CheckValidImage: 26 .LVL0: 27 .LFB141: 28 .file 1 "Core/Src/bootloader_control.c" 1:Core/Src/bootloader_control.c **** // 2:Core/Src/bootloader_control.c **** // Created by imi415 on 2019/12/17. 3:Core/Src/bootloader_control.c **** // 4:Core/Src/bootloader_control.c **** 5:Core/Src/bootloader_control.c **** #include 6:Core/Src/bootloader_control.c **** 7:Core/Src/bootloader_control.c **** HAL_StatusTypeDef BL_CheckValidImage(uint32_t base_address) { 29 .loc 1 7 61 view -0 30 .cfi_startproc 31 @ args = 0, pretend = 0, frame = 0 32 @ frame_needed = 0, uses_anonymous_args = 0 33 @ link register save eliminated. 8:Core/Src/bootloader_control.c **** uint32_t qspi_sp = *(uint32_t *)base_address; 34 .loc 1 8 5 view .LVU1 35 .loc 1 8 14 is_stmt 0 view .LVU2 36 0000 0368 ldr r3, [r0] 37 .LVL1: 9:Core/Src/bootloader_control.c **** if(qspi_sp < 0x40000000) { 38 .loc 1 9 5 is_stmt 1 view .LVU3 39 .loc 1 9 7 is_stmt 0 view .LVU4 40 0002 B3F1804F cmp r3, #1073741824 41 0006 01D2 bcs .L3 10:Core/Src/bootloader_control.c **** return HAL_OK; 42 .loc 1 10 16 view .LVU5 43 0008 0020 movs r0, #0 44 .LVL2: 45 .loc 1 10 16 view .LVU6 46 000a 7047 bx lr 47 .LVL3: 48 .L3: ARM GAS /tmp/cc2CqpQ9.s page 2 11:Core/Src/bootloader_control.c **** } 12:Core/Src/bootloader_control.c **** else return HAL_ERROR; 49 .loc 1 12 17 view .LVU7 50 000c 0120 movs r0, #1 51 .LVL4: 13:Core/Src/bootloader_control.c **** } 52 .loc 1 13 1 view .LVU8 53 000e 7047 bx lr 54 .cfi_endproc 55 .LFE141: 57 .section .text.BL_GetEntryPoint,"ax",%progbits 58 .align 1 59 .global BL_GetEntryPoint 60 .syntax unified 61 .thumb 62 .thumb_func 63 .fpu fpv5-d16 65 BL_GetEntryPoint: 66 .LVL5: 67 .LFB142: 14:Core/Src/bootloader_control.c **** 15:Core/Src/bootloader_control.c **** uint32_t BL_GetEntryPoint(uint32_t base_address) { 68 .loc 1 15 50 is_stmt 1 view -0 69 .cfi_startproc 70 @ args = 0, pretend = 0, frame = 0 71 @ frame_needed = 0, uses_anonymous_args = 0 72 @ link register save eliminated. 16:Core/Src/bootloader_control.c **** uint32_t target_reset_vector = *(uint32_t *)(base_address + 0x04); 73 .loc 1 16 5 view .LVU10 74 .loc 1 16 14 is_stmt 0 view .LVU11 75 0000 4068 ldr r0, [r0, #4] 76 .LVL6: 17:Core/Src/bootloader_control.c **** if(target_reset_vector > 0x90000000 && target_reset_vector < 0xA0000000) { 77 .loc 1 17 5 is_stmt 1 view .LVU12 78 .loc 1 17 41 is_stmt 0 view .LVU13 79 0002 6FF01043 mvn r3, #-1879048192 80 0006 0344 add r3, r3, r0 81 .loc 1 17 7 view .LVU14 82 0008 6FF07042 mvn r2, #-268435456 83 000c 9342 cmp r3, r2 84 000e 00D3 bcc .L4 18:Core/Src/bootloader_control.c **** return target_reset_vector; 19:Core/Src/bootloader_control.c **** } 20:Core/Src/bootloader_control.c **** else return 0x00000000; 85 .loc 1 20 17 view .LVU15 86 0010 0020 movs r0, #0 87 .LVL7: 88 .L4: 21:Core/Src/bootloader_control.c **** } 89 .loc 1 21 1 view .LVU16 90 0012 7047 bx lr 91 .cfi_endproc 92 .LFE142: 94 .section .text.BL_JumpToXIPStart,"ax",%progbits 95 .align 1 96 .global BL_JumpToXIPStart 97 .syntax unified ARM GAS /tmp/cc2CqpQ9.s page 3 98 .thumb 99 .thumb_func 100 .fpu fpv5-d16 102 BL_JumpToXIPStart: 103 .LVL8: 104 .LFB143: 22:Core/Src/bootloader_control.c **** 23:Core/Src/bootloader_control.c **** void BL_JumpToXIPStart(uint32_t entry_point, uint32_t vector_base) { 105 .loc 1 23 68 is_stmt 1 view -0 106 .cfi_startproc 107 @ args = 0, pretend = 0, frame = 0 108 @ frame_needed = 0, uses_anonymous_args = 0 109 .loc 1 23 68 is_stmt 0 view .LVU18 110 0000 08B5 push {r3, lr} 111 .LCFI0: 112 .cfi_def_cfa_offset 8 113 .cfi_offset 3, -8 114 .cfi_offset 14, -4 24:Core/Src/bootloader_control.c **** __disable_irq(); 115 .loc 1 24 5 is_stmt 1 view .LVU19 116 .LBB4: 117 .LBI4: 118 .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 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 */ ARM GAS /tmp/cc2CqpQ9.s page 4 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; }; 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 ARM GAS /tmp/cc2CqpQ9.s page 5 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 **** */ 140:Drivers/CMSIS/Include/cmsis_gcc.h **** __STATIC_FORCEINLINE void __disable_irq(void) 119 .loc 2 140 27 view .LVU20 120 .LBB5: 141:Drivers/CMSIS/Include/cmsis_gcc.h **** { 142:Drivers/CMSIS/Include/cmsis_gcc.h **** __ASM volatile ("cpsid i" : : : "memory"); 121 .loc 2 142 3 view .LVU21 122 .syntax unified 123 @ 142 "Drivers/CMSIS/Include/cmsis_gcc.h" 1 124 0002 72B6 cpsid i ARM GAS /tmp/cc2CqpQ9.s page 6 125 @ 0 "" 2 126 .thumb 127 .syntax unified 128 .LBE5: 129 .LBE4: 25:Core/Src/bootloader_control.c **** SysTick->CTRL = 0; 130 .loc 1 25 5 view .LVU22 131 .loc 1 25 19 is_stmt 0 view .LVU23 132 0004 4FF0E023 mov r3, #-536813568 133 0008 0022 movs r2, #0 134 000a 1A61 str r2, [r3, #16] 26:Core/Src/bootloader_control.c **** SysTick->LOAD = 0; 135 .loc 1 26 5 is_stmt 1 view .LVU24 136 .loc 1 26 19 is_stmt 0 view .LVU25 137 000c 5A61 str r2, [r3, #20] 27:Core/Src/bootloader_control.c **** SysTick->VAL = 0; 138 .loc 1 27 5 is_stmt 1 view .LVU26 139 .loc 1 27 19 is_stmt 0 view .LVU27 140 000e 9A61 str r2, [r3, #24] 28:Core/Src/bootloader_control.c **** void (*entry)(void) = (void *)entry_point; 141 .loc 1 28 5 is_stmt 1 view .LVU28 142 .LVL9: 29:Core/Src/bootloader_control.c **** //__set_MSP(*(uint32_t *)vector_base); 30:Core/Src/bootloader_control.c **** entry(); 143 .loc 1 30 5 view .LVU29 144 0010 8047 blx r0 145 .LVL10: 31:Core/Src/bootloader_control.c **** }... 146 .loc 1 31 1 is_stmt 0 view .LVU30 147 0012 08BD pop {r3, pc} 148 .cfi_endproc 149 .LFE143: 151 .text 152 .Letext0: 153 .file 3 "/usr/arm-none-eabi/include/machine/_default_types.h" 154 .file 4 "/usr/arm-none-eabi/include/sys/_stdint.h" 155 .file 5 "Drivers/CMSIS/Include/core_cm7.h" 156 .file 6 "Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h" ARM GAS /tmp/cc2CqpQ9.s page 7 DEFINED SYMBOLS *ABS*:0000000000000000 bootloader_control.c /tmp/cc2CqpQ9.s:17 .text.BL_CheckValidImage:0000000000000000 $t /tmp/cc2CqpQ9.s:25 .text.BL_CheckValidImage:0000000000000000 BL_CheckValidImage /tmp/cc2CqpQ9.s:58 .text.BL_GetEntryPoint:0000000000000000 $t /tmp/cc2CqpQ9.s:65 .text.BL_GetEntryPoint:0000000000000000 BL_GetEntryPoint /tmp/cc2CqpQ9.s:95 .text.BL_JumpToXIPStart:0000000000000000 $t /tmp/cc2CqpQ9.s:102 .text.BL_JumpToXIPStart:0000000000000000 BL_JumpToXIPStart NO UNDEFINED SYMBOLS