zhunk 11 bulan lalu
induk
melakukan
f51b158c52

+ 8 - 4
ctrl_board_g070_app/Core/Src/main.c

@@ -104,7 +104,11 @@ int main(void)
     W25qxx_EraseSector(EXT_FLASH_FW_FLAG_ADDR);
     W25qxx_WriteByte(0xAA,EXT_FLASH_FW_FLAG_ADDR);
     //文件大小写入外部flash recvSize(字节数)
-    W25qxx_WriteByte(recvSize,EXT_FLASH_FW_SIZE_ADDR);
+    // 将uint32_t的4个字节分别写入
+    W25qxx_WriteByte((recvSize >> 0) & 0xFF,  EXT_FLASH_FW_SIZE_ADDR + 0);  // 字节0
+    W25qxx_WriteByte((recvSize >> 8) & 0xFF,  EXT_FLASH_FW_SIZE_ADDR + 1);  // 字节1
+    W25qxx_WriteByte((recvSize >> 16) & 0xFF, EXT_FLASH_FW_SIZE_ADDR + 2);  // 字节2
+    W25qxx_WriteByte((recvSize >> 24) & 0xFF, EXT_FLASH_FW_SIZE_ADDR + 3);  // 字节3
     //复位
     HAL_NVIC_SystemReset();
   }
@@ -124,10 +128,10 @@ int main(void)
     /* USER CODE END WHILE */
     /* USER CODE BEGIN 3 */
     HAL_GPIO_WritePin(GPIOA, LED_DBG_Pin, GPIO_PIN_RESET);
-    HAL_Delay(200);
+    HAL_Delay(500);
     HAL_GPIO_WritePin(GPIOA, LED_DBG_Pin, GPIO_PIN_SET);
-    HAL_Delay(200);
-    LL_USART_TransmitData8(COM_DBG, 1);
+    HAL_Delay(500);
+    LL_USART_TransmitData8(COM_DBG, ret);
   }
   /* USER CODE END 3 */
 }

TEMPAT SAMPAH
ctrl_board_g070_app/build/ctrl_board.bin


+ 360 - 360
ctrl_board_g070_app/build/ctrl_board.map

@@ -2673,7 +2673,7 @@ LOAD f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10
                 0x08007800                g_pfnVectors
                 0x080078b8                . = ALIGN (0x4)
 
-.text           0x080078b8     0x4d24
+.text           0x080078b8     0x4d74
                 0x080078b8                . = ALIGN (0x4)
  *(.text)
  .text          0x080078b8       0x48 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
@@ -2691,522 +2691,522 @@ LOAD f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10
  .text.LL_USART_TransmitData8
                 0x08007a28       0x1e build/main.o
  *fill*         0x08007a46        0x2 
- .text.main     0x08007a48       0xb8 build/main.o
+ .text.main     0x08007a48      0x108 build/main.o
                 0x08007a48                main
  .text.SystemClock_Config
-                0x08007b00       0xb4 build/main.o
-                0x08007b00                SystemClock_Config
+                0x08007b50       0xb4 build/main.o
+                0x08007b50                SystemClock_Config
  .text.Error_Handler
-                0x08007bb4        0xa build/main.o
-                0x08007bb4                Error_Handler
- *fill*         0x08007bbe        0x2 
+                0x08007c04        0xa build/main.o
+                0x08007c04                Error_Handler
+ *fill*         0x08007c0e        0x2 
  .text.MX_GPIO_Init
-                0x08007bc0      0x188 build/gpio.o
-                0x08007bc0                MX_GPIO_Init
+                0x08007c10      0x188 build/gpio.o
+                0x08007c10                MX_GPIO_Init
  .text.MX_RTC_Init
-                0x08007d48      0x110 build/rtc.o
-                0x08007d48                MX_RTC_Init
+                0x08007d98      0x110 build/rtc.o
+                0x08007d98                MX_RTC_Init
  .text.HAL_RTC_MspInit
-                0x08007e58       0x8c build/rtc.o
-                0x08007e58                HAL_RTC_MspInit
+                0x08007ea8       0x8c build/rtc.o
+                0x08007ea8                HAL_RTC_MspInit
  .text.MX_SPI2_Init
-                0x08007ee4       0x7c build/spi.o
-                0x08007ee4                MX_SPI2_Init
+                0x08007f34       0x7c build/spi.o
+                0x08007f34                MX_SPI2_Init
  .text.HAL_SPI_MspInit
-                0x08007f60       0xc4 build/spi.o
-                0x08007f60                HAL_SPI_MspInit
+                0x08007fb0       0xc4 build/spi.o
+                0x08007fb0                HAL_SPI_MspInit
  .text.LL_USART_Enable
-                0x08008024       0x1c build/usart.o
+                0x08008074       0x1c build/usart.o
  .text.LL_USART_DisableFIFO
-                0x08008040       0x20 build/usart.o
+                0x08008090       0x20 build/usart.o
  .text.LL_USART_SetTXFIFOThreshold
-                0x08008060       0x46 build/usart.o
- *fill*         0x080080a6        0x2 
+                0x080080b0       0x46 build/usart.o
+ *fill*         0x080080f6        0x2 
  .text.LL_USART_SetRXFIFOThreshold
-                0x080080a8       0x4c build/usart.o
+                0x080080f8       0x4c build/usart.o
  .text.LL_USART_ConfigAsyncMode
-                0x080080f4       0x30 build/usart.o
+                0x08008144       0x30 build/usart.o
  .text.LL_USART_IsActiveFlag_TEACK
-                0x08008124       0x28 build/usart.o
+                0x08008174       0x28 build/usart.o
  .text.LL_USART_IsActiveFlag_REACK
-                0x0800814c       0x28 build/usart.o
+                0x0800819c       0x28 build/usart.o
  .text.LL_APB2_GRP1_EnableClock
-                0x08008174       0x2c build/usart.o
+                0x080081c4       0x2c build/usart.o
  .text.LL_IOP_GRP1_EnableClock
-                0x080081a0       0x2c build/usart.o
+                0x080081f0       0x2c build/usart.o
  .text.MX_USART1_UART_Init
-                0x080081cc      0x15c build/usart.o
-                0x080081cc                MX_USART1_UART_Init
+                0x0800821c      0x15c build/usart.o
+                0x0800821c                MX_USART1_UART_Init
  .text.NMI_Handler
-                0x08008328        0x6 build/stm32g0xx_it.o
-                0x08008328                NMI_Handler
+                0x08008378        0x6 build/stm32g0xx_it.o
+                0x08008378                NMI_Handler
  .text.HardFault_Handler
-                0x0800832e        0x6 build/stm32g0xx_it.o
-                0x0800832e                HardFault_Handler
+                0x0800837e        0x6 build/stm32g0xx_it.o
+                0x0800837e                HardFault_Handler
  .text.SVC_Handler
-                0x08008334        0xa build/stm32g0xx_it.o
-                0x08008334                SVC_Handler
+                0x08008384        0xa build/stm32g0xx_it.o
+                0x08008384                SVC_Handler
  .text.PendSV_Handler
-                0x0800833e        0xa build/stm32g0xx_it.o
-                0x0800833e                PendSV_Handler
+                0x0800838e        0xa build/stm32g0xx_it.o
+                0x0800838e                PendSV_Handler
  .text.SysTick_Handler
-                0x08008348        0xe build/stm32g0xx_it.o
-                0x08008348                SysTick_Handler
- *fill*         0x08008356        0x2 
+                0x08008398        0xe build/stm32g0xx_it.o
+                0x08008398                SysTick_Handler
+ *fill*         0x080083a6        0x2 
  .text.RTC_TAMP_IRQHandler
-                0x08008358       0x18 build/stm32g0xx_it.o
-                0x08008358                RTC_TAMP_IRQHandler
+                0x080083a8       0x18 build/stm32g0xx_it.o
+                0x080083a8                RTC_TAMP_IRQHandler
  .text.EXTI4_15_IRQHandler
-                0x08008370       0x14 build/stm32g0xx_it.o
-                0x08008370                EXTI4_15_IRQHandler
+                0x080083c0       0x14 build/stm32g0xx_it.o
+                0x080083c0                EXTI4_15_IRQHandler
  .text.DMA1_Channel1_IRQHandler
-                0x08008384       0x18 build/stm32g0xx_it.o
-                0x08008384                DMA1_Channel1_IRQHandler
+                0x080083d4       0x18 build/stm32g0xx_it.o
+                0x080083d4                DMA1_Channel1_IRQHandler
  .text.USART2_IRQHandler
-                0x0800839c        0xe build/stm32g0xx_it.o
-                0x0800839c                USART2_IRQHandler
+                0x080083ec        0xe build/stm32g0xx_it.o
+                0x080083ec                USART2_IRQHandler
  .text.USART3_4_IRQHandler
-                0x080083aa        0xe build/stm32g0xx_it.o
-                0x080083aa                USART3_4_IRQHandler
+                0x080083fa        0xe build/stm32g0xx_it.o
+                0x080083fa                USART3_4_IRQHandler
  .text.HAL_MspInit
-                0x080083b8       0x50 build/stm32g0xx_hal_msp.o
-                0x080083b8                HAL_MspInit
+                0x08008408       0x50 build/stm32g0xx_hal_msp.o
+                0x08008408                HAL_MspInit
  .text.HAL_RCC_OscConfig
-                0x08008408      0x620 build/stm32g0xx_hal_rcc.o
-                0x08008408                HAL_RCC_OscConfig
+                0x08008458      0x620 build/stm32g0xx_hal_rcc.o
+                0x08008458                HAL_RCC_OscConfig
  .text.HAL_RCC_ClockConfig
-                0x08008a28      0x210 build/stm32g0xx_hal_rcc.o
-                0x08008a28                HAL_RCC_ClockConfig
+                0x08008a78      0x210 build/stm32g0xx_hal_rcc.o
+                0x08008a78                HAL_RCC_ClockConfig
  .text.HAL_RCC_GetSysClockFreq
-                0x08008c38      0x104 build/stm32g0xx_hal_rcc.o
-                0x08008c38                HAL_RCC_GetSysClockFreq
+                0x08008c88      0x104 build/stm32g0xx_hal_rcc.o
+                0x08008c88                HAL_RCC_GetSysClockFreq
  .text.HAL_RCCEx_PeriphCLKConfig
-                0x08008d3c      0x268 build/stm32g0xx_hal_rcc_ex.o
-                0x08008d3c                HAL_RCCEx_PeriphCLKConfig
+                0x08008d8c      0x268 build/stm32g0xx_hal_rcc_ex.o
+                0x08008d8c                HAL_RCCEx_PeriphCLKConfig
  .text.LL_RCC_HSI_IsReady
-                0x08008fa4       0x28 build/stm32g0xx_ll_rcc.o
+                0x08008ff4       0x28 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_LSE_IsReady
-                0x08008fcc       0x20 build/stm32g0xx_ll_rcc.o
+                0x0800901c       0x20 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_GetSysClkSource
-                0x08008fec       0x18 build/stm32g0xx_ll_rcc.o
+                0x0800903c       0x18 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_GetAHBPrescaler
-                0x08009004       0x18 build/stm32g0xx_ll_rcc.o
+                0x08009054       0x18 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_GetAPB1Prescaler
-                0x0800901c       0x18 build/stm32g0xx_ll_rcc.o
+                0x0800906c       0x18 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_GetUSARTClockSource
-                0x08009034       0x24 build/stm32g0xx_ll_rcc.o
+                0x08009084       0x24 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_PLL_GetN
-                0x08009058       0x18 build/stm32g0xx_ll_rcc.o
+                0x080090a8       0x18 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_PLL_GetR
-                0x08009070       0x18 build/stm32g0xx_ll_rcc.o
+                0x080090c0       0x18 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_PLL_GetMainSource
-                0x08009088       0x18 build/stm32g0xx_ll_rcc.o
+                0x080090d8       0x18 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_PLL_GetDivider
-                0x080090a0       0x18 build/stm32g0xx_ll_rcc.o
+                0x080090f0       0x18 build/stm32g0xx_ll_rcc.o
  .text.LL_RCC_GetSystemClocksFreq
-                0x080090b8       0x3a build/stm32g0xx_ll_rcc.o
-                0x080090b8                LL_RCC_GetSystemClocksFreq
- *fill*         0x080090f2        0x2 
+                0x08009108       0x3a build/stm32g0xx_ll_rcc.o
+                0x08009108                LL_RCC_GetSystemClocksFreq
+ *fill*         0x08009142        0x2 
  .text.LL_RCC_GetUSARTClockFreq
-                0x080090f4      0x120 build/stm32g0xx_ll_rcc.o
-                0x080090f4                LL_RCC_GetUSARTClockFreq
+                0x08009144      0x120 build/stm32g0xx_ll_rcc.o
+                0x08009144                LL_RCC_GetUSARTClockFreq
  .text.RCC_GetSystemClockFreq
-                0x08009214       0x5c build/stm32g0xx_ll_rcc.o
+                0x08009264       0x5c build/stm32g0xx_ll_rcc.o
  .text.RCC_GetHCLKClockFreq
-                0x08009270       0x30 build/stm32g0xx_ll_rcc.o
+                0x080092c0       0x30 build/stm32g0xx_ll_rcc.o
  .text.RCC_GetPCLK1ClockFreq
-                0x080092a0       0x2c build/stm32g0xx_ll_rcc.o
+                0x080092f0       0x2c build/stm32g0xx_ll_rcc.o
  .text.RCC_PLL_GetFreqDomain_SYS
-                0x080092cc       0x74 build/stm32g0xx_ll_rcc.o
+                0x0800931c       0x74 build/stm32g0xx_ll_rcc.o
  .text.HAL_GPIO_Init
-                0x08009340      0x2c8 build/stm32g0xx_hal_gpio.o
-                0x08009340                HAL_GPIO_Init
+                0x08009390      0x2c8 build/stm32g0xx_hal_gpio.o
+                0x08009390                HAL_GPIO_Init
  .text.HAL_GPIO_WritePin
-                0x08009608       0x3a build/stm32g0xx_hal_gpio.o
-                0x08009608                HAL_GPIO_WritePin
- *fill*         0x08009642        0x2 
+                0x08009658       0x3a build/stm32g0xx_hal_gpio.o
+                0x08009658                HAL_GPIO_WritePin
+ *fill*         0x08009692        0x2 
  .text.HAL_GPIO_EXTI_IRQHandler
-                0x08009644       0x54 build/stm32g0xx_hal_gpio.o
-                0x08009644                HAL_GPIO_EXTI_IRQHandler
+                0x08009694       0x54 build/stm32g0xx_hal_gpio.o
+                0x08009694                HAL_GPIO_EXTI_IRQHandler
  .text.HAL_GPIO_EXTI_Falling_Callback
-                0x08009698       0x14 build/stm32g0xx_hal_gpio.o
-                0x08009698                HAL_GPIO_EXTI_Falling_Callback
+                0x080096e8       0x14 build/stm32g0xx_hal_gpio.o
+                0x080096e8                HAL_GPIO_EXTI_Falling_Callback
  .text.HAL_DMA_IRQHandler
-                0x080096ac      0x164 build/stm32g0xx_hal_dma.o
-                0x080096ac                HAL_DMA_IRQHandler
+                0x080096fc      0x164 build/stm32g0xx_hal_dma.o
+                0x080096fc                HAL_DMA_IRQHandler
  .text.HAL_PWR_EnableBkUpAccess
-                0x08009810       0x1c build/stm32g0xx_hal_pwr.o
-                0x08009810                HAL_PWR_EnableBkUpAccess
+                0x08009860       0x1c build/stm32g0xx_hal_pwr.o
+                0x08009860                HAL_PWR_EnableBkUpAccess
  .text.HAL_PWREx_ControlVoltageScaling
-                0x0800982c       0x80 build/stm32g0xx_hal_pwr_ex.o
-                0x0800982c                HAL_PWREx_ControlVoltageScaling
+                0x0800987c       0x80 build/stm32g0xx_hal_pwr_ex.o
+                0x0800987c                HAL_PWREx_ControlVoltageScaling
  .text.__NVIC_EnableIRQ
-                0x080098ac       0x34 build/stm32g0xx_hal_cortex.o
+                0x080098fc       0x34 build/stm32g0xx_hal_cortex.o
  .text.__NVIC_SetPriority
-                0x080098e0       0xdc build/stm32g0xx_hal_cortex.o
+                0x08009930       0xdc build/stm32g0xx_hal_cortex.o
  .text.__NVIC_SystemReset
-                0x080099bc       0x24 build/stm32g0xx_hal_cortex.o
+                0x08009a0c       0x24 build/stm32g0xx_hal_cortex.o
  .text.SysTick_Config
-                0x080099e0       0x48 build/stm32g0xx_hal_cortex.o
+                0x08009a30       0x48 build/stm32g0xx_hal_cortex.o
  .text.HAL_NVIC_SetPriority
-                0x08009a28       0x2a build/stm32g0xx_hal_cortex.o
-                0x08009a28                HAL_NVIC_SetPriority
+                0x08009a78       0x2a build/stm32g0xx_hal_cortex.o
+                0x08009a78                HAL_NVIC_SetPriority
  .text.HAL_NVIC_EnableIRQ
-                0x08009a52       0x20 build/stm32g0xx_hal_cortex.o
-                0x08009a52                HAL_NVIC_EnableIRQ
+                0x08009aa2       0x20 build/stm32g0xx_hal_cortex.o
+                0x08009aa2                HAL_NVIC_EnableIRQ
  .text.HAL_NVIC_SystemReset
-                0x08009a72        0x8 build/stm32g0xx_hal_cortex.o
-                0x08009a72                HAL_NVIC_SystemReset
+                0x08009ac2        0x8 build/stm32g0xx_hal_cortex.o
+                0x08009ac2                HAL_NVIC_SystemReset
  .text.HAL_SYSTICK_Config
-                0x08009a7a       0x1a build/stm32g0xx_hal_cortex.o
-                0x08009a7a                HAL_SYSTICK_Config
+                0x08009aca       0x1a build/stm32g0xx_hal_cortex.o
+                0x08009aca                HAL_SYSTICK_Config
  .text.HAL_Init
-                0x08009a94       0x40 build/stm32g0xx_hal.o
-                0x08009a94                HAL_Init
+                0x08009ae4       0x40 build/stm32g0xx_hal.o
+                0x08009ae4                HAL_Init
  .text.HAL_InitTick
-                0x08009ad4       0x94 build/stm32g0xx_hal.o
-                0x08009ad4                HAL_InitTick
+                0x08009b24       0x94 build/stm32g0xx_hal.o
+                0x08009b24                HAL_InitTick
  .text.HAL_IncTick
-                0x08009b68       0x24 build/stm32g0xx_hal.o
-                0x08009b68                HAL_IncTick
+                0x08009bb8       0x24 build/stm32g0xx_hal.o
+                0x08009bb8                HAL_IncTick
  .text.HAL_GetTick
-                0x08009b8c       0x14 build/stm32g0xx_hal.o
-                0x08009b8c                HAL_GetTick
+                0x08009bdc       0x14 build/stm32g0xx_hal.o
+                0x08009bdc                HAL_GetTick
  .text.HAL_Delay
-                0x08009ba0       0x48 build/stm32g0xx_hal.o
-                0x08009ba0                HAL_Delay
+                0x08009bf0       0x48 build/stm32g0xx_hal.o
+                0x08009bf0                HAL_Delay
  .text.HAL_SYSCFG_StrobeDBattpinsConfig
-                0x08009be8       0x2c build/stm32g0xx_hal.o
-                0x08009be8                HAL_SYSCFG_StrobeDBattpinsConfig
+                0x08009c38       0x2c build/stm32g0xx_hal.o
+                0x08009c38                HAL_SYSCFG_StrobeDBattpinsConfig
  .text.HAL_RTC_Init
-                0x08009c14      0x144 build/stm32g0xx_hal_rtc.o
-                0x08009c14                HAL_RTC_Init
+                0x08009c64      0x144 build/stm32g0xx_hal_rtc.o
+                0x08009c64                HAL_RTC_Init
  .text.HAL_RTC_SetTime
-                0x08009d58      0x150 build/stm32g0xx_hal_rtc.o
-                0x08009d58                HAL_RTC_SetTime
+                0x08009da8      0x150 build/stm32g0xx_hal_rtc.o
+                0x08009da8                HAL_RTC_SetTime
  .text.HAL_RTC_SetDate
-                0x08009ea8      0x124 build/stm32g0xx_hal_rtc.o
-                0x08009ea8                HAL_RTC_SetDate
+                0x08009ef8      0x124 build/stm32g0xx_hal_rtc.o
+                0x08009ef8                HAL_RTC_SetDate
  .text.HAL_RTC_WaitForSynchro
-                0x08009fcc       0x4c build/stm32g0xx_hal_rtc.o
-                0x08009fcc                HAL_RTC_WaitForSynchro
+                0x0800a01c       0x4c build/stm32g0xx_hal_rtc.o
+                0x0800a01c                HAL_RTC_WaitForSynchro
  .text.RTC_EnterInitMode
-                0x0800a018       0x84 build/stm32g0xx_hal_rtc.o
-                0x0800a018                RTC_EnterInitMode
+                0x0800a068       0x84 build/stm32g0xx_hal_rtc.o
+                0x0800a068                RTC_EnterInitMode
  .text.RTC_ExitInitMode
-                0x0800a09c       0x88 build/stm32g0xx_hal_rtc.o
-                0x0800a09c                RTC_ExitInitMode
+                0x0800a0ec       0x88 build/stm32g0xx_hal_rtc.o
+                0x0800a0ec                RTC_ExitInitMode
  .text.RTC_ByteToBcd2
-                0x0800a124       0x50 build/stm32g0xx_hal_rtc.o
-                0x0800a124                RTC_ByteToBcd2
+                0x0800a174       0x50 build/stm32g0xx_hal_rtc.o
+                0x0800a174                RTC_ByteToBcd2
  .text.HAL_RTCEx_SetWakeUpTimer_IT
-                0x0800a174      0x134 build/stm32g0xx_hal_rtc_ex.o
-                0x0800a174                HAL_RTCEx_SetWakeUpTimer_IT
+                0x0800a1c4      0x134 build/stm32g0xx_hal_rtc_ex.o
+                0x0800a1c4                HAL_RTCEx_SetWakeUpTimer_IT
  .text.HAL_RTCEx_WakeUpTimerIRQHandler
-                0x0800a2a8       0x3c build/stm32g0xx_hal_rtc_ex.o
-                0x0800a2a8                HAL_RTCEx_WakeUpTimerIRQHandler
+                0x0800a2f8       0x3c build/stm32g0xx_hal_rtc_ex.o
+                0x0800a2f8                HAL_RTCEx_WakeUpTimerIRQHandler
  .text.HAL_RTCEx_BKUPWrite
-                0x0800a2e4       0x3a build/stm32g0xx_hal_rtc_ex.o
-                0x0800a2e4                HAL_RTCEx_BKUPWrite
+                0x0800a334       0x3a build/stm32g0xx_hal_rtc_ex.o
+                0x0800a334                HAL_RTCEx_BKUPWrite
  .text.HAL_RTCEx_BKUPRead
-                0x0800a31e       0x36 build/stm32g0xx_hal_rtc_ex.o
-                0x0800a31e                HAL_RTCEx_BKUPRead
+                0x0800a36e       0x36 build/stm32g0xx_hal_rtc_ex.o
+                0x0800a36e                HAL_RTCEx_BKUPRead
  .text.HAL_SPI_Init
-                0x0800a354      0x170 build/stm32g0xx_hal_spi.o
-                0x0800a354                HAL_SPI_Init
+                0x0800a3a4      0x170 build/stm32g0xx_hal_spi.o
+                0x0800a3a4                HAL_SPI_Init
  .text.HAL_SPI_Transmit
-                0x0800a4c4      0x2be build/stm32g0xx_hal_spi.o
-                0x0800a4c4                HAL_SPI_Transmit
- *fill*         0x0800a782        0x2 
+                0x0800a514      0x2be build/stm32g0xx_hal_spi.o
+                0x0800a514                HAL_SPI_Transmit
+ *fill*         0x0800a7d2        0x2 
  .text.HAL_SPI_TransmitReceive
-                0x0800a784      0x3c4 build/stm32g0xx_hal_spi.o
-                0x0800a784                HAL_SPI_TransmitReceive
+                0x0800a7d4      0x3c4 build/stm32g0xx_hal_spi.o
+                0x0800a7d4                HAL_SPI_TransmitReceive
  .text.SPI_WaitFlagStateUntilTimeout
-                0x0800ab48      0x11c build/stm32g0xx_hal_spi.o
+                0x0800ab98      0x11c build/stm32g0xx_hal_spi.o
  .text.SPI_WaitFifoStateUntilTimeout
-                0x0800ac64      0x144 build/stm32g0xx_hal_spi.o
+                0x0800acb4      0x144 build/stm32g0xx_hal_spi.o
  .text.SPI_EndRxTxTransaction
-                0x0800ada8       0x8c build/stm32g0xx_hal_spi.o
+                0x0800adf8       0x8c build/stm32g0xx_hal_spi.o
  .text.SystemInit
-                0x0800ae34       0x18 build/system_stm32g0xx.o
-                0x0800ae34                SystemInit
+                0x0800ae84       0x18 build/system_stm32g0xx.o
+                0x0800ae84                SystemInit
  .text.LL_USART_IsEnabled
-                0x0800ae4c       0x22 build/stm32g0xx_ll_usart.o
+                0x0800ae9c       0x22 build/stm32g0xx_ll_usart.o
  .text.LL_USART_SetPrescaler
-                0x0800ae6e       0x24 build/stm32g0xx_ll_usart.o
- *fill*         0x0800ae92        0x2 
+                0x0800aebe       0x24 build/stm32g0xx_ll_usart.o
+ *fill*         0x0800aee2        0x2 
  .text.LL_USART_SetStopBitsLength
-                0x0800ae94       0x28 build/stm32g0xx_ll_usart.o
+                0x0800aee4       0x28 build/stm32g0xx_ll_usart.o
  .text.LL_USART_SetHWFlowCtrl
-                0x0800aebc       0x28 build/stm32g0xx_ll_usart.o
+                0x0800af0c       0x28 build/stm32g0xx_ll_usart.o
  .text.LL_USART_SetBaudRate
-                0x0800aee4       0xb4 build/stm32g0xx_ll_usart.o
+                0x0800af34       0xb4 build/stm32g0xx_ll_usart.o
  .text.LL_USART_Init
-                0x0800af98      0x11c build/stm32g0xx_ll_usart.o
-                0x0800af98                LL_USART_Init
+                0x0800afe8      0x11c build/stm32g0xx_ll_usart.o
+                0x0800afe8                LL_USART_Init
  .text.LL_GPIO_SetPinMode
-                0x0800b0b4       0x38 build/stm32g0xx_ll_gpio.o
+                0x0800b104       0x38 build/stm32g0xx_ll_gpio.o
  .text.LL_GPIO_SetPinOutputType
-                0x0800b0ec       0x2a build/stm32g0xx_ll_gpio.o
+                0x0800b13c       0x2a build/stm32g0xx_ll_gpio.o
  .text.LL_GPIO_SetPinSpeed
-                0x0800b116       0x38 build/stm32g0xx_ll_gpio.o
+                0x0800b166       0x38 build/stm32g0xx_ll_gpio.o
  .text.LL_GPIO_SetPinPull
-                0x0800b14e       0x38 build/stm32g0xx_ll_gpio.o
+                0x0800b19e       0x38 build/stm32g0xx_ll_gpio.o
  .text.LL_GPIO_SetAFPin_0_7
-                0x0800b186       0x46 build/stm32g0xx_ll_gpio.o
+                0x0800b1d6       0x46 build/stm32g0xx_ll_gpio.o
  .text.LL_GPIO_SetAFPin_8_15
-                0x0800b1cc       0x5a build/stm32g0xx_ll_gpio.o
+                0x0800b21c       0x5a build/stm32g0xx_ll_gpio.o
  .text.LL_GPIO_Init
-                0x0800b226       0xb6 build/stm32g0xx_ll_gpio.o
-                0x0800b226                LL_GPIO_Init
+                0x0800b276       0xb6 build/stm32g0xx_ll_gpio.o
+                0x0800b276                LL_GPIO_Init
  .text.LL_USART_IsActiveFlag_RXNE_RXFNE
-                0x0800b2dc       0x22 build/ymodem.o
+                0x0800b32c       0x22 build/ymodem.o
  .text.LL_USART_IsActiveFlag_TXE_TXFNF
-                0x0800b2fe       0x22 build/ymodem.o
+                0x0800b34e       0x22 build/ymodem.o
  .text.LL_USART_ReceiveData8
-                0x0800b320       0x16 build/ymodem.o
+                0x0800b370       0x16 build/ymodem.o
  .text.LL_USART_TransmitData8
-                0x0800b336       0x1e build/ymodem.o
+                0x0800b386       0x1e build/ymodem.o
  .text.uart_recv_byte
-                0x0800b354       0x54 build/ymodem.o
+                0x0800b3a4       0x54 build/ymodem.o
  .text.uart_send_byte
-                0x0800b3a8       0x34 build/ymodem.o
+                0x0800b3f8       0x34 build/ymodem.o
  .text.ymodem_send_cancel
-                0x0800b3dc       0x16 build/ymodem.o
- *fill*         0x0800b3f2        0x2 
+                0x0800b42c       0x16 build/ymodem.o
+ *fill*         0x0800b442        0x2 
  .text.crc16_ccitt
-                0x0800b3f4       0xa4 build/ymodem.o
+                0x0800b444       0xa4 build/ymodem.o
  .text.ymodem_receive_packet
-                0x0800b498      0x164 build/ymodem.o
+                0x0800b4e8      0x164 build/ymodem.o
  .text.flash_write
-                0x0800b5fc       0x84 build/ymodem.o
+                0x0800b64c       0x84 build/ymodem.o
  .text.Ymodem_ReceiveToW25Qxx
-                0x0800b680      0x2dc build/ymodem.o
-                0x0800b680                Ymodem_ReceiveToW25Qxx
+                0x0800b6d0      0x2dc build/ymodem.o
+                0x0800b6d0                Ymodem_ReceiveToW25Qxx
  .text.HAL_GPIO_EXTI_Rising_Callback
-                0x0800b95c       0x30 build/pm.o
-                0x0800b95c                HAL_GPIO_EXTI_Rising_Callback
+                0x0800b9ac       0x30 build/pm.o
+                0x0800b9ac                HAL_GPIO_EXTI_Rising_Callback
  .text.HAL_RTCEx_WakeUpTimerEventCallback
-                0x0800b98c       0x20 build/pm.o
-                0x0800b98c                HAL_RTCEx_WakeUpTimerEventCallback
+                0x0800b9dc       0x20 build/pm.o
+                0x0800b9dc                HAL_RTCEx_WakeUpTimerEventCallback
  .text.LL_USART_IsActiveFlag_ORE
-                0x0800b9ac       0x22 build/sensor.o
+                0x0800b9fc       0x22 build/sensor.o
  .text.LL_USART_IsActiveFlag_RXNE_RXFNE
-                0x0800b9ce       0x22 build/sensor.o
+                0x0800ba1e       0x22 build/sensor.o
  .text.LL_USART_IsActiveFlag_TC
-                0x0800b9f0       0x22 build/sensor.o
+                0x0800ba40       0x22 build/sensor.o
  .text.LL_USART_ClearFlag_ORE
-                0x0800ba12       0x16 build/sensor.o
+                0x0800ba62       0x16 build/sensor.o
  .text.LL_USART_ClearFlag_TC
-                0x0800ba28       0x16 build/sensor.o
+                0x0800ba78       0x16 build/sensor.o
  .text.LL_USART_DisableIT_TC
-                0x0800ba3e       0x40 build/sensor.o
+                0x0800ba8e       0x40 build/sensor.o
  .text.LL_USART_DisableIT_ERROR
-                0x0800ba7e       0x40 build/sensor.o
+                0x0800bace       0x40 build/sensor.o
  .text.LL_USART_IsEnabledIT_RXNE_RXFNE
-                0x0800babe       0x22 build/sensor.o
+                0x0800bb0e       0x22 build/sensor.o
  .text.LL_USART_IsEnabledIT_TC
-                0x0800bae0       0x22 build/sensor.o
+                0x0800bb30       0x22 build/sensor.o
  .text.LL_USART_ReceiveData8
-                0x0800bb02       0x16 build/sensor.o
+                0x0800bb52       0x16 build/sensor.o
  .text.sensor_irq_handle
-                0x0800bb18       0xac build/sensor.o
-                0x0800bb18                sensor_irq_handle
+                0x0800bb68       0xac build/sensor.o
+                0x0800bb68                sensor_irq_handle
  .text.LL_USART_IsActiveFlag_ORE
-                0x0800bbc4       0x22 build/rtu.o
+                0x0800bc14       0x22 build/rtu.o
  .text.LL_USART_IsActiveFlag_RXNE_RXFNE
-                0x0800bbe6       0x22 build/rtu.o
+                0x0800bc36       0x22 build/rtu.o
  .text.LL_USART_IsActiveFlag_TC
-                0x0800bc08       0x22 build/rtu.o
+                0x0800bc58       0x22 build/rtu.o
  .text.LL_USART_ClearFlag_ORE
-                0x0800bc2a       0x16 build/rtu.o
+                0x0800bc7a       0x16 build/rtu.o
  .text.LL_USART_ClearFlag_TC
-                0x0800bc40       0x16 build/rtu.o
+                0x0800bc90       0x16 build/rtu.o
  .text.LL_USART_DisableIT_TC
-                0x0800bc56       0x40 build/rtu.o
+                0x0800bca6       0x40 build/rtu.o
  .text.LL_USART_DisableIT_ERROR
-                0x0800bc96       0x40 build/rtu.o
+                0x0800bce6       0x40 build/rtu.o
  .text.LL_USART_IsEnabledIT_RXNE_RXFNE
-                0x0800bcd6       0x22 build/rtu.o
+                0x0800bd26       0x22 build/rtu.o
  .text.LL_USART_IsEnabledIT_TC
-                0x0800bcf8       0x22 build/rtu.o
+                0x0800bd48       0x22 build/rtu.o
  .text.LL_USART_ReceiveData8
-                0x0800bd1a       0x16 build/rtu.o
+                0x0800bd6a       0x16 build/rtu.o
  .text.rtu_irq_handle
-                0x0800bd30       0xac build/rtu.o
-                0x0800bd30                rtu_irq_handle
+                0x0800bd80       0xac build/rtu.o
+                0x0800bd80                rtu_irq_handle
  .text.W25qxx_SPI_Init
-                0x0800bddc        0xe build/w25qxxPort.o
-                0x0800bddc                W25qxx_SPI_Init
- *fill*         0x0800bdea        0x2 
+                0x0800be2c        0xe build/w25qxxPort.o
+                0x0800be2c                W25qxx_SPI_Init
+ *fill*         0x0800be3a        0x2 
  .text.W25qxx_Spi
-                0x0800bdec       0x30 build/w25qxxPort.o
-                0x0800bdec                W25qxx_Spi
+                0x0800be3c       0x30 build/w25qxxPort.o
+                0x0800be3c                W25qxx_Spi
  .text.W25qxx_Spi_Transmit
-                0x0800be1c       0x30 build/w25qxxPort.o
-                0x0800be1c                W25qxx_Spi_Transmit
+                0x0800be6c       0x30 build/w25qxxPort.o
+                0x0800be6c                W25qxx_Spi_Transmit
  .text.W25qxx_Select
-                0x0800be4c       0x1a build/w25qxxPort.o
-                0x0800be4c                W25qxx_Select
+                0x0800be9c       0x1a build/w25qxxPort.o
+                0x0800be9c                W25qxx_Select
  .text.W25qxx_Deselect
-                0x0800be66       0x1a build/w25qxxPort.o
-                0x0800be66                W25qxx_Deselect
+                0x0800beb6       0x1a build/w25qxxPort.o
+                0x0800beb6                W25qxx_Deselect
  .text.W25qxx_Delay
-                0x0800be80       0x18 build/w25qxxPort.o
-                0x0800be80                W25qxx_Delay
+                0x0800bed0       0x18 build/w25qxxPort.o
+                0x0800bed0                W25qxx_Delay
  .text.W25qxx_ReadID
-                0x0800be98       0x5c build/w25qxx.o
-                0x0800be98                W25qxx_ReadID
+                0x0800bee8       0x5c build/w25qxx.o
+                0x0800bee8                W25qxx_ReadID
  .text.W25qxx_ReadUniqID
-                0x0800bef4       0x70 build/w25qxx.o
-                0x0800bef4                W25qxx_ReadUniqID
+                0x0800bf44       0x70 build/w25qxx.o
+                0x0800bf44                W25qxx_ReadUniqID
  .text.W25qxx_WriteEnable
-                0x0800bf64       0x1e build/w25qxx.o
-                0x0800bf64                W25qxx_WriteEnable
- *fill*         0x0800bf82        0x2 
+                0x0800bfb4       0x1e build/w25qxx.o
+                0x0800bfb4                W25qxx_WriteEnable
+ *fill*         0x0800bfd2        0x2 
  .text.W25qxx_ReadStatusRegister
-                0x0800bf84       0x9c build/w25qxx.o
-                0x0800bf84                W25qxx_ReadStatusRegister
+                0x0800bfd4       0x9c build/w25qxx.o
+                0x0800bfd4                W25qxx_ReadStatusRegister
  .text.W25qxx_WaitForWriteEnd
-                0x0800c020       0x48 build/w25qxx.o
-                0x0800c020                W25qxx_WaitForWriteEnd
+                0x0800c070       0x48 build/w25qxx.o
+                0x0800c070                W25qxx_WaitForWriteEnd
  .text.W25qxx_Init
-                0x0800c068      0x168 build/w25qxx.o
-                0x0800c068                W25qxx_Init
+                0x0800c0b8      0x168 build/w25qxx.o
+                0x0800c0b8                W25qxx_Init
  .text.W25qxx_EraseSector
-                0x0800c1d0       0x98 build/w25qxx.o
-                0x0800c1d0                W25qxx_EraseSector
+                0x0800c220       0x98 build/w25qxx.o
+                0x0800c220                W25qxx_EraseSector
  .text.W25qxx_WriteByte
-                0x0800c268       0x98 build/w25qxx.o
-                0x0800c268                W25qxx_WriteByte
+                0x0800c2b8       0x98 build/w25qxx.o
+                0x0800c2b8                W25qxx_WriteByte
  .text.W25qxx_WritePage
-                0x0800c300       0xec build/w25qxx.o
-                0x0800c300                W25qxx_WritePage
+                0x0800c350       0xec build/w25qxx.o
+                0x0800c350                W25qxx_WritePage
  .text.Reset_Handler
-                0x0800c3ec       0x50 build/startup_stm32g070xx.o
-                0x0800c3ec                Reset_Handler
+                0x0800c43c       0x50 build/startup_stm32g070xx.o
+                0x0800c43c                Reset_Handler
  .text.Default_Handler
-                0x0800c43c        0x2 build/startup_stm32g070xx.o
-                0x0800c43c                TIM1_CC_IRQHandler
-                0x0800c43c                TIM6_IRQHandler
-                0x0800c43c                I2C1_IRQHandler
-                0x0800c43c                SPI1_IRQHandler
-                0x0800c43c                EXTI2_3_IRQHandler
-                0x0800c43c                ADC1_IRQHandler
-                0x0800c43c                I2C2_IRQHandler
-                0x0800c43c                TIM17_IRQHandler
-                0x0800c43c                TIM16_IRQHandler
-                0x0800c43c                TIM3_IRQHandler
-                0x0800c43c                RCC_IRQHandler
-                0x0800c43c                Default_Handler
-                0x0800c43c                TIM14_IRQHandler
-                0x0800c43c                TIM7_IRQHandler
-                0x0800c43c                TIM15_IRQHandler
-                0x0800c43c                EXTI0_1_IRQHandler
-                0x0800c43c                SPI2_IRQHandler
-                0x0800c43c                WWDG_IRQHandler
-                0x0800c43c                DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler
-                0x0800c43c                DMA1_Channel2_3_IRQHandler
-                0x0800c43c                FLASH_IRQHandler
-                0x0800c43c                USART1_IRQHandler
-                0x0800c43c                TIM1_BRK_UP_TRG_COM_IRQHandler
- *fill*         0x0800c43e        0x2 
+                0x0800c48c        0x2 build/startup_stm32g070xx.o
+                0x0800c48c                TIM1_CC_IRQHandler
+                0x0800c48c                TIM6_IRQHandler
+                0x0800c48c                I2C1_IRQHandler
+                0x0800c48c                SPI1_IRQHandler
+                0x0800c48c                EXTI2_3_IRQHandler
+                0x0800c48c                ADC1_IRQHandler
+                0x0800c48c                I2C2_IRQHandler
+                0x0800c48c                TIM17_IRQHandler
+                0x0800c48c                TIM16_IRQHandler
+                0x0800c48c                TIM3_IRQHandler
+                0x0800c48c                RCC_IRQHandler
+                0x0800c48c                Default_Handler
+                0x0800c48c                TIM14_IRQHandler
+                0x0800c48c                TIM7_IRQHandler
+                0x0800c48c                TIM15_IRQHandler
+                0x0800c48c                EXTI0_1_IRQHandler
+                0x0800c48c                SPI2_IRQHandler
+                0x0800c48c                WWDG_IRQHandler
+                0x0800c48c                DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler
+                0x0800c48c                DMA1_Channel2_3_IRQHandler
+                0x0800c48c                FLASH_IRQHandler
+                0x0800c48c                USART1_IRQHandler
+                0x0800c48c                TIM1_BRK_UP_TRG_COM_IRQHandler
+ *fill*         0x0800c48e        0x2 
  .text.__libc_init_array
-                0x0800c440       0x48 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o)
-                0x0800c440                __libc_init_array
- .text.memset   0x0800c488       0x10 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o)
-                0x0800c488                memset
+                0x0800c490       0x48 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-init.o)
+                0x0800c490                __libc_init_array
+ .text.memset   0x0800c4d8       0x10 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-memset.o)
+                0x0800c4d8                memset
  .text._strtoul_l.constprop.0
-                0x0800c498      0x114 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strtoul.o)
- .text.strtoul  0x0800c5ac       0x18 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strtoul.o)
-                0x0800c5ac                strtoul
+                0x0800c4e8      0x114 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strtoul.o)
+ .text.strtoul  0x0800c5fc       0x18 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-strtoul.o)
+                0x0800c5fc                strtoul
  *(.glue_7)
- .glue_7        0x0800c5c4        0x0 linker stubs
+ .glue_7        0x0800c614        0x0 linker stubs
  *(.glue_7t)
- .glue_7t       0x0800c5c4        0x0 linker stubs
+ .glue_7t       0x0800c614        0x0 linker stubs
  *(.eh_frame)
- .eh_frame      0x0800c5c4        0x0 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
+ .eh_frame      0x0800c614        0x0 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
  *(.init)
- .init          0x0800c5c4        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crti.o
-                0x0800c5c4                _init
- .init          0x0800c5c8        0x8 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtn.o
+ .init          0x0800c614        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crti.o
+                0x0800c614                _init
+ .init          0x0800c618        0x8 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtn.o
  *(.fini)
- .fini          0x0800c5d0        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crti.o
-                0x0800c5d0                _fini
- .fini          0x0800c5d4        0x8 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtn.o
-                0x0800c5dc                . = ALIGN (0x4)
-                0x0800c5dc                _etext = .
+ .fini          0x0800c620        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crti.o
+                0x0800c620                _fini
+ .fini          0x0800c624        0x8 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtn.o
+                0x0800c62c                . = ALIGN (0x4)
+                0x0800c62c                _etext = .
 
-.vfp11_veneer   0x0800c5dc        0x0
- .vfp11_veneer  0x0800c5dc        0x0 linker stubs
+.vfp11_veneer   0x0800c62c        0x0
+ .vfp11_veneer  0x0800c62c        0x0 linker stubs
 
-.v4_bx          0x0800c5dc        0x0
- .v4_bx         0x0800c5dc        0x0 linker stubs
+.v4_bx          0x0800c62c        0x0
+ .v4_bx         0x0800c62c        0x0 linker stubs
 
-.iplt           0x0800c5dc        0x0
- .iplt          0x0800c5dc        0x0 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
+.iplt           0x0800c62c        0x0
+ .iplt          0x0800c62c        0x0 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
 
-.rodata         0x0800c5dc      0x21c
-                0x0800c5dc                . = ALIGN (0x4)
+.rodata         0x0800c62c      0x21c
+                0x0800c62c                . = ALIGN (0x4)
  *(.rodata)
  *(.rodata*)
  .rodata.AHBPrescTable
-                0x0800c5dc       0x40 build/system_stm32g0xx.o
-                0x0800c5dc                AHBPrescTable
+                0x0800c62c       0x40 build/system_stm32g0xx.o
+                0x0800c62c                AHBPrescTable
  .rodata.APBPrescTable
-                0x0800c61c       0x20 build/system_stm32g0xx.o
-                0x0800c61c                APBPrescTable
+                0x0800c66c       0x20 build/system_stm32g0xx.o
+                0x0800c66c                APBPrescTable
  .rodata.USART_PRESCALER_TAB
-                0x0800c63c       0x30 build/stm32g0xx_ll_usart.o
+                0x0800c68c       0x30 build/stm32g0xx_ll_usart.o
  .rodata.W25qxx_Init
-                0x0800c66c       0x28 build/w25qxx.o
+                0x0800c6bc       0x28 build/w25qxx.o
  .rodata._ctype_
-                0x0800c694      0x101 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o)
-                0x0800c694                _ctype_
- *fill*         0x0800c795        0x3 
+                0x0800c6e4      0x101 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-ctype_.o)
+                0x0800c6e4                _ctype_
+ *fill*         0x0800c7e5        0x3 
  .rodata.__sf_fake_stderr
-                0x0800c798       0x20 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o)
-                0x0800c798                __sf_fake_stderr
+                0x0800c7e8       0x20 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o)
+                0x0800c7e8                __sf_fake_stderr
  .rodata.__sf_fake_stdin
-                0x0800c7b8       0x20 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o)
-                0x0800c7b8                __sf_fake_stdin
+                0x0800c808       0x20 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o)
+                0x0800c808                __sf_fake_stdin
  .rodata.__sf_fake_stdout
-                0x0800c7d8       0x20 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o)
-                0x0800c7d8                __sf_fake_stdout
-                0x0800c7f8                . = ALIGN (0x4)
+                0x0800c828       0x20 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(lib_a-findfp.o)
+                0x0800c828                __sf_fake_stdout
+                0x0800c848                . = ALIGN (0x4)
 
-.rel.dyn        0x0800c7f8        0x0
- .rel.iplt      0x0800c7f8        0x0 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
+.rel.dyn        0x0800c848        0x0
+ .rel.iplt      0x0800c848        0x0 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
 
 .ARM.extab
  *(.ARM.extab* .gnu.linkonce.armextab.*)
 
-.ARM            0x0800c7f8        0x0
-                0x0800c7f8                __exidx_start = .
+.ARM            0x0800c848        0x0
+                0x0800c848                __exidx_start = .
  *(.ARM.exidx*)
-                0x0800c7f8                __exidx_end = .
+                0x0800c848                __exidx_end = .
 
-.preinit_array  0x0800c7f8        0x0
-                0x0800c7f8                PROVIDE (__preinit_array_start = .)
+.preinit_array  0x0800c848        0x0
+                0x0800c848                PROVIDE (__preinit_array_start = .)
  *(.preinit_array*)
-                0x0800c7f8                PROVIDE (__preinit_array_end = .)
+                0x0800c848                PROVIDE (__preinit_array_end = .)
 
-.init_array     0x0800c7f8        0x4
-                0x0800c7f8                PROVIDE (__init_array_start = .)
+.init_array     0x0800c848        0x4
+                0x0800c848                PROVIDE (__init_array_start = .)
  *(SORT_BY_NAME(.init_array.*))
  *(.init_array*)
- .init_array    0x0800c7f8        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
-                0x0800c7fc                PROVIDE (__init_array_end = .)
+ .init_array    0x0800c848        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
+                0x0800c84c                PROVIDE (__init_array_end = .)
 
-.fini_array     0x0800c7fc        0x4
+.fini_array     0x0800c84c        0x4
                 [!provide]                PROVIDE (__fini_array_start = .)
  *(SORT_BY_NAME(.fini_array.*))
  *(.fini_array*)
- .fini_array    0x0800c7fc        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
+ .fini_array    0x0800c84c        0x4 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
                 [!provide]                PROVIDE (__fini_array_end = .)
-                0x0800c800                _sidata = LOADADDR (.data)
+                0x0800c850                _sidata = LOADADDR (.data)
 
-.data           0x20000000       0x70 load address 0x0800c800
+.data           0x20000000       0x70 load address 0x0800c850
                 0x20000000                . = ALIGN (0x4)
                 0x20000000                _sdata = .
  *(.data)
@@ -3229,11 +3229,11 @@ LOAD f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10
                 0x20000070                . = ALIGN (0x4)
                 0x20000070                _edata = .
 
-.igot.plt       0x20000070        0x0 load address 0x0800c870
+.igot.plt       0x20000070        0x0 load address 0x0800c8c0
  .igot.plt      0x20000070        0x0 f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/thumb/v6-m/nofp/crtbegin.o
                 0x20000070                . = ALIGN (0x4)
 
-.bss            0x20000070      0x2b8 load address 0x0800c870
+.bss            0x20000070      0x2b8 load address 0x0800c8c0
                 0x20000070                _sbss = .
                 0x20000070                __bss_start__ = _sbss
  *(.bss)
@@ -3264,7 +3264,7 @@ LOAD f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10
                 0x20000328                __bss_end__ = _ebss
 
 ._user_heap_stack
-                0x20000328     0x1000 load address 0x0800c870
+                0x20000328     0x1000 load address 0x0800c8c0
                 0x20000328                . = ALIGN (0x8)
                 [!provide]                PROVIDE (end = .)
                 0x20000328                PROVIDE (_end = .)
@@ -3560,37 +3560,37 @@ LOAD f:/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10
  .debug_ranges  0x00000f50      0x138 build/w25qxx.o
  .debug_ranges  0x00001088       0x20 build/startup_stm32g070xx.o
 
-.debug_line     0x00000000     0xbc77
- .debug_line    0x00000000      0x2b5 build/main.o
- .debug_line    0x000002b5      0x1e3 build/gpio.o
- .debug_line    0x00000498      0x2c4 build/adc.o
- .debug_line    0x0000075c      0x292 build/rtc.o
- .debug_line    0x000009ee      0x27f build/spi.o
- .debug_line    0x00000c6d      0x636 build/usart.o
- .debug_line    0x000012a3      0x2a0 build/stm32g0xx_it.o
- .debug_line    0x00001543      0x191 build/stm32g0xx_hal_msp.o
- .debug_line    0x000016d4      0x9ed build/stm32g0xx_hal_rcc.o
- .debug_line    0x000020c1      0x5bc build/stm32g0xx_hal_rcc_ex.o
- .debug_line    0x0000267d      0x79d build/stm32g0xx_ll_rcc.o
- .debug_line    0x00002e1a      0x5c7 build/stm32g0xx_hal_gpio.o
- .debug_line    0x000033e1      0x7fa build/stm32g0xx_hal_dma.o
- .debug_line    0x00003bdb      0x31c build/stm32g0xx_hal_pwr.o
- .debug_line    0x00003ef7      0x3f5 build/stm32g0xx_hal_pwr_ex.o
- .debug_line    0x000042ec      0x62b build/stm32g0xx_hal_cortex.o
- .debug_line    0x00004917      0x500 build/stm32g0xx_hal.o
- .debug_line    0x00004e17      0xbc7 build/stm32g0xx_hal_rtc.o
- .debug_line    0x000059de      0xfbf build/stm32g0xx_hal_rtc_ex.o
- .debug_line    0x0000699d     0x19ba build/stm32g0xx_hal_spi.o
- .debug_line    0x00008357      0x23b build/system_stm32g0xx.o
- .debug_line    0x00008592      0x3f7 build/stm32g0xx_ll_usart.o
- .debug_line    0x00008989      0x34b build/stm32g0xx_ll_gpio.o
- .debug_line    0x00008cd4      0x516 build/ymodem.o
- .debug_line    0x000091ea      0x455 build/pm.o
- .debug_line    0x0000963f      0x7fe build/sensor.o
- .debug_line    0x00009e3d      0xe6c build/rtu.o
- .debug_line    0x0000aca9      0x2c9 build/w25qxxPort.o
- .debug_line    0x0000af72      0xc8e build/w25qxx.o
- .debug_line    0x0000bc00       0x77 build/startup_stm32g070xx.o
+.debug_line     0x00000000     0xbc8f
+ .debug_line    0x00000000      0x2cd build/main.o
+ .debug_line    0x000002cd      0x1e3 build/gpio.o
+ .debug_line    0x000004b0      0x2c4 build/adc.o
+ .debug_line    0x00000774      0x292 build/rtc.o
+ .debug_line    0x00000a06      0x27f build/spi.o
+ .debug_line    0x00000c85      0x636 build/usart.o
+ .debug_line    0x000012bb      0x2a0 build/stm32g0xx_it.o
+ .debug_line    0x0000155b      0x191 build/stm32g0xx_hal_msp.o
+ .debug_line    0x000016ec      0x9ed build/stm32g0xx_hal_rcc.o
+ .debug_line    0x000020d9      0x5bc build/stm32g0xx_hal_rcc_ex.o
+ .debug_line    0x00002695      0x79d build/stm32g0xx_ll_rcc.o
+ .debug_line    0x00002e32      0x5c7 build/stm32g0xx_hal_gpio.o
+ .debug_line    0x000033f9      0x7fa build/stm32g0xx_hal_dma.o
+ .debug_line    0x00003bf3      0x31c build/stm32g0xx_hal_pwr.o
+ .debug_line    0x00003f0f      0x3f5 build/stm32g0xx_hal_pwr_ex.o
+ .debug_line    0x00004304      0x62b build/stm32g0xx_hal_cortex.o
+ .debug_line    0x0000492f      0x500 build/stm32g0xx_hal.o
+ .debug_line    0x00004e2f      0xbc7 build/stm32g0xx_hal_rtc.o
+ .debug_line    0x000059f6      0xfbf build/stm32g0xx_hal_rtc_ex.o
+ .debug_line    0x000069b5     0x19ba build/stm32g0xx_hal_spi.o
+ .debug_line    0x0000836f      0x23b build/system_stm32g0xx.o
+ .debug_line    0x000085aa      0x3f7 build/stm32g0xx_ll_usart.o
+ .debug_line    0x000089a1      0x34b build/stm32g0xx_ll_gpio.o
+ .debug_line    0x00008cec      0x516 build/ymodem.o
+ .debug_line    0x00009202      0x455 build/pm.o
+ .debug_line    0x00009657      0x7fe build/sensor.o
+ .debug_line    0x00009e55      0xe6c build/rtu.o
+ .debug_line    0x0000acc1      0x2c9 build/w25qxxPort.o
+ .debug_line    0x0000af8a      0xc8e build/w25qxx.o
+ .debug_line    0x0000bc18       0x77 build/startup_stm32g070xx.o
 
 .debug_str      0x00000000     0x4c99
  .debug_str     0x00000000      0x475 build/main.o

File diff ditekan karena terlalu besar
+ 485 - 437
ctrl_board_g070_app/build/main.lst


+ 14 - 5
ctrl_board_g070_bootloader/Core/Src/main.c

@@ -97,10 +97,19 @@ static int boot_copy_fw_from_ext(void)
 
     // 2. 读长度
     W25qxx_ReadBytes(size_buf,EXT_FLASH_FW_SIZE_ADDR, 4);
-    size_high = (uint16_t)((size_buf[0] << 8) | size_buf[1]);
-    size_low  = (uint16_t)((size_buf[2] << 8) | size_buf[3]);
-
-    fw_size = FW_SIZE_FROM_16(size_high, size_low);
+    // size_high = (uint16_t)((size_buf[0] << 8) | size_buf[1]);
+    // size_low  = (uint16_t)((size_buf[2] << 8) | size_buf[3]);
+    fw_size = (uint16_t)((size_buf[1] << 8) | size_buf[0]);
+    LL_USART_TransmitData8(COM_DBG, size_buf[0]); 
+    while (!LL_USART_IsActiveFlag_TC(COM_DBG));
+    LL_USART_TransmitData8(COM_DBG, size_buf[1]); 
+    while (!LL_USART_IsActiveFlag_TC(COM_DBG));
+          LL_USART_TransmitData8(COM_DBG, size_buf[2]); 
+    while (!LL_USART_IsActiveFlag_TC(COM_DBG));
+          LL_USART_TransmitData8(COM_DBG, size_buf[3]); 
+    while (!LL_USART_IsActiveFlag_TC(COM_DBG));
+
+    //fw_size = FW_SIZE_FROM_16(size_high, size_low);
 
     // 基本校验
     if (fw_size == 0 || fw_size > APP_MAX_SIZE) {
@@ -224,7 +233,7 @@ int main(void)
   while (1)
   {
     /* USER CODE END WHILE */
-      LL_USART_TransmitData8(COM_DBG, r); //调试口发C
+      LL_USART_TransmitData8(COM_DBG, r); //调试口发
       while (!LL_USART_IsActiveFlag_TC(COM_DBG));
       HAL_Delay(1000);
       i++;