Suggestions for Bootloader

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

cross mob
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

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

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

As such presently there is no API available in Bootloader Component that can copy the firmware from the unused FLASH into another  location.

View solution in original post

0 Likes
1 Reply
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

As such presently there is no API available in Bootloader Component that can copy the firmware from the unused FLASH into another  location.

0 Likes