From: kyz Date: Thu, 30 May 2024 03:10:00 +0000 (+0800) Subject: modify bootloader version X-Git-Url: http://kyz.pub/gitweb/?a=commitdiff_plain;h=aa4693b98f13cded68a361fdb964a8e709619a9d;p=yn%2Fweldingcontroller.git modify bootloader version --- diff --git a/MDK-ARM/bootloader.uvprojx b/MDK-ARM/bootloader.uvprojx index 51a9666..bb19bb2 100644 --- a/MDK-ARM/bootloader.uvprojx +++ b/MDK-ARM/bootloader.uvprojx @@ -459,11 +459,6 @@ 1 ../Core/Src/i2c.c - - spi.c - 1 - ../Core/Src/spi.c - tim.c 1 diff --git a/user/bootloader.c b/user/bootloader.c index 326603c..0c96cfa 100644 --- a/user/bootloader.c +++ b/user/bootloader.c @@ -23,7 +23,6 @@ #include "dac.h" #include "dma.h" #include "i2c.h" -#include "spi.h" #include "tim.h" #include "usart.h" #include "usb_device.h" @@ -39,7 +38,7 @@ void SystemClock_Config(void); void PeriphCommonClock_Config(void); void MX_FREERTOS_Init(void); -const uint8_t SW_VER[16] = {1,1,}; //bootloader version +const uint8_t SW_VER[4] = {1,2,}; //bootloader version uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len); diff --git a/user/user_cdc_rx_2.c b/user/user_cdc_rx_2.c index cce61ea..6dceaa9 100644 --- a/user/user_cdc_rx_2.c +++ b/user/user_cdc_rx_2.c @@ -349,6 +349,8 @@ int32_t load_app( void ) } #endif // BOOTLOADER +extern uint8_t SW_VER[]; + int32_t handle_cdc_pkt( cdc_pkt_t *pkt ) { static uint8_t tx_pkt[250]; @@ -388,8 +390,8 @@ int32_t handle_cdc_pkt( cdc_pkt_t *pkt ) #ifdef BOOTLOADER resp[0] = 0; resp[1] = 'B'; - resp[2] = 1; //BOOT_VER_MAJOR; - resp[3] = 0; //BOOT_VER_MINOR; + resp[2] = SW_VER[0]; //BOOT_VER_MAJOR; + resp[3] = SW_VER[1]; //BOOT_VER_MINOR; put_u32_big( &resp[4], 0 ); //fw size put_u32_big( &resp[8], 0 ); //fw crc #else