Shubham Kulkarni | 052561d | 2021-07-20 11:42:44 +0530 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd. |
| 3 | * |
| 4 | * SPDX-License-Identifier: Apache-2.0 |
| 5 | */ |
| 6 | |
| 7 | //! A user-defined identifier for different storage mediums |
| 8 | //! (i.e internal flash, external NOR flash, eMMC, etc) |
| 9 | #define FLASH_DEVICE_INTERNAL_FLASH 0 |
| 10 | |
| 11 | //! An arbitrarily high slot ID we will use to indicate that |
| 12 | //! there is not slot |
| 13 | #define FLASH_SLOT_DOES_NOT_EXIST 255 |
| 14 | |
| 15 | //! NB: MCUboot expects this define to exist but it's only used |
| 16 | //! if MCUBOOT_SWAP_USING_SCRATCH=1 is set |
| 17 | #define FLASH_AREA_IMAGE_SCRATCH FLASH_SLOT_DOES_NOT_EXIST |
| 18 | |
| 19 | //! The slot we will use to track the bootloader allocation |
| 20 | #define FLASH_AREA_BOOTLOADER 0 |
| 21 | |
| 22 | //! A mapping to primary and secondary/upgrade slot |
| 23 | //! given an image_index. We'll plan to use |
| 24 | #define FLASH_AREA_IMAGE_PRIMARY(i) ((i == 0) ? 1 : 255) |
| 25 | #define FLASH_AREA_IMAGE_SECONDARY(i) ((i == 0) ? 2 : 255) |