4 Replies Latest reply on Jul 28, 2016 6:46 AM by JoMe_264151

    Incompatibility between bootloader and emulated EEPROM?





      I'm running the UART bootloader example that come with the CY8KIT-049-41xx USB dev kit.




      I used this as a base to build my own project and have found everything to work as described execpt for the emulated EEPROM.


      I've looked at the example code and at what's on this forum and it seems that when I create an image that invokes the EEPROM_Write() call and I download it using the bootloader host, it programs successfully and starts running.  However, if I power cycle, I'm back at the UART bootloader startup (quick blinking blue LED).  If I then comment out the EEPROM_Write() call and burn that image, the project persists through power cycles.


      I suspect that because the UART bootloader project flashes the new image in EEPROM, it doesn't play well with the emulated EEPROM.


      Any thoughts?



        • 1. Re: Incompatibility between bootloader and emulated EEPROM?

          My memory is getting older just as me... I remember having seen a similar post. Cypress reported that it had to do with the temperature depending algorithm of eeprom programming and that a simple call for the temp sensing API would clear the problem.


          Because I could not retrieve that information, I would suggest you to get in contact with Cypress directly: At top of this page select "Design support -> Create a Support Case" and ask your question. Leave a link to this thread, so Cypress can see what I assume. You will be helped by a Cypress engineer.


          Edit: *************** Found the thread ***********


          Follow this link to get to the tread and a workaround.





          • 2. Re: Incompatibility between bootloader and emulated EEPROM?

            Thanks Bob!  Your memory is clearly better than mine :^).


            I did try to find CySetTemp() on the PSOC4, but it only seems to exist in th  PSOC3 and 5LE.  I can't find it in the headers or libraries of the PSOC4 and declaring it in the main file just produces an undefined reference at link time.


            I'll follow your suggestion and create a ticket.


            Thanks for your help!




            PS:  Originally, I hadn't turn off the Application Validation in the bootloader module, so I turned it off without invoking CySetTemp() in the hope that this problem had been fixed, but to no avail.

            • 3. Re: Incompatibility between bootloader and emulated EEPROM?

              Hi Bob,


              Just a follow-up FYI...


              After a few back-and-forths with Cypress, it turns out that the "Fast bootloadable application validation" checkbox of the Bootloader Component configuration window must be checked to prevent the bootloader from rejecting the boot image because the checksum is incorrect after updating the flash with virtual eeprom calls.


              Another gotcha is that the project dependencies of the target project must point to the new hex and elf files produced by compiling the bootloader project. This is found in the bootloadable component's Dependencies tab.  By default, it points to a static image that doesn't update when recompiling the project.


              The last and biggest issue is that the CY8KIT-049-41xx can only be reprogrammed using the bootloader host, and the bootloader host cannot update the bootloader portion of the flash.  Therefore, unless I have a pioneer kit or something equivalent that can directly reprogram the part, I can't apply the changes stated above and I can't use emulated EEPROM.  I guess that's what you get for a $4 kit, but it would be nice if the folks at Cypress made that clear in their documentation so that designers don't waste their time trying to make this work.


              Thanks for your help.



              • 4. Re: Incompatibility between bootloader and emulated EEPROM?

                You can put the emeeprom out of the project below the metadata and exclude that area from checksum calculating. So you do not need to change the bootloader and can use the original .hex and -elf files.