blob: 728541c048331caa1fedc398aafe9bdc7952bf85 [file] [log] [blame]
Tamas Banf70ef8c2017-12-19 15:35:09 +00001/*
2 * Copyright (C) 2017, Linaro Ltd
David Vincze8bdfc2d2019-03-18 15:49:23 +01003 * Copyright (c) 2018-2019, Arm Limited.
Tamas Banc3828852018-02-01 12:24:16 +00004 *
Tamas Banf70ef8c2017-12-19 15:35:09 +00005 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef H_TARGETS_TARGET_
9#define H_TARGETS_TARGET_
10
Tamas Banc3828852018-02-01 12:24:16 +000011/* Target specific defines: flash partitions; flash driver name, etc.
12 * Comes from: platform/ext/target/<BOARD>/<SUBSYSTEM>/partition
13 */
14#include "flash_layout.h"
15
16#ifndef FLASH_BASE_ADDRESS
17#error "FLASH_BASE_ADDRESS must be defined by the target"
18#endif
19
20#ifndef FLASH_AREA_IMAGE_SECTOR_SIZE
21#error "FLASH_AREA_IMAGE_SECTOR_SIZE must be defined by the target"
22#endif
23
David Vinczebb207982019-08-21 15:13:04 +020024#ifndef FLASH_AREA_0_OFFSET
25#error "FLASH_AREA_0_OFFSET must be defined by the target"
Tamas Banc3828852018-02-01 12:24:16 +000026#endif
27
David Vinczebb207982019-08-21 15:13:04 +020028#ifndef FLASH_AREA_0_SIZE
29#error "FLASH_AREA_0_SIZE must be defined by the target"
Tamas Banc3828852018-02-01 12:24:16 +000030#endif
31
David Vinczebb207982019-08-21 15:13:04 +020032#ifndef FLASH_AREA_2_OFFSET
33#error "FLASH_AREA_2_OFFSET must be defined by the target"
Tamas Banc3828852018-02-01 12:24:16 +000034#endif
35
David Vinczebb207982019-08-21 15:13:04 +020036#ifndef FLASH_AREA_2_SIZE
37#error "FLASH_AREA_2_SIZE must be defined by the target"
Tamas Banc3828852018-02-01 12:24:16 +000038#endif
39
David Vinczebb207982019-08-21 15:13:04 +020040#if (MCUBOOT_IMAGE_NUMBER == 2)
41#ifndef FLASH_AREA_1_OFFSET
42#error "FLASH_AREA_1_OFFSET must be defined by the target"
Tamas Banc3828852018-02-01 12:24:16 +000043#endif
44
David Vinczebb207982019-08-21 15:13:04 +020045#ifndef FLASH_AREA_1_SIZE
46#error "FLASH_AREA_1_SIZE must be defined by the target"
47#endif
48
49#ifndef FLASH_AREA_3_OFFSET
50#error "FLASH_AREA_3_OFFSET must be defined by the target"
51#endif
52
53#ifndef FLASH_AREA_3_SIZE
54#error "FLASH_AREA_3_SIZE must be defined by the target"
55#endif
56#endif /* (MCUBOOT_IMAGE_NUMBER == 2) */
57
58#ifndef FLASH_AREA_SCRATCH_OFFSET
59#error "FLASH_AREA_SCRATCH_OFFSET must be defined by the target"
60#endif
61
62#ifndef FLASH_AREA_SCRATCH_SIZE
63#error "FLASH_AREA_SCRATCH_SIZE must be defined by the target"
Tamas Banc3828852018-02-01 12:24:16 +000064#endif
65
66#ifndef FLASH_DEV_NAME
67#error "BL2 supports CMSIS flash interface and device name must be specified"
Tamas Banf70ef8c2017-12-19 15:35:09 +000068#endif
69
Mate Toth-Pala76e2ab2018-05-31 15:43:01 +020070#ifndef BOOT_STATUS_MAX_ENTRIES
71#error "BOOT_STATUS_MAX_ENTRIES must be defined by the target"
72#endif
73
74#ifndef BOOT_MAX_IMG_SECTORS
75#error "BOOT_MAX_IMG_SECTORS must be defined by the target"
76#endif
77
David Vinczebb207982019-08-21 15:13:04 +020078#endif /* H_TARGETS_TARGET_ */