0 Replies Latest reply on May 18, 2020 10:31 AM by SaMi_4664361

    "Bootloader application validation" error




      I am using Psoc Creator 3.3 and am designing a Bootloader component to be used with a Bootloadable component.

      One of the requirements is that the bootloader needs to validate itself before proceeding with bootloading, which is provided by the "Bootloader application validation" setting in the bootloader component in "TopDesign.cysch" file.

      However, after building and flashing the project in Eclipse with a J-Link (not Miniprog3), the code hangs during checksum calculation. The reason is these two following lines in Bootloader_1.c:

      const uint32 CYCODE Bootloader_1_SizeBytes = 0xFFFFFFFFu;
      const uint32 CYCODE *Bootloader_1_SizeBytesAccess = (const uint32 CYCODE *)(&Bootloader_1_SizeBytes);


      As you can see, the bootloader's size is hard coded and as a result it will calculate the checksum forever. I confirmed this by pausing the program with the debugger.

      According to Cypress:

      Bootloader application validation

      If this option is enabled, the bootloader validates itself by calculating the checksum and comparing it with the saved one that resides in the internal variable. PSoC Creator generates and puts the exact value into this variable during the post-build step.If validation does not pass, the device halts.If this option is disabled, the bootloader is executed even if it is corrupted. This can lead to unpredictable results.

      this should be handled during post-build.


      Am I missing a setting somewhere?