Thank you for the reply.
This seems to be what I am looking for. Though it all looks so hacky, since it is sort of an emulation of the bootloader protocol, and on top of that, the example does not feature any hardware abstraction making it not easy to read and understand.
The bootloadable / image write part I do understand, but I don't see the purpose of CyBtldrCommWrite function in the bootloader. It almost looks like the bootloader is WRITING commands to the memory during the bootload process.
Can you please enlighten me on the communication between bootloader and memory? Why is it writing stuff?
On a more general note, as a feature request;
I highly doubt I am the only one wanting to boot from alternate memory-based sources, it might be worth investing some time in getting the bootloader component updated and an example done with a proper interface meant for memory access instead of those CyBtldrCommRead/Write functions. Maybe make CyBtldrMemRead/Write functions for direct memory access in future versions of the bootloader. This really is a must-have in many IoT applications, especially when reliability of communication is unreliable.
Any programmer can get an image in a piece of memory, I would just need a function that tells me which data/string/array the bootloader wants to read.
I did a bootloader implementation that seems like the solution provides by hima.
I'm getting some problems, that I'll discuss in another thread.
Well, about your question the usage of CyBtldrCommWrite is up to you. I think that he used this approach because is easier to write the bootloader, you only shold have to write the functions CyBtldrCommStart, CyBtldrCommStop, CyBtldrCommReset, CyBtldrCommWrite and CyBtldrCommRead.