-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdatasafe.txt
More file actions
92 lines (84 loc) · 3.73 KB
/
datasafe.txt
File metadata and controls
92 lines (84 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Datasafe.
This file contains the definitions of the datasafe.
The datasafe always begins with the length, CRC32 and format number.
The format number defines the layout of the datasafe.
All datasafe formats begin with
item : datatype : bytes
---------------------------------------
crc32 : uint32_t : 4
length : uint32_t : 4
format : uint32_t : 4
The crc32 includes the format number and all format specific data.
The length is size of the format specific data and format number.
Format 1:
total size in bytes = 1752
crc32 length (length) = 1744
format number (format) = 1
item : datatype : bytes
------------------------------------------------
crc32 : uint32_t : 4
length : uint32_t : 4
format : uint32_t : 4
count : uint16_t : 4
reset : uint32_t : 4
flare_version : uint32_t : 4
bootmode : uint32_t : 4
status : uint32_t : 4
boot_path : char[64] : 64
boot_loader : char[64] : 64
boot_firmware : char[64] : 64
boot_exe : char[64] : 64
mac_address_0 : uint8_t[6] : 6
mac_address_1 : uint8_t[6] : 6
mac_address_2 : uint8_t[6] : 6
mac_address_3 : uint8_t[6] : 6
assembly_serial_number : char[32] : 32
part_number : char[32] : 32
revision : char[32] : 32
mod_strike : char[32] : 32
board_serial_number : char[32] : 32
app_data : char[128] : 128
boot_cmd : char[128] : 128
error_trace : uint32_t[256] : 1024
typedef struct
{
uint32_t crc32;
uint32_t length;
uint32_t format;
#define FLARE_DS_BOOT_PATH_LEN (64)
#define FLARE_DS_FACTORY_DATA_LEN (32)
#define FLARE_DS_ERROR_TRACE_LEN (256)
#define FLARE_DS_FACTORY_APP_DETAILS_SIZE (128)
uint32_t count;
uint32_t reset;
uint32_t flare_version;
uint32_t bootmode;
uint32_t status;
char boot_path[FLARE_DS_BOOT_PATH_LEN];
char boot_loader[FLARE_DS_BOOT_PATH_LEN];
char boot_firmware[FLARE_DS_BOOT_PATH_LEN];
char boot_exe[FLARE_DS_BOOT_PATH_LEN];
uint8_t mac_address_0[6];
uint8_t mac_address_1[6];
uint8_t mac_address_2[6];
uint8_t mac_address_3[6];
char assembly_serial_number[FLARE_DS_FACTORY_DATA_LEN];
char part_number[FLARE_DS_FACTORY_DATA_LEN];
char revision[FLARE_DS_FACTORY_DATA_LEN];
char mod_strike[FLARE_DS_FACTORY_DATA_LEN];
char board_serial_number[FLARE_DS_FACTORY_DATA_LEN];
char app_data[FLARE_DS_FACTORY_APP_DETAILS_SIZE];
char boot_cmd[FLARE_DS_FACTORY_APP_DETAILS_SIZE];
uint32_t error_trace[FLARE_DS_ERROR_TRACE_LEN];
} flare_datasafe;
The factory data layout for datasafe format 1 goes as following
item : datatype : bytes
------------------------------------------------
length : uint32_t : 4
crc32 : uint32_t : 4
assembly serial number : char[32] : 32
board serial number : char[32] : 32
part number : char[32] : 32
revision : char[32] : 32
modstrike : char[32] : 32
mac_address : uint8_t[6] : 6