Compare commits
1 Commits
74960e18ff
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| aef9d4effe |
+2
-1
@@ -84,7 +84,6 @@ static void update_on_download(uint8_t* frame, int len, uint8_t* pload, int size
|
|||||||
|
|
||||||
if (crc_rom == g_update.cfg.Crc32Check)
|
if (crc_rom == g_update.cfg.Crc32Check)
|
||||||
{
|
{
|
||||||
g_update.cfg.AppFlag = 0;
|
|
||||||
g_update.cfg.UpdateFlag = 0;
|
g_update.cfg.UpdateFlag = 0;
|
||||||
g_update.cfg.PackageNum = 0;
|
g_update.cfg.PackageNum = 0;
|
||||||
|
|
||||||
@@ -188,6 +187,8 @@ int app_update_entry(struct pt *pt)
|
|||||||
if (g_update.cfg.UpdateFlag == APP_UPDATE_FLAG)
|
if (g_update.cfg.UpdateFlag == APP_UPDATE_FLAG)
|
||||||
{
|
{
|
||||||
g_update.isNeedUpdate = 1;
|
g_update.isNeedUpdate = 1;
|
||||||
|
g_update.cfg.AppFlag = APP_BOOT_UPGRADE_FLAG;
|
||||||
|
dev_boot_write_param(g_update.cfg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-2
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#define APP_START_FLAG 0x55AA5A5A
|
#define APP_START_FLAG 0x55AA5A5A
|
||||||
#define APP_UPDATE_FLAG 0xA5A5AA55
|
#define APP_UPDATE_FLAG 0xA5A5AA55
|
||||||
|
#define APP_BOOT_UPGRADE_FLAG 0x5A5A55A5
|
||||||
|
|
||||||
#define BOOT_BASE (FLASH_BASE)
|
#define BOOT_BASE (FLASH_BASE)
|
||||||
#define BOOT_SIZE (4*FLASH_SECTOR_SIZE)
|
#define BOOT_SIZE (4*FLASH_SECTOR_SIZE)
|
||||||
@@ -15,8 +16,6 @@
|
|||||||
#define BOOT_PARA_ADDRESS (APP_ADDRESS + APP_SIZE)
|
#define BOOT_PARA_ADDRESS (APP_ADDRESS + APP_SIZE)
|
||||||
#define BOOT_PARA_SIZE (FLASH_SECTOR_SIZE)
|
#define BOOT_PARA_SIZE (FLASH_SECTOR_SIZE)
|
||||||
|
|
||||||
#define APP_START_FLAG 0x55AA5A5A
|
|
||||||
#define APP_UPDATE_FLAG 0xA5A5AA55
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t AppFlag;
|
uint32_t AppFlag;
|
||||||
|
|||||||
Reference in New Issue
Block a user