shuichan_old/STM32F103_BootLoader/m_app/ota_boot.h

29 lines
886 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef OTA_BOOT_H
#define OTA_BOOT_H
/*===== 用户配置(已适配 W25Q64 外部 Flash OTA =====*/
#define PageSize 0x800U // Flash页大小 RCT6=2KB
// STM32F103RCT6: 256KB Flash (0x08000000 ~ 0x0803FFFF)
// 新分区BootLoader=32KB, APP1=224KB, 取消内部 APP2OTA 固件先存 W25Q64
#define BootLoader_addr 0x08000000U ///< BootLoader 基首地址
#define Application_1_Addr 0x08008000U ///< APP1 运行区基首地址
#define BootLoader_Size 0x8000U ///< BootLoader 大小 32K
#define Application_Size 0x38000U ///< APP1 大小 224K
/* 启动模式参数(保留兼容,实际启动由 W25Q64 信息区决定) */
#define Startup_Normol 0xFFFFFFFF ///< 正常启动
#define Startup_Update 0xAAAAAAAA ///< 进行程序更新
#define Startup_OtaNow 0x55555555 ///< 立即进行OTA
#define Startup_Reset 0x5555AAAA ///< 恢复出厂,未使用
/*==========================================*/
void Start_BootLoader(void);
#endif