Marti Bolivar | 51181cf | 2017-03-20 11:03:41 -0400 | [diff] [blame] | 1 | /* |
| 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 Bolivar | 29d3a77 | 2017-03-20 10:44:25 -0400 | [diff] [blame] | 9 | /* Board-specific definitions go first, to allow maximum override. */ |
Marti Bolivar | 51181cf | 2017-03-20 11:03:41 -0400 | [diff] [blame] | 10 | #if defined(MCUBOOT_TARGET_CONFIG) |
| 11 | #include MCUBOOT_TARGET_CONFIG |
Marti Bolivar | 51181cf | 2017-03-20 11:03:41 -0400 | [diff] [blame] | 12 | #endif |
| 13 | |
Marti Bolivar | 29d3a77 | 2017-03-20 10:44:25 -0400 | [diff] [blame] | 14 | /* SoC family configuration. */ |
| 15 | #if defined(CONFIG_SOC_FAMILY_NRF5) |
| 16 | #include "soc_family_nrf5.h" |
| 17 | #endif |
| 18 | |
Marti Bolivar | 61038df | 2017-09-01 12:52:56 -0400 | [diff] [blame^] | 19 | /* |
| 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 Bolivar | 51181cf | 2017-03-20 11:03:41 -0400 | [diff] [blame] | 35 | #endif |