I am using CYBLE-212020-01 modules which sends and receives some values over BLE from App.
I use Over-the -Air (OTA) firmware update.
The workspace encloses three projects functions are as follows:
1. Launcher project
The purpose of the project is to:
- Start either the Stack or Application project image
- Copy the Stack project image from a temporary location to the persistent location (just after the Launcher project image).
2. Stack project (contains the BLE Stack)
The purpose of the project is to:
- Host the BLE Stack
- Upgrade the Application project image
- Upgrade the Stack project image itself
- Receive updates for the Stack project image itself or for the Application project image
3. Custom Apllication Project
The Stack project is the bootloader.
I have a build that creates a stack.cyacd and app.cyacd.
I would like to combine the two to take advantage of the "Application and stack (combined) update" option of CySmart App.
The reason for this is that my application is using Upgradeable Stack project and so application image must match the correct stack or else device will not boot / operate correctly.
With two separate files, it is easy for client to update incorrectly and "brick" the device.
How can I either create the "combined update" file during build or combine the separate stack and app .cyacd files?
I read the following guide
CyMCUElfTool 1.0 User Guide but It is for PSoC6.
We in our project use CYBLE-212020-01 (PSoC 4.2).
Then I read the following link
But in the previous link Cypress explain how to merge two elf in one file .hex.
How I can convert .hex file combined in a .cyacd2 file for CYBLE-212020-01 (PSoC 4.2)?
Thanks in advance for any replies.
The way in which the DFU is implemented in PSoC 6 BLE is completely different from PSoC 4 BLE.
The memory present in the PSoC 4 BLe is not sufficient to hold two separate BLE applications (stack and application) at the same time. So, the upgradable stack OTA is implemented using two separate .cyacd files (for stack as well as application projects). I would like to share the architecture of BLE OTA process with Upgradable stack to you. It is as follows:
As per upgradable stack OTA architecture, stack upgrade is performed in three stages;
Stage 1: The firmware passes control to the Stack Application (using above mentioned method), which receives the new Stack Application image and writes it to a temporary location (User Application region) in the flash memory. The User Application becomes corrupted in this process (the new Stack Application image overwrites the existing User Application image).
Stage 2: After the download is complete, a software reset is initiated by the Stack Application, and the control passes to the Launcher image. It detects the image located in the temporary location (User Application region) and copies it to the Stack Application region.
(Later step is Application Upgrade as we corrupted application image which is as follows:)
Stage 3: Application Upgrade: Tthe User Application image is upgraded. To enter the OTA upgrade mode, the firmware passes the control to the Stack Application, which receives the new User Application image. The Stack Application then directly writes the new User Application image to the corresponding region of the flash.
Thus, when we use single .cyacd option, bootloader host will keep on giving program row commands continuously for both stack and user application flash rows. Thus, data flow diagram is disturbed. And also, main problem is limited memory.
Hence, the single profile option is limited for External Memory OTA Bootloader configuration where BLE stack and application are part of single image. External Memory OTA Bootloader configuration is called as legacy version of OTA.) Please have a look at this method also. You can get a code example from PSoC Creator itself.
Can you please explain whether the present problem of yours is related to the management of .cyacd files or the security?
Hope the above explanation helps. Kindly let us know if you have any queries.
Thanks and regards