第一次提交

This commit is contained in:
2025-10-04 16:06:55 +08:00
commit 2acba0caf0
58 changed files with 11679 additions and 0 deletions

69
interface_boot.h Normal file
View File

@@ -0,0 +1,69 @@
#ifndef __INTERFACE_BOOT_H_
#define __INTERFACE_BOOT_H_
#include <stdbool.h>
#include <stdio.h>
#include "stdint.h"
#include <rom_ctrl/rom_ctrl.h>
//#define WDTGPIO GPIO_H13
#define WDTGPIO GPIO_F5
typedef struct {
volatile uint8_t canBootloaderUpgrade; //CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־λ
uint8_t test1;
uint8_t test2;
uint8_t test3;
} SystemDataRecord;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>APPͬ<50><CDAC>
typedef enum{
NORMAL_ON = 0,
CAN_BOOTLOADER_UPGRADE,
}UpgradeFlag;
#define Update_Flg_E2adr 0x0 //ռ<><D5BC>1<EFBFBD><31><EFBFBD>ֽ<EFBFBD>
#define BOOT0_VERSION_E2adr 0x1 //ռ<><D5BC>5<EFBFBD><35><EFBFBD>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><><CAB1>+<2B><EFBFBD><E6B1BE> 20 24 08 08 01
#define BOOT1_VERSION_E2adr 0x6 //ռ<><D5BC>5<EFBFBD><35><EFBFBD>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><><CAB1>+<2B><EFBFBD><E6B1BE> 20 24 08 08 01
#define APP_VERSION_E2adr 0xB //ռ<><D5BC>5<EFBFBD><35><EFBFBD>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><><CAB1>+<2B><EFBFBD><E6B1BE> 20 24 08 08 01
#define BOOT_DES_IP 0x10 //ռ<><D5BC>4<EFBFBD><34><EFBFBD>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD>IP 192.168.17.3
#define ENTER_UPDATE_MODE 0x1
#define READ_VERSION 0x100
#define CRC_UPDATE 0x101
#define Write_VERSION 0x103
#define ENTER_APP 0x102
#define EXCUTE_APP 0x02
#define FEEDDOG_HEADER 0x200 //<2F><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>ι<EFBFBD><CEB9>can֡֡ͷ
//<2F>ⲿ<EFBFBD><E2B2BF><EFBFBD><EFBFBD>
void bootmian(void *signal_id);
void reboot_global(sdrv_rom_ctrl_boot_mode_e boot_mode);
void bootInterfaceInit(void);
//<2F>ⲿ<EFBFBD><E2B2BF><EFBFBD><EFBFBD>
extern uint32_t OTA_CANTxID;//Ĭ<>Ϸ<EFBFBD><CFB7><EFBFBD>IDΪ0x02
extern uint32_t OTA_CANRxID;//Ĭ<>Ͻ<EFBFBD><CFBD><EFBFBD>IDΪ0x01
extern uint32_t WDT_CANRxID;//Ĭ<>Ͻ<EFBFBD><CFBD><EFBFBD>IDΪ0x03
extern SystemDataRecord g_systemDataRecord ;
extern uint16_t FrameHeader;//֡ͷ
extern bool boot_can_flag;//֡ͷ
extern bool boot_eth_flag;//֡ͷ
//ι<><CEB9>
extern void feedWatchdog(void);
#endif /*__INTERFACE_BOOT_H_*/