更新BootLoader为USB传输,替代V1版本中的usart

This commit is contained in:
不吃油炸鸡
2026-02-01 13:03:39 +08:00
parent 1682beb979
commit a6850f40e9
53 changed files with 17948 additions and 9595 deletions

View File

@@ -51,6 +51,18 @@
Note: the 1st sector 0x08000000-0x08003FFF is reserved for the IAP code */
#define APPLICATION_ADDRESS (uint32_t)0x0800C000
/* Exported types ------------------------------------------------------------*/
#define UPGRADE_INFO_ADDRESS (USER_FLASH_END_ADDRESS - sizeof(UpgradeInfo_t) + 1)
// 定义升级信息结构体
typedef struct {
uint32_t magic_word; // 魔法字,如 0xDEADBEEF用于标识此结构体有效
uint32_t upgrade_status; // 升级状态标志
uint32_t new_app_size; // 新APP的固件大小
uint32_t new_app_crc32; // 新APP的CRC32校验和
} UpgradeInfo_t;
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void FLASH_If_Init(void);