4 Replies Latest reply on Feb 8, 2018 11:05 AM by MiSt_296941

    Custom Bootloader Comm Component Example


      I have never made a custom component but find the need to bootload a PSoC5LP over a custom communication interface on our product.  Does anyone know of an example that I could use rather than start from scratch and read a lot of the Custom Component Guide?



        • 2. Re: Custom Bootloader Comm Component Example

          Thanks for the info.  In looking around some more it looks like I could just implement the 5 Bootloader communication API functions in my own code and not have to create a custom component or am I missing something?



          • 3. Re: Custom Bootloader Comm Component Example

            For a component to support bootloading, it must implement five functions-


             CyBtldrCommStart
             CyBtldrCommStop
             CyBtldrCommReset
             CyBtldrCommWrite
             CyBtldrCommRead


            Further details are available in Component Author Guide from page#128-131 available in Documentation of  HELP section of Creator

            • 4. Re: Custom Bootloader Comm Component Example

              So now that I have finished this and have it working I will share a few things:


              1. The example code from AN68272 was very helpful except that it needs to be redone because of updates to the bootloader utilities.

              2. The updates to the bootloader utilities were not documented by Cypress - they really need to do this.  There are absolutely no comments or versioning in these source files!

              3. Debugging bootloaders is fun - Ok, maybe I'm being a little sarcastic.


              FYI for my project, I have 3 different projects that cover 4 PSoCs on two boards that communicate with each other - actually there can be 3 boards total as the Master board can have 2 Slave boards on a 2 wire (power and signal) bus (the proprietary protocol).  The Master has a PSoC5LP with a USB connection so it gets bootloaded from the PC and that was easy to implement on the PSoC side (software engineer did the PC program and he had some fun but not too bad).  The Slave board has a PSoC5LP that communicates with the Master over the proprietary protocol and with 2 PSoC3's via RS232.


              Our PC program allows the user to bootload the Master as one operation and any connected Slaves with another operation.  So if there are 2 connected slaves, we bootload 6 PSoCs in one process - takes about 5 minutes.  Took me about a month to get the code written and debugged!  Oh, by the way, there can be up to 2km of cable between the Master and Slave boards and yes we tested that.