FileFormat.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2017 by Slavey Karadzhov
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * OTA_FileFormat.h - Definitions for Upgrade file format
8  *
9  * Important: Definitions in this file must be kept in sync with otatool.py
10  * See README.rst for further information.
11  *
12  ****/
13 
14 #pragma once
15 
16 #include <stdint.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
24 typedef struct {
25  uint32_t magic;
26  uint32_t buildTimestampLow;
27  uint32_t buildTimestampHigh;
28  uint8_t romCount;
29  uint8_t reserved[3];
31 
34 typedef struct {
35  uint32_t address;
36  uint32_t size;
37 } OtaRomHeader;
38 
40 #define OTA_HEADER_MAGIC_SIGNED 0xf01af02a
41 
42 #define OTA_HEADER_MAGIC_NOT_SIGNED 0xf01af020
43 
44 #ifdef __cplusplus
45 }
46 #endif
Definition: FileFormat.h:24
Definition: FileFormat.h:34
uint8_t romCount
Number of ROM images in this filem, each preceeded with an #OTA_RomHeader.
Definition: FileFormat.h:28
uint32_t buildTimestampHigh
File creation timestamp, Milliseconds since 1900/01/01 (lower 32 bits)
Definition: FileFormat.h:27
uint32_t address
Flash memory destination offset for this ROM image.
Definition: FileFormat.h:35
uint32_t magic
File type identification, either OTA_HEADER_MAGIC_SIGNED or OTA_HEADER_MAGIC_NOT_SIGNED.
Definition: FileFormat.h:25
uint32_t buildTimestampLow
File creation timestamp, Milliseconds since 1900/01/01 (lower 32 bits)
Definition: FileFormat.h:26
uint32_t size
Size of ROM image content following this header, in bytes.
Definition: FileFormat.h:36