1 Reply Latest reply on Apr 25, 2017 11:47 PM by anks

    Suggestions for Bootloader

    user_62720120

      Hi,

         

      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:

         
            
      1. The host sends the new firmware over EtherCAT, 8 bytes at a time (that's all the available space we have in our packet).
      2.     
      3. The currently running FW writes the new firmware into the unused FLASH.
      4.     
      5. Once all the new FW is written, it verifies it, and then resets into bootloader mode.
      6.     
      7. The bootloader then copies the new FW from FLASH into the correct position, overwriting the old firmware.
      8.     
      9. The bootloader resets to the new firmware.
      10.    
         

      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.

         

      Many thanks

         

      Hugo