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 <zephyr/storage/flash_map.h>
12 
13 #ifdef CONFIG_TRUSTED_EXECUTION_NONSECURE
14 #define SLOT0_LABEL	slot0_ns_partition
15 #define SLOT1_LABEL	slot1_ns_partition
16 #else
17 #define SLOT0_LABEL	slot0_partition
18 #define SLOT1_LABEL	slot1_partition
19 #endif /* CONFIG_TRUSTED_EXECUTION_NONSECURE */
20 
21 /* FIXED_PARTITION_ID() values used below are auto-generated by DT */
22 #define FLASH_AREA_IMAGE_PRIMARY FIXED_PARTITION_ID(SLOT0_LABEL)
23 #if FIXED_PARTITION_EXISTS(SLOT1_LABEL)
24 #define FLASH_AREA_IMAGE_SECONDARY FIXED_PARTITION_ID(SLOT1_LABEL)
25 #endif
26 
27 
28 #endif /* ZEPHYR_DFU_BOOT_MCUBOOT_H_ */
29