Skip to content

Commit

Permalink
Upload ota-update 4.1.0.947 [2307]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed Mar 28, 2024
1 parent 9bc0ac9 commit 4d15f21
Show file tree
Hide file tree
Showing 27 changed files with 415 additions and 139 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Supported devices:
- CY8CPROTO-063-BLE
- CYBLE-416045-EVAL
- KIT_XMC72_EVK
- CYW989829M2EVB-01

For devices with both Wi-Fi and Bluetooth® Interfaces, the device can use Wi-Fi or Bluetooth® Interfaces.

Expand All @@ -25,6 +26,7 @@ To handle the downloaded upgrade image, the user must implement storage API call

| Library Version | Supported MTB version | Remarks |
|--------------------| -------------------------|----------------------------|
| ota-update v4.1.0 | ModusToolbox 3.2 | cysecuretools v5.1 or greater is required |
| ota-update v4.0.0 | ModusToolbox 3.1 | cysecuretools v5.0 or greater is required |
| ota-update v3.0.1 | ModusToolbox 3.1 | cysecuretools v4.2 or greater is required |
| ota-update v3.0.0 | ModusToolbox 3.0 | cysecuretools v4.2 or greater is required |
Expand All @@ -44,7 +46,7 @@ To handle the downloaded upgrade image, the user must implement storage API call

- It runs on CM4 CPU in case of multicore Psoc6 devices and on CM7 CPU in XMC7200 devices.

- In case of 20829 devices, it runs on CM33 CPU along with the bootloader application.
- In case of 20829 and 89829 devices, it runs on CM33 CPU along with the bootloader application.

On a virgin device, main application(BOOT image) is programmed / flashed to the device first time. Subsequent versions of the application (so called updates) are downloaded using OTA.

Expand Down Expand Up @@ -90,7 +92,7 @@ With a "Job" flow approach, the device downloads a JSON formatted job document t
https://github.com/Infineon/ota-update#latest-v4.X#$$ASSET_REPO$$/ota-update/latest-v4.X
```
- For MCUBootloader-based OTA code examples on platforms like PSoC,20829 and XMC7200, Users need to create an *ota-bootloader-abstraction.mtb* file to pull *ota-bootloader-abstraction* library which has storage APIs to handle the MCUBootloader based OTA upgrade files and place it in the application *deps* folder. The contents of *ota-bootloader-abstraction.mtb* should be as follows:
- For MCUBootloader-based OTA code examples on platforms like PSoC,20829, 89829 and XMC7200, Users need to create an *ota-bootloader-abstraction.mtb* file to pull *ota-bootloader-abstraction* library which has storage APIs to handle the MCUBootloader based OTA upgrade files and place it in the application *deps* folder. The contents of *ota-bootloader-abstraction.mtb* should be as follows:
```
https://github.com/Infineon/ota-bootloader-abstraction#latest-v1.X#$$ASSET_REPO$$/ota-bootloader-abstraction/latest-v1.X
```
Expand All @@ -107,7 +109,7 @@ With a "Job" flow approach, the device downloads a JSON formatted job document t
```
**NOTE**: ota-update library currently supports *ethernet-core-freertos-lwip-mbedtls/latest-v1.X* only.
- For BLE-based OTA code examples on platforms like PSoC6 and 20829, Users need to create an *btstack-integration.mtb* file for the btstack and place it in the application *deps* folder. The contents of *btstack-integration.mtb* should be as follows:
- For BLE-based OTA code examples on platforms like PSoC6, 20829 and 89829, Users need to create an *btstack-integration.mtb* file for the btstack and place it in the application *deps* folder. The contents of *btstack-integration.mtb* should be as follows:
```
https://github.com/Infineon/btstack-integration#latest-v4.X#$$ASSET_REPO$$/btstack-integration/latest-v4.X
```
Expand Down Expand Up @@ -174,7 +176,7 @@ MCUBootloader is a secure bootloader for 32-bits microcontrollers and users shou
To support MCUBootloader based OTA using ota-update library, User can implement his own storage operation callbacks to handle upgrade image or can make use of *ota-bootloader-abstraction* library.
*ota-bootloader-abstraction* library has below support.
- 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.
- Storage operation callback APIs to handle MCUBootloader based upgrade image.
- Prebuild and Postbuild scripts for generating and signing MCUBootloader based BOOT and UPGRADE image of an OTA Application.
Expand Down Expand Up @@ -310,11 +312,12 @@ The following is an example Job document for an OTA update image that is availab
The *ota-update/WiFi_Ethernet/scripts/publisher.py* script contains several configurable values. Ensure that the parameters in the script match the application values. In addition, check the example application you are using for any special needs.
The Publisher and Subscriber scripts require an additional Python module.
The Publisher and Subscriber scripts need the 'paho-mqtt' Python module, version 1.6.1.
```
pip install paho-mqtt
pip install paho-mqtt==1.6.1
```
**NOTE**:The Publisher and Subscriber scripts are only compatible with paho-mqtt version 1.6.1.
Using the publisher script to test MQTT updates:
Expand Down Expand Up @@ -481,6 +484,7 @@ For the toolchain version information, please refer to [OTA Release.md](./RELEAS
- [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)
## 16. Hardware Setup
Expand Down
21 changes: 10 additions & 11 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

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

## Known issues

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

### v4.1.0

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

### v4.0.0

Expand Down Expand Up @@ -72,10 +70,11 @@ This version of the library was validated for compatibility with the following s

| Software and Tools | Version |
| :--- | :----: |
| ModusToolbox™ Software Environment | 3.1 |
| - ModusToolbox™ Device Configurator | 4.10 |
| - ModusToolbox™ CapSense Configurator / Tuner tools | 6.10.0 |
| Peripheral Driver Library (PDL CAT1) | 3.9.0 |
| ModusToolbox™ Software Environment | 3.2 |
| - ModusToolbox™ Device Configurator | 4.20 |
| - ModusToolbox™ Bluetooth Configurator | 2.90 |
| - ModusToolbox™ 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 |
2 changes: 1 addition & 1 deletion configs/COMPONENT_OTA_BLUETOOTH_SECURE/ecdsa256_pub.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
29 changes: 20 additions & 9 deletions configs/FreeRTOS/COMPONENT_CM33/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*/

/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright (C) 2019-2022 Cypress Semiconductor Corporation, or a subsidiary of
* FreeRTOS Kernel V10.5.0
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright (C) 2019-2021 Cypress Semiconductor Corporation, or a subsidiary of
* Cypress Semiconductor Corporation. All Rights Reserved.
*
* Updated configuration to support CM33.
Expand Down Expand Up @@ -70,6 +70,7 @@
* CY_CFG_PWR_DEEPSLEEP_LATENCY - Deep Sleep Latency (ms)
*/
#include "cycfg_system.h"
#include "cy_device_headers.h"
#endif

#define configUSE_PREEMPTION 1
Expand All @@ -80,7 +81,8 @@ extern uint32_t SystemCoreClock;
#define configCPU_CLOCK_HZ SystemCoreClock
#define configTICK_RATE_HZ ((TickType_t ) 1000)
#define configMAX_PRIORITIES 7
#define configMINIMAL_STACK_SIZE 128
/* Increase the stack size to 256 to support ds-ram feature */
#define configMINIMAL_STACK_SIZE 256
#define configMAX_TASK_NAME_LEN 16
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
Expand All @@ -95,15 +97,19 @@ extern uint32_t SystemCoreClock;
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5

/* Compile-time macros to enable or disable TrustZone, Memory Protection Unit (MPU) and Floating Point Unit (FPU) support. */
#if (defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U))
#define configENABLE_FPU 1
#else
#define configENABLE_FPU 0
#endif
#define configENABLE_MPU 0
#define configENABLE_TRUSTZONE 0
#define configRUN_FREERTOS_SECURE_ONLY 0

/* Memory allocation related definitions. */
#define configSUPPORT_STATIC_ALLOCATION 1
#define configSUPPORT_DYNAMIC_ALLOCATION 1
#define configTOTAL_HEAP_SIZE ((size_t )(10*1024))
#define configTOTAL_HEAP_SIZE ((size_t )(50*1024))
#define configAPPLICATION_ALLOCATED_HEAP 0

/* Hook function related definitions. */
Expand Down Expand Up @@ -136,7 +142,11 @@ interrupt safe FreeRTOS API functions can be called.
!!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html
*/
#if (__SAUREGION_PRESENT==1)
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 0x40
#else
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 0x3F
#endif

/* configMAX_API_CALL_INTERRUPT_PRIORITY is a new name for configMAX_SYSCALL_INTERRUPT_PRIORITY
that is used by newer ports only. The two are equivalent. */
Expand Down Expand Up @@ -193,14 +203,15 @@ standard names - or at least those used in the unmodified vector table. */
*/
#if defined(CY_CFG_PWR_SYS_IDLE_MODE) && \
((CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_SLEEP) || \
(CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP))
(CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP) || \
(CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP_RAM))

/* Enable low power tickless functionality. The RTOS abstraction library
* provides the compatible implementation of the vApplicationSleep hook:
* https://github.com/Infineon/abstraction-rtos#freertos
* https://github.com/infineon/abstraction-rtos#freertos
* The Low Power Assistant library provides additional portable configuration layer
* for low-power features supported by the PSoC 6 devices:
* https://github.com/Infineon/lpa
* https://github.com/infineon/lpa
*/
extern void vApplicationSleep( uint32_t xExpectedIdleTime );
#define portSUPPRESS_TICKS_AND_SLEEP( xIdleTime ) vApplicationSleep( xIdleTime )
Expand All @@ -221,7 +232,7 @@ extern void vApplicationSleep( uint32_t xExpectedIdleTime );
* GCC toolchain: the application must provide the implementation for the required
* newlib hook functions: __malloc_lock, __malloc_unlock, __env_lock, __env_unlock.
* FreeRTOS-compatible implementation is provided by the clib-support library:
* https://github.com/Infineon/clib-support
* https://github.com/infineon/clib-support
*
* ARM/IAR toolchains: the application must provide the reent.h header to adapt
* FreeRTOS's configUSE_NEWLIB_REENTRANT to work with the toolchain-specific C library.
Expand Down
30 changes: 22 additions & 8 deletions configs/FreeRTOS/COMPONENT_CM4/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright (C) 2019-2022 Cypress Semiconductor Corporation, or a subsidiary of
* FreeRTOS Kernel V10.5.0
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright (C) 2019-2021 Cypress Semiconductor Corporation, or a subsidiary of
* Cypress Semiconductor Corporation. All Rights Reserved.
*
* Updated configuration to support PSoC 6 MCU.
* Updated configuration to support CM4.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -145,6 +144,17 @@ PSoC 6 __NVIC_PRIO_BITS = 3
6
7 (low) KERNEL_INTERRUPT_PRIORITY 111xxxxx (0xFF)
CAT3 XMC devices __NVIC_PRIO_BITS = 6
0 (high)
1 MAX_API_CALL_INTERRUPT_PRIORITY 000001xx (0x07)
..
..
..
..
63 (low) KERNEL_INTERRUPT_PRIORITY 111111xx (0xFF)
!!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html
Expand All @@ -157,7 +167,11 @@ Put MAX_SYSCALL_INTERRUPT_PRIORITY in top __NVIC_PRIO_BITS bits of CM4 register
NOTE For IAR compiler make sure that changes of this macro is reflected in
file portable\TOOLCHAIN_IAR\COMPONENT_CM4\portasm.s in PendSV_Handler: routine
*/
#ifdef COMPONENT_CAT3
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 0x07
#else
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 0x3F
#endif
/* configMAX_API_CALL_INTERRUPT_PRIORITY is a new name for configMAX_SYSCALL_INTERRUPT_PRIORITY
that is used by newer ports only. The two are equivalent. */
#define configMAX_API_CALL_INTERRUPT_PRIORITY configMAX_SYSCALL_INTERRUPT_PRIORITY
Expand Down Expand Up @@ -216,10 +230,10 @@ standard names - or at least those used in the unmodified vector table. */

/* Enable low power tickless functionality. The RTOS abstraction library
* provides the compatible implementation of the vApplicationSleep hook:
* https://github.com/Infineon/abstraction-rtos#freertos
* https://github.com/infineon/abstraction-rtos#freertos
* The Low Power Assistant library provides additional portable configuration layer
* for low-power features supported by the PSoC 6 devices:
* https://github.com/Infineon/lpa
* https://github.com/infineon/lpa
*/
extern void vApplicationSleep( uint32_t xExpectedIdleTime );
#define portSUPPRESS_TICKS_AND_SLEEP( xIdleTime ) vApplicationSleep( xIdleTime )
Expand All @@ -240,7 +254,7 @@ extern void vApplicationSleep( uint32_t xExpectedIdleTime );
* GCC toolchain: the application must provide the implementation for the required
* newlib hook functions: __malloc_lock, __malloc_unlock, __env_lock, __env_unlock.
* FreeRTOS-compatible implementation is provided by the clib-support library:
* https://github.com/Infineon/clib-support
* https://github.com/infineon/clib-support
*
* ARM/IAR toolchains: the application must provide the reent.h header to adapt
* FreeRTOS's configUSE_NEWLIB_REENTRANT to work with the toolchain-specific C library.
Expand Down
28 changes: 22 additions & 6 deletions configs/FreeRTOS/COMPONENT_CM7/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2021-2022 Cypress Semiconductor Corporation (an Infineon company)
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* FreeRTOS Kernel V10.5.0
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright (C) 2019-2021 Cypress Semiconductor Corporation, or a subsidiary of
* Cypress Semiconductor Corporation. All Rights Reserved.
*
* Updated configuration to support PSoC 6 MCU.
* Updated configuration to support CM7.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -199,10 +215,10 @@ standard names - or at least those used in the unmodified vector table. */

/* Enable low power tickless functionality. The RTOS abstraction library
* provides the compatible implementation of the vApplicationSleep hook:
* https://github.com/Infineon/abstraction-rtos#freertos
* https://github.com/infineon/abstraction-rtos#freertos
* The Low Power Assistant library provides additional portable configuration layer
* for low-power features supported by the PSoC 6 devices:
* https://github.com/Infineon/lpa
* https://github.com/infineon/lpa
*/
extern void vApplicationSleep( uint32_t xExpectedIdleTime );
#define portSUPPRESS_TICKS_AND_SLEEP( xIdleTime ) vApplicationSleep( xIdleTime )
Expand All @@ -222,7 +238,7 @@ extern void vApplicationSleep( uint32_t xExpectedIdleTime );
* GCC toolchain: the application must provide the implementation for the required
* newlib hook functions: __malloc_lock, __malloc_unlock, __env_lock, __env_unlock.
* FreeRTOS-compatible implementation is provided by the clib-support library:
* https://github.com/Infineon/clib-support
* https://github.com/infineon/clib-support
*
* ARM/IAR toolchains: the application must provide the reent.h header to adapt
* FreeRTOS's configUSE_NEWLIB_REENTRANT to work with the toolchain-specific C library.
Expand Down
6 changes: 3 additions & 3 deletions configs/cy_ota_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, Cypress Semiconductor Corporation (an Infineon company)
* Copyright 2024, Cypress Semiconductor Corporation (an Infineon company)
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -121,13 +121,13 @@ extern "C" {
* @brief HTTP timeout for sending messages
*
*/
#define CY_OTA_HTTP_TIMEOUT_SEND (3000) /* 3 second send timeout (ms). */
#define CY_OTA_HTTP_TIMEOUT_SEND (3000) /* 3 seconds send timeout (ms). */

/**
* @brief HTTP timeout for receiving messages
*
*/
#define CY_OTA_HTTP_TIMEOUT_RECEIVE (3000) /* 3 second receive timeout. */
#define CY_OTA_HTTP_TIMEOUT_RECEIVE (3000) /* 3 seconds receive timeout. */


/**********************************************************************
Expand Down
Loading

0 comments on commit 4d15f21

Please sign in to comment.