使用gcc成功编译boot

This commit is contained in:
andy
2023-10-31 23:52:32 +08:00
parent a83444b3c8
commit 570476d79b
14 changed files with 981 additions and 66 deletions

View File

@@ -6,13 +6,13 @@
__packed
#pragma pack (1)
typedef struct{
uint32_t file_size;//文件长度,不包括文件名
char name[120];
int used; // 初始值为0xffffffff每使用一次添加一个0
}flash_file;
#pragma pack ()
#define FLASH_FILE_HEAD_SIZE 128
@@ -40,7 +40,7 @@ int flash_erase_addr(uint32_t addr);
__packed
#pragma pack (1)
typedef struct{
uint32_t size;
char pack_time[20];
@@ -51,7 +51,7 @@ typedef struct{
char host_if[8];
char device_type[12];
}rom_head;
#pragma pack ()
#define ROM_HEAD_SIZE 128
@@ -65,7 +65,7 @@ int flash_updata_boot(uint8_t *rom,uint32_t size);
// 系统参数
__packed
#pragma pack (1)
typedef struct{
char pack_time[20];// 打包时间
char host_if[8];// 主机接口
@@ -76,22 +76,19 @@ typedef struct{
int hard_version;// 硬件版本号
int resistor_diff;// 电阻校准值
}sys_param_def;
#pragma pack ()
int flash_save_param(sys_param_def *par);
const sys_param_def *sys_param(void);
#pragma pack (1)
#if 1
__packed
typedef struct{
uint16_t max;
uint16_t min;
uint8_t err;
}scheme_range_def;
__packed
typedef struct
{
uint8_t taskid;
@@ -100,18 +97,13 @@ typedef struct
uint8_t err;
scheme_range_def range[16];
}scheme_task_def;
#else
__packed
typedef struct{
uint32_t max;
uint32_t min;
uint32_t err;
}scheme_range_def;
__packed
typedef struct
{
@@ -121,21 +113,13 @@ typedef struct
uint32_t err;
scheme_range_def range[16];
}scheme_task_def;
#endif
__packed
typedef struct{
uint8_t err;
uint8_t suberr_num;
uint8_t suberr[30];
}marerr_def;
// 方案参数
__packed
typedef struct{
uint8_t slave_data[2048];
uint32_t plan_id;
@@ -145,6 +129,7 @@ typedef struct{
marerr_def marerr[21];
scheme_task_def task[0];
}scheme_def;
#pragma pack ()
const scheme_def *check_scheme(void);