bootloader from memory

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I'm looking for a PSoC 4 bootloader that loads an image from an external buffer (ext. flash in this case, which has the cyacd file in it).

I'll make sure the image gets inside the flash from my end, I can provide the bootloader with the char array of the cyacd file, or line by line, whatever works. What I am looking for is the code that loads that cyacd file to the flash.

All bootloaders seem to be made to run from a communication protocol rather than from an external buffer.

Now the BLE examples have an external flash bootloader demo, but I dont really see the separation between bluetooth and the bootloading.

I guess a good start would be to have a bootloader that starts with a (hardcoded) images string (cyacd file contents) as an input. Does anyone have such a thing? The rest I can do myself

If I am approaching things the wrong way, or if I am not clear what I need, let me know

Regards,

Robert

0 Likes
1 Solution
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received
3 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Kindly have  a look at this PSoC 4 EEPROM Bootloader Example - Hackster.io

Thanks,

Hima

Anonymous
Not applicable

Hi Hima,

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.

Regards,

Robert

Anonymous
Not applicable

Hi!

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.

0 Likes