blob: d37a523b891a880f896bd008ac30b3ff435b1cd7 [file] [log] [blame]
Marti Bolivar51181cf2017-03-20 11:03:41 -04001/*
2 * Copyright (C) 2017, Linaro Ltd
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef H_TARGETS_TARGET_
7#define H_TARGETS_TARGET_
8
Marti Bolivar29d3a772017-03-20 10:44:25 -04009/* Board-specific definitions go first, to allow maximum override. */
Marti Bolivar51181cf2017-03-20 11:03:41 -040010#if defined(MCUBOOT_TARGET_CONFIG)
11#include MCUBOOT_TARGET_CONFIG
Marti Bolivar51181cf2017-03-20 11:03:41 -040012#endif
13
Marti Bolivar29d3a772017-03-20 10:44:25 -040014/* SoC family configuration. */
15#if defined(CONFIG_SOC_FAMILY_NRF5)
16#include "soc_family_nrf5.h"
17#endif
18
Marti Bolivar61038df2017-09-01 12:52:56 -040019/*
20 * This information can come from DTS, a target-specific header file,
21 * or an SoC-specific header file. If any of it is missing, target
22 * support is incomplete.
23 */
24#if !defined(FLASH_DRIVER_NAME) || \
25 !defined(FLASH_ALIGN) || \
26 !defined(FLASH_AREA_IMAGE_0_OFFSET) || \
27 !defined(FLASH_AREA_IMAGE_0_SIZE) || \
28 !defined(FLASH_AREA_IMAGE_1_OFFSET) || \
29 !defined(FLASH_AREA_IMAGE_1_SIZE) || \
30 !defined(FLASH_AREA_IMAGE_SCRATCH_OFFSET) || \
31 !defined(FLASH_AREA_IMAGE_SCRATCH_SIZE)
32#error "Target support is incomplete; cannot build mcuboot."
33#endif
34
Marti Bolivar51181cf2017-03-20 11:03:41 -040035#endif