Infineon: Add cyw20829 platform, shared slot feature, json memory map, psoc6 xip
Based in 1.8.0 release of MCUBoot library
This commit adds CYW20829 Infineon platform support with following capabilities:
1. Overwrite and swap upgrade mode support
2. Multi-image with up to 4 images
3. Hardware security counter is supported for CYW20829 platform
Add XIP support for PSOC6 platform - place BOOT slot in external memory and execute it in place using SMIF in XIP mode
and some new features for Infineon devices.
1. Shared upgrade slot feature - use one shared area for upgrade slots of multiple images
2. Memory map defined using JSON file - define memory regions for bootloader and user app in conventional way using JSON file
diff --git a/boot/zephyr/single_loader.c b/boot/zephyr/single_loader.c
index c16a0b7..af2d398 100644
--- a/boot/zephyr/single_loader.c
+++ b/boot/zephyr/single_loader.c
@@ -13,7 +13,7 @@
#include "mcuboot_config/mcuboot_config.h"
-MCUBOOT_LOG_MODULE_DECLARE(mcuboot);
+BOOT_LOG_MODULE_DECLARE(mcuboot);
/* Variables passed outside of unit via poiters. */
static const struct flash_area *_fa_p;
@@ -83,7 +83,7 @@
}
if (!boot_u32_safe_add(&size, hdr->ih_img_size, hdr->ih_hdr_size) ||
- size >= fa_p->fa_size) {
+ size >= flash_area_get_size(fa_p)) {
return BOOT_EBADIMAGE;
}
@@ -120,8 +120,8 @@
fih_rc = FIH_SUCCESS;
#endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT */
- rsp->br_flash_dev_id = _fa_p->fa_device_id;
- rsp->br_image_off = _fa_p->fa_off;
+ rsp->br_flash_dev_id = flash_area_get_device_id(_fa_p);
+ rsp->br_image_off = flash_area_get_off(_fa_p);
rsp->br_hdr = &_hdr;
out: