I have an existing application, that I try to adapt to PSoc enviroment.
from the first image, I connect to a server (via other connected device), download a bin file from it, write it to the other flash partition, chang a parmeter in the boatloader memory, so that next reboot will result in running from the newly burned image - in the second partition.
how do I create such 2 images in PSoc enviroment, and configure bootloader to run from the first or second partition?
You can refer to the below App Note which tells about the Dual Application Bootloader - https://www.cypress.com/file/45346/download
You can also refer the Bootloader Api's for switching between APP0 and APP1.