Skip to content

Commit

Permalink
Upload ota-bootloader-abstraction 1.1.0.193 [2307]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed Mar 28, 2024
1 parent 7c2a7e9 commit a2eb98b
Show file tree
Hide file tree
Showing 39 changed files with 2,106 additions and 194 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Over-the-Air (OTA) Bootloader Abstraction Middleware Library

The OTA Bootloader Abstraction library has implementation for bootloader specific storage interface APIs for handling OTA upgrade images.
This library is expected to work only with the Infineon [ota-update](https://github.com/Infineon/ota-update/) library which downloads OTA upgrade images on PSoC6, 20829, and XMC7200 platforms.
This library is expected to work only with the Infineon [ota-update](https://github.com/Infineon/ota-update/) library which downloads OTA upgrade images on PSoC6, 20829, 89829 and XMC7200 platforms.
Application should not directly call the bootloader-specific storage interface APIs. Rather, during Infineon OTA Agent initialization, the application needs to register these bootloader-specific storage interface APIs as callback APIs.
See the [ota-update](https://github.com/Infineon/ota-update/) library documentation for more details.

## Library Versions

| Library Version | Supported MTB version | Remarks |
|---------------------------------| -------------------------|-------------------------------------------|
| ota-bootloader-abstraction v1.1.0 | ModusToolbox 3.2 | CYW89829 platform support added |
| ota-bootloader-abstraction v1.0.0 | ModusToolbox 3.1 | cysecuretools v5.0 or greater is required |

## 1. Bootloader Support
Expand Down Expand Up @@ -50,9 +51,9 @@ typedef struct cy_ota_storage_interface_s

## 2. MCUBootloader Support

*ota-bootloader-abstraction* library has below support for MCUBootloader based OTA on PSoC6, 20829,and XMC7200 platforms.
*ota-bootloader-abstraction* library has below support for MCUBootloader based OTA on PSoC6, 20829, 89829 and XMC7200 platforms.

- Template flashmaps for PSoC6, 20829, and XMC7200 platforms.
- Template flashmaps for PSoC6, 20829, 89829 and XMC7200 platforms.

- Template linker files for GCC_ARM, ARM, and IAR toolchains.

Expand All @@ -69,6 +70,7 @@ typedef struct cy_ota_storage_interface_s
- CY8CPROTO-063-BLE
- CYBLE-416045-EVAL
- KIT_XMC72_EVK
- CYW989829M2EVB-01

The *ota-update* along with *ota-bootloader-abstraction* library works in concert with MCUBootloader to provide a no-fail solution to updating device software in the field.

Expand Down Expand Up @@ -118,6 +120,7 @@ Template flashmaps for the supported targets as of v1.0.0 release. These flashma
| CY8CPROTO-062S3-4343W | 512K | PSOC_062_512K | Default - psoc62_512k_xip_swap_single.json<br> psoc62_512k_ext_overwrite_single.json<br>psoc62_512k_ext_swap_single.json |
| CY8CKIT-064B0S2-4343W | 2M | PSOC_064_2M | Default - policy_single_CM0_CM4_smif_swap.json |
| CYW920829M2EVK-02 | 0K | CYW20829 | Default - cyw20829_xip_swap_single.json<br> cyw20829_xip_overwrite_single.json |
| CYW989829M2EVB-01 | 0K | CYW89829 | Default - cyw89829_xip_swap_single.json<br> cyw89829_xip_overwrite_single.json |
| KIT_XMC72_EVK | 8MB | XMC7200 | Default - xmc7200_int_swap_single.json<br> xmc7200_int_overwrite_single.json |

<br>
Expand Down Expand Up @@ -146,7 +149,8 @@ Template flashmaps for the supported targets as of v1.0.0 release. These flashma
|--------------------------------|--------------|
| cyw20829_xip_overwrite_single.json | External only (primary and secondary) |
| cyw20829_xip_swap_single.json | External only (primary and secondary) |
| cyw20829_xip_swap_single_psvp.json | External only (primary and secondary) |
| cyw89829_xip_overwrite_single.json | External only (primary and secondary) |
| cyw89829_xip_swap_single.json | External only (primary and secondary) |


| 8M Internal Flash Maps | Memory Usage |
Expand All @@ -159,7 +163,7 @@ Template flashmaps for the supported targets as of v1.0.0 release. These flashma
MCUBootloader Application i.e MCUBootApp is a standalone application. It is an open source software taken and customized in terms of Flash map and is built outside of ModusToolbox. MCUBootApp is programmed/flashed on the device one time, at manufacture (or for development).

- MCUBootApp runs on the CM0+ CPU and starts any OTA enabled application on CM4 core in case of multicore Psoc6 devices and on CM7 core in case of XMC7200 devices.
- In case of 20829 devices, MCUBootApp runs on CM33 CPU along with the OTA enabled applications.
- In case of 20829 and 89829 devices, MCUBootApp runs on CM33 CPU along with the OTA enabled applications.

MCUBoot itself is not OTA upgradable.

Expand Down Expand Up @@ -289,6 +293,7 @@ For the toolchain version information, please refer to [ota-bootloader-abstracti
- [EZ-BLE Arduino Evaluation Board](https://www.infineon.com/cms/en/product/evaluation-boards/cyble-416045-eval/) (CYBLE-416045-EVAL)
- [AIROC™ CYW20829 Bluetooth® LE SoC](https://www.infineon.com/cms/en/product/promopages/airoc20829/) (CYW920829M2EVK-02)
- [XMC7200 Evaluation Kit](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc72_evk/) (KIT_XMC72_EVK)
- [AIROC™ CYW989820M2EVB-01 Evaluation kit](https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-bluetooth-le-bluetooth-multiprotocol/airoc-bluetooth-le/cyw20829/)(CYW989820M2EVB-01)

## 9. Hardware Setup

Expand Down
22 changes: 10 additions & 12 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@

See the [README.md](./README.md) for a complete description of the OTA bootloader support library.

## Known issues

| Problem | Workaround |
| ------- | ---------- |
| OTA Bootloader Support Middleware is currently not supported on IAR toolchain with CYW20829B0 kit. | No workaround. Support will be added in a future release. |
## Changelog

### v1.1.0

## Changelog
- Added support for CYW89829(CYW989829M2EVB-01) kits.
- IAR support added for 20829 platform.

### v1.0.0

- New ota-bootloader-abstraction library
- New ota-bootloader-abstraction library.
- This ota-bootloader-abstraction has mcubootloader support.
- ota-bootloader-abstraction v1.0.0 works with MTB 3.1
- Legacy support for these devices:
Expand All @@ -34,10 +32,10 @@ This version of the library was validated for compatibility with the following s

| Software and Tools | Version |
| :--- | :----: |
| ModusToolbox&trade; Software Environment | 3.1 |
| - ModusToolbox&trade; Device Configurator | 4.10 |
| - ModusToolbox&trade; CapSense Configurator / Tuner tools | 6.10.0 |
| Peripheral Driver Library (PDL CAT1) | 3.9.0 |
| ModusToolbox&trade; Software Environment | 3.2 |
| - ModusToolbox&trade; Device Configurator | 4.20 |
| - ModusToolbox&trade; CapSense Configurator / Tuner tools | 6.20.0 |
| Peripheral Driver Library (PDL CAT1) | 3.10.0 |
| GCC Compiler | 11.3.1 |
| IAR Compiler | 9.30.1 |
| IAR Compiler | 9.40.2 |
| Arm Compiler 6 | 6.16 |
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* Copyright 2024, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
Expand Down Expand Up @@ -80,7 +80,7 @@ struct qspi_ss_config
defined(PSOC_062_2M) || \
defined(PSOC_062_1M))
#define CY_BOOTLOADER_SMIF_SS_CFG_NUM 4
#elif defined(PSOC_064_512K) || defined(PSOC_062_512K) || defined(CYW20829)
#elif defined(PSOC_064_512K) || defined(PSOC_062_512K) || defined(CYW20829) || defined(CYW89829)
#define CY_BOOTLOADER_SMIF_SS_CFG_NUM 3
#else
#error "Platform device name is unsupported."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* Copyright 2024, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
Expand Down
34 changes: 17 additions & 17 deletions configs/COMPONENT_MCUBOOT/flash/cy_ota_flash.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* Copyright 2024, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
Expand Down Expand Up @@ -45,18 +45,18 @@
#include "cybsp.h"
#include "cy_ota_flash.h"

#if !(defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
#if !(defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
#include <cycfg_pins.h>
#endif

/**********************************************************************************************************************************
* local defines
**********************************************************************************************************************************/
/* This defines if External Flash (SMIF) will be used for Upgrade Slots */
#if defined(CYW20829)
#define CY_FLASH_BASE CY_XIP_BASE /* Override value in /mtb-pdl-cat1/devices/COMPONENT_CAT1A/include/cy_device_common.h for CYW20829 */
#define CY_FLASH_SIZEOF_ROW 512u /* Override value in /mtb-pdl-cat1/devices/COMPONENT_CAT1A/include/cy_device_common.h for CYW20829 */
#endif /* CYW20829 */
#if (defined (CYW20829) || defined (CYW89829))
#define CY_FLASH_BASE CY_XIP_BASE /* Override value in /mtb-pdl-cat1/devices/COMPONENT_CAT1A/include/cy_device_common.h for CYW20829 and CYW89829 */
#define CY_FLASH_SIZEOF_ROW 512u /* Override value in /mtb-pdl-cat1/devices/COMPONENT_CAT1A/include/cy_device_common.h for CYW20829 and CYW89829 */
#endif /* CYW20829 or CYW89829 */

#if defined(XMC7200)
#define CY_XIP_BASE 0x60000000UL
Expand Down Expand Up @@ -253,7 +253,7 @@ static cy_en_smif_status_t EnableQuadMode(cy_stc_smif_mem_config_t const *memCon
#endif /* OTA_USE_EXTERNAL_FLASH */
#endif /* CY_IP_MXSMIF & !PSOC_062_1M & !XMC7200 */

#if !(defined (CYW20829A0LKML) || defined (CYW20829B0LKML) || defined (XMC7200))
#if !(defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG) || defined (XMC7200))
static int psoc6_internal_flash_write(uint8_t data[], uint32_t address, size_t len)
{
int retCode;
Expand Down Expand Up @@ -598,8 +598,8 @@ cy_rslt_t cy_ota_mem_init( void )
/* pre-access to SMIF */
PRE_SMIF_ACCESS_TURN_OFF_XIP;

#if (defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
/* SMIF is already initialized for 20829 so we are only initializing the
#if (defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
/* SMIF is already initialized for 20829 and 89829 so we are only initializing the
* SMIF base address and the context variables.
*/
smif_status = Cy_SMIF_Init(SMIF0, &ota_SMIF_config, TIMEOUT_1_MS, &ota_QSPI_context);
Expand All @@ -622,7 +622,7 @@ cy_rslt_t cy_ota_mem_init( void )
goto _bail;
}

#if (defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
#if (defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
/* Even after SFDP enumeration QE command is not initialized */
/* So, it should be 1.0 device */
if ((smifMemConfigs[0]->deviceCfg->readStsRegQeCmd->command == 0) || /* 0 - if configurator generated code */
Expand All @@ -639,7 +639,7 @@ cy_rslt_t cy_ota_mem_init( void )
goto _bail;
}
}
#else /* NON - CYW20829A0LKML/CYW20829B0LKML */
#else /* NON - CYW20829B0LKML/CYW89829B01MKSBG */
#if !defined(CY_RUN_CODE_FROM_XIP) && (OTA_USE_EXTERNAL_FLASH)
{
/* Choose SMIF slot number (slave select).
Expand All @@ -661,7 +661,7 @@ cy_rslt_t cy_ota_mem_init( void )
}
}
#endif /* ! CY_RUN_CODE_FROM_XIP */
#endif /* CYW20829A0LKML/CYW20829B0LKML */
#endif /* CYW20829B0LKML/CYW89829B01MKSBG */

smif_status = IsQuadEnabled(smifMemConfigs[0], &QE_status);
if(smif_status != CY_RSLT_SUCCESS)
Expand Down Expand Up @@ -707,7 +707,7 @@ cy_rslt_t cy_ota_mem_read( cy_ota_mem_type_t mem_type, uint32_t addr, void *data

if( mem_type == CY_OTA_MEM_TYPE_INTERNAL_FLASH )
{
#if !(defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
#if !(defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
/* flash_area_read() uses offsets, we need absolute address here */
addr += CY_FLASH_BASE;

Expand Down Expand Up @@ -758,7 +758,7 @@ static cy_rslt_t cy_ota_mem_write_row_size( cy_ota_mem_type_t mem_type, uint32_t

if( mem_type == CY_OTA_MEM_TYPE_INTERNAL_FLASH )
{
#if !(defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
#if !(defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
int rc = 0;

/* flash_area_write() uses offsets, we need absolute address here */
Expand Down Expand Up @@ -937,7 +937,7 @@ cy_rslt_t cy_ota_mem_erase( cy_ota_mem_type_t mem_type, uint32_t addr, size_t le

if( mem_type == CY_OTA_MEM_TYPE_INTERNAL_FLASH )
{
#if !(defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
#if !(defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
int rc = 0;

#if defined (XMC7200)
Expand Down Expand Up @@ -1036,7 +1036,7 @@ size_t cy_ota_mem_get_prog_size ( cy_ota_mem_type_t mem_type, uint32_t addr )
{
if( mem_type == CY_OTA_MEM_TYPE_INTERNAL_FLASH )
{
#if !(defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
#if !(defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
return CY_FLASH_SIZEOF_ROW;
#else
return 0;
Expand Down Expand Up @@ -1080,7 +1080,7 @@ size_t cy_ota_mem_get_erase_size ( cy_ota_mem_type_t mem_type, uint32_t addr )
{
if( mem_type == CY_OTA_MEM_TYPE_INTERNAL_FLASH )
{
#if !(defined (CYW20829A0LKML) || defined (CYW20829B0LKML))
#if !(defined (CYW20829B0LKML) || defined (CYW89829B01MKSBG))
return CY_FLASH_SIZEOF_ROW;
#else
return 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"external_flash": [
{
"flash-size": "0x100000",
"erase-size": "0x1000",
"mode": "XIP"
}
],
"boot_and_upgrade":
{
"bootloader": {
"address": {
"description": "Address of the bootloader",
"value": "0x60000000"
},
"size": {
"description": "Size of the bootloader",
"value": "0x20000"
}
},
"application_1": {
"address": {
"description": "Address of the application primary slot",
"value": "0x60020000"
},
"size": {
"description": "Size of the application primary slot",
"value": "0x00060000"
},
"upgrade_address": {
"description": "Address of the application secondary slot",
"value": "0x60080000"
},
"upgrade_size": {
"description": "Size of the application secondary slot",
"value": "0x00060000"
}
}
}
}
56 changes: 56 additions & 0 deletions configs/COMPONENT_MCUBOOT/flashmap/cyw89829_xip_swap_single.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"external_flash": [
{
"flash-size": "0x100000",
"erase-size": "0x1000",
"mode": "XIP"
}
],
"boot_and_upgrade":
{
"bootloader": {
"address": {
"description": "Address of the bootloader",
"value": "0x60000000"
},
"size": {
"description": "Size of the bootloader",
"value": "0x00020000"
},
"scratch_address": {
"description": "Address of the scratch area",
"value": "0x600EC000"
},
"scratch_size": {
"description": "Size of the scratch area",
"value": "0x00002000"
},
"status_address": {
"description": "Address of the swap status partition",
"value": "0x600E0000"
},
"status_size": {
"description": "Size of the swap status partition",
"value": "0x0000C000"
}
},
"application_1": {
"address": {
"description": "Address of the application primary slot",
"value": "0x60020000"
},
"size": {
"description": "Size of the application primary slot",
"value": "0x00060000"
},
"upgrade_address": {
"description": "Address of the application secondary slot",
"value": "0x60080000"
},
"upgrade_size": {
"description": "Size of the application secondary slot",
"value": "0x00060000"
}
}
}
}
8 changes: 4 additions & 4 deletions configs/COMPONENT_MCUBOOT/flashmap/xmc7200_platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
"size" : "0x7F0000",
"erase_size" : "0x8000",
"erase_value" : "0xFF",
"type" : "INTERNAL_FLASH_CODE_LARGE"
"mem_type" : "INTERNAL_FLASH_CODE_LARGE"
},

{
"address" : "0x107F0000",
"size" : "0x40000",
"erase_size" : "0x2000",
"erase_value" : "0xFF",
"type" : "INTERNAL_FLASH_CODE_SMALL"
"mem_type" : "INTERNAL_FLASH_CODE_SMALL"
},

{
"address" : "0x14000000",
"size" : "0x30000",
"erase_size" : "0x800",
"erase_value" : "0xFF",
"type" : "INTERNAL_FLASH_WORK_LARGE"
"mem_type" : "INTERNAL_FLASH_WORK_LARGE"
},

{
"address" : "0x14030000",
"size" : "0x10000",
"erase_size" : "0x80",
"erase_value" : "0xFF",
"type" : "INTERNAL_FLASH_WORK_SMALL"
"mem_type" : "INTERNAL_FLASH_WORK_SMALL"
}
],

Expand Down
Loading

0 comments on commit a2eb98b

Please sign in to comment.