mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
更新BootLoader为USB传输,替代V1版本中的usart
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user