1 /* 2 * Copyright (c) 2017 Nordic Semiconductor ASA 3 * Copyright (c) 2016-2017 Linaro Limited 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #ifndef ZEPHYR_DFU_BOOT_MCUBOOT_H_ 9 #define ZEPHYR_DFU_BOOT_MCUBOOT_H_ 10 11 #include <storage/flash_map.h> 12 13 /* FLASH_AREA_ID() values used below are auto-generated by DT */ 14 #ifdef CONFIG_TRUSTED_EXECUTION_NONSECURE 15 #define FLASH_AREA_IMAGE_PRIMARY FLASH_AREA_ID(image_0_nonsecure) 16 #define FLASH_AREA_IMAGE_SECONDARY FLASH_AREA_ID(image_1_nonsecure) 17 #else 18 #define FLASH_AREA_IMAGE_PRIMARY FLASH_AREA_ID(image_0) 19 #if FLASH_AREA_LABEL_EXISTS(image_1) 20 #define FLASH_AREA_IMAGE_SECONDARY FLASH_AREA_ID(image_1) 21 #endif 22 #endif /* CONFIG_TRUSTED_EXECUTION_NONSECURE */ 23 24 #endif /* ZEPHYR_DFU_BOOT_MCUBOOT_H_ */ 25