blob: 6e4fe31c3216ce6b289a65b10bc84dd721228b47 [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"
Marti Bolivar382f64a2017-09-01 13:59:35 -040017#elif defined(CONFIG_SOC_FAMILY_STM32)
18#include "soc_family_stm32.h"
Marti Bolivar07cd2d02017-09-01 14:05:53 -040019#elif defined(CONFIG_SOC_FAMILY_KINETIS)
20#include "soc_family_kinetis.h"
Marti Bolivar29d3a772017-03-20 10:44:25 -040021#endif
22
Marti Bolivar61038df2017-09-01 12:52:56 -040023/*
24 * This information can come from DTS, a target-specific header file,
25 * or an SoC-specific header file. If any of it is missing, target
26 * support is incomplete.
27 */
28#if !defined(FLASH_DRIVER_NAME) || \
29 !defined(FLASH_ALIGN) || \
30 !defined(FLASH_AREA_IMAGE_0_OFFSET) || \
31 !defined(FLASH_AREA_IMAGE_0_SIZE) || \
32 !defined(FLASH_AREA_IMAGE_1_OFFSET) || \
33 !defined(FLASH_AREA_IMAGE_1_SIZE) || \
34 !defined(FLASH_AREA_IMAGE_SCRATCH_OFFSET) || \
35 !defined(FLASH_AREA_IMAGE_SCRATCH_SIZE)
36#error "Target support is incomplete; cannot build mcuboot."
37#endif
38
Marti Bolivar51181cf2017-03-20 11:03:41 -040039#endif