CycloneBOOT 2.6.6
Secure Bootloader for ARM Cortex-M MCU
Loading...
Searching...
No Matches
header.h
Go to the documentation of this file.
1
29#ifndef __HEADER_H
30#define __HEADER_H
31
32#ifdef IS_LINUX
33#include <stdint-gcc.h>
34#endif
35#include <stdint.h>
36#include <time.h>
37#include "ImageBuilderConfig.h"
38#include "core/crc32.h"
39#include "main.h"
40
41#define STRINGIFY(x) #x
42#define TOSTRING(x) STRINGIFY(x)
43
44typedef struct {
45 const char *version;
46 const char *description;
48
49static const HeaderVersionEntry ALLOWED_VERSIONS[] = {
50 {"1.1.0", "Initial version"},
51 {"1.2.0", "Complex versions support"},
52 {"1.3.0", "Secure boot"},
53 {NULL, NULL}
54};
55
56//Image Header version
57#define IMAGE_HEADER_VERSION (((image_builder_HEADER_VERSION_MAJOR & 0xFF) << 16) | ((image_builder_HEADER_VERSION_MINOR & 0xFF) << 8) | (image_builder_HEADER_VERSION_PATCH & 0xFF))
58#define IMAGE_HEADER_VERSION_STRING \
59 TOSTRING(image_builder_HEADER_VERSION_MAJOR) "." \
60 TOSTRING(image_builder_HEADER_VERSION_MINOR) "." \
61 TOSTRING(image_builder_HEADER_VERSION_PATCH)
62
64
65// ImageVersion + ImageHeader layout
66#include "image_format.h"
67
68// Header versions before 1.2.0 numbered application images 1 and had no bootloader type
69#define IMAGE_TYPE_APP_HEADER_V1_1_0 1
70
71
72// Function to make the update image header
73int headerMake(ImageBuild *build, ImageHeader *header, struct builder_cli_configuration *cli_options, CipherInfo cipherInfo);
74
75#endif
CycloneBOOT CRC32 cryptographic integrity tag.
int headerMake(ImageBuild *build, ImageHeader *header, struct builder_cli_configuration *cli_options, CipherInfo cipherInfo)
Make the image header.
Definition header.c:48
CycloneBOOT on-flash image format.
CycloneBOOT compatible Update Image Builder.
Definition main.h:47
Definition header.h:44
Buffers the image passes through while it is built.
Definition main.h:81
Definition cli.h:53