Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I am currently developing a system in which a PSoC5 talks to a PC through EtherCAT, using the ET1200 EtherCAT ASIC.
Talking to the EtherCAT chip is fairly complex, and I don't want to put this functionality into the bootloader. I would prefer to only have this functionality in the firmware. Therefore, in order to bootload new firmware, I am considering the following process:
The host sends the new firmware over EtherCAT, 8 bytes at a time (that's all the available space we have in our packet).
The currently running FW writes the new firmware into the unused FLASH.
Once all the new FW is written, it verifies it, and then resets into bootloader mode.
The bootloader then copies the new FW from FLASH into the correct position, overwriting the old firmware.
The bootloader resets to the new firmware.
As far as I can tell, none of the use cases in the document Bootloader_v1_50.pdf are appropriate to my particular process.
To implement the copying process, I have selected "Custom Interface" in the configuration of the Bootloader Component. My implementation of the custom interface has the CyBtldrCommRead() function read the new FW from FLASH, 256 bytes at a time, and give it to the Bootloader Component. Essentially, by code is acting like a Bootloader Host, controlling the Bootloader Component.
Does this sound like a sensible way to do this?
Is there a function in the Bootloader component to simply copy the firmware from the unused FLASH into the correct location? I notice that there is a "Copier" available, but only to the Launcher-Combination use case.